From 3cc0e0befb3d6012a7ed9649a2220bf6cc6c614f Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Thu, 5 Dec 2019 01:28:11 +0200 Subject: [PATCH 01/19] List of unstable tests for 10.2.30 release --- mysql-test/unstable-tests | 453 ++++++++------------------------------ 1 file changed, 97 insertions(+), 356 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 1990da921ec..ea167255c03 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,241 +23,115 @@ # ############################################################################## # -# Based on 10.2 259edb1f60b5d4e9061a81e90c5a8ec9d0741751 +# Based on 10.2 c9b9eb331570704d020fcc7c7894f19febe7f26d -main.alter_table_mdev539_maria : Include file modified in 10.2.27 -main.alter_table_mdev539_myisam : Include file modified in 10.2.27 main.alter_table_trans : MDEV-12084 - timeout -main.analyze : Modified in 10.2.27 -main.analyze_format_json : Modified in 10.2.27 -main.analyze_stmt : Modified in 10.2.27 -main.analyze_stmt_orderby : Modified in 10.2.27 -main.analyze_stmt_privileges2 : Modified in 10.2.27 main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.auth_named_pipe : MDEV-14724 - System error 2 -main.bootstrap : Modified in 10.2.27 -main.bug13633383 : Modified in 10.2.27 -main.cast : Modified in 10.2.27 main.compare : Modified in 10.2.28 -main.compound : Modified in 10.2.27 -main.compress : Include file modified in 10.2.27 main.connect : MDEV-17282 - Wrong result main.connect2 : MDEV-13885 - Server crash -main.constraints : Modified in 10.2.27 main.count_distinct2 : MDEV-11768 - timeout -main.create : Modified in 10.2.27 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result -main.cte_nonrecursive : Modified in 10.2.27 -main.cte_recursive : Modified in 10.2.27 -main.ctype_create : Modified in 10.2.27 -main.ctype_latin1_de : Modified in 10.2.27 main.ctype_uca : Include file modified in 10.2.28 main.ctype_uca_innodb : Include file modified in 10.2.28 -main.ctype_ucs : MDEV-17681 - Data too long for column; modified in 10.2.27 +main.ctype_ucs : MDEV-17681 - Data too long for column main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade main.ctype_utf16 : MDEV-10675: timeout or extra warnings -main.ctype_utf16_def : Configuration modified in 10.2.27 main.ctype_utf8 : Include file modified in 10.2.28 -main.ctype_utf8mb4 : Modified in 10.2.27 -main.ctype_utf8mb4_heap : Include file modified in 10.2.27 -main.ctype_utf8mb4_innodb : Include file modified in 10.2.27 -main.ctype_utf8mb4_myisam : Include file modified in 10.2.27 main.debug_sync : MDEV-10607 - internal error -main.default : Modified in 10.2.27 -main.derived : Modified in 10.2.27 -main.derived_cond_pushdown : Modified in 10.2.27 main.derived_opt : MDEV-11768 - timeout -main.derived_view : Modified in 10.2.27 main.dirty_close : MDEV-19368 - mysqltest failed but provided no output -main.distinct : MDEV-14194 - Crash; modified in 10.2.27 +main.distinct : MDEV-14194 - Crash main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.2.28 main.drop_debug : Modified in 10.1.42 -main.dyncol : Modified in 10.2.27 -main.events_1 : Modified in 10.2.27 -main.events_2 : MDEV-13277 - Crash; modified in 10.2.27 -main.events_bugs : MDEV-12892 - Crash; modified in 10.2.27 -main.events_grant : Modified in 10.2.27 +main.events_2 : MDEV-13277 - Crash +main.events_bugs : MDEV-12892 - Crash main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result -main.explain_json : Modified in 10.2.27 main.flush : MDEV-19368 - mysqltest failed but provided no output -main.flush2 : Modified in 10.2.27 -main.func_isnull : Modified in 10.2.27 main.func_math : Modified in 10.2.28 -main.func_misc : Modified in 10.2.27 -main.function_defaults : Modified in 10.2.27 main.gis : MDEV-13411 - wrong result on P8 -main.grant : Configuration added in 10.2.27 -main.grant2 : Configuration added in 10.2.27 -main.grant4 : Configuration added in 10.2.27 -main.grant_cache_no_prot : Include file modified in 10.2.27 -main.grant_cache_ps_prot : Include file modified in 10.2.27 -main.grant_explain_non_select : Modified in 10.2.27 -main.greedy_optimizer : Modified in 10.2.27 -main.group_by : Modified in 10.2.27 -main.group_min_max : Modified in 10.2.27 -main.handlersocket : Configuration added in 10.2.27 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown -main.index_intersect : Modified in 10.2.27 main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Plan mismatch; modified in 10.2.28 main.index_merge_myisam : Modified in 10.2.28 -main.information_schema : Modified in 10.2.27 -main.information_schema-big : Modified in 10.2.27 main.information_schema_db : Modified in 10.2.28 -main.information_schema_parameters : Modified in 10.2.27 -main.information_schema_routines : Modified in 10.2.27 -main.innodb_ext_key : Modified in 10.2.27 -main.innodb_icp : Modified in 10.2.27 main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.join : Modified in 10.2.27 -main.join_cache : Modified in 10.2.27 -main.join_nested_jcl6 : Modified in 10.2.27 -main.join_outer : Modified in 10.2.27 -main.join_outer_innodb : Modified in 10.2.27 -main.join_outer_jcl6 : Modified in 10.2.27 +main.join : Modified in 10.1.42 main.kill : Modified in 10.2.28 main.kill-2 : MDEV-13257 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result -main.limit_rows_examined : Modified in 10.2.27 main.loaddata : MDEV-19368 - mysqltest failed but provided no output main.locale : MDEV-20521 - Missing warning -main.log_slow : MDEV-13263 - Wrong result; modified in 10.2.27 +main.log_slow : MDEV-13263 - Wrong result main.log_slow_debug : Modified in 10.2.28 main.log_tables-big : MDEV-13408 - wrong result main.mdev-504 : MDEV-15171 - warning -main.mdev13607 : Modified in 10.2.27 main.mdev375 : MDEV-10607 - sporadic "can't connect" -main.merge : MDEV-10607 - sporadic "can't connect"; modified in 10.2.27 -main.mrr_icp_extra : Modified in 10.2.27 +main.merge : MDEV-10607 - sporadic "can't connect" main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out main.myisam : Modified in 10.2.28 -main.myisam_explain_non_select_all : Modified in 10.2.27 -main.myisam_icp : Modified in 10.2.27 -main.myisam_mrr : Modified in 10.2.27 -main.mysql : Modified in 10.2.27 -main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; modified in 10.2.27 +main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2 main.mysql_client_test_comp : MDEV-16641 - Error in exec main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_comments : Modified in 10.2.27 main.mysql_upgrade_noengine : MDEV-14355 - Wrong result -main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error -main.mysqlcheck : Modified in 10.2.27 -main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.2.27 -main.mysqldump-max : Modified in 10.2.27 -main.mysqldump-nl : Modified in 10.2.27 +main.mysqldump : MDEV-14800 - Stack smashing detected main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha; MDEV-13887 - Wrong result -main.named_pipe : Include file modified in 10.2.27 main.old-mode : MDEV-19373 - Wrong result -main.openssl_1 : MDEV-13492 - Unknown SSL error; modified in 10.2.27 main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.order_by : Modified in 10.2.30 main.order_by_innodb : Modified in 10.2.28 main.order_by_optimizer_innodb : MDEV-10683 - Wrong result main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock; modified in 10.2.28 -main.partition_example : Configuration added in 10.2.27 -main.partition_innodb : Modified in 10.2.27 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 -main.partition_key_cache : Modified in 10.2.27 -main.partition_pruning : Modified in 10.2.27 -main.plugin : Configuration added in 10.2.27 -main.plugin_innodb : Configuration added in 10.2.27 -main.plugin_load : Configuration modified in 10.2.27 -main.plugin_load_option : Configuration modified in 10.2.27 -main.plugin_not_embedded : Configuration added in 10.2.27 -main.pool_of_threads : Modified in 10.2.27 main.processlist : Modified in 10.2.28 main.processlist_notembedded : Added in 10.2.28 -main.ps : Configuration modified in 10.2.27 main.query_cache : MDEV-16180 - Wrong result -main.query_cache_debug : MDEV-15281 - Query cache is disabled; modified in 10.2.27 -main.query_cache_ps_no_prot : Modified in 10.2.27 -main.range : Modified in 10.2.27 -main.range_interrupted-13751 : Modified in 10.2.27 -main.range_mrr_icp : Modified in 10.2.27 -main.range_vs_index_merge : Modified in 10.2.27 +main.query_cache_debug : MDEV-15281 - Query cache is disabled main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.repair : Modified in 10.2.27 -main.schema : Modified in 10.2.27 -main.select : Modified in 10.2.27 -main.selectivity : Modified in 10.2.28 -main.selectivity_innodb : Modified in 10.2.27 -main.selectivity_no_engine : Modified in 10.2.27 +main.selectivity : Modified in 10.2.30 main.set_statement : MDEV-13183 - Wrong result main.set_statement_notembedded : MDEV-19414 - Wrong result -main.shm : MDEV-12727 - Mismatch, ERROR 2013; include file modified in 10.2.27 -main.show_bad_definer-5553 : Modified in 10.2.27 -main.show_check : Modified in 10.2.27 +main.shm : MDEV-12727 - Mismatch, ERROR 2013 main.show_explain : MDEV-10674 - Wrong result code main.sp : Modified in 10.2.28 main.sp-code : Modified in 10.2.28 -main.sp-error : Modified in 10.2.27 -main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.2.27 +main.sp-security : MDEV-10607 - sporadic "can't connect" main.sp_notembedded : MDEV-10607 - internal error -main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1; modified in 10.2.27 -main.ssl-big : Modified in 10.2.27 +main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_compress : Modified in 10.2.27 -main.ssl_connect : MDEV-13492 - Unknown SSL error main.ssl_crl : MDEV-19119 - Wrong error code main.ssl_timeout : MDEV-11244 - Crash main.stat_tables : Modified in 10.2.28 -main.stat_tables-enospc : Modified in 10.2.27 main.stat_tables_par : MDEV-13266 - Wrong result main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding -main.statistics : Modified in 10.2.27 main.status : MDEV-13255 - Wrong result -main.subselect : Modified in 10.2.27 -main.subselect2 : Modified in 10.2.27 -main.subselect3 : Modified in 10.2.27 -main.subselect3_jcl6 : Modified in 10.2.27 -main.subselect4 : Modified in 10.2.27 -main.subselect_exists2in : Modified in 10.2.27 -main.subselect_extra : Modified in 10.2.27 main.subselect_innodb : MDEV-10614 - Sporadic wrong results -main.subselect_mat_cost : Modified in 10.2.27 -main.subselect_mat_cost_bugs : Modified in 10.2.27 main.subselect_sj : Modified in 10.2.28 -main.subselect_sj2 : Modified in 10.2.27 -main.subselect_sj2_mat : Modified in 10.2.27 -main.subselect_sj_jcl6 : Modified in 10.2.27 -main.subselect_sj_mat : Modified in 10.2.27 -main.subselect_sj_nonmerged : Modified in 10.2.27 main.sum_distinct-big : Modified in 10.2.28 -main.table_options-5867 : Configuration added in 10.2.27 main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.trigger : Modified in 10.2.27 -main.trigger-compat : Modified in 10.2.27 -main.trigger_notembedded : Modified in 10.2.27 -main.truncate_badse : Configuration added in 10.2.27 main.type_blob : MDEV-15195 - Wrong result -main.type_date : Modified in 10.2.27 -main.type_datetime : Modified in 10.2.27 +main.type_date : Modified in 10.1.42 +main.type_datetime : Modified in 10.1.42 main.type_datetime_hires : MDEV-10687 - Timeout -main.type_int : Modified in 10.2.27 +main.type_int : Modified in 10.1.42 main.type_newdecimal : Modified in 10.2.28 -main.type_time_6065 : Modified in 10.2.27 -main.type_varchar : Configuration added in 10.2.27 -main.union : Modified in 10.2.27 -main.upgrade : Configuration added in 10.2.27 -main.userstat : MDEV-12904 - SSL errors; configuration added in 10.2.27 -main.variables : Modified in 10.2.27 -main.variables-notembedded : Modified in 10.2.27 -main.view : Modified in 10.2.27 +main.uniques_crash-7912 : MDEV-21210 - Excessive memory consumption +main.userstat : MDEV-12904 - SSL errors main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query main.xa : MDEV-11769 - lock wait timeout -main.xtradb_mrr : Modified in 10.2.27 #----------------------------------------------------------------------- archive.archive_bitfield : MDEV-11771 - table is marked as crashed archive.archive_symlink : MDEV-12170 - unexpected error on rmdir archive.discover : MDEV-10510 - Table is marked as crashed -archive.discover_5438 : Configuration added in 10.2.27 archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug #----------------------------------------------------------------------- @@ -267,17 +141,12 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed #----------------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Mismatch -binlog.binlog_innodb : Configuration added in 10.2.27 binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown; modified in 10.2.27 -binlog.binlog_mixed_cache_stat : Configuration added in 10.2.27 -binlog.binlog_mysqlbinlog2 : Modified in 10.2.27 -binlog.binlog_row_cache_stat : Include file modified in 10.2.27 -binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.2.27 -binlog.binlog_stm_cache_stat : Include file modified in 10.2.27 -binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.2.27 +binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown +binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.1.42 +binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.1.42 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint -binlog.flashback-largebinlog : MDEV-19764 - Out of memory; modified in 10.2.27 +binlog.flashback-largebinlog : MDEV-19764 - Out of memory binlog.load_data_stm_view : MDEV-16948 - Wrong result #----------------------------------------------------------------------- @@ -290,6 +159,7 @@ binlog_encryption.encryption_combo : MDEV-14199 - Table is binlog_encryption.mysqlbinlog : Modified in 10.2.28 binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result +binlog_encryption.rpl_corruption : Include file modified in 10.2.30 binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include @@ -319,10 +189,8 @@ connect.zip : MDEV-13884 - Wrong result encryption.create_or_replace : MDEV-12694 - Timeout; MDEV-16115 - Trying to access tablespace encryption.debug_key_management : MDEV-13841 - Timeout encryption.encrypt_and_grep : MDEV-13765 - Wrong result -encryption.file_creation : Added in 10.2.27 encryption.innochecksum : MDEV-13644 - Assertion failure encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect through socket -encryption.innodb-checksum-algorithm : MDEV-16896 - Server crash encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate encryption.innodb-discard-import : MDEV-19113 - Timeout encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout @@ -335,7 +203,7 @@ encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait con encryption.innodb-spatial-index : MDEV-13746 - Wrong result encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout encryption.innodb_encrypt_log : MDEV-13725 - Wrong result -encryption.innodb_encrypt_log_corruption : Configuration modified in 10.2.27 +encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result encryption.innodb_encryption : MDEV-15675 - Timeout encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure @@ -346,7 +214,6 @@ encryption.innodb_onlinealter_encryption : MDEV-17287 - SIGABRT on server r encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing -encryption.tempfiles : Modified in 10.2.27 #----------------------------------------------------------------------- @@ -371,37 +238,9 @@ federated.federatedx : MDEV-10617 - Wrong checksum #----------------------------------------------------------------------- -funcs_1.innodb_storedproc_07 : Include file modified in 10.2.27 -funcs_1.innodb_storedproc_08 : Include file modified in 10.2.27 -funcs_1.innodb_trig_03e : Modified in 10.2.27 -funcs_1.is_basics_mixed : Modified in 10.2.28 -funcs_1.is_columns : Modified in 10.2.27 -funcs_1.is_columns_innodb : Modified in 10.2.27 -funcs_1.is_columns_memory : Modified in 10.2.27 -funcs_1.is_columns_myisam : Modified in 10.2.27 -funcs_1.is_routines : Include file modified in 10.2.27 -funcs_1.is_routines_embedded : Include file modified in 10.2.27 -funcs_1.is_schemata : Include file modified in 10.2.27 -funcs_1.is_schemata_embedded : Include file modified in 10.2.27 -funcs_1.is_schemata_is_mysql_test : Modified in 10.2.27 -funcs_1.is_tables : Include file modified in 10.2.27 -funcs_1.is_tables_embedded : Include file modified in 10.2.27 -funcs_1.is_tables_innodb : Include file modified in 10.2.27 -funcs_1.is_tables_memory : Include file modified in 10.2.27 -funcs_1.is_tables_myisam : Include file modified in 10.2.27 -funcs_1.is_tables_myisam_embedded : Include file modified in 10.2.27 -funcs_1.is_triggers : Include file modified in 10.2.27 -funcs_1.is_triggers_embedded : Include file modified in 10.2.27 -funcs_1.memory_storedproc_07 : Include file modified in 10.2.27 -funcs_1.memory_storedproc_08 : Include file modified in 10.2.27 -funcs_1.memory_trig_03e : Modified in 10.2.27 -funcs_1.memory_views : MDEV-11773 - timeout -funcs_1.myisam_storedproc_07 : Include file modified in 10.2.27 -funcs_1.myisam_storedproc_08 : Include file modified in 10.2.27 -funcs_1.myisam_trig_03e : Modified in 10.2.27 -funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result -funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan -funcs_1.storedproc : Modified in 10.2.27 +funcs_1.memory_views : MDEV-11773 - timeout +funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result +funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan #----------------------------------------------------------------------- @@ -410,8 +249,7 @@ funcs_2.myisam_charset : MDEV-11535 - Timeout #----------------------------------------------------------------------- -funcs_2/charset.* : MDEV-10999 - Not maintained -funcs_2/charset.charset_master : Modified in 10.2.27 +funcs_2/charset.* : MDEV-10999 - Not maintained #----------------------------------------------------------------------- @@ -424,48 +262,40 @@ galera_3nodes.* : Suite is not stable yet #----------------------------------------------------------------------- gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' -gcol.gcol_select_innodb : Include file modified in 10.2.27 -gcol.gcol_select_myisam : Include file modified in 10.2.27 -gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion; modified in 10.2.27 +gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.2.28 -gcol.innodb_virtual_index : Modified in 10.2.27 #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result -innodb.alter_copy : MDEV-16181 - Assertion failure; modified in 10.2.27 +innodb.alter_copy : MDEV-16181 - Assertion failure innodb.alter_crash : MDEV-16944 - The process cannot access the file -innodb.auto_increment_dup : Modified in 10.2.27 innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start +innodb.blob-crash : MDEV-20481 - Failures upon recovery innodb.doublewrite : MDEV-12905 - Server crash -innodb.foreign-keys : Modified in 10.2.27 -innodb.foreign_key : Modified in 10.2.27 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure -innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.2.28 +innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.2.30 innodb.information_schema_grants : Added in 10.2.28 -innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup -innodb.innodb-alter : Modified in 10.2.27 +innodb.innodb-32k-crash : Modified in 10.2.30 +innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.2.30 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS innodb.innodb-alter-table : MDEV-10619 - Testcase timeout innodb.innodb-autoinc : Modified in 10.2.28 innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query; modified in 10.2.28 innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown -innodb.innodb-fkcheck : Modified in 10.2.27 -innodb.innodb-get-fk : MDEV-13276 - Server crash; modified in 10.2.27 +innodb.innodb-get-fk : MDEV-13276 - Server crash innodb.innodb-index-online : MDEV-14809 - Cannot save statistics -innodb.innodb-mdev7046 : Modified in 10.2.27 +innodb.innodb-mdev-7513 : Modified in 10.2.30 innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem -innodb.innodb-read-view : Added in 10.2.27 -innodb.innodb-system-table-view : Configuration modified in 10.2.27 innodb.innodb-table-online : MDEV-13894 - Wrong result innodb.innodb-virtual-columns-debug : Modified in 10.2.28 -innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.2.27 +innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt @@ -473,16 +303,12 @@ innodb.innodb_bug30423 : MDEV-7311 - Wrong result innodb.innodb_bug47167 : MDEV-20524 - Table 'user' is marked as crashed and should be repaired innodb.innodb_bug48024 : MDEV-14352 - Assertion failure innodb.innodb_bug59641 : MDEV-13830 - Assertion failure -innodb.innodb_bug68148 : Modified in 10.2.27 -innodb.innodb_bug84958 : Added in 10.2.27 -innodb.innodb_bulk_create_index_debug : Include file modified in 10.2.27 -innodb.innodb_bulk_create_index_flush : Configuration added in 10.2.27 innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full innodb.innodb_force_recovery : Modified in 10.2.28 innodb.innodb_information_schema : MDEV-8851 - Wrong result -innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed -innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result +innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.2.30 +innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.2.30 innodb.innodb_monitor : MDEV-10939 - Testcase timeout innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_stats : MDEV-10682 - wrong result @@ -490,7 +316,6 @@ innodb.innodb_stats_persistent : Modified in 10.2.28 innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.log_alter_table : Configuration added in 10.2.27 innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start innodb.log_file_name : MDEV-14193 - Exception @@ -499,71 +324,67 @@ innodb.monitor : MDEV-16179 - Wrong result innodb.purge_secondary : MDEV-15681 - Wrong result innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash -innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile; modified in 10.2.27 +innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace +innodb.row_size_error_log_warnings_3 : Added in 10.2.30 innodb.stat_tables : Added in 10.2.28 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temporary_table : MDEV-13265 - Wrong result innodb.temporary_table_optimization : Modified in 10.2.28 innodb.trx_id_future : Modified in 10.1.42 +innodb.undo_log : Modified in 10.2.30 innodb.undo_truncate : MDEV-17340 - Server hung -innodb.undo_truncate_recover : MDEV-17679 - MySQL server has gone away; modified in 10.2.27 +innodb.undo_truncate_recover : MDEV-17679 - MySQL server has gone away innodb.update_time : MDEV-14804 - Wrong result innodb.xa_recovery : MDEV-15279 - mysqld got exception #----------------------------------------------------------------------- -innodb_fts.concurrent_insert : Modified in 10.2.28 +innodb_fts.concurrent_insert : MDEV-21223 - Server crash; modified in 10.2.28 innodb_fts.crash_recovery : Modified in 10.2.28 -innodb_fts.innodb_fts_misc : Modified in 10.2.28 +innodb_fts.innodb_fts_misc : Modified in 10.2.30 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed innodb_fts.sync : MDEV-14808 - Wrong result +innodb_fts.sync_ddl : MDEV-21223 - Server crash #----------------------------------------------------------------------- -innodb_gis.rtree_compress2 : Modified in 10.2.27 innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check innodb_gis.rtree_split : MDEV-14208 - Too many arguments innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed -innodb_gis.update_root : Modified in 10.2.27 #----------------------------------------------------------------------- -innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed -innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings -innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.2.27 -innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure -innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket -innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 +innodb_zip.bug53591 : Modified in 10.2.30 +innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed +innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings +innodb_zip.prefix_index_liftedlimit : Modified in 10.2.30 +innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2 +innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure +innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket +innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 #----------------------------------------------------------------------- -maria.icp : Modified in 10.2.27 maria.insert_select : MDEV-12757 - Timeout maria.insert_select-7314 : MDEV-16492 - Timeout maria.lock : Modified in 10.2.28 maria.maria : MDEV-14430 - Extra warning -maria.maria-big : Modified in 10.2.27 -maria.maria-gis-recovery : Modified in 10.2.27 -maria.maria-no-logging : Modified in 10.2.27 -maria.maria-recover : Modified in 10.2.27 -maria.maria-recovery : Modified in 10.2.27 -maria.maria3 : Modified in 10.2.27 #----------------------------------------------------------------------- mariabackup.apply-log-only : MDEV-20135 - Timeout -mariabackup.big_innodb_log : Added in 10.2.27 mariabackup.data_directory : MDEV-15270 - Error on exec mariabackup.extra_lsndir_stream : Added in 10.2.28 mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future +mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure; modified in 10.2.30 mariabackup.incremental_encrypted : MDEV-15667 - Timeout mariabackup.mdev-14447 : MDEV-15201 - Timeout mariabackup.mdev-18438 : Added in 10.2.28 @@ -607,23 +428,7 @@ parts.partition_debug : Modified in 10.2.28 parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist; modified in 10.2.28 parts.partition_debug_myisam : Modified in 10.2.28 parts.partition_exch_qa_10 : MDEV-11765 - wrong result -parts.partition_exch_qa_4_innodb : Include file modified in 10.2.27 -parts.partition_exch_qa_4_myisam : Include file modified in 10.2.27 -parts.partition_exch_qa_8_innodb : Include file modified in 10.2.27 -parts.partition_exch_qa_8_myisam : Include file modified in 10.2.27 parts.partition_innodb_status_file : MDEV-12901 - Valgrind -parts.partition_mgm_lc0_archive : Include file modified in 10.2.27 -parts.partition_mgm_lc0_innodb : Include file modified in 10.2.27 -parts.partition_mgm_lc0_memory : Include file modified in 10.2.27 -parts.partition_mgm_lc0_myisam : Include file modified in 10.2.27 -parts.partition_mgm_lc1_archive : Include file modified in 10.2.27 -parts.partition_mgm_lc1_innodb : Include file modified in 10.2.27 -parts.partition_mgm_lc1_memory : Include file modified in 10.2.27 -parts.partition_mgm_lc1_myisam : Include file modified in 10.2.27 -parts.partition_mgm_lc2_archive : Include file modified in 10.2.27 -parts.partition_mgm_lc2_innodb : Include file modified in 10.2.27 -parts.partition_mgm_lc2_memory : Include file modified in 10.2.27 -parts.partition_mgm_lc2_myisam : Include file modified in 10.2.27 parts.partition_special_innodb : MDEV-16942 - Timeout parts.reorganize_partition_innodb : Added in 10.2.28 @@ -633,39 +438,26 @@ percona.* : MDEV-10997 - Not maintained #----------------------------------------------------------------------- -perfschema.connect_attrs : MDEV-17283 - Wrong result -perfschema.dml_file_instances : MDEV-15179 - Wrong result -perfschema.dml_threads : MDEV-17746 - Wrong errno -perfschema.func_file_io : MDEV-5708 - fails for s390x -perfschema.func_mutex : MDEV-5708 - fails for s390x -perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash -perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash; configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_again_deny : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash; configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_bad_deny : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_good_allow : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_good_deny : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_noname_allow : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_addrinfo_noname_deny : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_auth_plugin : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_blocked : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_max_con : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_nameinfo_again_allow : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_nameinfo_again_deny : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_nameinfo_noname_allow : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_nameinfo_noname_deny : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_passwd : Configuration modified in 10.2.27 -perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; configuration modified in 10.2.27 -perfschema.privilege_table_io : MDEV-13184 - Extra lines -perfschema.rpl_gtid_func : MDEV-16897 - Wrong result -perfschema.socket_instances_func : MDEV-20140 - Wrong result -perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result -perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result -perfschema.stage_mdl_function : Include file modified in 10.2.27 -perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders; include file modified in 10.2.27 -perfschema.stage_mdl_procedure : MDEV-11545 - Missing row; include file modified in 10.2.27 -perfschema.stage_mdl_table : MDEV-12638 - Wrong result; include file modified in 10.2.27 -perfschema.threads_mysql : MDEV-10677 - Wrong result +perfschema.connect_attrs : MDEV-17283 - Wrong result +perfschema.dml_file_instances : MDEV-15179 - Wrong result +perfschema.dml_threads : MDEV-17746 - Wrong errno +perfschema.func_file_io : MDEV-5708 - fails for s390x +perfschema.func_mutex : MDEV-5708 - fails for s390x +perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash +perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash +perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash +perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash +perfschema.misc : Modified in 10.2.30 +perfschema.privilege_table_io : MDEV-13184 - Extra lines +perfschema.rpl_gtid_func : MDEV-16897 - Wrong result +perfschema.socket_instances_func : MDEV-20140 - Wrong result +perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result +perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result +perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders +perfschema.stage_mdl_procedure : MDEV-11545 - Missing row +perfschema.stage_mdl_table : MDEV-12638 - Wrong result +perfschema.start_server_low_digest : MDEV-21221 - Wrong result +perfschema.threads_mysql : MDEV-10677 - Wrong result #----------------------------------------------------------------------- @@ -676,8 +468,7 @@ perfschema_stress.* : MDEV-10996 - Not maintained plugins.feedback_plugin_load : Modified in 10.2.28 plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.processlist : MDEV-16574 - Wrong result -plugins.qc_info : Modified in 10.2.27 -plugins.server_audit : MDEV-9562 - crashes on sol10-sparc +plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.2.30 plugins.thread_pool_server_audit : MDEV-14295 - Wrong result #----------------------------------------------------------------------- @@ -714,10 +505,7 @@ rocksdb_rpl.rpl_binlog_xid_count : MDEV-16644 - Server crash #----------------------------------------------------------------------- -roles.acl_statistics : Configuration added in 10.2.27 -roles.create_and_grant_role : MDEV-11772 - wrong result -roles.definer : Modified in 10.2.27 -roles.show_create_database-10463 : Modified in 10.2.27 +roles.create_and_grant_role : MDEV-11772 - wrong result #----------------------------------------------------------------------- @@ -727,14 +515,15 @@ rpl.create_or_replace_mix : MDEV-20523 - Wrong result rpl.create_or_replace_statement : MDEV-20523 - Wrong result rpl.create_select : MDEV-14121 - Assertion failure rpl.last_insert_id : MDEV-10625 - warnings in error log -rpl.mdev_17588 : Modified in 10.2.27 +rpl.mdev_17588 : Modified in 10.1.42 rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_binlog_errors : MDEV-12742 - Crash rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master rpl.rpl_colSize : MDEV-16112 - Server crash -rpl.rpl_create_or_replace_fail : Added in 10.2.27 +rpl.rpl_corruption : Include file modified in 10.2.30 +rpl.rpl_create_or_replace_fail : Added in 10.1.42 rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac rpl.rpl_ddl : MDEV-10417 - Fails on Mips rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash @@ -743,7 +532,6 @@ rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning -rpl.rpl_failed_drop_tbl_binlog : Added in 10.2.27 rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection @@ -761,11 +549,11 @@ rpl.rpl_insert_id : MDEV-15197 - Wrong result rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips -rpl.rpl_known_bugs_detection : Modified in 10.2.27 +rpl.rpl_known_bugs_detection : Modified in 10.1.42 rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog rpl.rpl_mdev12179 : MDEV-19043 - Warnings/errors rpl.rpl_mdev6020 : MDEV-15272 - Server crash -rpl.rpl_mdev_17614 : Added in 10.2.27 +rpl.rpl_mdev_17614 : Added in 10.1.42 rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait @@ -790,12 +578,12 @@ rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_index_choice : MDEV-15196 - Slave crash rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_row_type_conv_err_msg : Added in 10.2.27 rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum rpl.rpl_semi_sync : MDEV-11220 - Wrong result rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings +rpl.rpl_semi_sync_gtid_reconnect : Added in 10.2.30 rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning @@ -811,7 +599,7 @@ rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on mast rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash rpl.rpl_sync : MDEV-13830 - Assertion failure -rpl.rpl_sync_with_innodb_thd_conc : Added in 10.2.27 +rpl.rpl_sync_with_innodb_thd_conc : Added in 10.1.42 rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output @@ -836,8 +624,9 @@ sphinx.sphinx : Modified in 10.2.28 #----------------------------------------------------------------------- -spider.* : MDEV-9329 - tests are too memory-consuming -spider.basic_sql : MDEV-11186 - Internal check fails +spider.* : MDEV-9329 - tests are too memory-consuming +spider.basic_sql : MDEV-11186 - Internal check fails +spider.pushdown_not_like : Added in 10.2.30 #----------------------------------------------------------------------- @@ -865,45 +654,16 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #----------------------------------------------------------------------- -sys_vars.aria_recover_options_basic : Modified in 10.2.27 sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x -sys_vars.binlog_cache_size_basic : Modified in 10.2.27 -sys_vars.binlog_stmt_cache_size_basic : Modified in 10.2.27 -sys_vars.character_set_client_basic : Modified in 10.2.27 -sys_vars.character_set_connection_basic : Modified in 10.2.27 -sys_vars.character_set_database_basic : Modified in 10.2.27 -sys_vars.character_set_results_basic : Modified in 10.2.27 -sys_vars.character_set_server_basic : Modified in 10.2.27 -sys_vars.character_set_server_func : Modified in 10.2.27 -sys_vars.collation_connection_basic : Modified in 10.2.27 -sys_vars.collation_database_basic : Modified in 10.2.27 -sys_vars.collation_server_basic : Modified in 10.2.27 sys_vars.delayed_insert_limit_func : Modified in 10.2.28 -sys_vars.expire_logs_days_basic : Modified in 10.2.27 -sys_vars.histogram_size_basic : Modified in 10.2.27 sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error sys_vars.innodb_change_buffering_debug_basic : Modified in 10.2.28 -sys_vars.innodb_max_dirty_pages_pct_basic : Modified in 10.2.27 -sys_vars.innodb_max_dirty_pages_pct_lwm_basic : Modified in 10.2.27 -sys_vars.innodb_read_io_threads_basic : Configuration added in 10.2.27 -sys_vars.innodb_write_io_threads_basic : Configuration added in 10.2.27 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash -sys_vars.log_slow_verbosity_basic : Modified in 10.2.27 -sys_vars.max_connect_errors_basic : Modified in 10.2.27 -sys_vars.max_connections_basic : Modified in 10.2.27 -sys_vars.max_heap_table_size_basic : Modified in 10.2.27 -sys_vars.max_seeks_for_key_func : Modified in 10.2.27 -sys_vars.myisam_recover_options_basic : Configuration added in 10.2.27 -sys_vars.myisam_sort_buffer_size_basic : Modified in 10.2.27 -sys_vars.optimizer_switch_basic : Modified in 10.2.27 sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion sys_vars.slow_query_log_func : MDEV-14273 - Wrong result sys_vars.sysvars_innodb : Modified in 10.2.28 -sys_vars.sysvars_server_embedded : Include file modified in 10.2.27 -sys_vars.sysvars_server_notembedded : Include file modified in 10.2.27 sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result -sys_vars.userstat_basic : Modified in 10.2.27 sys_vars.wait_timeout_func : MDEV-12896 - Wrong result #----------------------------------------------------------------------- @@ -912,10 +672,6 @@ tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection tokudb.change_column_bin : MDEV-12640 - Lost connection tokudb.change_column_char : MDEV-12822 - Lost connection tokudb.change_column_varbin : MDEV-17682 - Timeout -tokudb.cluster_2968-0 : Modified in 10.2.27 -tokudb.cluster_2968-1 : Modified in 10.2.27 -tokudb.cluster_2968-2 : Modified in 10.2.27 -tokudb.cluster_2968-3 : Modified in 10.2.27 tokudb.cluster_filter : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan @@ -933,7 +689,6 @@ tokudb.rows-32m-rand-insert : MDEV-12640 - Crash tokudb.rows-32m-seq-insert : MDEV-12640 - Crash tokudb.savepoint-5 : MDEV-15280 - Wrong result tokudb.type_datetime : MDEV-15193 - Wrong result -tokudb.type_varchar : Modified in 10.2.27 #----------------------------------------------------------------------- @@ -954,14 +709,8 @@ tokudb_bugs.xa : MDEV-11804 - Lock wait timeout #----------------------------------------------------------------------- -tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection -tokudb_parts.partition_debug_tokudb : Include file modified in 10.2.28 -tokudb_parts.partition_exch_qa_4_tokudb : Include file modified in 10.2.27 -tokudb_parts.partition_exch_qa_8_tokudb : Include file modified in 10.2.27 -tokudb_parts.partition_mgm_lc0_tokudb : Include file modified in 10.2.27 -tokudb_parts.partition_mgm_lc10_tokudb : Include file modified in 10.2.27 -tokudb_parts.partition_mgm_lc1_tokudb : Include file modified in 10.2.27 -tokudb_parts.partition_mgm_lc2_tokudb : Include file modified in 10.2.27 +tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection +tokudb_parts.partition_debug_tokudb : Include file modified in 10.2.28 #----------------------------------------------------------------------- @@ -984,24 +733,16 @@ unit.ma_test_loghandler : MDEV-10638 - record read not ok #----------------------------------------------------------------------- -vcol.cross_db : Modified in 10.2.27 -vcol.not_supported : MDEV-10639 - Testcase timeout -vcol.update : Modified in 10.2.27 -vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout; modified in 10.2.28 -vcol.vcol_misc : MDEV-16651 - Wrong error message -vcol.vcol_select_innodb : Modified in 10.2.27 -vcol.vcol_select_myisam : Modified in 10.2.27 -vcol.vcol_sql_mode : Added in 10.2.27 -vcol.vcol_sql_mode_upgrade : Added in 10.2.27 -vcol.vcol_trigger_sp_innodb : Include file modified in 10.2.27 -vcol.vcol_trigger_sp_myisam : Include file modified in 10.2.27 +vcol.not_supported : MDEV-10639 - Testcase timeout +vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout; modified in 10.2.28 +vcol.vcol_misc : MDEV-16651 - Wrong error message #----------------------------------------------------------------------- wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node wsrep.mdev_6832 : MDEV-14195 - Check testcase failed -wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.2.27 -wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use +wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.1.42 +wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use; configuration modified in 10.2.30 wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock #----------------------------------------------------------------------- From 6484288cd260cc9ad34d93a35502e66c034f01a7 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 8 Dec 2019 18:14:42 +0100 Subject: [PATCH 02/19] CONC-447 ERROR 2026 (HY000): SSL connection error: Certificate signature check failed Enable CRL checking on Windows. Enable certificate verification testing in client testing. --- include/sslopt-case.h | 2 +- libmariadb | 2 +- mysql-test/t/ssl_7937.test | 13 ++----------- mysql-test/t/ssl_crl_clients.test | 14 +++++++++++--- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/include/sslopt-case.h b/include/sslopt-case.h index fe53088e89b..fe83051c275 100644 --- a/include/sslopt-case.h +++ b/include/sslopt-case.h @@ -30,7 +30,7 @@ */ opt_use_ssl= 1; /* crl has no effect in yaSSL */ -#ifdef HAVE_YASSL +#if defined (HAVE_YASSL) && (!defined (_WIN32) || defined (MYSQL_SERVER)) opt_ssl_crl= NULL; opt_ssl_crlpath= NULL; #endif diff --git a/libmariadb b/libmariadb index c8833751cf4..63df45ce3df 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit c8833751cf48d0085d9d7a4285aafdc967a63a4d +Subproject commit 63df45ce3df3fbc04d8fab9bceb77f9d1cccd4aa diff --git a/mysql-test/t/ssl_7937.test b/mysql-test/t/ssl_7937.test index aa8cd225d7b..59c13107e01 100644 --- a/mysql-test/t/ssl_7937.test +++ b/mysql-test/t/ssl_7937.test @@ -21,15 +21,6 @@ create procedure have_ssl() --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 --echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()" -# this is the test where certificate verification fails. -# but yassl doesn't support certificate verification, so -# we fake the test result for yassl -let yassl=`select variable_value='Unknown' from information_schema.session_status where variable_name='Ssl_session_cache_mode'`; -if (!$yassl) { - --replace_result "self signed certificate in certificate chain" "Failed to verify the server certificate" "Error in the certificate." "Failed to verify the server certificate" - --exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 -} -if ($yassl) { - --echo ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate -} +--replace_regex /SSL connection error.*certificate[^\n]*/SSL connection error: Failed to verify the server certificate/ +--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 drop procedure have_ssl; diff --git a/mysql-test/t/ssl_crl_clients.test b/mysql-test/t/ssl_crl_clients.test index fc954a2fc38..f1dc4909cc6 100644 --- a/mysql-test/t/ssl_crl_clients.test +++ b/mysql-test/t/ssl_crl_clients.test @@ -1,6 +1,12 @@ # This test should work in embedded server after we fix mysqltest -- source include/not_embedded.inc --- source include/have_openssl.inc + +if (`SELECT COUNT(*) = 0 FROM information_schema.GLOBAL_VARIABLES + WHERE (VARIABLE_NAME ='version_compile_os' AND VARIABLE_VALUE LIKE 'Win%' OR + VARIABLE_NAME='have_openssl' AND VARIABLE_VALUE='YES')`) +{ + skip Need openssl or Windows; +} --echo # Test clients with and without CRL lists @@ -14,10 +20,12 @@ copy_file $MYSQL_TEST_DIR/std_data/server-cert.crl $MYSQL_TMP_DIR/ed1f42db.r0; --echo ############ Test mysql ############## --echo # Test mysql connecting to a server with a certificate revoked by -crl +--replace_result "Server certificate validation failed. The certificate is revoked. Error 0x80092010(CRYPT_E_REVOKED)" "certificate revoked" --error 1 --exec $MYSQL $ssl_crl test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1 --echo # Test mysql connecting to a server with a certificate revoked by -crlpath +--replace_result "Server certificate validation failed. The certificate is revoked. Error 0x80092010(CRYPT_E_REVOKED)" "certificate revoked" --error 1 --exec $MYSQL $ssl_crlpath test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1 @@ -26,11 +34,11 @@ copy_file $MYSQL_TEST_DIR/std_data/server-cert.crl $MYSQL_TMP_DIR/ed1f42db.r0; let $admin_suffix = --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping; --echo # Test mysqladmin connecting to a server with a certificate revoked by -crl ---replace_regex /.*mysqladmin.*:/mysqladmin:/ +--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/ --error 1 --exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1 --echo # Test mysqladmin connecting to a server with a certificate revoked by -crlpath ---replace_regex /.*mysqladmin.*:/mysqladmin:/ +--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/ --error 1 --exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1 From 6aa0fa3897bc9ce415efef0c0c039503881321ad Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 6 Dec 2019 21:02:46 +0100 Subject: [PATCH 03/19] CONC-417 Windows clients using Schannel often encounter error SEC_E_INVALID_TOKEN reenable ssl_8k_key on Windows, which was affected by this bug --- mysql-test/t/ssl_8k_key.test | 3 --- 1 file changed, 3 deletions(-) diff --git a/mysql-test/t/ssl_8k_key.test b/mysql-test/t/ssl_8k_key.test index edfead46658..88f6b963cc4 100644 --- a/mysql-test/t/ssl_8k_key.test +++ b/mysql-test/t/ssl_8k_key.test @@ -1,6 +1,3 @@ -# schannel does not support keys longer than 4k --- source include/not_windows.inc - -- source include/have_ssl_communication.inc # # Bug#29784 YaSSL assertion failure when reading 8k key. From fd1979bc9a535735ed3f3a7dbb67d09568dd8417 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Mon, 9 Dec 2019 01:17:16 +0400 Subject: [PATCH 04/19] MDEV-18463 Don't allow multiple table CONSTRAINTs with the same name. Add necessary checks. --- mysql-test/r/foreign_key.result | 26 ++++++++++++++++ mysql-test/t/foreign_key.test | 24 +++++++++++++++ sql/sql_table.cc | 54 +++++++++++++++++++++++++++++++-- 3 files changed, 102 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/foreign_key.result b/mysql-test/r/foreign_key.result index a82151ddec0..c412be6bbdb 100644 --- a/mysql-test/r/foreign_key.result +++ b/mysql-test/r/foreign_key.result @@ -82,3 +82,29 @@ add foreign key (a) references t3 (a) on update set default on update set default); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'update set default)' at line 3 drop table t_34455; +# +# MDEV-18460 Don't allow multiple table CONSTRAINTs with the same name. +# +CREATE TABLE tpk (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100) NOT NULL) ENGINE=Innodb; +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1), CONSTRAINT sid CHECK (c2>15)); +ERROR HY000: Duplicate CHECK constraint name 'sid' +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1)); +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +ERROR HY000: Duplicate CHECK constraint name 'sid' +DROP TABLE tfk; +CREATE TABLE tfk (c1 INT, c2 INT, +CONSTRAINT sid FOREIGN KEY (c1) REFERENCES tpk (id)) ENGINE=Innodb; +show create table tfk; +Table Create Table +tfk CREATE TABLE `tfk` ( + `c1` int(11) DEFAULT NULL, + `c2` int(11) DEFAULT NULL, + KEY `sid` (`c1`), + CONSTRAINT `sid` FOREIGN KEY (`c1`) REFERENCES `tpk` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +ERROR HY000: Duplicate CHECK constraint name 'sid' +ALTER TABLE tfk ADD CONSTRAINT sid UNIQUE(c2); +ERROR 42000: Duplicate key name 'sid' +DROP TABLE tfk; +DROP TABLE tpk; diff --git a/mysql-test/t/foreign_key.test b/mysql-test/t/foreign_key.test index 17c93332cb3..3a09a544532 100644 --- a/mysql-test/t/foreign_key.test +++ b/mysql-test/t/foreign_key.test @@ -117,4 +117,28 @@ alter table t_34455 drop table t_34455; +--echo # +--echo # MDEV-18460 Don't allow multiple table CONSTRAINTs with the same name. +--echo # + +CREATE TABLE tpk (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100) NOT NULL) ENGINE=Innodb; +--error ER_DUP_CONSTRAINT_NAME +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1), CONSTRAINT sid CHECK (c2>15)); + +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1)); +--error ER_DUP_CONSTRAINT_NAME +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +DROP TABLE tfk; + +CREATE TABLE tfk (c1 INT, c2 INT, + CONSTRAINT sid FOREIGN KEY (c1) REFERENCES tpk (id)) ENGINE=Innodb; +show create table tfk; +--error ER_DUP_CONSTRAINT_NAME +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +--error ER_DUP_KEYNAME +ALTER TABLE tfk ADD CONSTRAINT sid UNIQUE(c2); +DROP TABLE tfk; + +DROP TABLE tpk; + diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 4ad68d9d03b..878c09286b5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4196,10 +4196,10 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, continue; { - /* Check that there's no repeating constraint names. */ + /* Check that there's no repeating table CHECK constraint names. */ List_iterator_fast dup_it(alter_info->check_constraint_list); - Virtual_column_info *dup_check; + const Virtual_column_info *dup_check; while ((dup_check= dup_it++) && dup_check != check) { if (check->name.length == dup_check->name.length && @@ -4212,6 +4212,27 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, } } + /* Check that there's no repeating key constraint names. */ + List_iterator_fast key_it(alter_info->key_list); + while (const Key *key= key_it++) + { + /* + Not all keys considered to be the CONSTRAINT + Noly Primary Key UNIQUE and Foreign keys. + */ + if (key->type != Key::PRIMARY && key->type != Key::UNIQUE && + key->type != Key::FOREIGN_KEY) + continue; + + if (check->name.length == key->name.length && + my_strcasecmp(system_charset_info, + check->name.str, key->name.str) == 0) + { + my_error(ER_DUP_CONSTRAINT_NAME, MYF(0), "CHECK", check->name.str); + DBUG_RETURN(TRUE); + } + } + if (check_string_char_length(&check->name, 0, NAME_CHAR_LEN, system_charset_info, 1)) { @@ -8176,6 +8197,35 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, } } } + + if (!alter_info->check_constraint_list.is_empty()) + { + /* Check the table FOREIGN KEYs for name duplications. */ + List fk_child_key_list; + FOREIGN_KEY_INFO *f_key; + table->file->get_foreign_key_list(thd, &fk_child_key_list); + List_iterator fk_key_it(fk_child_key_list); + while ((f_key= fk_key_it++)) + { + List_iterator_fast + c_it(alter_info->check_constraint_list); + Virtual_column_info *check; + while ((check= c_it++)) + { + if (!check->name.length || check->automatic_name) + continue; + + if (check->name.length == f_key->foreign_id->length && + my_strcasecmp(system_charset_info, f_key->foreign_id->str, + check->name.str) == 0) + { + my_error(ER_DUP_CONSTRAINT_NAME, MYF(0), "CHECK", check->name.str); + goto err; + } + } + } + } + /* Add new constraints */ new_constraint_list.append(&alter_info->check_constraint_list); From 59e14b96847e458909ca7fcf95b144fd6ccdb708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 9 Dec 2019 08:09:56 +0200 Subject: [PATCH 05/19] MDEV-21189: Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION sql_log_bin = 0' cases the galera node to hang Found two bugs (1) have_committing_connections was missing mutex unlock on one exit case. As this function is called on a loop it caused mutex lock when we already owned the mutex. This could cause hang. (2) wsrep_RSU_begin did set up error code when partition to be dropped could not be MDL-locked because of concurrent operations but wrong error code was propagated to upper layer causing error to be ignored. This could have also caused the hang. --- mysql-test/suite/galera/galera_4nodes.cnf | 4 + .../suite/galera/r/galera_partition.result | 424 ++++++++++++++++ .../suite/galera/t/galera_partition.cnf | 18 + .../suite/galera/t/galera_partition.test | 453 ++++++++++++++++++ sql/wsrep_mysqld.cc | 3 +- 5 files changed, 901 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/galera/r/galera_partition.result create mode 100644 mysql-test/suite/galera/t/galera_partition.cnf create mode 100644 mysql-test/suite/galera/t/galera_partition.test diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf index 1c195afd54b..426a6ae6d92 100644 --- a/mysql-test/suite/galera/galera_4nodes.cnf +++ b/mysql-test/suite/galera/galera_4nodes.cnf @@ -16,6 +16,7 @@ wsrep-sync-wait=15 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep-cluster-address=gcomm:// wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port @@ -25,6 +26,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port @@ -35,6 +37,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port @@ -45,6 +48,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port' #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port diff --git a/mysql-test/suite/galera/r/galera_partition.result b/mysql-test/suite/galera/r/galera_partition.result new file mode 100644 index 00000000000..d845de12c45 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_partition.result @@ -0,0 +1,424 @@ +connection node_1; +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1; +CREATE TABLE t1( +id bigint unsigned NOT NULL AUTO_INCREMENT, +dt datetime NOT NULL, +PRIMARY KEY (id,dt), +KEY dt_idx (dt) +) ENGINE=InnoDB +PARTITION BY RANGE( TO_DAYS(dt) ) ( +PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ), +PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ), +PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ), +PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ), +PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ), +PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ), +PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ), +PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ), +PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ), +PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ), +PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ), +PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ), +PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ), +PARTITION rx2011 VALUES LESS THAN MAXVALUE); +CREATE PROCEDURE p1 (repeat_count int) +BEGIN +DECLARE current_num int; +SET current_num = 0; +WHILE current_num < repeat_count do +INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-02-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-03-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-04-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-06-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2012-02-21 00:00:00'); +COMMIT; +SET current_num = current_num + 1; +END WHILE; +END| +insert into t1 (id, dt) values (1, '2010-01-02 00:00:00'); +insert into t1 (id, dt) values (2, '2010-01-03 00:00:00'); +insert into t1 (id, dt) values (3, '2010-01-04 00:00:00'); +insert into t1 (id, dt) values (4, '2010-01-05 00:00:00'); +insert into t1 (id, dt) values (5, '2010-01-06 00:00:00'); +insert into t1 (id, dt) values (6, '2010-01-07 00:00:00'); +insert into t1 (id, dt) values (7, '2010-01-08 00:00:00'); +insert into t1 (id, dt) values (8, '2010-01-09 00:00:00'); +insert into t1 (id, dt) values (9, '2010-01-10 00:00:00'); +insert into t1 (id, dt) values (10, '2010-01-11 00:00:00'); +insert into t1 (id, dt) values (11, '2010-01-12 00:00:00'); +insert into t1 (id, dt) values (12, '2010-01-13 00:00:00'); +insert into t1 (id, dt) values (13, '2010-01-14 00:00:00'); +insert into t1 (id, dt) values (14, '2010-01-15 00:00:00'); +insert into t1 (id, dt) values (15, '2010-01-16 00:00:00'); +insert into t1 (id, dt) values (16, '2010-01-17 00:00:00'); +insert into t1 (id, dt) values (17, '2010-01-18 00:00:00'); +insert into t1 (id, dt) values (18, '2010-01-19 00:00:00'); +insert into t1 (id, dt) values (19, '2010-01-20 00:00:00'); +insert into t1 (id, dt) values (20, '2010-01-21 00:00:00'); +insert into t1 (id, dt) values (21, '2010-01-22 00:00:00'); +insert into t1 (id, dt) values (22, '2010-01-23 00:00:00'); +insert into t1 (id, dt) values (23, '2010-01-24 00:00:00'); +insert into t1 (id, dt) values (24, '2010-01-25 00:00:00'); +insert into t1 (id, dt) values (25, '2010-01-26 00:00:00'); +insert into t1 (id, dt) values (26, '2010-01-27 00:00:00'); +insert into t1 (id, dt) values (27, '2010-01-28 00:00:00'); +insert into t1 (id, dt) values (28, '2010-01-29 00:00:00'); +insert into t1 (id, dt) values (29, '2010-01-30 00:00:00'); +insert into t1 (id, dt) values (30, '2010-01-31 00:00:00'); +insert into t1 (id, dt) values (31, '2010-02-01 00:00:00'); +insert into t1 (id, dt) values (32, '2010-02-02 00:00:00'); +insert into t1 (id, dt) values (33, '2010-02-03 00:00:00'); +insert into t1 (id, dt) values (34, '2010-02-04 00:00:00'); +insert into t1 (id, dt) values (35, '2010-02-05 00:00:00'); +insert into t1 (id, dt) values (36, '2010-02-06 00:00:00'); +insert into t1 (id, dt) values (37, '2010-02-07 00:00:00'); +insert into t1 (id, dt) values (38, '2010-02-08 00:00:00'); +insert into t1 (id, dt) values (39, '2010-02-09 00:00:00'); +insert into t1 (id, dt) values (40, '2010-02-10 00:00:00'); +insert into t1 (id, dt) values (41, '2010-02-11 00:00:00'); +insert into t1 (id, dt) values (42, '2010-02-12 00:00:00'); +insert into t1 (id, dt) values (43, '2010-02-13 00:00:00'); +insert into t1 (id, dt) values (44, '2010-02-14 00:00:00'); +insert into t1 (id, dt) values (45, '2010-02-15 00:00:00'); +insert into t1 (id, dt) values (46, '2010-02-16 00:00:00'); +insert into t1 (id, dt) values (47, '2010-02-17 00:00:00'); +insert into t1 (id, dt) values (48, '2010-02-18 00:00:00'); +insert into t1 (id, dt) values (49, '2010-02-19 00:00:00'); +insert into t1 (id, dt) values (50, '2010-02-20 00:00:00'); +insert into t1 (id, dt) values (51, '2010-02-21 00:00:00'); +insert into t1 (id, dt) values (52, '2010-02-22 00:00:00'); +insert into t1 (id, dt) values (53, '2010-02-23 00:00:00'); +insert into t1 (id, dt) values (54, '2010-02-24 00:00:00'); +insert into t1 (id, dt) values (55, '2010-02-25 00:00:00'); +insert into t1 (id, dt) values (56, '2010-02-26 00:00:00'); +insert into t1 (id, dt) values (57, '2010-02-27 00:00:00'); +insert into t1 (id, dt) values (58, '2010-02-28 00:00:00'); +insert into t1 (id, dt) values (59, '2010-03-01 00:00:00'); +insert into t1 (id, dt) values (60, '2010-03-02 00:00:00'); +insert into t1 (id, dt) values (61, '2010-03-03 00:00:00'); +insert into t1 (id, dt) values (62, '2010-03-04 00:00:00'); +insert into t1 (id, dt) values (63, '2010-03-05 00:00:00'); +insert into t1 (id, dt) values (64, '2010-03-06 00:00:00'); +insert into t1 (id, dt) values (65, '2010-03-07 00:00:00'); +insert into t1 (id, dt) values (66, '2010-03-08 00:00:00'); +insert into t1 (id, dt) values (67, '2010-03-09 00:00:00'); +insert into t1 (id, dt) values (68, '2010-03-10 00:00:00'); +insert into t1 (id, dt) values (69, '2010-03-11 00:00:00'); +insert into t1 (id, dt) values (70, '2010-03-12 00:00:00'); +insert into t1 (id, dt) values (71, '2010-03-13 00:00:00'); +insert into t1 (id, dt) values (72, '2010-03-14 00:00:00'); +insert into t1 (id, dt) values (73, '2010-03-15 00:00:00'); +insert into t1 (id, dt) values (74, '2010-03-16 00:00:00'); +insert into t1 (id, dt) values (75, '2010-03-17 00:00:00'); +insert into t1 (id, dt) values (76, '2010-03-18 00:00:00'); +insert into t1 (id, dt) values (77, '2010-03-19 00:00:00'); +insert into t1 (id, dt) values (78, '2010-03-20 00:00:00'); +insert into t1 (id, dt) values (79, '2010-03-21 00:00:00'); +insert into t1 (id, dt) values (80, '2010-03-22 00:00:00'); +insert into t1 (id, dt) values (81, '2010-03-23 00:00:00'); +insert into t1 (id, dt) values (82, '2010-03-24 00:00:00'); +insert into t1 (id, dt) values (83, '2010-03-25 00:00:00'); +insert into t1 (id, dt) values (84, '2010-03-26 00:00:00'); +insert into t1 (id, dt) values (85, '2010-03-27 00:00:00'); +insert into t1 (id, dt) values (86, '2010-03-28 00:00:00'); +insert into t1 (id, dt) values (87, '2010-03-29 00:00:00'); +insert into t1 (id, dt) values (88, '2010-03-30 00:00:00'); +insert into t1 (id, dt) values (89, '2010-03-31 00:00:00'); +insert into t1 (id, dt) values (90, '2010-04-01 00:00:00'); +insert into t1 (id, dt) values (91, '2010-04-02 00:00:00'); +insert into t1 (id, dt) values (92, '2010-04-03 00:00:00'); +insert into t1 (id, dt) values (93, '2010-04-04 00:00:00'); +insert into t1 (id, dt) values (94, '2010-04-05 00:00:00'); +insert into t1 (id, dt) values (95, '2010-04-06 00:00:00'); +insert into t1 (id, dt) values (96, '2010-04-07 00:00:00'); +insert into t1 (id, dt) values (97, '2010-04-08 00:00:00'); +insert into t1 (id, dt) values (98, '2010-04-09 00:00:00'); +insert into t1 (id, dt) values (99, '2010-04-10 00:00:00'); +insert into t1 (id, dt) values (100, '2010-04-11 00:00:00'); +insert into t1 (id, dt) values (101, '2010-04-12 00:00:00'); +insert into t1 (id, dt) values (102, '2010-04-13 00:00:00'); +insert into t1 (id, dt) values (103, '2010-04-14 00:00:00'); +insert into t1 (id, dt) values (104, '2010-04-15 00:00:00'); +insert into t1 (id, dt) values (105, '2010-04-16 00:00:00'); +insert into t1 (id, dt) values (106, '2010-04-17 00:00:00'); +insert into t1 (id, dt) values (107, '2010-04-18 00:00:00'); +insert into t1 (id, dt) values (108, '2010-04-19 00:00:00'); +insert into t1 (id, dt) values (109, '2010-04-20 00:00:00'); +insert into t1 (id, dt) values (110, '2010-04-21 00:00:00'); +insert into t1 (id, dt) values (111, '2010-04-22 00:00:00'); +insert into t1 (id, dt) values (112, '2010-04-23 00:00:00'); +insert into t1 (id, dt) values (113, '2010-04-24 00:00:00'); +insert into t1 (id, dt) values (114, '2010-04-25 00:00:00'); +insert into t1 (id, dt) values (115, '2010-04-26 00:00:00'); +insert into t1 (id, dt) values (116, '2010-04-27 00:00:00'); +insert into t1 (id, dt) values (117, '2010-04-28 00:00:00'); +insert into t1 (id, dt) values (118, '2010-04-29 00:00:00'); +insert into t1 (id, dt) values (119, '2010-04-30 00:00:00'); +insert into t1 (id, dt) values (120, '2010-05-01 00:00:00'); +insert into t1 (id, dt) values (121, '2010-05-02 00:00:00'); +insert into t1 (id, dt) values (122, '2010-05-03 00:00:00'); +insert into t1 (id, dt) values (123, '2010-05-04 00:00:00'); +insert into t1 (id, dt) values (124, '2010-05-05 00:00:00'); +insert into t1 (id, dt) values (125, '2010-05-06 00:00:00'); +insert into t1 (id, dt) values (126, '2010-05-07 00:00:00'); +insert into t1 (id, dt) values (127, '2010-05-08 00:00:00'); +insert into t1 (id, dt) values (128, '2010-05-09 00:00:00'); +insert into t1 (id, dt) values (129, '2010-05-10 00:00:00'); +insert into t1 (id, dt) values (130, '2010-05-11 00:00:00'); +insert into t1 (id, dt) values (131, '2010-05-12 00:00:00'); +insert into t1 (id, dt) values (132, '2010-05-13 00:00:00'); +insert into t1 (id, dt) values (133, '2010-05-14 00:00:00'); +insert into t1 (id, dt) values (134, '2010-05-15 00:00:00'); +insert into t1 (id, dt) values (135, '2010-05-16 00:00:00'); +insert into t1 (id, dt) values (136, '2010-05-17 00:00:00'); +insert into t1 (id, dt) values (137, '2010-05-18 00:00:00'); +insert into t1 (id, dt) values (138, '2010-05-19 00:00:00'); +insert into t1 (id, dt) values (139, '2010-05-20 00:00:00'); +insert into t1 (id, dt) values (140, '2010-05-21 00:00:00'); +insert into t1 (id, dt) values (141, '2010-05-22 00:00:00'); +insert into t1 (id, dt) values (142, '2010-05-23 00:00:00'); +insert into t1 (id, dt) values (143, '2010-05-24 00:00:00'); +insert into t1 (id, dt) values (144, '2010-05-25 00:00:00'); +insert into t1 (id, dt) values (145, '2010-05-26 00:00:00'); +insert into t1 (id, dt) values (146, '2010-05-27 00:00:00'); +insert into t1 (id, dt) values (147, '2010-05-28 00:00:00'); +insert into t1 (id, dt) values (148, '2010-05-29 00:00:00'); +insert into t1 (id, dt) values (149, '2010-05-30 00:00:00'); +insert into t1 (id, dt) values (150, '2010-05-31 00:00:00'); +insert into t1 (id, dt) values (151, '2010-06-01 00:00:00'); +insert into t1 (id, dt) values (152, '2010-06-02 00:00:00'); +insert into t1 (id, dt) values (153, '2010-06-03 00:00:00'); +insert into t1 (id, dt) values (154, '2010-06-04 00:00:00'); +insert into t1 (id, dt) values (155, '2010-06-05 00:00:00'); +insert into t1 (id, dt) values (156, '2010-06-06 00:00:00'); +insert into t1 (id, dt) values (157, '2010-06-07 00:00:00'); +insert into t1 (id, dt) values (158, '2010-06-08 00:00:00'); +insert into t1 (id, dt) values (159, '2010-06-09 00:00:00'); +insert into t1 (id, dt) values (160, '2010-06-10 00:00:00'); +insert into t1 (id, dt) values (161, '2010-06-11 00:00:00'); +insert into t1 (id, dt) values (162, '2010-06-12 00:00:00'); +insert into t1 (id, dt) values (163, '2010-06-13 00:00:00'); +insert into t1 (id, dt) values (164, '2010-06-14 00:00:00'); +insert into t1 (id, dt) values (165, '2010-06-15 00:00:00'); +insert into t1 (id, dt) values (166, '2010-06-16 00:00:00'); +insert into t1 (id, dt) values (167, '2010-06-17 00:00:00'); +insert into t1 (id, dt) values (168, '2010-06-18 00:00:00'); +insert into t1 (id, dt) values (169, '2010-06-19 00:00:00'); +insert into t1 (id, dt) values (170, '2010-06-20 00:00:00'); +insert into t1 (id, dt) values (171, '2010-06-21 00:00:00'); +insert into t1 (id, dt) values (172, '2010-06-22 00:00:00'); +insert into t1 (id, dt) values (173, '2010-06-23 00:00:00'); +insert into t1 (id, dt) values (174, '2010-06-24 00:00:00'); +insert into t1 (id, dt) values (175, '2010-06-25 00:00:00'); +insert into t1 (id, dt) values (176, '2010-06-26 00:00:00'); +insert into t1 (id, dt) values (177, '2010-06-27 00:00:00'); +insert into t1 (id, dt) values (178, '2010-06-28 00:00:00'); +insert into t1 (id, dt) values (179, '2010-06-29 00:00:00'); +insert into t1 (id, dt) values (180, '2010-06-30 00:00:00'); +insert into t1 (id, dt) values (181, '2010-07-01 00:00:00'); +insert into t1 (id, dt) values (182, '2010-07-02 00:00:00'); +insert into t1 (id, dt) values (183, '2010-07-03 00:00:00'); +insert into t1 (id, dt) values (184, '2010-07-04 00:00:00'); +insert into t1 (id, dt) values (185, '2010-07-05 00:00:00'); +insert into t1 (id, dt) values (186, '2010-07-06 00:00:00'); +insert into t1 (id, dt) values (187, '2010-07-07 00:00:00'); +insert into t1 (id, dt) values (188, '2010-07-08 00:00:00'); +insert into t1 (id, dt) values (189, '2010-07-09 00:00:00'); +insert into t1 (id, dt) values (190, '2010-07-10 00:00:00'); +insert into t1 (id, dt) values (191, '2010-07-11 00:00:00'); +insert into t1 (id, dt) values (192, '2010-07-12 00:00:00'); +insert into t1 (id, dt) values (193, '2010-07-13 00:00:00'); +insert into t1 (id, dt) values (194, '2010-07-14 00:00:00'); +insert into t1 (id, dt) values (195, '2010-07-15 00:00:00'); +insert into t1 (id, dt) values (196, '2010-07-16 00:00:00'); +insert into t1 (id, dt) values (197, '2010-07-17 00:00:00'); +insert into t1 (id, dt) values (198, '2010-07-18 00:00:00'); +insert into t1 (id, dt) values (199, '2010-07-19 00:00:00'); +insert into t1 (id, dt) values (200, '2010-07-20 00:00:00'); +insert into t1 (id, dt) values (201, '2010-07-21 00:00:00'); +insert into t1 (id, dt) values (202, '2010-07-22 00:00:00'); +insert into t1 (id, dt) values (203, '2010-07-23 00:00:00'); +insert into t1 (id, dt) values (204, '2010-07-24 00:00:00'); +insert into t1 (id, dt) values (205, '2010-07-25 00:00:00'); +insert into t1 (id, dt) values (206, '2010-07-26 00:00:00'); +insert into t1 (id, dt) values (207, '2010-07-27 00:00:00'); +insert into t1 (id, dt) values (208, '2010-07-28 00:00:00'); +insert into t1 (id, dt) values (209, '2010-07-29 00:00:00'); +insert into t1 (id, dt) values (210, '2010-07-30 00:00:00'); +insert into t1 (id, dt) values (211, '2010-07-31 00:00:00'); +insert into t1 (id, dt) values (212, '2010-08-01 00:00:00'); +insert into t1 (id, dt) values (213, '2010-08-02 00:00:00'); +insert into t1 (id, dt) values (214, '2010-08-03 00:00:00'); +insert into t1 (id, dt) values (215, '2010-08-04 00:00:00'); +insert into t1 (id, dt) values (216, '2010-08-05 00:00:00'); +insert into t1 (id, dt) values (217, '2010-08-06 00:00:00'); +insert into t1 (id, dt) values (218, '2010-08-07 00:00:00'); +insert into t1 (id, dt) values (219, '2010-08-08 00:00:00'); +insert into t1 (id, dt) values (220, '2010-08-09 00:00:00'); +insert into t1 (id, dt) values (221, '2010-08-10 00:00:00'); +insert into t1 (id, dt) values (222, '2010-08-11 00:00:00'); +insert into t1 (id, dt) values (223, '2010-08-12 00:00:00'); +insert into t1 (id, dt) values (224, '2010-08-13 00:00:00'); +insert into t1 (id, dt) values (225, '2010-08-14 00:00:00'); +insert into t1 (id, dt) values (226, '2010-08-15 00:00:00'); +insert into t1 (id, dt) values (227, '2010-08-16 00:00:00'); +insert into t1 (id, dt) values (228, '2010-08-17 00:00:00'); +insert into t1 (id, dt) values (229, '2010-08-18 00:00:00'); +insert into t1 (id, dt) values (230, '2010-08-19 00:00:00'); +insert into t1 (id, dt) values (231, '2010-08-20 00:00:00'); +insert into t1 (id, dt) values (232, '2010-08-21 00:00:00'); +insert into t1 (id, dt) values (233, '2010-08-22 00:00:00'); +insert into t1 (id, dt) values (234, '2010-08-23 00:00:00'); +insert into t1 (id, dt) values (235, '2010-08-24 00:00:00'); +insert into t1 (id, dt) values (236, '2010-08-25 00:00:00'); +insert into t1 (id, dt) values (237, '2010-08-26 00:00:00'); +insert into t1 (id, dt) values (238, '2010-08-27 00:00:00'); +insert into t1 (id, dt) values (239, '2010-08-28 00:00:00'); +insert into t1 (id, dt) values (240, '2010-08-29 00:00:00'); +insert into t1 (id, dt) values (241, '2010-08-30 00:00:00'); +insert into t1 (id, dt) values (242, '2010-08-31 00:00:00'); +insert into t1 (id, dt) values (243, '2010-09-01 00:00:00'); +insert into t1 (id, dt) values (244, '2010-09-02 00:00:00'); +insert into t1 (id, dt) values (245, '2010-09-03 00:00:00'); +insert into t1 (id, dt) values (246, '2010-09-04 00:00:00'); +insert into t1 (id, dt) values (247, '2010-09-05 00:00:00'); +insert into t1 (id, dt) values (248, '2010-09-06 00:00:00'); +insert into t1 (id, dt) values (249, '2010-09-07 00:00:00'); +insert into t1 (id, dt) values (250, '2010-09-08 00:00:00'); +insert into t1 (id, dt) values (251, '2010-09-09 00:00:00'); +insert into t1 (id, dt) values (252, '2010-09-10 00:00:00'); +insert into t1 (id, dt) values (253, '2010-09-11 00:00:00'); +insert into t1 (id, dt) values (254, '2010-09-12 00:00:00'); +insert into t1 (id, dt) values (255, '2010-09-13 00:00:00'); +insert into t1 (id, dt) values (256, '2010-09-14 00:00:00'); +insert into t1 (id, dt) values (257, '2010-09-15 00:00:00'); +insert into t1 (id, dt) values (258, '2010-09-16 00:00:00'); +insert into t1 (id, dt) values (259, '2010-09-17 00:00:00'); +insert into t1 (id, dt) values (260, '2010-09-18 00:00:00'); +insert into t1 (id, dt) values (261, '2010-09-19 00:00:00'); +insert into t1 (id, dt) values (262, '2010-09-20 00:00:00'); +insert into t1 (id, dt) values (263, '2010-09-21 00:00:00'); +insert into t1 (id, dt) values (264, '2010-09-22 00:00:00'); +insert into t1 (id, dt) values (265, '2010-09-23 00:00:00'); +insert into t1 (id, dt) values (266, '2010-09-24 00:00:00'); +insert into t1 (id, dt) values (267, '2010-09-25 00:00:00'); +insert into t1 (id, dt) values (268, '2010-09-26 00:00:00'); +insert into t1 (id, dt) values (269, '2010-09-27 00:00:00'); +insert into t1 (id, dt) values (270, '2010-09-28 00:00:00'); +insert into t1 (id, dt) values (271, '2010-09-29 00:00:00'); +insert into t1 (id, dt) values (272, '2010-09-30 00:00:00'); +insert into t1 (id, dt) values (273, '2010-10-01 00:00:00'); +insert into t1 (id, dt) values (274, '2010-10-02 00:00:00'); +insert into t1 (id, dt) values (275, '2010-10-03 00:00:00'); +insert into t1 (id, dt) values (276, '2010-10-04 00:00:00'); +insert into t1 (id, dt) values (277, '2010-10-05 00:00:00'); +insert into t1 (id, dt) values (278, '2010-10-06 00:00:00'); +insert into t1 (id, dt) values (279, '2010-10-07 00:00:00'); +insert into t1 (id, dt) values (280, '2010-10-08 00:00:00'); +insert into t1 (id, dt) values (281, '2010-10-09 00:00:00'); +insert into t1 (id, dt) values (282, '2010-10-10 00:00:00'); +insert into t1 (id, dt) values (283, '2010-10-11 00:00:00'); +insert into t1 (id, dt) values (284, '2010-10-12 00:00:00'); +insert into t1 (id, dt) values (285, '2010-10-13 00:00:00'); +insert into t1 (id, dt) values (286, '2010-10-14 00:00:00'); +insert into t1 (id, dt) values (287, '2010-10-15 00:00:00'); +insert into t1 (id, dt) values (288, '2010-10-16 00:00:00'); +insert into t1 (id, dt) values (289, '2010-10-17 00:00:00'); +insert into t1 (id, dt) values (290, '2010-10-18 00:00:00'); +insert into t1 (id, dt) values (291, '2010-10-19 00:00:00'); +insert into t1 (id, dt) values (292, '2010-10-20 00:00:00'); +insert into t1 (id, dt) values (293, '2010-10-21 00:00:00'); +insert into t1 (id, dt) values (294, '2010-10-22 00:00:00'); +insert into t1 (id, dt) values (295, '2010-10-23 00:00:00'); +insert into t1 (id, dt) values (296, '2010-10-24 00:00:00'); +insert into t1 (id, dt) values (297, '2010-10-25 00:00:00'); +insert into t1 (id, dt) values (298, '2010-10-26 00:00:00'); +insert into t1 (id, dt) values (299, '2010-10-27 00:00:00'); +insert into t1 (id, dt) values (300, '2010-10-28 00:00:00'); +insert into t1 (id, dt) values (301, '2010-10-29 00:00:00'); +insert into t1 (id, dt) values (302, '2010-10-30 00:00:00'); +insert into t1 (id, dt) values (303, '2010-10-31 00:00:00'); +insert into t1 (id, dt) values (304, '2010-11-01 00:00:00'); +insert into t1 (id, dt) values (305, '2010-11-02 00:00:00'); +insert into t1 (id, dt) values (306, '2010-11-03 00:00:00'); +insert into t1 (id, dt) values (307, '2010-11-04 00:00:00'); +insert into t1 (id, dt) values (308, '2010-11-05 00:00:00'); +insert into t1 (id, dt) values (309, '2010-11-06 00:00:00'); +insert into t1 (id, dt) values (310, '2010-11-07 00:00:00'); +insert into t1 (id, dt) values (311, '2010-11-08 00:00:00'); +insert into t1 (id, dt) values (312, '2010-11-09 00:00:00'); +insert into t1 (id, dt) values (313, '2010-11-10 00:00:00'); +insert into t1 (id, dt) values (314, '2010-11-11 00:00:00'); +insert into t1 (id, dt) values (315, '2010-11-12 00:00:00'); +insert into t1 (id, dt) values (316, '2010-11-13 00:00:00'); +insert into t1 (id, dt) values (317, '2010-11-14 00:00:00'); +insert into t1 (id, dt) values (318, '2010-11-15 00:00:00'); +insert into t1 (id, dt) values (319, '2010-11-16 00:00:00'); +insert into t1 (id, dt) values (320, '2010-11-17 00:00:00'); +insert into t1 (id, dt) values (321, '2010-11-18 00:00:00'); +insert into t1 (id, dt) values (322, '2010-11-19 00:00:00'); +insert into t1 (id, dt) values (323, '2010-11-20 00:00:00'); +insert into t1 (id, dt) values (324, '2010-11-21 00:00:00'); +insert into t1 (id, dt) values (325, '2010-11-22 00:00:00'); +insert into t1 (id, dt) values (326, '2010-11-23 00:00:00'); +insert into t1 (id, dt) values (327, '2010-11-24 00:00:00'); +insert into t1 (id, dt) values (328, '2010-11-25 00:00:00'); +insert into t1 (id, dt) values (329, '2010-11-26 00:00:00'); +insert into t1 (id, dt) values (330, '2010-11-27 00:00:00'); +insert into t1 (id, dt) values (331, '2010-11-28 00:00:00'); +insert into t1 (id, dt) values (332, '2010-11-29 00:00:00'); +insert into t1 (id, dt) values (333, '2010-11-30 00:00:00'); +insert into t1 (id, dt) values (334, '2010-12-01 00:00:00'); +insert into t1 (id, dt) values (335, '2010-12-02 00:00:00'); +insert into t1 (id, dt) values (336, '2010-12-03 00:00:00'); +insert into t1 (id, dt) values (337, '2010-12-04 00:00:00'); +insert into t1 (id, dt) values (338, '2010-12-05 00:00:00'); +insert into t1 (id, dt) values (339, '2010-12-06 00:00:00'); +insert into t1 (id, dt) values (340, '2010-12-07 00:00:00'); +insert into t1 (id, dt) values (341, '2010-12-08 00:00:00'); +insert into t1 (id, dt) values (342, '2010-12-09 00:00:00'); +insert into t1 (id, dt) values (343, '2010-12-10 00:00:00'); +insert into t1 (id, dt) values (344, '2010-12-11 00:00:00'); +insert into t1 (id, dt) values (345, '2010-12-12 00:00:00'); +insert into t1 (id, dt) values (346, '2010-12-13 00:00:00'); +insert into t1 (id, dt) values (347, '2010-12-14 00:00:00'); +insert into t1 (id, dt) values (348, '2010-12-15 00:00:00'); +insert into t1 (id, dt) values (349, '2010-12-16 00:00:00'); +insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); +SELECT COUNT(*) FROM t1; +COUNT(*) +350 +connection node_2; +call p1(100);; +connection node_1a; +call p1(100);; +connection node_3; +call p1(100);; +connection node_4; +call p1(100);; +connection node_1; +SET SESSION wsrep_OSU_method='RSU'; +SELECT @@wsrep_OSU_method; +@@wsrep_OSU_method +RSU +SET SESSION sql_log_bin = 0; +ALTER TABLE t1 DROP PARTITION rx2009xx; +ALTER TABLE t1 DROP PARTITION rx201004; +ALTER TABLE t1 DROP PARTITION rx201008; +SET SESSION wsrep_OSU_METHOD='TOI'; +SELECT @@wsrep_OSU_method; +@@wsrep_OSU_method +TOI +connection node_2; +connection node_3; +connection node_4; +connection node_1a; +DROP TABLE t1; +DROP PROCEDURE p1; diff --git a/mysql-test/suite/galera/t/galera_partition.cnf b/mysql-test/suite/galera/t/galera_partition.cnf new file mode 100644 index 00000000000..e6cb13ef523 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_partition.cnf @@ -0,0 +1,18 @@ +!include ../galera_4nodes.cnf + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1' +wsrep_slave_threads=10 + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1' +wsrep_slave_threads=10 + +[mysqld.3] +wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2' +wsrep_slave_threads=10 + +[mysqld.4] +wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3' +wsrep_slave_threads=10 + diff --git a/mysql-test/suite/galera/t/galera_partition.test b/mysql-test/suite/galera/t/galera_partition.test new file mode 100644 index 00000000000..a2044936cd1 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_partition.test @@ -0,0 +1,453 @@ +--source include/galera_cluster.inc +--source include/have_partition.inc + +--connection node_1 + +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +--connection node_1 + +CREATE TABLE t1( + id bigint unsigned NOT NULL AUTO_INCREMENT, + dt datetime NOT NULL, + PRIMARY KEY (id,dt), + KEY dt_idx (dt) +) ENGINE=InnoDB +PARTITION BY RANGE( TO_DAYS(dt) ) ( +PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ), +PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ), +PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ), +PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ), +PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ), +PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ), +PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ), +PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ), +PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ), +PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ), +PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ), +PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ), +PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ), +PARTITION rx2011 VALUES LESS THAN MAXVALUE); + +DELIMITER |; +CREATE PROCEDURE p1 (repeat_count int) +BEGIN + DECLARE current_num int; + SET current_num = 0; + WHILE current_num < repeat_count do + INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-02-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-03-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-04-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-06-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2012-02-21 00:00:00'); + COMMIT; + SET current_num = current_num + 1; + END WHILE; +END| +DELIMITER ;| + +insert into t1 (id, dt) values (1, '2010-01-02 00:00:00'); +insert into t1 (id, dt) values (2, '2010-01-03 00:00:00'); +insert into t1 (id, dt) values (3, '2010-01-04 00:00:00'); +insert into t1 (id, dt) values (4, '2010-01-05 00:00:00'); +insert into t1 (id, dt) values (5, '2010-01-06 00:00:00'); +insert into t1 (id, dt) values (6, '2010-01-07 00:00:00'); +insert into t1 (id, dt) values (7, '2010-01-08 00:00:00'); +insert into t1 (id, dt) values (8, '2010-01-09 00:00:00'); +insert into t1 (id, dt) values (9, '2010-01-10 00:00:00'); +insert into t1 (id, dt) values (10, '2010-01-11 00:00:00'); +insert into t1 (id, dt) values (11, '2010-01-12 00:00:00'); +insert into t1 (id, dt) values (12, '2010-01-13 00:00:00'); +insert into t1 (id, dt) values (13, '2010-01-14 00:00:00'); +insert into t1 (id, dt) values (14, '2010-01-15 00:00:00'); +insert into t1 (id, dt) values (15, '2010-01-16 00:00:00'); +insert into t1 (id, dt) values (16, '2010-01-17 00:00:00'); +insert into t1 (id, dt) values (17, '2010-01-18 00:00:00'); +insert into t1 (id, dt) values (18, '2010-01-19 00:00:00'); +insert into t1 (id, dt) values (19, '2010-01-20 00:00:00'); +insert into t1 (id, dt) values (20, '2010-01-21 00:00:00'); +insert into t1 (id, dt) values (21, '2010-01-22 00:00:00'); +insert into t1 (id, dt) values (22, '2010-01-23 00:00:00'); +insert into t1 (id, dt) values (23, '2010-01-24 00:00:00'); +insert into t1 (id, dt) values (24, '2010-01-25 00:00:00'); +insert into t1 (id, dt) values (25, '2010-01-26 00:00:00'); +insert into t1 (id, dt) values (26, '2010-01-27 00:00:00'); +insert into t1 (id, dt) values (27, '2010-01-28 00:00:00'); +insert into t1 (id, dt) values (28, '2010-01-29 00:00:00'); +insert into t1 (id, dt) values (29, '2010-01-30 00:00:00'); +insert into t1 (id, dt) values (30, '2010-01-31 00:00:00'); +insert into t1 (id, dt) values (31, '2010-02-01 00:00:00'); +insert into t1 (id, dt) values (32, '2010-02-02 00:00:00'); +insert into t1 (id, dt) values (33, '2010-02-03 00:00:00'); +insert into t1 (id, dt) values (34, '2010-02-04 00:00:00'); +insert into t1 (id, dt) values (35, '2010-02-05 00:00:00'); +insert into t1 (id, dt) values (36, '2010-02-06 00:00:00'); +insert into t1 (id, dt) values (37, '2010-02-07 00:00:00'); +insert into t1 (id, dt) values (38, '2010-02-08 00:00:00'); +insert into t1 (id, dt) values (39, '2010-02-09 00:00:00'); +insert into t1 (id, dt) values (40, '2010-02-10 00:00:00'); +insert into t1 (id, dt) values (41, '2010-02-11 00:00:00'); +insert into t1 (id, dt) values (42, '2010-02-12 00:00:00'); +insert into t1 (id, dt) values (43, '2010-02-13 00:00:00'); +insert into t1 (id, dt) values (44, '2010-02-14 00:00:00'); +insert into t1 (id, dt) values (45, '2010-02-15 00:00:00'); +insert into t1 (id, dt) values (46, '2010-02-16 00:00:00'); +insert into t1 (id, dt) values (47, '2010-02-17 00:00:00'); +insert into t1 (id, dt) values (48, '2010-02-18 00:00:00'); +insert into t1 (id, dt) values (49, '2010-02-19 00:00:00'); +insert into t1 (id, dt) values (50, '2010-02-20 00:00:00'); +insert into t1 (id, dt) values (51, '2010-02-21 00:00:00'); +insert into t1 (id, dt) values (52, '2010-02-22 00:00:00'); +insert into t1 (id, dt) values (53, '2010-02-23 00:00:00'); +insert into t1 (id, dt) values (54, '2010-02-24 00:00:00'); +insert into t1 (id, dt) values (55, '2010-02-25 00:00:00'); +insert into t1 (id, dt) values (56, '2010-02-26 00:00:00'); +insert into t1 (id, dt) values (57, '2010-02-27 00:00:00'); +insert into t1 (id, dt) values (58, '2010-02-28 00:00:00'); +insert into t1 (id, dt) values (59, '2010-03-01 00:00:00'); +insert into t1 (id, dt) values (60, '2010-03-02 00:00:00'); +insert into t1 (id, dt) values (61, '2010-03-03 00:00:00'); +insert into t1 (id, dt) values (62, '2010-03-04 00:00:00'); +insert into t1 (id, dt) values (63, '2010-03-05 00:00:00'); +insert into t1 (id, dt) values (64, '2010-03-06 00:00:00'); +insert into t1 (id, dt) values (65, '2010-03-07 00:00:00'); +insert into t1 (id, dt) values (66, '2010-03-08 00:00:00'); +insert into t1 (id, dt) values (67, '2010-03-09 00:00:00'); +insert into t1 (id, dt) values (68, '2010-03-10 00:00:00'); +insert into t1 (id, dt) values (69, '2010-03-11 00:00:00'); +insert into t1 (id, dt) values (70, '2010-03-12 00:00:00'); +insert into t1 (id, dt) values (71, '2010-03-13 00:00:00'); +insert into t1 (id, dt) values (72, '2010-03-14 00:00:00'); +insert into t1 (id, dt) values (73, '2010-03-15 00:00:00'); +insert into t1 (id, dt) values (74, '2010-03-16 00:00:00'); +insert into t1 (id, dt) values (75, '2010-03-17 00:00:00'); +insert into t1 (id, dt) values (76, '2010-03-18 00:00:00'); +insert into t1 (id, dt) values (77, '2010-03-19 00:00:00'); +insert into t1 (id, dt) values (78, '2010-03-20 00:00:00'); +insert into t1 (id, dt) values (79, '2010-03-21 00:00:00'); +insert into t1 (id, dt) values (80, '2010-03-22 00:00:00'); +insert into t1 (id, dt) values (81, '2010-03-23 00:00:00'); +insert into t1 (id, dt) values (82, '2010-03-24 00:00:00'); +insert into t1 (id, dt) values (83, '2010-03-25 00:00:00'); +insert into t1 (id, dt) values (84, '2010-03-26 00:00:00'); +insert into t1 (id, dt) values (85, '2010-03-27 00:00:00'); +insert into t1 (id, dt) values (86, '2010-03-28 00:00:00'); +insert into t1 (id, dt) values (87, '2010-03-29 00:00:00'); +insert into t1 (id, dt) values (88, '2010-03-30 00:00:00'); +insert into t1 (id, dt) values (89, '2010-03-31 00:00:00'); +insert into t1 (id, dt) values (90, '2010-04-01 00:00:00'); +insert into t1 (id, dt) values (91, '2010-04-02 00:00:00'); +insert into t1 (id, dt) values (92, '2010-04-03 00:00:00'); +insert into t1 (id, dt) values (93, '2010-04-04 00:00:00'); +insert into t1 (id, dt) values (94, '2010-04-05 00:00:00'); +insert into t1 (id, dt) values (95, '2010-04-06 00:00:00'); +insert into t1 (id, dt) values (96, '2010-04-07 00:00:00'); +insert into t1 (id, dt) values (97, '2010-04-08 00:00:00'); +insert into t1 (id, dt) values (98, '2010-04-09 00:00:00'); +insert into t1 (id, dt) values (99, '2010-04-10 00:00:00'); +insert into t1 (id, dt) values (100, '2010-04-11 00:00:00'); +insert into t1 (id, dt) values (101, '2010-04-12 00:00:00'); +insert into t1 (id, dt) values (102, '2010-04-13 00:00:00'); +insert into t1 (id, dt) values (103, '2010-04-14 00:00:00'); +insert into t1 (id, dt) values (104, '2010-04-15 00:00:00'); +insert into t1 (id, dt) values (105, '2010-04-16 00:00:00'); +insert into t1 (id, dt) values (106, '2010-04-17 00:00:00'); +insert into t1 (id, dt) values (107, '2010-04-18 00:00:00'); +insert into t1 (id, dt) values (108, '2010-04-19 00:00:00'); +insert into t1 (id, dt) values (109, '2010-04-20 00:00:00'); +insert into t1 (id, dt) values (110, '2010-04-21 00:00:00'); +insert into t1 (id, dt) values (111, '2010-04-22 00:00:00'); +insert into t1 (id, dt) values (112, '2010-04-23 00:00:00'); +insert into t1 (id, dt) values (113, '2010-04-24 00:00:00'); +insert into t1 (id, dt) values (114, '2010-04-25 00:00:00'); +insert into t1 (id, dt) values (115, '2010-04-26 00:00:00'); +insert into t1 (id, dt) values (116, '2010-04-27 00:00:00'); +insert into t1 (id, dt) values (117, '2010-04-28 00:00:00'); +insert into t1 (id, dt) values (118, '2010-04-29 00:00:00'); +insert into t1 (id, dt) values (119, '2010-04-30 00:00:00'); +insert into t1 (id, dt) values (120, '2010-05-01 00:00:00'); +insert into t1 (id, dt) values (121, '2010-05-02 00:00:00'); +insert into t1 (id, dt) values (122, '2010-05-03 00:00:00'); +insert into t1 (id, dt) values (123, '2010-05-04 00:00:00'); +insert into t1 (id, dt) values (124, '2010-05-05 00:00:00'); +insert into t1 (id, dt) values (125, '2010-05-06 00:00:00'); +insert into t1 (id, dt) values (126, '2010-05-07 00:00:00'); +insert into t1 (id, dt) values (127, '2010-05-08 00:00:00'); +insert into t1 (id, dt) values (128, '2010-05-09 00:00:00'); +insert into t1 (id, dt) values (129, '2010-05-10 00:00:00'); +insert into t1 (id, dt) values (130, '2010-05-11 00:00:00'); +insert into t1 (id, dt) values (131, '2010-05-12 00:00:00'); +insert into t1 (id, dt) values (132, '2010-05-13 00:00:00'); +insert into t1 (id, dt) values (133, '2010-05-14 00:00:00'); +insert into t1 (id, dt) values (134, '2010-05-15 00:00:00'); +insert into t1 (id, dt) values (135, '2010-05-16 00:00:00'); +insert into t1 (id, dt) values (136, '2010-05-17 00:00:00'); +insert into t1 (id, dt) values (137, '2010-05-18 00:00:00'); +insert into t1 (id, dt) values (138, '2010-05-19 00:00:00'); +insert into t1 (id, dt) values (139, '2010-05-20 00:00:00'); +insert into t1 (id, dt) values (140, '2010-05-21 00:00:00'); +insert into t1 (id, dt) values (141, '2010-05-22 00:00:00'); +insert into t1 (id, dt) values (142, '2010-05-23 00:00:00'); +insert into t1 (id, dt) values (143, '2010-05-24 00:00:00'); +insert into t1 (id, dt) values (144, '2010-05-25 00:00:00'); +insert into t1 (id, dt) values (145, '2010-05-26 00:00:00'); +insert into t1 (id, dt) values (146, '2010-05-27 00:00:00'); +insert into t1 (id, dt) values (147, '2010-05-28 00:00:00'); +insert into t1 (id, dt) values (148, '2010-05-29 00:00:00'); +insert into t1 (id, dt) values (149, '2010-05-30 00:00:00'); +insert into t1 (id, dt) values (150, '2010-05-31 00:00:00'); +insert into t1 (id, dt) values (151, '2010-06-01 00:00:00'); +insert into t1 (id, dt) values (152, '2010-06-02 00:00:00'); +insert into t1 (id, dt) values (153, '2010-06-03 00:00:00'); +insert into t1 (id, dt) values (154, '2010-06-04 00:00:00'); +insert into t1 (id, dt) values (155, '2010-06-05 00:00:00'); +insert into t1 (id, dt) values (156, '2010-06-06 00:00:00'); +insert into t1 (id, dt) values (157, '2010-06-07 00:00:00'); +insert into t1 (id, dt) values (158, '2010-06-08 00:00:00'); +insert into t1 (id, dt) values (159, '2010-06-09 00:00:00'); +insert into t1 (id, dt) values (160, '2010-06-10 00:00:00'); +insert into t1 (id, dt) values (161, '2010-06-11 00:00:00'); +insert into t1 (id, dt) values (162, '2010-06-12 00:00:00'); +insert into t1 (id, dt) values (163, '2010-06-13 00:00:00'); +insert into t1 (id, dt) values (164, '2010-06-14 00:00:00'); +insert into t1 (id, dt) values (165, '2010-06-15 00:00:00'); +insert into t1 (id, dt) values (166, '2010-06-16 00:00:00'); +insert into t1 (id, dt) values (167, '2010-06-17 00:00:00'); +insert into t1 (id, dt) values (168, '2010-06-18 00:00:00'); +insert into t1 (id, dt) values (169, '2010-06-19 00:00:00'); +insert into t1 (id, dt) values (170, '2010-06-20 00:00:00'); +insert into t1 (id, dt) values (171, '2010-06-21 00:00:00'); +insert into t1 (id, dt) values (172, '2010-06-22 00:00:00'); +insert into t1 (id, dt) values (173, '2010-06-23 00:00:00'); +insert into t1 (id, dt) values (174, '2010-06-24 00:00:00'); +insert into t1 (id, dt) values (175, '2010-06-25 00:00:00'); +insert into t1 (id, dt) values (176, '2010-06-26 00:00:00'); +insert into t1 (id, dt) values (177, '2010-06-27 00:00:00'); +insert into t1 (id, dt) values (178, '2010-06-28 00:00:00'); +insert into t1 (id, dt) values (179, '2010-06-29 00:00:00'); +insert into t1 (id, dt) values (180, '2010-06-30 00:00:00'); +insert into t1 (id, dt) values (181, '2010-07-01 00:00:00'); +insert into t1 (id, dt) values (182, '2010-07-02 00:00:00'); +insert into t1 (id, dt) values (183, '2010-07-03 00:00:00'); +insert into t1 (id, dt) values (184, '2010-07-04 00:00:00'); +insert into t1 (id, dt) values (185, '2010-07-05 00:00:00'); +insert into t1 (id, dt) values (186, '2010-07-06 00:00:00'); +insert into t1 (id, dt) values (187, '2010-07-07 00:00:00'); +insert into t1 (id, dt) values (188, '2010-07-08 00:00:00'); +insert into t1 (id, dt) values (189, '2010-07-09 00:00:00'); +insert into t1 (id, dt) values (190, '2010-07-10 00:00:00'); +insert into t1 (id, dt) values (191, '2010-07-11 00:00:00'); +insert into t1 (id, dt) values (192, '2010-07-12 00:00:00'); +insert into t1 (id, dt) values (193, '2010-07-13 00:00:00'); +insert into t1 (id, dt) values (194, '2010-07-14 00:00:00'); +insert into t1 (id, dt) values (195, '2010-07-15 00:00:00'); +insert into t1 (id, dt) values (196, '2010-07-16 00:00:00'); +insert into t1 (id, dt) values (197, '2010-07-17 00:00:00'); +insert into t1 (id, dt) values (198, '2010-07-18 00:00:00'); +insert into t1 (id, dt) values (199, '2010-07-19 00:00:00'); +insert into t1 (id, dt) values (200, '2010-07-20 00:00:00'); +insert into t1 (id, dt) values (201, '2010-07-21 00:00:00'); +insert into t1 (id, dt) values (202, '2010-07-22 00:00:00'); +insert into t1 (id, dt) values (203, '2010-07-23 00:00:00'); +insert into t1 (id, dt) values (204, '2010-07-24 00:00:00'); +insert into t1 (id, dt) values (205, '2010-07-25 00:00:00'); +insert into t1 (id, dt) values (206, '2010-07-26 00:00:00'); +insert into t1 (id, dt) values (207, '2010-07-27 00:00:00'); +insert into t1 (id, dt) values (208, '2010-07-28 00:00:00'); +insert into t1 (id, dt) values (209, '2010-07-29 00:00:00'); +insert into t1 (id, dt) values (210, '2010-07-30 00:00:00'); +insert into t1 (id, dt) values (211, '2010-07-31 00:00:00'); +insert into t1 (id, dt) values (212, '2010-08-01 00:00:00'); +insert into t1 (id, dt) values (213, '2010-08-02 00:00:00'); +insert into t1 (id, dt) values (214, '2010-08-03 00:00:00'); +insert into t1 (id, dt) values (215, '2010-08-04 00:00:00'); +insert into t1 (id, dt) values (216, '2010-08-05 00:00:00'); +insert into t1 (id, dt) values (217, '2010-08-06 00:00:00'); +insert into t1 (id, dt) values (218, '2010-08-07 00:00:00'); +insert into t1 (id, dt) values (219, '2010-08-08 00:00:00'); +insert into t1 (id, dt) values (220, '2010-08-09 00:00:00'); +insert into t1 (id, dt) values (221, '2010-08-10 00:00:00'); +insert into t1 (id, dt) values (222, '2010-08-11 00:00:00'); +insert into t1 (id, dt) values (223, '2010-08-12 00:00:00'); +insert into t1 (id, dt) values (224, '2010-08-13 00:00:00'); +insert into t1 (id, dt) values (225, '2010-08-14 00:00:00'); +insert into t1 (id, dt) values (226, '2010-08-15 00:00:00'); +insert into t1 (id, dt) values (227, '2010-08-16 00:00:00'); +insert into t1 (id, dt) values (228, '2010-08-17 00:00:00'); +insert into t1 (id, dt) values (229, '2010-08-18 00:00:00'); +insert into t1 (id, dt) values (230, '2010-08-19 00:00:00'); +insert into t1 (id, dt) values (231, '2010-08-20 00:00:00'); +insert into t1 (id, dt) values (232, '2010-08-21 00:00:00'); +insert into t1 (id, dt) values (233, '2010-08-22 00:00:00'); +insert into t1 (id, dt) values (234, '2010-08-23 00:00:00'); +insert into t1 (id, dt) values (235, '2010-08-24 00:00:00'); +insert into t1 (id, dt) values (236, '2010-08-25 00:00:00'); +insert into t1 (id, dt) values (237, '2010-08-26 00:00:00'); +insert into t1 (id, dt) values (238, '2010-08-27 00:00:00'); +insert into t1 (id, dt) values (239, '2010-08-28 00:00:00'); +insert into t1 (id, dt) values (240, '2010-08-29 00:00:00'); +insert into t1 (id, dt) values (241, '2010-08-30 00:00:00'); +insert into t1 (id, dt) values (242, '2010-08-31 00:00:00'); +insert into t1 (id, dt) values (243, '2010-09-01 00:00:00'); +insert into t1 (id, dt) values (244, '2010-09-02 00:00:00'); +insert into t1 (id, dt) values (245, '2010-09-03 00:00:00'); +insert into t1 (id, dt) values (246, '2010-09-04 00:00:00'); +insert into t1 (id, dt) values (247, '2010-09-05 00:00:00'); +insert into t1 (id, dt) values (248, '2010-09-06 00:00:00'); +insert into t1 (id, dt) values (249, '2010-09-07 00:00:00'); +insert into t1 (id, dt) values (250, '2010-09-08 00:00:00'); +insert into t1 (id, dt) values (251, '2010-09-09 00:00:00'); +insert into t1 (id, dt) values (252, '2010-09-10 00:00:00'); +insert into t1 (id, dt) values (253, '2010-09-11 00:00:00'); +insert into t1 (id, dt) values (254, '2010-09-12 00:00:00'); +insert into t1 (id, dt) values (255, '2010-09-13 00:00:00'); +insert into t1 (id, dt) values (256, '2010-09-14 00:00:00'); +insert into t1 (id, dt) values (257, '2010-09-15 00:00:00'); +insert into t1 (id, dt) values (258, '2010-09-16 00:00:00'); +insert into t1 (id, dt) values (259, '2010-09-17 00:00:00'); +insert into t1 (id, dt) values (260, '2010-09-18 00:00:00'); +insert into t1 (id, dt) values (261, '2010-09-19 00:00:00'); +insert into t1 (id, dt) values (262, '2010-09-20 00:00:00'); +insert into t1 (id, dt) values (263, '2010-09-21 00:00:00'); +insert into t1 (id, dt) values (264, '2010-09-22 00:00:00'); +insert into t1 (id, dt) values (265, '2010-09-23 00:00:00'); +insert into t1 (id, dt) values (266, '2010-09-24 00:00:00'); +insert into t1 (id, dt) values (267, '2010-09-25 00:00:00'); +insert into t1 (id, dt) values (268, '2010-09-26 00:00:00'); +insert into t1 (id, dt) values (269, '2010-09-27 00:00:00'); +insert into t1 (id, dt) values (270, '2010-09-28 00:00:00'); +insert into t1 (id, dt) values (271, '2010-09-29 00:00:00'); +insert into t1 (id, dt) values (272, '2010-09-30 00:00:00'); +insert into t1 (id, dt) values (273, '2010-10-01 00:00:00'); +insert into t1 (id, dt) values (274, '2010-10-02 00:00:00'); +insert into t1 (id, dt) values (275, '2010-10-03 00:00:00'); +insert into t1 (id, dt) values (276, '2010-10-04 00:00:00'); +insert into t1 (id, dt) values (277, '2010-10-05 00:00:00'); +insert into t1 (id, dt) values (278, '2010-10-06 00:00:00'); +insert into t1 (id, dt) values (279, '2010-10-07 00:00:00'); +insert into t1 (id, dt) values (280, '2010-10-08 00:00:00'); +insert into t1 (id, dt) values (281, '2010-10-09 00:00:00'); +insert into t1 (id, dt) values (282, '2010-10-10 00:00:00'); +insert into t1 (id, dt) values (283, '2010-10-11 00:00:00'); +insert into t1 (id, dt) values (284, '2010-10-12 00:00:00'); +insert into t1 (id, dt) values (285, '2010-10-13 00:00:00'); +insert into t1 (id, dt) values (286, '2010-10-14 00:00:00'); +insert into t1 (id, dt) values (287, '2010-10-15 00:00:00'); +insert into t1 (id, dt) values (288, '2010-10-16 00:00:00'); +insert into t1 (id, dt) values (289, '2010-10-17 00:00:00'); +insert into t1 (id, dt) values (290, '2010-10-18 00:00:00'); +insert into t1 (id, dt) values (291, '2010-10-19 00:00:00'); +insert into t1 (id, dt) values (292, '2010-10-20 00:00:00'); +insert into t1 (id, dt) values (293, '2010-10-21 00:00:00'); +insert into t1 (id, dt) values (294, '2010-10-22 00:00:00'); +insert into t1 (id, dt) values (295, '2010-10-23 00:00:00'); +insert into t1 (id, dt) values (296, '2010-10-24 00:00:00'); +insert into t1 (id, dt) values (297, '2010-10-25 00:00:00'); +insert into t1 (id, dt) values (298, '2010-10-26 00:00:00'); +insert into t1 (id, dt) values (299, '2010-10-27 00:00:00'); +insert into t1 (id, dt) values (300, '2010-10-28 00:00:00'); +insert into t1 (id, dt) values (301, '2010-10-29 00:00:00'); +insert into t1 (id, dt) values (302, '2010-10-30 00:00:00'); +insert into t1 (id, dt) values (303, '2010-10-31 00:00:00'); +insert into t1 (id, dt) values (304, '2010-11-01 00:00:00'); +insert into t1 (id, dt) values (305, '2010-11-02 00:00:00'); +insert into t1 (id, dt) values (306, '2010-11-03 00:00:00'); +insert into t1 (id, dt) values (307, '2010-11-04 00:00:00'); +insert into t1 (id, dt) values (308, '2010-11-05 00:00:00'); +insert into t1 (id, dt) values (309, '2010-11-06 00:00:00'); +insert into t1 (id, dt) values (310, '2010-11-07 00:00:00'); +insert into t1 (id, dt) values (311, '2010-11-08 00:00:00'); +insert into t1 (id, dt) values (312, '2010-11-09 00:00:00'); +insert into t1 (id, dt) values (313, '2010-11-10 00:00:00'); +insert into t1 (id, dt) values (314, '2010-11-11 00:00:00'); +insert into t1 (id, dt) values (315, '2010-11-12 00:00:00'); +insert into t1 (id, dt) values (316, '2010-11-13 00:00:00'); +insert into t1 (id, dt) values (317, '2010-11-14 00:00:00'); +insert into t1 (id, dt) values (318, '2010-11-15 00:00:00'); +insert into t1 (id, dt) values (319, '2010-11-16 00:00:00'); +insert into t1 (id, dt) values (320, '2010-11-17 00:00:00'); +insert into t1 (id, dt) values (321, '2010-11-18 00:00:00'); +insert into t1 (id, dt) values (322, '2010-11-19 00:00:00'); +insert into t1 (id, dt) values (323, '2010-11-20 00:00:00'); +insert into t1 (id, dt) values (324, '2010-11-21 00:00:00'); +insert into t1 (id, dt) values (325, '2010-11-22 00:00:00'); +insert into t1 (id, dt) values (326, '2010-11-23 00:00:00'); +insert into t1 (id, dt) values (327, '2010-11-24 00:00:00'); +insert into t1 (id, dt) values (328, '2010-11-25 00:00:00'); +insert into t1 (id, dt) values (329, '2010-11-26 00:00:00'); +insert into t1 (id, dt) values (330, '2010-11-27 00:00:00'); +insert into t1 (id, dt) values (331, '2010-11-28 00:00:00'); +insert into t1 (id, dt) values (332, '2010-11-29 00:00:00'); +insert into t1 (id, dt) values (333, '2010-11-30 00:00:00'); +insert into t1 (id, dt) values (334, '2010-12-01 00:00:00'); +insert into t1 (id, dt) values (335, '2010-12-02 00:00:00'); +insert into t1 (id, dt) values (336, '2010-12-03 00:00:00'); +insert into t1 (id, dt) values (337, '2010-12-04 00:00:00'); +insert into t1 (id, dt) values (338, '2010-12-05 00:00:00'); +insert into t1 (id, dt) values (339, '2010-12-06 00:00:00'); +insert into t1 (id, dt) values (340, '2010-12-07 00:00:00'); +insert into t1 (id, dt) values (341, '2010-12-08 00:00:00'); +insert into t1 (id, dt) values (342, '2010-12-09 00:00:00'); +insert into t1 (id, dt) values (343, '2010-12-10 00:00:00'); +insert into t1 (id, dt) values (344, '2010-12-11 00:00:00'); +insert into t1 (id, dt) values (345, '2010-12-12 00:00:00'); +insert into t1 (id, dt) values (346, '2010-12-13 00:00:00'); +insert into t1 (id, dt) values (347, '2010-12-14 00:00:00'); +insert into t1 (id, dt) values (348, '2010-12-15 00:00:00'); +insert into t1 (id, dt) values (349, '2010-12-16 00:00:00'); +insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); + +SELECT COUNT(*) FROM t1; + +--connection node_2 +--send call p1(100); + +--connection node_1a +--send call p1(100); + +--connection node_3 +--send call p1(100); + +--connection node_4 +--send call p1(100); + +--connection node_1 +SET SESSION wsrep_OSU_method='RSU'; +SELECT @@wsrep_OSU_method; +SET SESSION sql_log_bin = 0; + +--error 0,ER_LOCK_DEADLOCK +ALTER TABLE t1 DROP PARTITION rx2009xx; +--error 0,ER_LOCK_DEADLOCK +ALTER TABLE t1 DROP PARTITION rx201004; +--error 0,ER_LOCK_DEADLOCK +ALTER TABLE t1 DROP PARTITION rx201008; + +SET SESSION wsrep_OSU_METHOD='TOI'; +SELECT @@wsrep_OSU_method; + +--connection node_2 +--error 0,ER_LOCK_DEADLOCK +reap; + +--connection node_3 +--error 0,ER_LOCK_DEADLOCK +reap; + +--connection node_4 +--error 0,ER_LOCK_DEADLOCK +reap; + +--connection node_1a +--error 0,ER_LOCK_DEADLOCK +reap; +DROP TABLE t1; +DROP PROCEDURE p1; + diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 062c9dcd74c..cfcc04bff2c 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1784,7 +1784,7 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_) } my_error(ER_LOCK_DEADLOCK, MYF(0)); - return(1); + return(-1); } wsrep_seqno_t seqno = wsrep->pause(wsrep); @@ -2311,6 +2311,7 @@ static my_bool have_committing_connections() if (is_committing_connection(tmp)) { + mysql_mutex_unlock(&LOCK_thread_count); return TRUE; } } From 292015d486aa157422b43d99fabb5f81e6a382f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 9 Dec 2019 10:47:25 +0200 Subject: [PATCH 06/19] MDEV-21254 Remove unused keywords from the InnoDB SQL parser The InnoDB internal SQL parser, which is used for updating the InnoDB data dictionary tables (to be removed in MDEV-11655), persistent statistics (to be refactored in MDEV-15020) and fulltext indexes, implements some unused keywords and built-in functions: OUT BINARY BLOB INTEGER FLOAT SUM DISTINCT READ COMPACT BLOCK_SIZE TO_CHAR TO_NUMBER BINARY_TO_NUMBER REPLSTR SYSDATE PRINTF ASSERT RND RND_STR ROW_PRINTF UNSIGNED Also, procedures are never declared with parameters. Only one top-level procedure is declared and invoked at a time, and parameters are being passed via pars_info_t. --- storage/innobase/eval/eval0eval.cc | 295 +--- storage/innobase/include/pars0grm.h | 158 +- storage/innobase/include/pars0pars.h | 35 +- storage/innobase/pars/lexyy.cc | 1108 ++++++-------- storage/innobase/pars/pars0grm.cc | 2120 +++++++++++--------------- storage/innobase/pars/pars0grm.y | 118 +- storage/innobase/pars/pars0lex.l | 84 - storage/innobase/pars/pars0pars.cc | 144 +- 8 files changed, 1459 insertions(+), 2603 deletions(-) diff --git a/storage/innobase/eval/eval0eval.cc b/storage/innobase/eval/eval0eval.cc index e02fc7f561b..6f709707f7f 100644 --- a/storage/innobase/eval/eval0eval.cc +++ b/storage/innobase/eval/eval0eval.cc @@ -30,9 +30,6 @@ Created 12/29/1997 Heikki Tuuri #include "row0sel.h" #include "rem0cmp.h" -/** The RND function seed */ -static ulint eval_rnd = 128367121; - /** Dummy adress used when we should allocate a buffer of size 0 in eval_node_alloc_val_buf */ @@ -310,119 +307,17 @@ eval_aggregate( /*===========*/ func_node_t* node) /*!< in: aggregate operation node */ { - que_node_t* arg; lint val; - lint arg_val; - int func; ut_ad(que_node_get_type(node) == QUE_NODE_FUNC); val = eval_node_get_int_val(node); - func = node->func; - - if (func == PARS_COUNT_TOKEN) { - - val = val + 1; - } else { - ut_ad(func == PARS_SUM_TOKEN); - - arg = node->args; - arg_val = eval_node_get_int_val(arg); - - val = val + arg_val; - } - + ut_a(node->func == PARS_COUNT_TOKEN); + val = val + 1; eval_node_set_int_val(node, val); } -/*****************************************************************//** -Evaluates a predefined function node where the function is not relevant -in benchmarks. */ -static -void -eval_predefined_2( -/*==============*/ - func_node_t* func_node) /*!< in: predefined function node */ -{ - que_node_t* arg; - que_node_t* arg1; - que_node_t* arg2 = 0; /* remove warning (??? bug ???) */ - lint int_val; - byte* data; - ulint len1; - ulint len2; - int func; - ulint i; - - ut_ad(que_node_get_type(func_node) == QUE_NODE_FUNC); - - arg1 = func_node->args; - - if (arg1) { - arg2 = que_node_get_next(arg1); - } - - func = func_node->func; - - if (func == PARS_PRINTF_TOKEN) { - - arg = arg1; - - while (arg) { - dfield_print(que_node_get_val(arg)); - - arg = que_node_get_next(arg); - } - - putc('\n', stderr); - - } else if (func == PARS_ASSERT_TOKEN) { - - if (!eval_node_get_ibool_val(arg1)) { - fputs("SQL assertion fails in a stored procedure!\n", - stderr); - } - - ut_a(eval_node_get_ibool_val(arg1)); - - /* This function, or more precisely, a debug procedure, - returns no value */ - - } else if (func == PARS_RND_TOKEN) { - - len1 = (ulint) eval_node_get_int_val(arg1); - len2 = (ulint) eval_node_get_int_val(arg2); - - ut_ad(len2 >= len1); - - if (len2 > len1) { - int_val = (lint) (len1 - + (eval_rnd % (len2 - len1 + 1))); - } else { - int_val = (lint) len1; - } - - eval_rnd = ut_rnd_gen_next_ulint(eval_rnd); - - eval_node_set_int_val(func_node, int_val); - - } else if (func == PARS_RND_STR_TOKEN) { - - len1 = (ulint) eval_node_get_int_val(arg1); - - data = eval_node_ensure_val_buf(func_node, len1); - - for (i = 0; i < len1; i++) { - data[i] = (byte)(97 + (eval_rnd % 3)); - - eval_rnd = ut_rnd_gen_next_ulint(eval_rnd); - } - } else { - ut_error; - } -} - /*****************************************************************//** Evaluates a notfound-function node. */ UNIV_INLINE @@ -493,46 +388,6 @@ eval_substr( dfield_set_data(dfield, str1 + len1, len2); } -/*****************************************************************//** -Evaluates a replstr-procedure node. */ -static -void -eval_replstr( -/*=========*/ - func_node_t* func_node) /*!< in: function node */ -{ - que_node_t* arg1; - que_node_t* arg2; - que_node_t* arg3; - que_node_t* arg4; - byte* str1; - byte* str2; - ulint len1; - ulint len2; - - arg1 = func_node->args; - arg2 = que_node_get_next(arg1); - - ut_ad(que_node_get_type(arg1) == QUE_NODE_SYMBOL); - - arg3 = que_node_get_next(arg2); - arg4 = que_node_get_next(arg3); - - str1 = static_cast(dfield_get_data(que_node_get_val(arg1))); - str2 = static_cast(dfield_get_data(que_node_get_val(arg2))); - - len1 = (ulint) eval_node_get_int_val(arg3); - len2 = (ulint) eval_node_get_int_val(arg4); - - if ((dfield_get_len(que_node_get_val(arg1)) < len1 + len2) - || (dfield_get_len(que_node_get_val(arg2)) < len2)) { - - ut_error; - } - - ut_memcpy(str1 + len1, str2, len2); -} - /*****************************************************************//** Evaluates an instr-function node. */ static @@ -605,44 +460,6 @@ match_found: eval_node_set_int_val(func_node, int_val); } -/*****************************************************************//** -Evaluates a predefined function node. */ -UNIV_INLINE -void -eval_binary_to_number( -/*==================*/ - func_node_t* func_node) /*!< in: function node */ -{ - que_node_t* arg1; - dfield_t* dfield; - byte* str1; - byte* str2; - ulint len1; - ulint int_val; - - arg1 = func_node->args; - - dfield = que_node_get_val(arg1); - - str1 = static_cast(dfield_get_data(dfield)); - len1 = dfield_get_len(dfield); - - if (len1 > 4) { - ut_error; - } - - if (len1 == 4) { - str2 = str1; - } else { - int_val = 0; - str2 = (byte*) &int_val; - - ut_memcpy(str2 + (4 - len1), str1, len1); - } - - eval_node_copy_and_alloc_val(func_node, str2, 4); -} - /*****************************************************************//** Evaluates a predefined function node. */ static @@ -734,95 +551,12 @@ eval_to_binary( } /*****************************************************************//** -Evaluates a predefined function node. */ -UNIV_INLINE -void -eval_predefined( -/*============*/ - func_node_t* func_node) /*!< in: function node */ +Evaluate LENGTH(). */ +inline void eval_length(func_node_t* func_node) { - que_node_t* arg1; - lint int_val; - byte* data; - int func; - - func = func_node->func; - - arg1 = func_node->args; - - if (func == PARS_LENGTH_TOKEN) { - - int_val = (lint) dfield_get_len(que_node_get_val(arg1)); - - } else if (func == PARS_TO_CHAR_TOKEN) { - - /* Convert number to character string as a - signed decimal integer. */ - - ulint uint_val; - int int_len; - - int_val = eval_node_get_int_val(arg1); - - /* Determine the length of the string. */ - - if (int_val == 0) { - int_len = 1; /* the number 0 occupies 1 byte */ - } else { - int_len = 0; - if (int_val < 0) { - uint_val = ((ulint) -int_val - 1) + 1; - int_len++; /* reserve space for minus sign */ - } else { - uint_val = (ulint) int_val; - } - for (; uint_val > 0; int_len++) { - uint_val /= 10; - } - } - - /* allocate the string */ - data = eval_node_ensure_val_buf(func_node, int_len + 1); - - /* add terminating NUL character */ - data[int_len] = 0; - - /* convert the number */ - - if (int_val == 0) { - data[0] = '0'; - } else { - int tmp; - if (int_val < 0) { - data[0] = '-'; /* preceding minus sign */ - uint_val = ((ulint) -int_val - 1) + 1; - } else { - uint_val = (ulint) int_val; - } - for (tmp = int_len; uint_val > 0; uint_val /= 10) { - data[--tmp] = (byte) - ('0' + (byte)(uint_val % 10)); - } - } - - dfield_set_len(que_node_get_val(func_node), int_len); - - return; - - } else if (func == PARS_TO_NUMBER_TOKEN) { - - int_val = atoi((char*) - dfield_get_data(que_node_get_val(arg1))); - - } else if (func == PARS_SYSDATE_TOKEN) { - int_val = (lint) time(NULL); - } else { - eval_predefined_2(func_node); - - return; - } - - eval_node_set_int_val(func_node, int_val); + eval_node_set_int_val(func_node, + dfield_get_len(que_node_get_val + (func_node->args))); } /*****************************************************************//** @@ -852,8 +586,7 @@ eval_func( if (dfield_is_null(que_node_get_val(arg)) && (fclass != PARS_FUNC_CMP) - && (func != PARS_NOTFOUND_TOKEN) - && (func != PARS_PRINTF_TOKEN)) { + && (func != PARS_NOTFOUND_TOKEN)) { ut_error; } @@ -878,24 +611,20 @@ eval_func( case PARS_SUBSTR_TOKEN: eval_substr(func_node); return; - case PARS_REPLSTR_TOKEN: - eval_replstr(func_node); - return; case PARS_INSTR_TOKEN: eval_instr(func_node); return; - case PARS_BINARY_TO_NUMBER_TOKEN: - eval_binary_to_number(func_node); - return; case PARS_CONCAT_TOKEN: eval_concat(func_node); return; case PARS_TO_BINARY_TOKEN: eval_to_binary(func_node); return; - default: - eval_predefined(func_node); + case PARS_LENGTH_TOKEN: + eval_length(func_node); return; + default: + ut_error; } case PARS_FUNC_LOGICAL: eval_logical(func_node); diff --git a/storage/innobase/include/pars0grm.h b/storage/innobase/include/pars0grm.h index 90a7468bc9a..58d424abfdc 100644 --- a/storage/innobase/include/pars0grm.h +++ b/storage/innobase/include/pars0grm.h @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.4.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 @@ -30,6 +31,9 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + #ifndef YY_YY_PARS0GRM_TAB_H_INCLUDED # define YY_YY_PARS0GRM_TAB_H_INCLUDED /* Debug traces. */ @@ -58,91 +62,71 @@ extern int yydebug; PARS_NE_TOKEN = 268, PARS_PROCEDURE_TOKEN = 269, PARS_IN_TOKEN = 270, - PARS_OUT_TOKEN = 271, - PARS_BINARY_TOKEN = 272, - PARS_BLOB_TOKEN = 273, - PARS_INT_TOKEN = 274, - PARS_FLOAT_TOKEN = 275, - PARS_CHAR_TOKEN = 276, - PARS_IS_TOKEN = 277, - PARS_BEGIN_TOKEN = 278, - PARS_END_TOKEN = 279, - PARS_IF_TOKEN = 280, - PARS_THEN_TOKEN = 281, - PARS_ELSE_TOKEN = 282, - PARS_ELSIF_TOKEN = 283, - PARS_LOOP_TOKEN = 284, - PARS_WHILE_TOKEN = 285, - PARS_RETURN_TOKEN = 286, - PARS_SELECT_TOKEN = 287, - PARS_SUM_TOKEN = 288, - PARS_COUNT_TOKEN = 289, - PARS_DISTINCT_TOKEN = 290, - PARS_FROM_TOKEN = 291, - PARS_WHERE_TOKEN = 292, - PARS_FOR_TOKEN = 293, - PARS_DDOT_TOKEN = 294, - PARS_READ_TOKEN = 295, - PARS_ORDER_TOKEN = 296, - PARS_BY_TOKEN = 297, - PARS_ASC_TOKEN = 298, - PARS_DESC_TOKEN = 299, - PARS_INSERT_TOKEN = 300, - PARS_INTO_TOKEN = 301, - PARS_VALUES_TOKEN = 302, - PARS_UPDATE_TOKEN = 303, - PARS_SET_TOKEN = 304, - PARS_DELETE_TOKEN = 305, - PARS_CURRENT_TOKEN = 306, - PARS_OF_TOKEN = 307, - PARS_CREATE_TOKEN = 308, - PARS_TABLE_TOKEN = 309, - PARS_INDEX_TOKEN = 310, - PARS_UNIQUE_TOKEN = 311, - PARS_CLUSTERED_TOKEN = 312, - PARS_ON_TOKEN = 313, - PARS_ASSIGN_TOKEN = 314, - PARS_DECLARE_TOKEN = 315, - PARS_CURSOR_TOKEN = 316, - PARS_SQL_TOKEN = 317, - PARS_OPEN_TOKEN = 318, - PARS_FETCH_TOKEN = 319, - PARS_CLOSE_TOKEN = 320, - PARS_NOTFOUND_TOKEN = 321, - PARS_TO_CHAR_TOKEN = 322, - PARS_TO_NUMBER_TOKEN = 323, - PARS_TO_BINARY_TOKEN = 324, - PARS_BINARY_TO_NUMBER_TOKEN = 325, - PARS_SUBSTR_TOKEN = 326, - PARS_REPLSTR_TOKEN = 327, - PARS_CONCAT_TOKEN = 328, - PARS_INSTR_TOKEN = 329, - PARS_LENGTH_TOKEN = 330, - PARS_SYSDATE_TOKEN = 331, - PARS_PRINTF_TOKEN = 332, - PARS_ASSERT_TOKEN = 333, - PARS_RND_TOKEN = 334, - PARS_RND_STR_TOKEN = 335, - PARS_ROW_PRINTF_TOKEN = 336, - PARS_COMMIT_TOKEN = 337, - PARS_ROLLBACK_TOKEN = 338, - PARS_WORK_TOKEN = 339, - PARS_UNSIGNED_TOKEN = 340, - PARS_EXIT_TOKEN = 341, - PARS_FUNCTION_TOKEN = 342, - PARS_LOCK_TOKEN = 343, - PARS_SHARE_TOKEN = 344, - PARS_MODE_TOKEN = 345, - PARS_LIKE_TOKEN = 346, - PARS_LIKE_TOKEN_EXACT = 347, - PARS_LIKE_TOKEN_PREFIX = 348, - PARS_LIKE_TOKEN_SUFFIX = 349, - PARS_LIKE_TOKEN_SUBSTR = 350, - PARS_TABLE_NAME_TOKEN = 351, - PARS_COMPACT_TOKEN = 352, - PARS_BLOCK_SIZE_TOKEN = 353, - PARS_BIGINT_TOKEN = 354, - NEG = 355 + PARS_INT_TOKEN = 271, + PARS_CHAR_TOKEN = 272, + PARS_IS_TOKEN = 273, + PARS_BEGIN_TOKEN = 274, + PARS_END_TOKEN = 275, + PARS_IF_TOKEN = 276, + PARS_THEN_TOKEN = 277, + PARS_ELSE_TOKEN = 278, + PARS_ELSIF_TOKEN = 279, + PARS_LOOP_TOKEN = 280, + PARS_WHILE_TOKEN = 281, + PARS_RETURN_TOKEN = 282, + PARS_SELECT_TOKEN = 283, + PARS_COUNT_TOKEN = 284, + PARS_FROM_TOKEN = 285, + PARS_WHERE_TOKEN = 286, + PARS_FOR_TOKEN = 287, + PARS_DDOT_TOKEN = 288, + PARS_ORDER_TOKEN = 289, + PARS_BY_TOKEN = 290, + PARS_ASC_TOKEN = 291, + PARS_DESC_TOKEN = 292, + PARS_INSERT_TOKEN = 293, + PARS_INTO_TOKEN = 294, + PARS_VALUES_TOKEN = 295, + PARS_UPDATE_TOKEN = 296, + PARS_SET_TOKEN = 297, + PARS_DELETE_TOKEN = 298, + PARS_CURRENT_TOKEN = 299, + PARS_OF_TOKEN = 300, + PARS_CREATE_TOKEN = 301, + PARS_TABLE_TOKEN = 302, + PARS_INDEX_TOKEN = 303, + PARS_UNIQUE_TOKEN = 304, + PARS_CLUSTERED_TOKEN = 305, + PARS_ON_TOKEN = 306, + PARS_ASSIGN_TOKEN = 307, + PARS_DECLARE_TOKEN = 308, + PARS_CURSOR_TOKEN = 309, + PARS_SQL_TOKEN = 310, + PARS_OPEN_TOKEN = 311, + PARS_FETCH_TOKEN = 312, + PARS_CLOSE_TOKEN = 313, + PARS_NOTFOUND_TOKEN = 314, + PARS_TO_BINARY_TOKEN = 315, + PARS_SUBSTR_TOKEN = 316, + PARS_CONCAT_TOKEN = 317, + PARS_INSTR_TOKEN = 318, + PARS_LENGTH_TOKEN = 319, + PARS_COMMIT_TOKEN = 320, + PARS_ROLLBACK_TOKEN = 321, + PARS_WORK_TOKEN = 322, + PARS_EXIT_TOKEN = 323, + PARS_FUNCTION_TOKEN = 324, + PARS_LOCK_TOKEN = 325, + PARS_SHARE_TOKEN = 326, + PARS_MODE_TOKEN = 327, + PARS_LIKE_TOKEN = 328, + PARS_LIKE_TOKEN_EXACT = 329, + PARS_LIKE_TOKEN_PREFIX = 330, + PARS_LIKE_TOKEN_SUFFIX = 331, + PARS_LIKE_TOKEN_SUBSTR = 332, + PARS_TABLE_NAME_TOKEN = 333, + PARS_BIGINT_TOKEN = 334, + NEG = 335 }; #endif diff --git a/storage/innobase/include/pars0pars.h b/storage/innobase/include/pars0pars.h index f74d3700eca..f54c50e5b85 100644 --- a/storage/innobase/include/pars0pars.h +++ b/storage/innobase/include/pars0pars.h @@ -48,29 +48,15 @@ extern int yydebug; NOT re-entrant */ extern sym_tab_t* pars_sym_tab_global; -extern pars_res_word_t pars_to_char_token; -extern pars_res_word_t pars_to_number_token; extern pars_res_word_t pars_to_binary_token; -extern pars_res_word_t pars_binary_to_number_token; extern pars_res_word_t pars_substr_token; -extern pars_res_word_t pars_replstr_token; extern pars_res_word_t pars_concat_token; extern pars_res_word_t pars_length_token; extern pars_res_word_t pars_instr_token; -extern pars_res_word_t pars_sysdate_token; -extern pars_res_word_t pars_printf_token; -extern pars_res_word_t pars_assert_token; -extern pars_res_word_t pars_rnd_token; -extern pars_res_word_t pars_rnd_str_token; extern pars_res_word_t pars_count_token; -extern pars_res_word_t pars_sum_token; -extern pars_res_word_t pars_distinct_token; -extern pars_res_word_t pars_binary_token; -extern pars_res_word_t pars_blob_token; extern pars_res_word_t pars_int_token; extern pars_res_word_t pars_bigint_token; extern pars_res_word_t pars_char_token; -extern pars_res_word_t pars_float_token; extern pars_res_word_t pars_update_token; extern pars_res_word_t pars_asc_token; extern pars_res_word_t pars_desc_token; @@ -236,17 +222,6 @@ pars_insert_statement( que_node_t* values_list, /*!< in: value expression list or NULL */ sel_node_t* select); /*!< in: select condition or NULL */ /*********************************************************************//** -Parses a procedure parameter declaration. -@return own: symbol table node of type SYM_VAR */ -sym_node_t* -pars_parameter_declaration( -/*=======================*/ - sym_node_t* node, /*!< in: symbol table node allocated for the - id of the parameter */ - ulint param_type, - /*!< in: PARS_INPUT or PARS_OUTPUT */ - pars_res_word_t* type); /*!< in: pointer to a type token */ -/*********************************************************************//** Parses an elsif element. @return elsif node */ elsif_node_t* @@ -358,8 +333,6 @@ pars_column_def( pars_res_word_t* type, /*!< in: data type */ sym_node_t* len, /*!< in: length of column, or NULL */ - void* is_unsigned, /*!< in: if not NULL, column - is of type UNSIGNED. */ void* is_not_null); /*!< in: if not NULL, column is of type NOT NULL. */ /*********************************************************************//** @@ -370,9 +343,7 @@ pars_create_table( /*==============*/ sym_node_t* table_sym, /*!< in: table name node in the symbol table */ - sym_node_t* column_defs, /*!< in: list of column names */ - sym_node_t* compact, /* in: non-NULL if COMPACT table. */ - sym_node_t* block_size); /* in: block size (can be NULL) */ + sym_node_t* column_defs); /*!< in: list of column names */ /*********************************************************************//** Parses an index creation operation. @return index create subgraph */ @@ -394,7 +365,6 @@ pars_procedure_definition( /*======================*/ sym_node_t* sym_node, /*!< in: procedure id node in the symbol table */ - sym_node_t* param_list, /*!< in: parameter declaration list */ que_node_t* stat_list); /*!< in: statement list */ /*************************************************************//** @@ -672,7 +642,6 @@ struct proc_node_t{ que_common_t common; /*!< type: QUE_NODE_PROC */ sym_node_t* proc_id; /*!< procedure name symbol in the symbol table of this same procedure */ - sym_node_t* param_list; /*!< input and output parameters */ que_node_t* stat_list; /*!< statement list */ sym_tab_t* sym_tab; /*!< symbol table of this procedure */ }; @@ -747,7 +716,7 @@ struct col_assign_node_t{ #define PARS_FUNC_LOGICAL 2 /*!< AND, OR, NOT */ #define PARS_FUNC_CMP 3 /*!< comparison operators */ #define PARS_FUNC_PREDEFINED 4 /*!< TO_NUMBER, SUBSTR, ... */ -#define PARS_FUNC_AGGREGATE 5 /*!< COUNT, DISTINCT, SUM */ +#define PARS_FUNC_AGGREGATE 5 /*!< COUNT */ #define PARS_FUNC_OTHER 6 /*!< these are not real functions, e.g., := */ /* @} */ diff --git a/storage/innobase/pars/lexyy.cc b/storage/innobase/pars/lexyy.cc index e7f3981e0fe..1e93ec3ed50 100644 --- a/storage/innobase/pars/lexyy.cc +++ b/storage/innobase/pars/lexyy.cc @@ -356,8 +356,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 123 -#define YY_END_OF_BUFFER 124 +#define YY_NUM_RULES 102 +#define YY_END_OF_BUFFER 103 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -365,53 +365,42 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[404] = +static const flex_int16_t yy_accept[307] = { 0, - 0, 0, 118, 118, 0, 0, 0, 0, 124, 122, - 121, 121, 8, 122, 113, 5, 102, 108, 111, 109, - 106, 110, 122, 112, 1, 122, 107, 105, 103, 104, - 116, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 114, 115, 118, 119, 6, 7, 9, 10, 121, 4, - 97, 117, 2, 1, 3, 98, 99, 101, 100, 0, - 95, 0, 95, 95, 95, 95, 95, 44, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 28, 17, 25, 95, 95, 95, 95, + 0, 0, 97, 97, 0, 0, 0, 0, 103, 101, + 100, 100, 8, 101, 92, 5, 81, 87, 90, 88, + 85, 89, 101, 91, 1, 101, 86, 84, 82, 83, + 95, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 93, 94, 97, 98, 6, 7, 9, 10, 100, 4, + 76, 96, 2, 1, 3, 77, 78, 80, 79, 0, + 74, 0, 74, 74, 74, 74, 36, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 23, 17, 20, 74, 74, 74, 74, 74, 74, 46, - 95, 95, 54, 62, 95, 14, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 118, 119, 119, 120, 6, 7, - 9, 10, 2, 0, 96, 13, 45, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 27, 95, 95, 95, 41, - 95, 95, 95, 95, 21, 95, 95, 95, 95, 95, - 15, 95, 95, 95, 18, 95, 95, 95, 95, 95, - 81, 95, 95, 95, 51, 95, 12, 95, 36, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 52, 74, 14, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 97, 98, + 98, 99, 6, 7, 9, 10, 2, 0, 75, 13, + 37, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 22, 74, 74, 34, 74, + 74, 74, 74, 18, 74, 74, 74, 74, 74, 15, + 74, 74, 74, 74, 74, 74, 74, 43, 74, 12, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 0, 75, 74, 74, 19, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 38, 25, 74, 67, 74, - 0, 96, 95, 95, 95, 95, 20, 95, 24, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 46, 95, 30, 95, 88, 95, 95, 39, 95, 95, - 95, 95, 95, 48, 95, 93, 90, 32, 92, 95, - 11, 65, 95, 95, 95, 42, 95, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 29, 95, 95, 95, - 95, 95, 95, 95, 95, 95, 86, 0, 95, 26, - 95, 95, 95, 67, 95, 95, 95, 95, 37, 95, - 95, 95, 95, 95, 95, 31, 66, 23, 95, 59, - 95, 76, 95, 95, 95, 43, 95, 95, 95, 95, + 32, 74, 74, 74, 74, 40, 74, 72, 69, 27, + 71, 74, 11, 55, 74, 74, 74, 74, 74, 74, + 74, 74, 24, 74, 74, 74, 74, 74, 74, 66, + 0, 21, 74, 57, 74, 74, 74, 31, 74, 74, + 74, 74, 74, 26, 56, 74, 49, 74, 62, 74, + 74, 35, 74, 74, 74, 74, 70, 74, 48, 74, + 74, 74, 74, 33, 28, 0, 73, 74, 64, 61, + 47, 74, 54, 74, 44, 74, 39, 63, 74, 74, + 29, 74, 30, 60, 74, 50, 42, 41, 74, 45, + 53, 74, 74, 74, 74, 74, 74, 68, 58, 74, - 95, 95, 95, 95, 91, 95, 95, 56, 95, 95, - 95, 95, 95, 95, 95, 40, 33, 0, 80, 94, - 19, 95, 95, 84, 95, 75, 55, 95, 64, 95, - 52, 95, 95, 47, 95, 77, 95, 79, 95, 95, - 34, 95, 95, 95, 35, 73, 95, 95, 95, 95, - 60, 95, 50, 49, 95, 95, 95, 57, 53, 63, - 95, 95, 22, 95, 95, 74, 82, 95, 95, 78, - 95, 69, 95, 95, 95, 95, 95, 38, 89, 68, - 95, 85, 95, 95, 95, 87, 95, 95, 61, 16, - 95, 71, 70, 95, 58, 83, 95, 95, 95, 95, - - 95, 72, 0 + 65, 74, 51, 16, 59, 0 } ; static const YY_CHAR yy_ec[256] = @@ -424,12 +413,12 @@ static const YY_CHAR yy_ec[256] = 17, 17, 17, 17, 17, 17, 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, - 1, 1, 1, 1, 51, 1, 34, 34, 34, 34, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 34, + 1, 1, 1, 1, 50, 1, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 52, 34, 34, - 34, 34, 53, 34, 54, 34, 34, 34, 34, 34, - 34, 34, 55, 1, 56, 1, 1, 1, 1, 1, + 34, 34, 34, 34, 34, 34, 34, 51, 34, 34, + 34, 34, 52, 34, 53, 34, 34, 34, 34, 34, + 34, 34, 54, 1, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -446,418 +435,324 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[57] = +static const YY_CHAR yy_meta[56] = { 0, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 5, 1, 1, 1, 1, 6, 7, 1, 1, 1, 8, 1, 1, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 1, 1 + 9, 9, 9, 1, 1 } ; -static const flex_int16_t yy_base[417] = +static const flex_int16_t yy_base[320] = { 0, - 0, 0, 296, 281, 283, 280, 261, 252, 253, 1285, - 55, 57, 1285, 0, 1285, 1285, 1285, 1285, 1285, 1285, - 1285, 1285, 211, 213, 46, 202, 1285, 43, 1285, 199, - 1285, 46, 50, 56, 52, 66, 64, 51, 81, 92, - 91, 94, 96, 111, 113, 116, 130, 134, 53, 143, - 1285, 1285, 0, 106, 0, 206, 0, 205, 141, 0, - 1285, 1285, 177, 56, 152, 1285, 1285, 1285, 1285, 161, - 140, 147, 152, 154, 155, 161, 167, 171, 177, 172, - 184, 174, 188, 189, 191, 194, 203, 212, 217, 219, - 222, 223, 228, 224, 226, 233, 235, 239, 244, 251, + 0, 0, 262, 259, 249, 244, 239, 234, 236, 960, + 54, 56, 960, 0, 960, 960, 960, 960, 960, 960, + 960, 960, 217, 220, 45, 186, 960, 42, 960, 184, + 960, 45, 49, 55, 51, 65, 80, 50, 69, 94, + 90, 92, 104, 60, 114, 116, 131, 134, 135, 149, + 960, 960, 0, 61, 0, 194, 0, 197, 133, 0, + 960, 960, 163, 53, 143, 960, 960, 960, 960, 147, + 125, 123, 138, 151, 152, 153, 155, 166, 169, 173, + 170, 171, 176, 180, 193, 182, 200, 204, 206, 209, + 210, 211, 213, 224, 225, 226, 235, 240, 242, 245, - 256, 260, 261, 262, 265, 271, 266, 281, 277, 287, - 282, 288, 303, 306, 307, 292, 310, 321, 322, 323, - 324, 325, 335, 338, 0, 112, 173, 1285, 0, 152, - 0, 145, 130, 59, 0, 339, 341, 353, 351, 354, - 365, 367, 355, 372, 376, 383, 379, 386, 388, 385, - 398, 392, 402, 401, 414, 415, 416, 417, 426, 430, - 432, 437, 433, 439, 442, 443, 449, 456, 460, 461, - 463, 470, 472, 473, 479, 483, 485, 489, 492, 495, - 498, 499, 502, 508, 509, 514, 515, 518, 520, 527, - 530, 534, 536, 541, 543, 553, 555, 557, 559, 568, + 251, 252, 255, 256, 258, 261, 270, 274, 272, 277, + 289, 288, 276, 294, 295, 300, 304, 305, 0, 79, + 110, 960, 0, 116, 0, 113, 98, 58, 0, 306, + 315, 316, 318, 319, 322, 328, 329, 332, 334, 338, + 344, 353, 351, 354, 366, 360, 367, 369, 376, 378, + 381, 385, 388, 382, 394, 400, 403, 404, 406, 407, + 410, 417, 423, 424, 426, 429, 433, 440, 442, 443, + 444, 445, 454, 456, 459, 461, 472, 473, 474, 477, + 53, 0, 475, 478, 479, 490, 502, 504, 505, 507, + 508, 509, 511, 518, 520, 523, 524, 525, 529, 538, - 41, 0, 564, 569, 570, 573, 574, 585, 580, 589, - 586, 595, 598, 600, 605, 610, 611, 617, 620, 615, - 622, 627, 626, 631, 641, 642, 646, 647, 648, 651, - 652, 653, 657, 662, 663, 667, 669, 673, 680, 682, - 684, 685, 686, 687, 689, 696, 698, 700, 701, 703, - 699, 710, 714, 716, 729, 732, 731, 733, 735, 734, - 746, 747, 748, 752, 753, 759, 749, 39, 769, 770, - 771, 773, 774, 780, 783, 784, 787, 785, 786, 802, - 800, 803, 816, 817, 818, 819, 820, 823, 833, 835, - 836, 837, 838, 839, 848, 849, 852, 853, 854, 859, + 541, 542, 543, 545, 547, 544, 556, 557, 558, 559, + 560, 569, 572, 574, 578, 581, 579, 583, 588, 590, + 600, 601, 602, 607, 611, 613, 612, 618, 622, 629, + 41, 634, 636, 638, 639, 643, 645, 648, 649, 650, + 655, 659, 661, 660, 670, 675, 676, 679, 680, 682, + 686, 689, 691, 696, 693, 700, 705, 706, 709, 711, + 712, 716, 722, 723, 726, 72, 727, 736, 737, 738, + 739, 740, 742, 743, 752, 753, 755, 757, 758, 759, + 764, 770, 769, 771, 774, 784, 785, 786, 787, 789, + 790, 791, 796, 801, 802, 803, 806, 807, 812, 817, - 863, 870, 868, 872, 875, 884, 885, 887, 889, 890, - 888, 904, 906, 907, 908, 918, 919, 73, 921, 922, - 923, 924, 933, 934, 936, 937, 938, 939, 940, 949, - 952, 955, 953, 965, 969, 970, 971, 972, 974, 975, - 981, 984, 986, 988, 990, 991, 1000, 1006, 1004, 1009, - 1016, 1018, 1020, 1021, 1025, 1027, 1032, 1034, 1038, 1039, - 1041, 1043, 1048, 1050, 1052, 1055, 1059, 1064, 1066, 1068, - 1071, 1073, 1077, 1084, 1086, 1087, 1091, 1093, 1098, 1100, - 1102, 1104, 1105, 1111, 1114, 1116, 1117, 1118, 1120, 1127, - 1129, 1130, 1134, 1139, 1141, 1145, 1146, 1148, 1150, 1151, - - 1155, 1157, 1285, 1197, 1206, 1215, 1218, 1221, 1225, 1234, - 1243, 1252, 1261, 1268, 1272, 1275 + 816, 823, 826, 828, 832, 960, 872, 881, 890, 893, + 896, 900, 909, 918, 927, 936, 943, 947, 950 } ; -static const flex_int16_t yy_def[417] = +static const flex_int16_t yy_def[320] = { 0, - 403, 1, 404, 404, 405, 405, 406, 406, 403, 403, - 403, 403, 403, 407, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 408, 403, 403, 403, 403, - 403, 409, 409, 409, 409, 409, 34, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 403, 403, 410, 411, 412, 403, 413, 403, 403, 407, - 403, 403, 403, 403, 408, 403, 403, 403, 403, 414, - 409, 415, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, + 306, 1, 307, 307, 308, 308, 309, 309, 306, 306, + 306, 306, 306, 310, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 311, 306, 306, 306, 306, + 306, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 306, 306, 313, 314, 315, 306, 316, 306, 306, 310, + 306, 306, 306, 306, 311, 306, 306, 306, 306, 317, + 312, 318, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 410, 411, 411, 403, 412, 403, - 413, 403, 403, 403, 416, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 313, 314, + 314, 306, 315, 306, 316, 306, 306, 306, 319, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 306, 319, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, - 403, 416, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 403, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 306, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 306, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 403, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, - - 409, 409, 0, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403 + 312, 312, 312, 312, 312, 0, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306 } ; -static const flex_int16_t yy_nxt[1342] = +static const flex_int16_t yy_nxt[1016] = { 0, 10, 11, 12, 13, 10, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 10, 32, 33, 34, 35, 36, 37, 38, 38, 39, 38, 38, 40, 41, 42, 43, 44, 38, 45, 46, 47, 48, 49, 50, 38, 38, 38, - 38, 38, 38, 38, 51, 52, 59, 59, 59, 59, - 63, 70, 64, 67, 68, 70, 70, 70, 70, 72, - 63, 70, 64, 72, 72, 72, 72, 122, 75, 72, - 84, 70, 76, 73, 85, 77, 135, 79, 74, 72, - 318, 80, 89, 268, 81, 71, 70, 82, 78, 90, + 38, 38, 38, 51, 52, 59, 59, 59, 59, 63, + 70, 64, 67, 68, 70, 70, 70, 63, 72, 64, + 70, 121, 72, 72, 72, 70, 122, 75, 72, 83, + 70, 76, 73, 72, 70, 129, 78, 74, 72, 306, + 79, 266, 72, 80, 306, 70, 81, 77, 91, 82, - 83, 86, 91, 87, 72, 92, 70, 70, 93, 70, - 94, 70, 201, 88, 72, 72, 127, 72, 95, 72, - 97, 128, 403, 96, 98, 103, 70, 403, 70, 100, - 99, 70, 101, 104, 72, 105, 72, 106, 102, 72, - 107, 109, 59, 59, 112, 70, 133, 113, 132, 70, - 110, 111, 108, 72, 117, 70, 114, 72, 70, 130, - 115, 118, 70, 72, 116, 134, 72, 70, 119, 70, - 70, 120, 403, 121, 123, 72, 70, 72, 72, 136, - 137, 124, 70, 127, 72, 139, 70, 70, 128, 70, - 72, 140, 70, 133, 72, 72, 138, 72, 141, 70, + 84, 104, 85, 72, 231, 70, 92, 70, 87, 70, + 181, 93, 86, 72, 127, 72, 126, 72, 88, 70, + 121, 89, 94, 124, 90, 122, 95, 72, 97, 70, + 98, 70, 96, 100, 59, 59, 99, 72, 70, 72, + 70, 101, 105, 102, 107, 103, 70, 108, 72, 70, + 70, 128, 106, 70, 72, 111, 109, 72, 72, 116, + 110, 72, 112, 306, 70, 130, 70, 70, 70, 113, + 70, 114, 72, 115, 72, 72, 72, 131, 72, 127, + 117, 70, 132, 133, 70, 70, 70, 118, 70, 72, + 134, 70, 72, 72, 72, 70, 72, 70, 140, 72, - 72, 143, 149, 70, 70, 142, 70, 72, 132, 70, - 144, 72, 72, 130, 72, 151, 145, 72, 70, 69, - 146, 147, 66, 62, 152, 61, 72, 70, 148, 150, - 156, 153, 70, 154, 70, 72, 155, 70, 70, 70, - 72, 70, 72, 70, 157, 72, 72, 72, 70, 72, - 70, 72, 403, 163, 70, 58, 72, 159, 72, 70, - 158, 161, 72, 160, 58, 162, 70, 72, 164, 165, - 168, 70, 166, 167, 72, 70, 70, 70, 170, 72, - 70, 70, 169, 72, 72, 72, 70, 56, 72, 72, - 56, 54, 70, 173, 72, 172, 70, 70, 174, 171, + 126, 124, 142, 72, 69, 72, 66, 135, 70, 137, + 138, 143, 141, 136, 147, 70, 72, 139, 144, 70, + 146, 70, 145, 72, 70, 70, 70, 72, 70, 72, + 62, 61, 72, 72, 72, 306, 72, 58, 152, 70, + 70, 70, 58, 148, 150, 149, 151, 72, 72, 72, + 70, 56, 157, 153, 154, 70, 56, 70, 72, 156, + 70, 155, 159, 72, 158, 72, 70, 70, 72, 54, + 70, 70, 54, 70, 72, 72, 70, 161, 72, 72, + 162, 72, 163, 160, 72, 70, 306, 70, 306, 70, + 306, 70, 70, 72, 164, 72, 166, 72, 169, 72, - 72, 178, 70, 70, 72, 72, 54, 70, 403, 175, - 72, 72, 403, 176, 181, 72, 179, 182, 70, 177, - 180, 70, 70, 184, 403, 70, 72, 186, 183, 72, - 72, 185, 188, 72, 190, 191, 70, 70, 70, 70, - 70, 187, 403, 189, 72, 72, 72, 72, 72, 192, - 70, 196, 403, 70, 70, 194, 70, 403, 72, 403, - 197, 72, 72, 198, 72, 195, 70, 199, 70, 70, - 70, 403, 193, 403, 72, 403, 72, 72, 72, 200, - 70, 203, 70, 204, 403, 403, 205, 70, 72, 206, - 72, 70, 207, 208, 70, 72, 209, 403, 70, 72, + 72, 165, 171, 70, 70, 167, 306, 170, 306, 70, + 70, 72, 72, 168, 172, 70, 173, 72, 72, 70, + 70, 70, 176, 72, 306, 174, 175, 72, 72, 72, + 70, 70, 178, 70, 70, 177, 179, 70, 72, 72, + 306, 72, 72, 70, 70, 72, 180, 70, 183, 70, + 184, 72, 72, 70, 306, 72, 306, 72, 189, 70, + 185, 72, 191, 306, 186, 188, 70, 72, 70, 70, + 187, 190, 306, 306, 72, 70, 72, 72, 306, 195, + 196, 70, 70, 72, 70, 192, 193, 306, 194, 72, + 72, 70, 72, 70, 197, 200, 70, 70, 198, 72, - 70, 70, 72, 70, 403, 214, 72, 70, 72, 72, - 403, 72, 216, 70, 210, 72, 70, 70, 211, 212, - 220, 72, 213, 215, 72, 72, 217, 218, 221, 70, - 70, 70, 70, 219, 403, 403, 403, 72, 72, 72, - 72, 70, 223, 226, 222, 70, 224, 70, 70, 72, - 227, 403, 70, 72, 70, 72, 72, 70, 70, 225, - 72, 230, 72, 229, 70, 72, 72, 231, 228, 403, - 233, 70, 72, 235, 403, 70, 70, 236, 70, 72, - 234, 403, 232, 72, 72, 70, 72, 70, 70, 239, - 237, 403, 240, 72, 70, 72, 72, 403, 70, 238, + 70, 72, 306, 70, 72, 72, 306, 202, 72, 70, + 199, 72, 306, 203, 201, 70, 204, 72, 70, 70, + 206, 70, 70, 72, 207, 70, 72, 72, 208, 72, + 72, 205, 70, 72, 211, 306, 212, 209, 70, 70, + 72, 70, 306, 210, 70, 213, 72, 72, 70, 72, + 216, 215, 72, 306, 214, 70, 72, 70, 70, 70, + 70, 219, 306, 72, 218, 72, 72, 72, 72, 70, + 217, 70, 306, 306, 70, 306, 70, 72, 306, 72, + 222, 224, 72, 220, 72, 226, 221, 70, 70, 70, + 70, 223, 70, 70, 70, 72, 72, 72, 72, 225, - 70, 243, 72, 403, 70, 241, 72, 70, 72, 242, - 70, 245, 72, 70, 70, 72, 246, 70, 72, 403, - 244, 72, 72, 70, 70, 72, 403, 247, 403, 70, - 70, 72, 72, 70, 250, 70, 252, 72, 72, 248, - 403, 72, 70, 72, 403, 70, 403, 403, 249, 70, - 72, 70, 251, 72, 255, 253, 70, 72, 70, 72, - 254, 258, 259, 403, 72, 256, 72, 403, 70, 403, - 70, 257, 70, 260, 70, 262, 72, 263, 72, 70, - 72, 261, 72, 70, 70, 70, 403, 72, 70, 70, - 403, 72, 72, 72, 266, 70, 72, 72, 265, 264, + 72, 72, 72, 306, 306, 70, 306, 306, 306, 229, + 306, 230, 232, 72, 228, 233, 227, 70, 234, 70, + 70, 306, 70, 70, 70, 72, 70, 72, 72, 237, + 72, 72, 72, 70, 72, 70, 236, 240, 70, 70, + 70, 72, 242, 72, 70, 235, 72, 72, 72, 241, + 238, 239, 72, 70, 244, 306, 70, 70, 70, 70, + 70, 72, 70, 243, 72, 72, 72, 72, 72, 245, + 72, 70, 70, 70, 70, 70, 306, 306, 306, 72, + 72, 72, 72, 72, 70, 246, 248, 70, 249, 70, + 247, 306, 72, 70, 70, 72, 70, 72, 70, 250, - 70, 70, 267, 72, 70, 269, 270, 271, 72, 72, - 70, 403, 72, 70, 272, 70, 403, 274, 72, 273, - 70, 72, 277, 72, 278, 70, 70, 276, 72, 275, - 70, 403, 70, 72, 72, 70, 403, 70, 72, 281, - 72, 70, 70, 72, 283, 72, 70, 403, 279, 72, - 72, 403, 403, 280, 72, 282, 70, 70, 284, 285, - 286, 70, 70, 70, 72, 72, 70, 70, 70, 72, - 72, 72, 70, 287, 72, 72, 72, 70, 70, 403, - 72, 403, 70, 403, 70, 72, 72, 293, 70, 288, - 72, 289, 72, 291, 292, 70, 72, 70, 290, 70, + 306, 72, 72, 70, 72, 70, 72, 251, 255, 253, + 306, 72, 306, 72, 256, 70, 70, 70, 257, 252, + 254, 306, 70, 72, 72, 72, 70, 70, 70, 259, + 72, 306, 306, 70, 72, 72, 72, 70, 306, 260, + 263, 72, 306, 258, 70, 72, 264, 306, 306, 70, + 265, 70, 72, 70, 70, 261, 262, 72, 70, 72, + 70, 72, 72, 70, 70, 70, 72, 268, 72, 306, + 70, 72, 72, 72, 70, 70, 70, 271, 72, 267, + 306, 306, 72, 72, 72, 70, 269, 272, 270, 275, + 70, 70, 306, 72, 70, 70, 273, 70, 72, 72, - 70, 70, 70, 72, 70, 72, 294, 72, 72, 72, - 72, 70, 72, 70, 70, 70, 70, 298, 70, 72, - 295, 72, 72, 72, 72, 70, 72, 296, 302, 70, - 297, 70, 403, 72, 403, 403, 304, 72, 303, 72, - 299, 300, 305, 301, 70, 403, 70, 70, 70, 70, - 70, 403, 72, 307, 72, 72, 72, 72, 72, 306, - 308, 70, 70, 70, 70, 309, 310, 70, 70, 72, - 72, 72, 72, 403, 70, 72, 72, 313, 311, 403, - 315, 316, 72, 403, 70, 70, 70, 317, 70, 70, - 312, 314, 72, 72, 72, 70, 72, 72, 70, 70, + 274, 70, 72, 72, 70, 72, 70, 276, 70, 72, + 306, 70, 72, 278, 72, 70, 72, 282, 280, 72, + 70, 70, 277, 72, 70, 306, 70, 70, 72, 72, + 279, 70, 72, 281, 72, 72, 306, 70, 70, 72, + 286, 70, 70, 283, 287, 72, 72, 284, 285, 72, + 72, 70, 70, 70, 70, 70, 306, 70, 70, 72, + 72, 72, 72, 72, 288, 72, 72, 70, 70, 306, + 70, 291, 70, 70, 70, 72, 72, 289, 72, 70, + 72, 72, 72, 290, 70, 70, 70, 72, 306, 70, + 306, 292, 72, 72, 72, 293, 295, 72, 296, 70, - 70, 70, 70, 72, 403, 403, 72, 72, 72, 72, - 72, 323, 319, 325, 320, 70, 403, 70, 70, 403, - 403, 321, 403, 72, 322, 72, 72, 324, 326, 403, - 327, 70, 70, 70, 70, 70, 403, 328, 70, 72, - 72, 72, 72, 72, 329, 331, 72, 403, 70, 403, - 70, 70, 70, 70, 70, 332, 72, 330, 72, 72, - 72, 72, 72, 70, 70, 333, 335, 70, 70, 70, - 336, 72, 72, 403, 70, 72, 72, 72, 70, 334, - 339, 338, 72, 70, 403, 70, 72, 70, 403, 403, - 70, 72, 337, 72, 343, 72, 341, 340, 72, 70, + 70, 70, 70, 294, 70, 70, 70, 72, 72, 72, + 72, 70, 72, 72, 72, 297, 70, 70, 70, 72, + 306, 70, 70, 299, 72, 72, 72, 70, 298, 72, + 72, 70, 70, 303, 306, 72, 301, 306, 70, 72, + 72, 70, 300, 70, 302, 304, 72, 70, 306, 72, + 306, 72, 306, 306, 306, 72, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 305, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 60, - 70, 403, 70, 70, 70, 70, 342, 72, 72, 344, - 72, 72, 72, 72, 349, 345, 403, 403, 403, 70, - 403, 70, 70, 70, 350, 346, 348, 72, 347, 72, - 72, 72, 351, 70, 70, 353, 70, 70, 70, 70, - 403, 72, 72, 352, 72, 72, 72, 72, 70, 70, - 354, 70, 70, 70, 70, 70, 72, 72, 403, 72, - 72, 72, 72, 72, 70, 403, 356, 70, 70, 403, - 70, 403, 72, 355, 357, 72, 72, 360, 72, 358, - 70, 361, 359, 403, 70, 70, 70, 70, 72, 70, - 70, 362, 72, 72, 72, 72, 70, 72, 72, 70, + 306, 60, 65, 65, 65, 71, 71, 306, 71, 119, + 119, 119, 119, 306, 119, 119, 119, 119, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 123, 123, 123, + 306, 123, 123, 123, 123, 123, 125, 306, 125, 125, + 125, 125, 125, 125, 125, 129, 306, 306, 306, 306, + 306, 129, 72, 72, 306, 72, 182, 306, 182, 9, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 403, 70, 403, 70, 72, 70, 70, 72, 364, 72, - 363, 72, 368, 72, 72, 70, 366, 403, 365, 70, - 369, 70, 403, 72, 70, 367, 403, 72, 370, 72, - 371, 70, 72, 70, 373, 70, 70, 403, 403, 72, - 70, 72, 70, 72, 72, 372, 374, 70, 72, 70, - 72, 403, 403, 70, 70, 72, 70, 72, 70, 376, - 377, 72, 72, 70, 72, 70, 72, 70, 375, 403, - 70, 72, 403, 72, 70, 72, 403, 380, 72, 70, - 379, 70, 72, 70, 378, 403, 70, 72, 70, 72, - 403, 72, 70, 381, 72, 403, 72, 403, 382, 70, - - 72, 70, 70, 383, 403, 385, 70, 72, 70, 72, - 72, 386, 384, 70, 72, 70, 72, 70, 389, 70, - 70, 72, 403, 72, 387, 72, 70, 72, 72, 70, - 390, 70, 70, 70, 72, 70, 388, 72, 403, 72, - 72, 72, 70, 72, 70, 70, 395, 403, 391, 70, - 72, 403, 72, 72, 70, 393, 70, 72, 396, 392, - 70, 70, 72, 70, 72, 70, 70, 394, 72, 72, - 70, 72, 70, 72, 72, 400, 397, 403, 72, 401, - 72, 403, 403, 403, 399, 403, 403, 403, 403, 403, - 398, 403, 403, 403, 403, 403, 402, 53, 53, 53, - - 53, 53, 53, 53, 53, 53, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 60, 403, 60, 65, 65, 65, - 71, 71, 403, 71, 125, 125, 125, 125, 403, 125, - 125, 125, 125, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 129, 129, 129, 403, 129, 129, 129, 129, - 129, 131, 403, 131, 131, 131, 131, 131, 131, 131, - 135, 403, 403, 403, 403, 403, 135, 72, 72, 403, - 72, 202, 403, 202, 9, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403 + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306 } ; -static const flex_int16_t yy_chk[1342] = +static const flex_int16_t yy_chk[1016] = { 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, 11, 11, 12, 12, - 25, 32, 25, 28, 28, 33, 38, 35, 49, 32, - 64, 34, 64, 33, 38, 35, 49, 49, 33, 34, - 35, 36, 33, 32, 35, 33, 318, 34, 32, 36, - 268, 34, 37, 201, 34, 37, 39, 34, 33, 37, + 1, 1, 1, 1, 1, 11, 11, 12, 12, 25, + 32, 25, 28, 28, 33, 38, 35, 64, 32, 64, + 34, 54, 33, 38, 35, 44, 54, 33, 34, 35, + 36, 33, 32, 44, 39, 266, 34, 32, 36, 120, + 34, 231, 39, 34, 120, 37, 34, 33, 39, 34, - 34, 36, 37, 36, 39, 37, 41, 40, 37, 42, - 39, 43, 134, 36, 41, 40, 54, 42, 39, 43, - 40, 54, 126, 39, 40, 43, 44, 126, 45, 41, - 40, 46, 42, 43, 44, 43, 45, 43, 42, 46, - 43, 45, 59, 59, 46, 47, 133, 46, 132, 48, - 45, 45, 44, 47, 47, 71, 46, 48, 50, 130, - 46, 47, 72, 71, 46, 70, 50, 73, 47, 74, - 75, 48, 65, 48, 50, 73, 76, 74, 75, 73, - 74, 50, 77, 127, 76, 75, 78, 80, 127, 82, - 77, 76, 79, 63, 78, 80, 74, 82, 76, 81, + 36, 44, 36, 37, 181, 41, 39, 42, 37, 40, + 128, 39, 36, 41, 127, 42, 126, 40, 37, 43, + 121, 37, 40, 124, 37, 121, 40, 43, 41, 45, + 42, 46, 40, 43, 59, 59, 42, 45, 72, 46, + 71, 43, 45, 43, 46, 43, 47, 46, 71, 48, + 49, 70, 45, 73, 47, 47, 46, 48, 49, 49, + 46, 73, 47, 65, 50, 73, 74, 75, 76, 47, + 77, 48, 50, 48, 74, 75, 76, 74, 77, 63, + 50, 78, 75, 76, 79, 81, 82, 50, 80, 78, + 78, 83, 79, 81, 82, 84, 80, 86, 81, 83, - 79, 79, 82, 83, 84, 77, 85, 81, 58, 86, - 80, 83, 84, 56, 85, 84, 80, 86, 87, 30, - 81, 81, 26, 24, 84, 23, 87, 88, 81, 83, - 87, 84, 89, 85, 90, 88, 86, 91, 92, 94, - 89, 95, 90, 93, 88, 91, 92, 94, 96, 95, - 97, 93, 9, 95, 98, 8, 96, 90, 97, 99, - 89, 92, 98, 91, 7, 93, 100, 99, 95, 95, - 99, 101, 97, 98, 100, 102, 103, 104, 100, 101, - 105, 107, 99, 102, 103, 104, 106, 6, 105, 107, - 5, 4, 109, 105, 106, 102, 108, 111, 106, 101, + 58, 56, 83, 84, 30, 86, 26, 79, 85, 80, + 80, 83, 82, 79, 86, 87, 85, 80, 83, 88, + 85, 89, 84, 87, 90, 91, 92, 88, 93, 89, + 24, 23, 90, 91, 92, 9, 93, 8, 92, 94, + 95, 96, 7, 87, 89, 88, 90, 94, 95, 96, + 97, 6, 96, 92, 92, 98, 5, 99, 97, 95, + 100, 94, 97, 98, 96, 99, 101, 102, 100, 4, + 103, 104, 3, 105, 101, 102, 106, 99, 103, 104, + 102, 105, 103, 98, 106, 107, 0, 109, 0, 108, + 0, 113, 110, 107, 104, 109, 106, 108, 108, 113, - 109, 109, 110, 112, 108, 111, 3, 116, 0, 107, - 110, 112, 0, 108, 110, 116, 109, 111, 113, 108, - 109, 114, 115, 112, 0, 117, 113, 113, 111, 114, - 115, 112, 115, 117, 116, 117, 118, 119, 120, 121, - 122, 114, 0, 115, 118, 119, 120, 121, 122, 118, - 123, 121, 0, 124, 136, 120, 137, 0, 123, 0, - 122, 124, 136, 123, 137, 120, 139, 123, 138, 140, - 143, 0, 119, 0, 139, 0, 138, 140, 143, 124, - 141, 138, 142, 139, 0, 0, 140, 144, 141, 141, - 142, 145, 142, 142, 147, 144, 143, 0, 146, 145, + 110, 105, 110, 112, 111, 107, 0, 109, 0, 114, + 115, 112, 111, 107, 111, 116, 112, 114, 115, 117, + 118, 130, 115, 116, 0, 113, 114, 117, 118, 130, + 131, 132, 117, 133, 134, 116, 117, 135, 131, 132, + 0, 133, 134, 136, 137, 135, 118, 138, 132, 139, + 133, 136, 137, 140, 0, 138, 0, 139, 138, 141, + 134, 140, 140, 0, 135, 137, 143, 141, 142, 144, + 136, 139, 0, 0, 143, 146, 142, 144, 0, 143, + 144, 145, 147, 146, 148, 141, 141, 0, 142, 145, + 147, 149, 148, 150, 145, 148, 151, 154, 145, 149, - 150, 148, 147, 149, 0, 147, 146, 152, 150, 148, - 0, 149, 149, 151, 144, 152, 154, 153, 145, 146, - 152, 151, 146, 148, 154, 153, 150, 150, 153, 155, - 156, 157, 158, 151, 0, 0, 0, 155, 156, 157, - 158, 159, 155, 158, 154, 160, 155, 161, 163, 159, - 159, 0, 162, 160, 164, 161, 163, 165, 166, 157, - 162, 163, 164, 162, 167, 165, 166, 164, 161, 0, - 165, 168, 167, 166, 0, 169, 170, 167, 171, 168, - 165, 0, 164, 169, 170, 172, 171, 173, 174, 170, - 168, 0, 171, 172, 175, 173, 174, 0, 176, 169, + 152, 150, 0, 153, 151, 154, 0, 151, 152, 155, + 147, 153, 0, 152, 150, 156, 153, 155, 157, 158, + 154, 159, 160, 156, 155, 161, 157, 158, 156, 159, + 160, 153, 162, 161, 159, 0, 160, 157, 163, 164, + 162, 165, 0, 158, 166, 161, 163, 164, 167, 165, + 164, 163, 166, 0, 162, 168, 167, 169, 170, 171, + 172, 167, 0, 168, 166, 169, 170, 171, 172, 173, + 165, 174, 0, 0, 175, 0, 176, 173, 0, 174, + 172, 174, 175, 169, 176, 176, 171, 177, 178, 179, + 183, 173, 180, 184, 185, 177, 178, 179, 183, 175, - 177, 174, 175, 0, 178, 172, 176, 179, 177, 173, - 180, 177, 178, 181, 182, 179, 178, 183, 180, 0, - 176, 181, 182, 184, 185, 183, 0, 179, 0, 186, - 187, 184, 185, 188, 182, 189, 184, 186, 187, 180, - 0, 188, 190, 189, 0, 191, 0, 0, 181, 192, - 190, 193, 183, 191, 190, 186, 194, 192, 195, 193, - 188, 193, 193, 0, 194, 191, 195, 0, 196, 0, - 197, 192, 198, 193, 199, 195, 196, 196, 197, 203, - 198, 194, 199, 200, 204, 205, 0, 203, 206, 207, - 0, 200, 204, 205, 199, 209, 206, 207, 198, 197, + 180, 184, 185, 0, 0, 186, 0, 0, 0, 179, + 0, 180, 183, 186, 178, 184, 177, 187, 186, 188, + 189, 0, 190, 191, 192, 187, 193, 188, 189, 189, + 190, 191, 192, 194, 193, 195, 188, 192, 196, 197, + 198, 194, 194, 195, 199, 187, 196, 197, 198, 193, + 190, 191, 199, 200, 198, 0, 201, 202, 203, 206, + 204, 200, 205, 195, 201, 202, 203, 206, 204, 200, + 205, 207, 208, 209, 210, 211, 0, 0, 0, 207, + 208, 209, 210, 211, 212, 202, 204, 213, 205, 214, + 203, 0, 212, 215, 217, 213, 216, 214, 218, 207, - 208, 211, 200, 209, 210, 203, 204, 205, 208, 211, - 212, 0, 210, 213, 206, 214, 0, 210, 212, 208, - 215, 213, 213, 214, 214, 216, 217, 212, 215, 211, - 220, 0, 218, 216, 217, 219, 0, 221, 220, 217, - 218, 223, 222, 219, 219, 221, 224, 0, 215, 223, - 222, 0, 0, 216, 224, 218, 225, 226, 220, 222, - 224, 227, 228, 229, 225, 226, 230, 231, 232, 227, - 228, 229, 233, 226, 230, 231, 232, 234, 235, 0, - 233, 0, 236, 0, 237, 234, 235, 233, 238, 227, - 236, 229, 237, 231, 232, 239, 238, 240, 230, 241, + 0, 215, 217, 219, 216, 220, 218, 212, 218, 216, + 0, 219, 0, 220, 219, 221, 222, 223, 220, 215, + 217, 0, 224, 221, 222, 223, 225, 227, 226, 222, + 224, 0, 0, 228, 225, 227, 226, 229, 0, 224, + 227, 228, 0, 221, 230, 229, 228, 0, 0, 232, + 229, 233, 230, 234, 235, 225, 226, 232, 236, 233, + 237, 234, 235, 238, 239, 240, 236, 235, 237, 0, + 241, 238, 239, 240, 242, 244, 243, 239, 241, 233, + 0, 0, 242, 244, 243, 245, 236, 240, 237, 243, + 246, 247, 0, 245, 248, 249, 241, 250, 246, 247, - 242, 243, 244, 239, 245, 240, 235, 241, 242, 243, - 244, 246, 245, 247, 251, 248, 249, 245, 250, 246, - 240, 247, 251, 248, 249, 252, 250, 243, 250, 253, - 244, 254, 0, 252, 0, 0, 252, 253, 251, 254, - 247, 248, 253, 249, 255, 0, 257, 256, 258, 260, - 259, 0, 255, 255, 257, 256, 258, 260, 259, 254, - 256, 261, 262, 263, 267, 258, 259, 264, 265, 261, - 262, 263, 267, 0, 266, 264, 265, 262, 260, 0, - 264, 265, 266, 0, 269, 270, 271, 266, 272, 273, - 261, 263, 269, 270, 271, 274, 272, 273, 275, 276, + 242, 251, 248, 249, 252, 250, 253, 246, 255, 251, + 0, 254, 252, 250, 253, 256, 255, 255, 253, 254, + 257, 258, 248, 256, 259, 0, 260, 261, 257, 258, + 251, 262, 259, 254, 260, 261, 0, 263, 264, 262, + 261, 265, 267, 256, 262, 263, 264, 258, 260, 265, + 267, 268, 269, 270, 271, 272, 0, 273, 274, 268, + 269, 270, 271, 272, 263, 273, 274, 275, 276, 0, + 277, 274, 278, 279, 280, 275, 276, 268, 277, 281, + 278, 279, 280, 272, 283, 282, 284, 281, 0, 285, + 0, 276, 283, 282, 284, 279, 282, 285, 285, 286, - 278, 279, 277, 274, 0, 0, 275, 276, 278, 279, - 277, 275, 269, 277, 271, 281, 0, 280, 282, 0, - 0, 272, 0, 281, 273, 280, 282, 276, 278, 0, - 280, 283, 284, 285, 286, 287, 0, 281, 288, 283, - 284, 285, 286, 287, 282, 284, 288, 0, 289, 0, - 290, 291, 292, 293, 294, 285, 289, 283, 290, 291, - 292, 293, 294, 295, 296, 289, 293, 297, 298, 299, - 294, 295, 296, 0, 300, 297, 298, 299, 301, 291, - 298, 297, 300, 303, 0, 302, 301, 304, 0, 0, - 305, 303, 295, 302, 302, 304, 300, 299, 305, 306, + 287, 288, 289, 280, 290, 291, 292, 286, 287, 288, + 289, 293, 290, 291, 292, 289, 294, 295, 296, 293, + 0, 297, 298, 293, 294, 295, 296, 299, 292, 297, + 298, 301, 300, 297, 0, 299, 295, 0, 302, 301, + 300, 303, 294, 304, 296, 300, 302, 305, 0, 303, + 0, 304, 0, 0, 0, 305, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 302, 307, 307, 307, 307, 307, 307, 307, 307, + 307, 308, 308, 308, 308, 308, 308, 308, 308, 308, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 310, - 307, 0, 308, 311, 309, 310, 301, 306, 307, 303, - 308, 311, 309, 310, 310, 304, 0, 0, 0, 312, - 0, 313, 314, 315, 311, 306, 309, 312, 307, 313, - 314, 315, 312, 316, 317, 314, 319, 320, 321, 322, - 0, 316, 317, 313, 319, 320, 321, 322, 323, 324, - 315, 325, 326, 327, 328, 329, 323, 324, 0, 325, - 326, 327, 328, 329, 330, 0, 322, 331, 333, 0, - 332, 0, 330, 321, 323, 331, 333, 330, 332, 325, - 334, 332, 328, 0, 335, 336, 337, 338, 334, 339, - 340, 333, 335, 336, 337, 338, 341, 339, 340, 342, + 0, 310, 311, 311, 311, 312, 312, 0, 312, 313, + 313, 313, 313, 0, 313, 313, 313, 313, 314, 314, + 314, 314, 314, 314, 314, 314, 314, 315, 315, 315, + 0, 315, 315, 315, 315, 315, 316, 0, 316, 316, + 316, 316, 316, 316, 316, 317, 0, 0, 0, 0, + 0, 317, 318, 318, 0, 318, 319, 0, 319, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, - 0, 343, 0, 344, 341, 345, 346, 342, 337, 343, - 335, 344, 343, 345, 346, 347, 340, 0, 339, 349, - 344, 348, 0, 347, 350, 342, 0, 349, 347, 348, - 348, 351, 350, 352, 350, 353, 354, 0, 0, 351, - 355, 352, 356, 353, 354, 349, 352, 357, 355, 358, - 356, 0, 0, 359, 360, 357, 361, 358, 362, 356, - 357, 359, 360, 363, 361, 364, 362, 365, 355, 0, - 366, 363, 0, 364, 367, 365, 0, 364, 366, 368, - 362, 369, 367, 370, 361, 0, 371, 368, 372, 369, - 0, 370, 373, 365, 371, 0, 372, 0, 368, 374, - - 373, 375, 376, 369, 0, 373, 377, 374, 378, 375, - 376, 374, 371, 379, 377, 380, 378, 381, 377, 382, - 383, 379, 0, 380, 375, 381, 384, 382, 383, 385, - 381, 386, 387, 388, 384, 389, 376, 385, 0, 386, - 387, 388, 390, 389, 391, 392, 388, 0, 383, 393, - 390, 0, 391, 392, 394, 385, 395, 393, 391, 384, - 396, 397, 394, 398, 395, 399, 400, 387, 396, 397, - 401, 398, 402, 399, 400, 399, 394, 0, 401, 400, - 402, 0, 0, 0, 398, 0, 0, 0, 0, 0, - 397, 0, 0, 0, 0, 0, 401, 404, 404, 404, - - 404, 404, 404, 404, 404, 404, 405, 405, 405, 405, - 405, 405, 405, 405, 405, 406, 406, 406, 406, 406, - 406, 406, 406, 406, 407, 0, 407, 408, 408, 408, - 409, 409, 0, 409, 410, 410, 410, 410, 0, 410, - 410, 410, 410, 411, 411, 411, 411, 411, 411, 411, - 411, 411, 412, 412, 412, 0, 412, 412, 412, 412, - 412, 413, 0, 413, 413, 413, 413, 413, 413, 413, - 414, 0, 0, 0, 0, 0, 414, 415, 415, 0, - 415, 416, 0, 416, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403 + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306 } ; static yy_state_type yy_last_accepting_state; @@ -961,9 +856,9 @@ string_append( stringbuf_len += len; } -#line 964 "lexyy.cc" +#line 859 "lexyy.cc" -#line 966 "lexyy.cc" +#line 861 "lexyy.cc" #define INITIAL 0 #define comment 1 @@ -1184,7 +1079,7 @@ YY_DECL #line 112 "pars0lex.l" -#line 1187 "lexyy.cc" +#line 1082 "lexyy.cc" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1211,13 +1106,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 404 ) + if ( yy_current_state >= 307 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 403 ); + while ( yy_current_state != 306 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1436,544 +1331,397 @@ case 18: YY_RULE_SETUP #line 252 "pars0lex.l" { - return(PARS_OUT_TOKEN); + return(PARS_INT_TOKEN); } YY_BREAK case 19: YY_RULE_SETUP #line 256 "pars0lex.l" { - return(PARS_BINARY_TOKEN); + return(PARS_CHAR_TOKEN); } YY_BREAK case 20: YY_RULE_SETUP #line 260 "pars0lex.l" { - return(PARS_BLOB_TOKEN); + return(PARS_IS_TOKEN); } YY_BREAK case 21: YY_RULE_SETUP #line 264 "pars0lex.l" { - return(PARS_INT_TOKEN); + return(PARS_BEGIN_TOKEN); } YY_BREAK case 22: YY_RULE_SETUP #line 268 "pars0lex.l" { - return(PARS_INT_TOKEN); + return(PARS_END_TOKEN); } YY_BREAK case 23: YY_RULE_SETUP #line 272 "pars0lex.l" { - return(PARS_FLOAT_TOKEN); + return(PARS_IF_TOKEN); } YY_BREAK case 24: YY_RULE_SETUP #line 276 "pars0lex.l" { - return(PARS_CHAR_TOKEN); + return(PARS_THEN_TOKEN); } YY_BREAK case 25: YY_RULE_SETUP #line 280 "pars0lex.l" { - return(PARS_IS_TOKEN); + return(PARS_ELSE_TOKEN); } YY_BREAK case 26: YY_RULE_SETUP #line 284 "pars0lex.l" { - return(PARS_BEGIN_TOKEN); + return(PARS_ELSIF_TOKEN); } YY_BREAK case 27: YY_RULE_SETUP #line 288 "pars0lex.l" { - return(PARS_END_TOKEN); + return(PARS_LOOP_TOKEN); } YY_BREAK case 28: YY_RULE_SETUP #line 292 "pars0lex.l" { - return(PARS_IF_TOKEN); + return(PARS_WHILE_TOKEN); } YY_BREAK case 29: YY_RULE_SETUP #line 296 "pars0lex.l" { - return(PARS_THEN_TOKEN); + return(PARS_RETURN_TOKEN); } YY_BREAK case 30: YY_RULE_SETUP #line 300 "pars0lex.l" { - return(PARS_ELSE_TOKEN); + return(PARS_SELECT_TOKEN); } YY_BREAK case 31: YY_RULE_SETUP #line 304 "pars0lex.l" { - return(PARS_ELSIF_TOKEN); + return(PARS_COUNT_TOKEN); } YY_BREAK case 32: YY_RULE_SETUP #line 308 "pars0lex.l" { - return(PARS_LOOP_TOKEN); + return(PARS_FROM_TOKEN); } YY_BREAK case 33: YY_RULE_SETUP #line 312 "pars0lex.l" { - return(PARS_WHILE_TOKEN); + return(PARS_WHERE_TOKEN); } YY_BREAK case 34: YY_RULE_SETUP #line 316 "pars0lex.l" { - return(PARS_RETURN_TOKEN); + return(PARS_FOR_TOKEN); } YY_BREAK case 35: YY_RULE_SETUP #line 320 "pars0lex.l" { - return(PARS_SELECT_TOKEN); + return(PARS_ORDER_TOKEN); } YY_BREAK case 36: YY_RULE_SETUP #line 324 "pars0lex.l" { - return(PARS_SUM_TOKEN); + return(PARS_BY_TOKEN); } YY_BREAK case 37: YY_RULE_SETUP #line 328 "pars0lex.l" { - return(PARS_COUNT_TOKEN); + return(PARS_ASC_TOKEN); } YY_BREAK case 38: YY_RULE_SETUP #line 332 "pars0lex.l" { - return(PARS_DISTINCT_TOKEN); + return(PARS_DESC_TOKEN); } YY_BREAK case 39: YY_RULE_SETUP #line 336 "pars0lex.l" { - return(PARS_FROM_TOKEN); + return(PARS_INSERT_TOKEN); } YY_BREAK case 40: YY_RULE_SETUP #line 340 "pars0lex.l" { - return(PARS_WHERE_TOKEN); + return(PARS_INTO_TOKEN); } YY_BREAK case 41: YY_RULE_SETUP #line 344 "pars0lex.l" { - return(PARS_FOR_TOKEN); + return(PARS_VALUES_TOKEN); } YY_BREAK case 42: YY_RULE_SETUP #line 348 "pars0lex.l" { - return(PARS_READ_TOKEN); + return(PARS_UPDATE_TOKEN); } YY_BREAK case 43: YY_RULE_SETUP #line 352 "pars0lex.l" { - return(PARS_ORDER_TOKEN); + return(PARS_SET_TOKEN); } YY_BREAK case 44: YY_RULE_SETUP #line 356 "pars0lex.l" { - return(PARS_BY_TOKEN); + return(PARS_DELETE_TOKEN); } YY_BREAK case 45: YY_RULE_SETUP #line 360 "pars0lex.l" { - return(PARS_ASC_TOKEN); + return(PARS_CURRENT_TOKEN); } YY_BREAK case 46: YY_RULE_SETUP #line 364 "pars0lex.l" { - return(PARS_DESC_TOKEN); + return(PARS_OF_TOKEN); } YY_BREAK case 47: YY_RULE_SETUP #line 368 "pars0lex.l" { - return(PARS_INSERT_TOKEN); + return(PARS_CREATE_TOKEN); } YY_BREAK case 48: YY_RULE_SETUP #line 372 "pars0lex.l" { - return(PARS_INTO_TOKEN); + return(PARS_TABLE_TOKEN); } YY_BREAK case 49: YY_RULE_SETUP #line 376 "pars0lex.l" { - return(PARS_VALUES_TOKEN); + return(PARS_INDEX_TOKEN); } YY_BREAK case 50: YY_RULE_SETUP #line 380 "pars0lex.l" { - return(PARS_UPDATE_TOKEN); + return(PARS_UNIQUE_TOKEN); } YY_BREAK case 51: YY_RULE_SETUP #line 384 "pars0lex.l" { - return(PARS_SET_TOKEN); + return(PARS_CLUSTERED_TOKEN); } YY_BREAK case 52: YY_RULE_SETUP #line 388 "pars0lex.l" { - return(PARS_DELETE_TOKEN); + return(PARS_ON_TOKEN); } YY_BREAK case 53: YY_RULE_SETUP #line 392 "pars0lex.l" { - return(PARS_CURRENT_TOKEN); + return(PARS_DECLARE_TOKEN); } YY_BREAK case 54: YY_RULE_SETUP #line 396 "pars0lex.l" { - return(PARS_OF_TOKEN); + return(PARS_CURSOR_TOKEN); } YY_BREAK case 55: YY_RULE_SETUP #line 400 "pars0lex.l" { - return(PARS_CREATE_TOKEN); + return(PARS_OPEN_TOKEN); } YY_BREAK case 56: YY_RULE_SETUP #line 404 "pars0lex.l" { - return(PARS_TABLE_TOKEN); + return(PARS_FETCH_TOKEN); } YY_BREAK case 57: YY_RULE_SETUP #line 408 "pars0lex.l" { - return(PARS_COMPACT_TOKEN); + return(PARS_CLOSE_TOKEN); } YY_BREAK case 58: YY_RULE_SETUP #line 412 "pars0lex.l" { - return(PARS_BLOCK_SIZE_TOKEN); + return(PARS_NOTFOUND_TOKEN); } YY_BREAK case 59: YY_RULE_SETUP #line 416 "pars0lex.l" { - return(PARS_INDEX_TOKEN); + return(PARS_TO_BINARY_TOKEN); } YY_BREAK case 60: YY_RULE_SETUP #line 420 "pars0lex.l" { - return(PARS_UNIQUE_TOKEN); + return(PARS_SUBSTR_TOKEN); } YY_BREAK case 61: YY_RULE_SETUP #line 424 "pars0lex.l" { - return(PARS_CLUSTERED_TOKEN); + return(PARS_CONCAT_TOKEN); } YY_BREAK case 62: YY_RULE_SETUP #line 428 "pars0lex.l" { - return(PARS_ON_TOKEN); + return(PARS_INSTR_TOKEN); } YY_BREAK case 63: YY_RULE_SETUP #line 432 "pars0lex.l" { - return(PARS_DECLARE_TOKEN); + return(PARS_LENGTH_TOKEN); } YY_BREAK case 64: YY_RULE_SETUP #line 436 "pars0lex.l" { - return(PARS_CURSOR_TOKEN); + return(PARS_COMMIT_TOKEN); } YY_BREAK case 65: YY_RULE_SETUP #line 440 "pars0lex.l" { - return(PARS_OPEN_TOKEN); + return(PARS_ROLLBACK_TOKEN); } YY_BREAK case 66: YY_RULE_SETUP #line 444 "pars0lex.l" { - return(PARS_FETCH_TOKEN); + return(PARS_WORK_TOKEN); } YY_BREAK case 67: YY_RULE_SETUP #line 448 "pars0lex.l" { - return(PARS_CLOSE_TOKEN); + return(PARS_EXIT_TOKEN); } YY_BREAK case 68: YY_RULE_SETUP #line 452 "pars0lex.l" { - return(PARS_NOTFOUND_TOKEN); + return(PARS_FUNCTION_TOKEN); } YY_BREAK case 69: YY_RULE_SETUP #line 456 "pars0lex.l" { - return(PARS_TO_CHAR_TOKEN); + return(PARS_LOCK_TOKEN); } YY_BREAK case 70: YY_RULE_SETUP #line 460 "pars0lex.l" { - return(PARS_TO_NUMBER_TOKEN); + return(PARS_SHARE_TOKEN); } YY_BREAK case 71: YY_RULE_SETUP #line 464 "pars0lex.l" { - return(PARS_TO_BINARY_TOKEN); + return(PARS_MODE_TOKEN); } YY_BREAK case 72: YY_RULE_SETUP #line 468 "pars0lex.l" { - return(PARS_BINARY_TO_NUMBER_TOKEN); + return(PARS_LIKE_TOKEN); } YY_BREAK case 73: YY_RULE_SETUP #line 472 "pars0lex.l" { - return(PARS_SUBSTR_TOKEN); + return(PARS_BIGINT_TOKEN); } YY_BREAK case 74: YY_RULE_SETUP #line 476 "pars0lex.l" -{ - return(PARS_REPLSTR_TOKEN); -} - YY_BREAK -case 75: -YY_RULE_SETUP -#line 480 "pars0lex.l" -{ - return(PARS_CONCAT_TOKEN); -} - YY_BREAK -case 76: -YY_RULE_SETUP -#line 484 "pars0lex.l" -{ - return(PARS_INSTR_TOKEN); -} - YY_BREAK -case 77: -YY_RULE_SETUP -#line 488 "pars0lex.l" -{ - return(PARS_LENGTH_TOKEN); -} - YY_BREAK -case 78: -YY_RULE_SETUP -#line 492 "pars0lex.l" -{ - return(PARS_SYSDATE_TOKEN); -} - YY_BREAK -case 79: -YY_RULE_SETUP -#line 496 "pars0lex.l" -{ - return(PARS_PRINTF_TOKEN); -} - YY_BREAK -case 80: -YY_RULE_SETUP -#line 500 "pars0lex.l" -{ - return(PARS_ASSERT_TOKEN); -} - YY_BREAK -case 81: -YY_RULE_SETUP -#line 504 "pars0lex.l" -{ - return(PARS_RND_TOKEN); -} - YY_BREAK -case 82: -YY_RULE_SETUP -#line 508 "pars0lex.l" -{ - return(PARS_RND_STR_TOKEN); -} - YY_BREAK -case 83: -YY_RULE_SETUP -#line 512 "pars0lex.l" -{ - return(PARS_ROW_PRINTF_TOKEN); -} - YY_BREAK -case 84: -YY_RULE_SETUP -#line 516 "pars0lex.l" -{ - return(PARS_COMMIT_TOKEN); -} - YY_BREAK -case 85: -YY_RULE_SETUP -#line 520 "pars0lex.l" -{ - return(PARS_ROLLBACK_TOKEN); -} - YY_BREAK -case 86: -YY_RULE_SETUP -#line 524 "pars0lex.l" -{ - return(PARS_WORK_TOKEN); -} - YY_BREAK -case 87: -YY_RULE_SETUP -#line 528 "pars0lex.l" -{ - return(PARS_UNSIGNED_TOKEN); -} - YY_BREAK -case 88: -YY_RULE_SETUP -#line 532 "pars0lex.l" -{ - return(PARS_EXIT_TOKEN); -} - YY_BREAK -case 89: -YY_RULE_SETUP -#line 536 "pars0lex.l" -{ - return(PARS_FUNCTION_TOKEN); -} - YY_BREAK -case 90: -YY_RULE_SETUP -#line 540 "pars0lex.l" -{ - return(PARS_LOCK_TOKEN); -} - YY_BREAK -case 91: -YY_RULE_SETUP -#line 544 "pars0lex.l" -{ - return(PARS_SHARE_TOKEN); -} - YY_BREAK -case 92: -YY_RULE_SETUP -#line 548 "pars0lex.l" -{ - return(PARS_MODE_TOKEN); -} - YY_BREAK -case 93: -YY_RULE_SETUP -#line 552 "pars0lex.l" -{ - return(PARS_LIKE_TOKEN); -} - YY_BREAK -case 94: -YY_RULE_SETUP -#line 556 "pars0lex.l" -{ - return(PARS_BIGINT_TOKEN); -} - YY_BREAK -case 95: -YY_RULE_SETUP -#line 560 "pars0lex.l" { yylval = sym_tab_add_id(pars_sym_tab_global, (byte*) yytext, @@ -1981,9 +1729,9 @@ YY_RULE_SETUP return(PARS_ID_TOKEN); } YY_BREAK -case 96: +case 75: YY_RULE_SETUP -#line 567 "pars0lex.l" +#line 483 "pars0lex.l" { yylval = sym_tab_add_id(pars_sym_tab_global, (byte*) yytext, @@ -1991,192 +1739,192 @@ YY_RULE_SETUP return(PARS_TABLE_NAME_TOKEN); } YY_BREAK -case 97: +case 76: YY_RULE_SETUP -#line 574 "pars0lex.l" +#line 490 "pars0lex.l" { return(PARS_DDOT_TOKEN); } YY_BREAK -case 98: +case 77: YY_RULE_SETUP -#line 578 "pars0lex.l" +#line 494 "pars0lex.l" { return(PARS_ASSIGN_TOKEN); } YY_BREAK -case 99: +case 78: YY_RULE_SETUP -#line 582 "pars0lex.l" +#line 498 "pars0lex.l" { return(PARS_LE_TOKEN); } YY_BREAK -case 100: +case 79: YY_RULE_SETUP -#line 586 "pars0lex.l" +#line 502 "pars0lex.l" { return(PARS_GE_TOKEN); } YY_BREAK -case 101: +case 80: YY_RULE_SETUP -#line 590 "pars0lex.l" +#line 506 "pars0lex.l" { return(PARS_NE_TOKEN); } YY_BREAK -case 102: +case 81: YY_RULE_SETUP -#line 594 "pars0lex.l" +#line 510 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 103: +case 82: YY_RULE_SETUP -#line 599 "pars0lex.l" +#line 515 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 104: +case 83: YY_RULE_SETUP -#line 604 "pars0lex.l" +#line 520 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 105: +case 84: YY_RULE_SETUP -#line 609 "pars0lex.l" +#line 525 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 106: +case 85: YY_RULE_SETUP -#line 614 "pars0lex.l" +#line 530 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 107: +case 86: YY_RULE_SETUP -#line 619 "pars0lex.l" +#line 535 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 108: +case 87: YY_RULE_SETUP -#line 624 "pars0lex.l" +#line 540 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 109: +case 88: YY_RULE_SETUP -#line 629 "pars0lex.l" +#line 545 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 110: +case 89: YY_RULE_SETUP -#line 634 "pars0lex.l" +#line 550 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 111: +case 90: YY_RULE_SETUP -#line 639 "pars0lex.l" +#line 555 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 112: +case 91: YY_RULE_SETUP -#line 644 "pars0lex.l" +#line 560 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 113: +case 92: YY_RULE_SETUP -#line 649 "pars0lex.l" +#line 565 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 114: +case 93: YY_RULE_SETUP -#line 654 "pars0lex.l" +#line 570 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 115: +case 94: YY_RULE_SETUP -#line 659 "pars0lex.l" +#line 575 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 116: +case 95: YY_RULE_SETUP -#line 664 "pars0lex.l" +#line 580 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 117: +case 96: YY_RULE_SETUP -#line 669 "pars0lex.l" +#line 585 "pars0lex.l" BEGIN(comment); /* eat up comment */ YY_BREAK -case 118: -/* rule 118 can match eol */ +case 97: +/* rule 97 can match eol */ YY_RULE_SETUP -#line 671 "pars0lex.l" +#line 587 "pars0lex.l" YY_BREAK -case 119: -/* rule 119 can match eol */ +case 98: +/* rule 98 can match eol */ YY_RULE_SETUP -#line 672 "pars0lex.l" +#line 588 "pars0lex.l" YY_BREAK -case 120: +case 99: YY_RULE_SETUP -#line 673 "pars0lex.l" +#line 589 "pars0lex.l" BEGIN(INITIAL); YY_BREAK -case 121: -/* rule 121 can match eol */ +case 100: +/* rule 100 can match eol */ YY_RULE_SETUP -#line 675 "pars0lex.l" +#line 591 "pars0lex.l" /* eat up whitespace */ YY_BREAK -case 122: +case 101: YY_RULE_SETUP -#line 678 "pars0lex.l" +#line 594 "pars0lex.l" { fprintf(stderr,"Unrecognized character: %02x\n", *yytext); @@ -2186,12 +1934,12 @@ YY_RULE_SETUP return(0); } YY_BREAK -case 123: +case 102: YY_RULE_SETUP -#line 687 "pars0lex.l" +#line 603 "pars0lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2194 "lexyy.cc" +#line 1942 "lexyy.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(comment): case YY_STATE_EOF(quoted): @@ -2492,7 +2240,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 404 ) + if ( yy_current_state >= 307 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -2520,11 +2268,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 404 ) + if ( yy_current_state >= 307 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 403); + yy_is_jam = (yy_current_state == 306); return yy_is_jam ? 0 : yy_current_state; } @@ -3077,7 +2825,7 @@ static void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 687 "pars0lex.l" +#line 603 "pars0lex.l" /********************************************************************** diff --git a/storage/innobase/pars/pars0grm.cc b/storage/innobase/pars/pars0grm.cc index a0a09771106..7e10a783310 100644 --- a/storage/innobase/pars/pars0grm.cc +++ b/storage/innobase/pars/pars0grm.cc @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.4.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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 @@ -40,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.4.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -61,8 +65,8 @@ -/* Copy the first part of user declarations. */ -#line 29 "pars0grm.y" /* yacc.c:339 */ +/* First part of user prologue. */ +#line 29 "pars0grm.y" /* The value of the semantic attribute is a pointer to a query tree node que_node_t */ @@ -81,13 +85,17 @@ que_node_t */ int yylex(void); -#line 85 "pars0grm.cc" /* yacc.c:339 */ +#line 89 "pars0grm.cc" # ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif # else -# define YY_NULLPTR 0 +# define YY_NULLPTR ((void*)0) # endif # endif @@ -99,8 +107,8 @@ yylex(void); # define YYERROR_VERBOSE 0 #endif -/* In a future release of Bison, this section will be replaced - by #include "pars0grm.tab.h". */ +/* Use api.header.include to #include this header + instead of duplicating it here. */ #ifndef YY_YY_PARS0GRM_TAB_H_INCLUDED # define YY_YY_PARS0GRM_TAB_H_INCLUDED /* Debug traces. */ @@ -129,91 +137,71 @@ extern int yydebug; PARS_NE_TOKEN = 268, PARS_PROCEDURE_TOKEN = 269, PARS_IN_TOKEN = 270, - PARS_OUT_TOKEN = 271, - PARS_BINARY_TOKEN = 272, - PARS_BLOB_TOKEN = 273, - PARS_INT_TOKEN = 274, - PARS_FLOAT_TOKEN = 275, - PARS_CHAR_TOKEN = 276, - PARS_IS_TOKEN = 277, - PARS_BEGIN_TOKEN = 278, - PARS_END_TOKEN = 279, - PARS_IF_TOKEN = 280, - PARS_THEN_TOKEN = 281, - PARS_ELSE_TOKEN = 282, - PARS_ELSIF_TOKEN = 283, - PARS_LOOP_TOKEN = 284, - PARS_WHILE_TOKEN = 285, - PARS_RETURN_TOKEN = 286, - PARS_SELECT_TOKEN = 287, - PARS_SUM_TOKEN = 288, - PARS_COUNT_TOKEN = 289, - PARS_DISTINCT_TOKEN = 290, - PARS_FROM_TOKEN = 291, - PARS_WHERE_TOKEN = 292, - PARS_FOR_TOKEN = 293, - PARS_DDOT_TOKEN = 294, - PARS_READ_TOKEN = 295, - PARS_ORDER_TOKEN = 296, - PARS_BY_TOKEN = 297, - PARS_ASC_TOKEN = 298, - PARS_DESC_TOKEN = 299, - PARS_INSERT_TOKEN = 300, - PARS_INTO_TOKEN = 301, - PARS_VALUES_TOKEN = 302, - PARS_UPDATE_TOKEN = 303, - PARS_SET_TOKEN = 304, - PARS_DELETE_TOKEN = 305, - PARS_CURRENT_TOKEN = 306, - PARS_OF_TOKEN = 307, - PARS_CREATE_TOKEN = 308, - PARS_TABLE_TOKEN = 309, - PARS_INDEX_TOKEN = 310, - PARS_UNIQUE_TOKEN = 311, - PARS_CLUSTERED_TOKEN = 312, - PARS_ON_TOKEN = 313, - PARS_ASSIGN_TOKEN = 314, - PARS_DECLARE_TOKEN = 315, - PARS_CURSOR_TOKEN = 316, - PARS_SQL_TOKEN = 317, - PARS_OPEN_TOKEN = 318, - PARS_FETCH_TOKEN = 319, - PARS_CLOSE_TOKEN = 320, - PARS_NOTFOUND_TOKEN = 321, - PARS_TO_CHAR_TOKEN = 322, - PARS_TO_NUMBER_TOKEN = 323, - PARS_TO_BINARY_TOKEN = 324, - PARS_BINARY_TO_NUMBER_TOKEN = 325, - PARS_SUBSTR_TOKEN = 326, - PARS_REPLSTR_TOKEN = 327, - PARS_CONCAT_TOKEN = 328, - PARS_INSTR_TOKEN = 329, - PARS_LENGTH_TOKEN = 330, - PARS_SYSDATE_TOKEN = 331, - PARS_PRINTF_TOKEN = 332, - PARS_ASSERT_TOKEN = 333, - PARS_RND_TOKEN = 334, - PARS_RND_STR_TOKEN = 335, - PARS_ROW_PRINTF_TOKEN = 336, - PARS_COMMIT_TOKEN = 337, - PARS_ROLLBACK_TOKEN = 338, - PARS_WORK_TOKEN = 339, - PARS_UNSIGNED_TOKEN = 340, - PARS_EXIT_TOKEN = 341, - PARS_FUNCTION_TOKEN = 342, - PARS_LOCK_TOKEN = 343, - PARS_SHARE_TOKEN = 344, - PARS_MODE_TOKEN = 345, - PARS_LIKE_TOKEN = 346, - PARS_LIKE_TOKEN_EXACT = 347, - PARS_LIKE_TOKEN_PREFIX = 348, - PARS_LIKE_TOKEN_SUFFIX = 349, - PARS_LIKE_TOKEN_SUBSTR = 350, - PARS_TABLE_NAME_TOKEN = 351, - PARS_COMPACT_TOKEN = 352, - PARS_BLOCK_SIZE_TOKEN = 353, - PARS_BIGINT_TOKEN = 354, - NEG = 355 + PARS_INT_TOKEN = 271, + PARS_CHAR_TOKEN = 272, + PARS_IS_TOKEN = 273, + PARS_BEGIN_TOKEN = 274, + PARS_END_TOKEN = 275, + PARS_IF_TOKEN = 276, + PARS_THEN_TOKEN = 277, + PARS_ELSE_TOKEN = 278, + PARS_ELSIF_TOKEN = 279, + PARS_LOOP_TOKEN = 280, + PARS_WHILE_TOKEN = 281, + PARS_RETURN_TOKEN = 282, + PARS_SELECT_TOKEN = 283, + PARS_COUNT_TOKEN = 284, + PARS_FROM_TOKEN = 285, + PARS_WHERE_TOKEN = 286, + PARS_FOR_TOKEN = 287, + PARS_DDOT_TOKEN = 288, + PARS_ORDER_TOKEN = 289, + PARS_BY_TOKEN = 290, + PARS_ASC_TOKEN = 291, + PARS_DESC_TOKEN = 292, + PARS_INSERT_TOKEN = 293, + PARS_INTO_TOKEN = 294, + PARS_VALUES_TOKEN = 295, + PARS_UPDATE_TOKEN = 296, + PARS_SET_TOKEN = 297, + PARS_DELETE_TOKEN = 298, + PARS_CURRENT_TOKEN = 299, + PARS_OF_TOKEN = 300, + PARS_CREATE_TOKEN = 301, + PARS_TABLE_TOKEN = 302, + PARS_INDEX_TOKEN = 303, + PARS_UNIQUE_TOKEN = 304, + PARS_CLUSTERED_TOKEN = 305, + PARS_ON_TOKEN = 306, + PARS_ASSIGN_TOKEN = 307, + PARS_DECLARE_TOKEN = 308, + PARS_CURSOR_TOKEN = 309, + PARS_SQL_TOKEN = 310, + PARS_OPEN_TOKEN = 311, + PARS_FETCH_TOKEN = 312, + PARS_CLOSE_TOKEN = 313, + PARS_NOTFOUND_TOKEN = 314, + PARS_TO_BINARY_TOKEN = 315, + PARS_SUBSTR_TOKEN = 316, + PARS_CONCAT_TOKEN = 317, + PARS_INSTR_TOKEN = 318, + PARS_LENGTH_TOKEN = 319, + PARS_COMMIT_TOKEN = 320, + PARS_ROLLBACK_TOKEN = 321, + PARS_WORK_TOKEN = 322, + PARS_EXIT_TOKEN = 323, + PARS_FUNCTION_TOKEN = 324, + PARS_LOCK_TOKEN = 325, + PARS_SHARE_TOKEN = 326, + PARS_MODE_TOKEN = 327, + PARS_LIKE_TOKEN = 328, + PARS_LIKE_TOKEN_EXACT = 329, + PARS_LIKE_TOKEN_PREFIX = 330, + PARS_LIKE_TOKEN_SUFFIX = 331, + PARS_LIKE_TOKEN_SUBSTR = 332, + PARS_TABLE_NAME_TOKEN = 333, + PARS_BIGINT_TOKEN = 334, + NEG = 335 }; #endif @@ -231,9 +219,7 @@ int yyparse (void); #endif /* !YY_YY_PARS0GRM_TAB_H_INCLUDED */ -/* Copy the second part of user declarations. */ -#line 237 "pars0grm.cc" /* yacc.c:358 */ #ifdef short # undef short @@ -254,13 +240,13 @@ typedef signed char yytype_int8; #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else -typedef unsigned short int yytype_uint16; +typedef unsigned short yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else -typedef short int yytype_int16; +typedef short yytype_int16; #endif #ifndef YYSIZE_T @@ -272,7 +258,7 @@ typedef short int yytype_int16; # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif @@ -308,15 +294,6 @@ typedef short int yytype_int16; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -324,7 +301,7 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -344,6 +321,8 @@ typedef short int yytype_int16; #endif +#define YY_ASSERT(E) ((void) (0 && (E))) + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -475,42 +454,42 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 780 +#define YYLAST 603 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 116 +#define YYNTOKENS 96 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 72 +#define YYNNTS 64 /* YYNRULES -- Number of rules. */ -#define YYNRULES 178 +#define YYNRULES 150 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 345 +#define YYNSTATES 300 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 355 +#define YYMAXUTOK 335 +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ + as returned by yylex. */ static const yytype_uint8 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, 2, 2, 2, 2, 108, 2, 2, - 110, 111, 105, 104, 113, 103, 2, 106, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 109, - 101, 100, 102, 112, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 88, 2, 2, + 90, 91, 85, 84, 93, 83, 2, 86, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 89, + 81, 80, 82, 92, 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, 114, 2, 115, 2, 2, 2, 2, + 2, 2, 2, 94, 2, 95, 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, @@ -531,33 +510,29 @@ static const yytype_uint8 yytranslate[] = 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, 107 + 75, 76, 77, 78, 79, 87 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 160, 160, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 188, 189, 194, 195, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 221, 226, 227, 228, 229, 231, 232, 233, 234, - 235, 236, 237, 240, 242, 243, 247, 253, 258, 259, - 260, 264, 268, 269, 274, 275, 276, 281, 282, 283, - 287, 288, 293, 299, 306, 307, 308, 313, 315, 318, - 322, 323, 327, 328, 333, 334, 339, 340, 341, 345, - 346, 353, 368, 373, 376, 384, 390, 391, 396, 402, - 411, 419, 427, 434, 442, 450, 456, 463, 469, 470, - 475, 476, 478, 482, 489, 495, 505, 509, 513, 520, - 527, 531, 539, 548, 549, 554, 555, 560, 561, 567, - 568, 574, 575, 580, 581, 586, 597, 598, 603, 604, - 608, 609, 613, 627, 628, 632, 637, 642, 643, 644, - 645, 646, 650, 655, 663, 664, 665, 670, 676, 678, - 679, 683, 691, 697, 698, 701, 703, 704, 708 + 0, 140, 140, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 166, 167, 172, 173, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 199, + 204, 205, 206, 207, 208, 211, 213, 214, 218, 224, + 228, 229, 234, 235, 236, 241, 242, 243, 247, 248, + 256, 257, 258, 263, 265, 268, 272, 273, 277, 278, + 283, 284, 289, 290, 291, 295, 296, 303, 318, 323, + 326, 334, 340, 341, 346, 352, 361, 369, 377, 384, + 392, 400, 407, 413, 414, 419, 420, 422, 426, 433, + 439, 449, 453, 457, 464, 471, 475, 483, 492, 493, + 498, 499, 504, 505, 511, 519, 520, 525, 526, 530, + 531, 535, 549, 550, 554, 559, 564, 565, 566, 570, + 576, 578, 579, 583, 591, 597, 598, 601, 603, 604, + 608 }; #endif @@ -570,39 +545,30 @@ static const char *const yytname[] = "PARS_STR_LIT", "PARS_NULL_LIT", "PARS_ID_TOKEN", "PARS_AND_TOKEN", "PARS_OR_TOKEN", "PARS_NOT_TOKEN", "PARS_GE_TOKEN", "PARS_LE_TOKEN", "PARS_NE_TOKEN", "PARS_PROCEDURE_TOKEN", "PARS_IN_TOKEN", - "PARS_OUT_TOKEN", "PARS_BINARY_TOKEN", "PARS_BLOB_TOKEN", - "PARS_INT_TOKEN", "PARS_FLOAT_TOKEN", "PARS_CHAR_TOKEN", "PARS_IS_TOKEN", - "PARS_BEGIN_TOKEN", "PARS_END_TOKEN", "PARS_IF_TOKEN", "PARS_THEN_TOKEN", - "PARS_ELSE_TOKEN", "PARS_ELSIF_TOKEN", "PARS_LOOP_TOKEN", - "PARS_WHILE_TOKEN", "PARS_RETURN_TOKEN", "PARS_SELECT_TOKEN", - "PARS_SUM_TOKEN", "PARS_COUNT_TOKEN", "PARS_DISTINCT_TOKEN", + "PARS_INT_TOKEN", "PARS_CHAR_TOKEN", "PARS_IS_TOKEN", "PARS_BEGIN_TOKEN", + "PARS_END_TOKEN", "PARS_IF_TOKEN", "PARS_THEN_TOKEN", "PARS_ELSE_TOKEN", + "PARS_ELSIF_TOKEN", "PARS_LOOP_TOKEN", "PARS_WHILE_TOKEN", + "PARS_RETURN_TOKEN", "PARS_SELECT_TOKEN", "PARS_COUNT_TOKEN", "PARS_FROM_TOKEN", "PARS_WHERE_TOKEN", "PARS_FOR_TOKEN", - "PARS_DDOT_TOKEN", "PARS_READ_TOKEN", "PARS_ORDER_TOKEN", - "PARS_BY_TOKEN", "PARS_ASC_TOKEN", "PARS_DESC_TOKEN", - "PARS_INSERT_TOKEN", "PARS_INTO_TOKEN", "PARS_VALUES_TOKEN", - "PARS_UPDATE_TOKEN", "PARS_SET_TOKEN", "PARS_DELETE_TOKEN", - "PARS_CURRENT_TOKEN", "PARS_OF_TOKEN", "PARS_CREATE_TOKEN", - "PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN", "PARS_UNIQUE_TOKEN", - "PARS_CLUSTERED_TOKEN", "PARS_ON_TOKEN", "PARS_ASSIGN_TOKEN", - "PARS_DECLARE_TOKEN", "PARS_CURSOR_TOKEN", "PARS_SQL_TOKEN", - "PARS_OPEN_TOKEN", "PARS_FETCH_TOKEN", "PARS_CLOSE_TOKEN", - "PARS_NOTFOUND_TOKEN", "PARS_TO_CHAR_TOKEN", "PARS_TO_NUMBER_TOKEN", - "PARS_TO_BINARY_TOKEN", "PARS_BINARY_TO_NUMBER_TOKEN", - "PARS_SUBSTR_TOKEN", "PARS_REPLSTR_TOKEN", "PARS_CONCAT_TOKEN", - "PARS_INSTR_TOKEN", "PARS_LENGTH_TOKEN", "PARS_SYSDATE_TOKEN", - "PARS_PRINTF_TOKEN", "PARS_ASSERT_TOKEN", "PARS_RND_TOKEN", - "PARS_RND_STR_TOKEN", "PARS_ROW_PRINTF_TOKEN", "PARS_COMMIT_TOKEN", - "PARS_ROLLBACK_TOKEN", "PARS_WORK_TOKEN", "PARS_UNSIGNED_TOKEN", - "PARS_EXIT_TOKEN", "PARS_FUNCTION_TOKEN", "PARS_LOCK_TOKEN", - "PARS_SHARE_TOKEN", "PARS_MODE_TOKEN", "PARS_LIKE_TOKEN", - "PARS_LIKE_TOKEN_EXACT", "PARS_LIKE_TOKEN_PREFIX", + "PARS_DDOT_TOKEN", "PARS_ORDER_TOKEN", "PARS_BY_TOKEN", "PARS_ASC_TOKEN", + "PARS_DESC_TOKEN", "PARS_INSERT_TOKEN", "PARS_INTO_TOKEN", + "PARS_VALUES_TOKEN", "PARS_UPDATE_TOKEN", "PARS_SET_TOKEN", + "PARS_DELETE_TOKEN", "PARS_CURRENT_TOKEN", "PARS_OF_TOKEN", + "PARS_CREATE_TOKEN", "PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN", + "PARS_UNIQUE_TOKEN", "PARS_CLUSTERED_TOKEN", "PARS_ON_TOKEN", + "PARS_ASSIGN_TOKEN", "PARS_DECLARE_TOKEN", "PARS_CURSOR_TOKEN", + "PARS_SQL_TOKEN", "PARS_OPEN_TOKEN", "PARS_FETCH_TOKEN", + "PARS_CLOSE_TOKEN", "PARS_NOTFOUND_TOKEN", "PARS_TO_BINARY_TOKEN", + "PARS_SUBSTR_TOKEN", "PARS_CONCAT_TOKEN", "PARS_INSTR_TOKEN", + "PARS_LENGTH_TOKEN", "PARS_COMMIT_TOKEN", "PARS_ROLLBACK_TOKEN", + "PARS_WORK_TOKEN", "PARS_EXIT_TOKEN", "PARS_FUNCTION_TOKEN", + "PARS_LOCK_TOKEN", "PARS_SHARE_TOKEN", "PARS_MODE_TOKEN", + "PARS_LIKE_TOKEN", "PARS_LIKE_TOKEN_EXACT", "PARS_LIKE_TOKEN_PREFIX", "PARS_LIKE_TOKEN_SUFFIX", "PARS_LIKE_TOKEN_SUBSTR", - "PARS_TABLE_NAME_TOKEN", "PARS_COMPACT_TOKEN", "PARS_BLOCK_SIZE_TOKEN", - "PARS_BIGINT_TOKEN", "'='", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", - "NEG", "'%'", "';'", "'('", "')'", "'?'", "','", "'{'", "'}'", "$accept", - "top_statement", "statement", "statement_list", "exp", "function_name", - "question_mark_list", "stored_procedure_call", - "predefined_procedure_call", "predefined_procedure_name", + "PARS_TABLE_NAME_TOKEN", "PARS_BIGINT_TOKEN", "'='", "'<'", "'>'", "'-'", + "'+'", "'*'", "'/'", "NEG", "'%'", "';'", "'('", "')'", "'?'", "','", + "'{'", "'}'", "$accept", "top_statement", "statement", "statement_list", + "exp", "function_name", "question_mark_list", "stored_procedure_call", "user_function_call", "table_list", "variable_list", "exp_list", "select_item", "select_item_list", "select_list", "search_condition", "for_update_clause", "lock_shared_clause", "order_direction", @@ -611,16 +577,14 @@ static const char *const yytname[] = "cursor_positioned", "update_statement_start", "update_statement_searched", "update_statement_positioned", "delete_statement_start", "delete_statement_searched", - "delete_statement_positioned", "row_printf_statement", - "assignment_statement", "elsif_element", "elsif_list", "else_part", - "if_statement", "while_statement", "for_statement", "exit_statement", - "return_statement", "open_cursor_statement", "close_cursor_statement", - "fetch_statement", "column_def", "column_def_list", "opt_column_len", - "opt_unsigned", "opt_not_null", "compact", "block_size", "create_table", - "column_list", "unique_def", "clustered_def", "create_index", - "table_name", "commit_statement", "rollback_statement", "type_name", - "parameter_declaration", "parameter_declaration_list", - "variable_declaration", "variable_declaration_list", + "delete_statement_positioned", "assignment_statement", "elsif_element", + "elsif_list", "else_part", "if_statement", "while_statement", + "for_statement", "exit_statement", "return_statement", + "open_cursor_statement", "close_cursor_statement", "fetch_statement", + "column_def", "column_def_list", "opt_column_len", "opt_not_null", + "create_table", "column_list", "unique_def", "clustered_def", + "create_index", "table_name", "commit_statement", "rollback_statement", + "type_name", "variable_declaration", "variable_declaration_list", "cursor_declaration", "function_declaration", "declaration", "declaration_list", "procedure_definition", YY_NULLPTR }; @@ -639,17 +603,15 @@ static const yytype_uint16 yytoknum[] = 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, - 61, 60, 62, 45, 43, 42, 47, 355, 37, 59, + 61, 60, 62, 45, 43, 42, 47, 335, 37, 59, 40, 41, 63, 44, 123, 125 }; # endif -#define YYPACT_NINF -176 +#define YYPACT_NINF -129 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-176))) + (!!((Yystate) == (-129))) #define YYTABLE_NINF -1 @@ -660,41 +622,36 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 20, 21, 41, -64, -59, -176, -176, 48, 54, -176, - -74, 12, 12, 45, 48, -176, -176, -176, -176, -176, - -176, -176, 69, -176, 12, -176, 8, -32, -43, -176, - -176, -176, -176, -13, -176, 72, 81, 445, -176, 75, - -11, 42, 530, 530, -176, 16, 99, 67, -3, 78, - -14, 108, 109, 110, -176, -176, -176, 86, 36, 44, - -176, 122, -176, 216, -176, 22, 23, 25, 6, 26, - 93, 27, 33, 93, 46, 51, 53, 56, 61, 63, - 64, 66, 68, 70, 71, 76, 79, 89, 94, 95, - 86, -176, 530, -176, -176, -176, -176, 43, 530, 49, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, 530, 530, 570, 77, 603, 80, 96, -176, 674, - -176, -38, 118, 161, -3, -176, -176, 129, -3, -3, - -176, 148, -176, 163, -176, -176, -176, -176, 97, -176, - -176, -176, 530, -176, 100, -176, -176, 481, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - 102, 674, 149, 220, 155, 14, 91, 530, 530, 530, - 530, 530, 445, 219, 530, 530, 530, 530, 530, 530, - 530, 530, 445, 530, -24, 218, 267, -3, 530, -176, - 221, -176, 117, -176, 179, 228, 124, 674, -65, 530, - 185, 674, -176, -176, -176, -176, 220, 220, 19, 19, - 674, 136, -176, 19, 19, 19, 3, 3, 14, 14, - -57, 326, 554, 231, 128, -176, 130, -176, -1, -176, - 610, 142, -176, 131, 238, 242, 141, -176, 130, -176, - -52, -176, 530, -51, 246, 445, 530, -176, 227, 233, - -176, 229, -176, 151, -176, 252, 530, -3, 225, 530, - 530, 221, 12, -176, -48, 207, 156, 153, 164, 674, - -176, -176, 445, 626, -176, 250, -176, -176, -176, -176, - 230, 194, 655, 674, -176, 173, 187, 238, -3, -176, - -176, -176, 445, -176, -176, 270, 245, 445, 284, 204, - -176, 192, -176, 181, 445, 203, 253, -176, 386, 193, - -176, 286, 205, -176, 296, 217, 299, 279, -176, 303, - -176, 307, -176, -47, -176, 30, -176, -176, -176, -176, - 305, -176, -176, -176, -176 + 5, 34, 46, -28, -41, -129, -129, -12, 45, 57, + 23, -129, 9, -129, -129, -129, 20, -9, -129, -129, + -129, -129, 2, -129, 83, 87, 278, -129, 93, 28, + 71, 427, 427, -129, 335, 105, 85, -1, 104, -27, + 129, 132, 133, 76, 77, -129, 141, -129, 149, -129, + 61, 19, 62, 118, 65, 66, 118, 68, 69, 70, + 72, 73, 74, 75, 78, 79, 82, 84, 89, 90, + 91, 94, 138, -129, 427, -129, -129, -129, -129, 86, + 427, 96, -129, -129, -129, -129, -129, 427, 427, 438, + 92, 454, 95, -129, 1, -129, -24, 130, 157, -1, + -129, -129, 144, -1, -1, -129, 139, -129, 154, -129, + -129, -129, 98, -129, -129, -129, 108, -129, -129, 345, + -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, + -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, + -129, 112, 1, 135, 285, 143, -8, 15, 427, 427, + 427, 427, 427, 278, 203, 427, 427, 427, 427, 427, + 427, 427, 427, 278, 124, 204, 381, -1, 427, -129, + 209, -129, 120, -129, 173, 215, 131, 427, 180, 1, + -129, -129, -129, -129, 285, 285, 30, 30, 1, 10, + -129, 30, 30, 30, 60, 60, -8, -8, 1, -39, + 192, 137, -129, 136, -129, -13, -129, 472, 146, -129, + 147, 225, 227, 151, -129, 136, -129, -21, 0, 229, + 278, 427, -129, 213, 219, -129, 427, 220, -129, 237, + 427, -1, 214, 427, 427, 209, 23, -129, 14, 196, + 160, 158, 162, -129, -129, 278, 486, -129, 231, 1, + -129, -129, -129, 218, 194, 517, 1, -129, 175, -129, + 225, -1, -129, -129, -129, 278, -129, -129, 251, 234, + 278, 266, 260, -129, 181, 278, 201, 239, -129, 235, + 184, 271, -129, 272, 208, 275, 258, -129, -129, -129, + 17, -129, -7, -129, -129, 277, -129, -129, -129, -129 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -702,67 +659,60 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 1, 2, 164, 0, 165, - 0, 0, 0, 0, 0, 160, 161, 157, 159, 158, - 162, 163, 168, 166, 0, 169, 175, 0, 0, 170, - 173, 174, 176, 0, 167, 0, 0, 0, 177, 0, - 0, 0, 0, 0, 127, 84, 0, 0, 0, 0, - 148, 0, 0, 0, 68, 69, 70, 0, 0, 0, - 126, 0, 25, 0, 3, 0, 0, 0, 0, 0, - 90, 0, 0, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 0, 140, + 0, 141, 147, 136, 138, 137, 0, 0, 142, 145, + 146, 148, 0, 139, 0, 0, 0, 149, 0, 0, + 0, 0, 0, 112, 70, 0, 0, 0, 0, 127, + 0, 0, 0, 0, 0, 111, 0, 23, 0, 3, + 0, 0, 0, 76, 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 172, 0, 29, 30, 31, 32, 27, 0, 33, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 0, 0, 0, 0, 0, 0, 0, 87, 80, - 85, 89, 0, 0, 0, 153, 154, 0, 0, 0, - 149, 150, 128, 0, 129, 115, 155, 156, 0, 178, - 26, 4, 77, 11, 0, 104, 12, 0, 110, 111, - 16, 17, 113, 114, 14, 15, 13, 10, 8, 5, - 6, 7, 9, 18, 20, 19, 23, 24, 21, 22, - 0, 116, 0, 49, 0, 38, 0, 0, 0, 0, + 0, 0, 0, 144, 0, 27, 28, 29, 30, 25, + 0, 31, 50, 51, 52, 53, 54, 0, 0, 0, + 0, 0, 0, 73, 68, 71, 75, 0, 0, 0, + 132, 133, 0, 0, 0, 128, 129, 113, 0, 114, + 134, 135, 0, 150, 24, 10, 0, 90, 11, 0, + 96, 97, 14, 15, 99, 100, 12, 13, 9, 7, + 4, 5, 6, 8, 16, 18, 17, 21, 22, 19, + 20, 0, 101, 0, 47, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 77, 0, 0, 0, 74, 0, 0, 0, 102, - 0, 112, 0, 151, 0, 74, 63, 78, 0, 77, - 0, 91, 171, 50, 51, 39, 47, 48, 44, 45, - 46, 120, 41, 40, 42, 43, 35, 34, 36, 37, - 0, 0, 0, 0, 0, 75, 88, 86, 90, 72, - 0, 0, 106, 109, 0, 0, 75, 131, 130, 64, - 0, 67, 0, 0, 0, 0, 0, 118, 122, 0, - 28, 0, 83, 0, 81, 0, 0, 0, 92, 0, - 0, 0, 0, 133, 0, 0, 0, 0, 0, 79, - 103, 108, 121, 0, 119, 0, 124, 82, 76, 73, - 0, 94, 0, 105, 107, 135, 141, 0, 0, 71, - 66, 65, 0, 123, 93, 0, 99, 0, 0, 137, - 142, 143, 134, 0, 117, 0, 0, 101, 0, 0, - 138, 139, 0, 145, 0, 0, 0, 0, 136, 0, - 132, 0, 146, 0, 95, 96, 125, 140, 144, 152, - 0, 97, 98, 100, 147 + 0, 0, 65, 0, 0, 62, 0, 0, 0, 88, + 0, 98, 0, 130, 0, 62, 55, 65, 0, 77, + 143, 48, 49, 37, 45, 46, 42, 43, 44, 105, + 39, 38, 40, 41, 33, 32, 34, 35, 66, 0, + 0, 0, 63, 74, 72, 76, 60, 0, 0, 92, + 95, 0, 0, 63, 116, 115, 56, 0, 0, 0, + 0, 0, 103, 107, 0, 26, 0, 0, 69, 0, + 0, 0, 78, 0, 0, 0, 0, 118, 0, 0, + 0, 0, 0, 89, 94, 106, 0, 104, 0, 67, + 109, 64, 61, 0, 80, 0, 91, 93, 120, 124, + 0, 0, 59, 58, 57, 0, 108, 79, 0, 85, + 0, 0, 122, 119, 0, 102, 0, 0, 87, 0, + 0, 0, 117, 0, 0, 0, 0, 121, 123, 125, + 0, 81, 82, 110, 131, 0, 83, 84, 86, 126 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -176, -176, -62, -175, -40, -176, -176, -176, -176, -176, - -176, -176, 111, -166, 119, -176, -176, -67, -176, -176, - -176, -176, -33, -176, -176, 47, -176, 240, -176, -176, - -176, -176, -176, -176, -176, -176, 59, -176, -176, -176, - -176, -176, -176, -176, -176, -176, -176, 17, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -115, - -176, -176, -12, 313, -176, 293, -176, -176, -176, 295, - -176, -176 + -129, -129, -48, -128, -30, -129, -129, -129, -129, -129, + 113, 110, 123, -129, -129, -52, -129, -129, -129, -129, + -40, -129, -129, 55, -129, 238, -129, -129, -129, -129, + -129, -129, -129, 88, -129, -129, -129, -129, -129, -129, + -129, -129, -129, -129, 35, -129, -129, -129, -129, -129, + -129, -129, -129, -96, -129, -129, 81, 290, -129, -129, + -129, 286, -129, -129 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 62, 63, 207, 114, 250, 64, 65, 66, - 247, 238, 236, 208, 120, 121, 122, 148, 291, 306, - 343, 317, 67, 68, 69, 242, 243, 149, 70, 71, - 72, 73, 74, 75, 76, 77, 257, 258, 259, 78, - 79, 80, 81, 82, 83, 84, 85, 273, 274, 309, - 321, 330, 311, 323, 86, 333, 131, 204, 87, 127, - 88, 89, 20, 9, 10, 25, 26, 30, 31, 32, - 33, 3 + -1, 2, 47, 48, 94, 90, 217, 49, 214, 205, + 203, 199, 95, 96, 97, 120, 254, 269, 298, 278, + 50, 51, 52, 209, 210, 121, 53, 54, 55, 56, + 57, 58, 59, 222, 223, 224, 60, 61, 62, 63, + 64, 65, 66, 67, 237, 238, 272, 282, 68, 290, + 106, 174, 69, 102, 70, 71, 16, 11, 12, 19, + 20, 21, 22, 3 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -770,232 +720,189 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint16 yytable[] = { - 21, 140, 113, 115, 125, 119, 152, 221, 195, 199, - 37, 233, 27, 201, 202, 24, 181, 231, 35, 93, - 94, 95, 96, 97, 135, 230, 98, 181, 4, 15, - 16, 17, 181, 18, 1, 145, 266, 13, 45, 14, - 129, 5, 130, 253, 36, 6, 251, 28, 252, 116, - 117, 7, 171, 144, 260, 8, 252, 170, 173, 277, - 280, 278, 252, 296, 339, 297, 340, 22, 28, 11, - 12, 175, 176, 341, 342, 196, 24, 34, 99, 39, - 282, 234, 239, 100, 101, 102, 103, 104, 40, 105, - 106, 107, 108, 126, 183, 109, 110, 90, 91, 177, - 178, 92, 179, 180, 181, 183, 123, 211, 189, 190, - 183, 19, 267, 124, 128, 132, 133, 134, 45, 111, - 136, 118, 187, 188, 189, 190, 112, 314, 137, 138, - 147, 141, 318, 142, 143, 146, 150, 216, 217, 218, - 219, 220, 151, 41, 223, 224, 225, 226, 227, 228, - 229, 172, 289, 232, 197, 154, 119, 174, 240, 140, - 155, 42, 156, 255, 256, 157, 43, 44, 45, 140, - 158, 268, 159, 160, 46, 161, 198, 162, 200, 163, - 164, 47, 183, 313, 48, 165, 49, 191, 166, 50, - 193, 184, 185, 186, 187, 188, 189, 190, 167, 51, - 52, 53, 215, 168, 169, 203, 194, 206, 54, 205, - 209, 212, 279, 55, 56, 213, 283, 57, 58, 59, - 140, 214, 60, 41, 222, 235, 211, 244, 241, 292, - 293, 179, 180, 181, 245, 246, 249, 254, 263, 264, - 139, 42, 270, 265, 271, 272, 43, 44, 45, 275, - 61, 276, 140, 281, 46, 256, 140, 285, 286, 288, - 295, 47, 287, 290, 48, 298, 49, 299, 300, 50, - 93, 94, 95, 96, 97, 303, 301, 98, 304, 51, - 52, 53, 305, 308, 310, 315, 316, 319, 54, 320, - 322, 324, 325, 55, 56, 326, 329, 57, 58, 59, - 116, 117, 60, 332, 328, 331, 335, 334, 336, 337, - 338, 183, 344, 153, 312, 237, 248, 284, 294, 29, - 184, 185, 186, 187, 188, 189, 190, 23, 38, 99, - 61, 0, 0, 41, 100, 101, 102, 103, 104, 0, - 105, 106, 107, 108, 0, 0, 109, 110, 0, 0, - 261, 42, 0, 0, 0, 0, 43, 44, 45, 0, - 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, - 111, 47, 0, 0, 48, 0, 49, 112, 0, 50, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, - 52, 53, 0, 41, 0, 0, 0, 0, 54, 0, - 0, 0, 0, 55, 56, 0, 0, 57, 58, 59, - 327, 42, 60, 0, 0, 0, 43, 44, 45, 0, - 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, - 0, 47, 0, 0, 48, 0, 49, 0, 0, 50, - 61, 0, 0, 0, 0, 0, 0, 0, 0, 51, - 52, 53, 41, 0, 0, 0, 0, 0, 54, 0, - 0, 0, 0, 55, 56, 0, 0, 57, 58, 59, - 42, 0, 60, 0, 0, 43, 44, 45, 0, 0, - 0, 0, 0, 46, 93, 94, 95, 96, 97, 0, - 47, 98, 0, 48, 0, 49, 0, 0, 50, 0, - 61, 0, 0, 0, 0, 0, 0, 0, 51, 52, - 53, 0, 0, 0, 0, 0, 0, 54, 0, 0, - 0, 0, 55, 56, 0, 0, 57, 58, 59, 0, - 0, 60, 210, 93, 94, 95, 96, 97, 0, 0, - 98, 0, 0, 99, 0, 0, 0, 0, 100, 101, - 102, 103, 104, 0, 105, 106, 107, 108, 0, 61, - 109, 110, 177, 178, 0, 179, 180, 181, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, - 0, 179, 180, 181, 111, 0, 0, 0, 0, 0, - 0, 112, 99, 0, 0, 0, 182, 100, 101, 102, - 103, 104, 0, 105, 106, 107, 108, 0, 0, 109, - 110, 177, 178, 0, 179, 180, 181, 0, 177, 178, - 0, 179, 180, 181, 0, 0, 0, 0, 0, 0, - 0, 0, 192, 111, 177, 178, 0, 179, 180, 181, - 112, 0, 0, 0, 0, 183, 0, 0, 0, 269, - 0, 0, 302, 0, 184, 185, 186, 187, 188, 189, - 190, 183, 0, 177, 178, 262, 179, 180, 181, 0, - 184, 185, 186, 187, 188, 189, 190, 0, 0, 0, - 0, 0, 177, 178, 307, 179, 180, 181, 0, 0, - 0, 0, 0, 0, 183, 0, 0, 0, 0, 0, - 0, 183, 0, 184, 185, 186, 187, 188, 189, 190, - 184, 185, 186, 187, 188, 189, 190, 183, 0, 0, - 0, 0, 0, 0, 0, 0, 184, 185, 186, 187, - 188, 189, 190, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 183, 0, 0, 0, - 0, 0, 0, 0, 0, 184, 185, 186, 187, 188, - 189, 190, 0, 0, 0, 183, 0, 0, 0, 0, - 0, 0, 0, 0, 184, 185, 186, 187, 188, 189, - 190 + 114, 89, 91, 169, 124, 152, 100, 171, 172, 148, + 149, 117, 150, 151, 152, 165, 10, 30, 230, 1, + 104, 26, 105, 148, 149, 189, 150, 151, 152, 296, + 297, 31, 141, 220, 221, 200, 32, 33, 34, 13, + 14, 4, 35, 152, 142, 24, 5, 34, 36, 7, + 144, 37, 225, 38, 226, 17, 39, 146, 147, 116, + 25, 6, 17, 9, 10, 154, 40, 41, 42, 166, + 241, 206, 242, 152, 154, 43, 44, 101, 45, 8, + 231, 155, 156, 157, 158, 159, 160, 161, 154, 179, + 28, 243, 245, 226, 29, 155, 156, 157, 158, 159, + 160, 161, 15, 154, 46, 259, 183, 260, 294, 23, + 295, 72, 98, 158, 159, 160, 161, 73, 184, 185, + 186, 187, 188, 74, 99, 191, 192, 193, 194, 195, + 196, 197, 198, 154, 103, 252, 107, 275, 207, 108, + 109, 114, 279, 110, 111, 160, 161, 198, 112, 119, + 115, 118, 114, 232, 122, 123, 30, 126, 127, 128, + 167, 129, 130, 131, 132, 274, 34, 133, 134, 113, + 31, 135, 168, 136, 143, 32, 33, 34, 137, 138, + 139, 35, 162, 140, 145, 164, 170, 36, 176, 173, + 37, 246, 38, 175, 181, 39, 249, 114, 177, 30, + 179, 180, 182, 255, 256, 40, 41, 42, 190, 201, + 211, 202, 227, 31, 43, 44, 208, 45, 32, 33, + 34, 212, 213, 216, 35, 219, 234, 114, 228, 229, + 36, 114, 236, 37, 239, 38, 244, 221, 39, 248, + 235, 240, 30, 46, 251, 250, 253, 261, 40, 41, + 42, 262, 266, 263, 264, 286, 31, 43, 44, 267, + 45, 32, 33, 34, 268, 271, 276, 35, 277, 280, + 281, 283, 284, 36, 285, 287, 37, 288, 38, 289, + 291, 39, 292, 293, 299, 30, 46, 218, 215, 204, + 257, 40, 41, 42, 125, 273, 150, 151, 152, 31, + 43, 44, 18, 45, 32, 33, 34, 0, 27, 0, + 35, 247, 0, 0, 0, 0, 36, 258, 0, 37, + 0, 38, 0, 0, 39, 0, 0, 0, 0, 46, + 0, 0, 0, 0, 40, 41, 42, 0, 75, 76, + 77, 78, 79, 43, 44, 80, 45, 0, 75, 76, + 77, 78, 79, 0, 0, 80, 0, 0, 154, 0, + 0, 0, 0, 0, 92, 155, 156, 157, 158, 159, + 160, 161, 46, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 75, 76, 77, 78, 79, 178, + 81, 80, 0, 0, 0, 82, 83, 84, 85, 86, + 81, 0, 0, 0, 0, 82, 83, 84, 85, 86, + 92, 0, 0, 0, 0, 0, 0, 0, 87, 0, + 93, 0, 0, 0, 0, 88, 0, 0, 87, 0, + 75, 76, 77, 78, 79, 88, 81, 80, 0, 0, + 0, 82, 83, 84, 85, 86, 148, 149, 0, 150, + 151, 152, 0, 0, 0, 0, 0, 0, 0, 0, + 153, 0, 148, 149, 87, 150, 151, 152, 0, 0, + 0, 88, 0, 0, 0, 0, 0, 0, 0, 163, + 148, 149, 81, 150, 151, 152, 0, 82, 83, 84, + 85, 86, 0, 0, 148, 149, 0, 150, 151, 152, + 0, 0, 0, 0, 0, 233, 0, 0, 265, 0, + 87, 154, 0, 0, 0, 0, 0, 88, 155, 156, + 157, 158, 159, 160, 161, 148, 149, 154, 150, 151, + 152, 0, 0, 0, 155, 156, 157, 158, 159, 160, + 161, 0, 270, 0, 0, 154, 0, 0, 0, 0, + 0, 0, 155, 156, 157, 158, 159, 160, 161, 154, + 0, 0, 0, 0, 0, 0, 155, 156, 157, 158, + 159, 160, 161, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 154, 0, 0, 0, 0, 0, 0, 155, 156, 157, + 158, 159, 160, 161 }; static const yytype_int16 yycheck[] = { - 12, 63, 42, 43, 7, 45, 73, 182, 46, 124, - 23, 35, 24, 128, 129, 7, 13, 192, 61, 3, - 4, 5, 6, 7, 57, 191, 10, 13, 7, 17, - 18, 19, 13, 21, 14, 68, 37, 111, 32, 113, - 54, 0, 56, 209, 87, 109, 111, 60, 113, 33, - 34, 110, 92, 47, 111, 7, 113, 90, 98, 111, - 111, 113, 113, 111, 111, 113, 113, 22, 60, 15, - 16, 111, 112, 43, 44, 113, 7, 109, 62, 7, - 255, 105, 197, 67, 68, 69, 70, 71, 7, 73, - 74, 75, 76, 96, 91, 79, 80, 22, 109, 8, - 9, 59, 11, 12, 13, 91, 7, 147, 105, 106, - 91, 99, 113, 46, 36, 7, 7, 7, 32, 103, - 84, 105, 103, 104, 105, 106, 110, 302, 84, 7, - 37, 109, 307, 110, 109, 109, 109, 177, 178, 179, - 180, 181, 109, 7, 184, 185, 186, 187, 188, 189, - 190, 108, 267, 193, 36, 109, 196, 108, 198, 221, - 109, 25, 109, 27, 28, 109, 30, 31, 32, 231, - 109, 238, 109, 109, 38, 109, 15, 109, 49, 109, - 109, 45, 91, 298, 48, 109, 50, 110, 109, 53, - 110, 100, 101, 102, 103, 104, 105, 106, 109, 63, - 64, 65, 111, 109, 109, 57, 110, 110, 72, 46, - 110, 109, 252, 77, 78, 66, 256, 81, 82, 83, - 282, 66, 86, 7, 5, 7, 266, 110, 7, 269, - 270, 11, 12, 13, 55, 7, 112, 52, 7, 111, - 24, 25, 100, 113, 113, 7, 30, 31, 32, 7, - 114, 110, 314, 7, 38, 28, 318, 24, 29, 7, - 272, 45, 111, 38, 48, 58, 50, 111, 115, 53, - 3, 4, 5, 6, 7, 25, 112, 10, 48, 63, - 64, 65, 88, 110, 97, 15, 41, 3, 72, 85, - 98, 110, 89, 77, 78, 42, 10, 81, 82, 83, - 33, 34, 86, 7, 111, 100, 7, 90, 29, 6, - 3, 91, 7, 73, 297, 196, 205, 258, 271, 26, - 100, 101, 102, 103, 104, 105, 106, 14, 33, 62, - 114, -1, -1, 7, 67, 68, 69, 70, 71, -1, - 73, 74, 75, 76, -1, -1, 79, 80, -1, -1, - 24, 25, -1, -1, -1, -1, 30, 31, 32, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - 103, 45, -1, -1, 48, -1, 50, 110, -1, 53, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, - 64, 65, -1, 7, -1, -1, -1, -1, 72, -1, - -1, -1, -1, 77, 78, -1, -1, 81, 82, 83, - 24, 25, 86, -1, -1, -1, 30, 31, 32, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - -1, 45, -1, -1, 48, -1, 50, -1, -1, 53, - 114, -1, -1, -1, -1, -1, -1, -1, -1, 63, - 64, 65, 7, -1, -1, -1, -1, -1, 72, -1, - -1, -1, -1, 77, 78, -1, -1, 81, 82, 83, - 25, -1, 86, -1, -1, 30, 31, 32, -1, -1, - -1, -1, -1, 38, 3, 4, 5, 6, 7, -1, - 45, 10, -1, 48, -1, 50, -1, -1, 53, -1, - 114, -1, -1, -1, -1, -1, -1, -1, 63, 64, - 65, -1, -1, -1, -1, -1, -1, 72, -1, -1, - -1, -1, 77, 78, -1, -1, 81, 82, 83, -1, - -1, 86, 51, 3, 4, 5, 6, 7, -1, -1, - 10, -1, -1, 62, -1, -1, -1, -1, 67, 68, - 69, 70, 71, -1, 73, 74, 75, 76, -1, 114, - 79, 80, 8, 9, -1, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 8, 9, - -1, 11, 12, 13, 103, -1, -1, -1, -1, -1, - -1, 110, 62, -1, -1, -1, 26, 67, 68, 69, - 70, 71, -1, 73, 74, 75, 76, -1, -1, 79, - 80, 8, 9, -1, 11, 12, 13, -1, 8, 9, - -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 29, 103, 8, 9, -1, 11, 12, 13, - 110, -1, -1, -1, -1, 91, -1, -1, -1, 39, - -1, -1, 26, -1, 100, 101, 102, 103, 104, 105, - 106, 91, -1, 8, 9, 111, 11, 12, 13, -1, - 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, - -1, -1, 8, 9, 29, 11, 12, 13, -1, -1, - -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, - -1, 91, -1, 100, 101, 102, 103, 104, 105, 106, - 100, 101, 102, 103, 104, 105, 106, 91, -1, -1, - -1, -1, -1, -1, -1, -1, 100, 101, 102, 103, - 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, - -1, -1, -1, -1, -1, 100, 101, 102, 103, 104, - 105, 106, -1, -1, -1, 91, -1, -1, -1, -1, - -1, -1, -1, -1, 100, 101, 102, 103, 104, 105, - 106 + 48, 31, 32, 99, 56, 13, 7, 103, 104, 8, + 9, 51, 11, 12, 13, 39, 7, 7, 31, 14, + 47, 19, 49, 8, 9, 153, 11, 12, 13, 36, + 37, 21, 72, 23, 24, 163, 26, 27, 28, 16, + 17, 7, 32, 13, 74, 54, 0, 28, 38, 90, + 80, 41, 91, 43, 93, 53, 46, 87, 88, 40, + 69, 89, 53, 18, 7, 73, 56, 57, 58, 93, + 91, 167, 93, 13, 73, 65, 66, 78, 68, 91, + 93, 80, 81, 82, 83, 84, 85, 86, 73, 119, + 7, 91, 220, 93, 7, 80, 81, 82, 83, 84, + 85, 86, 79, 73, 94, 91, 91, 93, 91, 89, + 93, 18, 7, 83, 84, 85, 86, 89, 148, 149, + 150, 151, 152, 52, 39, 155, 156, 157, 158, 159, + 160, 161, 162, 73, 30, 231, 7, 265, 168, 7, + 7, 189, 270, 67, 67, 85, 86, 177, 7, 31, + 89, 89, 200, 205, 89, 89, 7, 89, 89, 89, + 30, 89, 89, 89, 89, 261, 28, 89, 89, 20, + 21, 89, 15, 89, 88, 26, 27, 28, 89, 89, + 89, 32, 90, 89, 88, 90, 42, 38, 90, 50, + 41, 221, 43, 39, 59, 46, 226, 245, 90, 7, + 230, 89, 59, 233, 234, 56, 57, 58, 5, 85, + 90, 7, 20, 21, 65, 66, 7, 68, 26, 27, + 28, 48, 7, 92, 32, 45, 80, 275, 91, 93, + 38, 279, 7, 41, 7, 43, 7, 24, 46, 20, + 93, 90, 7, 94, 7, 25, 32, 51, 56, 57, + 58, 91, 21, 95, 92, 20, 21, 65, 66, 41, + 68, 26, 27, 28, 70, 90, 15, 32, 34, 3, + 10, 90, 71, 38, 35, 91, 41, 6, 43, 7, + 72, 46, 7, 25, 7, 7, 94, 177, 175, 166, + 235, 56, 57, 58, 56, 260, 11, 12, 13, 21, + 65, 66, 12, 68, 26, 27, 28, -1, 22, -1, + 32, 223, -1, -1, -1, -1, 38, 236, -1, 41, + -1, 43, -1, -1, 46, -1, -1, -1, -1, 94, + -1, -1, -1, -1, 56, 57, 58, -1, 3, 4, + 5, 6, 7, 65, 66, 10, 68, -1, 3, 4, + 5, 6, 7, -1, -1, 10, -1, -1, 73, -1, + -1, -1, -1, -1, 29, 80, 81, 82, 83, 84, + 85, 86, 94, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, 6, 7, 44, + 55, 10, -1, -1, -1, 60, 61, 62, 63, 64, + 55, -1, -1, -1, -1, 60, 61, 62, 63, 64, + 29, -1, -1, -1, -1, -1, -1, -1, 83, -1, + 85, -1, -1, -1, -1, 90, -1, -1, 83, -1, + 3, 4, 5, 6, 7, 90, 55, 10, -1, -1, + -1, 60, 61, 62, 63, 64, 8, 9, -1, 11, + 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + 22, -1, 8, 9, 83, 11, 12, 13, -1, -1, + -1, 90, -1, -1, -1, -1, -1, -1, -1, 25, + 8, 9, 55, 11, 12, 13, -1, 60, 61, 62, + 63, 64, -1, -1, 8, 9, -1, 11, 12, 13, + -1, -1, -1, -1, -1, 33, -1, -1, 22, -1, + 83, 73, -1, -1, -1, -1, -1, 90, 80, 81, + 82, 83, 84, 85, 86, 8, 9, 73, 11, 12, + 13, -1, -1, -1, 80, 81, 82, 83, 84, 85, + 86, -1, 25, -1, -1, 73, -1, -1, -1, -1, + -1, -1, 80, 81, 82, 83, 84, 85, 86, 73, + -1, -1, -1, -1, -1, -1, 80, 81, 82, 83, + 84, 85, 86, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 73, -1, -1, -1, -1, -1, -1, 80, 81, 82, + 83, 84, 85, 86 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 14, 117, 187, 7, 0, 109, 110, 7, 179, - 180, 15, 16, 111, 113, 17, 18, 19, 21, 99, - 178, 178, 22, 179, 7, 181, 182, 178, 60, 181, - 183, 184, 185, 186, 109, 61, 87, 23, 185, 7, - 7, 7, 25, 30, 31, 32, 38, 45, 48, 50, - 53, 63, 64, 65, 72, 77, 78, 81, 82, 83, - 86, 114, 118, 119, 123, 124, 125, 138, 139, 140, - 144, 145, 146, 147, 148, 149, 150, 151, 155, 156, - 157, 158, 159, 160, 161, 162, 170, 174, 176, 177, - 22, 109, 59, 3, 4, 5, 6, 7, 10, 62, - 67, 68, 69, 70, 71, 73, 74, 75, 76, 79, - 80, 103, 110, 120, 121, 120, 33, 34, 105, 120, - 130, 131, 132, 7, 46, 7, 96, 175, 36, 54, - 56, 172, 7, 7, 7, 138, 84, 84, 7, 24, - 118, 109, 110, 109, 47, 138, 109, 37, 133, 143, - 109, 109, 133, 143, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 138, 120, 108, 120, 108, 120, 120, 8, 9, 11, - 12, 13, 26, 91, 100, 101, 102, 103, 104, 105, - 106, 110, 29, 110, 110, 46, 113, 36, 15, 175, - 49, 175, 175, 57, 173, 46, 110, 120, 129, 110, - 51, 120, 109, 66, 66, 111, 120, 120, 120, 120, - 120, 119, 5, 120, 120, 120, 120, 120, 120, 120, - 129, 119, 120, 35, 105, 7, 128, 130, 127, 175, - 120, 7, 141, 142, 110, 55, 7, 126, 128, 112, - 122, 111, 113, 129, 52, 27, 28, 152, 153, 154, - 111, 24, 111, 7, 111, 113, 37, 113, 133, 39, - 100, 113, 7, 163, 164, 7, 110, 111, 113, 120, - 111, 7, 119, 120, 152, 24, 29, 111, 7, 175, - 38, 134, 120, 120, 141, 178, 111, 113, 58, 111, - 115, 112, 26, 25, 48, 88, 135, 29, 110, 165, - 97, 168, 163, 175, 119, 15, 41, 137, 119, 3, - 85, 166, 98, 169, 110, 89, 42, 24, 111, 10, - 167, 100, 7, 171, 90, 7, 29, 6, 3, 111, - 113, 43, 44, 136, 7 + 0, 14, 97, 159, 7, 0, 89, 90, 91, 18, + 7, 153, 154, 16, 17, 79, 152, 53, 153, 155, + 156, 157, 158, 89, 54, 69, 19, 157, 7, 7, + 7, 21, 26, 27, 28, 32, 38, 41, 43, 46, + 56, 57, 58, 65, 66, 68, 94, 98, 99, 103, + 116, 117, 118, 122, 123, 124, 125, 126, 127, 128, + 132, 133, 134, 135, 136, 137, 138, 139, 144, 148, + 150, 151, 18, 89, 52, 3, 4, 5, 6, 7, + 10, 55, 60, 61, 62, 63, 64, 83, 90, 100, + 101, 100, 29, 85, 100, 108, 109, 110, 7, 39, + 7, 78, 149, 30, 47, 49, 146, 7, 7, 7, + 67, 67, 7, 20, 98, 89, 40, 116, 89, 31, + 111, 121, 89, 89, 111, 121, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 116, 100, 88, 100, 88, 100, 100, 8, 9, + 11, 12, 13, 22, 73, 80, 81, 82, 83, 84, + 85, 86, 90, 25, 90, 39, 93, 30, 15, 149, + 42, 149, 149, 50, 147, 39, 90, 90, 44, 100, + 89, 59, 59, 91, 100, 100, 100, 100, 100, 99, + 5, 100, 100, 100, 100, 100, 100, 100, 100, 107, + 99, 85, 7, 106, 108, 105, 149, 100, 7, 119, + 120, 90, 48, 7, 104, 106, 92, 102, 107, 45, + 23, 24, 129, 130, 131, 91, 93, 20, 91, 93, + 31, 93, 111, 33, 80, 93, 7, 140, 141, 7, + 90, 91, 93, 91, 7, 99, 100, 129, 20, 100, + 25, 7, 149, 32, 112, 100, 100, 119, 152, 91, + 93, 51, 91, 95, 92, 22, 21, 41, 70, 113, + 25, 90, 142, 140, 149, 99, 15, 34, 115, 99, + 3, 10, 143, 90, 71, 35, 20, 91, 6, 7, + 145, 72, 7, 25, 91, 93, 36, 37, 114, 7 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 116, 117, 118, 118, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 118, 118, 118, 118, 119, 119, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 122, 122, 122, 123, 124, 125, 125, - 125, 126, 127, 127, 128, 128, 128, 129, 129, 129, - 130, 130, 130, 130, 131, 131, 131, 132, 132, 132, - 133, 133, 134, 134, 135, 135, 136, 136, 136, 137, - 137, 138, 139, 140, 140, 141, 142, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 153, - 154, 154, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 162, 163, 164, 164, 165, 165, 166, 166, 167, - 167, 168, 168, 169, 169, 170, 171, 171, 172, 172, - 173, 173, 174, 175, 175, 176, 177, 178, 178, 178, - 178, 178, 179, 179, 180, 180, 180, 181, 182, 182, - 182, 183, 184, 185, 185, 186, 186, 186, 187 + 0, 96, 97, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 99, 99, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 101, 101, 101, 101, 101, 102, 102, 102, 103, 104, + 105, 105, 106, 106, 106, 107, 107, 107, 108, 108, + 109, 109, 109, 110, 110, 110, 111, 111, 112, 112, + 113, 113, 114, 114, 114, 115, 115, 116, 117, 118, + 118, 119, 120, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 130, 131, 131, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 139, 140, 141, 141, + 142, 142, 143, 143, 144, 145, 145, 146, 146, 147, + 147, 148, 149, 149, 150, 151, 152, 152, 152, 153, + 154, 154, 154, 155, 156, 157, 157, 158, 158, 158, + 159 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1003,22 +910,20 @@ static const yytype_uint8 yyr2[] = { 0, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 2, 1, 4, 1, - 1, 1, 1, 1, 3, 3, 3, 3, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1, 3, 6, 4, 1, 1, - 1, 3, 1, 3, 0, 1, 3, 0, 1, 3, - 1, 4, 5, 4, 0, 1, 3, 1, 3, 1, - 0, 2, 0, 2, 0, 4, 0, 1, 1, 0, - 4, 8, 3, 5, 2, 3, 1, 3, 4, 4, - 2, 2, 3, 2, 2, 2, 3, 4, 1, 2, - 0, 2, 1, 7, 6, 10, 1, 1, 2, 2, - 4, 4, 5, 1, 3, 0, 3, 0, 1, 0, - 2, 0, 1, 0, 3, 8, 1, 3, 0, 1, - 0, 1, 10, 1, 1, 2, 2, 1, 1, 1, - 1, 1, 3, 3, 0, 1, 3, 3, 0, 1, - 2, 6, 4, 1, 1, 0, 1, 2, 11 + 2, 2, 2, 1, 2, 1, 4, 1, 1, 1, + 1, 1, 3, 3, 3, 3, 2, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, + 1, 1, 1, 1, 1, 0, 1, 3, 6, 3, + 1, 3, 0, 1, 3, 0, 1, 3, 1, 4, + 0, 1, 3, 1, 3, 1, 0, 2, 0, 2, + 0, 4, 0, 1, 1, 0, 4, 8, 3, 5, + 2, 3, 1, 3, 4, 4, 2, 2, 3, 2, + 2, 3, 4, 1, 2, 0, 2, 1, 7, 6, + 10, 1, 1, 2, 2, 4, 4, 4, 1, 3, + 0, 3, 0, 2, 6, 1, 3, 0, 1, 0, + 1, 10, 1, 1, 2, 2, 1, 1, 1, 3, + 0, 1, 2, 6, 4, 1, 1, 0, 1, 2, + 10 }; @@ -1034,22 +939,22 @@ static const yytype_uint8 yyr2[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) /* Error token number */ #define YYTERROR 1 @@ -1089,37 +994,39 @@ do { \ } while (0) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { - FILE *yyo = yyoutput; - YYUSE (yyo); + FILE *yyoutput = yyo; + YYUSE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) { - YYFPRINTF (yyoutput, "%s %s (", + YYFPRINTF (yyo, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyo, yytype, yyvaluep); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -1153,7 +1060,7 @@ do { \ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { - unsigned long int yylno = yyrline[yyrule]; + unsigned long yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", @@ -1164,7 +1071,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) + &yyvsp[(yyi + 1) - (yynrhs)] ); YYFPRINTF (stderr, "\n"); } @@ -1268,7 +1175,10 @@ yytnamerr (char *yyres, const char *yystr) case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - /* Fall through. */ + else + goto append; + + append: default: if (yyres) yyres[yyn] = *yyp; @@ -1286,7 +1196,7 @@ yytnamerr (char *yyres, const char *yystr) if (! yyres) return yystrlen (yystr); - return yystpcpy (yyres, yystr) - yyres; + return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); } # endif @@ -1364,10 +1274,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else return 2; - yysize = yysize1; } } } @@ -1379,6 +1289,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, case N: \ yyformat = S; \ break + default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); @@ -1390,9 +1301,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else return 2; - yysize = yysize1; } if (*yymsg_alloc < yysize) @@ -1518,23 +1430,33 @@ yyparse (void) yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; + /*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | +| yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ - yynewstate: +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: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| yynewstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + *yyssp = (yytype_int16) yystate; if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + goto yyexhaustedlab; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); -#ifdef yyoverflow +# 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 @@ -1550,14 +1472,10 @@ yyparse (void) &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); - yyss = yyss1; yyvs = yyvs1; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; @@ -1573,35 +1491,33 @@ yyparse (void) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif -#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +#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. */ @@ -1659,7 +1575,6 @@ yybackup: YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END - goto yynewstate; @@ -1674,7 +1589,7 @@ yydefault: /*-----------------------------. -| yyreduce -- Do a reduction. | +| yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ @@ -1694,953 +1609,779 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 25: -#line 188 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 1701 "pars0grm.cc" /* yacc.c:1646 */ + case 23: +#line 166 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 1616 "pars0grm.cc" + break; + + case 24: +#line 168 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); } +#line 1622 "pars0grm.cc" + break; + + case 25: +#line 172 "pars0grm.y" + { yyval = yyvsp[0];} +#line 1628 "pars0grm.cc" break; case 26: -#line 190 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-1]), (yyvsp[0])); } -#line 1707 "pars0grm.cc" /* yacc.c:1646 */ +#line 174 "pars0grm.y" + { yyval = pars_func(yyvsp[-3], yyvsp[-1]); } +#line 1634 "pars0grm.cc" break; case 27: -#line 194 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]);} -#line 1713 "pars0grm.cc" /* yacc.c:1646 */ +#line 175 "pars0grm.y" + { yyval = yyvsp[0];} +#line 1640 "pars0grm.cc" break; case 28: -#line 196 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_func((yyvsp[-3]), (yyvsp[-1])); } -#line 1719 "pars0grm.cc" /* yacc.c:1646 */ +#line 176 "pars0grm.y" + { yyval = yyvsp[0];} +#line 1646 "pars0grm.cc" break; case 29: -#line 197 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]);} -#line 1725 "pars0grm.cc" /* yacc.c:1646 */ +#line 177 "pars0grm.y" + { yyval = yyvsp[0];} +#line 1652 "pars0grm.cc" break; case 30: -#line 198 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]);} -#line 1731 "pars0grm.cc" /* yacc.c:1646 */ +#line 178 "pars0grm.y" + { yyval = yyvsp[0];} +#line 1658 "pars0grm.cc" break; case 31: -#line 199 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]);} -#line 1737 "pars0grm.cc" /* yacc.c:1646 */ +#line 179 "pars0grm.y" + { yyval = yyvsp[0];} +#line 1664 "pars0grm.cc" break; case 32: -#line 200 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]);} -#line 1743 "pars0grm.cc" /* yacc.c:1646 */ +#line 180 "pars0grm.y" + { yyval = pars_op('+', yyvsp[-2], yyvsp[0]); } +#line 1670 "pars0grm.cc" break; case 33: -#line 201 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]);} -#line 1749 "pars0grm.cc" /* yacc.c:1646 */ +#line 181 "pars0grm.y" + { yyval = pars_op('-', yyvsp[-2], yyvsp[0]); } +#line 1676 "pars0grm.cc" break; case 34: -#line 202 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('+', (yyvsp[-2]), (yyvsp[0])); } -#line 1755 "pars0grm.cc" /* yacc.c:1646 */ +#line 182 "pars0grm.y" + { yyval = pars_op('*', yyvsp[-2], yyvsp[0]); } +#line 1682 "pars0grm.cc" break; case 35: -#line 203 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('-', (yyvsp[-2]), (yyvsp[0])); } -#line 1761 "pars0grm.cc" /* yacc.c:1646 */ +#line 183 "pars0grm.y" + { yyval = pars_op('/', yyvsp[-2], yyvsp[0]); } +#line 1688 "pars0grm.cc" break; case 36: -#line 204 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('*', (yyvsp[-2]), (yyvsp[0])); } -#line 1767 "pars0grm.cc" /* yacc.c:1646 */ +#line 184 "pars0grm.y" + { yyval = pars_op('-', yyvsp[0], NULL); } +#line 1694 "pars0grm.cc" break; case 37: -#line 205 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('/', (yyvsp[-2]), (yyvsp[0])); } -#line 1773 "pars0grm.cc" /* yacc.c:1646 */ +#line 185 "pars0grm.y" + { yyval = yyvsp[-1]; } +#line 1700 "pars0grm.cc" break; case 38: -#line 206 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('-', (yyvsp[0]), NULL); } -#line 1779 "pars0grm.cc" /* yacc.c:1646 */ +#line 186 "pars0grm.y" + { yyval = pars_op('=', yyvsp[-2], yyvsp[0]); } +#line 1706 "pars0grm.cc" break; case 39: -#line 207 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[-1]); } -#line 1785 "pars0grm.cc" /* yacc.c:1646 */ +#line 188 "pars0grm.y" + { yyval = pars_op(PARS_LIKE_TOKEN, yyvsp[-2], yyvsp[0]); } +#line 1712 "pars0grm.cc" break; case 40: -#line 208 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('=', (yyvsp[-2]), (yyvsp[0])); } -#line 1791 "pars0grm.cc" /* yacc.c:1646 */ +#line 189 "pars0grm.y" + { yyval = pars_op('<', yyvsp[-2], yyvsp[0]); } +#line 1718 "pars0grm.cc" break; case 41: -#line 210 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_LIKE_TOKEN, (yyvsp[-2]), (yyvsp[0])); } -#line 1797 "pars0grm.cc" /* yacc.c:1646 */ +#line 190 "pars0grm.y" + { yyval = pars_op('>', yyvsp[-2], yyvsp[0]); } +#line 1724 "pars0grm.cc" break; case 42: -#line 211 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('<', (yyvsp[-2]), (yyvsp[0])); } -#line 1803 "pars0grm.cc" /* yacc.c:1646 */ +#line 191 "pars0grm.y" + { yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); } +#line 1730 "pars0grm.cc" break; case 43: -#line 212 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op('>', (yyvsp[-2]), (yyvsp[0])); } -#line 1809 "pars0grm.cc" /* yacc.c:1646 */ +#line 192 "pars0grm.y" + { yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); } +#line 1736 "pars0grm.cc" break; case 44: -#line 213 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_GE_TOKEN, (yyvsp[-2]), (yyvsp[0])); } -#line 1815 "pars0grm.cc" /* yacc.c:1646 */ +#line 193 "pars0grm.y" + { yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); } +#line 1742 "pars0grm.cc" break; case 45: -#line 214 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_LE_TOKEN, (yyvsp[-2]), (yyvsp[0])); } -#line 1821 "pars0grm.cc" /* yacc.c:1646 */ +#line 194 "pars0grm.y" + { yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); } +#line 1748 "pars0grm.cc" break; case 46: -#line 215 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_NE_TOKEN, (yyvsp[-2]), (yyvsp[0])); } -#line 1827 "pars0grm.cc" /* yacc.c:1646 */ +#line 195 "pars0grm.y" + { yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); } +#line 1754 "pars0grm.cc" break; case 47: -#line 216 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_AND_TOKEN, (yyvsp[-2]), (yyvsp[0])); } -#line 1833 "pars0grm.cc" /* yacc.c:1646 */ +#line 196 "pars0grm.y" + { yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); } +#line 1760 "pars0grm.cc" break; case 48: -#line 217 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_OR_TOKEN, (yyvsp[-2]), (yyvsp[0])); } -#line 1839 "pars0grm.cc" /* yacc.c:1646 */ +#line 198 "pars0grm.y" + { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); } +#line 1766 "pars0grm.cc" break; case 49: -#line 218 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_NOT_TOKEN, (yyvsp[0]), NULL); } -#line 1845 "pars0grm.cc" /* yacc.c:1646 */ +#line 200 "pars0grm.y" + { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); } +#line 1772 "pars0grm.cc" break; case 50: -#line 220 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_NOTFOUND_TOKEN, (yyvsp[-2]), NULL); } -#line 1851 "pars0grm.cc" /* yacc.c:1646 */ +#line 204 "pars0grm.y" + { yyval = &pars_to_binary_token; } +#line 1778 "pars0grm.cc" break; case 51: -#line 222 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_op(PARS_NOTFOUND_TOKEN, (yyvsp[-2]), NULL); } -#line 1857 "pars0grm.cc" /* yacc.c:1646 */ +#line 205 "pars0grm.y" + { yyval = &pars_substr_token; } +#line 1784 "pars0grm.cc" break; case 52: -#line 226 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_to_char_token; } -#line 1863 "pars0grm.cc" /* yacc.c:1646 */ +#line 206 "pars0grm.y" + { yyval = &pars_concat_token; } +#line 1790 "pars0grm.cc" break; case 53: -#line 227 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_to_number_token; } -#line 1869 "pars0grm.cc" /* yacc.c:1646 */ +#line 207 "pars0grm.y" + { yyval = &pars_instr_token; } +#line 1796 "pars0grm.cc" break; case 54: -#line 228 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_to_binary_token; } -#line 1875 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 55: -#line 230 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_binary_to_number_token; } -#line 1881 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 56: -#line 231 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_substr_token; } -#line 1887 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 57: -#line 232 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_concat_token; } -#line 1893 "pars0grm.cc" /* yacc.c:1646 */ +#line 208 "pars0grm.y" + { yyval = &pars_length_token; } +#line 1802 "pars0grm.cc" break; case 58: -#line 233 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_instr_token; } -#line 1899 "pars0grm.cc" /* yacc.c:1646 */ +#line 219 "pars0grm.y" + { yyval = pars_stored_procedure_call( + static_cast(yyvsp[-4])); } +#line 1809 "pars0grm.cc" break; case 59: -#line 234 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_length_token; } -#line 1905 "pars0grm.cc" /* yacc.c:1646 */ +#line 224 "pars0grm.y" + { yyval = yyvsp[-2]; } +#line 1815 "pars0grm.cc" break; case 60: -#line 235 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_sysdate_token; } -#line 1911 "pars0grm.cc" /* yacc.c:1646 */ +#line 228 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 1821 "pars0grm.cc" break; case 61: -#line 236 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_rnd_token; } -#line 1917 "pars0grm.cc" /* yacc.c:1646 */ +#line 230 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 1827 "pars0grm.cc" break; case 62: -#line 237 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_rnd_str_token; } -#line 1923 "pars0grm.cc" /* yacc.c:1646 */ +#line 234 "pars0grm.y" + { yyval = NULL; } +#line 1833 "pars0grm.cc" + break; + + case 63: +#line 235 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 1839 "pars0grm.cc" + break; + + case 64: +#line 237 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 1845 "pars0grm.cc" + break; + + case 65: +#line 241 "pars0grm.y" + { yyval = NULL; } +#line 1851 "pars0grm.cc" break; case 66: -#line 248 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_stored_procedure_call( - static_cast((yyvsp[-4]))); } -#line 1930 "pars0grm.cc" /* yacc.c:1646 */ +#line 242 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]);} +#line 1857 "pars0grm.cc" break; case 67: -#line 254 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_procedure_call((yyvsp[-3]), (yyvsp[-1])); } -#line 1936 "pars0grm.cc" /* yacc.c:1646 */ +#line 243 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 1863 "pars0grm.cc" break; case 68: -#line 258 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_replstr_token; } -#line 1942 "pars0grm.cc" /* yacc.c:1646 */ +#line 247 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 1869 "pars0grm.cc" break; case 69: -#line 259 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_printf_token; } -#line 1948 "pars0grm.cc" /* yacc.c:1646 */ +#line 249 "pars0grm.y" + { yyval = pars_func(&pars_count_token, + que_node_list_add_last(NULL, + sym_tab_add_int_lit( + pars_sym_tab_global, 1))); } +#line 1878 "pars0grm.cc" break; case 70: -#line 260 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_assert_token; } -#line 1954 "pars0grm.cc" /* yacc.c:1646 */ +#line 256 "pars0grm.y" + { yyval = NULL; } +#line 1884 "pars0grm.cc" break; case 71: -#line 264 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[-2]); } -#line 1960 "pars0grm.cc" /* yacc.c:1646 */ +#line 257 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 1890 "pars0grm.cc" break; case 72: -#line 268 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 1966 "pars0grm.cc" /* yacc.c:1646 */ +#line 259 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 1896 "pars0grm.cc" break; case 73: -#line 270 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 1972 "pars0grm.cc" /* yacc.c:1646 */ +#line 263 "pars0grm.y" + { yyval = pars_select_list(&pars_star_denoter, + NULL); } +#line 1903 "pars0grm.cc" break; case 74: -#line 274 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 1978 "pars0grm.cc" /* yacc.c:1646 */ +#line 266 "pars0grm.y" + { yyval = pars_select_list( + yyvsp[-2], static_cast(yyvsp[0])); } +#line 1910 "pars0grm.cc" break; case 75: -#line 275 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 1984 "pars0grm.cc" /* yacc.c:1646 */ +#line 268 "pars0grm.y" + { yyval = pars_select_list(yyvsp[0], NULL); } +#line 1916 "pars0grm.cc" break; case 76: -#line 277 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 1990 "pars0grm.cc" /* yacc.c:1646 */ +#line 272 "pars0grm.y" + { yyval = NULL; } +#line 1922 "pars0grm.cc" break; case 77: -#line 281 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 1996 "pars0grm.cc" /* yacc.c:1646 */ +#line 273 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 1928 "pars0grm.cc" break; case 78: -#line 282 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0]));} -#line 2002 "pars0grm.cc" /* yacc.c:1646 */ +#line 277 "pars0grm.y" + { yyval = NULL; } +#line 1934 "pars0grm.cc" break; case 79: -#line 283 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 2008 "pars0grm.cc" /* yacc.c:1646 */ +#line 279 "pars0grm.y" + { yyval = &pars_update_token; } +#line 1940 "pars0grm.cc" break; case 80: -#line 287 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2014 "pars0grm.cc" /* yacc.c:1646 */ +#line 283 "pars0grm.y" + { yyval = NULL; } +#line 1946 "pars0grm.cc" break; case 81: -#line 289 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_func(&pars_count_token, - que_node_list_add_last(NULL, - sym_tab_add_int_lit( - pars_sym_tab_global, 1))); } -#line 2023 "pars0grm.cc" /* yacc.c:1646 */ +#line 285 "pars0grm.y" + { yyval = &pars_share_token; } +#line 1952 "pars0grm.cc" break; case 82: -#line 294 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_func(&pars_count_token, - que_node_list_add_last(NULL, - pars_func(&pars_distinct_token, - que_node_list_add_last( - NULL, (yyvsp[-1]))))); } -#line 2033 "pars0grm.cc" /* yacc.c:1646 */ +#line 289 "pars0grm.y" + { yyval = &pars_asc_token; } +#line 1958 "pars0grm.cc" break; case 83: -#line 300 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_func(&pars_sum_token, - que_node_list_add_last(NULL, - (yyvsp[-1]))); } -#line 2041 "pars0grm.cc" /* yacc.c:1646 */ +#line 290 "pars0grm.y" + { yyval = &pars_asc_token; } +#line 1964 "pars0grm.cc" break; case 84: -#line 306 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2047 "pars0grm.cc" /* yacc.c:1646 */ +#line 291 "pars0grm.y" + { yyval = &pars_desc_token; } +#line 1970 "pars0grm.cc" break; case 85: -#line 307 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 2053 "pars0grm.cc" /* yacc.c:1646 */ +#line 295 "pars0grm.y" + { yyval = NULL; } +#line 1976 "pars0grm.cc" break; case 86: -#line 309 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 2059 "pars0grm.cc" /* yacc.c:1646 */ +#line 297 "pars0grm.y" + { yyval = pars_order_by( + static_cast(yyvsp[-1]), + static_cast(yyvsp[0])); } +#line 1984 "pars0grm.cc" break; case 87: -#line 313 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_select_list(&pars_star_denoter, - NULL); } -#line 2066 "pars0grm.cc" /* yacc.c:1646 */ +#line 308 "pars0grm.y" + { yyval = pars_select_statement( + static_cast(yyvsp[-6]), + static_cast(yyvsp[-4]), + static_cast(yyvsp[-3]), + static_cast(yyvsp[-2]), + static_cast(yyvsp[-1]), + static_cast(yyvsp[0])); } +#line 1996 "pars0grm.cc" break; case 88: -#line 316 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_select_list( - (yyvsp[-2]), static_cast((yyvsp[0]))); } -#line 2073 "pars0grm.cc" /* yacc.c:1646 */ +#line 319 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 2002 "pars0grm.cc" break; case 89: -#line 318 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_select_list((yyvsp[0]), NULL); } -#line 2079 "pars0grm.cc" /* yacc.c:1646 */ +#line 324 "pars0grm.y" + { yyval = pars_insert_statement( + static_cast(yyvsp[-4]), yyvsp[-1], NULL); } +#line 2009 "pars0grm.cc" break; case 90: -#line 322 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2085 "pars0grm.cc" /* yacc.c:1646 */ +#line 327 "pars0grm.y" + { yyval = pars_insert_statement( + static_cast(yyvsp[-1]), + NULL, + static_cast(yyvsp[0])); } +#line 2018 "pars0grm.cc" break; case 91: -#line 323 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2091 "pars0grm.cc" /* yacc.c:1646 */ +#line 334 "pars0grm.y" + { yyval = pars_column_assignment( + static_cast(yyvsp[-2]), + static_cast(yyvsp[0])); } +#line 2026 "pars0grm.cc" break; case 92: -#line 327 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2097 "pars0grm.cc" /* yacc.c:1646 */ +#line 340 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 2032 "pars0grm.cc" break; case 93: -#line 329 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_update_token; } -#line 2103 "pars0grm.cc" /* yacc.c:1646 */ +#line 342 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 2038 "pars0grm.cc" break; case 94: -#line 333 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2109 "pars0grm.cc" /* yacc.c:1646 */ +#line 348 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 2044 "pars0grm.cc" break; case 95: -#line 335 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_share_token; } -#line 2115 "pars0grm.cc" /* yacc.c:1646 */ +#line 354 "pars0grm.y" + { yyval = pars_update_statement_start( + FALSE, + static_cast(yyvsp[-2]), + static_cast(yyvsp[0])); } +#line 2053 "pars0grm.cc" break; case 96: -#line 339 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_asc_token; } -#line 2121 "pars0grm.cc" /* yacc.c:1646 */ +#line 362 "pars0grm.y" + { yyval = pars_update_statement( + static_cast(yyvsp[-1]), + NULL, + static_cast(yyvsp[0])); } +#line 2062 "pars0grm.cc" break; case 97: -#line 340 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_asc_token; } -#line 2127 "pars0grm.cc" /* yacc.c:1646 */ +#line 370 "pars0grm.y" + { yyval = pars_update_statement( + static_cast(yyvsp[-1]), + static_cast(yyvsp[0]), + NULL); } +#line 2071 "pars0grm.cc" break; case 98: -#line 341 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_desc_token; } -#line 2133 "pars0grm.cc" /* yacc.c:1646 */ +#line 378 "pars0grm.y" + { yyval = pars_update_statement_start( + TRUE, + static_cast(yyvsp[0]), NULL); } +#line 2079 "pars0grm.cc" break; case 99: -#line 345 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2139 "pars0grm.cc" /* yacc.c:1646 */ +#line 385 "pars0grm.y" + { yyval = pars_update_statement( + static_cast(yyvsp[-1]), + NULL, + static_cast(yyvsp[0])); } +#line 2088 "pars0grm.cc" break; case 100: -#line 347 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_order_by( - static_cast((yyvsp[-1])), - static_cast((yyvsp[0]))); } -#line 2147 "pars0grm.cc" /* yacc.c:1646 */ +#line 393 "pars0grm.y" + { yyval = pars_update_statement( + static_cast(yyvsp[-1]), + static_cast(yyvsp[0]), + NULL); } +#line 2097 "pars0grm.cc" break; case 101: -#line 358 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_select_statement( - static_cast((yyvsp[-6])), - static_cast((yyvsp[-4])), - static_cast((yyvsp[-3])), - static_cast((yyvsp[-2])), - static_cast((yyvsp[-1])), - static_cast((yyvsp[0]))); } -#line 2159 "pars0grm.cc" /* yacc.c:1646 */ +#line 401 "pars0grm.y" + { yyval = pars_assignment_statement( + static_cast(yyvsp[-2]), + static_cast(yyvsp[0])); } +#line 2105 "pars0grm.cc" break; case 102: -#line 369 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2165 "pars0grm.cc" /* yacc.c:1646 */ +#line 409 "pars0grm.y" + { yyval = pars_elsif_element(yyvsp[-2], yyvsp[0]); } +#line 2111 "pars0grm.cc" break; case 103: -#line 374 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_insert_statement( - static_cast((yyvsp[-4])), (yyvsp[-1]), NULL); } -#line 2172 "pars0grm.cc" /* yacc.c:1646 */ +#line 413 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 2117 "pars0grm.cc" break; case 104: -#line 377 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_insert_statement( - static_cast((yyvsp[-1])), - NULL, - static_cast((yyvsp[0]))); } -#line 2181 "pars0grm.cc" /* yacc.c:1646 */ +#line 415 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); } +#line 2123 "pars0grm.cc" break; case 105: -#line 384 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_column_assignment( - static_cast((yyvsp[-2])), - static_cast((yyvsp[0]))); } -#line 2189 "pars0grm.cc" /* yacc.c:1646 */ +#line 419 "pars0grm.y" + { yyval = NULL; } +#line 2129 "pars0grm.cc" break; case 106: -#line 390 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 2195 "pars0grm.cc" /* yacc.c:1646 */ +#line 421 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 2135 "pars0grm.cc" break; case 107: -#line 392 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 2201 "pars0grm.cc" /* yacc.c:1646 */ +#line 422 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 2141 "pars0grm.cc" break; case 108: -#line 398 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2207 "pars0grm.cc" /* yacc.c:1646 */ +#line 429 "pars0grm.y" + { yyval = pars_if_statement(yyvsp[-5], yyvsp[-3], yyvsp[-2]); } +#line 2147 "pars0grm.cc" break; case 109: -#line 404 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_update_statement_start( - FALSE, - static_cast((yyvsp[-2])), - static_cast((yyvsp[0]))); } -#line 2216 "pars0grm.cc" /* yacc.c:1646 */ +#line 435 "pars0grm.y" + { yyval = pars_while_statement(yyvsp[-4], yyvsp[-2]); } +#line 2153 "pars0grm.cc" break; case 110: -#line 412 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_update_statement( - static_cast((yyvsp[-1])), - NULL, - static_cast((yyvsp[0]))); } -#line 2225 "pars0grm.cc" /* yacc.c:1646 */ +#line 443 "pars0grm.y" + { yyval = pars_for_statement( + static_cast(yyvsp[-8]), + yyvsp[-6], yyvsp[-4], yyvsp[-2]); } +#line 2161 "pars0grm.cc" break; case 111: -#line 420 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_update_statement( - static_cast((yyvsp[-1])), - static_cast((yyvsp[0])), - NULL); } -#line 2234 "pars0grm.cc" /* yacc.c:1646 */ +#line 449 "pars0grm.y" + { yyval = pars_exit_statement(); } +#line 2167 "pars0grm.cc" break; case 112: -#line 428 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_update_statement_start( - TRUE, - static_cast((yyvsp[0])), NULL); } -#line 2242 "pars0grm.cc" /* yacc.c:1646 */ +#line 453 "pars0grm.y" + { yyval = pars_return_statement(); } +#line 2173 "pars0grm.cc" break; case 113: -#line 435 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_update_statement( - static_cast((yyvsp[-1])), - NULL, - static_cast((yyvsp[0]))); } -#line 2251 "pars0grm.cc" /* yacc.c:1646 */ +#line 458 "pars0grm.y" + { yyval = pars_open_statement( + ROW_SEL_OPEN_CURSOR, + static_cast(yyvsp[0])); } +#line 2181 "pars0grm.cc" break; case 114: -#line 443 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_update_statement( - static_cast((yyvsp[-1])), - static_cast((yyvsp[0])), - NULL); } -#line 2260 "pars0grm.cc" /* yacc.c:1646 */ +#line 465 "pars0grm.y" + { yyval = pars_open_statement( + ROW_SEL_CLOSE_CURSOR, + static_cast(yyvsp[0])); } +#line 2189 "pars0grm.cc" break; case 115: -#line 451 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_row_printf_statement( - static_cast((yyvsp[0]))); } -#line 2267 "pars0grm.cc" /* yacc.c:1646 */ +#line 472 "pars0grm.y" + { yyval = pars_fetch_statement( + static_cast(yyvsp[-2]), + static_cast(yyvsp[0]), NULL); } +#line 2197 "pars0grm.cc" break; case 116: -#line 457 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_assignment_statement( - static_cast((yyvsp[-2])), - static_cast((yyvsp[0]))); } -#line 2275 "pars0grm.cc" /* yacc.c:1646 */ +#line 476 "pars0grm.y" + { yyval = pars_fetch_statement( + static_cast(yyvsp[-2]), + NULL, + static_cast(yyvsp[0])); } +#line 2206 "pars0grm.cc" break; case 117: -#line 465 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_elsif_element((yyvsp[-2]), (yyvsp[0])); } -#line 2281 "pars0grm.cc" /* yacc.c:1646 */ +#line 484 "pars0grm.y" + { yyval = pars_column_def( + static_cast(yyvsp[-3]), + static_cast(yyvsp[-2]), + static_cast(yyvsp[-1]), + yyvsp[0]); } +#line 2216 "pars0grm.cc" break; case 118: -#line 469 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 2287 "pars0grm.cc" /* yacc.c:1646 */ +#line 492 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 2222 "pars0grm.cc" break; case 119: -#line 471 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-1]), (yyvsp[0])); } -#line 2293 "pars0grm.cc" /* yacc.c:1646 */ +#line 494 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 2228 "pars0grm.cc" break; case 120: -#line 475 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2299 "pars0grm.cc" /* yacc.c:1646 */ +#line 498 "pars0grm.y" + { yyval = NULL; } +#line 2234 "pars0grm.cc" break; case 121: -#line 477 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2305 "pars0grm.cc" /* yacc.c:1646 */ +#line 500 "pars0grm.y" + { yyval = yyvsp[-1]; } +#line 2240 "pars0grm.cc" break; case 122: -#line 478 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2311 "pars0grm.cc" /* yacc.c:1646 */ +#line 504 "pars0grm.y" + { yyval = NULL; } +#line 2246 "pars0grm.cc" break; case 123: -#line 485 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_if_statement((yyvsp[-5]), (yyvsp[-3]), (yyvsp[-2])); } -#line 2317 "pars0grm.cc" /* yacc.c:1646 */ +#line 506 "pars0grm.y" + { yyval = &pars_int_token; + /* pass any non-NULL pointer */ } +#line 2253 "pars0grm.cc" break; case 124: -#line 491 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_while_statement((yyvsp[-4]), (yyvsp[-2])); } -#line 2323 "pars0grm.cc" /* yacc.c:1646 */ +#line 513 "pars0grm.y" + { yyval = pars_create_table( + static_cast(yyvsp[-3]), + static_cast(yyvsp[-1])); } +#line 2261 "pars0grm.cc" break; case 125: -#line 499 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_for_statement( - static_cast((yyvsp[-8])), - (yyvsp[-6]), (yyvsp[-4]), (yyvsp[-2])); } -#line 2331 "pars0grm.cc" /* yacc.c:1646 */ +#line 519 "pars0grm.y" + { yyval = que_node_list_add_last(NULL, yyvsp[0]); } +#line 2267 "pars0grm.cc" break; case 126: -#line 505 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_exit_statement(); } -#line 2337 "pars0grm.cc" /* yacc.c:1646 */ +#line 521 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); } +#line 2273 "pars0grm.cc" break; case 127: -#line 509 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_return_statement(); } -#line 2343 "pars0grm.cc" /* yacc.c:1646 */ +#line 525 "pars0grm.y" + { yyval = NULL; } +#line 2279 "pars0grm.cc" break; case 128: -#line 514 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_open_statement( - ROW_SEL_OPEN_CURSOR, - static_cast((yyvsp[0]))); } -#line 2351 "pars0grm.cc" /* yacc.c:1646 */ +#line 526 "pars0grm.y" + { yyval = &pars_unique_token; } +#line 2285 "pars0grm.cc" break; case 129: -#line 521 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_open_statement( - ROW_SEL_CLOSE_CURSOR, - static_cast((yyvsp[0]))); } -#line 2359 "pars0grm.cc" /* yacc.c:1646 */ +#line 530 "pars0grm.y" + { yyval = NULL; } +#line 2291 "pars0grm.cc" break; case 130: -#line 528 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_fetch_statement( - static_cast((yyvsp[-2])), - static_cast((yyvsp[0])), NULL); } -#line 2367 "pars0grm.cc" /* yacc.c:1646 */ +#line 531 "pars0grm.y" + { yyval = &pars_clustered_token; } +#line 2297 "pars0grm.cc" break; case 131: -#line 532 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_fetch_statement( - static_cast((yyvsp[-2])), - NULL, - static_cast((yyvsp[0]))); } -#line 2376 "pars0grm.cc" /* yacc.c:1646 */ +#line 540 "pars0grm.y" + { yyval = pars_create_index( + static_cast(yyvsp[-8]), + static_cast(yyvsp[-7]), + static_cast(yyvsp[-5]), + static_cast(yyvsp[-3]), + static_cast(yyvsp[-1])); } +#line 2308 "pars0grm.cc" break; case 132: -#line 540 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_column_def( - static_cast((yyvsp[-4])), - static_cast((yyvsp[-3])), - static_cast((yyvsp[-2])), - (yyvsp[-1]), (yyvsp[0])); } -#line 2386 "pars0grm.cc" /* yacc.c:1646 */ +#line 549 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 2314 "pars0grm.cc" break; case 133: -#line 548 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 2392 "pars0grm.cc" /* yacc.c:1646 */ +#line 550 "pars0grm.y" + { yyval = yyvsp[0]; } +#line 2320 "pars0grm.cc" break; case 134: -#line 550 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 2398 "pars0grm.cc" /* yacc.c:1646 */ +#line 555 "pars0grm.y" + { yyval = pars_commit_statement(); } +#line 2326 "pars0grm.cc" break; case 135: -#line 554 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2404 "pars0grm.cc" /* yacc.c:1646 */ +#line 560 "pars0grm.y" + { yyval = pars_rollback_statement(); } +#line 2332 "pars0grm.cc" break; case 136: -#line 556 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[-1]); } -#line 2410 "pars0grm.cc" /* yacc.c:1646 */ +#line 564 "pars0grm.y" + { yyval = &pars_int_token; } +#line 2338 "pars0grm.cc" break; case 137: -#line 560 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2416 "pars0grm.cc" /* yacc.c:1646 */ +#line 565 "pars0grm.y" + { yyval = &pars_bigint_token; } +#line 2344 "pars0grm.cc" break; case 138: -#line 562 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_int_token; - /* pass any non-NULL pointer */ } -#line 2423 "pars0grm.cc" /* yacc.c:1646 */ +#line 566 "pars0grm.y" + { yyval = &pars_char_token; } +#line 2350 "pars0grm.cc" break; case 139: -#line 567 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2429 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 140: -#line 569 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_int_token; - /* pass any non-NULL pointer */ } -#line 2436 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 141: -#line 574 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2442 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 142: -#line 575 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_int_token; - /* pass any non-NULL pointer */ } -#line 2449 "pars0grm.cc" /* yacc.c:1646 */ +#line 571 "pars0grm.y" + { yyval = pars_variable_declaration( + static_cast(yyvsp[-2]), + static_cast(yyvsp[-1])); } +#line 2358 "pars0grm.cc" break; case 143: -#line 580 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2455 "pars0grm.cc" /* yacc.c:1646 */ +#line 585 "pars0grm.y" + { yyval = pars_cursor_declaration( + static_cast(yyvsp[-3]), + static_cast(yyvsp[-1])); } +#line 2366 "pars0grm.cc" break; case 144: -#line 582 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2461 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 145: -#line 589 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_create_table( - static_cast((yyvsp[-5])), - static_cast((yyvsp[-3])), - static_cast((yyvsp[-1])), - static_cast((yyvsp[0]))); } -#line 2471 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 146: -#line 597 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 2477 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 147: -#line 599 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 2483 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 148: -#line 603 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2489 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 149: -#line 604 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_unique_token; } -#line 2495 "pars0grm.cc" /* yacc.c:1646 */ +#line 592 "pars0grm.y" + { yyval = pars_function_declaration( + static_cast(yyvsp[-1])); } +#line 2373 "pars0grm.cc" break; case 150: -#line 608 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2501 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 151: -#line 609 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_clustered_token; } -#line 2507 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 152: -#line 618 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_create_index( - static_cast((yyvsp[-8])), - static_cast((yyvsp[-7])), - static_cast((yyvsp[-5])), - static_cast((yyvsp[-3])), - static_cast((yyvsp[-1]))); } -#line 2518 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 153: -#line 627 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2524 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 154: -#line 628 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = (yyvsp[0]); } -#line 2530 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 155: -#line 633 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_commit_statement(); } -#line 2536 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 156: -#line 638 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_rollback_statement(); } -#line 2542 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 157: -#line 642 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_int_token; } -#line 2548 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 158: -#line 643 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_bigint_token; } -#line 2554 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 159: -#line 644 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_char_token; } -#line 2560 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 160: -#line 645 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_binary_token; } -#line 2566 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 161: -#line 646 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = &pars_blob_token; } -#line 2572 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 162: -#line 651 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_parameter_declaration( - static_cast((yyvsp[-2])), - PARS_INPUT, - static_cast((yyvsp[0]))); } -#line 2581 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 163: -#line 656 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_parameter_declaration( - static_cast((yyvsp[-2])), - PARS_OUTPUT, - static_cast((yyvsp[0]))); } -#line 2590 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 164: -#line 663 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = NULL; } -#line 2596 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 165: -#line 664 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); } -#line 2602 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 166: -#line 666 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); } -#line 2608 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 167: -#line 671 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_variable_declaration( - static_cast((yyvsp[-2])), - static_cast((yyvsp[-1]))); } -#line 2616 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 171: -#line 685 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_cursor_declaration( - static_cast((yyvsp[-3])), - static_cast((yyvsp[-1]))); } -#line 2624 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 172: -#line 692 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_function_declaration( - static_cast((yyvsp[-1]))); } -#line 2631 "pars0grm.cc" /* yacc.c:1646 */ - break; - - case 178: -#line 714 "pars0grm.y" /* yacc.c:1646 */ - { (yyval) = pars_procedure_definition( - static_cast((yyvsp[-9])), - static_cast((yyvsp[-7])), - (yyvsp[-1])); } -#line 2640 "pars0grm.cc" /* yacc.c:1646 */ +#line 614 "pars0grm.y" + { yyval = pars_procedure_definition( + static_cast(yyvsp[-8]), yyvsp[-1]); } +#line 2380 "pars0grm.cc" break; -#line 2644 "pars0grm.cc" /* yacc.c:1646 */ +#line 2384 "pars0grm.cc" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2665,14 +2406,13 @@ yyreduce: /* 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. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + 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; @@ -2755,12 +2495,10 @@ yyerrlab: | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -2822,6 +2560,7 @@ yyacceptlab: yyresult = 0; goto yyreturn; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -2829,6 +2568,7 @@ yyabortlab: yyresult = 1; goto yyreturn; + #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | @@ -2839,6 +2579,10 @@ yyexhaustedlab: /* Fall through. */ #endif + +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2868,5 +2612,5 @@ yyreturn: #endif return yyresult; } -#line 720 "pars0grm.y" /* yacc.c:1906 */ +#line 618 "pars0grm.y" diff --git a/storage/innobase/pars/pars0grm.y b/storage/innobase/pars/pars0grm.y index 27638e06a66..625ed41bbd4 100644 --- a/storage/innobase/pars/pars0grm.y +++ b/storage/innobase/pars/pars0grm.y @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, MariaDB Corporation. +Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -58,11 +58,7 @@ yylex(void); %token PARS_NE_TOKEN %token PARS_PROCEDURE_TOKEN %token PARS_IN_TOKEN -%token PARS_OUT_TOKEN -%token PARS_BINARY_TOKEN -%token PARS_BLOB_TOKEN %token PARS_INT_TOKEN -%token PARS_FLOAT_TOKEN %token PARS_CHAR_TOKEN %token PARS_IS_TOKEN %token PARS_BEGIN_TOKEN @@ -75,14 +71,11 @@ yylex(void); %token PARS_WHILE_TOKEN %token PARS_RETURN_TOKEN %token PARS_SELECT_TOKEN -%token PARS_SUM_TOKEN %token PARS_COUNT_TOKEN -%token PARS_DISTINCT_TOKEN %token PARS_FROM_TOKEN %token PARS_WHERE_TOKEN %token PARS_FOR_TOKEN %token PARS_DDOT_TOKEN -%token PARS_READ_TOKEN %token PARS_ORDER_TOKEN %token PARS_BY_TOKEN %token PARS_ASC_TOKEN @@ -109,25 +102,14 @@ yylex(void); %token PARS_FETCH_TOKEN %token PARS_CLOSE_TOKEN %token PARS_NOTFOUND_TOKEN -%token PARS_TO_CHAR_TOKEN -%token PARS_TO_NUMBER_TOKEN %token PARS_TO_BINARY_TOKEN -%token PARS_BINARY_TO_NUMBER_TOKEN %token PARS_SUBSTR_TOKEN -%token PARS_REPLSTR_TOKEN %token PARS_CONCAT_TOKEN %token PARS_INSTR_TOKEN %token PARS_LENGTH_TOKEN -%token PARS_SYSDATE_TOKEN -%token PARS_PRINTF_TOKEN -%token PARS_ASSERT_TOKEN -%token PARS_RND_TOKEN -%token PARS_RND_STR_TOKEN -%token PARS_ROW_PRINTF_TOKEN %token PARS_COMMIT_TOKEN %token PARS_ROLLBACK_TOKEN %token PARS_WORK_TOKEN -%token PARS_UNSIGNED_TOKEN %token PARS_EXIT_TOKEN %token PARS_FUNCTION_TOKEN %token PARS_LOCK_TOKEN @@ -139,8 +121,6 @@ yylex(void); %token PARS_LIKE_TOKEN_SUFFIX %token PARS_LIKE_TOKEN_SUBSTR %token PARS_TABLE_NAME_TOKEN -%token PARS_COMPACT_TOKEN -%token PARS_BLOCK_SIZE_TOKEN %token PARS_BIGINT_TOKEN %left PARS_AND_TOKEN PARS_OR_TOKEN @@ -161,7 +141,6 @@ top_statement: statement: stored_procedure_call - | predefined_procedure_call ';' | while_statement ';' | for_statement ';' | exit_statement ';' @@ -170,7 +149,6 @@ statement: | assignment_statement ';' | select_statement ';' | insert_statement ';' - | row_printf_statement ';' | delete_statement_searched ';' | delete_statement_positioned ';' | update_statement_searched ';' @@ -223,18 +201,11 @@ exp: ; function_name: - PARS_TO_CHAR_TOKEN { $$ = &pars_to_char_token; } - | PARS_TO_NUMBER_TOKEN { $$ = &pars_to_number_token; } - | PARS_TO_BINARY_TOKEN { $$ = &pars_to_binary_token; } - | PARS_BINARY_TO_NUMBER_TOKEN - { $$ = &pars_binary_to_number_token; } + PARS_TO_BINARY_TOKEN { $$ = &pars_to_binary_token; } | PARS_SUBSTR_TOKEN { $$ = &pars_substr_token; } | PARS_CONCAT_TOKEN { $$ = &pars_concat_token; } | PARS_INSTR_TOKEN { $$ = &pars_instr_token; } | PARS_LENGTH_TOKEN { $$ = &pars_length_token; } - | PARS_SYSDATE_TOKEN { $$ = &pars_sysdate_token; } - | PARS_RND_TOKEN { $$ = &pars_rnd_token; } - | PARS_RND_STR_TOKEN { $$ = &pars_rnd_str_token; } ; question_mark_list: @@ -249,17 +220,6 @@ stored_procedure_call: static_cast($2)); } ; -predefined_procedure_call: - predefined_procedure_name '(' exp_list ')' - { $$ = pars_procedure_call($1, $3); } -; - -predefined_procedure_name: - PARS_REPLSTR_TOKEN { $$ = &pars_replstr_token; } - | PARS_PRINTF_TOKEN { $$ = &pars_printf_token; } - | PARS_ASSERT_TOKEN { $$ = &pars_assert_token; } -; - user_function_call: PARS_ID_TOKEN '(' ')' { $$ = $1; } ; @@ -287,19 +247,9 @@ select_item: exp { $$ = $1; } | PARS_COUNT_TOKEN '(' '*' ')' { $$ = pars_func(&pars_count_token, - que_node_list_add_last(NULL, + que_node_list_add_last(NULL, sym_tab_add_int_lit( pars_sym_tab_global, 1))); } - | PARS_COUNT_TOKEN '(' PARS_DISTINCT_TOKEN PARS_ID_TOKEN ')' - { $$ = pars_func(&pars_count_token, - que_node_list_add_last(NULL, - pars_func(&pars_distinct_token, - que_node_list_add_last( - NULL, $4)))); } - | PARS_SUM_TOKEN '(' exp ')' - { $$ = pars_func(&pars_sum_token, - que_node_list_add_last(NULL, - $3)); } ; select_item_list: @@ -446,12 +396,6 @@ delete_statement_positioned: NULL); } ; -row_printf_statement: - PARS_ROW_PRINTF_TOKEN select_statement - { $$ = pars_row_printf_statement( - static_cast($2)); } -; - assignment_statement: PARS_ID_TOKEN PARS_ASSIGN_TOKEN exp { $$ = pars_assignment_statement( @@ -536,12 +480,12 @@ fetch_statement: ; column_def: - PARS_ID_TOKEN type_name opt_column_len opt_unsigned opt_not_null + PARS_ID_TOKEN type_name opt_column_len opt_not_null { $$ = pars_column_def( static_cast($1), static_cast($2), static_cast($3), - $4, $5); } + $4); } ; column_def_list: @@ -556,13 +500,6 @@ opt_column_len: { $$ = $2; } ; -opt_unsigned: - /* Nothing */ { $$ = NULL; } - | PARS_UNSIGNED_TOKEN - { $$ = &pars_int_token; - /* pass any non-NULL pointer */ } -; - opt_not_null: /* Nothing */ { $$ = NULL; } | PARS_NOT_TOKEN PARS_NULL_LIT @@ -570,27 +507,12 @@ opt_not_null: /* pass any non-NULL pointer */ } ; -compact: - /* Nothing */ { $$ = NULL; } - | PARS_COMPACT_TOKEN { $$ = &pars_int_token; - /* pass any non-NULL pointer */ } -; - -block_size: - /* Nothing */ { $$ = NULL; } - | PARS_BLOCK_SIZE_TOKEN '=' PARS_INT_LIT - { $$ = $3; } -; - create_table: PARS_CREATE_TOKEN PARS_TABLE_TOKEN table_name '(' column_def_list ')' - compact block_size { $$ = pars_create_table( static_cast($3), - static_cast($5), - static_cast($7), - static_cast($8)); } + static_cast($5)); } ; column_list: @@ -642,28 +564,6 @@ type_name: PARS_INT_TOKEN { $$ = &pars_int_token; } | PARS_BIGINT_TOKEN { $$ = &pars_bigint_token; } | PARS_CHAR_TOKEN { $$ = &pars_char_token; } - | PARS_BINARY_TOKEN { $$ = &pars_binary_token; } - | PARS_BLOB_TOKEN { $$ = &pars_blob_token; } -; - -parameter_declaration: - PARS_ID_TOKEN PARS_IN_TOKEN type_name - { $$ = pars_parameter_declaration( - static_cast($1), - PARS_INPUT, - static_cast($3)); } - | PARS_ID_TOKEN PARS_OUT_TOKEN type_name - { $$ = pars_parameter_declaration( - static_cast($1), - PARS_OUTPUT, - static_cast($3)); } -; - -parameter_declaration_list: - /* Nothing */ { $$ = NULL; } - | parameter_declaration { $$ = que_node_list_add_last(NULL, $1); } - | parameter_declaration_list ',' parameter_declaration - { $$ = que_node_list_add_last($1, $3); } ; variable_declaration: @@ -705,16 +605,14 @@ declaration_list: ; procedure_definition: - PARS_PROCEDURE_TOKEN PARS_ID_TOKEN '(' parameter_declaration_list ')' + PARS_PROCEDURE_TOKEN PARS_ID_TOKEN '(' ')' PARS_IS_TOKEN variable_declaration_list declaration_list PARS_BEGIN_TOKEN statement_list PARS_END_TOKEN { $$ = pars_procedure_definition( - static_cast($2), - static_cast($4), - $10); } + static_cast($2), $9); } ; %% diff --git a/storage/innobase/pars/pars0lex.l b/storage/innobase/pars/pars0lex.l index 2d0e56f400d..8b2df6b7940 100644 --- a/storage/innobase/pars/pars0lex.l +++ b/storage/innobase/pars/pars0lex.l @@ -249,30 +249,10 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_IN_TOKEN); } -"OUT" { - return(PARS_OUT_TOKEN); -} - -"BINARY" { - return(PARS_BINARY_TOKEN); -} - -"BLOB" { - return(PARS_BLOB_TOKEN); -} - "INT" { return(PARS_INT_TOKEN); } -"INTEGER" { - return(PARS_INT_TOKEN); -} - -"FLOAT" { - return(PARS_FLOAT_TOKEN); -} - "CHAR" { return(PARS_CHAR_TOKEN); } @@ -321,18 +301,10 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_SELECT_TOKEN); } -"SUM" { - return(PARS_SUM_TOKEN); -} - "COUNT" { return(PARS_COUNT_TOKEN); } -"DISTINCT" { - return(PARS_DISTINCT_TOKEN); -} - "FROM" { return(PARS_FROM_TOKEN); } @@ -345,10 +317,6 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_FOR_TOKEN); } -"READ" { - return(PARS_READ_TOKEN); -} - "ORDER" { return(PARS_ORDER_TOKEN); } @@ -405,14 +373,6 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_TABLE_TOKEN); } -"COMPACT" { - return(PARS_COMPACT_TOKEN); -} - -"BLOCK_SIZE" { - return(PARS_BLOCK_SIZE_TOKEN); -} - "INDEX" { return(PARS_INDEX_TOKEN); } @@ -453,30 +413,14 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_NOTFOUND_TOKEN); } -"TO_CHAR" { - return(PARS_TO_CHAR_TOKEN); -} - -"TO_NUMBER" { - return(PARS_TO_NUMBER_TOKEN); -} - "TO_BINARY" { return(PARS_TO_BINARY_TOKEN); } -"BINARY_TO_NUMBER" { - return(PARS_BINARY_TO_NUMBER_TOKEN); -} - "SUBSTR" { return(PARS_SUBSTR_TOKEN); } -"REPLSTR" { - return(PARS_REPLSTR_TOKEN); -} - "CONCAT" { return(PARS_CONCAT_TOKEN); } @@ -489,30 +433,6 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_LENGTH_TOKEN); } -"SYSDATE" { - return(PARS_SYSDATE_TOKEN); -} - -"PRINTF" { - return(PARS_PRINTF_TOKEN); -} - -"ASSERT" { - return(PARS_ASSERT_TOKEN); -} - -"RND" { - return(PARS_RND_TOKEN); -} - -"RND_STR" { - return(PARS_RND_STR_TOKEN); -} - -"ROW_PRINTF" { - return(PARS_ROW_PRINTF_TOKEN); -} - "COMMIT" { return(PARS_COMMIT_TOKEN); } @@ -525,10 +445,6 @@ In the state 'id', only two actions are possible (defined below). */ return(PARS_WORK_TOKEN); } -"UNSIGNED" { - return(PARS_UNSIGNED_TOKEN); -} - "EXIT" { return(PARS_EXIT_TOKEN); } diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc index 3f671adfdfc..280c4ee1815 100644 --- a/storage/innobase/pars/pars0pars.cc +++ b/storage/innobase/pars/pars0pars.cc @@ -50,29 +50,15 @@ sym_tab_t* pars_sym_tab_global; /* Global variables used to denote certain reserved words, used in constructing the parsing tree */ -pars_res_word_t pars_to_char_token = {PARS_TO_CHAR_TOKEN}; -pars_res_word_t pars_to_number_token = {PARS_TO_NUMBER_TOKEN}; pars_res_word_t pars_to_binary_token = {PARS_TO_BINARY_TOKEN}; -pars_res_word_t pars_binary_to_number_token = {PARS_BINARY_TO_NUMBER_TOKEN}; pars_res_word_t pars_substr_token = {PARS_SUBSTR_TOKEN}; -pars_res_word_t pars_replstr_token = {PARS_REPLSTR_TOKEN}; pars_res_word_t pars_concat_token = {PARS_CONCAT_TOKEN}; pars_res_word_t pars_instr_token = {PARS_INSTR_TOKEN}; pars_res_word_t pars_length_token = {PARS_LENGTH_TOKEN}; -pars_res_word_t pars_sysdate_token = {PARS_SYSDATE_TOKEN}; -pars_res_word_t pars_printf_token = {PARS_PRINTF_TOKEN}; -pars_res_word_t pars_assert_token = {PARS_ASSERT_TOKEN}; -pars_res_word_t pars_rnd_token = {PARS_RND_TOKEN}; -pars_res_word_t pars_rnd_str_token = {PARS_RND_STR_TOKEN}; pars_res_word_t pars_count_token = {PARS_COUNT_TOKEN}; -pars_res_word_t pars_sum_token = {PARS_SUM_TOKEN}; -pars_res_word_t pars_distinct_token = {PARS_DISTINCT_TOKEN}; -pars_res_word_t pars_binary_token = {PARS_BINARY_TOKEN}; -pars_res_word_t pars_blob_token = {PARS_BLOB_TOKEN}; pars_res_word_t pars_int_token = {PARS_INT_TOKEN}; pars_res_word_t pars_bigint_token = {PARS_BIGINT_TOKEN}; pars_res_word_t pars_char_token = {PARS_CHAR_TOKEN}; -pars_res_word_t pars_float_token = {PARS_FLOAT_TOKEN}; pars_res_word_t pars_update_token = {PARS_UPDATE_TOKEN}; pars_res_word_t pars_asc_token = {PARS_ASC_TOKEN}; pars_res_word_t pars_desc_token = {PARS_DESC_TOKEN}; @@ -195,24 +181,15 @@ pars_func_get_class( case PARS_AND_TOKEN: case PARS_OR_TOKEN: case PARS_NOT_TOKEN: return(PARS_FUNC_LOGICAL); - case PARS_COUNT_TOKEN: case PARS_SUM_TOKEN: + case PARS_COUNT_TOKEN: return(PARS_FUNC_AGGREGATE); - case PARS_TO_CHAR_TOKEN: - case PARS_TO_NUMBER_TOKEN: case PARS_TO_BINARY_TOKEN: - case PARS_BINARY_TO_NUMBER_TOKEN: case PARS_SUBSTR_TOKEN: case PARS_CONCAT_TOKEN: case PARS_LENGTH_TOKEN: case PARS_INSTR_TOKEN: - case PARS_SYSDATE_TOKEN: case PARS_NOTFOUND_TOKEN: - case PARS_PRINTF_TOKEN: - case PARS_ASSERT_TOKEN: - case PARS_RND_TOKEN: - case PARS_RND_STR_TOKEN: - case PARS_REPLSTR_TOKEN: return(PARS_FUNC_PREDEFINED); default: @@ -499,7 +476,6 @@ pars_resolve_func_data_type( arg = node->args; switch (node->func) { - case PARS_SUM_TOKEN: case '+': case '-': case '*': case '/': /* Inherit the data type from the first argument (which must not be the SQL null literal whose type is DATA_ERROR) */ @@ -516,13 +492,6 @@ pars_resolve_func_data_type( dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4); break; - case PARS_TO_CHAR_TOKEN: - case PARS_RND_STR_TOKEN: - ut_a(dtype_get_mtype(que_node_get_data_type(arg)) == DATA_INT); - dtype_set(que_node_get_data_type(node), DATA_VARCHAR, - DATA_ENGLISH, 0); - break; - case PARS_TO_BINARY_TOKEN: if (dtype_get_mtype(que_node_get_data_type(arg)) == DATA_INT) { dtype_set(que_node_get_data_type(node), DATA_VARCHAR, @@ -533,19 +502,12 @@ pars_resolve_func_data_type( } break; - case PARS_TO_NUMBER_TOKEN: - case PARS_BINARY_TO_NUMBER_TOKEN: case PARS_LENGTH_TOKEN: case PARS_INSTR_TOKEN: ut_a(pars_is_string_type(que_node_get_data_type(arg)->mtype)); dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4); break; - case PARS_SYSDATE_TOKEN: - ut_a(arg == NULL); - dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4); - break; - case PARS_SUBSTR_TOKEN: case PARS_CONCAT_TOKEN: ut_a(pars_is_string_type(que_node_get_data_type(arg)->mtype)); @@ -566,11 +528,6 @@ pars_resolve_func_data_type( dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4); break; - case PARS_RND_TOKEN: - ut_a(dtype_get_mtype(que_node_get_data_type(arg)) == DATA_INT); - dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4); - break; - case PARS_LIKE_TOKEN_EXACT: case PARS_LIKE_TOKEN_PREFIX: case PARS_LIKE_TOKEN_SUFFIX: @@ -1355,9 +1312,7 @@ pars_set_dfield_type( pars_res_word_t* type, /*!< in: pointer to a type token */ ulint len, /*!< in: length, or 0 */ - ibool is_unsigned, /*!< in: if TRUE, column is - UNSIGNED. */ - ibool is_not_null) /*!< in: if TRUE, column is + bool is_not_null) /*!< in: whether the column is NOT NULL. */ { ulint flags = 0; @@ -1366,10 +1321,6 @@ pars_set_dfield_type( flags |= DATA_NOT_NULL; } - if (is_unsigned) { - flags |= DATA_UNSIGNED; - } - if (type == &pars_bigint_token) { ut_a(len == 0); @@ -1384,16 +1335,6 @@ pars_set_dfield_type( dtype_set(dfield_get_type(dfield), DATA_VARCHAR, DATA_ENGLISH | flags, len); - } else if (type == &pars_binary_token) { - ut_a(len != 0); - - dtype_set(dfield_get_type(dfield), DATA_FIXBINARY, - DATA_BINARY_TYPE | flags, len); - } else if (type == &pars_blob_token) { - ut_a(len == 0); - - dtype_set(dfield_get_type(dfield), DATA_BLOB, - DATA_BINARY_TYPE | flags, 0); } else { ut_error; } @@ -1414,28 +1355,7 @@ pars_variable_declaration( node->param_type = PARS_NOT_PARAM; - pars_set_dfield_type(que_node_get_val(node), type, 0, FALSE, FALSE); - - return(node); -} - -/*********************************************************************//** -Parses a procedure parameter declaration. -@return own: symbol table node of type SYM_VAR */ -sym_node_t* -pars_parameter_declaration( -/*=======================*/ - sym_node_t* node, /*!< in: symbol table node allocated for the - id of the parameter */ - ulint param_type, - /*!< in: PARS_INPUT or PARS_OUTPUT */ - pars_res_word_t* type) /*!< in: pointer to a type token */ -{ - ut_a((param_type == PARS_INPUT) || (param_type == PARS_OUTPUT)); - - pars_variable_declaration(node, type); - - node->param_type = param_type; + pars_set_dfield_type(que_node_get_val(node), type, 0, false); return(node); } @@ -1821,8 +1741,6 @@ pars_column_def( pars_res_word_t* type, /*!< in: data type */ sym_node_t* len, /*!< in: length of column, or NULL */ - void* is_unsigned, /*!< in: if not NULL, column - is of type UNSIGNED. */ void* is_not_null) /*!< in: if not NULL, column is of type NOT NULL. */ { @@ -1835,7 +1753,7 @@ pars_column_def( } pars_set_dfield_type(que_node_get_val(sym_node), type, len2, - is_unsigned != NULL, is_not_null != NULL); + is_not_null != NULL); return(sym_node); } @@ -1848,9 +1766,7 @@ pars_create_table( /*==============*/ sym_node_t* table_sym, /*!< in: table name node in the symbol table */ - sym_node_t* column_defs, /*!< in: list of column names */ - sym_node_t* compact, /* in: non-NULL if COMPACT table. */ - sym_node_t* block_size) /* in: block size (can be NULL) */ + sym_node_t* column_defs) /*!< in: list of column names */ { dict_table_t* table; sym_node_t* column; @@ -1858,57 +1774,11 @@ pars_create_table( const dtype_t* dtype; ulint n_cols; ulint flags = 0; - ulint flags2 = 0; + ulint flags2 = DICT_TF2_FTS_AUX_HEX_NAME; - if (compact != NULL) { - - /* System tables currently only use the REDUNDANT row - format therefore the check for srv_file_per_table should be - safe for now. */ - - flags |= DICT_TF_COMPACT; - - /* FIXME: Ideally this should be part of the SQL syntax - or use some other mechanism. We want to reduce dependency - on global variables. There is an inherent race here but - that has always existed around this variable. */ - if (srv_file_per_table) { - flags2 |= DICT_TF2_USE_FILE_PER_TABLE; - } - } - - if (block_size != NULL) { - ulint size; - dfield_t* dfield; - - dfield = que_node_get_val(block_size); - - ut_a(dfield_get_len(dfield) == 4); - size = mach_read_from_4(static_cast( - dfield_get_data(dfield))); - - - switch (size) { - case 0: - break; - - case 1: case 2: case 4: case 8: case 16: - flags |= DICT_TF_COMPACT; - /* FTS-FIXME: needs the zip changes */ - /* flags |= size << DICT_TF_COMPRESSED_SHIFT; */ - break; - - default: - ut_error; - } - } - - /* Set the flags2 when create table or alter tables */ - flags2 |= DICT_TF2_FTS_AUX_HEX_NAME; DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name", flags2 &= ~DICT_TF2_FTS_AUX_HEX_NAME;); - n_cols = que_node_list_get_len(column_defs); table = dict_mem_table_create( @@ -2001,7 +1871,6 @@ pars_procedure_definition( /*======================*/ sym_node_t* sym_node, /*!< in: procedure id node in the symbol table */ - sym_node_t* param_list, /*!< in: parameter declaration list */ que_node_t* stat_list) /*!< in: statement list */ { proc_node_t* node; @@ -2026,7 +1895,6 @@ pars_procedure_definition( sym_node->resolved = TRUE; node->proc_id = sym_node; - node->param_list = param_list; node->stat_list = stat_list; pars_set_parent_in_list(stat_list, node); From 425748f1b5890a4bb3c7dcadf8f81f567f9a26fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 9 Dec 2019 14:54:27 +0200 Subject: [PATCH 07/19] Cleanup: Replace a redundant statement with an assertion --- storage/innobase/sync/sync0debug.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index 3e65c234cd0..c4a2fd90b37 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -1580,7 +1580,7 @@ struct CreateTracker { ~CreateTracker() UNIV_NOTHROW { - ut_d(m_files.empty()); + ut_ad(m_files.empty()); m_mutex.destroy(); } From af650c76a63838047b268d8106cd229438f6db92 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Sat, 7 Dec 2019 22:15:38 +0100 Subject: [PATCH 08/19] MDEV-18460: Server crashed in strmake / tdc_create_key / THD::create_tmp_table_def_key When there is a WITH clause we postpone check for tables without database for later stages when tables in WITH will be defined. But we should not try to open such tables as temporary tables because temporary tables always belong to a some database. --- mysql-test/r/cte_nonrecursive.result | 18 ++++++++++++++++++ mysql-test/t/cte_nonrecursive.test | 20 ++++++++++++++++++++ sql/temporary_tables.cc | 7 +++++++ 3 files changed, 45 insertions(+) diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result index 8ad3818b453..746fcbcf051 100644 --- a/mysql-test/r/cte_nonrecursive.result +++ b/mysql-test/r/cte_nonrecursive.result @@ -1673,3 +1673,21 @@ with columns as (select 1 as t) select * from columns; t 1 use test; +# +# MDEV-18460: Server crashed in strmake / tdc_create_key / +# THD::create_tmp_table_def_key +# +connect con1,localhost,root,,; +CREATE TEMPORARY TABLE test.t (a INT); +WITH cte AS (SELECT 1) SELECT * FROM cte; +1 +1 +WITH t AS (SELECT 1) SELECT * FROM t; +1 +1 +WITH cte AS (SELECT 1) SELECT * FROM t; +ERROR 3D000: No database selected +DROP TABLE test.t; +connection default; +disconnect con1; +# End of 10.2 tests diff --git a/mysql-test/t/cte_nonrecursive.test b/mysql-test/t/cte_nonrecursive.test index bd8af55071a..41a5b815bc7 100644 --- a/mysql-test/t/cte_nonrecursive.test +++ b/mysql-test/t/cte_nonrecursive.test @@ -1182,3 +1182,23 @@ with t as (select 1 as t) select * from t; with columns as (select 1 as t) select * from columns; use test; + +--echo # +--echo # MDEV-18460: Server crashed in strmake / tdc_create_key / +--echo # THD::create_tmp_table_def_key +--echo # + +--connect con1,localhost,root,, +--change_user root,, + +CREATE TEMPORARY TABLE test.t (a INT); +WITH cte AS (SELECT 1) SELECT * FROM cte; +WITH t AS (SELECT 1) SELECT * FROM t; +--error ER_NO_DB_ERROR +WITH cte AS (SELECT 1) SELECT * FROM t; +DROP TABLE test.t; + +--connection default +--disconnect con1 + +--echo # End of 10.2 tests diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index b97e0334f0d..e2179a71625 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -338,6 +338,13 @@ bool THD::open_temporary_table(TABLE_LIST *tl) DBUG_RETURN(false); } + if (!tl->db) + { + DBUG_PRINT("info", + ("Table reference to a temporary table must have database set")); + DBUG_RETURN(false); + } + /* Temporary tables are not safe for parallel replication. They were designed to be visible to one thread only, so have no table locking. From 4c0854f2211a034683afd3a2c1e4f8d020c6785a Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Thu, 5 Dec 2019 14:51:55 +0700 Subject: [PATCH 09/19] MDEV-21223 innodb_fts.sync_ddl fails in buildbot, server crashed in que_thr_step FreeState(): replace pointer to freed memory with NULL. This actually fixes a crash which is use-after-free as reported by ASAN DbugParse(): unconditionally lock mutex because we're touching shared init_settings.keywords --- dbug/dbug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dbug/dbug.c b/dbug/dbug.c index cde6363c86a..e7bf69a14e5 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -511,9 +511,9 @@ static int DbugParse(CODE_STATE *cs, const char *control) { /* never share with the global parent - it can change under your feet */ stack->functions= ListCopy(init_settings.functions); - LockIfInitSettings(cs); + LockMutex(cs); stack->keywords= ListCopy(init_settings.keywords); - UnlockIfInitSettings(cs); + UnlockMutex(cs); stack->processes= ListCopy(init_settings.processes); } else @@ -1617,7 +1617,10 @@ static void FreeState(CODE_STATE *cs, int free_state) struct settings *state= cs->stack; LockIfInitSettings(cs); if (!is_shared(state, keywords)) + { FreeList(state->keywords); + state->keywords= NULL; + } UnlockIfInitSettings(cs); if (!is_shared(state, functions)) FreeList(state->functions); From 51fc8ab73e3ee9712d1128fefc9831dcf891a3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 9 Dec 2019 12:17:12 +0200 Subject: [PATCH 10/19] MDEV-21256: Reduce the use of ut_rnd_gen_next_ulint() ut_rnd_set_seed(): Unused function; remove. ut_rnd_gen(): Renamed from page_cur_lcg_prng(). ut_rnd_current: The internal state of ut_rnd_gen(). page_cur_open_on_rnd_user_rec(): Replace linear search with page_rec_get_nth(). --- storage/innobase/gis/gis0geo.cc | 23 +------------ storage/innobase/include/ut0rnd.h | 54 ++++++++++++++---------------- storage/innobase/include/ut0rnd.ic | 13 +------ storage/innobase/page/page0cur.cc | 50 ++++----------------------- storage/innobase/ut/ut0rnd.cc | 4 +++ 5 files changed, 39 insertions(+), 105 deletions(-) diff --git a/storage/innobase/gis/gis0geo.cc b/storage/innobase/gis/gis0geo.cc index fb55945549e..3a727185632 100644 --- a/storage/innobase/gis/gis0geo.cc +++ b/storage/innobase/gis/gis0geo.cc @@ -444,26 +444,6 @@ pick_seeds( } } -/*********************************************************//** -Generates a random iboolean value. -@return the random value */ -static -ibool -ut_rnd_gen_ibool(void) -/*=================*/ -{ - ulint x; - - x = ut_rnd_gen_ulint(); - - if (((x >> 20) + (x >> 15)) & 1) { - - return(TRUE); - } - - return(FALSE); -} - /*************************************************************//** Select next node and group where to add. */ static @@ -500,8 +480,7 @@ pick_next( /* Introduce some randomness if the record is identical */ if (diff == 0) { - diff = static_cast( - ut_rnd_gen_ibool()); + diff = static_cast(ut_rnd_gen() & 1); } *n_group = 1 + (diff > 0); diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h index b6d4d4abbd2..56b4a6159c1 100644 --- a/storage/innobase/include/ut0rnd.h +++ b/storage/innobase/include/ut0rnd.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -27,37 +28,34 @@ Created 1/20/1994 Heikki Tuuri #define ut0rnd_h #include "ut0byte.h" +#include #ifndef UNIV_INNOCHECKSUM -/** The 'character code' for end of field or string (used -in folding records */ -#define UT_END_OF_FIELD 257 +/** Seed value of ut_rnd_gen() */ +extern uint64_t ut_rnd_current; + +/** @return a pseudo-random 64-bit number */ +inline uint64_t ut_rnd_gen() +{ + /* + This is a linear congruential pseudo random number generator. + The formula and the constants + being used are: + X[n+1] = (a * X[n] + c) mod m + where: + X[0] = my_interval_timer() + a = 1103515245 (3^5 * 5 * 7 * 129749) + c = 12345 (3 * 5 * 823) + m = 18446744073709551616 (1<<64), implicit */ + + if (UNIV_UNLIKELY(!ut_rnd_current)) { + ut_rnd_current = my_interval_timer(); + } + + ut_rnd_current = 1103515245 * ut_rnd_current + 12345; + return ut_rnd_current; +} -/********************************************************//** -This is used to set the random number seed. */ -UNIV_INLINE -void -ut_rnd_set_seed( -/*============*/ - ulint seed); /*!< in: seed */ -/********************************************************//** -The following function generates a series of 'random' ulint integers. -@return the next 'random' number */ -UNIV_INLINE -ulint -ut_rnd_gen_next_ulint( -/*==================*/ - ulint rnd); /*!< in: the previous random number value */ -/*********************************************************//** -The following function generates 'random' ulint integers which -enumerate the value space (let there be N of them) of ulint integers -in a pseudo-random fashion. Note that the same integer is repeated -always after N calls to the generator. -@return the 'random' number */ -UNIV_INLINE -ulint -ut_rnd_gen_ulint(void); -/*==================*/ /********************************************************//** Generates a random integer from a given interval. @return the 'random' number */ diff --git a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.ic index 0003c42baad..8b7ea5fe1e4 100644 --- a/storage/innobase/include/ut0rnd.ic +++ b/storage/innobase/include/ut0rnd.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, MariaDB Corporation. +Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -42,17 +42,6 @@ Created 5/30/1994 Heikki Tuuri /** Seed value of ut_rnd_gen_ulint() */ extern ulint ut_rnd_ulint_counter; -/********************************************************//** -This is used to set the random number seed. */ -UNIV_INLINE -void -ut_rnd_set_seed( -/*============*/ - ulint seed) /*!< in: seed */ -{ - ut_rnd_ulint_counter = seed; -} - /********************************************************//** The following function generates a series of 'random' ulint integers. @return the next 'random' number */ diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index b4ec3e6dcdf..a5a8c6c3d1e 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -35,38 +35,6 @@ Created 10/4/1994 Heikki Tuuri #include -/*******************************************************************//** -This is a linear congruential generator PRNG. Returns a pseudo random -number between 0 and 2^64-1 inclusive. The formula and the constants -being used are: -X[n+1] = (a * X[n] + c) mod m -where: -X[0] = my_interval_timer() -a = 1103515245 (3^5 * 5 * 7 * 129749) -c = 12345 (3 * 5 * 823) -m = 18446744073709551616 (2^64) - -@return number between 0 and 2^64-1 */ -static -ib_uint64_t -page_cur_lcg_prng(void) -/*===================*/ -{ -#define LCG_a 1103515245 -#define LCG_c 12345 - static uint64_t lcg_current; - - if (!lcg_current) { - lcg_current = my_interval_timer(); - } - - /* no need to "% 2^64" explicitly because lcg_current is - 64 bit and this will be done anyway */ - lcg_current = LCG_a * lcg_current + LCG_c; - - return(lcg_current); -} - #ifdef BTR_CUR_HASH_ADAPT # ifdef UNIV_SEARCH_PERF_STAT static ulint page_cur_short_succ; @@ -814,8 +782,7 @@ page_cur_open_on_rnd_user_rec( buf_block_t* block, /*!< in: page */ page_cur_t* cursor) /*!< out: page cursor */ { - ulint rnd; - ulint n_recs = page_get_n_recs(buf_block_get_frame(block)); + const ulint n_recs = page_get_n_recs(block->frame); page_cur_set_before_first(block, cursor); @@ -824,11 +791,9 @@ page_cur_open_on_rnd_user_rec( return; } - rnd = (ulint) (page_cur_lcg_prng() % n_recs); - - do { - page_cur_move_to_next(cursor); - } while (rnd--); + cursor->rec = page_rec_get_nth(block->frame, + static_cast + (ut_rnd_gen() % n_recs) + 1); } /** Write a redo log record of inserting a record into an index page. @@ -2426,18 +2391,17 @@ page_cur_delete_rec( #ifdef UNIV_COMPILE_TEST_FUNCS /*******************************************************************//** -Print the first n numbers, generated by page_cur_lcg_prng() to make sure +Print the first n numbers, generated by ut_rnd_gen() to make sure (visually) that it works properly. */ void -test_page_cur_lcg_prng( -/*===================*/ +test_ut_rnd_gen( int n) /*!< in: print first n numbers */ { int i; unsigned long long rnd; for (i = 0; i < n; i++) { - rnd = page_cur_lcg_prng(); + rnd = ut_rnd_gen(); printf("%llu\t%%2=%llu %%3=%llu %%5=%llu %%7=%llu %%11=%llu\n", rnd, rnd % 2, diff --git a/storage/innobase/ut/ut0rnd.cc b/storage/innobase/ut/ut0rnd.cc index 3c1e51536a1..dcf43b9d7e1 100644 --- a/storage/innobase/ut/ut0rnd.cc +++ b/storage/innobase/ut/ut0rnd.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -25,6 +26,9 @@ Created 5/11/1994 Heikki Tuuri #include "ut0rnd.h" +/** Seed value of ut_rnd_gen() */ +uint64_t ut_rnd_current; + /** These random numbers are used in ut_find_prime */ /*@{*/ #define UT_RANDOM_1 1.0412321 From d146e3dcfe3d4500eced3e097212b485659ec741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 10 Dec 2019 11:14:57 +0200 Subject: [PATCH 11/19] MDEV-21256: Simplify ut_rnd_interval() ut_rnd_interval(): Remove the first parameter, which was mostly passed as 0. Implement as a simple wrapper around ut_rnd_gen(). Trivially return 0 if the size of the interval is smaller than 2. ut_rnd_ulint_counter, ut_rnd_gen_next_ulint(), ut_rnd_gen_ulint(): Remove. --- storage/innobase/dict/dict0stats.cc | 2 +- storage/innobase/include/ib0mutex.h | 6 +-- storage/innobase/include/ut0rnd.h | 14 ++--- storage/innobase/include/ut0rnd.ic | 81 ----------------------------- storage/innobase/page/page0cur.cc | 3 +- storage/innobase/sync/sync0rw.cc | 10 ++-- storage/innobase/ut/ut0rnd.cc | 3 -- 7 files changed, 14 insertions(+), 105 deletions(-) diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index f49fb87e4ea..c9e3929cf1d 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -1747,7 +1747,7 @@ dict_stats_analyze_index_for_n_prefix( ut_rnd_interval() to work with too big numbers since ib_uint64_t could be bigger than ulint */ const ulint rnd = ut_rnd_interval( - 0, static_cast(right - left)); + static_cast(right - left)); const ib_uint64_t dive_below_idx = boundaries->at(static_cast(left + rnd)); diff --git a/storage/innobase/include/ib0mutex.h b/storage/innobase/include/ib0mutex.h index e7f5ca2b44f..6c04563b97a 100644 --- a/storage/innobase/include/ib0mutex.h +++ b/storage/innobase/include/ib0mutex.h @@ -225,7 +225,7 @@ struct TTASFutexMutex { return; } - ut_delay(ut_rnd_interval(0, max_delay)); + ut_delay(ut_rnd_interval(max_delay)); } for (n_waits= 0;; n_waits++) { @@ -362,7 +362,7 @@ struct TTASMutex { uint32_t n_spins = 0; while (!try_lock()) { - ut_delay(ut_rnd_interval(0, max_delay)); + ut_delay(ut_rnd_interval(max_delay)); if (++n_spins == max_spins) { os_thread_yield(); max_spins+= step; @@ -516,7 +516,7 @@ struct TTASEventMutex { sync_array_wait_event(sync_arr, cell); } } else { - ut_delay(ut_rnd_interval(0, max_delay)); + ut_delay(ut_rnd_interval(max_delay)); } } diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h index 56b4a6159c1..fcab293b3b0 100644 --- a/storage/innobase/include/ut0rnd.h +++ b/storage/innobase/include/ut0rnd.h @@ -56,15 +56,11 @@ inline uint64_t ut_rnd_gen() return ut_rnd_current; } -/********************************************************//** -Generates a random integer from a given interval. -@return the 'random' number */ -UNIV_INLINE -ulint -ut_rnd_interval( -/*============*/ - ulint low, /*!< in: low limit; can generate also this value */ - ulint high); /*!< in: high limit; can generate also this value */ +/** @return a random number between 0 and n-1, inclusive */ +inline ulint ut_rnd_interval(ulint n) +{ + return n > 1 ? static_cast(ut_rnd_gen() % n) : 0; +} /*******************************************************//** The following function generates a hash value for a ulint integer diff --git a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.ic index 8b7ea5fe1e4..c0105160a42 100644 --- a/storage/innobase/include/ut0rnd.ic +++ b/storage/innobase/include/ut0rnd.ic @@ -29,87 +29,6 @@ Created 5/30/1994 Heikki Tuuri #ifndef UNIV_INNOCHECKSUM -#define UT_RND1 151117737 -#define UT_RND2 119785373 -#define UT_RND3 85689495 -#define UT_RND4 76595339 -#define UT_SUM_RND2 98781234 -#define UT_SUM_RND3 126792457 -#define UT_SUM_RND4 63498502 -#define UT_XOR_RND1 187678878 -#define UT_XOR_RND2 143537923 - -/** Seed value of ut_rnd_gen_ulint() */ -extern ulint ut_rnd_ulint_counter; - -/********************************************************//** -The following function generates a series of 'random' ulint integers. -@return the next 'random' number */ -UNIV_INLINE -ulint -ut_rnd_gen_next_ulint( -/*==================*/ - ulint rnd) /*!< in: the previous random number value */ -{ - ulint n_bits; - - n_bits = 8 * sizeof(ulint); - - rnd = UT_RND2 * rnd + UT_SUM_RND3; - rnd = UT_XOR_RND1 ^ rnd; - rnd = (rnd << 20) + (rnd >> (n_bits - 20)); - rnd = UT_RND3 * rnd + UT_SUM_RND4; - rnd = UT_XOR_RND2 ^ rnd; - rnd = (rnd << 20) + (rnd >> (n_bits - 20)); - rnd = UT_RND1 * rnd + UT_SUM_RND2; - - return(rnd); -} - -/********************************************************//** -The following function generates 'random' ulint integers which -enumerate the value space of ulint integers in a pseudo random -fashion. Note that the same integer is repeated always after -2 to power 32 calls to the generator (if ulint is 32-bit). -@return the 'random' number */ -UNIV_INLINE -ulint -ut_rnd_gen_ulint(void) -/*==================*/ -{ - ulint rnd; - - ut_rnd_ulint_counter = UT_RND1 * ut_rnd_ulint_counter + UT_RND2; - - rnd = ut_rnd_gen_next_ulint(ut_rnd_ulint_counter); - - return(rnd); -} - -/********************************************************//** -Generates a random integer from a given interval. -@return the 'random' number */ -UNIV_INLINE -ulint -ut_rnd_interval( -/*============*/ - ulint low, /*!< in: low limit; can generate also this value */ - ulint high) /*!< in: high limit; can generate also this value */ -{ - ulint rnd; - - ut_ad(high >= low); - - if (low == high) { - - return(low); - } - - rnd = ut_rnd_gen_ulint(); - - return(low + (rnd % (high - low))); -} - /*******************************************************//** The following function generates a hash value for a ulint integer to a hash table of size table_size, which should be a prime diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index a5a8c6c3d1e..21a725f845d 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -792,8 +792,7 @@ page_cur_open_on_rnd_user_rec( } cursor->rec = page_rec_get_nth(block->frame, - static_cast - (ut_rnd_gen() % n_recs) + 1); + ut_rnd_interval(n_recs) + 1); } /** Write a redo log record of inserting a record into an index page. diff --git a/storage/innobase/sync/sync0rw.cc b/storage/innobase/sync/sync0rw.cc index 96108ab0bf1..c9b8a1e58a5 100644 --- a/storage/innobase/sync/sync0rw.cc +++ b/storage/innobase/sync/sync0rw.cc @@ -299,7 +299,7 @@ lock_loop: HMT_low(); while (i < srv_n_spin_wait_rounds && lock->lock_word <= 0) { if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval(0, srv_spin_wait_delay)); + ut_delay(ut_rnd_interval(srv_spin_wait_delay)); } i++; @@ -425,7 +425,7 @@ rw_lock_x_lock_wait_func( HMT_low(); if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval(0, srv_spin_wait_delay)); + ut_delay(ut_rnd_interval(srv_spin_wait_delay)); } if (i < srv_n_spin_wait_rounds) { @@ -684,8 +684,7 @@ lock_loop: && lock->lock_word <= X_LOCK_HALF_DECR) { if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval( - 0, srv_spin_wait_delay)); + ut_delay(ut_rnd_interval(srv_spin_wait_delay)); } i++; @@ -790,8 +789,7 @@ lock_loop: && lock->lock_word <= X_LOCK_HALF_DECR) { if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval( - 0, srv_spin_wait_delay)); + ut_delay(ut_rnd_interval(srv_spin_wait_delay)); } i++; diff --git a/storage/innobase/ut/ut0rnd.cc b/storage/innobase/ut/ut0rnd.cc index dcf43b9d7e1..856cb82e645 100644 --- a/storage/innobase/ut/ut0rnd.cc +++ b/storage/innobase/ut/ut0rnd.cc @@ -36,9 +36,6 @@ uint64_t ut_rnd_current; #define UT_RANDOM_3 1.0132677 /*@}*/ -/** Seed value of ut_rnd_gen_ulint(). */ -ulint ut_rnd_ulint_counter = 65654363; - /***********************************************************//** Looks for a prime number slightly greater than the given argument. The prime is chosen so that it is not near any power of 2. From b1f2d3a8c8d9bd10e088111ca966b3f7be35df35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 10 Dec 2019 11:20:26 +0200 Subject: [PATCH 12/19] MDEV-21256: Replace the 64-bit LCG with a 32-bit Galois LFSR We should not need anywhere near 32 bits of entropy, so we might just limit ourselves to a 32-bit random number generator. Also, it might be cheaper to use exclusive-or, bit shifting and conditional jumps, instead of multiplication and addition. We use relaxed atomic operations on the global random number generator state in order in an attempt to silence any warnings about race conditions. There is an obvious race condition between the load and store in ut_rnd_gen(), but we do not think that it matters much that the state of the random number generator could 'stutter'. This change seems makes the 'uncompress_ops' nondeterministic in innodb_zip.cmp_per_index after the restart. It looks like there is an inherent race condition in the test, because the table could be opened for InnoDB statistics recalculation already before innodb_cmp_per_index_enabled was set. We might end up having uncompress_ops anywhere between 0 and 9, or perhaps even more. Let us remove that part of the test. --- .../suite/innodb_zip/r/cmp_per_index.result | 31 +------------ .../suite/innodb_zip/t/cmp_per_index.test | 26 +---------- storage/innobase/include/ut0rnd.h | 45 +++++++++++-------- storage/innobase/ut/ut0rnd.cc | 2 +- 4 files changed, 32 insertions(+), 72 deletions(-) diff --git a/mysql-test/suite/innodb_zip/r/cmp_per_index.result b/mysql-test/suite/innodb_zip/r/cmp_per_index.result index cdb81e7be8a..b4e34040630 100644 --- a/mysql-test/suite/innodb_zip/r/cmp_per_index.result +++ b/mysql-test/suite/innodb_zip/r/cmp_per_index.result @@ -1,3 +1,4 @@ +SET @save_enabled= @@GLOBAL.innodb_cmp_per_index_enabled; SET GLOBAL innodb_cmp_per_index_enabled=ON; SELECT * FROM information_schema.innodb_cmp_per_index; CREATE TABLE t ( @@ -70,33 +71,5 @@ index_name PRIMARY compress_ops 65 compress_ops_ok 65 uncompress_ops 0 -SHOW CREATE TABLE t; -Table t -Create Table CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` varchar(512) DEFAULT NULL, - `c` varchar(16) DEFAULT NULL, - PRIMARY KEY (`a`), - KEY `b` (`b`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 -SET GLOBAL innodb_cmp_per_index_enabled=ON; -SELECT COUNT(*) FROM t IGNORE INDEX(b); -COUNT(*) 128 -SELECT -database_name, -table_name, -index_name, -compress_ops, -compress_ops_ok, -CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9 -ELSE uncompress_ops END as uncompress_ops -FROM information_schema.innodb_cmp_per_index -ORDER BY 1, 2, 3; -database_name test -table_name t -index_name PRIMARY -compress_ops 0 -compress_ops_ok 0 -uncompress_ops 4 DROP TABLE t; -SET GLOBAL innodb_cmp_per_index_enabled=default; +SET GLOBAL innodb_cmp_per_index_enabled=@save_enabled; diff --git a/mysql-test/suite/innodb_zip/t/cmp_per_index.test b/mysql-test/suite/innodb_zip/t/cmp_per_index.test index 8d66277a1bd..74ed17b1213 100644 --- a/mysql-test/suite/innodb_zip/t/cmp_per_index.test +++ b/mysql-test/suite/innodb_zip/t/cmp_per_index.test @@ -21,6 +21,7 @@ if (`SELECT @@innodb_log_compressed_pages = 0`) -- vertical_results +SET @save_enabled= @@GLOBAL.innodb_cmp_per_index_enabled; SET GLOBAL innodb_cmp_per_index_enabled=ON; # reset any leftover stats from previous tests @@ -92,29 +93,6 @@ ELSE compress_ops_ok END as compress_ops_ok, uncompress_ops FROM information_schema.innodb_cmp_per_index ORDER BY 1, 2, 3; - -# restart mysqld and see that uncompress ops also gets increased when -# selecting from the table again - --- source include/restart_mysqld.inc - -SHOW CREATE TABLE t; - -SET GLOBAL innodb_cmp_per_index_enabled=ON; - -SELECT COUNT(*) FROM t IGNORE INDEX(b); - -SELECT -database_name, -table_name, -index_name, -compress_ops, -compress_ops_ok, -CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9 -ELSE uncompress_ops END as uncompress_ops -FROM information_schema.innodb_cmp_per_index -ORDER BY 1, 2, 3; - DROP TABLE t; -SET GLOBAL innodb_cmp_per_index_enabled=default; +SET GLOBAL innodb_cmp_per_index_enabled=@save_enabled; diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h index fcab293b3b0..9af8687bfd0 100644 --- a/storage/innobase/include/ut0rnd.h +++ b/storage/innobase/include/ut0rnd.h @@ -32,28 +32,37 @@ Created 1/20/1994 Heikki Tuuri #ifndef UNIV_INNOCHECKSUM /** Seed value of ut_rnd_gen() */ -extern uint64_t ut_rnd_current; +extern int32 ut_rnd_current; -/** @return a pseudo-random 64-bit number */ -inline uint64_t ut_rnd_gen() +/** @return a pseudo-random 32-bit number */ +inline uint32_t ut_rnd_gen() { - /* - This is a linear congruential pseudo random number generator. - The formula and the constants - being used are: - X[n+1] = (a * X[n] + c) mod m - where: - X[0] = my_interval_timer() - a = 1103515245 (3^5 * 5 * 7 * 129749) - c = 12345 (3 * 5 * 823) - m = 18446744073709551616 (1<<64), implicit */ + /* This is a Galois linear-feedback shift register. + https://en.wikipedia.org/wiki/Linear-feedback_shift_register#Galois_LFSRs + The generating primitive Galois Field polynomial is the Castagnoli + polynomial that was made popular by CRC-32C: + x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+ + x^19+x^18+x^14+x^13+x^11+x^10+x^9+x^8+x^6+1 */ + const uint32_t crc32c= 0x1edc6f41; - if (UNIV_UNLIKELY(!ut_rnd_current)) { - ut_rnd_current = my_interval_timer(); - } + uint32_t rnd= my_atomic_load32_explicit(&ut_rnd_current, + MY_MEMORY_ORDER_RELAXED); - ut_rnd_current = 1103515245 * ut_rnd_current + 12345; - return ut_rnd_current; + if (UNIV_UNLIKELY(rnd == 0)) + { + rnd= static_cast(my_interval_timer()); + if (!rnd) rnd= 1; + } + else + { + bool lsb= rnd & 1; + rnd>>= 1; + if (lsb) + rnd^= crc32c; + } + + my_atomic_store32_explicit(&ut_rnd_current, rnd, MY_MEMORY_ORDER_RELAXED); + return rnd; } /** @return a random number between 0 and n-1, inclusive */ diff --git a/storage/innobase/ut/ut0rnd.cc b/storage/innobase/ut/ut0rnd.cc index 856cb82e645..8265121ef2e 100644 --- a/storage/innobase/ut/ut0rnd.cc +++ b/storage/innobase/ut/ut0rnd.cc @@ -27,7 +27,7 @@ Created 5/11/1994 Heikki Tuuri #include "ut0rnd.h" /** Seed value of ut_rnd_gen() */ -uint64_t ut_rnd_current; +int32 ut_rnd_current; /** These random numbers are used in ut_find_prime */ /*@{*/ From 41e6a154ece1c7d49becac0ccaa72f507686d298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 10 Dec 2019 11:23:46 +0200 Subject: [PATCH 13/19] MDEV-14482 - Cache line contention on ut_rnd_interval() InnoDB RNG maintains global state, causing otherwise unnecessary bus traffic. Even worse, this is cross-mutex traffic. That is, different mutexes suffer from contention. Fixed delay of 4 was verified to give best throughput by OLTP update index and read-write benchmarks on Intel Broadwell (2/20/40) and ARM (1/46/46). This is a backport of ce0479006523bc72ed6abb703bd1f87ff256fd8a from MariaDB Server 10.3. --- .../r/innodb_spin_wait_delay_basic.result | 16 ++++++------- .../suite/sys_vars/r/sysvars_innodb.result | 4 ++-- storage/innobase/handler/ha_innodb.cc | 4 ++-- storage/innobase/include/ib0mutex.h | 6 ++--- storage/innobase/sync/sync0rw.cc | 23 ++++--------------- 5 files changed, 20 insertions(+), 33 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result index 88516a854fe..b76ba4933f2 100644 --- a/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result @@ -1,28 +1,28 @@ SET @start_global_value = @@global.innodb_spin_wait_delay; SELECT @start_global_value; @start_global_value -6 +4 Valid values are zero or above select @@global.innodb_spin_wait_delay >=0; @@global.innodb_spin_wait_delay >=0 1 select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -6 +4 select @@session.innodb_spin_wait_delay; ERROR HY000: Variable 'innodb_spin_wait_delay' is a GLOBAL variable show global variables like 'innodb_spin_wait_delay'; Variable_name Value -innodb_spin_wait_delay 6 +innodb_spin_wait_delay 4 show session variables like 'innodb_spin_wait_delay'; Variable_name Value -innodb_spin_wait_delay 6 +innodb_spin_wait_delay 4 select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_SPIN_WAIT_DELAY 6 +INNODB_SPIN_WAIT_DELAY 4 select * from information_schema.session_variables where variable_name='innodb_spin_wait_delay'; VARIABLE_NAME VARIABLE_VALUE -INNODB_SPIN_WAIT_DELAY 6 +INNODB_SPIN_WAIT_DELAY 4 set global innodb_spin_wait_delay=10; select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay @@ -38,7 +38,7 @@ ERROR HY000: Variable 'innodb_spin_wait_delay' is a GLOBAL variable and should b set global innodb_spin_wait_delay=DEFAULT; select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -6 +4 set global innodb_spin_wait_delay=0; select @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay @@ -111,4 +111,4 @@ INNODB_SPIN_WAIT_DELAY 0 SET @@global.innodb_spin_wait_delay = @start_global_value; SELECT @@global.innodb_spin_wait_delay; @@global.innodb_spin_wait_delay -6 +4 diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 65d47347a15..4be85752cc7 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -2228,10 +2228,10 @@ READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_SPIN_WAIT_DELAY SESSION_VALUE NULL -DEFAULT_VALUE 6 +DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE INT UNSIGNED -VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default) +VARIABLE_COMMENT Maximum delay between polling for a spin lock (4 by default) NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 6000 NUMERIC_BLOCK_SIZE 0 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 7e61a38320a..1e1583804eb 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -20716,8 +20716,8 @@ static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds, static MYSQL_SYSVAR_UINT(spin_wait_delay, srv_spin_wait_delay, PLUGIN_VAR_OPCMDARG, - "Maximum delay between polling for a spin lock (6 by default)", - NULL, NULL, 6, 0, 6000, 0); + "Maximum delay between polling for a spin lock (4 by default)", + NULL, NULL, 4, 0, 6000, 0); static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, PLUGIN_VAR_RQCMDARG, diff --git a/storage/innobase/include/ib0mutex.h b/storage/innobase/include/ib0mutex.h index 6c04563b97a..a7289777e00 100644 --- a/storage/innobase/include/ib0mutex.h +++ b/storage/innobase/include/ib0mutex.h @@ -225,7 +225,7 @@ struct TTASFutexMutex { return; } - ut_delay(ut_rnd_interval(max_delay)); + ut_delay(max_delay); } for (n_waits= 0;; n_waits++) { @@ -362,7 +362,7 @@ struct TTASMutex { uint32_t n_spins = 0; while (!try_lock()) { - ut_delay(ut_rnd_interval(max_delay)); + ut_delay(max_delay); if (++n_spins == max_spins) { os_thread_yield(); max_spins+= step; @@ -516,7 +516,7 @@ struct TTASEventMutex { sync_array_wait_event(sync_arr, cell); } } else { - ut_delay(ut_rnd_interval(max_delay)); + ut_delay(max_delay); } } diff --git a/storage/innobase/sync/sync0rw.cc b/storage/innobase/sync/sync0rw.cc index c9b8a1e58a5..df710a53cf6 100644 --- a/storage/innobase/sync/sync0rw.cc +++ b/storage/innobase/sync/sync0rw.cc @@ -298,10 +298,7 @@ lock_loop: /* Spin waiting for the writer field to become free */ HMT_low(); while (i < srv_n_spin_wait_rounds && lock->lock_word <= 0) { - if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval(srv_spin_wait_delay)); - } - + ut_delay(srv_spin_wait_delay); i++; } @@ -420,13 +417,9 @@ rw_lock_x_lock_wait_func( ut_ad(lock->lock_word <= threshold); + HMT_low(); while (lock->lock_word < threshold) { - - - HMT_low(); - if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval(srv_spin_wait_delay)); - } + ut_delay(srv_spin_wait_delay); if (i < srv_n_spin_wait_rounds) { i++; @@ -683,10 +676,7 @@ lock_loop: while (i < srv_n_spin_wait_rounds && lock->lock_word <= X_LOCK_HALF_DECR) { - if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval(srv_spin_wait_delay)); - } - + ut_delay(srv_spin_wait_delay); i++; } @@ -788,10 +778,7 @@ lock_loop: while (i < srv_n_spin_wait_rounds && lock->lock_word <= X_LOCK_HALF_DECR) { - if (srv_spin_wait_delay) { - ut_delay(ut_rnd_interval(srv_spin_wait_delay)); - } - + ut_delay(srv_spin_wait_delay); i++; } From f2d3b2eede50117d7f5be8a5f8daf4cfa566974b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 10 Dec 2019 16:56:52 +0200 Subject: [PATCH 14/19] Cleanup test sys_vars.innodb_buffer_pool_size_basic When using huge pages, the innodb_buffer_pool_size cannot necessarily be restored. Simplify things by restarting the server. --- .../sys_vars/r/innodb_buffer_pool_size_basic.result | 2 -- .../sys_vars/t/innodb_buffer_pool_size_basic.test | 13 ++----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result index e6210165436..e50890a341c 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result @@ -50,5 +50,3 @@ COUNT(@@GLOBAL.innodb_buffer_pool_size) 1 Expected SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size; ERROR 42S22: Unknown column 'innodb_buffer_pool_size' in 'field list' -Expected error 'Readonly variable' -SET @@GLOBAL.innodb_buffer_pool_size = @start_buffer_pool_size; diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test index c5b4c118da2..4dd4a3aba0a 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test @@ -27,7 +27,6 @@ --disable_query_log if (`select (version() like '%debug%') > 0`) { - set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug; set global innodb_disable_resize_buffer_pool_debug = OFF; } --enable_query_log @@ -116,15 +115,7 @@ SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size); --Error ER_BAD_FIELD_ERROR SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size; ---echo Expected error 'Readonly variable' -SET @@GLOBAL.innodb_buffer_pool_size = @start_buffer_pool_size; ---source include/wait_condition.inc - ---disable_query_log -if (`select (version() like '%debug%') > 0`) -{ - set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize; -} ---enable_query_log +# Restore the original buffer pool size. +--source include/restart_mysqld.inc From 280f1c2605c7140af28145dc63e4a3a6177573bf Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 11 Dec 2019 11:13:32 +0100 Subject: [PATCH 15/19] MDEV-11345 Compile english error messages into mysqld executable. --- sql/derror.cc | 85 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/sql/derror.cc b/sql/derror.cc index f5e63772d54..318800ea262 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -69,6 +69,9 @@ bool init_errmessage(void) { const char **errmsgs; bool error= FALSE; + const char *lang= my_default_lc_messages->errmsgs->language; + my_bool use_english; + DBUG_ENTER("init_errmessage"); free_error_messages(); @@ -77,37 +80,65 @@ bool init_errmessage(void) error_message_charset_info= system_charset_info; - /* Read messages from file. */ - if (read_texts(ERRMSG_FILE, my_default_lc_messages->errmsgs->language, - &original_error_messages)) + use_english= !strcmp(lang, "english"); + if (!use_english) { - /* - No error messages. Create a temporary empty error message so - that we don't get a crash if some code wrongly tries to access - a non existing error message. - */ - if (!(original_error_messages= (const char***) - my_malloc(MAX_ERROR_RANGES * sizeof(char**) + - (ERRORS_PER_RANGE * sizeof(char*)), - MYF(0)))) - DBUG_RETURN(TRUE); - errmsgs= (const char**) (original_error_messages + MAX_ERROR_RANGES); - - for (uint i=0 ; i < MAX_ERROR_RANGES ; i++) - { - original_error_messages[i]= errmsgs; - errors_per_range[i]= ERRORS_PER_RANGE; - } - errors_per_range[2]= 0; // MYSYS error messages - - for (const char **ptr= errmsgs; - ptr < errmsgs + ERRORS_PER_RANGE ; - ptr++) - *ptr= ""; - + /* Read messages from file. */ + use_english= !read_texts(ERRMSG_FILE,lang, &original_error_messages); error= TRUE; } + if (use_english) + { + static const struct + { + const char* name; + uint id; + const char* fmt; + } + english_msgs[]= + { + #include + }; + + memset(errors_per_range, 0, sizeof(errors_per_range)); + /* Calculate nr of messages per range. */ + for (size_t i= 0; i < array_elements(english_msgs); i++) + { + uint id= english_msgs[i].id; + + // We rely on the fact the array is sorted by id. + DBUG_ASSERT(i == 0 || english_msgs[i-1].id < id); + + errors_per_range[id/ERRORS_PER_RANGE-1]= id%ERRORS_PER_RANGE + 1; + } + + size_t all_errors= 0; + for (size_t i= 0; i < MAX_ERROR_RANGES; i++) + all_errors+= errors_per_range[i]; + + if (!(original_error_messages= (const char***) + my_malloc((all_errors + MAX_ERROR_RANGES)* sizeof(void*), + MYF(MY_ZEROFILL)))) + DBUG_RETURN(TRUE); + + errmsgs= (const char**)(original_error_messages + MAX_ERROR_RANGES); + + original_error_messages[0]= errmsgs; + for (uint i= 1; i < MAX_ERROR_RANGES; i++) + { + original_error_messages[i]= + original_error_messages[i-1] + errors_per_range[i-1]; + } + + for (uint i= 0; i < array_elements(english_msgs); i++) + { + uint id= english_msgs[i].id; + original_error_messages[id/ERRORS_PER_RANGE-1][id%ERRORS_PER_RANGE]= + english_msgs[i].fmt; + } + } + /* Register messages for use with my_error(). */ for (uint i=0 ; i < MAX_ERROR_RANGES ; i++) { From 202a62deb0206b181ad6a7edd4fce7206c7e3381 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 11 Dec 2019 11:22:03 +0100 Subject: [PATCH 16/19] MDEV-11345 Compile english error messages into mysqld executable. Simplify loading messages into mariabackup. Do the same as server does We're forcing english, so there is no attempt to load errmsg.sys --- extra/mariabackup/xtrabackup.cc | 38 ++++++--------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index ec53554e2d8..2ccd59ff13b 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -102,6 +102,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA #include #include #include +#include int sys_var_init(); @@ -5914,41 +5915,12 @@ extern void init_signals(void); #include -/* Messages . Avoid loading errmsg.sys file */ + void setup_error_messages() { - static const char *my_msgs[ERRORS_PER_RANGE]; - static const char **all_msgs[] = { my_msgs, my_msgs, my_msgs, my_msgs }; my_default_lc_messages = &my_locale_en_US; - my_default_lc_messages->errmsgs->errmsgs = all_msgs; - - /* Populate the necessary error messages */ - struct { - int id; - const char *fmt; - } - xb_msgs[] = - { - { ER_DATABASE_NAME,"Database" }, - { ER_TABLE_NAME,"Table"}, - { ER_PARTITION_NAME, "Partition" }, - { ER_SUBPARTITION_NAME, "Subpartition" }, - { ER_TEMPORARY_NAME, "Temporary"}, - { ER_RENAMED_NAME, "Renamed"}, - { ER_CANT_FIND_DL_ENTRY, "Can't find symbol '%-.128s' in library"}, - { ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" }, - { ER_OUTOFMEMORY, "Out of memory; restart server and try again (needed %d bytes)" }, - { ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" }, - { ER_UDF_NO_PATHS, "No paths allowed for shared library" }, - { ER_CANT_INITIALIZE_UDF,"Can't initialize function '%-.192s'; %-.80s"}, - { ER_PLUGIN_IS_NOT_LOADED,"Plugin '%-.192s' is not loaded" } - }; - - for (int i = 0; i < (int)array_elements(all_msgs); i++) - all_msgs[0][i] = "Unknown error"; - - for (int i = 0; i < (int)array_elements(xb_msgs); i++) - all_msgs[0][xb_msgs[i].id - ER_ERROR_FIRST] = xb_msgs[i].fmt; + if (init_errmessage()) + die("could not initialize error messages"); } void @@ -6220,6 +6192,8 @@ int main(int argc, char **argv) (void) pthread_key_delete(THR_THD); logger.cleanup_base(); + cleanup_errmsgs(); + free_error_messages(); mysql_mutex_destroy(&LOCK_error_log); if (status == EXIT_SUCCESS) { From 546644f1ccac8300e07b9cbc918acd7f1bd51752 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Wed, 11 Dec 2019 13:00:49 -0500 Subject: [PATCH 17/19] bump the VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 49469df82da..bfa49d4ca46 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=2 -MYSQL_VERSION_PATCH=30 +MYSQL_VERSION_PATCH=31 From 808036a61d13d4392b6e0d9e7e9eca87a0c20495 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Thu, 12 Dec 2019 03:45:34 +0530 Subject: [PATCH 18/19] MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data The issue here is window function makes the passed string object to point to an area in a temporary table's record buffer. Then, the temporary table is freed, together with its record buffer. Then, Item_cache_str attempts to read this value. The fix is to call value_buff.copy(). This will make the value_buff to store its string in a buffer that it owns, which will not disappear unexpectedly. --- mysql-test/r/win.result | 9 +++++++++ mysql-test/t/win.test | 10 ++++++++++ sql/item.cc | 2 ++ 3 files changed, 21 insertions(+) diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result index 13d452f3ef2..805fd2ed3d7 100644 --- a/mysql-test/r/win.result +++ b/mysql-test/r/win.result @@ -3634,5 +3634,14 @@ rank() over (partition by 'abc' order by 'xyz') 1 drop table t1; # +# MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data +# +CREATE TABLE t1 (i int); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x; +x +foo +drop table t1; +# # End of 10.2 tests # diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test index a4d42ce2b91..0f79834567b 100644 --- a/mysql-test/t/win.test +++ b/mysql-test/t/win.test @@ -2341,6 +2341,16 @@ select rank() over (partition by 'abc' order by 'xyz') from t1; select rank() over (partition by 'abc' order by 'xyz') from t1; drop table t1; +--echo # +--echo # MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data +--echo # + +CREATE TABLE t1 (i int); +INSERT INTO t1 VALUES (1),(2),(3); + +SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x; +drop table t1; + --echo # --echo # End of 10.2 tests --echo # diff --git a/sql/item.cc b/sql/item.cc index 333d71ddf70..10087ef1974 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -10044,6 +10044,8 @@ bool Item_cache_str::cache_value() value_buff.copy(*value); value= &value_buff; } + else + value_buff.copy(); return TRUE; } From beec9c0e19284a0e50d3629f4cb2486007b0333b Mon Sep 17 00:00:00 2001 From: Vlad Lesin Date: Wed, 2 Oct 2019 21:11:59 +0300 Subject: [PATCH 19/19] MDEV-21255: Deadlock of parallel slave and mariabackup (with failed log copy thread) mariabackup hangs waiting until innodb redo log thread read log till certain LSN, and it waits under FTWRL. If there is redo log read error in the thread, it is finished, and main thread knows nothing about it, what leads to hanging. As it hangs under FTWRL, slave threads on server side can be blocked due to MDL lock conflict. The fix is to finish mariabackup with error message on innodb redo log read failure. --- extra/mariabackup/xtrabackup.cc | 4 +++- .../mariabackup/innodb_redo_log_overwrite.opt | 1 + .../innodb_redo_log_overwrite.result | 2 ++ .../innodb_redo_log_overwrite.test | 20 +++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt create mode 100644 mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result create mode 100644 mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 2ccd59ff13b..e497ba5a972 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2759,7 +2759,7 @@ static bool xtrabackup_copy_logfile(bool last = false) log_mutex_exit(); if (!start_lsn) { - msg(recv_sys->found_corrupt_log + die(recv_sys->found_corrupt_log ? "xtrabackup_copy_logfile() failed: corrupt log." : "xtrabackup_copy_logfile() failed."); return true; @@ -4281,6 +4281,8 @@ fail_before_log_copying_thread_start: if (xtrabackup_copy_logfile()) goto fail_before_log_copying_thread_start; + DBUG_MARIABACKUP_EVENT("before_innodb_log_copy_thread_started",0); + log_copying_stop = os_event_create(0); os_thread_create(log_copying_thread, NULL, &log_copying_thread_id); diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt new file mode 100644 index 00000000000..7111d384b40 --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt @@ -0,0 +1 @@ +--loose-innodb-log-file-size=1048576 --loose-innodb-log-files-in-group=2 diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result new file mode 100644 index 00000000000..29abe038afe --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result @@ -0,0 +1,2 @@ +CREATE TABLE t(i INT) ENGINE=INNODB; +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test new file mode 100644 index 00000000000..22165ff29be --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test @@ -0,0 +1,20 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_sequence.inc + +CREATE TABLE t(i INT) ENGINE=INNODB; + +--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup + +# Generate enough redo log records to make at least one loop in log group +--let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * from test.seq_1_to_102400 + +--disable_result_log +# mariabackup must exit with error instead of hanging +--error 1 +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +DROP TABLE t; +--rmdir $targetdir +