diff --git a/Docs/INFO_SRC b/Docs/INFO_SRC index 54aef3c2fca6770bcd4efb4adc6cd52dc26ba31d..7007a3c3f1b106d41b3266a7666f1b77b82e3894 100644 --- a/Docs/INFO_SRC +++ b/Docs/INFO_SRC @@ -1,8 +1,8 @@ -commit: f0e9bebd278b27e05d9c66746420b48535f2b86e -date: 2017-09-27 10:22:15 +0200 -build-date: 2017-09-27 12:07:50 +0000 -short: f0e9beb +commit: 05103c84ecc519eae4090b720f48203a648e2ab9 +date: 2017-11-13 18:41:55 +0000 +build-date: 2017-11-13 18:46:50 +0000 +short: 05103c8 branch: HEAD -MariaDB source 10.1.28 +MariaDB source 10.1.29 diff --git a/VERSION b/VERSION index 3d1d889a5c1afb77b074b6da449e665f609952b7..dce8bbe23fc1d45ba8d2274c2282a83a46aa3b3b 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=1 -MYSQL_VERSION_PATCH=28 +MYSQL_VERSION_PATCH=29 diff --git a/client/mysql.cc b/client/mysql.cc index 1c344c7e54c8dc6106998e9b76891d8fc3d68c21..c043d054ea58c4130aac65e3be22b60ebda00bb0 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1065,8 +1065,7 @@ static void fix_history(String *final_command); static COMMANDS *find_command(char *name); static COMMANDS *find_command(char cmd_name); -static bool add_line(String &buffer, char *line, ulong line_length, - char *in_string, bool *ml_comment, bool truncated); +static bool add_line(String &, char *, ulong, char *, bool *, bool); static void remove_cntrl(String &buffer); static void print_table_data(MYSQL_RES *result); static void print_table_data_html(MYSQL_RES *result); @@ -1078,7 +1077,7 @@ static ulong start_timer(void); static void end_timer(ulong start_time,char *buff); static void mysql_end_timer(ulong start_time,char *buff); static void nice_time(double sec,char *buff,bool part_second); -extern "C" sig_handler mysql_end(int sig); +extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn)); extern "C" sig_handler handle_sigint(int sig); #if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL) static sig_handler window_resize(int sig); @@ -1095,7 +1094,7 @@ inline bool is_delimiter_command(char *name, ulong len) only name(first DELIMITER_NAME_LEN bytes) is checked. */ return (len >= DELIMITER_NAME_LEN && - !my_strnncoll(charset_info, (uchar*) name, DELIMITER_NAME_LEN, + !my_strnncoll(&my_charset_latin1, (uchar*) name, DELIMITER_NAME_LEN, (uchar *) DELIMITER_NAME, DELIMITER_NAME_LEN)); } diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 7a4b34c40c6cdf941e23d2f69af6e5adfb476ecc..c103061bbc5eff3ac213881871f5242280b266ec 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2670,10 +2670,11 @@ int main(int argc, char** argv) if (!argc || opt_version) { - if (!argc) - usage(); if (!opt_version) + { + usage(); retval= ERROR_STOP; + } goto err; } diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index e886cea1cc137c013cec57724c7c1898da2b61d6..e80fb199f03056282ab98b89dad462cdc705db0f 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -168,9 +168,14 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES "MariaDB-client") IF(WITH_WSREP) -SETA(CPACK_RPM_server_PACKAGE_REQUIRES - "galera" "rsync" "lsof" "grep" "gawk" "iproute" - "coreutils" "findutils" "tar" "which") + SETA(CPACK_RPM_server_PACKAGE_REQUIRES + "galera" "rsync" "lsof" "grep" "gawk" "iproute" + "coreutils" "findutils" "tar") + IF (RPM MATCHES "sles11") + SETA(CPACK_RPM_server_PACKAGE_REQUIRES "util-linux") + ELSE() + SETA(CPACK_RPM_server_PACKAGE_REQUIRES "which") + ENDIF() ENDIF() SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh) diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake index 367b78afd0d9433a5428ea7d0b84e4deb9db731d..0541cca86a5d810778961741b63fcea6ccd3520e 100644 --- a/cmake/maintainer.cmake +++ b/cmake/maintainer.cmake @@ -20,6 +20,11 @@ IF(HAVE_C__Wvla) SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla") ENDIF() +MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation") +IF(HAVE_C__Wno_format_truncation) + SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation") +ENDIF() + # Common warning flags for GCC and Clang SET(MY_C_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement") diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 894bde3897460021e215388364e577be201a8ef2..4c113929866574e121e619c8b0bb6f4be29e6449 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -1,11 +1,23 @@ +INCLUDE (CheckCSourceRuns) + SET(WITH_PCRE "auto" CACHE STRING "Which pcre to use (possible values are 'bundled', 'system', or 'auto')") MACRO (CHECK_PCRE) IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto") - CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE) + CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD) + IF(NOT CMAKE_CROSSCOMPILING) + SET(CMAKE_REQUIRED_LIBRARIES "pcre") + CHECK_C_SOURCE_RUNS(" + #include + int main() { + return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256; + }" PCRE_STACK_SIZE_OK) + SET(CMAKE_REQUIRED_LIBRARIES) + ENDIF() ENDIF() - IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled") + IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR + WITH_PCRE STREQUAL "bundled") IF (WITH_PCRE STREQUAL "system") MESSAGE(FATAL_ERROR "system pcre is not found or unusable") ENDIF() diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index e6d1379aea3ddce2bd63d112e06c5b6d2948ebba..b5dc8b9f1573127e81537010be1fc4216f53a416 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -26,7 +26,7 @@ ENDIF() OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default}) # Set the patch version -SET(WSREP_PATCH_VERSION "20") +SET(WSREP_PATCH_VERSION "21") # Obtain wsrep API version FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 156e0b20e7c4235431b2bc635940d32e33f7baeb..c019209faad5ba915cd008a8193409ebc850520a 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1700,26 +1700,28 @@ copy_back() ut_crc32_init(); /* copy undo tablespaces */ - if (srv_undo_tablespaces > 0) { - dst_dir = (srv_undo_dir && *srv_undo_dir) - ? srv_undo_dir : mysql_data_home; - ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); + dst_dir = (srv_undo_dir && *srv_undo_dir) + ? srv_undo_dir : mysql_data_home; - for (i = 1; i <= srv_undo_tablespaces; i++) { - char filename[20]; - sprintf(filename, "undo%03u", (uint)i); - if (!(ret = copy_or_move_file(filename, filename, - dst_dir, 1))) { - goto cleanup; - } - } + ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); - ds_destroy(ds_data); - ds_data = NULL; + for (i = 1; ; i++) { + char filename[20]; + sprintf(filename, "undo%03u", (uint)i); + if (!file_exists(filename)) { + break; + } + if (!(ret = copy_or_move_file(filename, filename, + dst_dir, 1))) { + goto cleanup; + } } + ds_destroy(ds_data); + ds_data = NULL; + /* copy redo logs */ dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir) @@ -1844,7 +1846,7 @@ copy_back() } } - /* copy buufer pool dump */ + /* copy buffer pool dump */ if (innobase_buffer_pool_filename) { const char *src_name; diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc index 86a873ef69ca9c5a4eb055af12b544c22385c311..d5185b189714c75725805728f9ad687cbac0efaa 100644 --- a/extra/mariabackup/changed_page_bitmap.cc +++ b/extra/mariabackup/changed_page_bitmap.cc @@ -538,7 +538,7 @@ xb_msg_missing_lsn_data( lsn_t missing_interval_start, /*! bmp_end_lsn)) { - msg("xtrabackup: incremental backup LSN " LSN_PF + msg("mariabackup: incremental backup LSN " LSN_PF " is larger than than the last checkpoint LSN " LSN_PF "\n", bmp_start_lsn, bmp_end_lsn); return NULL; @@ -700,7 +700,7 @@ xb_page_bitmap_init(void) ¤t_page_end_lsn, bmp_start_lsn))) { - msg("xtrabackup: Warning: changed page bitmap file " + msg("mariabackup: Warning: changed page bitmap file " "\'%s\' corrupted\n", bitmap_file.name); rbt_free(result); free(bitmap_files.files); @@ -805,7 +805,7 @@ xb_page_bitmap_init(void) if (UNIV_UNLIKELY(!last_page_ok)) { - msg("xtrabackup: warning: changed page bitmap file " + msg("mariabackup: warning: changed page bitmap file " "\'%s\' corrupted.\n", bitmap_file.name); rbt_free(result); free(bitmap_files.files); diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc index 820d8e10c29dc7d0210c92db883610238a126dcc..54700ce683750c54319c5b0debb41a05355f8cc4 100644 --- a/extra/mariabackup/fil_cur.cc +++ b/extra/mariabackup/fil_cur.cc @@ -1,5 +1,5 @@ /****************************************************** -XtraBackup: hot backup tool for InnoDB +MariaBackup: hot backup tool for InnoDB (c) 2009-2013 Percona LLC and/or its affiliates. Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, @@ -173,7 +173,7 @@ xb_fil_cur_open( /* The following call prints an error message */ os_file_get_last_error(TRUE); - msg("[%02u] xtrabackup: error: cannot open " + msg("[%02u] mariabackup: error: cannot open " "tablespace %s\n", thread_n, cursor->abs_path); @@ -202,7 +202,7 @@ xb_fil_cur_open( cursor->file = node->handle; if (stat(cursor->abs_path, &cursor->statinfo)) { - msg("[%02u] xtrabackup: error: cannot stat %s\n", + msg("[%02u] mariabackup: error: cannot stat %s\n", thread_n, cursor->abs_path); xb_fil_cur_close(cursor); @@ -229,7 +229,7 @@ xb_fil_cur_open( msg("[%02u] %s is compressed with page size = " "%lu bytes\n", thread_n, node->name, page_size); if (page_size_shift < 10 || page_size_shift > 14) { - msg("[%02u] xtrabackup: Error: Invalid " + msg("[%02u] mariabackup: Error: Invalid " "page size: %lu.\n", thread_n, page_size); ut_error; } @@ -300,9 +300,9 @@ xb_fil_cur_read( offset + to_read == cursor->statinfo.st_size) { if (to_read < (ib_int64_t) cursor->page_size) { - msg("[%02u] xtrabackup: Warning: junk at the end of " + msg("[%02u] mariabackup: Warning: junk at the end of " "%s:\n", cursor->thread_n, cursor->abs_path); - msg("[%02u] xtrabackup: Warning: offset = %llu, " + msg("[%02u] mariabackup: Warning: offset = %llu, " "to_read = %llu\n", cursor->thread_n, (unsigned long long) offset, @@ -356,13 +356,13 @@ xb_fil_cur_read( page_no < (ib_int64_t) FSP_EXTENT_SIZE * 3) { /* skip doublewrite buffer pages */ xb_a(cursor->page_size == UNIV_PAGE_SIZE); - msg("[%02u] xtrabackup: " + msg("[%02u] mariabackup: " "Page %lu is a doublewrite buffer page, " "skipping.\n", cursor->thread_n, page_no); } else { retry_count--; if (retry_count == 0) { - msg("[%02u] xtrabackup: " + msg("[%02u] mariabackup: " "Error: failed to read page after " "10 retries. File %s seems to be " "corrupted.\n", cursor->thread_n, @@ -370,7 +370,7 @@ xb_fil_cur_read( ret = XB_FIL_CUR_ERROR; break; } - msg("[%02u] xtrabackup: " + msg("[%02u] mariabackup: " "Database page corruption detected at page " "%lu, retrying...\n", cursor->thread_n, page_no); diff --git a/extra/mariabackup/write_filt.cc b/extra/mariabackup/write_filt.cc index cf7753bf380b61d656896403c65553c15ef93558..05981489bb6774be8437efb6db18fede46bc5039 100644 --- a/extra/mariabackup/write_filt.cc +++ b/extra/mariabackup/write_filt.cc @@ -1,5 +1,5 @@ /****************************************************** -XtraBackup: hot backup tool for InnoDB +MariaBackup: hot backup tool for InnoDB (c) 2009-2013 Percona LLC and/or its affiliates. Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, @@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "write_filt.h" #include "fil_cur.h" #include "xtrabackup.h" +#include /************************************************************************ Write-through page write filter. */ @@ -68,18 +69,21 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, { char meta_name[FN_REFLEN]; xb_delta_info_t info; - ulint buf_size; xb_wf_incremental_ctxt_t *cp = &(ctxt->u.wf_incremental_ctxt); ctxt->cursor = cursor; /* allocate buffer for incremental backup (4096 pages) */ - buf_size = (cursor->page_size / 4 + 1) * cursor->page_size; - cp->delta_buf_base = static_cast(ut_malloc(buf_size)); - memset(cp->delta_buf_base, 0, buf_size); - cp->delta_buf = static_cast - (ut_align(cp->delta_buf_base, UNIV_PAGE_SIZE_MAX)); + cp->delta_buf_size = (cursor->page_size / 4) * cursor->page_size; + cp->delta_buf = (unsigned char *)os_mem_alloc_large(&cp->delta_buf_size); + + if (!cp->delta_buf) { + msg("[%02u] mariabackup: Error: " + "cannot allocate %zu bytes\n", + cursor->thread_n, (size_t) cp->delta_buf_size); + return (FALSE); + } /* write delta meta info */ snprintf(meta_name, sizeof(meta_name), "%s%s", dst_name, @@ -88,7 +92,7 @@ wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, info.zip_size = cursor->zip_size; info.space_id = cursor->space_id; if (!xb_write_delta_metadata(meta_name, &info)) { - msg("[%02u] xtrabackup: Error: " + msg("[%02u] mariabackup: Error: " "failed to write meta info for %s\n", cursor->thread_n, cursor->rel_path); return(FALSE); @@ -183,10 +187,7 @@ static void wf_incremental_deinit(xb_write_filt_ctxt_t *ctxt) { xb_wf_incremental_ctxt_t *cp = &(ctxt->u.wf_incremental_ctxt); - - if (cp->delta_buf_base != NULL) { - ut_free(cp->delta_buf_base); - } + os_mem_free_large(cp->delta_buf, cp->delta_buf_size); } /************************************************************************ diff --git a/extra/mariabackup/write_filt.h b/extra/mariabackup/write_filt.h index bcab263f1dd2bccf9b71c22fcca61c81f7b4c8eb..69655db5b0b771f14166dafa2694a9fd3f268446 100644 --- a/extra/mariabackup/write_filt.h +++ b/extra/mariabackup/write_filt.h @@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA /* Incremental page filter context */ typedef struct { - byte *delta_buf_base; + ulint delta_buf_size; byte *delta_buf; ulint npages; } xb_wf_incremental_ctxt_t; diff --git a/extra/mariabackup/wsrep.cc b/extra/mariabackup/wsrep.cc index 7b196725c077439a183740dfda9ab567af767597..3baa9e660d7d3278d9d13718ce46eeb1e25c084d 100644 --- a/extra/mariabackup/wsrep.cc +++ b/extra/mariabackup/wsrep.cc @@ -195,7 +195,7 @@ xb_write_galera_info(bool incremental_prepare) fp = fopen(XB_GALERA_INFO_FILENAME, "w"); if (fp == NULL) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "could not create " XB_GALERA_INFO_FILENAME ", errno = %d\n", errno); @@ -204,12 +204,12 @@ xb_write_galera_info(bool incremental_prepare) seqno = wsrep_xid_seqno(&xid); - msg("xtrabackup: Recovered WSREP position: %s:%lld\n", + msg("mariabackup: Recovered WSREP position: %s:%lld\n", uuid_str, (long long) seqno); if (fprintf(fp, "%s:%lld", uuid_str, (long long) seqno) < 0) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "could not write to " XB_GALERA_INFO_FILENAME ", errno = %d\n", errno); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index f07b1c6d3e3efbd80a721ef664b45e1dafe1680a..2f9761eb0ec93a96dabc0508a91cff88158a82d7 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -1,5 +1,5 @@ /****************************************************** -XtraBackup: hot backup tool for InnoDB +MariaBackup: hot backup tool for InnoDB (c) 2009-2017 Percona LLC and/or its affiliates Originally Created 3/3/2009 Yasufumi Kinoshita Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko, @@ -837,6 +837,11 @@ struct my_option xb_client_options[] = (uchar*) &opt_incremental_history_uuid, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"remove-original", OPT_REMOVE_ORIGINAL, "Remove .qp files after decompression.", + (uchar *) &opt_remove_original, + (uchar *) &opt_remove_original, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, "This option specifies which types of queries are allowed to complete " "before innobackupex will issue the global lock. Default is all.", @@ -1154,13 +1159,13 @@ debug_sync_point(const char *name) xtrabackup_target_dir); fp = fopen(pid_path, "w"); if (fp == NULL) { - msg("xtrabackup: Error: cannot open %s\n", pid_path); + msg("mariabackup: Error: cannot open %s\n", pid_path); exit(EXIT_FAILURE); } fprintf(fp, "%u\n", (uint) pid); fclose(fp); - msg("xtrabackup: DEBUG: Suspending at debug sync point '%s'. " + msg("mariabackup: DEBUG: Suspending at debug sync point '%s'. " "Resume with 'kill -SIGCONT %u'.\n", name, (uint) pid); debug_sync_resumed= 0; @@ -1170,7 +1175,7 @@ debug_sync_point(const char *name) } /* On resume */ - msg("xtrabackup: DEBUG: removing the pid file.\n"); + msg("mariabackup: DEBUG: removing the pid file.\n"); my_delete(pid_path, MYF(MY_WME)); #endif } @@ -1465,19 +1470,19 @@ innodb_init_param(void) /* Check that values don't overflow on 32-bit systems. */ if (sizeof(ulint) == 4) { if (xtrabackup_use_memory > UINT_MAX32) { - msg("xtrabackup: use-memory can't be over 4GB" + msg("mariabackup: use-memory can't be over 4GB" " on 32-bit systems\n"); } if (innobase_buffer_pool_size > UINT_MAX32) { - msg("xtrabackup: innobase_buffer_pool_size can't be " + msg("mariabackup: innobase_buffer_pool_size can't be " "over 4GB on 32-bit systems\n"); goto error; } if (innobase_log_file_size > UINT_MAX32) { - msg("xtrabackup: innobase_log_file_size can't be " + msg("mariabackup: innobase_log_file_size can't be " "over 4GB on 32-bit systemsi\n"); goto error; @@ -1504,9 +1509,9 @@ innodb_init_param(void) read from MySQL .cnf file */ if (xtrabackup_backup) { - msg("xtrabackup: using the following InnoDB configuration:\n"); + msg("mariabackup: using the following InnoDB configuration:\n"); } else { - msg("xtrabackup: using the following InnoDB configuration " + msg("mariabackup: using the following InnoDB configuration " "for recovery:\n"); } @@ -1516,7 +1521,7 @@ innodb_init_param(void) srv_data_home = (xtrabackup_backup && innobase_data_home_dir ? innobase_data_home_dir : default_path); - msg("xtrabackup: innodb_data_home_dir = %s\n", srv_data_home); + msg("mariabackup: innodb_data_home_dir = %s\n", srv_data_home); /* Set default InnoDB data file size to 10 MB and let it be auto-extending. Thus users can use InnoDB in >= 4.0 without having @@ -1525,7 +1530,7 @@ innodb_init_param(void) if (!innobase_data_file_path) { innobase_data_file_path = (char*) "ibdata1:10M:autoextend"; } - msg("xtrabackup: innodb_data_file_path = %s\n", + msg("mariabackup: innodb_data_file_path = %s\n", innobase_data_file_path); /* Since InnoDB edits the argument in the next call, we make another @@ -1536,7 +1541,7 @@ innodb_init_param(void) ret = (my_bool) srv_parse_data_file_paths_and_sizes( internal_innobase_data_file_path); if (ret == FALSE) { - msg("xtrabackup: syntax error in innodb_data_file_path\n"); + msg("mariabackup: syntax error in innodb_data_file_path\n"); mem_free_and_error: free(internal_innobase_data_file_path); internal_innobase_data_file_path = NULL; @@ -1569,7 +1574,7 @@ innodb_init_param(void) if (xtrabackup_prepare && xtrabackup_incremental_dir) { srv_log_group_home_dir = xtrabackup_incremental_dir; } - msg("xtrabackup: innodb_log_group_home_dir = %s\n", + msg("mariabackup: innodb_log_group_home_dir = %s\n", srv_log_group_home_dir); srv_normalize_path_for_win(srv_log_group_home_dir); @@ -1591,9 +1596,9 @@ innodb_init_param(void) srv_n_log_files = (ulint) innobase_log_files_in_group; srv_log_file_size = (ulint) innobase_log_file_size; - msg("xtrabackup: innodb_log_files_in_group = %ld\n", + msg("mariabackup: innodb_log_files_in_group = %ld\n", srv_n_log_files); - msg("xtrabackup: innodb_log_file_size = %lld\n", + msg("mariabackup: innodb_log_file_size = %lld\n", (long long int) srv_log_file_size); srv_log_buffer_size = (ulint) innobase_log_buffer_size; @@ -1724,7 +1729,7 @@ innodb_init_param(void) return(FALSE); error: - msg("xtrabackup: innodb_init_param(): Error occured.\n"); + msg("mariabackup: innodb_init_param(): Error occured.\n"); return(TRUE); } @@ -1755,7 +1760,7 @@ innodb_init(void) return(FALSE); error: - msg("xtrabackup: innodb_init(): Error occured.\n"); + msg("mariabackup: innodb_init(): Error occured.\n"); return(TRUE); } @@ -1765,7 +1770,7 @@ innodb_end() srv_fast_shutdown = (ulint) innobase_fast_shutdown; innodb_inited = 0; - msg("xtrabackup: starting shutdown with innodb_fast_shutdown = %lu\n", + msg("mariabackup: starting shutdown with innodb_fast_shutdown = %lu\n", srv_fast_shutdown); innodb_shutdown(); @@ -1796,7 +1801,7 @@ xtrabackup_read_metadata(char *filename) fp = fopen(filename,"r"); if(!fp) { - msg("xtrabackup: Error: cannot open %s\n", filename); + msg("mariabackup: Error: cannot open %s\n", filename); return(FALSE); } @@ -1875,7 +1880,7 @@ xtrabackup_stream_metadata(ds_ctxt_t *ds_ctxt) stream = ds_open(ds_ctxt, XTRABACKUP_METADATA_FILENAME, &mystat); if (stream == NULL) { - msg("xtrabackup: Error: cannot open output stream " + msg("mariabackup: Error: cannot open output stream " "for %s\n", XTRABACKUP_METADATA_FILENAME); return(FALSE); } @@ -1908,7 +1913,7 @@ xtrabackup_write_metadata(const char *filepath) fp = fopen(filepath, "w"); if(!fp) { - msg("xtrabackup: Error: cannot open %s\n", filepath); + msg("mariabackup: Error: cannot open %s\n", filepath); return(FALSE); } if (fwrite(buf, len, 1, fp) < 1) { @@ -1958,11 +1963,11 @@ xb_read_delta_metadata(const char *filepath, xb_delta_info_t *info) fclose(fp); if (info->page_size == ULINT_UNDEFINED) { - msg("xtrabackup: page_size is required in %s\n", filepath); + msg("mariabackup: page_size is required in %s\n", filepath); r = FALSE; } if (info->space_id == ULINT_UNDEFINED) { - msg("xtrabackup: Warning: This backup was taken with XtraBackup 2.0.1 " + msg("mariabackup: Warning: This backup was taken with XtraBackup 2.0.1 " "or earlier, some DDL operations between full and incremental " "backups may be handled incorrectly\n"); } @@ -1994,7 +1999,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info) f = ds_open(ds_meta, filename, &mystat); if (f == NULL) { - msg("xtrabackup: Error: cannot open output stream for %s\n", + msg("mariabackup: Error: cannot open output stream for %s\n", filename); return(FALSE); } @@ -2365,14 +2370,14 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) if (write_filter->init != NULL && !write_filter->init(&write_filt_ctxt, dst_name, &cursor)) { - msg("[%02u] xtrabackup: error: " + msg("[%02u] mariabackup: error: " "failed to initialize page write filter.\n", thread_n); goto error; } dstfile = ds_open(ds_data, dst_name, &cursor.statinfo); if (dstfile == NULL) { - msg("[%02u] xtrabackup: error: " + msg("[%02u] mariabackup: error: " "cannot open the destination stream for %s\n", thread_n, dst_name); goto error; @@ -2422,7 +2427,7 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) if (write_filter && write_filter->deinit) { write_filter->deinit(&write_filt_ctxt);; } - msg("[%02u] xtrabackup: Error: " + msg("[%02u] mariabackup: Error: " "xtrabackup_copy_datafile() failed.\n", thread_n); return(TRUE); /*ERROR*/ @@ -2434,10 +2439,10 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) if (write_filter && write_filter->deinit) { write_filter->deinit(&write_filt_ctxt); } - msg("[%02u] xtrabackup: Warning: We assume the " + msg("[%02u] mariabackup: Warning: We assume the " "table was dropped during xtrabackup execution " "and ignore the file.\n", thread_n); - msg("[%02u] xtrabackup: Warning: skipping tablespace %s.\n", + msg("[%02u] mariabackup: Warning: skipping tablespace %s.\n", thread_n, node_name); return(FALSE); } @@ -2588,14 +2593,14 @@ xtrabackup_scan_log_recs( break; } - msg("xtrabackup: error:" + msg("mariabackup: error:" " log block numbers mismatch:\n" - "xtrabackup: error: expected log block no. %lu," + "mariabackup: error: expected log block no. %lu," " but got no. %lu from the log file.\n", (ulong) scanned_no, (ulong) no); if ((no - scanned_no) % blocks_in_group == 0) { - msg("xtrabackup: error:" + msg("mariabackup: error:" " it looks like InnoDB log has wrapped" " around before xtrabackup could" " process all records due to either" @@ -2607,14 +2612,14 @@ xtrabackup_scan_log_recs( } else if (!checksum_is_ok) { /* Garbage or an incompletely written log block */ - msg("xtrabackup: warning: Log block checksum mismatch" + msg("mariabackup: warning: Log block checksum mismatch" " (block no %lu at lsn " LSN_PF "): \n" "expected %lu, calculated checksum %lu\n", (ulong) no, scanned_lsn, (ulong) log_block_get_checksum(log_block), (ulong) log_block_calc_checksum(log_block)); - msg("xtrabackup: warning: this is possible when the " + msg("mariabackup: warning: this is possible when the " "log block has not been fully written by the " "server, will retry later.\n"); *finished = true; @@ -2687,7 +2692,7 @@ xtrabackup_scan_log_recs( } if (ds_write(dst_log_file, log_sys->buf, write_size)) { - msg("xtrabackup: Error: " + msg("mariabackup: Error: " "write to logfile failed\n"); return(false); } @@ -2768,7 +2773,7 @@ xtrabackup_copy_logfile(lsn_t from_lsn, my_bool is_last) error: mutex_exit(&log_sys->mutex); ds_close(dst_log_file); - msg("xtrabackup: Error: xtrabackup_copy_logfile() failed.\n"); + msg("mariabackup: Error: xtrabackup_copy_logfile() failed.\n"); return(TRUE); } @@ -2911,7 +2916,7 @@ data_copy_thread_func( /* copy the datafile */ if(xtrabackup_copy_datafile(node, num)) { - msg("[%02u] xtrabackup: Error: " + msg("[%02u] mariabackup: Error: " "failed to copy datafile.\n", num); exit(EXIT_FAILURE); } @@ -3083,25 +3088,25 @@ xb_load_tablespaces(void) &flushed_lsn, &sum_of_new_sizes); if (err != DB_SUCCESS) { - msg("xtrabackup: Could not open or create data files.\n" - "xtrabackup: If you tried to add new data files, and it " + msg("mariabackup: Could not open or create data files.\n" + "mariabackup: If you tried to add new data files, and it " "failed here,\n" - "xtrabackup: you should now edit innodb_data_file_path in " + "mariabackup: you should now edit innodb_data_file_path in " "my.cnf back\n" - "xtrabackup: to what it was, and remove the new ibdata " + "mariabackup: to what it was, and remove the new ibdata " "files InnoDB created\n" - "xtrabackup: in this failed attempt. InnoDB only wrote " + "mariabackup: in this failed attempt. InnoDB only wrote " "those files full of\n" - "xtrabackup: zeros, but did not yet use them in any way. " + "mariabackup: zeros, but did not yet use them in any way. " "But be careful: do not\n" - "xtrabackup: remove old data files which contain your " + "mariabackup: remove old data files which contain your " "precious data!\n"); return(err); } /* create_new_db must not be TRUE.. */ if (create_new_db) { - msg("xtrabackup: could not find data files at the " + msg("mariabackup: could not find data files at the " "specified datadir\n"); return(DB_ERROR); } @@ -3120,7 +3125,7 @@ xb_load_tablespaces(void) srv_undo_tablespaces_init(), because fil_is_user_tablespace_id() * relies on srv_undo_tablespaces_open to be properly initialized */ - msg("xtrabackup: Generating a list of tablespaces\n"); + msg("mariabackup: Generating a list of tablespaces\n"); err = fil_load_single_table_tablespaces(xb_check_if_open_tablespace); if (err != DB_SUCCESS) { @@ -3168,7 +3173,7 @@ xb_data_files_close(void) } if (i == 1000) { - msg("xtrabackup: Warning: %lu threads created by InnoDB" + msg("mariabackup: Warning: %lu threads created by InnoDB" " had not exited at shutdown!\n", (ulong) os_thread_count); } @@ -3254,12 +3259,12 @@ xb_validate_name( /* perform only basic validation. validate length and path symbols */ if (len > NAME_LEN) { - msg("xtrabackup: name `%s` is too long.\n", name); + msg("mariabackup: name `%s` is too long.\n", name); exit(EXIT_FAILURE); } p = strpbrk(name, "/\\~"); if (p && p - name < NAME_LEN) { - msg("xtrabackup: name `%s` is not valid.\n", name); + msg("mariabackup: name `%s` is not valid.\n", name); exit(EXIT_FAILURE); } } @@ -3338,7 +3343,7 @@ xb_register_table( const char* name) /*!< in: name of table */ { if (strchr(name, '.') == NULL) { - msg("xtrabackup: `%s` is not fully qualified name.\n", name); + msg("mariabackup: `%s` is not fully qualified name.\n", name); exit(EXIT_FAILURE); } @@ -3360,7 +3365,7 @@ xb_add_regex_to_list( if (ret != 0) { regerror(ret, &compiled_regex, errbuf, sizeof(errbuf)); - msg("xtrabackup: error: %s regcomp(%s): %s\n", + msg("mariabackup: error: %s regcomp(%s): %s\n", error_context, regex, errbuf); exit(EXIT_FAILURE); } @@ -3429,7 +3434,7 @@ xb_load_list_file( /* read and store the filenames */ fp = fopen(filename, "r"); if (!fp) { - msg("xtrabackup: cannot open %s\n", + msg("mariabackup: cannot open %s\n", filename); exit(EXIT_FAILURE); } @@ -3438,7 +3443,7 @@ xb_load_list_file( if (p) { *p = '\0'; } else { - msg("xtrabackup: `%s...` name is too long", name_buf); + msg("mariabackup: `%s...` name is too long", name_buf); exit(EXIT_FAILURE); } @@ -3730,19 +3735,19 @@ xtrabackup_backup_func(void) data_thread_ctxt_t *data_threads; #ifdef USE_POSIX_FADVISE - msg("xtrabackup: uses posix_fadvise().\n"); + msg("mariabackup: uses posix_fadvise().\n"); #endif /* cd to datadir */ if (my_setwd(mysql_real_data_home,MYF(MY_WME))) { - msg("xtrabackup: cannot my_setwd %s\n", mysql_real_data_home); + msg("mariabackup: cannot my_setwd %s\n", mysql_real_data_home); exit(EXIT_FAILURE); } - msg("xtrabackup: cd to %s\n", mysql_real_data_home); + msg("mariabackup: cd to %s\n", mysql_real_data_home); - msg("xtrabackup: open files limit requested %u, set to %u\n", + msg("mariabackup: open files limit requested %u, set to %u\n", (uint) xb_open_files_limit, xb_set_max_open_files(xb_open_files_limit)); @@ -3757,7 +3762,7 @@ xtrabackup_backup_func(void) srv_close_files = (bool)xb_close_files; if (srv_close_files) - msg("xtrabackup: warning: close-files specified. Use it " + msg("mariabackup: warning: close-files specified. Use it " "at your own risk. If there are DDL operations like table DROP TABLE " "or RENAME TABLE during the backup, inconsistent backup will be " "produced.\n"); @@ -3779,7 +3784,7 @@ xtrabackup_backup_func(void) } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) { srv_unix_file_flush_method = SRV_UNIX_O_DIRECT; - msg("xtrabackup: using O_DIRECT\n"); + msg("mariabackup: using O_DIRECT\n"); } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) { srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC; @@ -3787,23 +3792,17 @@ xtrabackup_backup_func(void) srv_unix_file_flush_method = SRV_UNIX_NOSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "ALL_O_DIRECT")) { srv_unix_file_flush_method = SRV_UNIX_ALL_O_DIRECT; - msg("xtrabackup: using ALL_O_DIRECT\n"); + msg("mariabackup: using ALL_O_DIRECT\n"); } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) { srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC; - msg("xtrabackup: using O_DIRECT_NO_FSYNC\n"); + msg("mariabackup: using O_DIRECT_NO_FSYNC\n"); } else { - msg("xtrabackup: Unrecognized value %s for " + msg("mariabackup: Unrecognized value %s for " "innodb_flush_method\n", srv_file_flush_method_str); exit(EXIT_FAILURE); } - /* We can only use synchronous unbuffered IO on Windows for now */ - if (srv_file_flush_method_str != NULL) { - msg("xtrabackupp: Warning: " - "ignoring innodb_flush_method = %s on Windows.\n", srv_file_flush_method_str); - } - #ifdef _WIN32 srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; srv_use_native_aio = FALSE; @@ -3866,12 +3865,12 @@ xtrabackup_backup_func(void) } if ((log_opened && log_created)) { msg( - "xtrabackup: Error: all log files must be created at the same time.\n" - "xtrabackup: All log files must be created also in database creation.\n" - "xtrabackup: If you want bigger or smaller log files, shut down the\n" - "xtrabackup: database and make sure there were no errors in shutdown.\n" - "xtrabackup: Then delete the existing log files. Edit the .cnf file\n" - "xtrabackup: and start the database again.\n"); + "mariabackup: Error: all log files must be created at the same time.\n" + "mariabackup: All log files must be created also in database creation.\n" + "mariabackup: If you want bigger or smaller log files, shut down the\n" + "mariabackup: database and make sure there were no errors in shutdown.\n" + "mariabackup: Then delete the existing log files. Edit the .cnf file\n" + "mariabackup: and start the database again.\n"); //return(DB_ERROR); exit(EXIT_FAILURE); @@ -3880,7 +3879,7 @@ xtrabackup_backup_func(void) /* log_file_created must not be TRUE, if online */ if (log_file_created) { - msg("xtrabackup: Something wrong with source files...\n"); + msg("mariabackup: Something wrong with source files...\n"); exit(EXIT_FAILURE); } @@ -3890,7 +3889,7 @@ xtrabackup_backup_func(void) if (xtrabackup_extra_lsndir &&!my_stat(xtrabackup_extra_lsndir,&stat_info,MYF(0)) && (my_mkdir(xtrabackup_extra_lsndir,0777,MYF(0)) < 0)) { - msg("xtrabackup: Error: cannot mkdir %d: %s\n", + msg("mariabackup: Error: cannot mkdir %d: %s\n", my_errno, xtrabackup_extra_lsndir); exit(EXIT_FAILURE); } @@ -3898,7 +3897,7 @@ xtrabackup_backup_func(void) /* create target dir if not exist */ if (!xtrabackup_stream_str && !my_stat(xtrabackup_target_dir,&stat_info,MYF(0)) && (my_mkdir(xtrabackup_target_dir,0777,MYF(0)) < 0)){ - msg("xtrabackup: Error: cannot mkdir %d: %s\n", + msg("mariabackup: Error: cannot mkdir %d: %s\n", my_errno, xtrabackup_target_dir); exit(EXIT_FAILURE); } @@ -3984,7 +3983,7 @@ xtrabackup_backup_func(void) memset(&stat_info, 0, sizeof(MY_STAT)); dst_log_file = ds_open(ds_redo, XB_LOG_FILENAME, &stat_info); if (dst_log_file == NULL) { - msg("xtrabackup: error: failed to open the target stream for " + msg("mariabackup: error: failed to open the target stream for " "'%s'.\n", XB_LOG_FILENAME); ut_free(log_hdr_buf_); exit(EXIT_FAILURE); @@ -3998,7 +3997,7 @@ xtrabackup_backup_func(void) + (sizeof "xtrabkup ") - 1)); if (ds_write(dst_log_file, log_hdr_buf, LOG_FILE_HDR_SIZE)) { - msg("xtrabackup: error: write to logfile failed\n"); + msg("mariabackup: error: write to logfile failed\n"); ut_free(log_hdr_buf_); exit(EXIT_FAILURE); } @@ -4034,7 +4033,7 @@ xtrabackup_backup_func(void) /* Populate fil_system with tablespaces to copy */ err = xb_load_tablespaces(); if (err != DB_SUCCESS) { - msg("xtrabackup: error: xb_load_tablespaces() failed with" + msg("mariabackup: error: xb_load_tablespaces() failed with" "error code %lu\n", err); exit(EXIT_FAILURE); } @@ -4050,25 +4049,25 @@ xtrabackup_backup_func(void) changed_page_bitmap = xb_page_bitmap_init(); } if (!changed_page_bitmap) { - msg("xtrabackup: using the full scan for incremental " + msg("mariabackup: using the full scan for incremental " "backup\n"); } else if (incremental_lsn != checkpoint_lsn_start) { /* Do not print that bitmaps are used when dummy bitmap is build for an empty LSN range. */ - msg("xtrabackup: using the changed page bitmap\n"); + msg("mariabackup: using the changed page bitmap\n"); } } ut_a(xtrabackup_parallel > 0); if (xtrabackup_parallel > 1) { - msg("xtrabackup: Starting %u threads for parallel data " + msg("mariabackup: Starting %u threads for parallel data " "files transfer\n", xtrabackup_parallel); } it = datafiles_iter_new(f_system); if (it == NULL) { - msg("xtrabackup: Error: datafiles_iter_new() failed.\n"); + msg("mariabackup: Error: datafiles_iter_new() failed.\n"); exit(EXIT_FAILURE); } @@ -4123,7 +4122,7 @@ xtrabackup_backup_func(void) err = recv_find_max_checkpoint(&max_cp_group, &max_cp_field); if (err != DB_SUCCESS) { - msg("xtrabackup: Error: recv_find_max_checkpoint() failed.\n"); + msg("mariabackup: Error: recv_find_max_checkpoint() failed.\n"); mutex_exit(&log_sys->mutex); goto skip_last_cp; } @@ -4137,14 +4136,14 @@ xtrabackup_backup_func(void) mutex_exit(&log_sys->mutex); - msg("xtrabackup: The latest check point (for incremental): " + msg("mariabackup: The latest check point (for incremental): " "'" LSN_PF "'\n", latest_cp); } skip_last_cp: /* stop log_copying_thread */ log_copying = FALSE; os_event_set(log_copying_stop); - msg("xtrabackup: Stopping log copying thread.\n"); + msg("mariabackup: Stopping log copying thread.\n"); while (log_copying_running) { msg("."); os_thread_sleep(200000); /*0.2 sec*/ @@ -4167,7 +4166,7 @@ xtrabackup_backup_func(void) metadata_last_lsn = log_copy_scanned_lsn; if (!xtrabackup_stream_metadata(ds_meta)) { - msg("xtrabackup: Error: failed to stream metadata.\n"); + msg("mariabackup: Error: failed to stream metadata.\n"); exit(EXIT_FAILURE); } if (xtrabackup_extra_lsndir) { @@ -4176,7 +4175,7 @@ xtrabackup_backup_func(void) sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { - msg("xtrabackup: Error: failed to write metadata " + msg("mariabackup: Error: failed to write metadata " "to '%s'.\n", filename); exit(EXIT_FAILURE); } @@ -4198,7 +4197,7 @@ xtrabackup_backup_func(void) wait_throttle = NULL; } - msg("xtrabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF + msg("mariabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF ") was copied.\n", checkpoint_lsn_start, log_copy_scanned_lsn); xb_filters_free(); @@ -4206,7 +4205,7 @@ xtrabackup_backup_func(void) /* Make sure that the latest checkpoint made it to xtrabackup_logfile */ if (latest_cp > log_copy_scanned_lsn) { - msg("xtrabackup: error: last checkpoint LSN (" LSN_PF + msg("mariabackup: error: last checkpoint LSN (" LSN_PF ") is larger than last copied LSN (" LSN_PF ").\n", latest_cp, log_copy_scanned_lsn); exit(EXIT_FAILURE); @@ -4267,7 +4266,7 @@ xtrabackup_init_temp_log(void) /* The following call prints an error message */ os_file_get_last_error(TRUE); - msg("xtrabackup: Warning: cannot open %s. will try to find.\n", + msg("mariabackup: Warning: cannot open %s. will try to find.\n", src_path); /* check if ib_logfile0 may be xtrabackup_logfile */ @@ -4277,7 +4276,7 @@ xtrabackup_init_temp_log(void) &success,0); if (!success) { os_file_get_last_error(TRUE); - msg(" xtrabackup: Fatal error: cannot find %s.\n", + msg("mariabackup: Fatal error: cannot find %s.\n", src_path); goto error; @@ -4291,7 +4290,7 @@ xtrabackup_init_temp_log(void) if ( ut_memcmp(log_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, (byte*)"xtrabkup", (sizeof "xtrabkup") - 1) == 0) { - msg(" xtrabackup: 'ib_logfile0' seems to be " + msg("mariabackup: 'ib_logfile0' seems to be " "'xtrabackup_logfile'. will retry.\n"); os_file_close(src_file); @@ -4306,8 +4305,7 @@ xtrabackup_init_temp_log(void) goto retry; } - msg(" xtrabackup: Fatal error: cannot find %s.\n", - src_path); + msg("mariabackup: Fatal error: cannot find %s.\n", src_path); os_file_close(src_file); src_file = XB_FILE_UNDEFINED; @@ -4328,7 +4326,7 @@ xtrabackup_init_temp_log(void) if ( ut_memcmp(log_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, (byte*)"xtrabkup", (sizeof "xtrabkup") - 1) != 0 ) { - msg("xtrabackup: notice: xtrabackup_logfile was already used " + msg("mariabackup: notice: xtrabackup_logfile was already used " "to '--prepare'.\n"); goto skip_modify; } else { @@ -4361,7 +4359,7 @@ xtrabackup_init_temp_log(void) } if (!checkpoint_found) { - msg("xtrabackup: No valid checkpoint found.\n"); + msg("mariabackup: No valid checkpoint found.\n"); goto error; } @@ -4467,7 +4465,7 @@ xtrabackup_init_temp_log(void) file_size = os_file_get_size(src_file); } - msg("xtrabackup: xtrabackup_logfile detected: size=" INT64PF ", " + msg("mariabackup: xtrabackup_logfile detected: size=" INT64PF ", " "start_lsn=(" LSN_PF ")\n", file_size, max_lsn); os_file_close(src_file); @@ -4503,7 +4501,7 @@ xtrabackup_init_temp_log(void) free(log_buf); if (src_file != XB_FILE_UNDEFINED) os_file_close(src_file); - msg("xtrabackup: Error: xtrabackup_init_temp_log() failed.\n"); + msg("mariabackup: Error: xtrabackup_init_temp_log() failed.\n"); return(TRUE); /*ERROR*/ } @@ -4555,14 +4553,14 @@ xb_space_create_file( OS_FILE_READ_WRITE, &ret,0); if (!ret) { - msg("xtrabackup: cannot create file %s\n", path); + msg("mariabackup: cannot create file %s\n", path); return ret; } ret = os_file_set_size(path, *file, FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE); if (!ret) { - msg("xtrabackup: cannot set size for file %s\n", path); + msg("mariabackup: cannot set size for file %s\n", path); os_file_close(*file); os_file_delete(0, path); return ret; @@ -4606,7 +4604,7 @@ xb_space_create_file( ut_free(buf); if (!ret) { - msg("xtrabackup: could not write the first page to %s\n", + msg("mariabackup: could not write the first page to %s\n", path); os_file_close(*file); os_file_delete(0, path); @@ -4670,7 +4668,7 @@ xb_delta_open_matching_space( /* Create the database directory if it doesn't exist yet */ if (!os_file_create_directory(dest_dir, FALSE)) { - msg("xtrabackup: error: cannot create dir %s\n", dest_dir); + msg("mariabackup: error: cannot create dir %s\n", dest_dir); return file; } @@ -4703,13 +4701,13 @@ xb_delta_open_matching_space( snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%lu", dbname, fil_space->id); - msg("xtrabackup: Renaming %s to %s.ibd\n", + msg("mariabackup: Renaming %s to %s.ibd\n", fil_space->name, tmpname); if (!fil_rename_tablespace(NULL, fil_space->id, tmpname, NULL)) { - msg("xtrabackup: Cannot rename %s to %s\n", + msg("mariabackup: Cannot rename %s to %s\n", fil_space->name, tmpname); goto exit; } @@ -4718,7 +4716,7 @@ xb_delta_open_matching_space( if (space_id == ULINT_UNDEFINED) { - msg("xtrabackup: Error: Cannot handle DDL operation on tablespace " + msg("mariabackup: Error: Cannot handle DDL operation on tablespace " "%s\n", dest_space_name); exit(EXIT_FAILURE); } @@ -4730,13 +4728,13 @@ xb_delta_open_matching_space( strncpy(tmpname, dest_space_name, FN_REFLEN); - msg("xtrabackup: Renaming %s to %s\n", + msg("mariabackup: Renaming %s to %s\n", fil_space->name, dest_space_name); if (!fil_rename_tablespace(NULL, fil_space->id, tmpname, NULL)) { - msg("xtrabackup: Cannot rename %s to %s\n", + msg("mariabackup: Cannot rename %s to %s\n", fil_space->name, dest_space_name); goto exit; } @@ -4748,7 +4746,7 @@ xb_delta_open_matching_space( if (!fil_space_create(dest_space_name, space_id, 0, FIL_TABLESPACE, 0, false)) { - msg("xtrabackup: Cannot create tablespace %s\n", + msg("mariabackup: Cannot create tablespace %s\n", dest_space_name); goto exit; } @@ -4782,7 +4780,7 @@ xb_delta_open_matching_space( if (ok) { *success = TRUE; } else { - msg("xtrabackup: Cannot open file %s\n", real_name); + msg("mariabackup: Cannot open file %s\n", real_name); } exit: @@ -4854,11 +4852,11 @@ xtrabackup_apply_delta( page_size = info.page_size; page_size_shift = get_bit_shift(page_size); - msg("xtrabackup: page size for %s is %lu bytes\n", + msg("mariabackup: page size for %s is %lu bytes\n", src_path, page_size); if (page_size_shift < 10 || page_size_shift > UNIV_PAGE_SIZE_SHIFT_MAX) { - msg("xtrabackup: error: invalid value of page_size " + msg("mariabackup: error: invalid value of page_size " "(%lu bytes) read from %s\n", page_size, meta_path); goto error; } @@ -4869,7 +4867,7 @@ xtrabackup_apply_delta( &success,0); if (!success) { os_file_get_last_error(TRUE); - msg("xtrabackup: error: cannot open %s\n", src_path); + msg("mariabackup: error: cannot open %s\n", src_path); goto error; } @@ -4881,7 +4879,7 @@ xtrabackup_apply_delta( dbname, space_name, info.space_id, info.zip_size, dst_path, sizeof(dst_path), &success); if (!success) { - msg("xtrabackup: error: cannot open %s\n", dst_path); + msg("mariabackup: error: cannot open %s\n", dst_path); goto error; } @@ -4920,7 +4918,7 @@ xtrabackup_apply_delta( last_buffer = TRUE; break; default: - msg("xtrabackup: error: %s seems not " + msg("mariabackup: error: %s seems not " ".delta file.\n", src_path); goto error; } @@ -4953,12 +4951,17 @@ xtrabackup_apply_delta( if (offset_on_page == 0xFFFFFFFFUL) break; - success = os_file_write(dst_path, dst_file, - incremental_buffer + - page_in_buffer * page_size, - (offset_on_page << - page_size_shift), - page_size); + uchar *buf = incremental_buffer + page_in_buffer * page_size; + const os_offset_t off = os_offset_t(offset_on_page)*page_size; + + if (off == 0) { + /* Fix tablespace size. */ + os_offset_t n_pages = fsp_get_size_low(static_cast(buf)); + if (!os_file_set_size(dst_path, dst_file, n_pages*page_size)) + goto error; + } + + success = os_file_write(dst_path, dst_file, buf, off, page_size); if (!success) { goto error; } @@ -4969,8 +4972,11 @@ xtrabackup_apply_delta( if (incremental_buffer_base) ut_free(incremental_buffer_base); - if (src_file != XB_FILE_UNDEFINED) + if (src_file != XB_FILE_UNDEFINED) { os_file_close(src_file); + /* Remove .delta file after it was successfully applied.*/ + os_file_delete(0,src_path); + } if (dst_file != XB_FILE_UNDEFINED) os_file_close(dst_file); return TRUE; @@ -4982,7 +4988,7 @@ xtrabackup_apply_delta( os_file_close(src_file); if (dst_file != XB_FILE_UNDEFINED) os_file_close(dst_file); - msg("xtrabackup: Error: xtrabackup_apply_delta(): " + msg("mariabackup: Error: xtrabackup_apply_delta(): " "failed to apply %s to %s.\n", src_path, dst_path); return FALSE; } @@ -5046,7 +5052,7 @@ xb_process_datadir( callback */ { ulint ret; - char dbpath[FN_REFLEN]; + char dbpath[OS_FILE_MAX_PATH]; os_file_dir_t dir; os_file_dir_t dbdir; os_file_stat_t dbinfo; @@ -5091,7 +5097,7 @@ xb_process_datadir( os_file_closedir(dbdir); } else { - msg("xtrabackup: Cannot open dir %s\n", + msg("mariabackup: Cannot open dir %s\n", path); } @@ -5099,7 +5105,7 @@ xb_process_datadir( dir = os_file_opendir(path, FALSE); if (dir == NULL) { - msg("xtrabackup: Cannot open dir %s\n", + msg("mariabackup: Cannot open dir %s\n", path); } @@ -5112,8 +5118,7 @@ xb_process_datadir( goto next_datadir_item; } - sprintf(dbpath, "%s/%s", path, - dbinfo.name); + snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name); srv_normalize_path_for_win(dbpath); dbdir = os_file_opendir(dbpath, FALSE); @@ -5242,7 +5247,7 @@ xtrabackup_close_temp_log(my_bool clear_flag) error: if (src_file != XB_FILE_UNDEFINED) os_file_close(src_file); - msg("xtrabackup: Error: xtrabackup_close_temp_log() failed.\n"); + msg("mariabackup: Error: xtrabackup_close_temp_log() failed.\n"); return(TRUE); /*ERROR*/ } @@ -5271,7 +5276,7 @@ xb_export_cfg_write_index_fields( if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing index fields."); + msg("mariabackup: Error: writing index fields."); return(false); } @@ -5285,7 +5290,7 @@ xb_export_cfg_write_index_fields( if (fwrite(row, 1, sizeof(len), file) != sizeof(len) || fwrite(field->name, 1, len, file) != len) { - msg("xtrabackup: Error: writing index column."); + msg("mariabackup: Error: writing index column."); return(false); } @@ -5312,7 +5317,7 @@ xb_export_cfg_write_indexes( mach_write_to_4(row, UT_LIST_GET_LEN(table->indexes)); if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing index count."); + msg("mariabackup: Error: writing index count."); return(false); } @@ -5360,7 +5365,7 @@ xb_export_cfg_write_indexes( if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing index meta-data."); + msg("mariabackup: Error: writing index meta-data."); return(false); } @@ -5375,7 +5380,7 @@ xb_export_cfg_write_indexes( if (fwrite(row, 1, sizeof(len), file) != sizeof(len) || fwrite(index->name, 1, len, file) != len) { - msg("xtrabackup: Error: writing index name."); + msg("mariabackup: Error: writing index name."); return(false); } @@ -5428,7 +5433,7 @@ xb_export_cfg_write_table( mach_write_to_4(ptr, col->max_prefix); if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing table column data."); + msg("mariabackup: Error: writing table column data."); return(false); } @@ -5449,7 +5454,7 @@ xb_export_cfg_write_table( if (fwrite(row, 1, sizeof(len), file) != sizeof(len) || fwrite(col_name, 1, len, file) != len) { - msg("xtrabackup: Error: writing column name."); + msg("mariabackup: Error: writing column name."); return(false); } @@ -5475,7 +5480,7 @@ xb_export_cfg_write_header( mach_write_to_4(value, IB_EXPORT_CFG_VERSION_V1); if (fwrite(&value, 1, sizeof(value), file) != sizeof(value)) { - msg("xtrabackup: Error: writing meta-data version number."); + msg("mariabackup: Error: writing meta-data version number."); return(false); } @@ -5491,7 +5496,7 @@ xb_export_cfg_write_header( if (fwrite(&value, 1, sizeof(value), file) != sizeof(value) || fwrite(hostname, 1, len, file) != len) { - msg("xtrabackup: Error: writing hostname."); + msg("mariabackup: Error: writing hostname."); return(false); } @@ -5506,7 +5511,7 @@ xb_export_cfg_write_header( if (fwrite(&value, 1, sizeof(value), file) != sizeof(value) || fwrite(table->name, 1, len, file) != len) { - msg("xtrabackup: Error: writing table name."); + msg("mariabackup: Error: writing table name."); return(false); } @@ -5517,7 +5522,7 @@ xb_export_cfg_write_header( mach_write_to_8(row, table->autoinc); if (fwrite(row, 1, sizeof(ib_uint64_t), file) != sizeof(ib_uint64_t)) { - msg("xtrabackup: Error: writing table autoinc value."); + msg("mariabackup: Error: writing table autoinc value."); return(false); } @@ -5536,7 +5541,7 @@ xb_export_cfg_write_header( mach_write_to_4(ptr, table->n_cols); if (fwrite(row, 1, sizeof(row), file) != sizeof(row)) { - msg("xtrabackup: Error: writing table meta-data."); + msg("mariabackup: Error: writing table meta-data."); return(false); } @@ -5564,7 +5569,7 @@ xb_export_cfg_write( file = fopen(file_path, "w+b"); if (file == NULL) { - msg("xtrabackup: Error: cannot open %s\n", node->name); + msg("mariabackup: Error: cannot open %s\n", node->name); success = false; } else { @@ -5580,7 +5585,7 @@ xb_export_cfg_write( } if (fclose(file) != 0) { - msg("xtrabackup: Error: cannot close %s\n", node->name); + msg("mariabackup: Error: cannot close %s\n", node->name); success = false; } @@ -5618,7 +5623,7 @@ store_binlog_info( fp = fopen(filename, "w"); if (!fp) { - msg("xtrabackup: failed to open '%s'\n", filename); + msg("mariabackup: failed to open '%s'\n", filename); return(false); } @@ -5642,11 +5647,11 @@ xtrabackup_prepare_func(int argc, char ** argv) if (my_setwd(xtrabackup_real_target_dir,MYF(MY_WME))) { - msg("xtrabackup: cannot my_setwd %s\n", + msg("mariabackup: cannot my_setwd %s\n", xtrabackup_real_target_dir); exit(EXIT_FAILURE); } - msg("xtrabackup: cd to %s\n", xtrabackup_real_target_dir); + msg("mariabackup: cd to %s\n", xtrabackup_real_target_dir); encryption_plugin_prepare_init(argc, argv); @@ -5661,36 +5666,36 @@ xtrabackup_prepare_func(int argc, char ** argv) XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_read_metadata(metadata_path)) { - msg("xtrabackup: Error: failed to read metadata from '%s'\n", + msg("mariabackup: Error: failed to read metadata from '%s'\n", metadata_path); exit(EXIT_FAILURE); } if (!strcmp(metadata_type, "full-backuped")) { - msg("xtrabackup: This target seems to be not prepared yet.\n"); + msg("mariabackup: This target seems to be not prepared yet.\n"); } else if (!strcmp(metadata_type, "log-applied")) { - msg("xtrabackup: This target seems to be already " + msg("mariabackup: This target seems to be already " "prepared with --apply-log-only.\n"); goto skip_check; } else if (!strcmp(metadata_type, "full-prepared")) { - msg("xtrabackup: This target seems to be already prepared.\n"); + msg("mariabackup: This target seems to be already prepared.\n"); } else { - msg("xtrabackup: This target seems not to have correct " + msg("mariabackup: This target seems not to have correct " "metadata...\n"); exit(EXIT_FAILURE); } if (xtrabackup_incremental) { - msg("xtrabackup: error: applying incremental backup " + msg("mariabackup: error: applying incremental backup " "needs target prepared with --apply-log-only.\n"); exit(EXIT_FAILURE); } skip_check: if (xtrabackup_incremental && metadata_to_lsn != incremental_lsn) { - msg("xtrabackup: error: This incremental backup seems " + msg("mariabackup: error: This incremental backup seems " "not to be proper for the target.\n" - "xtrabackup: Check 'to_lsn' of the target and " + "mariabackup: Check 'to_lsn' of the target and " "'from_lsn' of the incremental.\n"); exit(EXIT_FAILURE); } @@ -5727,7 +5732,7 @@ xtrabackup_prepare_func(int argc, char ** argv) if (xtrabackup_incremental) { err = xb_data_files_init(); if (err != DB_SUCCESS) { - msg("xtrabackup: error: xb_data_files_init() failed " + msg("mariabackup: error: xb_data_files_init() failed " "with error code %lu\n", err); goto error_cleanup; } @@ -5777,8 +5782,8 @@ xtrabackup_prepare_func(int argc, char ** argv) srv_n_write_io_threads = 4; } - msg("xtrabackup: Starting InnoDB instance for recovery.\n" - "xtrabackup: Using %lld bytes for buffer pool " + msg("mariabackup: Starting InnoDB instance for recovery.\n" + "mariabackup: Using %lld bytes for buffer pool " "(set by --use-memory parameter)\n", xtrabackup_use_memory); srv_max_buf_pool_modified_pct = (double)max_buf_pool_modified_pct; @@ -5790,54 +5795,8 @@ xtrabackup_prepare_func(int argc, char ** argv) if(innodb_init()) goto error_cleanup; - if (xtrabackup_incremental) { - - it = datafiles_iter_new(fil_system); - if (it == NULL) { - msg("xtrabackup: Error: datafiles_iter_new() failed.\n"); - exit(EXIT_FAILURE); - } - - while ((node = datafiles_iter_next(it)) != NULL) { - byte *header; - ulint size; - ulint actual_size; - mtr_t mtr; - buf_block_t *block; - ulint flags; - - space = node->space; - - /* Align space sizes along with fsp header. We want to process - each space once, so skip all nodes except the first one in a - multi-node space. */ - if (UT_LIST_GET_PREV(chain, node) != NULL) { - continue; - } - - mtr_start(&mtr); - - mtr_s_lock(fil_space_get_latch(space->id, &flags), &mtr); - - block = buf_page_get(space->id, - dict_tf_get_zip_size(flags), - 0, RW_S_LATCH, &mtr); - header = FSP_HEADER_OFFSET + buf_block_get_frame(block); - - size = mtr_read_ulint(header + FSP_SIZE, MLOG_4BYTES, - &mtr); - - mtr_commit(&mtr); - - fil_extend_space_to_desired_size(&actual_size, space->id, size); - } - - datafiles_iter_free(it); - - } /* if (xtrabackup_incremental) */ - if (xtrabackup_export) { - msg("xtrabackup: export option is specified.\n"); + msg("mariabackup: export option is specified.\n"); pfs_os_file_t info_file; char info_file_path[FN_REFLEN]; ibool success; @@ -5854,7 +5813,7 @@ xtrabackup_prepare_func(int argc, char ** argv) it = datafiles_iter_new(fil_system); if (it == NULL) { - msg("xtrabackup: Error: datafiles_iter_new() " + msg("mariabackup: Error: datafiles_iter_new() " "failed.\n"); exit(EXIT_FAILURE); } @@ -5901,7 +5860,7 @@ xtrabackup_prepare_func(int argc, char ** argv) table = dict_table_get_low(table_name); if (!table) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "cannot find dictionary " "record of table %s\n", table_name); @@ -5916,7 +5875,7 @@ xtrabackup_prepare_func(int argc, char ** argv) index = dict_table_get_first_index(table); n_index = UT_LIST_GET_LEN(table->indexes); if (n_index > 31) { - msg("xtrabackup: warning: table '%s' has more " + msg("mariabackup: warning: table '%s' has more " "than 31 indexes, .exp file was not " "generated. Table will fail to import " "on server version prior to 5.6.\n", @@ -5932,7 +5891,7 @@ xtrabackup_prepare_func(int argc, char ** argv) strncpy((char *) page + 12, table_name, 500); - msg("xtrabackup: export metadata of " + msg("mariabackup: export metadata of " "table '%s' to file `%s` " "(%lu indexes)\n", table_name, info_file_path, @@ -5946,7 +5905,7 @@ xtrabackup_prepare_func(int argc, char ** argv) strncpy((char *) page + n_index * 512 + 12, index->name, 500); - msg("xtrabackup: name=%s, " + msg("mariabackup: name=%s, " "id.low=%lu, page=%lu\n", index->name, (ulint)(index->id & @@ -6010,17 +5969,17 @@ xtrabackup_prepare_func(int argc, char ** argv) && srv_start_lsn < incremental_to_lsn) ||(!xtrabackup_incremental && srv_start_lsn < metadata_to_lsn)) { - msg("xtrabackup: error: " + msg("mariabackup: error: " "The transaction log file is corrupted.\n" - "xtrabackup: error: " + "mariabackup: error: " "The log was not applied to the intended LSN!\n"); - msg("xtrabackup: Log applied to lsn " LSN_PF "\n", + msg("mariabackup: Log applied to lsn " LSN_PF "\n", srv_start_lsn); if (xtrabackup_incremental) { - msg("xtrabackup: The intended lsn is " LSN_PF "\n", + msg("mariabackup: The intended lsn is " LSN_PF "\n", incremental_to_lsn); } else { - msg("xtrabackup: The intended lsn is " LSN_PF "\n", + msg("mariabackup: The intended lsn is " LSN_PF "\n", metadata_to_lsn); } exit(EXIT_FAILURE); @@ -6061,7 +6020,7 @@ xtrabackup_prepare_func(int argc, char ** argv) sprintf(filename, "%s/%s", xtrabackup_target_dir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { - msg("xtrabackup: Error: failed to write metadata " + msg("mariabackup: Error: failed to write metadata " "to '%s'\n", filename); exit(EXIT_FAILURE); } @@ -6069,7 +6028,7 @@ xtrabackup_prepare_func(int argc, char ** argv) if(xtrabackup_extra_lsndir) { sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_write_metadata(filename)) { - msg("xtrabackup: Error: failed to write " + msg("mariabackup: Error: failed to write " "metadata to '%s'\n", filename); exit(EXIT_FAILURE); } @@ -6381,7 +6340,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) if (optend - argv[i] == 15 && !strncmp(argv[i], "--defaults-file", optend - argv[i])) { - msg("xtrabackup: Error: --defaults-file " + msg("mariabackup: Error: --defaults-file " "must be specified first on the command " "line\n"); exit(EXIT_FAILURE); @@ -6390,7 +6349,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) !strncmp(argv[i], "--defaults-extra-file", optend - argv[i])) { - msg("xtrabackup: Error: --defaults-extra-file " + msg("mariabackup: Error: --defaults-extra-file " "must be specified first on the command " "line\n"); exit(EXIT_FAILURE); @@ -6441,7 +6400,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) } if (!server_option) { - msg("xtrabackup: Error:" + msg("mariabackup: Error:" " unknown argument: '%s'\n", opt); exit(EXIT_FAILURE); } @@ -6507,7 +6466,7 @@ int main(int argc, char **argv) if ((!xtrabackup_print_param) && (!xtrabackup_prepare) && (strcmp(mysql_data_home, "./") == 0)) { if (!xtrabackup_print_param) usage(); - msg("\nxtrabackup: Error: Please set parameter 'datadir'\n"); + msg("\nmariabackup: Error: Please set parameter 'datadir'\n"); exit(EXIT_FAILURE); } @@ -6576,7 +6535,7 @@ int main(int argc, char **argv) error = 1; if (error) { - msg("xtrabackup: value '%s' may be wrong format for " + msg("mariabackup: value '%s' may be wrong format for " "incremental option.\n", xtrabackup_incremental); exit(EXIT_FAILURE); } @@ -6586,7 +6545,7 @@ int main(int argc, char **argv) sprintf(filename, "%s/%s", xtrabackup_incremental_basedir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_read_metadata(filename)) { - msg("xtrabackup: error: failed to read metadata from " + msg("mariabackup: error: failed to read metadata from " "%s\n", filename); exit(EXIT_FAILURE); } @@ -6599,7 +6558,7 @@ int main(int argc, char **argv) sprintf(filename, "%s/%s", xtrabackup_incremental_dir, XTRABACKUP_METADATA_FILENAME); if (!xtrabackup_read_metadata(filename)) { - msg("xtrabackup: error: failed to read metadata from " + msg("mariabackup: error: failed to read metadata from " "%s\n", filename); exit(EXIT_FAILURE); } @@ -6636,7 +6595,7 @@ int main(int argc, char **argv) } if (xtrabackup_export && innobase_file_per_table == FALSE) { - msg("xtrabackup: auto-enabling --innodb-file-per-table due to " + msg("mariabackup: auto-enabling --innodb-file-per-table due to " "the --export option\n"); innobase_file_per_table = TRUE; } diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index bfd0c3c635ad621445328ed75228bac87c1d6a76..78940e02ca43f998a039a1bc38efce945eba8be7 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -98,18 +98,23 @@ static struct my_option my_long_options[] = {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; -void cleanup_and_exit(int exit_code) +static void cleanup_and_exit(int exit_code) __attribute__ ((noreturn)); +static void cleanup_and_exit(int exit_code) { my_end(0); exit(exit_code); } -static void usage(my_bool version) +static void version() { - printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, - MACHINE_TYPE); - if (version) - return; + printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); +} + + +static void usage() __attribute__ ((noreturn)); +static void usage() +{ + version(); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("Prints all arguments that is give to some program using the default files"); printf("Usage: %s [OPTIONS] [groups]\n", my_progname); @@ -133,12 +138,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), cleanup_and_exit(0); case 'I': case '?': - usage(0); + usage(); case 'v': verbose++; break; case 'V': - usage(1); + version(); + /* fall through */ case '#': DBUG_PUSH(argument ? argument : default_dbug_option); break; @@ -186,7 +192,7 @@ int main(int argc, char **argv) nargs+= array_elements(mysqld_groups); if (nargs < 2) - usage(0); + usage(); load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME)); if (!load_default_groups) diff --git a/extra/replace.c b/extra/replace.c index b8c328f2902d74af0a70348d3bff52e81ccd1fdd..eabf953837b80e061b62a264ee9edd09e78e9a21 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -174,7 +174,7 @@ register char **argv[]; break; case 'V': version=1; - /* fall through */ + /* fall through */ case 'I': case '?': help=1; /* Help text written */ diff --git a/extra/yassl/README b/extra/yassl/README index a3d4f60f56128c055e64f6cda5a23214cada55ae..de1bf5132aa2c881b44a0a5918ddf88d77efa669 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -12,6 +12,14 @@ before calling SSL_new(); *** end Note *** +yaSSL Release notes, version 2.4.4 (8/8/2017) + This release of yaSSL fixes an interop issue. A fix for detecting cipher + suites with non leading zeros is included as yaSSL only supports cipher + suites with leading zeros. Thanks for the report from Security Innovation + and Oracle. + + Users interoping with other SSL stacks should update. + yaSSL Release notes, version 2.4.2 (9/22/2016) This release of yaSSL fixes a medium security vulnerability. A fix for potential AES side channel leaks is included that a local user monitoring diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 9ec99b46c1f00848cc5f80fb610088ddca25dc3b..a5ccef102b9b0a46f9e0eb676fdda1c7d067c89d 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -1,5 +1,6 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates. + Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + Use is subject to license terms. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,7 +35,7 @@ #include "rsa.h" -#define YASSL_VERSION "2.4.2" +#define YASSL_VERSION "2.4.4" #if defined(__cplusplus) diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index a481812b3e0886b0af273538aa7dd4b8b7821592..971a5b6654ee8d0c7a0aa418c527d548ce722366 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates + Copyright (c) 2005, 2017, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1578,6 +1578,10 @@ void ServerHello::Process(input_buffer& input, SSL& ssl) ssl.SetError(badVersion_error); return; } + if (cipher_suite_[0] != 0x00) { + ssl.SetError(unknown_cipher); + return; + } ssl.set_pending(cipher_suite_[1]); ssl.set_random(random_, server_end); if (id_len_) diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index ff9c8155d0ced8462d440341d7fd82b457b0a116..884e8b5fa9ddfe2d2e11e045e80b7531c1b12631 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2014, Oracle and/or its affiliates + Copyright (c) 2005, 2017, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1399,12 +1399,17 @@ void SSL::matchSuite(const opaque* peer, uint length) // start with best, if a match we are good, Ciphers are at odd index // since all SSL and TLS ciphers have 0x00 first byte for (uint i = 1; i < secure_.get_parms().suites_size_; i += 2) - for (uint j = 1; j < length; j+= 2) - if (secure_.use_parms().suites_[i] == peer[j]) { + for (uint j = 0; (j + 1) < length; j+= 2) { + if (peer[j] != 0x00) { + continue; // only 0x00 first byte supported + } + + if (secure_.use_parms().suites_[i] == peer[j + 1]) { secure_.use_parms().suite_[0] = 0x00; - secure_.use_parms().suite_[1] = peer[j]; + secure_.use_parms().suite_[1] = peer[j + 1]; return; } + } SetError(match_error); } @@ -2697,4 +2702,3 @@ extern "C" void yaSSL_CleanUp() yaSSL::sessionsInstance = 0; yaSSL::errorsInstance = 0; } - diff --git a/mysql-test/README b/mysql-test/README index 0fba1cc07e3962c513bf589b0685d8ab29b72df7..c4ded4e8e796c85e5b5abf18c57cd0f024760dd4 100644 --- a/mysql-test/README +++ b/mysql-test/README @@ -1,74 +1,93 @@ -This directory contains a test suite for the MySQL daemon. To run -the currently existing test cases, simply execute ./mysql-test-run in -this directory. It will fire up the newly built mysqld and test it. +This directory contains test suites for the MariaDB server. To run +currently existing test cases, execute ./mysql-test-run in this directory. -Note that you do not have to have to do "make install", and you could -actually have a co-existing MySQL installation. The tests will not -conflict with it. To run the test suite in a source directory, you -must do make first. +Some tests are known to fail on some platforms or be otherwise unreliable. +The file "unstable-tests" contains the list of such tests along with +a comment for every test. +To exclude them from the test run, execute + # ./mysql-test-run --skip-test-list=unstable-tests -All tests must pass. If one or more of them fail on your system, please -read the following manual section for instructions on how to report the -problem: +In general you do not have to have to do "make install", and you can have +a co-existing MariaDB installation, the tests will not conflict with it. +To run the tests in a source directory, you must do "make" first. + +In Red Hat distributions, you should run the script as user "mysql". +The user is created with nologin shell, so the best bet is something like + # su - + # cd /usr/share/mysql-test + # su -s /bin/bash mysql -c "./mysql-test-run --skip-test-list=unstable-tests" + +This will use the installed MariaDB executables, but will run a private +copy of the server process (using data files within /usr/share/mysql-test), +so you need not start the mysqld service beforehand. + +You can omit --skip-test-list option if you want to check whether +the listed failures occur for you. + +To clean up afterwards, remove the created "var" subdirectory, e.g. + # su -s /bin/bash - mysql -c "rm -rf /usr/share/mysql-test/var" + +If one or more tests fail on your system on reasons other than listed +in lists of unstable tests, please read the following manual section +for instructions on how to report the problem: https://mariadb.com/kb/en/reporting-bugs If you want to use an already running MySQL server for specific tests, use the --extern option to mysql-test-run. Please note that in this mode, -the test suite expects you to provide the names of the tests to run. +you are expected to provide names of the tests to run. + For example, here is the command to run the "alias" and "analyze" tests with an external server: -mysql-test-run --extern socket=/tmp/mysql.sock alias analyze + # mysql-test-run --extern socket=/tmp/mysql.sock alias analyze -To match your setup, you might also need to provide --socket, --user, and -other relevant options. +To match your setup, you might need to provide other relevant options. -With no test cases named on the command line, mysql-test-run falls back -to the normal "non-extern" behavior. The reason for this is that some -tests cannot run with an external server. +With no test names on the command line, mysql-test-run will attempt +to execute the default set of tests, which will certainly fail, because +many tests cannot run with an external server (they need to control the +options with which the server is started, restart the server during +execution, etc.) You can create your own test cases. To create a test case, create a new file in the t subdirectory using a text editor. The file should have a .test extension. For example: - xemacs t/test_case_name.test + # xemacs t/test_case_name.test - In the file, put a set of SQL statements that create some tables, - load test data, and run some queries to manipulate it. +In the file, put a set of SQL statements that create some tables, +load test data, and run some queries to manipulate it. - We would appreciate it if you name your test tables t1, t2, t3 ... (to not - conflict too much with existing tables). +Your test should begin by dropping the tables you are going to create and +end by dropping them again. This ensures that you can run the test over +and over again. - Your test should begin by dropping the tables you are going to create and - end by dropping them again. This ensures that you can run the test over - and over again. - - If you are using mysqltest commands (like result file names) in your - test case, you should create the result file as follows: +If you are using mysqltest commands in your test case, you should create +the result file as follows: - mysql-test-run --record test_case_name + # mysql-test-run --record test_case_name - or + or - mysqltest --record < t/test_case_name.test + # mysqltest --record < t/test_case_name.test - If you only have a simple test cases consisting of SQL statements and - comments, you can create the test case in one of the following ways: +If you only have a simple test case consisting of SQL statements and +comments, you can create the result file in one of the following ways: - mysql-test-run --record test_case_name + # mysql-test-run --record test_case_name - mysql test < t/test_case_name.test > r/test_case_name.result + # mysql test < t/test_case_name.test > r/test_case_name.result - mysqltest --record --database test --result-file=r/test_case_name.result < t/test_case_name.test + # mysqltest --record --database test --result-file=r/test_case_name.result < t/test_case_name.test - When this is done, take a look at r/test_case_name.result - - If the result is incorrect, you have found a bug. In this case, you should - edit the test result to the correct results so that we can verify - that the bug is corrected in future releases. +When this is done, take a look at r/test_case_name.result . +If the result is incorrect, you have found a bug. In this case, you should +edit the test result to the correct results so that we can verify that +the bug is corrected in future releases. If you want to submit your test case you can send it -to maria-developers@lists.launchpad.com or attach it to a bug report on +to maria-developers@lists.launchpad.net or attach it to a bug report on http://mariadb.org/jira/. If the test case is really big or if it contains 'not public' data, diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 20b5ded6e821deb9ccd145cf70c686074cdbbfb6..435de640c9ddc4c104fbd1bc1e3e5df1d1b3e3f6 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -79,6 +79,8 @@ call mtr.check_testcase(); let $datadir=`select @@datadir`; list_files $datadir mysql_upgrade_info; +list_files $datadir/test #sql*; +list_files $datadir/mysql #sql*; --enable_query_log diff --git a/mysql-test/include/have_debug.inc b/mysql-test/include/have_debug.inc index 5df3080a6ed59935262f517ac9a60786514e844c..a035031e49a5e065a516dd124bea789938e21200 100644 --- a/mysql-test/include/have_debug.inc +++ b/mysql-test/include/have_debug.inc @@ -2,8 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless this is a debug build. # -# The test below is redundant - -if (`select version() not like '%debug%'`) { - --skip Needs a debug build -} diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc index 5571c345850bfc5a42cb7c1e245f15514f436e21..c0da490dde002e1f64ff07d8648ee493651deff1 100644 --- a/mysql-test/include/have_example_plugin.inc +++ b/mysql-test/include/have_example_plugin.inc @@ -1,14 +1,4 @@ # -# Check if server has support for loading plugins +# suite.pm will make sure that all tests including this file +# will be skipped unless dynamic ha_example plugin is available # -if (`SELECT @@have_dynamic_loading != 'YES'`) { - --skip Example plugin requires dynamic loading -} - -# -# Check if the variable EXAMPLE_PLUGIN is set -# -if (!$HA_EXAMPLE_SO) { - --skip Need example plugin -} - diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc index 021970423cd4a2640dbfbf7df9a98e59dc246964..b89797d5828a94de05090d915a8c0c915d2f8c1f 100644 --- a/mysql-test/include/have_innodb.inc +++ b/mysql-test/include/have_innodb.inc @@ -2,9 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless innodb or xtradb is enabled # -# The test below is redundant - -if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`) -{ - --skip Test requires InnoDB. -} diff --git a/mysql-test/include/have_xtradb.inc b/mysql-test/include/have_xtradb.inc index 478b9926e211a5f19ab6be2a9ca21d6047a98ed0..d12802e057d4c491f052c5bddb1e8a0cee07eea8 100644 --- a/mysql-test/include/have_xtradb.inc +++ b/mysql-test/include/have_xtradb.inc @@ -2,10 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless xtradb is enabled # -# The test below is redundant - -if (!`SELECT count(*) FROM information_schema.plugins WHERE - plugin_name = 'innodb' AND plugin_status = 'active' AND - plugin_description LIKE '%xtradb%'`){ - skip Needs XtraDB engine; -} diff --git a/mysql-test/include/not_embedded.inc b/mysql-test/include/not_embedded.inc index 88185af3b15a2f9fbef0ca188f5d097b6e5fbbf6..4c168f71979fab095447beff026c05879d1dc43a 100644 --- a/mysql-test/include/not_embedded.inc +++ b/mysql-test/include/not_embedded.inc @@ -2,9 +2,3 @@ # suite.pm will make sure that all tests including this file # will be skipped unless this is an embedded test run # -# The test below is redundant - -if (`select version() like '%embedded%'`) { - This should never happen; -} - diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc index 9240271077a5352fee1f227dea10dacd4a3a8aac..08373095438c9068f1da29b4ef13faca84432110 100644 --- a/mysql-test/include/not_windows.inc +++ b/mysql-test/include/not_windows.inc @@ -1,4 +1,4 @@ ---require r/not_windows.require -disable_query_log; -select convert(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows") as "TRUE"; -enable_query_log; +# +# suite.pm will make sure that all tests including this file +# will be skipped unless this is on Windows +# diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index d7e902259df6f017f74dfcbeae3487336e460575..17e2dc9b00975a8927dc6b9d3647424a0bef0500 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1359,6 +1359,58 @@ rename table t2 to t1; execute stmt1; deallocate prepare stmt1; drop table t2; +# +# MDEV-8960 Can't refer the same column twice in one ALTER TABLE +# +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` DROP DEFAULT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` SET DEFAULT 2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` int(11) NOT NULL DEFAULT '2' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; +CREATE TABLE t1 ( +`a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT, +MODIFY COLUMN `consultant_id` BIGINT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `consultant_id` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +DROP TABLE t1; CREATE TABLE t1 ( id INT(11) NOT NULL, x_param INT(11) DEFAULT NULL, @@ -2122,59 +2174,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 DROP TABLE t1; # -# MDEV-8960 Can't refer the same column twice in one ALTER TABLE -# -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` DROP DEFAULT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` SET DEFAULT 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` int(11) NOT NULL DEFAULT '2' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -CREATE TABLE t1 ( -`a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT, -MODIFY COLUMN `consultant_id` BIGINT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `consultant_id` bigint(20) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -DROP TABLE t1; -# -# Start of 10.1 tests +# End of 10.0 tests # # # MDEV-7374 : Losing connection to MySQL while running ALTER TABLE @@ -2197,3 +2197,6 @@ t1 CREATE TABLE `t1` ( KEY `i1` (`a`) COMMENT 'comment2' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# End of 10.1 tests +# diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 9ceb7efde6404b2e51a90c32614c47b63de2e7b1..6fc1c9628b3b8608b5656a291c542306eabb31be 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -220,6 +220,22 @@ a d 3 11120436154190595086 drop table t1, t2; End of 5.0 tests +# +# Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE +# (SIG 6 -STRINGS/CTYPE-UTF8.C:5151) +# +set @@sql_mode=''; +CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2); +Warnings: +Note 1291 Column 'c1' has duplicated value '' in SET +INSERT INTO t1 VALUES(990101.102); +Warnings: +Warning 1265 Data truncated for column 'c1' at row 1 +SELECT COALESCE(c1)FROM t1 ORDER BY 1; +COALESCE(c1) + +DROP TABLE t1; +set @@sql_mode=default; CREATE TABLE t1(a YEAR); SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END; 1 diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result index b5774548d85f47e3e421c06bf135d75b8d046657..d10d5f4bf75465d65fcda82e9be051863cba2362 100644 --- a/mysql-test/r/ctype_gbk.result +++ b/mysql-test/r/ctype_gbk.result @@ -5100,6 +5100,24 @@ E05B DROP TABLE t1; # Start of ctype_E05C.inc # +# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +# +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET gbk); +INSERT INTO t1 VALUES (0xEE5D); +SELECT a<>0xEE5D AS a FROM t1; +a +0 +CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`a` <> 0xee5d) AS `a` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +a +0 +DROP VIEW v1; +DROP TABLE t1; +# # End of 10.0 tests # # diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index c6f190101f6cdb445bff4a38b36dd66594cb4eeb..85035982cf9ba92a8576479773171a0d35422648 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -7972,6 +7972,24 @@ SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110'; _latin1 0x7E _latin1 X'7E' _latin1 B'01111110' ~ ~ ~ # +# MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +# +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET latin1); +INSERT INTO t1 VALUES (0xC0); +SELECT a<>0xEE5D AS a FROM t1; +a +1 +CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`a` <> 0xc0) AS `a` from `t1` latin1 latin1_swedish_ci +SELECT * FROM v1; +a +0 +DROP VIEW v1; +DROP TABLE t1; +# # End of 10.0 tests # # diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 9402acc9e9a1bed756ed2e19df53c2ebaf05a833..f9f0acf726fdb2db34bcfa9e46d51e7117a86eaf 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -4586,6 +4586,36 @@ NO_ENGINE_SUBSTITUTION SET sql_mode=DEFAULT; SET NAMES utf8; # +# MDEV-13972 crash in Item_func_sec_to_time::get_date +# +SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)); +SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '77760000' +# +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(32766) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# # End of 5.5 tests # # diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 645db153a3e24e87f4b5e4d9e39c5e639fdcbe06..22b0e9c0fc0582e4f420b3bf68f35565d9bb1849 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -1678,6 +1678,21 @@ NO_ENGINE_SUBSTITUTION SET sql_mode=DEFAULT; SET NAMES utf8; # +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(16383) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# # End of 5.5 tests # # diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 2b53f43cfc992702846b0ae037c6c40b1a42db02..ca585f9e33072565104142f16fcd5eba581a7afa 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -6274,6 +6274,28 @@ Warnings: SET sql_mode=DEFAULT; DROP TABLE t1; # +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(21844) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# # End of 5.5 tests # # diff --git a/mysql-test/r/delete_returning.result b/mysql-test/r/delete_returning.result index 0618b495a533c32036d31f187a5eb7e0a32e5aed..3a95de0cdcaa6db794304c198aa07e9d29329271 100644 --- a/mysql-test/r/delete_returning.result +++ b/mysql-test/r/delete_returning.result @@ -199,3 +199,15 @@ i 2 DROP PROCEDURE p1; DROP TABLE t1; +# +# MDEV-13776: DELETE ... RETURNING with sql_mode='ONLY_FULL_GROUP_BY' +# +set @sql_mode_save= @@sql_mode; +set sql_mode='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1 (id INT); +INSERT INTO t1 VALUE(1),(2),(3); +DELETE FROM t1 WHERE id > 2 RETURNING *; +id +3 +set sql_mode=@sql_mode_save; +DROP TABLE t1; diff --git a/mysql-test/r/delimiter_command_case_sensitivity.result b/mysql-test/r/delimiter_command_case_sensitivity.result new file mode 100644 index 0000000000000000000000000000000000000000..6ed281c757a969ffe22f3dcfa5830c532479c726 --- /dev/null +++ b/mysql-test/r/delimiter_command_case_sensitivity.result @@ -0,0 +1,2 @@ +1 +1 diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 776fe62787588a147d4680b88420ffa68ae2c5a8..e1d494d3324e1833b5cade3b568ebeedc1a90b6f 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -27,7 +27,7 @@ create table t1 (a int(256)); ERROR 42000: Display width out of range for 'a' (max = 255) set sql_mode='traditional'; create table t1 (a varchar(66000)); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead set sql_mode=default; CREATE TABLE t1 (a INT); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 1855fa72523a54056f4baa5957dc07e2f7c78e2a..c80ea5d13e101ba75e31c71e447df5469b7e1cd9 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -811,9 +811,17 @@ PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM EXECUTE s; 1 DROP TABLE t1; +# # End of 5.3 tests # -# Start of 10.0 tests +create table t1 (a int); +insert t1 values (1),(2),(3); +select * from t1 where 1 in (a, name_const('a', null)); +a +1 +drop table t1; +# +# End of 5.5 tests # # # MDEV-10020 InnoDB NOT IN Query Crash When One Item Is NULL @@ -829,7 +837,7 @@ SELECT * FROM t1 WHERE b NOT IN (NULL, '', 'A'); a b DROP TABLE t1; # -# Start of 10.1 tests +# End of 10.0 tests # # # MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index b184a9b633cb26caa393b529f212477bad9cfbaa..545d515176d1487adbf9a77a97fad06ba36969f9 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -1446,3 +1446,17 @@ SELECT CONCAT(NAME_CONST('name',15),'오'); CONCAT(NAME_CONST('name',15),'오') 15오 SET NAMES latin1; +# +# MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable +# +CREATE PROCEDURE p1() +BEGIN +DECLARE ip_full_addr varchar(39) DEFAULT ""; +SELECT INET6_NTOA(UNHEX('20000000000000000000000000000000')) into ip_full_addr; +SELECT ip_full_addr; +END; +$$ +CALL p1(); +ip_full_addr +2000:: +DROP PROCEDURE p1; diff --git a/mysql-test/r/func_regexp_pcre.result b/mysql-test/r/func_regexp_pcre.result index 7712b76e3ae46be91fc9530c5054ee515b0f3660..cda1c2e7e69411fb70d560a46c03debbc17bb64b 100644 --- a/mysql-test/r/func_regexp_pcre.result +++ b/mysql-test/r/func_regexp_pcre.result @@ -883,32 +883,32 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, 1 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' +SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 1 SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$' 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 1 SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$') 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) -535 +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) +243 SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')) 0 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); -LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) 0 SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 76daecf82a52616c17de581960551e94bcd4047d..371dffdd3ae40e465b9b3d7cf7d8d357cf3942fc 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2771,7 +2771,33 @@ SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2; 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2 3 # -# Start of 10.0 tests +# MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +# +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 SELECT timediff(timestamp'2008-12-31 23:59:59.000001',timestamp'2008-12-30 01:01:01.000002'); +SELECT * FROM t1; +a +46:58:57.999999 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# MDEV-13972 crash in Item_func_sec_to_time::get_date +# +DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID())))); +DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~(''))))); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect time value: '20000101' +SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); +SEC_TO_TIME(MAKEDATE(0,RAND(~0))) +838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '20000101' +# +# End of 5.5 tests # # # MDEV-8205 timediff returns null when comparing decimal time to time string value diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 3824ba6afbbe3d5dbaf81828493674a44db6960a..89e5c2374137151796d1b76289e37ca2754fb6b7 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -486,6 +486,25 @@ ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')) 0 +SELECT ST_RELATE( +ST_DIFFERENCE( +GEOMETRYFROMTEXT(' + MULTILINESTRING( + ( 12841 36140, 8005 31007, 26555 31075, 52765 41191, + 28978 6548, 45720 32057, 53345 3221 ), + ( 8304 59107, 25233 31592, 40502 25303, 8205 42940 ), + ( 7829 7305, 58841 56759, 64115 8512, 37562 54145, 2210 14701 ), + ( 20379 2805, 40807 27770, 28147 14883, 26439 29383, 55663 5086 ), + ( 35944 64702, 14433 23728, 49317 26241, 790 16941 ) + ) + '), +GEOMETRYFROMTEXT('POINT(46061 13545)') +), +GEOMETRYFROMTEXT('POINT(4599 60359)'), +'F*FFFF**F' + ) as relate_res; +relate_res +0 DROP TABLE IF EXISTS p1; CREATE PROCEDURE p1(dist DOUBLE, geom TEXT) BEGIN diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index cee4797617faa1c8e94eec6f162573af32713731..2b5a536308a716a8852d295b38f9246b3d2095f7 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -2069,3 +2069,35 @@ Opened_tables 3 drop database mysqltest; drop database db1; set global sql_mode=default; +USE test; +# +# End of 10.0 tests +# +# +# Start of 10.1 tests +# +# +# MDEV-13242 Wrong results for queries with row constructors and information_schema +# +CREATE TABLE tt1(c1 INT); +CREATE TABLE tt2(c2 INT); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1', 'c1')); +count(*) +1 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt2', 'c2')); +count(*) +1 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')); +count(*) +2 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (SELECT 'tt1','c1' FROM dual UNION SELECT 'tt2', 'c2' FROM dual); +count(*) +2 +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name='tt1' AND column_name='c1') OR (table_name='tt2' AND column_name='c2'); +count(*) +2 +SELECT column_name FROM information_schema.columns WHERE (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')) ORDER BY column_name; +column_name +c1 +c2 +DROP TABLE tt1, tt2; diff --git a/mysql-test/r/mdev13607.result b/mysql-test/r/mdev13607.result new file mode 100644 index 0000000000000000000000000000000000000000..08848bc645be3b9ae62d0658f0abc268e272f40c --- /dev/null +++ b/mysql-test/r/mdev13607.result @@ -0,0 +1,469 @@ +# +# Bug mdev-13607: overflow of current_record_count +# +CREATE TABLE t1 (id INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10), +(11),(12),(13),(14),(15),(16),(17),(18),(19),(20), +(21),(22),(23),(24),(25),(26),(27),(28),(29),(30), +(31),(32),(33),(34),(35),(36),(37),(38),(39),(40), +(41),(42),(43),(44),(45),(46),(47),(48),(49),(50); +CREATE TABLE t2 (id INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2); +CREATE TABLE t3 (id INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +explain SELECT * FROM +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_2 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_3 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_4 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_5 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_6 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_7 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_8 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_9 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_10 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_11 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_12 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_13 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_14 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_15 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_16 +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY r1 ALL NULL NULL NULL NULL 2 +1 PRIMARY d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +1 PRIMARY r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +1 PRIMARY ALL NULL NULL NULL NULL -1127208515966861312 Using join buffer (incremental, BNL join) +17 DERIVED r1 ALL NULL NULL NULL NULL 2 +17 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +17 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +17 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r1 ALL NULL NULL NULL NULL 2 +16 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +16 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +16 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r1 ALL NULL NULL NULL NULL 2 +15 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +15 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +15 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r1 ALL NULL NULL NULL NULL 2 +14 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +14 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +14 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r1 ALL NULL NULL NULL NULL 2 +13 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +13 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +13 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r1 ALL NULL NULL NULL NULL 2 +12 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +12 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +12 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r1 ALL NULL NULL NULL NULL 2 +11 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +11 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +11 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r1 ALL NULL NULL NULL NULL 2 +10 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +10 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +10 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r1 ALL NULL NULL NULL NULL 2 +9 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +9 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +9 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r1 ALL NULL NULL NULL NULL 2 +8 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +8 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +8 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r1 ALL NULL NULL NULL NULL 2 +7 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +7 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +7 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r1 ALL NULL NULL NULL NULL 2 +6 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +6 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +6 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r1 ALL NULL NULL NULL NULL 2 +5 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +5 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +5 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r1 ALL NULL NULL NULL NULL 2 +4 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +4 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +4 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r1 ALL NULL NULL NULL NULL 2 +3 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +3 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d4 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d5 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d6 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d7 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED r8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED d8 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p1 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p2 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p3 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p4 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p5 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p6 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +3 DERIVED p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join) +DROP TABLE t1,t2,t3; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 9b6adb214ebf4e1f0d887b558c972b1c3c432a4c..e114f424ede82d67bd03eab9bf7c8891066cca77 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1699,7 +1699,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(65535)); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; set storage_engine=MyISAM; set @save_concurrent_insert=@@concurrent_insert; set global concurrent_insert=1; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 94aaee0c57461204142f6eb95f563e01acb21b97..8463c3074a037cc2291ef825005e4582ff1b57bc 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -1250,3 +1250,4 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +mysqlbinlog Ver VER for OS at ARCH diff --git a/mysql-test/r/not_windows.require b/mysql-test/r/not_windows.require deleted file mode 100644 index 09aae1ed1d03d58d45633c217dcbd70118bd8cb0..0000000000000000000000000000000000000000 --- a/mysql-test/r/not_windows.require +++ /dev/null @@ -1,2 +0,0 @@ -TRUE -1 diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result index fa58df3dec34eddaf52e198000793ff4ef09e126..eb09d81969f32db8851b1f5c19aa1273338ddf73 100644 --- a/mysql-test/r/partition_datatype.result +++ b/mysql-test/r/partition_datatype.result @@ -314,12 +314,14 @@ bbbb drop table t1; create table t1 (a varchar(3070)) partition by key (a); ERROR HY000: The total length of the partitioning fields is too large +create table t1 (a varchar(65532) not null) partition by key (a); +ERROR HY000: The total length of the partitioning fields is too large create table t1 (a varchar(65533)) partition by key (a); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +ERROR HY000: A BLOB field is not allowed in partition function create table t1 (a varchar(65534) not null) partition by key (a); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +ERROR HY000: A BLOB field is not allowed in partition function create table t1 (a varchar(65535)) partition by key (a); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +ERROR HY000: A BLOB field is not allowed in partition function create table t1 (a bit(27), primary key (a)) engine=myisam partition by hash (a) (partition p0, partition p1, partition p2); diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index b24fe55e1b22751dbd0ef5892bba0716e3917db4..94f1a51deb7a81190886e1e47050a0dff8f2ced8 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -4189,4 +4189,147 @@ Warnings: Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where 0 deallocate prepare stmt2; drop table t1; +# +# MDEV-9208: Function->Function->View = Mysqld segfault +# (Server crashes in Dependency_marker::visit_field on 2nd +# execution with merged subquery) +# +CREATE TABLE t1 (i1 INT); +insert into t1 values(1),(2); +CREATE TABLE t2 (i2 INT); +insert into t2 values(1),(2); +prepare stmt from " + select 1 from ( + select + if (i1<0, 0, 0) as f1, + (select f1) as f2 + from t1, t2 + ) sq +"; +execute stmt; +1 +1 +1 +1 +1 +execute stmt; +1 +1 +1 +1 +1 +drop table t1,t2; +# +# MDEV-9619: Assertion `null_ref_table' failed in virtual +# table_map Item_direct_view_ref::used_tables() const on 2nd +# execution of PS +# +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); +PREPARE stmt FROM "SELECT * FROM v1 WHERE f1 = SOME ( SELECT f2 FROM t2 )"; +EXECUTE stmt; +f1 +EXECUTE stmt; +f1 +insert into t1 values ('c'); +EXECUTE stmt; +f1 +c +EXECUTE stmt; +f1 +c +deallocate prepare stmt; +drop view v1; +drop table t1,t2; +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); +PREPARE stmt FROM "SELECT * FROM v1 WHERE (f1,f1) = SOME ( SELECT f2,f2 FROM t2 )"; +EXECUTE stmt; +f1 +EXECUTE stmt; +f1 +insert into t1 values ('c'); +EXECUTE stmt; +f1 +c +EXECUTE stmt; +f1 +c +deallocate prepare stmt; +drop view v1; +drop table t1,t2; +CREATE TABLE t1 (column1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(9); +CREATE TABLE t2 (column2 INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(4); +CREATE TABLE t3 (column3 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (6),(8); +CREATE TABLE t4 (column4 INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (2),(5); +PREPARE stmt FROM " +SELECT ( + SELECT MAX( table1.column1 ) AS field1 + FROM t1 AS table1 + WHERE (111,table3.column3) IN ( SELECT 111,table2.column2 AS field2 FROM t2 AS table2 ) +) AS sq +FROM t3 AS table3, t4 AS table4 GROUP BY sq +"; +EXECUTE stmt; +sq +NULL +EXECUTE stmt; +sq +NULL +deallocate prepare stmt; +drop table t1,t2,t3,t4; +create table t1 (a int, b int, c int); +create table t2 (x int, y int, z int); +create table t3 as select * from t1; +insert into t1 values (1,2,3),(4,5,6),(100,200,300),(400,500,600); +insert into t2 values (1,2,3),(7,8,9),(100,200,300),(400,500,600); +insert into t3 values (1,2,3),(11,12,13),(100,0,0),(400,500,600); +set @optimizer_switch_save=@@optimizer_switch; +set @join_cache_level_save=@@join_cache_level; +set optimizer_switch='materialization=off'; +set join_cache_level=0; +select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z); +a b c +1 2 3 +400 500 600 +prepare stmt from "select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z)"; +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +create view v1 as select * from t1; +create view v2 as select * from t2; +create view v3 as select * from t3; +select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z); +a b c +1 2 3 +400 500 600 +prepare stmt from "select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z)"; +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +EXECUTE stmt; +a b c +1 2 3 +400 500 600 +set optimizer_switch=@optimizer_switch_save; +set join_cache_level=@join_cache_level_save; +deallocate prepare stmt; +drop view v1,v2,v3; +drop table t1,t2,t3; # End of 5.5 tests diff --git a/mysql-test/r/range_vs_index_merge.result b/mysql-test/r/range_vs_index_merge.result index 6813c40a5cf6c9ed157c53f609ec0c6b78b522a4..bc46a4fdd0b717daa6f5d4711bec3a6f393af6a1 100644 --- a/mysql-test/r/range_vs_index_merge.result +++ b/mysql-test/r/range_vs_index_merge.result @@ -1807,4 +1807,85 @@ id state capital 7 Pennsylvania Harrisburg 8 Virginia Richmond DROP TABLE t1; +# +# mdev-11574: do not build index merge of two indexes when +# one index is an infix of the other index +# +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); +select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +ID Name Country Population +175 Antwerpen BEL 446525 +176 Gent BEL 224180 +3068 Berlin DEU 3386667 +3087 Bonn DEU 301048 +3242 Lahti FIN 96921 +2974 Paris FRA 2125246 +1466 Napoli ITA 1002619 +1474 Venezia ITA 277305 +2808 Bergen NOR 230948 +2807 Oslo NOR 508726 +2928 Warszawa POL 1615369 +2931 Wroclaw POL 636765 +2918 Braga PRT 90535 +2915 Porto PRT 273060 +3580 Moscow RUS 8389200 +3581 St Petersburg RUS 4694000 +3048 Stockholm SWE 750348 +3051 Uppsala SWE 189569 +explain select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City range CountryName,Name CountryName 38 NULL 22 Using index condition; Using where +DROP DATABASE world; set session optimizer_switch='index_merge_sort_intersection=default'; diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result index 13fbc0ac3ef7bee3ba2361d102da1e32144dcc51..a6ec200538dcb862d5be1202968cb0ceafeb13f0 100644 --- a/mysql-test/r/range_vs_index_merge_innodb.result +++ b/mysql-test/r/range_vs_index_merge_innodb.result @@ -1808,5 +1808,86 @@ id state capital 7 Pennsylvania Harrisburg 8 Virginia Richmond DROP TABLE t1; +# +# mdev-11574: do not build index merge of two indexes when +# one index is an infix of the other index +# +set names utf8; +CREATE DATABASE world; +use world; +CREATE TABLE Country ( +Code char(3) NOT NULL default '', +Name char(52) NOT NULL default '', +SurfaceArea float(10,2) NOT NULL default '0.00', +Population int(11) NOT NULL default '0', +Capital int(11) default NULL, +PRIMARY KEY (Code), +UNIQUE INDEX (Name) +); +CREATE TABLE City ( +ID int(11) NOT NULL auto_increment, +Name char(35) NOT NULL default '', +Country char(3) NOT NULL default '', +Population int(11) NOT NULL default '0', +PRIMARY KEY (ID), +INDEX (Population), +INDEX (Country) +); +CREATE TABLE CountryLanguage ( +Country char(3) NOT NULL default '', +Language char(30) NOT NULL default '', +Percentage float(3,1) NOT NULL default '0.0', +PRIMARY KEY (Country, Language), +INDEX (Percentage) +); +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); +select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +ID Name Country Population +175 Antwerpen BEL 446525 +176 Gent BEL 224180 +3068 Berlin DEU 3386667 +3087 Bonn DEU 301048 +3242 Lahti FIN 96921 +2974 Paris FRA 2125246 +1466 Napoli ITA 1002619 +1474 Venezia ITA 277305 +2808 Bergen NOR 230948 +2807 Oslo NOR 508726 +2928 Warszawa POL 1615369 +2931 Wroclaw POL 636765 +2918 Braga PRT 90535 +2915 Porto PRT 273060 +3580 Moscow RUS 8389200 +3581 St Petersburg RUS 4694000 +3048 Stockholm SWE 750348 +3051 Uppsala SWE 189569 +explain select * from City +where +Country='FIN' AND Name IN ('Lahti','Imatra') OR +Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR +Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR +Country='DEU' AND Name IN ('Berlin', 'Bonn') OR +Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR +Country='PRT' AND Name IN ('Braga', 'Porto') OR +Country='FRA' AND Name IN ('Paris', 'Marcel') OR +Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR +Country='NOR' AND Name IN ('Oslo', 'Bergen') OR +Country='ITA' AND Name IN ('Napoli', 'Venezia'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where +DROP DATABASE world; set session optimizer_switch='index_merge_sort_intersection=default'; SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index 0673acacfa94c2e05359b9eff1272543ef486311..0640360f4f5dd678730a0de5343e969d64cc3e9f 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -51,6 +51,9 @@ delete t1 from t1,t3 where t1.a=t3.a; drop table t1; insert into t1 values(1); ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +drop temporary table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' connection default; set global read_only=0; lock table t1 write; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 654b00d68aefbac2f177bac31506933a30f27709..585ab3054204efd4fbd002afb60fbdcda9dba70a 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -962,7 +962,7 @@ def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33 def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589815 0 Y 16 0 33 +def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589788 0 Y 16 0 33 def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33 def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33 def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 96 0 Y 0 0 33 @@ -987,7 +987,7 @@ def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33 def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33 def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33 def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33 +def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 16 0 33 def information_schema COLUMNS COLUMNS EXTRA Extra 253 81 0 N 1 0 33 Field Type Null Key Default Extra c int(11) NO PRI NULL diff --git a/mysql-test/r/show_function_with_pad_char_to_full_length.result b/mysql-test/r/show_function_with_pad_char_to_full_length.result new file mode 100644 index 0000000000000000000000000000000000000000..785cab7b3e6fe147d03545aa8336644ae5a745bd --- /dev/null +++ b/mysql-test/r/show_function_with_pad_char_to_full_length.result @@ -0,0 +1,24 @@ +create function f() returns int return 1; +show function status; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +T f T T T T T T T T T +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +show function status; +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +T f T T T T T T T T T +drop function f; +select @@sql_mode; +@@sql_mode +PAD_CHAR_TO_FULL_LENGTH +create function f() returns int return 1; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +ROUTINE_NAME +f +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +ROUTINE_NAME +f +drop function f; +select @@sql_mode; +@@sql_mode +PAD_CHAR_TO_FULL_LENGTH diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 9dcd5975411a95b28efa0581aad82096a6acb9f9..68efe3df8d019fe0f4c4d313c29ec7ddfa8f8a1d 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1240,9 +1240,9 @@ Warning 1364 Field 'i' doesn't have a default value DROP TABLE t1; set @@sql_mode='traditional'; create table t1(a varchar(65537)); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead create table t1(a varbinary(65537)); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead set @@sql_mode='traditional'; create table t1(a int, b date not null); alter table t1 modify a bigint unsigned not null; diff --git a/mysql-test/r/subselect_exists2in.result b/mysql-test/r/subselect_exists2in.result index 5deb2dfa9c50f908652b1fbd308aaf8322c0c8ac..d47e446fe8fdc63e05f9a73f2048c95f9a002241 100644 --- a/mysql-test/r/subselect_exists2in.result +++ b/mysql-test/r/subselect_exists2in.result @@ -934,5 +934,42 @@ f2 foo set optimizer_switch= @optimizer_switch_save; DROP TABLE t1; +# +# MDEV-14164: Unknown column error when adding aggregate to function +# in oracle style procedure FOR loop +# +CREATE TABLE t1(id INT, val INT); +CREATE PROCEDURE p1() +BEGIN +DECLARE cur1 CURSOR FOR SELECT * FROM ( +SELECT DISTINCT id FROM t1) a +WHERE NOT EXISTS (SELECT * FROM ( SELECT id FROM t1) b +WHERE a.id=b.id); +OPEN cur1; +CLOSE cur1; +OPEN cur1; +CLOSE cur1; +END; +// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; +CREATE TABLE t1(id INT, val INT); +CREATE PROCEDURE p1() +BEGIN +SELECT * FROM (SELECT DISTINCT id FROM t1) a +WHERE NOT a.id IN (SELECT b.id FROM t1 b); +SELECT * FROM (SELECT DISTINCT id FROM t1) a +WHERE NOT EXISTS (SELECT * FROM t1 b WHERE a.id=b.id); +END; +// +CALL p1(); +id +id +CALL p1(); +id +id +DROP PROCEDURE p1; +DROP TABLE t1; # End of 10.0 tests set optimizer_switch=default; diff --git a/mysql-test/r/subselect_mat_cost_bugs.result b/mysql-test/r/subselect_mat_cost_bugs.result index 57b0526c6a3ae3100ebcd7a0a7869822953a5d81..df6b543bab8d6eed33730aa64672faa73bc1801c 100644 --- a/mysql-test/r/subselect_mat_cost_bugs.result +++ b/mysql-test/r/subselect_mat_cost_bugs.result @@ -502,3 +502,20 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index idx idx 5 NULL 5 Using where; Using index 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away drop table t1; +# +# MDEV-13135: subquery with ON expression subject to +# semi-join optimizations +# +CREATE TABLE t1 (a INT); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a AS v_a FROM t1; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (3),(4); +SELECT * FROM t1 WHERE a NOT IN ( +SELECT b FROM t2 INNER JOIN v1 ON (b IN ( SELECT a FROM t1 )) +WHERE v_a = b +); +a +1 +DROP VIEW v1; +DROP TABLE t1,t2; diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index 639a97be27beb13cb149edebdb0901ba253c06f9..4136eb4dff76fe898d20aa09dd7e98358a48dd29 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -806,3 +806,27 @@ SUM(a) NULL DROP TABLE t1; End of 5.1 tests +# +# Start of 10.1 tests +# +# +# MDEV-8867 Wrong field type or metadata for COALESCE(bit_column, 1) +# +CREATE TABLE t1 (val bit(1)); +INSERT INTO t1 VALUES (0); +CREATE TABLE t2 AS SELECT COALESCE(val, 1) AS c FROM t1; +SELECT * FROM t2; +c +0 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `c` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +SELECT COALESCE(val, 1) FROM t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def COALESCE(val, 1) 246 2 1 Y 32896 0 63 +COALESCE(val, 1) +0 +DROP TABLE t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 132de86e27b6650804c3733d52684523577a1d63..223d26ad6d87da248c8e7eff45be7f71edd3cb06 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -37,7 +37,7 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT CREATE TABLE t2 (a char(256)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE t1 (a varchar(70000) default "hello"); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +ERROR 42000: Column length too big for column 'a' (max = 65532); use BLOB or TEXT instead CREATE TABLE t2 (a blob default "hello"); ERROR 42000: BLOB/TEXT column 'a' can't have a default value drop table if exists t1,t2; diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index d2587d7199ead7354ce8fc4ab27cf344a1aab410..661dcabbcfeaa7c953be5e49cc2567685850115d 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -843,5 +843,16 @@ Warning 1292 Incorrect datetime value: '1' Warning 1292 Incorrect datetime value: '1' DROP TABLE t1; # +# MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison +# +CREATE TABLE t1 (d DATE); +INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24'); +SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END; +d COUNT(*) +1985-05-13 1 +1989-12-24 1 +NULL 2 +DROP TABLE t1; +# # End of 10.1 tests # diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result index e15b029e9c6e397dca238ea854e16c9d7dfd554d..882b7f55102ac3907bd9cb691b63026823f78839 100644 --- a/mysql-test/r/type_varchar.result +++ b/mysql-test/r/type_varchar.result @@ -513,7 +513,76 @@ Warning 1292 Truncated incorrect DOUBLE value: 's ' Warning 1292 Truncated incorrect DOUBLE value: ' ' DROP TABLE t1; # -# Start of 10.0 tests +# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +# +CREATE TABLE t1 (c1 VARBINARY(65532)); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varbinary(65532) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65533)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 blob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65534)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 blob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65535)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 blob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARBINARY(65536)); +Warnings: +Note 1246 Converting column 'c1' from VARBINARY to BLOB +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumblob YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65532)); +DESCRIBE t1; +Field Type Null Key Default Extra +c1 varchar(65532) YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65533)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65534)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65535)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 text YES NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 VARCHAR(65536)); +Warnings: +Note 1246 Converting column 'c1' from VARCHAR to TEXT +DESCRIBE t1; +Field Type Null Key Default Extra +c1 mediumtext YES NULL +DROP TABLE t1; +# +# End of 5.5 tests # # # MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns diff --git a/mysql-test/suite/encryption/r/encryption_force.result b/mysql-test/suite/encryption/r/encryption_force.result index de5f7da60a880688fb2617dac27e070c928bfaa8..9d42b360e7cd389cdaa9aa21a5c206ebe1fc0d14 100644 --- a/mysql-test/suite/encryption/r/encryption_force.result +++ b/mysql-test/suite/encryption/r/encryption_force.result @@ -34,11 +34,11 @@ t4 CREATE TABLE `t4` ( /*!50100 PARTITION BY HASH (a) PARTITIONS 2 */ alter table t1 encrypted=no; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED' alter table t2 encrypted=yes; alter table t3 encrypted=default; alter table t4 encrypted=no; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/encryption/r/filekeys_encfile.result b/mysql-test/suite/encryption/r/filekeys_encfile.result index add6f312fda5cc4774f661bca42c6a13e2e8034c..6d5baa1b7ffbcfce4be389f64664060049eb5779 100644 --- a/mysql-test/suite/encryption/r/filekeys_encfile.result +++ b/mysql-test/suite/encryption/r/filekeys_encfile.result @@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `encryption_key_id`=2 alter table t1 encryption_key_id=3; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/encryption/r/filekeys_encfile_file.result b/mysql-test/suite/encryption/r/filekeys_encfile_file.result index add6f312fda5cc4774f661bca42c6a13e2e8034c..6d5baa1b7ffbcfce4be389f64664060049eb5779 100644 --- a/mysql-test/suite/encryption/r/filekeys_encfile_file.result +++ b/mysql-test/suite/encryption/r/filekeys_encfile_file.result @@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `encryption_key_id`=2 alter table t1 encryption_key_id=3; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result index 5869c5d7000eaf41c847e32eb2eabb1358a290d8..9ff0f49203428ad8fbd877fbc3fc45f0978d67bd 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result @@ -43,11 +43,10 @@ CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNOD Warnings: Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 1 when encryption is disabled ALTER TABLE t1 ENCRYPTION_KEY_ID=99; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' SHOW WARNINGS; Level Code Message Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available -Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' set innodb_default_encryption_key_id = 1; drop table t1,t2; diff --git a/mysql-test/suite/encryption/t/encryption_force.test b/mysql-test/suite/encryption/t/encryption_force.test index 3e09dd9183955e25360e4a0026d704d5bed16eaf..3c6f039184b96d1b809a82d979e437e5b02fb2e9 100644 --- a/mysql-test/suite/encryption/t/encryption_force.test +++ b/mysql-test/suite/encryption/t/encryption_force.test @@ -22,13 +22,11 @@ show create table t2; show create table t3; show create table t4; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error ER_CANT_CREATE_TABLE +--error ER_ILLEGAL_HA_CREATE_OPTION alter table t1 encrypted=no; alter table t2 encrypted=yes; alter table t3 encrypted=default; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error ER_CANT_CREATE_TABLE +--error ER_ILLEGAL_HA_CREATE_OPTION alter table t4 encrypted=no; show create table t1; diff --git a/mysql-test/suite/encryption/t/filekeys_goodtest.inc b/mysql-test/suite/encryption/t/filekeys_goodtest.inc index 146a570412c40c3d39d64d59e7d9bc3fb0ec33a1..5317eeb3d127a5cd8bbafe94bfa04dc39369353a 100644 --- a/mysql-test/suite/encryption/t/filekeys_goodtest.inc +++ b/mysql-test/suite/encryption/t/filekeys_goodtest.inc @@ -7,8 +7,7 @@ insert t1 values (12345, repeat('1234567890', 20)); alter table t1 encryption_key_id=2; show create table t1; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error ER_CANT_CREATE_TABLE +--error ER_ILLEGAL_HA_CREATE_OPTION alter table t1 encryption_key_id=3; show create table t1; alter table t1 encryption_key_id=33; @@ -17,4 +16,3 @@ alter table t1 encryption_key_id=4; show create table t1; drop table t1; - diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index 316ece1c16bc343f97027ee699b421b70ed89199..9420fb74a4c0477a605046413dcb92b0389bc0a9 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -33,10 +33,8 @@ DROP TABLE t1; CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB; SHOW CREATE TABLE t1; CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=1; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ ---error 1005 +--error ER_ILLEGAL_HA_CREATE_OPTION ALTER TABLE t1 ENCRYPTION_KEY_ID=99; ---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ SHOW WARNINGS; set innodb_default_encryption_key_id = 1; diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result new file mode 100644 index 0000000000000000000000000000000000000000..17d347a11fb707769f68ea91b3dc420a338f80cd --- /dev/null +++ b/mysql-test/suite/galera/r/MW-388.result @@ -0,0 +1,46 @@ +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB; +CREATE PROCEDURE insert_proc () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +GET DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO; +END; +INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); +INSERT INTO t1 VALUES (3, 'node 1'); +END| +SET GLOBAL wsrep_slave_threads = 2; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +INSERT INTO t1 VALUES (1, 'node 2');; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; +SET SESSION wsrep_sync_wait = 0; +SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue'; +CALL insert_proc ();; +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; +SET GLOBAL DEBUG = ""; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SELECT @errno = 1213; +@errno = 1213 +1 +SELECT * FROM t1; +f1 f2 +1 node 2 +3 node 1 +SELECT * FROM t1; +f1 f2 +1 node 2 +3 node 1 +SET GLOBAL wsrep_slave_threads = DEFAULT; +DROP TABLE t1; +DROP PROCEDURE insert_proc; +SET GLOBAL debug = NULL; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET debug_sync='RESET'; +SELECT @@debug_sync; +@@debug_sync +ON - current signal: '' diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result new file mode 100644 index 0000000000000000000000000000000000000000..fdcf6e324b5638b52efb8ae29ae368a197d6b8d6 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-402.result @@ -0,0 +1,192 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=1 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +SELECT * FROM c; +f1 p_id f2 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p set f1=21 WHERE f1 = 11; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 2 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p2 SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 2 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) +ON DELETE CASCADE); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p2 WHERE f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 0 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/t/MW-388.test b/mysql-test/suite/galera/t/MW-388.test new file mode 100644 index 0000000000000000000000000000000000000000..209695dca80f8e50b655effb0aa24e3e3f482a4f --- /dev/null +++ b/mysql-test/suite/galera/t/MW-388.test @@ -0,0 +1,76 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB; + +DELIMITER |; +CREATE PROCEDURE insert_proc () +BEGIN + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO; + END; + INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); + INSERT INTO t1 VALUES (3, 'node 1'); +END| +DELIMITER ;| + +# We need two slave threads here to guarantee progress. +# If we use only one thread the following could happen +# in node_1: +# We block the only slave thread in wsrep_apply_cb and we +# issue an INSERT (by calling the stored procedure) that will +# try to acquire galera's local monitor in pre_commit(). +# This usually works fine, except for when a commit cut event +# sneaks in the slave queue and gets a local seqno smaller than +# that of the INSERT. Because there is only one slave thread, +# commit cut is not processed and therefore does not advance +# local monitor, and our INSERT remains stuck there. +SET GLOBAL wsrep_slave_threads = 2; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +--connection node_2 +--send INSERT INTO t1 VALUES (1, 'node 2'); + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue'; +--send CALL insert_proc (); + +--connection node_1a +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; + + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +--connection node_2 +--reap + +--connection node_1 +# We expect no errors here, because the handler in insert_proc() caught the deadlock error +--reap +SELECT @errno = 1213; +SELECT * FROM t1; + +--connection node_2 +SELECT * FROM t1; + +--connection node_1 +SET GLOBAL wsrep_slave_threads = DEFAULT; +DROP TABLE t1; +DROP PROCEDURE insert_proc; + +SET GLOBAL debug = NULL; +SET debug_sync='RESET'; + +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test new file mode 100644 index 0000000000000000000000000000000000000000..80f368b50c88a383434afa6c71943f9357e0c5f3 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-402.test @@ -0,0 +1,228 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +# +# we must open connection node_1a here, MW-369.inc will use it later +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +# +# cascading delete operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=1 where f1=1 +--let $mw_369_child_query = DELETE FROM p WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# ON UPDATE CASCADE tests +# Here we update primary key of parent table to cause cascaded update +# on child table +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET p_id=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +--let $mw_369_parent_query = UPDATE p set f1=21 WHERE f1 = 11 +--let $mw_369_child_query = UPDATE c SET p_id=2 where f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and have other operation on the other +# parent table +# +# cascading update operation is replicated from node2 +# but this does not conflict with an update for the other parent table in node1 +# +# As a result, the update on p2 should succeed +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = UPDATE p2 SET f2=2 where f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and issue other delete operation through the +# other parent table. The cascade progresses to same child table row where +# we should see the conflict to happen +# +# As a result, the update on p2 should fail +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) + ON DELETE CASCADE); + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = DELETE FROM p2 WHERE f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; \ No newline at end of file diff --git a/mysql-test/suite/galera/t/galera_ftwrl.test b/mysql-test/suite/galera/t/galera_ftwrl.test index de8310e52d2574045e5dc175aa882facd2df3a59..739255609ee78e11b0587e74a87e4d67b0a6c670 100644 --- a/mysql-test/suite/galera/t/galera_ftwrl.test +++ b/mysql-test/suite/galera/t/galera_ftwrl.test @@ -29,12 +29,11 @@ SELECT * FROM t1; UNLOCK TABLES; -SHOW TABLES; -SELECT COUNT(*) = 1 FROM t1; - --disable_query_log --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"; --enable_query_log -DROP TABLE t1; +SHOW TABLES; +SELECT COUNT(*) = 1 FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test index dcc4a8d14c3d9a3843584a0dee7149b0eb0a2f11..aa4543cf81caf76bb85a480e103e6492d7d5f674 100644 --- a/mysql-test/suite/galera/t/galera_suspend_slave.test +++ b/mysql-test/suite/galera/t/galera_suspend_slave.test @@ -25,7 +25,7 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; my $pid_filename = $ENV{'NODE_2_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -19 $mysqld_pid"); + system("kill -SIGSTOP $mysqld_pid"); exit(0); EOF @@ -37,7 +37,7 @@ INSERT INTO t1 VALUES (1); my $pid_filename = $ENV{'NODE_2_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -18 $mysqld_pid"); + system("kill -SIGCONT $mysqld_pid"); exit(0); EOF diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index fe3bcb1e8ffa6552bf086d76ff17611d8b66e97e..91aa53ad7b179a7491393b210fb61fb9b45d3f66 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -14,6 +14,9 @@ wsrep-causal-reads=ON wsrep-sync-wait=15 [mysqld.1] +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port wsrep-cluster-address='gcomm://' wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' diff --git a/mysql-test/suite/innodb/r/innodb-16k.result b/mysql-test/suite/innodb/r/innodb-16k.result index 9e6e5145fa0e7c769be25822feca0bf7ec854d9d..77ff688f1301fc72111836e01d7c978bd43f3157 100644 --- a/mysql-test/suite/innodb/r/innodb-16k.result +++ b/mysql-test/suite/innodb/r/innodb-16k.result @@ -331,9 +331,10 @@ CREATE INDEX t1e ON t1 (e(767)); UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; CREATE INDEX t1f ON t1 (f(767)); +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -ERROR HY000: Undo log record is too big. +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, @@ -366,8 +367,9 @@ UPDATE t1 SET r=@e; CREATE INDEX t1s ON t1 (s(767)); UPDATE t1 SET s=@e; CREATE INDEX t1t ON t1 (t(767)); +BEGIN; UPDATE t1 SET t=@e; -ERROR HY000: Undo log record is too big. +ROLLBACK; CREATE INDEX t1u ON t1 (u(767)); ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs CREATE INDEX t1ut ON t1 (u(767), t(767)); @@ -546,11 +548,11 @@ PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767)) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751)); COMMIT; +BEGIN; UPDATE bug12547647 SET c = REPEAT('b',16928); -ERROR HY000: Undo log record is too big. SHOW WARNINGS; Level Code Message -Error 1713 Undo log record is too big. +ROLLBACK; DROP TABLE bug12547647; SET SESSION innodb_strict_mode = off; CREATE TABLE t1( diff --git a/mysql-test/suite/innodb/r/innodb-32k.result b/mysql-test/suite/innodb/r/innodb-32k.result index 2253ba5588fb9464215daae39c4c11b04e5fd9be..f9635fefccb7439a08b5dd56aff56745a289ea07 100644 --- a/mysql-test/suite/innodb/r/innodb-32k.result +++ b/mysql-test/suite/innodb/r/innodb-32k.result @@ -228,13 +228,14 @@ aa=@c,ba=@c,ca=@c,da=@c,ea=@c,fa=@c,ga=@c,ha=@c,ia=@c,ja=@c, ka=@c,la=@c,ma=@c,na=@c,oa=@c,pa=@c,qa=@c,ra=@c,sa=@c,ta=@c,ua=@c, va=@c,wa=@c,xa=@c,ya=@c,za=@c; CREATE INDEX t1f17 ON t1 (v(767)); +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d, ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d, va=@d,wa=@d,xa=@d,ya=@d,za=@d; -ERROR HY000: Undo log record is too big. +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d; diff --git a/mysql-test/suite/innodb/r/innodb-64k.result b/mysql-test/suite/innodb/r/innodb-64k.result index 0ce744e9e60f6ce4c23263816ce47152e2e97a5e..dc938f236cd74997495fa2633c931dc048ef84ab 100644 --- a/mysql-test/suite/innodb/r/innodb-64k.result +++ b/mysql-test/suite/innodb/r/innodb-64k.result @@ -263,6 +263,7 @@ kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c, vc=@c,wc=@c,xc=@c,yc=@c,zc=@c; COMMIT; CREATE INDEX tg1f2 ON t1 (ia(767),ja(767)); +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, @@ -275,7 +276,7 @@ vb=@d,wb=@d,xb=@d,yb=@d,zb=@d, ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d, kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d, vc=@d,wc=@d,xc=@d,yc=@d,zc=@d; -ERROR HY000: Undo log record is too big. +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d; diff --git a/mysql-test/suite/innodb/r/innodb-alter-table.result b/mysql-test/suite/innodb/r/innodb-alter-table.result index c4460a7226bad326a9f50500d9d567f23392975f..34a05d39882afa39727c6772fea53b5a6a206a79 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-table.result +++ b/mysql-test/suite/innodb/r/innodb-alter-table.result @@ -185,3 +185,44 @@ ticket CREATE TABLE `ticket` ( KEY `org_id` (`org_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE ticket; +CREATE TABLE t ( +id bigint(20) unsigned NOT NULL auto_increment, +d date NOT NULL, +a bigint(20) unsigned NOT NULL, +b smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (id,d) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2 +PARTITION BY RANGE COLUMNS(d) +( +PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB, +PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB); +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); +replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4; +select count(*) from t where d ='2017-09-15'; +count(*) +18 +ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `d` date NOT NULL, + `a` bigint(20) unsigned NOT NULL, + `c` smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (`id`,`d`), + KEY `idx_d_a` (`d`,`a`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2 +/*!50500 PARTITION BY RANGE COLUMNS(d) +(PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB, + PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB) */ +analyze table t; +Table Op Msg_type Msg_text +test.t analyze status OK +select count(*) from t where d ='2017-09-15'; +count(*) +18 +select count(*) from t force index(primary) where d ='2017-09-15'; +count(*) +18 +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result index 80a187c3ef02d8bcf0846d1064a4c9f66095aa4a..fadbcce332ad687e96833257587dab7bf295fa9a 100644 --- a/mysql-test/suite/innodb/r/innodb-alter.result +++ b/mysql-test/suite/innodb/r/innodb-alter.result @@ -540,9 +540,6 @@ ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; SHOW CREATE TABLE t1n; Table Create Table t1n CREATE TABLE `t1n` ( @@ -559,9 +556,6 @@ ALTER TABLE t1n DROP INDEX c4; ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; ERROR 42S21: Duplicate column name 'c1' ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; SHOW CREATE TABLE t1n; Table Create Table t1n CREATE TABLE `t1n` ( @@ -640,10 +634,11 @@ CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL; ALTER TABLE t1o DROP INDEX ct, DROP INDEX FTS_DOC_ID_INDEX, CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL; ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -ERROR HY000: Incorrect key file for table 't1o'; try to repair it +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot drop or rename FTS_DOC_ID. Try ALGORITHM=COPY. DROP TABLE sys_indexes; CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID; @@ -651,9 +646,16 @@ SELECT i.NAME,i.POS,i.MTYPE,i.PRTYPE,i.LEN FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS i INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID; NAME POS MTYPE PRTYPE LEN +FTS_DOC_ID 0 6 1800 8 +c2 1 6 1027 4 +ct 2 5 524540 10 +cu 3 5 524540 10 SELECT si.NAME,i.POS,i.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS i INNER JOIN sys_indexes si ON i.INDEX_ID=si.INDEX_ID; NAME POS NAME +PRIMARY 0 FTS_DOC_ID +FTS_DOC_ID_INDEX 0 FTS_DOC_ID +ct 0 ct SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS i INNER JOIN sys_foreign sf ON i.ID = sf.ID; ID FOR_COL_NAME REF_COL_NAME POS diff --git a/mysql-test/suite/innodb/r/innodb-get-fk.result b/mysql-test/suite/innodb/r/innodb-get-fk.result index ee17f262854721f80e168d7f3f27158a1897db15..aa1bff8f1341226fba2a4e30262eadfb1bc92336 100644 --- a/mysql-test/suite/innodb/r/innodb-get-fk.result +++ b/mysql-test/suite/innodb/r/innodb-get-fk.result @@ -40,6 +40,9 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` ( CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a comment about tables' +SET GLOBAL innodb_buffer_pool_load_now = ON; +SET GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_load_abort = ON; ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables"; SHOW CREATE TABLE `repro`.`crew_role_assigned`; Table Create Table diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result index 98de5db3c12e962ad2eccad677c0ca87ffb860d0..072f1d1e440d771ebc98eb2ee311f4db6fd45c94 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result @@ -38,12 +38,11 @@ innodb_redundant CREATE TABLE `innodb_redundant` ( `b` char(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT alter table innodb_redundant page_compressed=1; -ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED' show warnings; Level Code Message Warning 140 InnoDB: PAGE_COMPRESSED table can't have ROW_TYPE=REDUNDANT -Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +Error 1478 Table storage engine 'InnoDB' does not support the create option 'PAGE_COMPRESSED' show create table innodb_redundant; Table Create Table innodb_redundant CREATE TABLE `innodb_redundant` ( diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index cc4df79c10a1ad679abf966f1c153f60559ba7ed..9b1097b3afabed9b1690e68631fe34a9d5054222 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -3,6 +3,8 @@ call mtr.add_suppression("InnoDB: Error: table 'test/t1'"); call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for"); SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table; SET GLOBAL innodb_file_per_table = on; +SET @file_format = @@GLOBAL.innodb_file_format; +SET GLOBAL innodb_file_format = Barracuda; CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL) ENGINE = InnoDB; INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,''); @@ -203,7 +205,8 @@ t1 CREATE TABLE `t1` ( ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done'; SET lock_wait_timeout = 10; -ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; +ALTER TABLE t1 ROW_FORMAT=COMPACT +PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; # session default INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1; @@ -438,5 +441,6 @@ SET DEBUG_SYNC = 'RESET'; SET GLOBAL innodb_monitor_disable = module_ddl; DROP TABLE t1; SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; +SET GLOBAL innodb_file_format = @file_format; SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_disable = default; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index 92ae1d52b6cb9590c1a9dadca714252a056975b7..66b7d246e30d252fa0cc0150ac942d63c8f8d671 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -1,26 +1,15 @@ -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); -FLUSH TABLES; SET GLOBAL innodb_file_per_table = 1; -DROP DATABASE IF EXISTS test_wl5522; -Warnings: -Note 1008 Can't drop database 'test_wl5522'; database doesn't exist CREATE DATABASE test_wl5522; -SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ERROR HY000: Lost connection to MySQL server during query DROP TABLE test_wl5522.t1; SET GLOBAL innodb_file_per_table = 1; -SELECT @@innodb_file_per_table; -@@innodb_file_per_table -1 -SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ERROR HY000: Lost connection to MySQL server during query DROP TABLE test_wl5522.t1; @@ -37,19 +26,18 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; SELECT * FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Lost connection to MySQL server during query -SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Lost connection to MySQL server during query unlink: t1.ibd unlink: t1.cfg -# Restart and reconnect to the server DROP TABLE test_wl5522.t1; SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@ -495,7 +483,7 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB; -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +START TRANSACTION WITH CONSISTENT SNAPSHOT; SET GLOBAL innodb_disable_background_merge=ON; SET GLOBAL innodb_monitor_reset = ibuf_merges; SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; @@ -660,7 +648,7 @@ FROM information_schema.innodb_metrics WHERE name = 'ibuf_merges_inserts' AND count > 0; name SET GLOBAL innodb_disable_background_merge=OFF; -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +COMMIT; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 ( c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -796,8 +784,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; -INSERT INTO test_wl5522.t1 VALUES -(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); +INSERT IGNORE INTO test_wl5522.t1 VALUES +(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 2731)); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -832,7 +820,7 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result index 2a1b61b44ee28aeed235fdf91433bcba0cb1d474..6cf3ad4fc081c0ac07101b97cb44b521e77b5c97 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result +++ b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result @@ -1010,9 +1010,6 @@ ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; ERROR 42000: Key column 'c2' doesn't exist in table ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd @@ -1113,9 +1110,6 @@ tt.ibd ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; ERROR 42S21: Duplicate column name 'c1' ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY. -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd @@ -1201,13 +1195,9 @@ tt.isl t1c.ibd t1p.ibd tt.ibd -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; -ERROR HY000: Incorrect key file for table 't1o'; try to repair it -ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd @@ -1249,6 +1239,9 @@ tt.isl t1c.ibd t1p.ibd tt.ibd +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +LOCK=NONE; +ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot drop or rename FTS_DOC_ID. Try LOCK=SHARED. SELECT sc.pos FROM information_schema.innodb_sys_columns sc INNER JOIN information_schema.innodb_sys_tables st ON sc.TABLE_ID=st.TABLE_ID @@ -1352,9 +1345,6 @@ tt.isl tt.ibd ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -ERROR HY000: Incorrect key file for table 't1o'; try to repair it -ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; ### files in MYSQL_DATA_DIR/test FTS_AUX_INDEX_1.ibd FTS_AUX_INDEX_2.ibd diff --git a/mysql-test/suite/innodb/r/table_definition_cache_debug.result b/mysql-test/suite/innodb/r/table_definition_cache_debug.result new file mode 100644 index 0000000000000000000000000000000000000000..a72d4baad218b2039007b51243090b3bb33b54b6 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_definition_cache_debug.result @@ -0,0 +1,16 @@ +SET @save_tdc= @@GLOBAL.table_definition_cache; +SET @save_toc= @@GLOBAL.table_open_cache; +SET GLOBAL table_definition_cache= 400; +SET GLOBAL table_open_cache= 1024; +CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; +INSERT INTO to_be_evicted VALUES(1,2),(2,1); +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate'; +ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b); +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; +BEGIN; +INSERT INTO to_be_evicted VALUES(3, 2); +SET DEBUG_SYNC = 'now SIGNAL got_duplicate'; +ERROR 23000: Duplicate entry '2' for key 'b' +COMMIT; +SET DEBUG_SYNC = RESET; +FLUSH TABLES; diff --git a/mysql-test/suite/innodb/r/undo_log.result b/mysql-test/suite/innodb/r/undo_log.result new file mode 100644 index 0000000000000000000000000000000000000000..a40c6b5b3bfe567a7f92ac8c711caa2021aef892 --- /dev/null +++ b/mysql-test/suite/innodb/r/undo_log.result @@ -0,0 +1,142 @@ +CREATE TABLE test_tab ( +a_str_18 mediumtext, +b_str_3 varchar(32) DEFAULT NULL, +a_str_13 mediumtext, +b_str_5 varchar(40) DEFAULT NULL, +b_str_6 varchar(50) DEFAULT NULL, +b_str_7 char(32) DEFAULT NULL, +b_str_8 varchar(32) DEFAULT NULL, +b_str_9 varchar(255) DEFAULT NULL, +a_str_28 char(255) DEFAULT NULL, +a_str_27 varchar(255) DEFAULT NULL, +b_str_10 varchar(32) DEFAULT NULL, +a_str_26 varchar(255) DEFAULT NULL, +a_str_6 varchar(50) DEFAULT NULL, +b_str_11 varchar(32) DEFAULT NULL, +b_str_12 varchar(255) DEFAULT NULL, +b_str_13 char(32) DEFAULT NULL, +b_str_14 varchar(32) DEFAULT NULL, +b_str_15 char(32) DEFAULT NULL, +b_str_16 char(32) DEFAULT NULL, +b_str_17 varchar(32) DEFAULT NULL, +b_str_18 varchar(32) DEFAULT NULL, +a_str_25 varchar(40) DEFAULT NULL, +b_str_19 varchar(255) DEFAULT NULL, +a_str_23 varchar(40) DEFAULT NULL, +b_str_20 varchar(32) DEFAULT NULL, +a_str_21 varchar(255) DEFAULT NULL, +a_str_20 varchar(255) DEFAULT NULL, +a_str_39 varchar(255) DEFAULT NULL, +a_str_38 varchar(255) DEFAULT NULL, +a_str_37 varchar(255) DEFAULT NULL, +b_str_21 char(32) DEFAULT NULL, +b_str_23 varchar(80) DEFAULT NULL, +b_str_24 varchar(32) DEFAULT NULL, +b_str_25 varchar(32) DEFAULT NULL, +b_str_26 char(32) NOT NULL DEFAULT '', +b_str_27 varchar(255) DEFAULT NULL, +a_str_36 varchar(255) DEFAULT NULL, +a_str_33 varchar(100) DEFAULT NULL, +a_ref_10 char(32) DEFAULT NULL, +b_str_28 char(32) DEFAULT NULL, +b_str_29 char(32) DEFAULT NULL, +a_ref_6 char(32) DEFAULT NULL, +a_ref_12 varchar(32) DEFAULT NULL, +a_ref_11 varchar(32) DEFAULT NULL, +a_str_49 varchar(40) DEFAULT NULL, +b_str_30 varchar(32) DEFAULT NULL, +a_ref_3 varchar(32) DEFAULT NULL, +a_str_48 varchar(40) DEFAULT NULL, +a_ref_1 char(32) DEFAULT NULL, +b_str_31 varchar(32) DEFAULT NULL, +b_str_32 varchar(255) DEFAULT NULL, +b_str_33 char(32) DEFAULT NULL, +b_str_34 varchar(32) DEFAULT NULL, +a_str_47 varchar(40) DEFAULT NULL, +b_str_36 varchar(255) DEFAULT NULL, +a_str_46 varchar(40) DEFAULT NULL, +a_str_45 varchar(255) DEFAULT NULL, +b_str_38 varchar(32) DEFAULT NULL, +b_str_39 char(32) DEFAULT NULL, +b_str_40 varchar(32) DEFAULT NULL, +a_str_41 varchar(255) DEFAULT NULL, +b_str_41 varchar(32) DEFAULT NULL, +PRIMARY KEY (b_str_26), +UNIQUE KEY a_str_47 (a_str_47), +UNIQUE KEY a_str_49 (a_str_49), +UNIQUE KEY a_str_33 (a_str_33), +UNIQUE KEY a_str_46 (a_str_46), +UNIQUE KEY a_str_48 (a_str_48), +KEY b_str_18 (b_str_18), +KEY a_str_26 (a_str_26), +KEY b_str_27 (b_str_27,b_str_19), +KEY b_str_41 (b_str_41), +KEY b_str_15 (b_str_15), +KEY a_str_20 (a_str_20), +KEY b_str_17 (b_str_17), +KEY b_str_40 (b_str_40), +KEY b_str_24 (b_str_24), +KEY b_str_10 (b_str_10), +KEY b_str_16 (b_str_16), +KEY b_str_29 (b_str_29), +KEY a_str_41 (a_str_41), +KEY b_str_7 (b_str_7), +KEY a_str_45 (a_str_45), +KEY a_str_28 (a_str_28), +KEY a_str_37 (a_str_37), +KEY b_str_6 (b_str_6), +KEY a_ref_6 (a_ref_6), +KEY b_str_34 (b_str_34), +KEY b_str_38 (b_str_38), +KEY a_ref_10 (a_ref_10), +KEY b_str_21 (b_str_21), +KEY b_str_23 (b_str_23,b_str_19), +KEY b_str_33 (b_str_33), +KEY a_ref_12 (a_ref_12), +KEY a_str_18 (a_str_18(255)), +KEY a_str_39 (a_str_39), +KEY a_str_27 (a_str_27), +KEY a_str_25 (a_str_25), +KEY b_str_9 (b_str_9), +KEY a_str_23 (a_str_23), +KEY b_str_8 (b_str_8), +KEY a_str_21 (a_str_21), +KEY b_str_3 (b_str_3), +KEY b_str_30 (b_str_30), +KEY b_str_12 (b_str_12), +KEY b_str_25 (b_str_25), +KEY b_str_13 (b_str_13), +KEY a_str_38 (a_str_38), +KEY a_str_13 (a_str_13(255)), +KEY a_str_36 (a_str_36), +KEY b_str_28 (b_str_28), +KEY b_str_19 (b_str_19), +KEY b_str_11 (b_str_11), +KEY a_ref_1 (a_ref_1), +KEY b_str_20 (b_str_20), +KEY b_str_14 (b_str_14), +KEY a_ref_3 (a_ref_3), +KEY b_str_39 (b_str_39), +KEY b_str_32 (b_str_32), +KEY a_str_6 (a_str_6), +KEY b_str_5 (b_str_5), +KEY b_str_31 (b_str_31), +KEY a_ref_11 (a_ref_11) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; +BEGIN; +INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES +('a', REPEAT('f',4031), REPEAT('g', 4031)); +UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032); +SELECT 'Reducing length to 4030'; +Reducing length to 4030 +Reducing length to 4030 +UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030); +UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031); +ROLLBACK; +SELECT COUNT(*) FROM test_tab; +COUNT(*) +0 +CHECK TABLE test_tab; +Table Op Msg_type Msg_text +test.test_tab check status OK +DROP TABLE test_tab; diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test index 3cd90a00d556fa40d6edea0c06664e7b7582cbf1..d7922429f26ba0695bce6a3551de5ae5b7c89504 100644 --- a/mysql-test/suite/innodb/t/innodb-16k.test +++ b/mysql-test/suite/innodb/t/innodb-16k.test @@ -328,10 +328,10 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, # because the UNDO records will be smaller. CREATE INDEX t1f ON t1 (f(767)); ---error 1713 +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; - +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, @@ -371,8 +371,9 @@ UPDATE t1 SET s=@e; # that CANNOT be updated. CREATE INDEX t1t ON t1 (t(767)); ---error 1713 +BEGIN; UPDATE t1 SET t=@e; +ROLLBACK; # The function dict_index_too_big_for_undo() prevents us from adding # one more index. But it is too late. The record is already too big. @@ -515,9 +516,10 @@ INSERT INTO bug12547647 VALUES (5,REPEAT('khdfo5AlOq',1900),REPEAT('g',7751)); COMMIT; # The following used to cause a hang while doing infinite undo log allocation. ---error 1713 +BEGIN; UPDATE bug12547647 SET c = REPEAT('b',16928); SHOW WARNINGS; +ROLLBACK; DROP TABLE bug12547647; diff --git a/mysql-test/suite/innodb/t/innodb-32k.test b/mysql-test/suite/innodb/t/innodb-32k.test index 65c1d4bbc76787e7362a3085643e3e6b1352598f..356746e8ec475ea7f2644f116b0380acde4222b9 100644 --- a/mysql-test/suite/innodb/t/innodb-32k.test +++ b/mysql-test/suite/innodb/t/innodb-32k.test @@ -294,13 +294,14 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, CREATE INDEX t1f17 ON t1 (v(767)); ---error 1713 +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d, ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d, va=@d,wa=@d,xa=@d,ya=@d,za=@d; +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test index a947de25d798e10ee45a24a3225d41e03164612b..0498544279b2923b29f62d94c942a92e26209715 100644 --- a/mysql-test/suite/innodb/t/innodb-64k.test +++ b/mysql-test/suite/innodb/t/innodb-64k.test @@ -304,7 +304,7 @@ COMMIT; CREATE INDEX tg1f2 ON t1 (ia(767),ja(767)); ---error 1713 +BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d, v=@d,w=@d,x=@d,y=@d,z=@d, @@ -317,6 +317,7 @@ UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, ac=@d,bc=@d,cc=@d,dc=@d,ec=@d,fc=@d,gc=@d,hc=@d,ic=@d,jc=@d, kc=@d,lc=@d,mc=@d,nc=@d,oc=@d,pc=@d,qc=@d,rc=@d,sc=@d,tc=@d,uc=@d, vc=@d,wc=@d,xc=@d,yc=@d,zc=@d; +ROLLBACK; BEGIN; UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test index 97f0075f344171a931da59b6bd91e2adc6001ded..0cf456ad146bded9bbc0da1c1167ab92802ab6e8 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-table.test +++ b/mysql-test/suite/innodb/t/innodb-alter-table.test @@ -1,4 +1,5 @@ --source include/innodb_page_size.inc +--source include/have_partition.inc # # MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb @@ -171,3 +172,35 @@ ALTER TABLE ticket SHOW CREATE TABLE ticket; DROP TABLE ticket; + +# +# MDEV-13838: Wrong result after altering a partitioned table +# + +CREATE TABLE t ( +id bigint(20) unsigned NOT NULL auto_increment, +d date NOT NULL, +a bigint(20) unsigned NOT NULL, +b smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (id,d) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs STATS_SAMPLE_PAGES=2 +PARTITION BY RANGE COLUMNS(d) +( +PARTITION p20170914 VALUES LESS THAN ('2017-09-15') ENGINE = InnoDB, +PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB); + +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); +insert into t(d,a,b) values ('2017-09-15',rand()*10000,rand()*10); + +replace into t(d,a,b) select '2017-09-15',rand()*10000,rand()*10 from t t1, t t2, t t3, t t4; + +select count(*) from t where d ='2017-09-15'; + +ALTER TABLE t CHANGE b c smallint(5) unsigned , ADD KEY idx_d_a (d, a); +SHOW CREATE TABLE t; +analyze table t; + +select count(*) from t where d ='2017-09-15'; +select count(*) from t force index(primary) where d ='2017-09-15'; + +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test index 67f637a18141806decced3cb9a7aac49e26cb22f..af75482703cf610ab02e039f82112ac349ed1605 100644 --- a/mysql-test/suite/innodb/t/innodb-alter.test +++ b/mysql-test/suite/innodb/t/innodb-alter.test @@ -298,21 +298,12 @@ SHOW CREATE TABLE t1n; ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE; --error ER_KEY_COLUMN_DOES_NOT_EXITS ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; -# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table -# when renaming a column and adding index ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; SHOW CREATE TABLE t1n; ALTER TABLE t1n DROP INDEX c4; --error ER_DUP_FIELDNAME ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; -# FIXME: MDEV-13668 ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; SHOW CREATE TABLE t1n; DROP TABLE t1n; @@ -370,16 +361,12 @@ CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL; ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); -# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ---error ER_NOT_KEYFILE ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -# FIXME: MDEV-9469 (enable this) -#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, -#ALGORITHM=INPLACE; -#end of MDEV-9469 FIXME + +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +ALGORITHM=INPLACE; DROP TABLE sys_indexes; CREATE TABLE sys_indexes SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES i @@ -494,6 +481,3 @@ eval ALTER TABLE $source_db.t1 DROP INDEX index2, algorithm=inplace; eval DROP TABLE $source_db.t1; eval DROP DATABASE $source_db; eval DROP DATABASE $dest_db; - - - diff --git a/mysql-test/suite/innodb/t/innodb-get-fk.test b/mysql-test/suite/innodb/t/innodb-get-fk.test index 339a79686232053a41d10b4daaa2b52e195755fe..46eb7dd0273d1a8bee2f8e636c93331b403a931e 100644 --- a/mysql-test/suite/innodb/t/innodb-get-fk.test +++ b/mysql-test/suite/innodb/t/innodb-get-fk.test @@ -40,6 +40,11 @@ CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `rep ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only'; SHOW CREATE TABLE `repro`.`crew_role_assigned`; +# These should be ignored in innodb_read_only mode. +SET GLOBAL innodb_buffer_pool_load_now = ON; +SET GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_load_abort = ON; + -- let $restart_parameters= -- source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test index 41d844d26b4d8f059f0b95cf5cb60ebbfa334f92..d8a85d7f273c0182b7dbb8fa39a9c04bfec774d2 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test @@ -32,10 +32,8 @@ create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row show warnings; create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant; show create table innodb_redundant; ---replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ ---error 1005 +--error ER_ILLEGAL_HA_CREATE_OPTION alter table innodb_redundant page_compressed=1; ---replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ show warnings; show create table innodb_redundant; alter table innodb_redundant row_format=compact page_compressed=1; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index 938025359c54dd6c8067eea86ee305984f421728..b9c9dc085d688b30cd2b495c04324152ec8195e7 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -14,6 +14,9 @@ call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd fi # DISCARD TABLESPACE needs file-per-table SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table; SET GLOBAL innodb_file_per_table = on; +# PAGE_COMPRESSED needs innodb_file_format!=Antelope +SET @file_format = @@GLOBAL.innodb_file_format; +SET GLOBAL innodb_file_format = Barracuda; # Save the initial number of concurrent sessions. --source include/count_sessions.inc @@ -215,7 +218,8 @@ SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done # Ensure that the ALTER TABLE will be executed even with some concurrent DML. SET lock_wait_timeout = 10; --send -ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; +ALTER TABLE t1 ROW_FORMAT=COMPACT +PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; # Generate some log (delete-mark, delete-unmark, insert etc.) # while the index creation is blocked. Some of this may run @@ -443,6 +447,7 @@ DROP TABLE t1; --source include/wait_until_count_sessions.inc SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; +SET GLOBAL innodb_file_format = @file_format; --disable_warnings SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_disable = default; diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test index aa9722386368acb57b4005b02d4222bdc0f6683a..11bdd4305c2dd8ece0d6b5e1122e1c3d51950612 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test @@ -1,4 +1,4 @@ -# Not supported in embedded +# mysql-test-run.pl --embedded cannot restart the server. --source include/not_embedded.inc # Adding big test option for this test. @@ -15,12 +15,6 @@ -- source include/have_innodb.inc -call mtr.add_suppression("InnoDB: Page for tablespace .* "); -call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); -FLUSH TABLES; - let MYSQLD_DATADIR =`SELECT @@datadir`; let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522\\t1.ibd'/; @@ -28,51 +22,36 @@ let $strerrfix=/ (\(.+\))//; SET GLOBAL innodb_file_per_table = 1; -DROP DATABASE IF EXISTS test_wl5522; CREATE DATABASE test_wl5522; -##### Before DISCARD commit crash -SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; - CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--let $_server_id= `SELECT @@server_id` +--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; -#### Before DISCARD commit crash -##### After DISCARD commit crash SET GLOBAL innodb_file_per_table = 1; -SELECT @@innodb_file_per_table; - -SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB; INSERT INTO test_wl5522.t1 VALUES(1),(2),(3); -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; -#### After DISCARD commit crash SET GLOBAL innodb_file_per_table = 1; @@ -106,59 +85,35 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -##### Before commit crash -SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; - --error ER_TABLESPACE_DISCARDED SELECT * FROM test_wl5522.t1; -# Write file to make mysql-test-run.pl start up the server again ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; --error 2013 ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect - -#### Before commit crash +--source include/start_mysqld.inc # Check that the DD is consistent after recovery -##### Before checkpoint crash -SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; - --error ER_TABLESPACE_DISCARDED SELECT COUNT(*) FROM test_wl5522.t1; -# Don't start up the server right away. ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - -# Execute the statement that causes the crash +--exec echo wait > $_expect_file_name +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; --error 2013 ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # After the above test the results are non-deterministic, # delete the old tablespace files and drop the table, # recreate the table and do a proper import. --- source include/wait_until_disconnected.inc perl; do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF ---echo # Restart and reconnect to the server ---enable_reconnect ---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect ---source include/wait_until_connected_again.inc ---disable_reconnect - -#### Before checkpoint crash - -# After the above test the results are non-deterministic, recreate the table -# and do a proper import. +--source include/start_mysqld.inc DROP TABLE test_wl5522.t1; @@ -198,6 +153,7 @@ SET SESSION debug_dbug="+d,ib_export_io_write_failure_1"; FLUSH TABLES test_wl5522.t1 FOR EXPORT; UNLOCK TABLES; + SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; @@ -1087,7 +1043,9 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx3(c4(512))) Engine=InnoDB; # Stop purge so that it doesn't remove the delete marked entries. -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +connect (purge_control,localhost,root); +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; # Disable change buffer merge from the master thread, additionally # enable aggressive flushing so that more changes are buffered. @@ -1157,7 +1115,10 @@ SELECT name SET GLOBAL innodb_disable_background_merge=OFF; # Enable normal operation -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +connection purge_control; +COMMIT; +disconnect purge_control; +connection default; DROP TABLE test_wl5522.t1; @@ -1195,8 +1156,8 @@ DROP TABLE test_wl5522.t1; # a Btree that has several levels CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; -INSERT INTO test_wl5522.t1 VALUES - (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); +INSERT IGNORE INTO test_wl5522.t1 VALUES + (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 2731)); INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -1262,7 +1223,7 @@ do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; --replace_regex /'.*t1.cfg'/'t1.cfg'/ @@ -1484,6 +1445,8 @@ call mtr.add_suppression("but tablespace with that id or name does not exist"); call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache"); call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'"); call mtr.add_suppression("while reading index meta-data, expected to read 44 bytes but read only 0 bytes"); +call mtr.add_suppression("Page for tablespace.*that index is not found from configuration file"); +call mtr.add_suppression("Invalid FSP_SPACE_FLAGS=0x0"); --enable_query_log #cleanup diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test index a3ae83753e0561ad09c9dc599a15566788472f77..2815a6fc6d7bb15be181b29208e0a66e242439f1 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test +++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test @@ -447,12 +447,7 @@ ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE; --error ER_KEY_COLUMN_DOES_NOT_EXITS ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; -# FIXME: MDEV-13668 InnoDB unnecessarily rebuilds table -# when renaming a column and adding index ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c2 c4 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c4), LOCK=NONE; --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp @@ -474,11 +469,7 @@ ALTER TABLE t1n DROP INDEX c4; --error ER_DUP_FIELDNAME ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; -# FIXME: MDEV-13668 ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; -ALTER TABLE t1n CHANGE c4 c11 INT, LOCK=NONE; -ALTER TABLE t1n ADD INDEX(c11), LOCK=NONE; --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp @@ -500,17 +491,10 @@ ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL; --replace_regex $regexp --list_files $MYSQL_TMP_DIR/alt_dir/test -# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE -call mtr.add_suppression("Error: no matching column for .FTS_DOC_ID. in index .ct.--temporary-- of table .test...t1o"); ---error ER_NOT_KEYFILE ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; -ALTER TABLE t1o CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; -# end of MDEV-9469 FIXME - --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp --list_files $MYSQL_DATA_DIR/test @@ -519,11 +503,9 @@ ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; --list_files $MYSQL_TMP_DIR/alt_dir/test # This would create a hidden FTS_DOC_ID column, which cannot be done online. -# FIXME: MDEV-9469 (enable this) -#--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -#ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, -#LOCK=NONE; -#end of MDEV-9469 FIXME +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, +LOCK=NONE; # This should not show duplicates. SELECT sc.pos FROM information_schema.innodb_sys_columns sc @@ -534,7 +516,6 @@ WHERE st.NAME='test/t1o' AND sc.NAME='FTS_DOC_ID'; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1o; -# FIXME: MDEV-13668 ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, DROP INDEX ct, LOCK=NONE; @@ -572,15 +553,9 @@ ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); --replace_regex $regexp --list_files $MYSQL_TMP_DIR/alt_dir/test -# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE ---error ER_NOT_KEYFILE ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); -ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, LOCK=NONE; -ALTER TABLE t1o ADD FULLTEXT INDEX(ct), ALGORITHM=INPLACE; -#end of MDEV-9469 FIXME - --echo ### files in MYSQL_DATA_DIR/test --replace_regex $regexp --list_files $MYSQL_DATA_DIR/test diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.opt b/mysql-test/suite/innodb/t/table_definition_cache_debug.opt new file mode 100644 index 0000000000000000000000000000000000000000..6195e055dc86748c7f0403025358743f38389737 --- /dev/null +++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.opt @@ -0,0 +1 @@ +--innodb-open-files=13 diff --git a/mysql-test/suite/innodb/t/table_definition_cache_debug.test b/mysql-test/suite/innodb/t/table_definition_cache_debug.test new file mode 100644 index 0000000000000000000000000000000000000000..57d64d6844ebfdb04e5e6d0d15ea7849720e3e23 --- /dev/null +++ b/mysql-test/suite/innodb/t/table_definition_cache_debug.test @@ -0,0 +1,66 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +SET @save_tdc= @@GLOBAL.table_definition_cache; +SET @save_toc= @@GLOBAL.table_open_cache; + +# InnoDB plugin essentially ignores table_definition_cache size +# and hard-wires it to 400, which also is the minimum allowed value. +SET GLOBAL table_definition_cache= 400; +SET GLOBAL table_open_cache= 1024; + +CREATE TABLE to_be_evicted(a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; +INSERT INTO to_be_evicted VALUES(1,2),(2,1); + +connect(ddl,localhost,root,,); +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR got_duplicate'; +--send +ALTER TABLE to_be_evicted ADD UNIQUE INDEX(b); + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; + +# During the ADD UNIQUE INDEX, start a transaction that inserts a duplicate +# and then hogs the table lock, so that the unique index cannot be dropped. +BEGIN; +INSERT INTO to_be_evicted VALUES(3, 2); +SET DEBUG_SYNC = 'now SIGNAL got_duplicate'; + +connection ddl; +--error ER_DUP_ENTRY +reap; + +disconnect ddl; +connection default; +# Release the table lock. +COMMIT; +SET DEBUG_SYNC = RESET; + +# Allow cache eviction. +FLUSH TABLES; +--disable_query_log + +# Pollute the cache with many tables, so that our table will be evicted. +let $N=1000; +let $loop=$N; +while ($loop) +{ + eval CREATE TABLE t_$loop(id INT)ENGINE=InnoDB; + dec $loop; +} + +# Hopefully let InnoDB evict the tables. +sleep 10; + +let $loop=$N; +while ($loop) +{ + eval DROP TABLE t_$loop; + dec $loop; +} + +SET GLOBAL table_definition_cache= @save_tdc; +SET GLOBAL table_open_cache= @save_toc; + +DROP TABLE to_be_evicted; diff --git a/mysql-test/suite/innodb/t/undo_log.test b/mysql-test/suite/innodb/t/undo_log.test new file mode 100644 index 0000000000000000000000000000000000000000..c1a98793d919964e881265116c0419b4e43a12c6 --- /dev/null +++ b/mysql-test/suite/innodb/t/undo_log.test @@ -0,0 +1,139 @@ +--source include/have_innodb.inc +CREATE TABLE test_tab ( +a_str_18 mediumtext, +b_str_3 varchar(32) DEFAULT NULL, +a_str_13 mediumtext, +b_str_5 varchar(40) DEFAULT NULL, +b_str_6 varchar(50) DEFAULT NULL, +b_str_7 char(32) DEFAULT NULL, +b_str_8 varchar(32) DEFAULT NULL, +b_str_9 varchar(255) DEFAULT NULL, +a_str_28 char(255) DEFAULT NULL, +a_str_27 varchar(255) DEFAULT NULL, +b_str_10 varchar(32) DEFAULT NULL, +a_str_26 varchar(255) DEFAULT NULL, +a_str_6 varchar(50) DEFAULT NULL, +b_str_11 varchar(32) DEFAULT NULL, +b_str_12 varchar(255) DEFAULT NULL, +b_str_13 char(32) DEFAULT NULL, +b_str_14 varchar(32) DEFAULT NULL, +b_str_15 char(32) DEFAULT NULL, +b_str_16 char(32) DEFAULT NULL, +b_str_17 varchar(32) DEFAULT NULL, +b_str_18 varchar(32) DEFAULT NULL, +a_str_25 varchar(40) DEFAULT NULL, +b_str_19 varchar(255) DEFAULT NULL, +a_str_23 varchar(40) DEFAULT NULL, +b_str_20 varchar(32) DEFAULT NULL, +a_str_21 varchar(255) DEFAULT NULL, +a_str_20 varchar(255) DEFAULT NULL, +a_str_39 varchar(255) DEFAULT NULL, +a_str_38 varchar(255) DEFAULT NULL, +a_str_37 varchar(255) DEFAULT NULL, +b_str_21 char(32) DEFAULT NULL, +b_str_23 varchar(80) DEFAULT NULL, +b_str_24 varchar(32) DEFAULT NULL, +b_str_25 varchar(32) DEFAULT NULL, +b_str_26 char(32) NOT NULL DEFAULT '', +b_str_27 varchar(255) DEFAULT NULL, +a_str_36 varchar(255) DEFAULT NULL, +a_str_33 varchar(100) DEFAULT NULL, +a_ref_10 char(32) DEFAULT NULL, +b_str_28 char(32) DEFAULT NULL, +b_str_29 char(32) DEFAULT NULL, +a_ref_6 char(32) DEFAULT NULL, +a_ref_12 varchar(32) DEFAULT NULL, +a_ref_11 varchar(32) DEFAULT NULL, +a_str_49 varchar(40) DEFAULT NULL, +b_str_30 varchar(32) DEFAULT NULL, +a_ref_3 varchar(32) DEFAULT NULL, +a_str_48 varchar(40) DEFAULT NULL, +a_ref_1 char(32) DEFAULT NULL, +b_str_31 varchar(32) DEFAULT NULL, +b_str_32 varchar(255) DEFAULT NULL, +b_str_33 char(32) DEFAULT NULL, +b_str_34 varchar(32) DEFAULT NULL, +a_str_47 varchar(40) DEFAULT NULL, +b_str_36 varchar(255) DEFAULT NULL, +a_str_46 varchar(40) DEFAULT NULL, +a_str_45 varchar(255) DEFAULT NULL, +b_str_38 varchar(32) DEFAULT NULL, +b_str_39 char(32) DEFAULT NULL, +b_str_40 varchar(32) DEFAULT NULL, +a_str_41 varchar(255) DEFAULT NULL, +b_str_41 varchar(32) DEFAULT NULL, +PRIMARY KEY (b_str_26), +UNIQUE KEY a_str_47 (a_str_47), +UNIQUE KEY a_str_49 (a_str_49), +UNIQUE KEY a_str_33 (a_str_33), +UNIQUE KEY a_str_46 (a_str_46), +UNIQUE KEY a_str_48 (a_str_48), +KEY b_str_18 (b_str_18), +KEY a_str_26 (a_str_26), +KEY b_str_27 (b_str_27,b_str_19), +KEY b_str_41 (b_str_41), +KEY b_str_15 (b_str_15), +KEY a_str_20 (a_str_20), +KEY b_str_17 (b_str_17), +KEY b_str_40 (b_str_40), +KEY b_str_24 (b_str_24), +KEY b_str_10 (b_str_10), +KEY b_str_16 (b_str_16), +KEY b_str_29 (b_str_29), +KEY a_str_41 (a_str_41), +KEY b_str_7 (b_str_7), +KEY a_str_45 (a_str_45), +KEY a_str_28 (a_str_28), +KEY a_str_37 (a_str_37), +KEY b_str_6 (b_str_6), +KEY a_ref_6 (a_ref_6), +KEY b_str_34 (b_str_34), +KEY b_str_38 (b_str_38), +KEY a_ref_10 (a_ref_10), +KEY b_str_21 (b_str_21), +KEY b_str_23 (b_str_23,b_str_19), +KEY b_str_33 (b_str_33), +KEY a_ref_12 (a_ref_12), +KEY a_str_18 (a_str_18(255)), +KEY a_str_39 (a_str_39), +KEY a_str_27 (a_str_27), +KEY a_str_25 (a_str_25), +KEY b_str_9 (b_str_9), +KEY a_str_23 (a_str_23), +KEY b_str_8 (b_str_8), +KEY a_str_21 (a_str_21), +KEY b_str_3 (b_str_3), +KEY b_str_30 (b_str_30), +KEY b_str_12 (b_str_12), +KEY b_str_25 (b_str_25), +KEY b_str_13 (b_str_13), +KEY a_str_38 (a_str_38), +KEY a_str_13 (a_str_13(255)), +KEY a_str_36 (a_str_36), +KEY b_str_28 (b_str_28), +KEY b_str_19 (b_str_19), +KEY b_str_11 (b_str_11), +KEY a_ref_1 (a_ref_1), +KEY b_str_20 (b_str_20), +KEY b_str_14 (b_str_14), +KEY a_ref_3 (a_ref_3), +KEY b_str_39 (b_str_39), +KEY b_str_32 (b_str_32), +KEY a_str_6 (a_str_6), +KEY b_str_5 (b_str_5), +KEY b_str_31 (b_str_31), +KEY a_ref_11 (a_ref_11) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; + +BEGIN; +INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES +('a', REPEAT('f',4031), REPEAT('g', 4031)); + +UPDATE test_tab SET a_str_13=REPEAT('h',4032), a_str_18=REPEAT('i',4032); +SELECT 'Reducing length to 4030'; +UPDATE test_tab SET a_str_13=REPEAT('j',4030), a_str_18=REPEAT('k',4030); +UPDATE test_tab SET a_str_13=REPEAT('l',4031), a_str_18=REPEAT('m',4031); +ROLLBACK; +SELECT COUNT(*) FROM test_tab; +CHECK TABLE test_tab; +DROP TABLE test_tab; diff --git a/mysql-test/suite/innodb_fts/r/concurrent_insert.result b/mysql-test/suite/innodb_fts/r/concurrent_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..b9798ca1a74d0a180f08834af237c442d2e05b58 --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/concurrent_insert.result @@ -0,0 +1,8 @@ +CREATE TABLE t1(a VARCHAR(5),FULLTEXT KEY(a)) ENGINE=InnoDB; +SET DEBUG_SYNC = 'get_next_FTS_DOC_ID SIGNAL prepared WAIT_FOR race'; +REPLACE INTO t1(a) values('aaa'); +SET DEBUG_SYNC = 'now WAIT_FOR prepared'; +REPLACE INTO t1(a) VALUES('aaa'); +SET DEBUG_SYNC = 'now SIGNAL race'; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index 1cdce29cdf9f488b77f36894ebf04ec1f6a36a33..6802894e44b7ac6791c7ef7da9bf3038edc8538c 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -1,4 +1,3 @@ -drop table if exists t1,t2,t3; CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) ENGINE = InnoDB; INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), ('Full-text indexes', 'are called collections'), @@ -637,3 +636,58 @@ EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1; End of 5.1 tests +CREATE TABLE z(a INTEGER) engine=innodb; +CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb; +EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' +SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z; +ERROR 42S22: Unknown column 'b' in 'field list' +SELECT MATCH(b) AGAINST ('*') FROM z; +ERROR 42S22: Unknown column 'b' in 'field list' +EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z; +ERROR HY000: Can't find FULLTEXT index matching the column list +SELECT MATCH(a) AGAINST ('*') FROM z; +ERROR HY000: Can't find FULLTEXT index matching the column list +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE q ALL NULL NULL NULL NULL 1 +SELECT MATCH(b) AGAINST ('*') FROM q; +ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' +DROP TABLE z, q; +create table t ( +FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t) +) ENGINE=InnoDB; +INSERT INTO t values (1, 'foo bar'), (2, 'foo bar'), (3, 'foo'); +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 0; +FTS_DOC_ID t +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 1; +FTS_DOC_ID t +1 foo bar +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 2; +FTS_DOC_ID t +1 foo bar +2 foo bar +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 3; +FTS_DOC_ID t +1 foo bar +2 foo bar +3 foo +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 4; +FTS_DOC_ID t +1 foo bar +2 foo bar +3 foo +SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) +LIMIT 5; +FTS_DOC_ID t +1 foo bar +2 foo bar +3 foo +DROP TABLE t; diff --git a/mysql-test/suite/innodb_fts/t/concurrent_insert.test b/mysql-test/suite/innodb_fts/t/concurrent_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..e5d61cd8b059a52d53cc1ddd77c928b60d72ec0a --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/concurrent_insert.test @@ -0,0 +1,20 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +CREATE TABLE t1(a VARCHAR(5),FULLTEXT KEY(a)) ENGINE=InnoDB; +SET DEBUG_SYNC = 'get_next_FTS_DOC_ID SIGNAL prepared WAIT_FOR race'; +--send +REPLACE INTO t1(a) values('aaa'); + +connect(dml, localhost, root, ,); +SET DEBUG_SYNC = 'now WAIT_FOR prepared'; +REPLACE INTO t1(a) VALUES('aaa'); +SET DEBUG_SYNC = 'now SIGNAL race'; +disconnect dml; + +connection default; +reap; +SET DEBUG_SYNC = 'RESET'; + +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test index 90d5d5c71e08ade8b1efc4cf1d583897b415b368..663b202265be77f5667c771509a7a081b7a0d879 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext.test +++ b/mysql-test/suite/innodb_fts/t/fulltext.test @@ -4,10 +4,6 @@ --source include/have_innodb.inc ---disable_warnings -drop table if exists t1,t2,t3; ---enable_warnings - CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)) ENGINE = InnoDB; INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), ('Full-text indexes', 'are called collections'), @@ -679,3 +675,45 @@ DEALLOCATE PREPARE stmt; DROP TABLE t1; --echo End of 5.1 tests + +# This is an adapted and extended version of an Oracle test for +# Bug#21140111: Explain ... match against: Assertion failed: ret ... +# No bug was repeatable for MariaDB. + +CREATE TABLE z(a INTEGER) engine=innodb; +CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb; + +--error ER_PARSE_ERROR +EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +--error ER_PARSE_ERROR +SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z); +--error ER_BAD_FIELD_ERROR +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z; +--error ER_BAD_FIELD_ERROR +SELECT MATCH(b) AGAINST ('*') FROM z; +--error ER_FT_MATCHING_KEY_NOT_FOUND +EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z; +--error ER_FT_MATCHING_KEY_NOT_FOUND +SELECT MATCH(a) AGAINST ('*') FROM z; +EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q; +--error ER_PARSE_ERROR +SELECT MATCH(b) AGAINST ('*') FROM q; + +DROP TABLE z, q; + +create table t ( + FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t) +) ENGINE=InnoDB; + +INSERT INTO t values (1, 'foo bar'), (2, 'foo bar'), (3, 'foo'); +let $limit=0; +let $N=6; +while ($N) +{ + eval SELECT * FROM t WHERE MATCH(t) AGAINST ('foo bar' IN BOOLEAN MODE) + LIMIT $limit; + inc $limit; + dec $N; +} + +DROP TABLE t; diff --git a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result index ccfd8a167109aefaee06eb9df4f3dfb4930b95d3..474d36ea044584b46cff35715e40fbea59bd5bd7 100644 --- a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result +++ b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result @@ -584,12 +584,12 @@ REPEAT("a", 4000) , REPEAT("a", 255) CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -ERROR HY000: Undo log record is too big. SHOW WARNINGS; Level Code Message -Error 1713 Undo log record is too big. +ROLLBACK; DROP TABLE worklog5743; CREATE TABLE worklog5743 ( col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , @@ -627,13 +627,13 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), REPEAT("a", 4000) , REPEAT("a", 255) ); ROLLBACK; +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -ERROR HY000: Undo log record is too big. SHOW WARNINGS; Level Code Message -Error 1713 Undo log record is too big. +ROLLBACK; SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); col_1_varbinary = REPEAT("c", 4000) diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result similarity index 93% rename from mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result rename to mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index b7a2666bfe652614a9a970be987f390da7f63791..a751736aba6a815863ddaac7631f848507fe3540 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -1,14 +1,12 @@ +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); +call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); FLUSH TABLES; -SET GLOBAL innodb_file_per_table = 1; -SET GLOBAL innodb_file_format = `Barracuda`; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; SET SESSION innodb_strict_mode=1; -DROP DATABASE IF EXISTS test_wl5522; -Warnings: -Note 1008 Can't drop database 'test_wl5522'; database doesn't exist CREATE DATABASE test_wl5522; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb ROW_FORMAT=COMPRESSED; @@ -38,9 +36,11 @@ unlink: t1.ibd unlink: t1.cfg # Restart and reconnect to the server DROP TABLE test_wl5522.t1; -SET GLOBAL innodb_file_per_table = 1; -SET GLOBAL innodb_file_format = `Barracuda`; SET SESSION innodb_strict_mode=1; +SET @file_per_table = @@GLOBAL.innodb_file_per_table; +SET @file_format = @@GLOBAL.innodb_file_format; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb ROW_FORMAT=COMPRESSED; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; @@ -128,8 +128,8 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +ROW_FORMAT=COMPRESSED; +START TRANSACTION WITH CONSISTENT SNAPSHOT; SET GLOBAL innodb_disable_background_merge=ON; SET GLOBAL innodb_monitor_reset = ibuf_merges; SET GLOBAL innodb_monitor_reset = ibuf_merges_insert; @@ -172,7 +172,7 @@ t1 CREATE TABLE `t1` ( KEY `idx1` (`c2`), KEY `idx2` (`c3`(512)), KEY `idx3` (`c4`(512)) -) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED SELECT c1, c2 FROM test_wl5522.t1; c1 c2 2 32 @@ -294,7 +294,7 @@ FROM information_schema.innodb_metrics WHERE name = 'ibuf_merges_inserts' AND count > 0; name SET GLOBAL innodb_disable_background_merge=OFF; -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +COMMIT; DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 ( c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -304,7 +304,7 @@ c4 VARCHAR(2048), INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +ROW_FORMAT=COMPRESSED; SELECT c1, c2 FROM test_wl5522.t1; c1 c2 ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; @@ -428,11 +428,11 @@ t1 CREATE TABLE `t1` ( KEY `idx1` (`c2`), KEY `idx2` (`c3`(512)), KEY `idx3` (`c4`(512)) -) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 +) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -INSERT INTO test_wl5522.t1 VALUES +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); Warnings: Warning 1265 Data truncated for column 'c2' at row 1 @@ -470,8 +470,9 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM test_wl5522.t1; ERROR HY000: Tablespace has been discarded for table 't1' restore: t1 .ibd and .cfg files -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; +ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; unlink: t1.ibd @@ -561,5 +562,5 @@ set global innodb_monitor_enable = default; set global innodb_monitor_disable = default; set global innodb_monitor_reset = default; set global innodb_monitor_reset_all = default; -SET GLOBAL INNODB_FILE_PER_TABLE=1; -SET GLOBAL INNODB_FILE_FORMAT=Antelope; +SET GLOBAL innodb_file_per_table = @file_per_table; +SET GLOBAL innodb_file_format = @file_format; diff --git a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test index 541c0e119bee942cedba3a39325f799d8fe1d31d..87f2fd3f467ee9dcac5c8e7f78f9d79b19419db5 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test +++ b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test @@ -536,10 +536,11 @@ REPEAT("a", 4000) , REPEAT("a", 255) CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); ---error ER_UNDO_RECORD_TOO_BIG +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); SHOW WARNINGS; +ROLLBACK; DROP TABLE worklog5743; #------------------------------------------------------------------------------ @@ -585,13 +586,12 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), REPEAT("a", 4000) , REPEAT("a", 255) ); ROLLBACK; -# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE -# Instead of this error, it would hang before this fix. ---error ER_UNDO_RECORD_TOO_BIG +BEGIN; UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); SHOW WARNINGS; +ROLLBACK; SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test similarity index 84% rename from mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test rename to mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test index c48b81a5a56fb533bdf84c84bef8444e571b2c9b..65b030c018f93e57dd85bdabcf77e9f477182bdd 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test @@ -1,39 +1,32 @@ -# Not supported in embedded +# mysql-test-run.pl --embedded cannot restart the server. --source include/not_embedded.inc # This test case needs to crash the server. Needs a debug server. --source include/have_debug.inc -# Don't test this under valgrind, memory leaks will occur. +# Valgrind can hang or return spurious messages on DBUG_SUICIDE --source include/not_valgrind.inc # Avoid CrashReporter popup on Mac --source include/not_crashrep.inc --- source include/have_innodb.inc - -# compressed table in tests are with sizes KEY_BLOCK_SIZE 1,2,4,8,16 -# Table creatation fails if KEY_BLOCK_SIZE > innodb-page-size,so -# allow test to run only when innodb-page-size=16 ---source include/have_innodb_16k.inc +-- source include/innodb_page_size_small.inc +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); +call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*"); call mtr.add_suppression("InnoDB: Page for tablespace "); call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x"); -call mtr.add_suppression("InnoDB: Corruption: Block in space_id .* in file .* corrupted"); -call mtr.add_suppression("InnoDB: Based on page type .*"); FLUSH TABLES; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; + let MYSQLD_DATADIR =`SELECT @@datadir`; -let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; -let $innodb_file_format = `SELECT @@innodb_file_format`; let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522_t1.ibd'/; -SET GLOBAL innodb_file_per_table = 1; - -SET GLOBAL innodb_file_format = `Barracuda`; SET SESSION innodb_strict_mode=1; -DROP DATABASE IF EXISTS test_wl5522; CREATE DATABASE test_wl5522; # Create the table that we will use for crash recovery (during IMPORT) @@ -46,7 +39,7 @@ INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4); FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF UNLOCK TABLES; @@ -60,7 +53,7 @@ INSERT INTO test_wl5522.t1 VALUES (1); ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_discard_tablespaces("test_wl5522", "t1"); EOF @@ -69,7 +62,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -112,7 +105,7 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # recreate the table and do a proper import. -- source include/wait_until_disconnected.inc perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -129,10 +122,12 @@ EOF DROP TABLE test_wl5522.t1; -SET GLOBAL innodb_file_per_table = 1; -SET GLOBAL innodb_file_format = `Barracuda`; - SET SESSION innodb_strict_mode=1; +SET @file_per_table = @@GLOBAL.innodb_file_per_table; +SET @file_format = @@GLOBAL.innodb_file_format; + +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_file_format=Barracuda; CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb ROW_FORMAT=COMPRESSED; @@ -140,7 +135,7 @@ ROW_FORMAT=COMPRESSED; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -166,7 +161,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -183,7 +178,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -203,7 +198,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -217,7 +212,7 @@ ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -234,7 +229,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -249,7 +244,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -263,7 +258,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -277,7 +272,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -291,7 +286,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -305,7 +300,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; # Left over from the failed IMPORT perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -331,10 +326,12 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB - ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + ROW_FORMAT=COMPRESSED; # Stop purge so that it doesn't remove the delete marked entries. -SET GLOBAL INNODB_PURGE_STOP_NOW=ON; +connect (purge_control,localhost,root); +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; # Disable change buffer merge from the master thread, additionally # enable aggressive flushing so that more changes are buffered. @@ -387,7 +384,7 @@ SELECT name FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF @@ -404,7 +401,10 @@ SELECT name SET GLOBAL innodb_disable_background_merge=OFF; # Enable normal operation -SET GLOBAL INNODB_PURGE_RUN_NOW=ON; +connection purge_control; +COMMIT; +disconnect purge_control; +connection default; DROP TABLE test_wl5522.t1; @@ -416,14 +416,14 @@ CREATE TABLE test_wl5522.t1 ( INDEX idx1(c2), INDEX idx2(c3(512)), INDEX idx3(c4(512))) Engine=InnoDB - ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + ROW_FORMAT=COMPRESSED; SELECT c1, c2 FROM test_wl5522.t1; ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -444,7 +444,7 @@ DROP TABLE test_wl5522.t1; CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -INSERT INTO test_wl5522.t1 VALUES +INSERT IGNORE INTO test_wl5522.t1 VALUES (100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200)); INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1; @@ -459,7 +459,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; FLUSH TABLES test_wl5522.t1 FOR EXPORT; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_backup_tablespaces("test_wl5522", "t1"); EOF @@ -477,7 +477,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -493,7 +493,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -509,16 +509,16 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF -SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure"; +SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; --replace_regex /'.*t1.cfg'/'t1.cfg'/ -# Following alter is not failing -#--error ER_INTERNAL_ERROR +# Following alter is failing +--error ER_INTERNAL_ERROR ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE; SET SESSION debug_dbug=@saved_debug_dbug; @@ -526,7 +526,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -540,7 +540,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -556,7 +556,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -570,7 +570,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -586,7 +586,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -607,7 +607,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -623,7 +623,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -638,7 +638,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -654,7 +654,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -669,7 +669,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -685,7 +685,7 @@ SELECT COUNT(*) FROM test_wl5522.t1; # Restore files perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_restore_tablespaces("test_wl5522", "t1"); EOF @@ -701,7 +701,7 @@ SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE test_wl5522.t1; perl; -do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +do "$ENV{MTR_SUITE_DIR}/../innodb/include/innodb-util.pl"; ib_unlink_tablespace("test_wl5522", "t1"); EOF @@ -736,11 +736,12 @@ call mtr.add_suppression("t1.ibd: Page .* at offset .* looks corrupted"); call mtr.add_suppression("but tablespace with that id or name does not exist"); call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache"); call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'"); +call mtr.add_suppression("Index for table 't1' is corrupt; try to repair it"); --enable_query_log #cleanup --remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg --remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd -eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table; -eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format; +SET GLOBAL innodb_file_per_table = @file_per_table; +SET GLOBAL innodb_file_format = @file_format; diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index d410944ddb2913330c3632ce6f833c59ceaa53d1..ddafea1478c1cf5d13085898249a592773f145c2 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -1595,7 +1595,14 @@ t1 CREATE TABLE `t1` ( ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 drop table t1; create table t1 (v varchar(65535)); -ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` text +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0 +drop table t1; set @save_concurrent_insert=@@concurrent_insert; set global concurrent_insert=1; create table t1 (a int) ROW_FORMAT=FIXED; diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index df73c8d819977d576b75e10067849244bf1ded48..720e7d2ed5de8774bb7b987a759960b6d482cf96 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -927,8 +927,9 @@ show create table t1; drop table t1; # ARIA specific varchar tests ---error 1118 create table t1 (v varchar(65535)); +show create table t1; +drop table t1; # # Test concurrent insert diff --git a/mysql-test/suite/mariabackup/compress_qpress.result b/mysql-test/suite/mariabackup/compress_qpress.result new file mode 100644 index 0000000000000000000000000000000000000000..f8dfb46e4dbd863d5abf168b2005062220fd53e7 --- /dev/null +++ b/mysql-test/suite/mariabackup/compress_qpress.result @@ -0,0 +1,15 @@ +CREATE TABLE t(i INT) ENGINE INNODB; +INSERT INTO t VALUES(1); +# xtrabackup backup +INSERT INTO t VALUES(2); +# xtrabackup prepare +t.frm.qp +t.ibd.qp +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +i +1 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/compress_qpress.test b/mysql-test/suite/mariabackup/compress_qpress.test new file mode 100644 index 0000000000000000000000000000000000000000..f86efe44e5dedb66c30e8f029259916f569ed0a2 --- /dev/null +++ b/mysql-test/suite/mariabackup/compress_qpress.test @@ -0,0 +1,24 @@ +CREATE TABLE t(i INT) ENGINE INNODB; +INSERT INTO t VALUES(1); +echo # xtrabackup backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; + +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --compress --target-dir=$targetdir; +--enable_result_log + +INSERT INTO t VALUES(2); + + +echo # xtrabackup prepare; +--disable_result_log +list_files $targetdir/test *.qp; +exec $XTRABACKUP --decompress --remove-original --target-dir=$targetdir; +list_files $targetdir/test *.qp; +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; diff --git a/mysql-test/suite/mariabackup/data_directory.result b/mysql-test/suite/mariabackup/data_directory.result new file mode 100644 index 0000000000000000000000000000000000000000..e7201918cbda84989ef49c57256680ec707f9894 --- /dev/null +++ b/mysql-test/suite/mariabackup/data_directory.result @@ -0,0 +1,13 @@ +CREATE TABLE t(a INT) ENGINE=InnoDB DATA DIRECTORY='table_data_dir'; +INSERT INTO t VALUES(1); +# xtrabackup backup +# xtrabackup prepare +DROP TABLE t; +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +a +1 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/data_directory.test b/mysql-test/suite/mariabackup/data_directory.test new file mode 100644 index 0000000000000000000000000000000000000000..50789a34c78ec6236f9126e6c283a74181ef4465 --- /dev/null +++ b/mysql-test/suite/mariabackup/data_directory.test @@ -0,0 +1,23 @@ +let $table_data_dir=$MYSQLTEST_VARDIR/ddir; +mkdir $table_data_dir; +--replace_result $table_data_dir table_data_dir +EVAL CREATE TABLE t(a INT) ENGINE=InnoDB DATA DIRECTORY='$table_data_dir'; +INSERT INTO t VALUES(1); +echo # xtrabackup backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir; +--enable_result_log +--source include/shutdown_mysqld.inc +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +--source include/start_mysqld.inc +DROP TABLE t; +rmdir $table_data_dir; +-- source include/restart_and_restore.inc +--enable_result_log +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; +rmdir $table_data_dir; diff --git a/mysql-test/suite/mariabackup/incremental_backup.result b/mysql-test/suite/mariabackup/incremental_backup.result index eeedc751d830aea5c87601bfeaa6932e5854a1ad..20d8cefbefb7c3d3f420fb24e82b75ef72e049ea 100644 --- a/mysql-test/suite/mariabackup/incremental_backup.result +++ b/mysql-test/suite/mariabackup/incremental_backup.result @@ -1,8 +1,14 @@ call mtr.add_suppression("InnoDB: New log files created"); -CREATE TABLE t(i INT) ENGINE INNODB; +CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; +BEGIN; +INSERT INTO t VALUES(2); +SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t VALUES(1); # Create full backup , modify table, then create incremental/differential backup -INSERT INTO t VALUES(2); +BEGIN; +INSERT INTO t VALUES(0); +DELETE FROM t WHERE i=0; +COMMIT; SELECT * FROM t; i 1 diff --git a/mysql-test/suite/mariabackup/incremental_backup.test b/mysql-test/suite/mariabackup/incremental_backup.test index b92d7b323ace522654b40cc3c3df21a3ea0d76fc..93582f047a7c6812aba5290abc900c66362cd964 100644 --- a/mysql-test/suite/mariabackup/incremental_backup.test +++ b/mysql-test/suite/mariabackup/incremental_backup.test @@ -4,23 +4,31 @@ call mtr.add_suppression("InnoDB: New log files created"); let $basedir=$MYSQLTEST_VARDIR/tmp/backup; let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; - -CREATE TABLE t(i INT) ENGINE INNODB; +CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; +BEGIN; +INSERT INTO t VALUES(2); +connect (con1,localhost,root,,); +SET GLOBAL innodb_flush_log_at_trx_commit = 1; INSERT INTO t VALUES(1); echo # Create full backup , modify table, then create incremental/differential backup; --disable_result_log exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log -INSERT INTO t VALUES(2); +BEGIN; +INSERT INTO t VALUES(0); +DELETE FROM t WHERE i=0; +connection default; +COMMIT; SELECT * FROM t; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir; --disable_result_log echo # Prepare full backup, apply incremental one; exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir; -exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ; +exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir --incremental-dir=$incremental_dir ; +disconnect con1; echo # Restore and check results; let $targetdir=$basedir; -- source include/restart_and_restore.inc diff --git a/mysql-test/suite/mariabackup/partition_datadir.opt b/mysql-test/suite/mariabackup/partition_datadir.opt new file mode 100644 index 0000000000000000000000000000000000000000..8a3240370eb92bd99b0752fa4f971802b4418edd --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_datadir.opt @@ -0,0 +1 @@ +--partition \ No newline at end of file diff --git a/mysql-test/suite/mariabackup/partition_datadir.result b/mysql-test/suite/mariabackup/partition_datadir.result new file mode 100644 index 0000000000000000000000000000000000000000..3fc5fe309078e001d093c48d0cebe2d32caff25d --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_datadir.result @@ -0,0 +1,22 @@ +CREATE TABLE t(i int) +ENGINE=InnoDB +PARTITION BY RANGE (i) +(PARTITION p0 VALUES LESS THAN (100), +PARTITION P1 VALUES LESS THAN (200), +PARTITION p2 VALUES LESS THAN (300) DATA DIRECTORY = 'MYSQLTEST_VARDIR/partitdata', +PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = 'MYSQLTEST_VARDIR/partitdata', +PARTITION p4 VALUES LESS THAN MAXVALUE); +INSERT INTO t VALUES (1), (101), (201), (301), (401); +DROP TABLE t; +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +i +1 +101 +201 +301 +401 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/partition_datadir.test b/mysql-test/suite/mariabackup/partition_datadir.test new file mode 100644 index 0000000000000000000000000000000000000000..882b0111267a0074b7cc4af02feeb3247b89589e --- /dev/null +++ b/mysql-test/suite/mariabackup/partition_datadir.test @@ -0,0 +1,24 @@ +let $targetdir=$MYSQLTEST_VARDIR/backup; +mkdir $targetdir; +mkdir $MYSQLTEST_VARDIR/partitdata; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t(i int) +ENGINE=InnoDB +PARTITION BY RANGE (i) +(PARTITION p0 VALUES LESS THAN (100), + PARTITION P1 VALUES LESS THAN (200), + PARTITION p2 VALUES LESS THAN (300) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata', + PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata', + PARTITION p4 VALUES LESS THAN MAXVALUE); +INSERT INTO t VALUES (1), (101), (201), (301), (401); +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir; +exec $XTRABACKUP --prepare --target-dir=$targetdir; +DROP TABLE t; +rmdir $MYSQLTEST_VARDIR/partitdata; +--source include/restart_and_restore.inc +--enable_result_log +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; +rmdir $MYSQLTEST_VARDIR/partitdata; diff --git a/mysql-test/suite/mariabackup/suite.pm b/mysql-test/suite/mariabackup/suite.pm index 26d5c06cdadee05029615b9850b38271735a5892..9242bbc051fdca71666dfb0811dbf549dce4a285 100644 --- a/mysql-test/suite/mariabackup/suite.pm +++ b/mysql-test/suite/mariabackup/suite.pm @@ -23,9 +23,13 @@ $ENV{XBSTREAM}= ::mtr_exe_maybe_exists( $ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex"; +my $have_qpress = index(`qpress 2>&1`,"Compression") > 0; + + sub skip_combinations { my %skip; $skip{'include/have_file_key_management.inc'} = 'needs file_key_management plugin' unless $ENV{FILE_KEY_MANAGEMENT_SO}; + $skip{'compress_qpress.test'}= 'needs qpress executable in PATH' unless $have_qpress; %skip; } diff --git a/mysql-test/suite/parts/r/partition_alter_maria.result b/mysql-test/suite/parts/r/partition_alter_maria.result new file mode 100644 index 0000000000000000000000000000000000000000..6343566e408d0f461b58b5ed984f9bb0070ec4ad --- /dev/null +++ b/mysql-test/suite/parts/r/partition_alter_maria.result @@ -0,0 +1,18 @@ +create table t1 ( +pk bigint not null auto_increment, +dt datetime default null, +unique (pk, dt) +) engine=aria row_format=dynamic +partition by range columns(dt) ( +partition `p20171231` values less than ('2017-12-31'), +partition `p20181231` values less than ('2018-12-31') +); +insert into t1 values (1,'2017-09-28 15:12:00'); +select * from t1; +pk dt +1 2017-09-28 15:12:00 +alter table t1 drop partition p20181231; +select * from t1; +pk dt +1 2017-09-28 15:12:00 +drop table t1; diff --git a/mysql-test/suite/parts/t/partition_alter_maria.test b/mysql-test/suite/parts/t/partition_alter_maria.test new file mode 100644 index 0000000000000000000000000000000000000000..db249591158b11dbf03a292cc329f226a229d03f --- /dev/null +++ b/mysql-test/suite/parts/t/partition_alter_maria.test @@ -0,0 +1,18 @@ +# +# MDEV-13937 Aria engine: Internal Error 160 after partition handling +# +source include/have_partition.inc; +create table t1 ( + pk bigint not null auto_increment, + dt datetime default null, + unique (pk, dt) +) engine=aria row_format=dynamic + partition by range columns(dt) ( + partition `p20171231` values less than ('2017-12-31'), + partition `p20181231` values less than ('2018-12-31') +); +insert into t1 values (1,'2017-09-28 15:12:00'); +select * from t1; +alter table t1 drop partition p20181231; +select * from t1; +drop table t1; diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index ceb75176b4357109ed18ab22eaea38f5f9d814f1..3971504b238e53f25c1bfe60cc77e9843f89ed56 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -47,6 +47,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; 1 2 3 1 2 3 @@ -161,7 +162,9 @@ id 2 CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); SET PASSWORD FOR u1=; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 CREATE USER u3 IDENTIFIED BY ''; @@ -253,7 +256,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats, TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1, 2, 3',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID @@ -336,7 +339,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD \n# comment\nFOR u1 = PASSWORD(*****)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=',ID TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0 diff --git a/mysql-test/suite/plugins/r/thread_pool_server_audit.result b/mysql-test/suite/plugins/r/thread_pool_server_audit.result index ceb75176b4357109ed18ab22eaea38f5f9d814f1..912cef2761a6539b0d9c15e2202f655fb0f78279 100644 --- a/mysql-test/suite/plugins/r/thread_pool_server_audit.result +++ b/mysql-test/suite/plugins/r/thread_pool_server_audit.result @@ -47,6 +47,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; 1 2 3 1 2 3 @@ -161,7 +162,9 @@ id 2 CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); SET PASSWORD FOR u1=; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 CREATE USER u3 IDENTIFIED BY ''; @@ -253,7 +256,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats, TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1, 2, 3',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID @@ -336,7 +339,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0 +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD\n# comment\nFOR u1 = PASSWORD(*****)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=',ID TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0 diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 52428909c3b3ef53a8b370ab4a4b87b84b2842e9..9be0d5556f005e0613ce693fa771ae57958b58db 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -38,6 +38,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; insert into t2 values (1), (2); select * from t2; @@ -106,7 +107,9 @@ insert into t1 values (1), (2); select * from t1; CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); --error 1064 SET PASSWORD FOR u1=; CREATE USER u3 IDENTIFIED BY ''; diff --git a/mysql-test/suite/plugins/t/thread_pool_server_audit.test b/mysql-test/suite/plugins/t/thread_pool_server_audit.test index 626d4136c473134471d6c104a255ee6a9fa927eb..724000c97891a6dd9a5944c5d430ca8b0533e90d 100644 --- a/mysql-test/suite/plugins/t/thread_pool_server_audit.test +++ b/mysql-test/suite/plugins/t/thread_pool_server_audit.test @@ -38,6 +38,7 @@ alter table t1 rename renamed_t1; set global server_audit_events='connect,query'; select 1, 2, +# comment 3; insert into t2 values (1), (2); select * from t2; @@ -106,7 +107,9 @@ insert into t1 values (1), (2); select * from t1; CREATE USER u1 IDENTIFIED BY 'pwd-123'; GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321"; -SET PASSWORD FOR u1 = PASSWORD('pwd 098'); +SET PASSWORD +# comment +FOR u1 = PASSWORD('pwd 098'); --error 1064 SET PASSWORD FOR u1=; CREATE USER u3 IDENTIFIED BY ''; diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result index 7ced62556294d534e54dabdee9a4d54a3fe3ab5b..f2fca91f0eac76d610339f65e1a556d791d62f94 100644 --- a/mysql-test/suite/roles/definer.result +++ b/mysql-test/suite/roles/definer.result @@ -626,3 +626,117 @@ show grants for utest; Grants for utest GRANT SELECT ON *.* TO 'utest' drop role utest; +# +# MDEV-13676: Field "create Procedure" is NULL, even if the the user +# has role which is the definer. (SHOW CREATE PROCEDURE) +# +create database rtest; +create role r1; +create role r2; +create role r3; +grant all privileges on rtest.* to r1; +create user user1; +grant r1 to user1; +grant r1 to r2; +grant r2 to user1; +grant r3 to user1; +set role r2; +use rtest; +CREATE DEFINER=current_role() PROCEDURE user1_proc() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +set role r2; +show create procedure user1_proc; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +user1_proc NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`r2` PROCEDURE `user1_proc`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +# +# Currently one can not use as definer any role except CURRENT_ROLE +# +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +set role r1; +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +show create procedure user1_proc2; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +user1_proc2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`r1` PROCEDURE `user1_proc2`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +# +# Test to see if the user can still see the procedure code if the +# role that owns it is granted to him indirectly. +# +set role r2; +show create procedure user1_proc2; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +user1_proc2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`r1` PROCEDURE `user1_proc2`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +# +# One should not be able to see the procedure code if the role that owns +# the procedure is not set by the user or is not in the subgraph of the +# currently active role. +# +set role r3; +show create procedure user1_proc2; +ERROR 42000: PROCEDURE user1_proc2 does not exist +use rtest; +# +# Try a few edge cases, with usernames identical to role name; +# +create user user_like_role; +create user foo; +create role user_like_role; +grant select on rtest.* to user_like_role; +grant select on rtest.* to foo; +grant select on rtest.* to user_like_role@'%'; +grant user_like_role to foo; +# +# Here we have a procedure that is owned by user_like_role USER +# We don't want user_like_role ROLE to have access to its code. +# +CREATE DEFINER=`user_like_role`@`%` PROCEDURE sensitive_proc() SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END;// +use rtest; +show create procedure sensitive_proc; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sensitive_proc NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user_like_role`@`%` PROCEDURE `sensitive_proc`() + SQL SECURITY INVOKER +BEGIN +SELECT NOW(), VERSION(); +END latin1 latin1_swedish_ci latin1_swedish_ci +set role user_like_role; +use rtest; +# +# Foo has the set rolename identical to the procedure's definer's username. +# Foo should not have access to this procedure. +# +show create procedure sensitive_proc; +ERROR 42000: PROCEDURE sensitive_proc does not exist +drop role r1; +drop role r2; +drop role r3; +drop role user_like_role; +drop user user1; +drop user foo; +drop user user_like_role; +drop procedure user1_proc; +drop procedure user1_proc2; +drop procedure sensitive_proc; +drop database rtest; diff --git a/mysql-test/suite/roles/definer.test b/mysql-test/suite/roles/definer.test index 3de4a6922c20bfd6004ba411b6bcb3a7b87c89b4..89a1c90ee2465a654be38df56dd15c6791d22289 100644 --- a/mysql-test/suite/roles/definer.test +++ b/mysql-test/suite/roles/definer.test @@ -332,3 +332,125 @@ execute stmt1; show grants for utest; drop role utest; +--echo # +--echo # MDEV-13676: Field "create Procedure" is NULL, even if the the user +--echo # has role which is the definer. (SHOW CREATE PROCEDURE) +--echo # + +create database rtest; +create role r1; +create role r2; +create role r3; +grant all privileges on rtest.* to r1; + +create user user1; +grant r1 to user1; +grant r1 to r2; +grant r2 to user1; +grant r3 to user1; + +connect (user1, localhost,user1,,,,,); +set role r2; +use rtest; + +DELIMITER //; +CREATE DEFINER=current_role() PROCEDURE user1_proc() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +set role r2; +show create procedure user1_proc; + +--echo # +--echo # Currently one can not use as definer any role except CURRENT_ROLE +--echo # +DELIMITER //; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +set role r1; +DELIMITER //; +CREATE DEFINER='r1' PROCEDURE user1_proc2() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +show create procedure user1_proc2; +--echo # +--echo # Test to see if the user can still see the procedure code if the +--echo # role that owns it is granted to him indirectly. +--echo # +set role r2; +show create procedure user1_proc2; + +--echo # +--echo # One should not be able to see the procedure code if the role that owns +--echo # the procedure is not set by the user or is not in the subgraph of the +--echo # currently active role. +--echo # +set role r3; +--error ER_SP_DOES_NOT_EXIST +show create procedure user1_proc2; + +connection default; + +use rtest; + +--echo # +--echo # Try a few edge cases, with usernames identical to role name; +--echo # + +create user user_like_role; +create user foo; +create role user_like_role; +grant select on rtest.* to user_like_role; +grant select on rtest.* to foo; +grant select on rtest.* to user_like_role@'%'; + +grant user_like_role to foo; + +--echo # +--echo # Here we have a procedure that is owned by user_like_role USER +--echo # We don't want user_like_role ROLE to have access to its code. +--echo # +DELIMITER //; +CREATE DEFINER=`user_like_role`@`%` PROCEDURE sensitive_proc() SQL SECURITY INVOKER + BEGIN + SELECT NOW(), VERSION(); + END;// +DELIMITER ;// + +connect (user_like_role, localhost, user_like_role,,,,,); +use rtest; +show create procedure sensitive_proc; + +connect (foo, localhost, foo,,,,,); +set role user_like_role; +use rtest; + +--echo # +--echo # Foo has the set rolename identical to the procedure's definer's username. +--echo # Foo should not have access to this procedure. +--echo # +--error ER_SP_DOES_NOT_EXIST +show create procedure sensitive_proc; + +connection default; +drop role r1; +drop role r2; +drop role r3; +drop role user_like_role; +drop user user1; +drop user foo; +drop user user_like_role; +drop procedure user1_proc; +drop procedure user1_proc2; +drop procedure sensitive_proc; +drop database rtest; diff --git a/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc b/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc index 4cf3914e60ad8a4c1c6882977b2751ee2169103e..1fea4ca5bb936054a35748eadc105517e8fa6cd4 100644 --- a/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc +++ b/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc @@ -97,3 +97,16 @@ CREATE TABLE t1 (a INT); ALTER TABLE t1 ADD b TIMESTAMP; SHOW CREATE TABLE t1; DROP TABLE t1; + +--echo # +--echo # MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and NO_ZERO_DATE shouldn't throw error +--echo # + +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +SET sql_mode='ANSI,NO_ZERO_DATE'; +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result index cdf612e6db8c86aa9cb2f00005bf439ad62d20ac..61a4eb8a93490a878df0b318c463a32e21596d5e 100644 --- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result +++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result @@ -173,3 +173,16 @@ t1 CREATE TABLE `t1` ( `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and NO_ZERO_DATE shouldn't throw error +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +SET sql_mode='ANSI,NO_ZERO_DATE'; +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a +2001-01-01 10:20:30 +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result index 1c42da57bfc4e9c61662d7d06e93dd033d8d4a75..fb820dc167daea2ff8be970e3e2bc43b319e68c6 100644 --- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result +++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result @@ -178,3 +178,18 @@ t1 CREATE TABLE `t1` ( `b` timestamp NULL DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +# +# MDEV-10802 TIMESTAMP NOT NULL field with explicit_defaults_for_timestamp and NO_ZERO_DATE shouldn't throw error +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +SET sql_mode='ANSI,NO_ZERO_DATE'; +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +INSERT INTO t1 VALUES (); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +SELECT * FROM t1; +a +0000-00-00 00:00:00 +DROP TABLE t1; +SET sql_mode=DEFAULT; +SET timestamp=DEFAULT; diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result index 9c3a37f892bd898984516e91a800fc2d6cf101cc..522d5731a6d2c67a28d970d01a8869799fca644f 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_now_basic.result @@ -1,7 +1,8 @@ -SET @orig = @@global.innodb_buffer_pool_dump_now; -SELECT @orig; -@orig +SELECT @@global.innodb_buffer_pool_dump_now; +@@global.innodb_buffer_pool_dump_now 0 +SELECT variable_value INTO @old_dump_status FROM information_schema.global_status +WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; SET GLOBAL innodb_buffer_pool_dump_now = ON; SELECT @@global.innodb_buffer_pool_dump_now; @@global.innodb_buffer_pool_dump_now diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result index 51c72cfe791b9240b1b21a7d5193c26c6a284b57..70fcdd3cb56627e770fb00e16f0332331787d786 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result @@ -2,7 +2,8 @@ SET @orig = @@global.innodb_buffer_pool_dump_pct; SELECT @orig; @orig 100 -SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_dump_pct=3; +# Do the dump SET GLOBAL innodb_buffer_pool_dump_pct=0; SELECT @@global.innodb_buffer_pool_dump_pct; @@global.innodb_buffer_pool_dump_pct diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result index 3185d1ca170560f0176749ddbd329f4754634cbf..eebed4d0f4a0fb5d21a86a0b42ee5079c5351623 100644 --- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_now_basic.result @@ -1,8 +1,6 @@ -SET @orig = @@global.innodb_buffer_pool_load_now; -SELECT @orig; -@orig +SELECT @@global.innodb_buffer_pool_load_now; +@@global.innodb_buffer_pool_load_now 0 -SET GLOBAL innodb_buffer_pool_dump_now = ON; SET GLOBAL innodb_buffer_pool_load_now = ON; SELECT variable_value FROM information_schema.global_status diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test index 0bae347428ea92e6af87614caea718d3ccba10c0..8c5f8fa7bf0b9405174634ecb44399f01e934eb0 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_now_basic.test @@ -5,8 +5,31 @@ -- source include/have_innodb.inc # Check the default value -SET @orig = @@global.innodb_buffer_pool_dump_now; -SELECT @orig; +SELECT @@global.innodb_buffer_pool_dump_now; + +-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` +-- error 0,1 +-- remove_file $file + +SELECT variable_value INTO @old_dump_status FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; + +# A previous test could have run buffer pool dump already; +# in this case we want to make sure that the current time is different +# from the timestamp in the status variable. +# We should have had a smart wait condition here, like the commented one below, +# let $wait_condition = +# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s'); +# -- source include/wait_condition.inc + +# ... but we can't because of MDEV-9867, so there will be just sleep instead. +# And it might be not enough to sleep one second, so we'll have to sleep two. + +if (`SELECT variable_value LIKE '%completed at%' FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`) +{ + -- sleep 2 +} # Do the dump SET GLOBAL innodb_buffer_pool_dump_now = ON; @@ -15,11 +38,11 @@ SELECT @@global.innodb_buffer_pool_dump_now; # Wait for the dump to complete let $wait_condition = - SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' + SELECT variable_value != @old_dump_status + AND SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; -- source include/wait_condition.inc # Confirm that the dump file has been created --- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` -- file_exists $file diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test index d2f5cb4a0de5a855a52823bc6d6f926cd5ba9f5c..1cf6775e06dff24c6e2dfffd52046887cd6089f5 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test @@ -8,19 +8,15 @@ SET @orig = @@global.innodb_buffer_pool_dump_pct; SELECT @orig; -# Do the dump -SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON; +SET GLOBAL innodb_buffer_pool_dump_pct=3; -# Wait for the dump to complete -let $wait_condition = - SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' - FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; --- source include/wait_condition.inc +--echo # Do the dump -# Confirm that the dump file has been created --- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` --- file_exists $file +--disable_query_log +--disable_result_log +--source innodb_buffer_pool_dump_now_basic.test +--enable_result_log +--enable_query_log --disable_warnings SET GLOBAL innodb_buffer_pool_dump_pct=0; diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt new file mode 100644 index 0000000000000000000000000000000000000000..e462be3c368685bf15fcef65de964e98472ec2dc --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.opt @@ -0,0 +1 @@ +--innodb-buffer-pool-load-at-startup=off diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test index a040990186533721b1ebb9f3fa55b3ff159752c2..abb78ce5260104b3f713987e6161a3ae24e323c5 100644 --- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test @@ -5,42 +5,22 @@ -- source include/have_innodb.inc # Check the default value -SET @orig = @@global.innodb_buffer_pool_load_now; -SELECT @orig; +SELECT @@global.innodb_buffer_pool_load_now; -let $old_status= `SELECT variable_value FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`; +# Make sure there is a dump file to load -# A previous test could have run buffer pool dump already; -# in this case we want to make sure that the current time is different -# from the timestamp in the status variable. -# We should have had a smart wait condition here, like the commented one below, -# but we can't because of MDEV-9867, so there will be just sleep instead. -# And it might be not enough to sleep one second, so we'll have to sleep two. -# let $wait_condition = -# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s'); -# -- source include/wait_condition.inc - -if (`SELECT variable_value LIKE '%dump completed at%' FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`) -{ - -- sleep 2 -} - -# Do the dump -SET GLOBAL innodb_buffer_pool_dump_now = ON; - -# Wait for the dump to complete -let $wait_condition = - SELECT variable_value != '$old_status' - AND SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' - FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; --- source include/wait_condition.inc - -# Confirm the file is really created -- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` +-- error 0,1 -- file_exists $file +if ($errno) +{ + # Dump file does not exist, get it created + --disable_query_log + --disable_result_log + --source innodb_buffer_pool_dump_now_basic.test + --enable_result_log + --enable_query_log +} # Load the dump SET GLOBAL innodb_buffer_pool_load_now = ON; diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 659bc00c2b798a43dfcb578e4f44467dee1d3806..179d1b54c2158279995e8a53ddba533ecd8074a9 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -338,7 +338,26 @@ tsv timestamp as (adddate(ts, interval 1 day)) virtual drop table t1; set sql_mode=default; # -# Start of 10.1 tests +# MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +# +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 +( +a datetime DEFAULT NULL, +b datetime DEFAULT NULL, +c time GENERATED ALWAYS AS (timediff(`a`,`b`)) VIRTUAL +); +INSERT INTO t1 VALUES ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',DEFAULT); +SELECT * FROM t1; +a b c +2008-12-31 23:59:59 2008-12-30 01:01:01 46:58:58 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# End of 5.5 tests +# +# +# End of 10.0 tests # # # MDEV-8441 Bad SHOW CREATE TABLE output for a table with a virtual column diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index d9c1f64991cf95875db7457f809376b1602c53fc..1eed47269c2a4ee0246776c39d6cda74fafd5306 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -302,9 +302,28 @@ create table t1 ( drop table t1; set sql_mode=default; +--echo # +--echo # MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +--echo # + +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 +( + a datetime DEFAULT NULL, + b datetime DEFAULT NULL, + c time GENERATED ALWAYS AS (timediff(`a`,`b`)) VIRTUAL +); +INSERT INTO t1 VALUES ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; --echo # ---echo # Start of 10.1 tests +--echo # End of 5.5 tests +--echo # + +--echo # +--echo # End of 10.0 tests --echo # --echo # @@ -328,7 +347,6 @@ SELECT COLUMN_GET(@aaa, 'price' AS DECIMAL) aaa; SELECT COLUMN_GET(@aaa, 'price' AS INT) aaa; SELECT COLUMN_GET(@aaa, 'price' AS DOUBLE) aaa; - --echo # --echo # End of 10.1 tests --echo # diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index eef6f17efecf4bd8981331b86900509bc5d72f4a..5cb33516ed2f1e5a8b3059a7be58050aca9892d0 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1254,6 +1254,48 @@ execute stmt1; deallocate prepare stmt1; drop table t2; +--echo # +--echo # MDEV-8960 Can't refer the same column twice in one ALTER TABLE +--echo # + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` DROP DEFAULT; + +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, +ALTER COLUMN `consultant_id` SET DEFAULT 2; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 ( + `a` int(11) DEFAULT NULL +) DEFAULT CHARSET=utf8; + +ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, +ALTER COLUMN `consultant_id` DROP DEFAULT, +MODIFY COLUMN `consultant_id` BIGINT; +SHOW CREATE TABLE t1; +DROP TABLE t1; + # # Test of ALTER TABLE IF [NOT] EXISTS # @@ -1768,49 +1810,7 @@ SHOW CREATE TABLE t1; DROP TABLE t1; --echo # ---echo # MDEV-8960 Can't refer the same column twice in one ALTER TABLE ---echo # - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` DROP DEFAULT; - -SHOW CREATE TABLE t1; -DROP TABLE t1; - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL, -ALTER COLUMN `consultant_id` SET DEFAULT 2; -SHOW CREATE TABLE t1; -DROP TABLE t1; - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT; -SHOW CREATE TABLE t1; -DROP TABLE t1; - -CREATE TABLE t1 ( - `a` int(11) DEFAULT NULL -) DEFAULT CHARSET=utf8; - -ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2, -ALTER COLUMN `consultant_id` DROP DEFAULT, -MODIFY COLUMN `consultant_id` BIGINT; -SHOW CREATE TABLE t1; -DROP TABLE t1; - ---echo # ---echo # Start of 10.1 tests +--echo # End of 10.0 tests --echo # --echo # @@ -1830,3 +1830,7 @@ CREATE INDEX i1 ON t1(a) COMMENT 'comment1'; ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2'; SHOW CREATE TABLE t1; DROP TABLE t1; + +--echo # +--echo # End of 10.1 tests +--echo # diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 7cc74c52b2879d4e96fc641058c22e8a89ae57e9..702592374b69dd1b5b1c6dc66d387833ecb316d8 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -174,6 +174,18 @@ drop table t1, t2; --echo End of 5.0 tests +--echo # +--echo # Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE +--echo # (SIG 6 -STRINGS/CTYPE-UTF8.C:5151) +--echo # + +set @@sql_mode=''; +CREATE TABLE t1(c1 SET('','')CHARACTER SET ucs2); +INSERT INTO t1 VALUES(990101.102); +SELECT COALESCE(c1)FROM t1 ORDER BY 1; +DROP TABLE t1; +set @@sql_mode=default; + # # lp:1001510 # Bug #11764313 57135: CRASH IN ITEM_FUNC_CASE::FIND_ITEM WITH CASE WHEN diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test index 07e73cdf745c3f7162e044e866d40e308c17143f..022d4a3705af6bea9ab7cc10ea85614dc33608e0 100644 --- a/mysql-test/t/ctype_gbk.test +++ b/mysql-test/t/ctype_gbk.test @@ -199,6 +199,20 @@ let $ctype_unescape_combinations=selected; SET NAMES gbk; --source include/ctype_E05C.inc +--echo # +--echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET gbk); +INSERT INTO t1 VALUES (0xEE5D); +SELECT a<>0xEE5D AS a FROM t1; +CREATE VIEW v1 AS SELECT a<>0xEE5D AS a FROM t1; +SHOW CREATE VIEW v1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + --echo # --echo # End of 10.0 tests diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test index a30c7ae9a5dce468b691c81f1553735af8c11ff6..1ee48eed18c5b3a30a4a31b71f8864fc70613a06 100644 --- a/mysql-test/t/ctype_latin1.test +++ b/mysql-test/t/ctype_latin1.test @@ -245,6 +245,22 @@ DROP TABLE t1; --echo # SELECT _latin1 0x7E, _latin1 X'7E', _latin1 B'01111110'; + +--echo # +--echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a TEXT CHARACTER SET latin1); +INSERT INTO t1 VALUES (0xC0); +SELECT a<>0xEE5D AS a FROM t1; +CREATE VIEW v1 AS SELECT a<>0xC0 AS a FROM t1; +SHOW CREATE VIEW v1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index 316b81f697bb1b652ab81cd09122a59e02cb7408..e21cd1f00227d975f072d915723772daa43b0ff6 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -825,6 +825,29 @@ SELECT @@sql_mode; SET sql_mode=DEFAULT; SET NAMES utf8; +--echo # +--echo # MDEV-13972 crash in Item_func_sec_to_time::get_date +--echo # + +SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)); + +--echo # +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARCHAR(32766) CHARACTER SET ucs2); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(32767) CHARACTER SET ucs2); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(32768) CHARACTER SET ucs2); +DESCRIBE t1; +DROP TABLE t1; + + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test index 96e9ecdd8053a6cf9e8df826a2cf5d7cdcf07afa..3bef1524e5badc1297e5c8fb688e882605bd15f9 100644 --- a/mysql-test/t/ctype_utf32.test +++ b/mysql-test/t/ctype_utf32.test @@ -903,6 +903,19 @@ SELECT @@sql_mode; SET sql_mode=DEFAULT; SET NAMES utf8; +--echo # +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARCHAR(16383) CHARACTER SET utf32); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(16384) CHARACTER SET utf32); +DESCRIBE t1; +DROP TABLE t1; + + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index e6792922b95550b367aaeb4908e55a4b85a46de3..d88ce2aa470ea759ead04ec99c21a329973cb2ce 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1715,6 +1715,22 @@ SELECT CHAR(i USING utf8) FROM t1; SET sql_mode=DEFAULT; DROP TABLE t1; +--echo # +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARCHAR(21844) CHARACTER SET utf8); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(21845) CHARACTER SET utf8); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(21846) CHARACTER SET utf8); +DESCRIBE t1; +DROP TABLE t1; + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/delete_returning.test b/mysql-test/t/delete_returning.test index 3790d0905a5ec6e6f53eb1fb0fc314a4d2f48465..4448a6bcccdad744418f37f35f455a9a1ec49268 100644 --- a/mysql-test/t/delete_returning.test +++ b/mysql-test/t/delete_returning.test @@ -155,3 +155,18 @@ SELECT * FROM t1; DROP PROCEDURE p1; DROP TABLE t1; +--echo # +--echo # MDEV-13776: DELETE ... RETURNING with sql_mode='ONLY_FULL_GROUP_BY' +--echo # + +set @sql_mode_save= @@sql_mode; +set sql_mode='ONLY_FULL_GROUP_BY'; + +CREATE TABLE t1 (id INT); +INSERT INTO t1 VALUE(1),(2),(3); + +DELETE FROM t1 WHERE id > 2 RETURNING *; + +set sql_mode=@sql_mode_save; + +DROP TABLE t1; diff --git a/mysql-test/t/delimiter_case_mdev_10728.sql b/mysql-test/t/delimiter_case_mdev_10728.sql new file mode 100644 index 0000000000000000000000000000000000000000..72a1dcd9a9e64fcf0c8aca7977eb10c3cdffcfe3 --- /dev/null +++ b/mysql-test/t/delimiter_case_mdev_10728.sql @@ -0,0 +1,3 @@ +DeLiMiTeR A; +SELECT 1 A; +delimiter ; diff --git a/mysql-test/t/delimiter_command_case_sensitivity.test b/mysql-test/t/delimiter_command_case_sensitivity.test new file mode 100644 index 0000000000000000000000000000000000000000..11d1cf75aa0a335d3462d1faad2f90263e10ae82 --- /dev/null +++ b/mysql-test/t/delimiter_command_case_sensitivity.test @@ -0,0 +1,4 @@ +source include/not_embedded.inc; + +# MDEV-10728 +--exec $MYSQL --default-character-set=binary < "t/delimiter_case_mdev_10728.sql" diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 9e848aa184712af700132b89cfbf12a59de2fd6e..8a1af6ef87259dc72cd76073ac2c5d135ad90b17 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -605,11 +605,20 @@ EXECUTE s; DROP TABLE t1; +--echo # --echo # End of 5.3 tests +--echo # +# +# Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) +# +create table t1 (a int); +insert t1 values (1),(2),(3); +select * from t1 where 1 in (a, name_const('a', null)); +drop table t1; --echo # ---echo # Start of 10.0 tests +--echo # End of 5.5 tests --echo # --echo # @@ -626,7 +635,7 @@ SELECT * FROM t1 WHERE b NOT IN (NULL, '', 'A'); DROP TABLE t1; --echo # ---echo # Start of 10.1 tests +--echo # End of 10.0 tests --echo # --echo # diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 497ebf44e69d2da4d589b0eef0fe632699209170..ffb7838ee787b4abcaf3c720dc531fcb22957666 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -1118,3 +1118,19 @@ SELECT COERCIBILITY(NAME_CONST('name',TIME'00:00:00')); SELECT COERCIBILITY(NAME_CONST('name',15)); SELECT CONCAT(NAME_CONST('name',15),'오'); SET NAMES latin1; + +--echo # +--echo # MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable +--echo # + +DELIMITER $$; +CREATE PROCEDURE p1() +BEGIN + DECLARE ip_full_addr varchar(39) DEFAULT ""; + SELECT INET6_NTOA(UNHEX('20000000000000000000000000000000')) into ip_full_addr; + SELECT ip_full_addr; +END; +$$ +DELIMITER ;$$ +CALL p1(); +DROP PROCEDURE p1; diff --git a/mysql-test/t/func_regexp_pcre.test b/mysql-test/t/func_regexp_pcre.test index cf83db794cf7bde5179881c9dbd241d27aca0f6a..83a17e168313fb8d1c764cc6feb48b105557c51e 100644 --- a/mysql-test/t/func_regexp_pcre.test +++ b/mysql-test/t/func_regexp_pcre.test @@ -434,19 +434,19 @@ SELECT 1 FROM dual WHERE ('Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,StrataCentral, # # MDEV-13173 An RLIKE that previously worked on 10.0 now returns "Got error 'pcre_exec: recursion limit of 100 exceeded' from regexp" # -SELECT CONCAT(REPEAT('100,',133),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +SELECT CONCAT(REPEAT('100,',60),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT CONCAT(REPEAT('100,',200),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; -SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); -SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); -SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',133),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',60),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); --replace_regex /[0-9]+ exceeded/NUM exceeded/ SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',200),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 5cfb7f7d05f6a87b941b62709e7871afdee84c41..bc553e6f0493afc584999c7011b7ae686defef4c 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1677,9 +1677,33 @@ DROP TABLE t1; --echo # SELECT 1 MOD ADDTIME( '13:58:57', '00:00:01' ) + 2; +--echo # +--echo # MDEV-11819 NO_ZERO_IN_DATE: Incorrect generated column value +--echo # + +SET sql_mode='NO_ZERO_IN_DATE'; +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 SELECT timediff(timestamp'2008-12-31 23:59:59.000001',timestamp'2008-12-30 01:01:01.000002'); +SELECT * FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + + +--echo # +--echo # MDEV-13972 crash in Item_func_sec_to_time::get_date +--echo # + +# The below query can return warning sporadically +--disable_warnings +DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID())))); +--enable_warnings + +DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~(''))))); +SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); + --echo # ---echo # Start of 10.0 tests +--echo # End of 5.5 tests --echo # --echo # diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test index 5e57569a91210bec2aa235ac5b9b70644c240edf..7391b2114f394acd750f8b21accca130927531dc 100644 --- a/mysql-test/t/gis-precise.test +++ b/mysql-test/t/gis-precise.test @@ -362,5 +362,24 @@ select ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT select ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')); select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); +# MDEV-12705 10.1.18-MariaDB-1~jessie - mysqld got signal 11. +SELECT ST_RELATE( + ST_DIFFERENCE( + GEOMETRYFROMTEXT(' + MULTILINESTRING( + ( 12841 36140, 8005 31007, 26555 31075, 52765 41191, + 28978 6548, 45720 32057, 53345 3221 ), + ( 8304 59107, 25233 31592, 40502 25303, 8205 42940 ), + ( 7829 7305, 58841 56759, 64115 8512, 37562 54145, 2210 14701 ), + ( 20379 2805, 40807 27770, 28147 14883, 26439 29383, 55663 5086 ), + ( 35944 64702, 14433 23728, 49317 26241, 790 16941 ) + ) + '), + GEOMETRYFROMTEXT('POINT(46061 13545)') + ), + GEOMETRYFROMTEXT('POINT(4599 60359)'), + 'F*FFFF**F' + ) as relate_res; + --source include/gis_debug.inc diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 5b0e29108893d81d5f17f9cbab5c42f388095aaa..5b3fa7b653cd554d137bf6e01fbd5e27ab494dda 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1910,3 +1910,29 @@ disconnect con1; --source include/wait_until_count_sessions.inc set global sql_mode=default; + +USE test; + +--echo # +--echo # End of 10.0 tests +--echo # + + +--echo # +--echo # Start of 10.1 tests +--echo # + + +--echo # +--echo # MDEV-13242 Wrong results for queries with row constructors and information_schema +--echo # + +CREATE TABLE tt1(c1 INT); +CREATE TABLE tt2(c2 INT); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1', 'c1')); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt2', 'c2')); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name, column_name) IN (SELECT 'tt1','c1' FROM dual UNION SELECT 'tt2', 'c2' FROM dual); +SELECT count(*) FROM information_schema.columns WHERE table_schema='test' AND (table_name='tt1' AND column_name='c1') OR (table_name='tt2' AND column_name='c2'); +SELECT column_name FROM information_schema.columns WHERE (table_name, column_name) IN (('tt1','c1'),('tt2', 'c2')) ORDER BY column_name; +DROP TABLE tt1, tt2; diff --git a/mysql-test/t/mdev13607.test b/mysql-test/t/mdev13607.test new file mode 100644 index 0000000000000000000000000000000000000000..45fdb0a74d457c8fbe634f3e770c74d1f037ae2d --- /dev/null +++ b/mysql-test/t/mdev13607.test @@ -0,0 +1,60 @@ +--echo # +--echo # Bug mdev-13607: overflow of current_record_count +--echo # + +--source include/have_innodb.inc + +CREATE TABLE t1 (id INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES +(1),(2),(3),(4),(5),(6),(7),(8),(9),(10), +(11),(12),(13),(14),(15),(16),(17),(18),(19),(20), +(21),(22),(23),(24),(25),(26),(27),(28),(29),(30), +(31),(32),(33),(34),(35),(36),(37),(38),(39),(40), +(41),(42),(43),(44),(45),(46),(47),(48),(49),(50); + +CREATE TABLE t2 (id INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2); + +CREATE TABLE t3 (id INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2); + +ANALYZE TABLE t1, t2, t3; + +let $q= +SELECT * FROM +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_1 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_2 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_3 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_4 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_5 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_6 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_7 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_8 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_9 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_10 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_11 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_12 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_13 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_14 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_15 +INNER JOIN +(SELECT p1.* FROM t1 p1 NATURAL JOIN t2 r1 NATURAL JOIN t3 d1 NATURAL JOIN t1 p2 NATURAL JOIN t2 r2 NATURAL JOIN t3 d2 NATURAL JOIN t1 p3 NATURAL JOIN t2 r3 NATURAL JOIN t3 d3 NATURAL JOIN t1 p4 NATURAL JOIN t2 r4 NATURAL JOIN t3 d4 NATURAL JOIN t1 p5 NATURAL JOIN t2 r5 NATURAL JOIN t3 d5 NATURAL JOIN t1 p6 NATURAL JOIN t2 r6 NATURAL JOIN t3 d6 NATURAL JOIN t1 p7 NATURAL JOIN t2 r7 NATURAL JOIN t3 d7 NATURAL JOIN t1 p8 NATURAL JOIN t2 r8 NATURAL JOIN t3 d8 NATURAL JOIN t1 p9 ) gp_16 +; + +eval explain $q; + +DROP TABLE t1,t2,t3; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 9ac49a9063dcc6a4b78aeccbd73361194fecca0b..62260ba43aa0a6173dade806b3c07153fc937672 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1030,8 +1030,9 @@ show create table t1; drop table t1; # MyISAM specific varchar tests ---error 1118 create table t1 (v varchar(65535)); +show create table t1; +drop table t1; eval set storage_engine=$default; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index e5bc36f6851022d6f498c9b5fcc6f80dfed5c438..6988b2a8e9b06e040597b4a36aa20192b1721406 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -589,3 +589,9 @@ eval SET GLOBAL SERVER_ID = $old_server_id; --exec $MYSQL_BINLOG --hexdump std_data/mdev-4645-binlog_group_id.binlog --exec $MYSQL_BINLOG --hexdump std_data/mdev-4645-binlog_group_id_checksum.binlog --exec $MYSQL_BINLOG --hexdump std_data/mdev-4645-binlog_none.binlog + +# +# MDEV-12372 mysqlbinlog --version output is the same on 10.x as on 5.5.x, and contains not only version +# +replace_regex /.*mysqlbinlog(\.exe)? Ver .* for .* at [-_a-zA-Z0-9]+/mysqlbinlog Ver VER for OS at ARCH/; +exec $MYSQL_BINLOG --version; diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test index a6035fcb592c86bce7bb19dd2347768dc1622e68..4ec0232718e1cdae9c953ffcb1d93c9fe16a192b 100644 --- a/mysql-test/t/partition_datatype.test +++ b/mysql-test/t/partition_datatype.test @@ -217,11 +217,13 @@ select * from t1 where a = 'bbbb'; drop table t1; -- error ER_PARTITION_FIELDS_TOO_LONG create table t1 (a varchar(3070)) partition by key (a); --- error ER_TOO_BIG_ROWSIZE +-- error ER_PARTITION_FIELDS_TOO_LONG +create table t1 (a varchar(65532) not null) partition by key (a); +-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR create table t1 (a varchar(65533)) partition by key (a); --- error ER_TOO_BIG_ROWSIZE +-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR create table t1 (a varchar(65534) not null) partition by key (a); --- error ER_TOO_BIG_ROWSIZE +-- error ER_BLOB_FIELD_IN_PART_FUNC_ERROR create table t1 (a varchar(65535)) partition by key (a); # diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 66cd173d5128907e27f60fbb5b80b55844ed31af..6eed931276c404ed09abca7cd4c2c421c836b120 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3731,4 +3731,133 @@ deallocate prepare stmt2; drop table t1; +--echo # +--echo # MDEV-9208: Function->Function->View = Mysqld segfault +--echo # (Server crashes in Dependency_marker::visit_field on 2nd +--echo # execution with merged subquery) +--echo # + +CREATE TABLE t1 (i1 INT); +insert into t1 values(1),(2); + +CREATE TABLE t2 (i2 INT); +insert into t2 values(1),(2); + +prepare stmt from " + select 1 from ( + select + if (i1<0, 0, 0) as f1, + (select f1) as f2 + from t1, t2 + ) sq +"; + +execute stmt; +execute stmt; + +drop table t1,t2; + +--echo # +--echo # MDEV-9619: Assertion `null_ref_table' failed in virtual +--echo # table_map Item_direct_view_ref::used_tables() const on 2nd +--echo # execution of PS +--echo # + +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); + +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); + +PREPARE stmt FROM "SELECT * FROM v1 WHERE f1 = SOME ( SELECT f2 FROM t2 )"; +EXECUTE stmt; +EXECUTE stmt; +insert into t1 values ('c'); +EXECUTE stmt; +EXECUTE stmt; + +deallocate prepare stmt; +drop view v1; +drop table t1,t2; + +CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('a'),('b'); + +CREATE TABLE t2 (f2 VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('c'),('d'); + +PREPARE stmt FROM "SELECT * FROM v1 WHERE (f1,f1) = SOME ( SELECT f2,f2 FROM t2 )"; +EXECUTE stmt; +EXECUTE stmt; +insert into t1 values ('c'); +EXECUTE stmt; +EXECUTE stmt; + +deallocate prepare stmt; +drop view v1; +drop table t1,t2; + + + +CREATE TABLE t1 (column1 INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(9); + +CREATE TABLE t2 (column2 INT) ENGINE=MyISAM; + +INSERT INTO t2 VALUES (1),(4); + +CREATE TABLE t3 (column3 INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (6),(8); + +CREATE TABLE t4 (column4 INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (2),(5); + +PREPARE stmt FROM " +SELECT ( + SELECT MAX( table1.column1 ) AS field1 + FROM t1 AS table1 + WHERE (111,table3.column3) IN ( SELECT 111,table2.column2 AS field2 FROM t2 AS table2 ) +) AS sq +FROM t3 AS table3, t4 AS table4 GROUP BY sq +"; + +EXECUTE stmt; +EXECUTE stmt; + +deallocate prepare stmt; +drop table t1,t2,t3,t4; + +create table t1 (a int, b int, c int); +create table t2 (x int, y int, z int); +create table t3 as select * from t1; +insert into t1 values (1,2,3),(4,5,6),(100,200,300),(400,500,600); +insert into t2 values (1,2,3),(7,8,9),(100,200,300),(400,500,600); +insert into t3 values (1,2,3),(11,12,13),(100,0,0),(400,500,600); + + +set @optimizer_switch_save=@@optimizer_switch; +set @join_cache_level_save=@@join_cache_level; +set optimizer_switch='materialization=off'; +set join_cache_level=0; +select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z); +prepare stmt from "select * from t1 where (select a,b from t3 where t3.c=t1.c) in (select x,y from t2 where t1.c= t2.z)"; +EXECUTE stmt; +EXECUTE stmt; + +create view v1 as select * from t1; +create view v2 as select * from t2; +create view v3 as select * from t3; +select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z); +prepare stmt from "select * from v1 where (select a,b from v3 where v3.c=v1.c) in (select x,y from v2 where v1.c= v2.z)"; +EXECUTE stmt; +EXECUTE stmt; +set optimizer_switch=@optimizer_switch_save; +set join_cache_level=@join_cache_level_save; + +deallocate prepare stmt; +drop view v1,v2,v3; +drop table t1,t2,t3; + --echo # End of 5.5 tests diff --git a/mysql-test/t/range_vs_index_merge.test b/mysql-test/t/range_vs_index_merge.test index 5d12d46c9e9b7e6793b2856882a169cbf9400f9f..84b87579e85929520fa7c65f77faed3f6db30c16 100644 --- a/mysql-test/t/range_vs_index_merge.test +++ b/mysql-test/t/range_vs_index_merge.test @@ -1241,6 +1241,59 @@ WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 DROP TABLE t1; +--echo # +--echo # mdev-11574: do not build index merge of two indexes when +--echo # one index is an infix of the other index +--echo # + +set names utf8; + +CREATE DATABASE world; + +use world; + +--source include/world_schema.inc + +--disable_query_log +--disable_result_log +--disable_warnings +--source include/world.inc +--enable_warnings +--enable_result_log +--enable_query_log + +DROP INDEX Country ON City; +CREATE INDEX CountryName ON City(Country,Name); +CREATE INDEX Name ON City(Name); + +--disable_query_log +--disable_result_log +--disable_warnings +ANALYZE TABLE City; +--enable_warnings +--enable_result_log +--enable_query_log + +let $q= +select * from City +where + Country='FIN' AND Name IN ('Lahti','Imatra') OR + Country='RUS' AND Name IN ('St Petersburg', 'Moscow') OR + Country='SWE' AND Name IN ('Stockholm', 'Uppsala') OR + Country='DEU' AND Name IN ('Berlin', 'Bonn') OR + Country='BEL' AND Name IN ('Antwerpen', 'Gent') OR + Country='PRT' AND Name IN ('Braga', 'Porto') OR + Country='FRA' AND Name IN ('Paris', 'Marcel') OR + Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR + Country='NOR' AND Name IN ('Oslo', 'Bergen') OR + Country='ITA' AND Name IN ('Napoli', 'Venezia'); + +eval $q; +eval explain $q; + + +DROP DATABASE world; + #the following command must be the last one in the file set session optimizer_switch='index_merge_sort_intersection=default'; diff --git a/mysql-test/t/read_only.test b/mysql-test/t/read_only.test index cd556684e4c7dc6b0df8d07889a0bc8bc4580a46..6b608dacf26a1a730b4e589a3b95a675167a2bf4 100644 --- a/mysql-test/t/read_only.test +++ b/mysql-test/t/read_only.test @@ -118,6 +118,11 @@ drop table t1; --error ER_OPTION_PREVENTS_STATEMENT insert into t1 values(1); +# +# MDEV-14056 DROP TEMPORARY TABLE IF EXISTS causes error 1290 with read_only option +# +drop temporary table if exists t1; + # # Bug#11733 COMMITs should not happen if read-only is set # diff --git a/mysql-test/t/show_function_with_pad_char_to_full_length.test b/mysql-test/t/show_function_with_pad_char_to_full_length.test new file mode 100644 index 0000000000000000000000000000000000000000..f47f36294d4be193ac6b3bba2e5dda847fa03a74 --- /dev/null +++ b/mysql-test/t/show_function_with_pad_char_to_full_length.test @@ -0,0 +1,23 @@ +# +# Test that show function status succeeds with +# sql_mode = 'PAD_CHAR_TO_FULL_LENGTH (MDEV-13149) + +# show function status + +create function f() returns int return 1; +--replace_column 1 T 3 T 4 T 5 T 6 T 7 T 8 T 9 T 10 T 11 T +show function status; +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +--replace_column 1 T 3 T 4 T 5 T 6 T 7 T 8 T 9 T 10 T 11 T +show function status; +drop function f; +select @@sql_mode; + +# select ROUTINE_NAME from information_schema.ROUTINES + +create function f() returns int return 1; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +set sql_mode = 'PAD_CHAR_TO_FULL_LENGTH'; +select ROUTINE_NAME from information_schema.ROUTINES where ROUTINE_NAME='f'; +drop function f; +select @@sql_mode; diff --git a/mysql-test/t/subselect_exists2in.test b/mysql-test/t/subselect_exists2in.test index a4fdbe5c50b4faad2a6f97eb6603dc927d4f8665..5a8ddb3612f68e18998f51702c94874c26edae45 100644 --- a/mysql-test/t/subselect_exists2in.test +++ b/mysql-test/t/subselect_exists2in.test @@ -786,6 +786,46 @@ set optimizer_switch= @optimizer_switch_save; DROP TABLE t1; +--echo # +--echo # MDEV-14164: Unknown column error when adding aggregate to function +--echo # in oracle style procedure FOR loop +--echo # + +CREATE TABLE t1(id INT, val INT); +DELIMITER //; +CREATE PROCEDURE p1() +BEGIN + DECLARE cur1 CURSOR FOR SELECT * FROM ( + SELECT DISTINCT id FROM t1) a + WHERE NOT EXISTS (SELECT * FROM ( SELECT id FROM t1) b + WHERE a.id=b.id); + OPEN cur1; + CLOSE cur1; + OPEN cur1; + CLOSE cur1; +END; +// +DELIMITER ;// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; + +CREATE TABLE t1(id INT, val INT); +DELIMITER //; +CREATE PROCEDURE p1() +BEGIN + SELECT * FROM (SELECT DISTINCT id FROM t1) a + WHERE NOT a.id IN (SELECT b.id FROM t1 b); + SELECT * FROM (SELECT DISTINCT id FROM t1) a + WHERE NOT EXISTS (SELECT * FROM t1 b WHERE a.id=b.id); +END; +// +DELIMITER ;// +CALL p1(); +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; + --echo # End of 10.0 tests #restore defaults diff --git a/mysql-test/t/subselect_mat_cost_bugs.test b/mysql-test/t/subselect_mat_cost_bugs.test index 35f2b9588fe674213da97b5e55f56722dbd6d754..67af6e3a54a9bf8f7604ae762174fcd6f363af93 100644 --- a/mysql-test/t/subselect_mat_cost_bugs.test +++ b/mysql-test/t/subselect_mat_cost_bugs.test @@ -522,4 +522,23 @@ select * from t1 where a in (select max(a) from t1 where a < 4) or a > 5; drop table t1; +--echo # +--echo # MDEV-13135: subquery with ON expression subject to +--echo # semi-join optimizations +--echo # + +CREATE TABLE t1 (a INT); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a AS v_a FROM t1; +INSERT INTO t1 VALUES (1),(3); + +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (3),(4); + +SELECT * FROM t1 WHERE a NOT IN ( + SELECT b FROM t2 INNER JOIN v1 ON (b IN ( SELECT a FROM t1 )) + WHERE v_a = b +); + +DROP VIEW v1; +DROP TABLE t1,t2; diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test index 2ca608e76fff4ecb44f0a54ef5e9ca910845ba19..01a610999bd2dae50aad8cdbdf0d0e8c39472d58 100644 --- a/mysql-test/t/type_bit.test +++ b/mysql-test/t/type_bit.test @@ -439,3 +439,22 @@ SELECT SUM(a) FROM t1 GROUP BY c, b, a; DROP TABLE t1; --echo End of 5.1 tests + +--echo # +--echo # Start of 10.1 tests +--echo # + +--echo # +--echo # MDEV-8867 Wrong field type or metadata for COALESCE(bit_column, 1) +--echo # + +CREATE TABLE t1 (val bit(1)); +INSERT INTO t1 VALUES (0); +CREATE TABLE t2 AS SELECT COALESCE(val, 1) AS c FROM t1; +SELECT * FROM t2; +SHOW CREATE TABLE t2; +DROP TABLE t2; +--enable_metadata +SELECT COALESCE(val, 1) FROM t1; +--disable_metadata +DROP TABLE t1; diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 63c89f318fc01fc70227b2239ce8f12abb1b3929..8248386a93fbd25db6dfd4fe087b361ec3272393 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -576,6 +576,15 @@ SELECT DATE(a), DATE(b), DATE(c) FROM t1; SELECT DATE(COALESCE(a)), DATE(COALESCE(b)), DATE(COALESCE(c)) FROM t1; DROP TABLE t1; +--echo # +--echo # MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison +--echo # + +CREATE TABLE t1 (d DATE); +INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24'); +SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END; +DROP TABLE t1; + --echo # --echo # End of 10.1 tests diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test index cc09069508f5d4b0bf9a13487ba1a9b1e7470a02..edf60927a326d35349372d280162ee8dad5931af 100644 --- a/mysql-test/t/type_varchar.test +++ b/mysql-test/t/type_varchar.test @@ -219,7 +219,51 @@ SELECT 5 = a FROM t1; DROP TABLE t1; --echo # ---echo # Start of 10.0 tests +--echo # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 +--echo # + +CREATE TABLE t1 (c1 VARBINARY(65532)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65533)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65534)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65535)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARBINARY(65536)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65532)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65533)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65534)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65535)); +DESCRIBE t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 VARCHAR(65536)); +DESCRIBE t1; +DROP TABLE t1; + +--echo # +--echo # End of 5.5 tests --echo # --echo # diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index d01d922ef3cced3fcb4b6884cfa7fec4199b1274..ac6b94102d78d155dd8493829ab0154e786ea70c 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1,3 +1,4 @@ +--source include/have_partition.inc --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index 3e7c9b78673d405dfbde4ce26184732a0f246880..371fcb72b0d1353e915985c7c532d0617476a7cd 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -674,9 +674,7 @@ SELECT ExtractValue('xxx','/a/b'); --echo # Bug#58175 xml functions read initialized bytes when conversions happen --echo # SET NAMES latin1; ---enable_prepare_warnings SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); ---disable_prepare_warnings --echo # --echo # Bug#12375190: UPDATEXML CRASHES ON SIMPLE INPUTS diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index cf99f822dfc867d354ef9d4eadec7f074f1424c4..b5f8f9fffb9d890f80c946fd9f644c1feb10a5f3 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,72 +23,83 @@ # ############################################################################## -main.alter_table : Modified in 10.1.27 +main.alter_table : Modified in 10.1.29 main.alter_table_trans : MDEV-12084 - timeout -main.analyze_format_json : MDEV-11866 - Wrong result -main.analyze_stmt_orderby : MDEV-11866 - Wrong result main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result -main.binary_to_hex : Added in 10.1.26 +main.bootstrap : Include files modified in 10.1.29 +main.case : Modified in 10.1.29 main.count_distinct : Modified in 10.1.27 main.create_delayed : MDEV-10605 - failed with timeout -main.create_drop_event : Modified in 10.1.26 +main.ctype_gbk : Modified in 10.1.29 +main.ctype_latin1 : Modified in 10.1.29 +main.ctype_ucs : Modified in 10.1.29 main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.ctype_utf8 : Modified in 10.1.27 -main.drop-no_root : MDEV-12633 - Valgrind warnings -main.errors : Modified in 10.1.26 +main.ctype_utf32 : Modified in 10.1.29 +main.ctype_utf8 : Modified in 10.1.29 +main.delete_returning : Modified in 10.1.29 +main.delimiter_command_case_sensitivity : Added in 10.1.29 +main.events_2 : MDEV-13277 - Server crash main.events_bugs : MDEV-12892 - Crash in fill_schema_processlist main.events_restart : MDEV-12236 - Server shutdown problem -main.func_misc : Modified in 10.1.27 -main.func_regexp_pcre : MDEV-13412 - Crash; modified in 10.1.26 -main.gis : Modified in 10.1.26 -main.gis-rt-precise : Modified in 10.1.26 -main.group_by : Modified in 10.1.26 +main.func_in : Modified in 10.1.29 +main.func_misc : Modified in 10.1.29 +main.func_regexp_pcre : Modified in 10.1.29 +main.func_time : Modified in 10.1.29 +main.gis-precise : Modified in 10.1.29 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind +main.information_schema : Modified in 10.1.29 main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure main.insert : Modified in 10.1.27 main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist -main.loadxml : Data file modified in 10.1.26 main.log_tables-big : Modified in 10.1.27 main.mdev-504 : MDEV-10607 - sporadic "can't connect" +main.mdev13607 : Added in 10.1.29 main.mdev375 : MDEV-10607 - sporadic "can't connect" main.merge : MDEV-10607 - sporadic "can't connect" -main.mysqlcheck : MDEV-12633 - Valgrind warnings +main.myisam : Modified in 10.1.29 +main.mysql_upgrade_noengine : MDEV-14355 - Plugin is busy +main.mysqlbinlog : Modified in 10.1.29 main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha -main.mysql_client_test : MDEV-12633 - Valgrind warnings -main.mysql_client_test_comp : MDEV-12633 - Valgrind warnings -main.mysql_client_test_nonblock : MDEV-12633 - Valgrind warnings -main.mysql_upgrade : Modified in 10.1.26 main.old-mode : Modified in 10.1.27 -main.openssl_1 : Modified in 10.1.26 -main.openssl_6975 : Modified in 10.1.26 main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan +main.partition_datatype : Modified in 10.1.29 +main.partition_example : Include files modified in 10.1.29 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_symlink : Modified in 10.1.27 -main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count +main.plugin : Include files modified in 10.1.29 +main.plugin_innodb : Include files modified in 10.1.29 +main.plugin_load : Include files modified in 10.1.29 +main.plugin_load_option : Include files modified in 10.1.29 +main.plugin_maturity : Include files modified in 10.1.29 +main.plugin_not_embedded : Include files modified in 10.1.29 +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.1.29 main.query_cache : MDEV-12895 - Wrong result +main.range_vs_index_merge : Modified in 10.1.29 main.range_vs_index_merge_innodb : MDEV-12637 - Timeout -main.read_only : Modified in 10.1.26 -main.repair_symlink-5543 : MDEV-12215 - Wrong error codes +main.read_only : Modified in 10.1.29 main.set_statement : MDEV-13183 - Wrong result -main.show_check : MDEV-12633 - Valgrind warnings main.show_explain : MDEV-10674 - sporadic failure +main.show_function_with_pad_char_to_full_length : Added in 10.1.29 main.sp : Modified in 10.1.27 main.sp-security : MDEV-10607 - sporadic "can't connect" -main.ssl : Modified in 10.1.26 main.status : MDEV-8510 - sporadic wrong result -main.subselect : Modified in 10.1.26 +main.subselect_exists2in : Modified in 10.1.29 main.subselect_innodb : MDEV-10614 - sporadic wrong results -main.subselect_nulls : Modified in 10.1.26 +main.subselect_mat_cost_bugs : Modified in 10.1.29 main.symlink : Modified in 10.1.27 -main.symlink-aria-11902 : MDEV-12215 - Unexpected errors -main.symlink-myisam-11902 : MDEV-12215 - Unexpected errors +main.table_options-5867 : Include files modified in 10.1.29 main.tc_heuristic_recover : Added in 10.1.27 +main.truncate_badse : Include files modified in 10.1.29 +main.type_bit : Modified in 10.1.29 +main.type_date : Modified in 10.1.29 main.type_datetime_hires : MDEV-10687 - timeout -main.union : Modified in 10.1.26 -main.view : Modified in 10.1.27 +main.type_varchar : Modified in 10.1.29 +main.user_var : Modified in 10.1.29 +main.view : Modified in 10.1.29 +main.xml : Modified in 10.1.29 #---------------------------------------------------------------- @@ -98,9 +109,7 @@ archive.discover : MDEV-10510 - table is marked as crashed binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_parallel_replication_marks_row : Added in 10.1.26 -binlog.binlog_parallel_replication_marks_stm_mix : Added in 10.1.26 -binlog.binlog_unsafe : Modified in 10.1.26 +binlog.binlog_spurious_ddl_errors : Include files modified in 10.1.29 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint #---------------------------------------------------------------- @@ -109,6 +118,7 @@ binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint binlog_encryption.encrypted_master : MDEV-12906 - Failed to sync binlog_encryption.rpl_parallel : MDEV-10653 - Timeout binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result, MDEV-11673 - Valgrind warning +binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query #---------------------------------------------------------------- @@ -118,19 +128,19 @@ connect.infoschema-9739 : Modified in 10.1.27 connect.infoschema2-9739 : Added in 10.1.27 connect.jdbc_new : Modified in 10.1.27 connect.json : Modified in 10.1.27 -connect.json_java_2 : Added in 10.1.27 -connect.json_java_3 : Added in 10.1.27 -connect.json_mongo_c : Added in 10.1.27 +connect.json_java_2 : Include file modified in 10.1.29 +connect.json_java_3 : Include file modified in 10.1.29 +connect.json_mongo_c : Include file modified in 10.1.29 connect.json_udf : Modified in 10.1.27 connect.json_udf_bin : Modified in 10.1.27 -connect.mongo_c : Added in 10.1.27 -connect.mongo_java_2 : Added in 10.1.27 -connect.mongo_java_3 : Added in 10.1.27 +connect.mongo_c : Include file modified in 10.1.29 +connect.mongo_java_2 : Include file modified in 10.1.29 +connect.mongo_java_3 : Include file modified in 10.1.29 connect.mul_new : Added in 10.1.27 connect.mysql_exec : Modified in 10.1.27 connect.mysql_new : Modified in 10.1.27 connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results; modified in 10.1.27 -connect.tbl_thread : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results; added in 10.1.27 +connect.tbl_thread : MDEV-9844, MDEV-10179, MDEV-14214 - sporadic crashes, valgrind warnings, wrong results; added in 10.1.27 connect.unsigned : Modified in 10.1.27 connect.upd : Modified in 10.1.27 connect.xml : Modified in 10.1.27 @@ -150,17 +160,21 @@ connect.zip : MDEV-13884 - Wrong result; modified in 10.1.27 #---------------------------------------------------------------- encryption.create_or_replace : MDEV-9359 - Assertion failure, MDEV-13516 - Assertion failure +encryption.debug_key_management : MDEV-13841 - Timeout on wait condition encryption.encrypt_and_grep : MDEV-13765 - Wrong result +encryption.encryption_force : Modified in 10.1.29 +encryption.filekeys_encfile : Include file modified in 10.1.29 +encryption.filekeys_encfile_file : Include file modified in 10.1.29 encryption.innodb-bad-key-change2 : MDEV-12632 - Valgrind warnings -encryption.innochecksum : Modified in 10.1.26 encryption.innodb-discard-import-change : MDEV-12632 - Valgrind warnings encryption.innodb_encryption : Modified in 10.1.27 +encryption.innodb-encryption-alter : Modified in 10.1.29 encryption.innodb_encryption_discard_import : MDEV-12903 - Wrong result encryption.innodb_encryption_filekeys : MDEV-9962 - timeouts encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_tables : MDEV-9359 - Assertion failure encryption.innodb_first_page : MDEV-10689 - crashes -encryption.innodb-first-page-read : MDEV-13181 - Signal 8; modified in 10.1.27 +encryption.innodb-first-page-read : MDEV-14356 - Timeout on wait condition encryption.innodb_lotoftables : MDEV-11531 - InnoDB error; modified in 10.1.27 encryption.innodb-missing-key : MDEV-9359 - assertion failure encryption.innodb-page_encryption : MDEV-10641 - mutex problem @@ -168,7 +182,6 @@ encryption.innodb-redo-badkey : MDEV-12898 - Server hang on startu 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.second_plugin-12863 : Added in 10.1.26 #---------------------------------------------------------------- @@ -182,7 +195,6 @@ federated.federated_innodb : MDEV-10617, MDEV-10417 - Wrong checksum, time federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips federated.federatedx : MDEV-10617 - Wrong checksum, timeouts -federated.net_thd_crash-12725 : Added in 10.1.26 #---------------------------------------------------------------- @@ -211,55 +223,72 @@ galera.MW-328A : MDEV-13876 - Wrong result #---------------------------------------------------------------- -innodb.101_compatibility : Modified in 10.1.26 innodb.alter_rename_existing : Added in 10.1.27 innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.create-index-debug : Added in 10.1.27 -innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server +innodb.doublewrite : MDEV-12905, MDEV-14205 - Lost connection to MySQL server innodb.index_tree_operation : Added in 10.1.27 -innodb.innodb-32k : Option file modified in 10.1.26 -innodb.innodb-32k-crash : Option file modified in 10.1.26 -innodb.innodb-64k : Modified in 10.1.26 +innodb.innodb-16k : Modified in 10.1.29 +innodb.innodb-32k : Modified in 10.1.29 +innodb.innodb-64k : Modified in 10.1.29 innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup -innodb.innodb-alter : Added in 10.1.27 +innodb.innodb-alter : Modified in 10.1.29 innodb.innodb-alter-autoinc : Added in 10.1.27 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS -innodb.innodb-alter-table : MDEV-10619 - Testcase timeout +innodb.innodb-alter-table : MDEV-10619 - Testcase timeout; modified in 10.1.29 innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb_bug14147491 : MDEV-11808 - wrong error codes innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan innodb.innodb-enlarge-blob : Modified in 10.1.27 innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown +innodb.innodb-get-fk : Modified in 10.1.29 innodb.innodb-index-debug : Added in 10.1.27 innodb.innodb-index-online : Added in 10.1.27 innodb.innodb-index-online-delete : Added in 10.1.27 innodb.innodb-index-online-fk : Added in 10.1.27 innodb.innodb-index-online-purge : Added in 10.1.27 -innodb.innodb_max_recordsize_32k : Added in 10.1.26 -innodb.innodb_max_recordsize_64k : Added in 10.1.26 +innodb.innodb-page_compression_lzma : MDEV-14353 - wrong result on Fedora 25 +innodb.innodb-page_compression_tables : Modified in 10.1.29 innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result -innodb.innodb-table-online : Added in 10.1.27 -innodb.innodb-wl5980-alter : Added in 10.1.27 -innodb.innodb_zip_innochecksum : Added in 10.1.26 +innodb.innodb-table-online : Modified in 10.1.29 +innodb.innodb-wl5522-debug : Modified in 10.1.29 +innodb.innodb-wl5980-alter : Modified in 10.1.29 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.innodb_zip_innochecksum3 : Added in 10.1.26 innodb.log_data_file_size : Modified in 10.1.27 +innodb.table_definition_cache_debug : MDEV-14206 - Extra warning; modified in 10.1.29 +innodb.table_flags : MDEV-14363 - Operating system error number 2 +innodb.undo_log : Modified in 10.1.29 innodb.xa_recovery : Modified in 10.1.27 +innodb_fts.concurrent_insert : Added in 10.1.29 +innodb_fts.fulltext : Modified in 10.1.29 innodb_fts.fulltext_misc : MDEV-12636 - Valgrind warnings +innodb_zip.innodb_prefix_index_liftedlimit : Modified in 10.1.29 +innodb_zip.wl5522_debug_zip : Added in 10.1.29 + +#---------------------------------------------------------------- + +maria.maria : Modified in 10.1.29 #---------------------------------------------------------------- mariabackup.apply-log-only : Added in 10.1.27 mariabackup.apply-log-only-incr : Added in 10.1.27 mariabackup.auth_plugin_win : Added in 10.1.27 +mariabackup.compress_qpress : Added in 10.1.29 +mariabackup.data_directory : Added in 10.1.29 +mariabackup.incremental_backup : Modified in 10.1.29 +mariabackup.partition_datadir : Added in 10.1.29 mariabackup.xb_aws_key_management : Modified in 10.1.27 #---------------------------------------------------------------- +mroonga.* : Many tests and include files added and modified in 10.1.29 +mroonga/storage.* : Many tests and include files added and modified in 10.1.29 + mroonga/storage.column_datetime_32bit_2038 : Wrong result on Alpha mroonga/storage.column_datetime_32bit_before_unix_epoch : Wrong result on Alpha mroonga/storage.column_datetime_32bit_max : Wrong result on Alpha @@ -280,7 +309,8 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h #---------------------------------------------------------------- -parts.longname : Added in 10.1.26 +parts.partition_alter_maria : Added in 10.1.29 +parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query parts.partition_exch_myisam_innodb : Modified in 10.1.27 parts.partition_exch_qa_10 : Include files modified in 10.1.27 parts.partition_exch_qa_11 : Include files modified in 10.1.27 @@ -296,7 +326,7 @@ parts.partition_innodb_status_file : MDEV-12901 - Valgrind perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x -perfschema.privilege_table_io : MDEV-13184 - Extra lines; modified in 10.1.26 +perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.setup_actors : MDEV-10679 - rare crash perfschema.socket_summary_by_event_name_func : MDEV-10622 - Socket summary tables do not match perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders @@ -306,12 +336,15 @@ perfschema.threads_mysql : MDEV-10677 - sporadic wrong resul #---------------------------------------------------------------- plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url -plugins.server_audit : MDEV-9562 - crashes on sol10-sparc -plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc +plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.1.29 +plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.1.29 + +#---------------------------------------------------------------- + +roles.definer : Modified in 10.1.29 #---------------------------------------------------------------- -rpl.circular_serverid0 : Added in 10.1.26 rpl.last_insert_id : MDEV-10625 - warnings in error log rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips @@ -319,13 +352,8 @@ rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master rpl.rpl_checksum_cache : MDEV-12173 - Unexpected error rpl.rpl_ddl : MDEV-10417 - Fails on Mips +rpl.rpl_domain_id_filter_io_crash : MDEV-14357 - Wrong result rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result -rpl.rpl_extra_col_master_innodb : Include file modified in 10.1.26 -rpl.rpl_extra_col_master_myisam : Include file modified in 10.1.26 -rpl.rpl_extra_col_slave_innodb : Include file modified in 10.1.26 -rpl.rpl_extra_col_slave_myisam : Include file modified in 10.1.26 -rpl.rpl_filter_tables_dynamic : Include file modified in 10.1.26 -rpl.rpl_filter_tables_not_exist : Include file modified in 10.1.26 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings @@ -334,42 +362,36 @@ rpl.rpl_gtid_until : MDEV-10625 - warnings in error log rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips -rpl.rpl_loaddata : Include file modified in 10.1.26 -rpl.rpl_loaddata_fatal : Include file modified in 10.1.26 rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts, fails on Mips -rpl.rpl_mdev-11092 : Include file modified in 10.1.26 -rpl.rpl_mixed_binlog_max_cache_size : Include file modified in 10.1.26 -rpl.rpl_old_decimal : Include file modified in 10.1.26 rpl.rpl_parallel : MDEV-10653 - Timeouts rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure -rpl.rpl_parallel_optimistic : MDEV-10511 - timeout; modified in 10.1.26 +rpl.rpl_parallel_optimistic : MDEV-10511 - timeout rpl.rpl_parallel_retry : MDEV-11119 - Server crash rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings -rpl.rpl_reset_slave_fail : Added in 10.1.26 -rpl.rpl_rotate_logs : Include file modified in 10.1.26 -rpl.rpl_row_binlog_max_cache_size : Include file modified in 10.1.26 +rpl.rpl_plugin_load : Include files modified in 10.1.29 +rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed rpl.rpl_row_img_eng_min : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_loaddata_concurrent : Include file modified in 10.1.26 +rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_log_innodb : MDEV-10688 - Wrong result rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_row_tabledefs_2myisam : Include file modified in 10.1.26 -rpl.rpl_row_tabledefs_3innodb : Include file modified in 10.1.26 rpl.rpl_semi_sync : MDEV-11220 - 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_uninstall_plugin : MDEV-7140 - Wrong plugin status, MDEV-10892 - Assertion failure +rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock rpl.rpl_sp_variables : Added in 10.1.27 -rpl.rpl_stm_000001 : Include file modified in 10.1.26 -rpl.rpl_stm_binlog_max_cache_size : Include file modified in 10.1.26 -rpl.rpl_stm_loaddata_concurrent : Include file modified in 10.1.26 +rpl.rpl_start_stop_slave : MDEV-13567 - Replication failure +rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion rpl.rpl_sync : MDEV-10633 - Database page corruption +rpl.rpl_table_options : Include files modified in 10.1.29 rpl.rpl_temporal_format_mariadb53_to_mysql56_dst : Added in 10.1.27 rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result @@ -408,8 +430,12 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #---------------------------------------------------------------- sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x +sys_vars.explicit_defaults_for_timestamp_off : Include file modified in 10.1.29 +sys_vars.explicit_defaults_for_timestamp_on : Include file modified in 10.1.29 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout -sys_vars.innodb_buffer_pool_dump_pct_basic : MDEV-10651 - sporadic failure on file_exists +sys_vars.innodb_buffer_pool_dump_now_basic : Modified in 10.1.29 +sys_vars.innodb_buffer_pool_dump_pct_basic : Modified in 10.1.29 +sys_vars.innodb_buffer_pool_load_now_basic : Modified in 10.1.29 sys_vars.innodb_fatal_semaphore_wait_threshold : MDEV-10513 - crashes sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results @@ -428,54 +454,18 @@ 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 tokudb.dir_per_db : MDEV-11537 - Wrong result; modified in 10.1.27 +tokudb.dir_per_db_rename_to_nonexisting_schema : MDEV-14359 - Directory not empty tokudb.hotindex-insert-bigchar : MDEV-12640 - Crash +tokudb.hotindex-insert-1 : MDEV-13870 - Lost connection to MySQL server tokudb.hotindex-update-1 : MDEV-12640 - Crash -tokudb.kill_query_blocked_in_lt : Added in 10.1.26 -tokudb.locks-select-update-3 : Modified in 10.1.26 tokudb.rows-32m-rand-insert : MDEV-12640 - Crash tokudb.rows-32m-seq-insert : MDEV-12640 - Crash -tokudb_backup.rpl_safe_slave : Include file modified in 10.1.26 - tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output tokudb_bugs.xa : MDEV-11804 - Lock wait timeout tokudb_mariadb.mdev6657 : MDEV-12737 - Wrong plan, valgrind warnings -tokudb_mariadb.mdev12972 : Added in 10.1.26 - -rpl-tokudb.rpl_extra_col_master_tokudb : Include file modified in 10.1.26 -rpl-tokudb.rpl_extra_col_slave_tokudb : Include file modified in 10.1.26 -rpl-tokudb.rpl_not_null_tokudb : Modified in 10.1.26 -rpl-tokudb.rpl_parallel_tokudb_delete_pk : Option file modified in 10.1.26 -rpl-tokudb.rpl_parallel_tokudb_update_pk_uc0_lookup0 : Modified in 10.1.26 -rpl-tokudb.rpl_parallel_tokudb_write_pk : Modified in 10.1.26 -rpl-tokudb.rpl_rfr_disable_on_expl_pk_absence : Added in 10.1.26 -rpl-tokudb.rpl_row_basic_3tokudb : Modified in 10.1.26 -rpl-tokudb.rpl_row_tabledefs_3tokudb : Include file modified in 10.1.26 -rpl-tokudb.rpl_tokudb_commit_after_flush : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_insert_id : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_insert_id_pk : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_multi_update : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_multi_update2 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_multi_update3 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_rfr_partition_table : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_crash_safe : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_blobs : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_eng_full : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_eng_min : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_eng_noblob : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_idx_full : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_idx_min : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_img_idx_noblob : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_log : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_lower_case_table_names : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_sp003 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_sp006 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_row_trig004 : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_stm_log : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_stm_mixed_crash_safe : Added in 10.1.26 -rpl-tokudb.rpl_tokudb_stm_mixed_lower_case_table_names : Added in 10.1.26 #---------------------------------------------------------------- @@ -486,11 +476,12 @@ unit.ma_test_loghandler : MDEV-10638 - record read not ok vcol.not_supported : MDEV-10639 - Testcase timeout vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout +vcol.vcol_misc : Modified in 10.1.29 #---------------------------------------------------------------- wsrep.binlog_format : MDEV-11532 - WSREP has not yet prepared node -wsrep.mdev_6832 : Option file changed in 10.1.27 +wsrep.mdev_6832 : MDEV-14195 - Failure upon check-testcase; option file changed in 10.1.27 wsrep.mdev_7798 : Option file changed in 10.1.27 wsrep.pool_of_threads : MDEV-12234 - Library problem on Power diff --git a/mysys/my_new.cc b/mysys/my_new.cc index 4266452da43610d372ce66cad774d43bdd0a2939..a401ccff1354fe27fb478b9c9fe65b1758775094 100644 --- a/mysys/my_new.cc +++ b/mysys/my_new.cc @@ -47,6 +47,11 @@ void* operator new[](std::size_t sz, const std::nothrow_t&) throw() return (void *) my_malloc (sz ? sz : 1, MYF(0)); } +void operator delete (void *ptr, std::size_t) +{ + my_free(ptr); +} + void operator delete (void *ptr) { my_free(ptr); @@ -57,6 +62,11 @@ void operator delete[] (void *ptr) throw () my_free(ptr); } +void operator delete[] (void *ptr, std::size_t) throw () +{ + my_free(ptr); +} + void operator delete(void* ptr, const std::nothrow_t&) throw() { my_free(ptr); diff --git a/pcre/CMakeLists.txt b/pcre/CMakeLists.txt index 30b06a46fef51b2d0c2c5140d5894a4be920c916..31d4358f14d7564492ae0212789f57f11e134a68 100644 --- a/pcre/CMakeLists.txt +++ b/pcre/CMakeLists.txt @@ -128,9 +128,9 @@ SET(PCREGREP_BUFSIZE "20480" CACHE STRING SET(PCRE_NEWLINE "LF" CACHE STRING "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).") -# MARIADB: Changed the default from OFF to ON as pcre_test.bat on Windows -# MARIADB: fails complaining about too small stack size on Windows. -SET(PCRE_NO_RECURSE ON CACHE BOOL +# Windows has much smaller stack (pcre recursion limit of 112, vs +# 250-500 on Linuxes) +SET(PCRE_NO_RECURSE "${WIN32}" CACHE BOOL "If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c index 70ac2fea38178ce3d6a47d94b1fe235bbf5a4e88..fa84d924a4c6463e06b7ec4f30d475066d5d9399 100644 --- a/pcre/pcre_exec.c +++ b/pcre/pcre_exec.c @@ -509,6 +509,12 @@ Returns: MATCH_MATCH if matched ) these values are >= 0 (e.g. stopped by repeated call or recursion limit) */ +#ifdef __GNUC__ +static int +match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, + PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, + unsigned int rdepth) __attribute__((noinline,noclone)); +#endif static int match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, diff --git a/plugin/handler_socket/CMakeLists.txt b/plugin/handler_socket/CMakeLists.txt index a10743210e9a76400e409e02b28581a9fb278036..bd656ebc5b7115f9d5d31fd0b0ca60ba5e55e772 100644 --- a/plugin/handler_socket/CMakeLists.txt +++ b/plugin/handler_socket/CMakeLists.txt @@ -8,6 +8,12 @@ ENDIF() #Remove -fno-implicit-templates from compiler flags(handlersocket would not work with it) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +include(CheckCXXCompilerFlag) +check_cxx_compiler_flag(" -Wdeprecated-declarations" HAVE_CXX_WDEPRECATED_DECLARATIONS) +IF (HAVE_CXX_WDEPRECATED_DECLARATIONS) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") +ENDIF() + INCLUDE_DIRECTORIES(libhsclient) # Handlersocket client library. We do not distribute it, diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index 95ccb9607bf056cdad0636645c60ecc45e88e6bc..0a266ab19fe83c20d1849f69acc003c50331223f 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -15,7 +15,7 @@ #define PLUGIN_VERSION 0x104 -#define PLUGIN_STR_VERSION "1.4.2" +#define PLUGIN_STR_VERSION "1.4.3" #define _my_thread_var loc_thread_var @@ -1121,6 +1121,21 @@ do { \ } while(0) +#define ESC_MAP_SIZE 0x60 +static const char esc_map[ESC_MAP_SIZE]= +{ + 0, 0, 0, 0, 0, 0, 0, 0, 'b', 't', 'n', 0, 'f', 'r', 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, '\'', 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '\\', 0, 0, 0 +}; + +static char escaped_char(char c) +{ + return ((unsigned char ) c) >= ESC_MAP_SIZE ? 0 : esc_map[(unsigned char) c]; +} static void setup_connection_initdb(struct connection_info *cn, @@ -1327,21 +1342,16 @@ static size_t escape_string(const char *str, unsigned int len, const char *res_end= result + result_len - 2; while (len) { + char esc_c; + if (result >= res_end) break; - if (*str == '\'') - { - if (result+1 >= res_end) - break; - *(result++)= '\\'; - *(result++)= '\''; - } - else if (*str == '\\') + if ((esc_c= escaped_char(*str))) { if (result+1 >= res_end) break; *(result++)= '\\'; - *(result++)= '\\'; + *(result++)= esc_c; } else if (is_space(*str)) *(result++)= ' '; @@ -1430,19 +1440,12 @@ static size_t escape_string_hide_passwords(const char *str, unsigned int len, no_password: if (result >= res_end) break; - if (*str == '\'') + if ((b_char= escaped_char(*str))) { if (result+1 >= res_end) break; *(result++)= '\\'; - *(result++)= '\''; - } - else if (*str == '\\') - { - if (result+1 >= res_end) - break; - *(result++)= '\\'; - *(result++)= '\\'; + *(result++)= b_char; } else if (is_space(*str)) *(result++)= ' '; diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 2f9c18569e395a81ac1a30c27461daf5ecbc8fa0..880458c1517ccd7dc93d74fa10fcc69ac630985c 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -221,6 +221,11 @@ ELSE() SET(localstatedir ${MYSQL_DATADIR}) ENDIF() +SET(resolveip_locations "$basedir/${INSTALL_BINDIR} $basedir/bin") +SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin $basedir/bin") +SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english") +SET(pkgdata_locations "$basedir/${INSTALL_MYSQLSHAREDIR} $basedir/share $basedir/share/mysql") + IF(UNIX) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 364cc4fb9e0384b02f3a45843f54c69302384447..aad9ef5cc37c9b713babd0bd588346e31263eb2e 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -187,7 +187,7 @@ SET @skip_auth_anonymous=1;" ;; # Try to find a specific file within --basedir which can either be a binary # release or installed source directory and return the path. -find_in_basedir() +find_in_dirs() { case "$1" in --dir) @@ -199,13 +199,13 @@ find_in_basedir() for dir in "$@" do - if test -f "$basedir/$dir/$file" + if test -f "$dir/$file" then if test -n "$return_dir" then - echo "$basedir/$dir" + echo "$dir" else - echo "$basedir/$dir/$file" + echo "$dir/$file" fi break fi @@ -269,7 +269,7 @@ then print_defaults="$builddir/extra/my_print_defaults" elif test -n "$basedir" then - print_defaults=`find_in_basedir my_print_defaults bin extra` + print_defaults=`find_in_dirs my_print_defaults $basedir/bin $basedir/extra` if test -z "$print_defaults" then cannot_find_file my_print_defaults $basedir/bin $basedir/extra @@ -295,44 +295,46 @@ if test -n "$srcdir" then basedir="$builddir" bindir="$basedir/client" - extra_bindir="$basedir/extra" + resolveip="$basedir/extra/resolveip" mysqld="$basedir/sql/mysqld" langdir="$basedir/sql/share/english" srcpkgdatadir="$srcdir/scripts" buildpkgdatadir="$builddir/scripts" - scriptdir="$srcdir/scripts" elif test -n "$basedir" then - bindir="$basedir/bin" - extra_bindir="$bindir" - mysqld=`find_in_basedir mysqld libexec sbin bin` + bindir="$basedir/bin" # only used in the help text + resolveip=`find_in_dirs resolveip @resolveip_locations@` + if test -z "$resolveip" + then + cannot_find_file resolveip @resolveip_locations@ + exit 1 + fi + mysqld=`find_in_dirs mysqld @mysqld_locations@` if test -z "$mysqld" then - cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin + cannot_find_file mysqld @mysqld_locations@ exit 1 fi - langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english` + langdir=`find_in_dirs --dir errmsg.sys @errmsg_locations@` if test -z "$langdir" then - cannot_find_file errmsg.sys $basedir/share/english $basedir/share/mysql/english + cannot_find_file errmsg.sys @errmsg_locations@ exit 1 fi - srcpkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql` + srcpkgdatadir=`find_in_dirs --dir fill_help_tables.sql @pkgdata_locations@` buildpkgdatadir=$srcpkgdatadir if test -z "$srcpkgdatadir" then - cannot_find_file fill_help_tables.sql $basedir/share $basedir/share/mysql + cannot_find_file fill_help_tables.sql @pkgdata_locations@ exit 1 fi - scriptdir="$basedir/scripts" else basedir="@prefix@" bindir="@bindir@" - extra_bindir="$bindir" + resolveip="$bindir/resolveip" mysqld="@libexecdir@/mysqld" srcpkgdatadir="@pkgdatadir@" buildpkgdatadir="@pkgdatadir@" - scriptdir="@scriptdir@" fi # Set up paths to SQL scripts required for bootstrap @@ -376,14 +378,14 @@ hostname=`@HOSTNAME@` # Check if hostname is valid if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0 then - resolved=`"$extra_bindir/resolveip" $hostname 2>&1` + resolved=`"$resolveip" $hostname 2>&1` if test $? -ne 0 then - resolved=`"$extra_bindir/resolveip" localhost 2>&1` + resolved=`"$resolveip" localhost 2>&1` if test $? -ne 0 then echo "Neither host '$hostname' nor 'localhost' could be looked up with" - echo "'$extra_bindir/resolveip'" + echo "'$resolveip'" echo "Please configure the 'hostname' command to return a correct" echo "hostname." echo "If you want to solve this at a later stage, restart this script" @@ -391,7 +393,7 @@ then link_to_help exit 1 fi - echo "WARNING: The host '$hostname' could not be looked up with resolveip." + echo "WARNING: The host '$hostname' could not be looked up with $resolveip." echo "This probably means that your libc libraries are not 100 % compatible" echo "with this binary MariaDB version. The MariaDB daemon, mysqld, should work" echo "normally with the exception that host name resolving will not work." @@ -479,7 +481,7 @@ else echo "The problem could be conflicting information in an external" echo "my.cnf files. You can ignore these by doing:" echo - echo " shell> $scriptdir/scripts/mysql_install_db --defaults-file=~/.my.cnf" + echo " shell> $0 --defaults-file=~/.my.cnf" echo echo "You can also try to start the mysqld daemon with:" echo diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 5564f92a27cd6e9b7faccddd7f1750299b2431b1..bcaf7b86f5fbfa08d13943c3ba6bcd7fc486ed69 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -246,7 +246,7 @@ wsrep_recover_position() { local euid=$(id -u) local ret=0 - local wr_logfile=$(mktemp wsrep_recovery.XXXXXX) + local wr_logfile=$(mktemp /tmp/wsrep_recovery.XXXXXX) # safety checks if [ -z $wr_logfile ]; then @@ -268,7 +268,7 @@ wsrep_recover_position() { log_notice "WSREP: Running position recovery with $wr_options" - eval_log_error "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" + eval "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" if [ -z "$rp" ]; then diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 723fd311f8882ae41be944a3538e2451c016f69d..1ef4830661bc67bcd717c84c74af37a1179a98f6 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -256,18 +256,18 @@ parse_cnf() # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix - if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then + if [ -n $WSREP_SST_OPT_CONF_SUFFIX ]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group - if [[ -z $reval ]]; then + if [ -z $reval ]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value - if [[ -z $reval ]]; then - [[ -n $3 ]] && reval=$3 + if [ -z $reval ]; then + [ -n $3 ] && reval=$3 fi echo $reval } diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 78a7d76da09277bb3be2200f6bfd0d2e1ec723f8..faa7bc5e815a82d396d983c2223cbb11f0fb7325 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -37,7 +37,6 @@ REMOTEIP="" REMOTEHOST="" tca="" tcert="" -tpem="" tkey="" sockopt="" progress="" @@ -358,8 +357,7 @@ get_transfer() if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then wsrep_log_info "Decrypting with CERT: $tcert, KEY: $tkey" tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tcert},key=${tkey},verify=0${joiner_extra}${sockopt} stdio" - tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tpem},key=${tkey},verify=0${sockopt} stdio" - else + else wsrep_log_info "Encrypting with CERT: $tcert, KEY: $tkey" tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tcert},key=${tkey},verify=0${sockopt}" fi diff --git a/sql-common/client.c b/sql-common/client.c index b7796cebead26070337009b6f10ece3d71e8a551..ea686a79a1fd5d75c9988929ce8b344b1048a7d4 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1148,7 +1148,7 @@ void mysql_read_default_options(struct st_mysql_options *options, break; case OPT_pipe: options->protocol = MYSQL_PROTOCOL_PIPE; - break; + break; case OPT_connect_timeout: case OPT_timeout: if (opt_arg) diff --git a/sql/datadict.cc b/sql/datadict.cc index ee0d8805f955f635a6e056ea8877acb2eeab136c..f01d61f531be839becd3ce5ce3b389b58bcae673 100644 --- a/sql/datadict.cc +++ b/sql/datadict.cc @@ -45,6 +45,8 @@ static int read_string(File file, uchar**to, size_t length) engine_name is a LEX_STRING, where engine_name->str must point to a buffer of at least NAME_CHAR_LEN+1 bytes. + If engine_name is 0, then the function will only test if the file is a + view or not @retval FRMTYPE_ERROR error @retval FRMTYPE_TABLE table @@ -72,12 +74,23 @@ frm_type_enum dd_frm_type(THD *thd, char *path, LEX_STRING *engine_name) goto err; } + /* + We return FRMTYPE_TABLE if we can read the .frm file. This allows us + to drop a bad .frm file with DROP TABLE + */ type= FRMTYPE_TABLE; - if (!is_binary_frm_header(header) || !engine_name) + /* engine_name is 0 if we only want to know if table is view or not */ + if (!engine_name) goto err; + /* Initialize engine name in case we are not able to find it out */ engine_name->length= 0; + engine_name->str[0]= 0; + + if (!is_binary_frm_header(header)) + goto err; + dbt= header[3]; /* cannot use ha_resolve_by_legacy_type without a THD */ diff --git a/sql/events.cc b/sql/events.cc index 728d15e60f69cb668929ddca9fcc9ec9055f223a..51f68ca4c03ea4d935ca621f7f07f7b55b63294d 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -188,8 +188,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, expr= tmp_expr - (tmp_expr/60)*60; /* the code after the switch will finish */ - } break; + } case INTERVAL_HOUR_SECOND: { ulonglong tmp_expr= expr; @@ -205,8 +205,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, expr= tmp_expr - (tmp_expr/60)*60; /* the code after the switch will finish */ - } break; + } case INTERVAL_DAY_SECOND: { ulonglong tmp_expr= expr; @@ -228,8 +228,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, expr= tmp_expr - (tmp_expr/60)*60; /* the code after the switch will finish */ - } break; + } case INTERVAL_DAY_MICROSECOND: case INTERVAL_HOUR_MICROSECOND: case INTERVAL_MINUTE_MICROSECOND: @@ -243,7 +243,8 @@ Events::reconstruct_interval_expression(String *buf, interval_type interval, break; case INTERVAL_WEEK: expr/= 7; - /* fall through */ + close_quote= FALSE; + break; default: close_quote= FALSE; break; diff --git a/sql/field.cc b/sql/field.cc index 6a28b38a612b27e6d2ca8df8dd4108e9835b6b79..1ffe2ce78ac2777f052e90115ded9f41c8bbe37f 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2013, Monty Program Ab. + Copyright (c) 2000, 2017, Oracle and/or its affiliates. + Copyright (c) 2008, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -8902,13 +8902,13 @@ String *Field_set::val_str(String *val_buffer, ulonglong tmp=(ulonglong) Field_enum::val_int(); uint bitnr=0; + /* + Some callers expect *val_buffer to contain the result, + so we assign to it, rather than doing 'return &empty_set_string. + */ + *val_buffer= empty_set_string; if (tmp == 0) { - /* - Some callers expect *val_buffer to contain the result, - so we assign to it, rather than doing 'return &empty_set_string. - */ - *val_buffer= empty_set_string; return val_buffer; } diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 6f3214bede23a7aeb352abe34fd1167d65123612..0649d5d44aa19d979d494f18d5b9dd4532428ea6 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2005, 2013, Oracle and/or its affiliates. - Copyright (c) 2009, 2013, Monty Program Ab & SkySQL Ab + Copyright (c) 2005, 2017, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1929,7 +1929,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info, cleanup_new_partition(part_count); DBUG_RETURN(error); } - + DBUG_PRINT("info", ("Add partition %s", part_name_buff)); if ((error= prepare_new_partition(table, create_info, new_file_array[i], diff --git a/sql/handler.cc b/sql/handler.cc index bea277a52760f32d8f78062c5559dcaaf96ef545..a5a28ceb77777ba740147abb0d8e083625b7c60c 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -405,7 +405,7 @@ static int ha_finish_errors(void) } static volatile int32 need_full_discover_for_existence= 0; -static volatile int32 engines_with_discover_table_names= 0; +static volatile int32 engines_with_discover_file_names= 0; static volatile int32 engines_with_discover= 0; static int full_discover_for_existence(handlerton *, const char *, const char *) @@ -430,8 +430,8 @@ static void update_discovery_counters(handlerton *hton, int val) if (hton->discover_table_existence == full_discover_for_existence) my_atomic_add32(&need_full_discover_for_existence, val); - if (hton->discover_table_names) - my_atomic_add32(&engines_with_discover_table_names, val); + if (hton->discover_table_names && hton->tablefile_extensions[0]) + my_atomic_add32(&engines_with_discover_file_names, val); if (hton->discover_table) my_atomic_add32(&engines_with_discover, val); @@ -5063,10 +5063,15 @@ bool ha_table_exists(THD *thd, const char *db, const char *table_name, { char engine_buf[NAME_CHAR_LEN + 1]; LEX_STRING engine= { engine_buf, 0 }; + frm_type_enum type; - if (dd_frm_type(thd, path, &engine) != FRMTYPE_VIEW) + if ((type= dd_frm_type(thd, path, &engine)) == FRMTYPE_ERROR) + DBUG_RETURN(0); + + if (type != FRMTYPE_VIEW) { - plugin_ref p= plugin_lock_by_name(thd, &engine, MYSQL_STORAGE_ENGINE_PLUGIN); + plugin_ref p= plugin_lock_by_name(thd, &engine, + MYSQL_STORAGE_ENGINE_PLUGIN); *hton= p ? plugin_hton(p) : NULL; if (*hton) // verify that the table really exists @@ -5189,6 +5194,7 @@ void Discovered_table_list::remove_duplicates() { LEX_STRING **src= tables->front(); LEX_STRING **dst= src; + sort(); while (++dst <= tables->back()) { LEX_STRING *s= *src, *d= *dst; @@ -5256,10 +5262,12 @@ int ha_discover_table_names(THD *thd, LEX_STRING *db, MY_DIR *dirp, int error; DBUG_ENTER("ha_discover_table_names"); - if (engines_with_discover_table_names == 0 && !reusable) + if (engines_with_discover_file_names == 0 && !reusable) { - error= ext_table_discovery_simple(dirp, result); - result->sort(); + st_discover_names_args args= {db, NULL, result, 0}; + error= ext_table_discovery_simple(dirp, result) || + plugin_foreach(thd, discover_names, + MYSQL_STORAGE_ENGINE_PLUGIN, &args); } else { @@ -5272,8 +5280,6 @@ int ha_discover_table_names(THD *thd, LEX_STRING *db, MY_DIR *dirp, error= extension_based_table_discovery(dirp, reg_ext, result) || plugin_foreach(thd, discover_names, MYSQL_STORAGE_ENGINE_PLUGIN, &args); - result->sort(); - if (args.possible_duplicates > 0) result->remove_duplicates(); } diff --git a/sql/item.cc b/sql/item.cc index da1692ecbf82438e31e5bddb4ea97a85d90b0827..8c64a10c496f639ad19708f03781e3d7adda5f8d 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2133,6 +2133,9 @@ bool Item_func_or_sum::agg_item_set_converter(const DTCollation &coll, Item **args, uint nargs, uint flags, int item_sep) { + THD *thd= current_thd; + if (thd->lex->is_ps_or_view_context_analysis()) + return false; Item **arg, *safe_args[2]= {NULL, NULL}; /* @@ -2148,7 +2151,6 @@ bool Item_func_or_sum::agg_item_set_converter(const DTCollation &coll, safe_args[1]= args[item_sep]; } - THD *thd= current_thd; bool res= FALSE; uint i; @@ -2679,7 +2681,8 @@ table_map Item_field::all_used_tables() const return (get_depended_from() ? OUTER_REF_TABLE_BIT : field->table->map); } -void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { if (new_parent == get_depended_from()) depended_from= NULL; @@ -2723,6 +2726,19 @@ void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref) if (!need_change) return; + if (!merge) + { + /* + It is transformation without merge. + This field was "outer" for the inner SELECT where it was taken and + moved up. + "Outer" fields uses normal SELECT_LEX context of upper SELECTs for + name resolution, so we can switch everything to it safely. + */ + this->context= &new_parent->context; + return; + } + Name_resolution_context *ctx= new Name_resolution_context(); if (context->select_lex == new_parent) { @@ -5835,7 +5851,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, Field_string(max_length, maybe_null, name, collation.collation); break; } - /* Fall through */ + /* fall through */ case MYSQL_TYPE_ENUM: case MYSQL_TYPE_SET: case MYSQL_TYPE_VAR_STRING: @@ -6640,6 +6656,7 @@ bool Item::cache_const_expr_analyzer(uchar **arg) */ if (const_item() && !(basic_const_item() || item->basic_const_item() || + item->type() == Item::NULL_ITEM || /* Item_name_const hack */ item->type() == Item::FIELD_ITEM || item->type() == SUBSELECT_ITEM || item->type() == CACHE_ITEM || @@ -6821,7 +6838,11 @@ class Dependency_marker: public Field_enumerator // Find which select the field is in. This is achieved by walking up // the select tree and looking for the table of interest. st_select_lex *sel; - for (sel= current_select; sel; sel= sel->outer_select()) + for (sel= current_select; + sel ; + sel= (sel->context.outer_context ? + sel->context.outer_context->select_lex: + NULL)) { List_iterator li(sel->leaf_tables); TABLE_LIST *tbl; @@ -7994,7 +8015,6 @@ bool Item_direct_view_ref::send(Protocol *protocol, String *buffer) bool Item_direct_view_ref::fix_fields(THD *thd, Item **reference) { - DBUG_ASSERT(1); /* view fild reference must be defined */ DBUG_ASSERT(*ref); /* (*ref)->check_cols() will be made in Item_direct_ref::fix_fields */ @@ -8055,18 +8075,19 @@ bool Item_outer_ref::fix_fields(THD *thd, Item **reference) void Item_outer_ref::fix_after_pullout(st_select_lex *new_parent, - Item **ref_arg) + Item **ref_arg, bool merge) { if (get_depended_from() == new_parent) { *ref_arg= outer_ref; - (*ref_arg)->fix_after_pullout(new_parent, ref_arg); + (*ref_arg)->fix_after_pullout(new_parent, ref_arg, merge); } } -void Item_ref::fix_after_pullout(st_select_lex *new_parent, Item **refptr) +void Item_ref::fix_after_pullout(st_select_lex *new_parent, Item **refptr, + bool merge) { - (*ref)->fix_after_pullout(new_parent, ref); + (*ref)->fix_after_pullout(new_parent, ref, merge); if (get_depended_from() == new_parent) depended_from= NULL; } @@ -9847,7 +9868,7 @@ void Item_direct_view_ref::update_used_tables() table_map Item_direct_view_ref::used_tables() const { - DBUG_ASSERT(null_ref_table); + DBUG_ASSERT(fixed); if (get_depended_from()) return OUTER_REF_TABLE_BIT; diff --git a/sql/item.h b/sql/item.h index c338b14e340172c37a2f03b14a0b06307a4947a7..921179ce232f690b6461fd64f5066d3aeba6178d 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,8 +1,8 @@ #ifndef SQL_ITEM_INCLUDED #define SQL_ITEM_INCLUDED -/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB +/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -729,7 +729,9 @@ class Item: public Value_source, Fix after some tables has been pulled out. Basically re-calculate all attributes that are dependent on the tables. */ - virtual void fix_after_pullout(st_select_lex *new_parent, Item **ref) {}; + virtual void fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) + {}; /* This method should be used in case where we are sure that we do not need @@ -2384,7 +2386,7 @@ class Item_field :public Item_ident bool send(Protocol *protocol, String *str_arg); void reset_field(Field *f); bool fix_fields(THD *, Item **); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void make_field(Send_field *tmp_field); int save_in_field(Field *field,bool no_conversions); void save_org_in_field(Field *field, fast_field_copier optimizer_data); @@ -2581,6 +2583,17 @@ class Item_null_result :public Item_null Field *result_field; Item_null_result(THD *thd): Item_null(thd), result_field(0) {} bool is_result_field() { return result_field != 0; } +#if MARIADB_VERSION_ID < 100300 + enum_field_types field_type() const + { + return result_field->type(); + } +#else + const Type_handler *type_handler() const + { + return result_field->type_handler(); + } +#endif void save_in_result_field(bool no_conversions) { save_in_field(result_field, no_conversions); @@ -3894,7 +3907,7 @@ class Item_ref :public Item_ident bool send(Protocol *prot, String *tmp); void make_field(Send_field *field); bool fix_fields(THD *, Item **); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); int save_in_field(Field *field, bool no_conversions); void save_org_in_field(Field *field, fast_field_copier optimizer_data); fast_field_copier setup_fast_field_copier(Field *field) @@ -4131,6 +4144,8 @@ class Item_cache_wrapper :public Item_result_field bool fix_fields(THD *thd, Item **it); void cleanup(); + Item *get_orig_item() const { return orig_item; } + /* Methods of getting value which should be cached in the cache */ void save_val(Field *to); double val_real(); @@ -4162,9 +4177,9 @@ class Item_cache_wrapper :public Item_result_field Item *it= ((Item *) item)->real_item(); return orig_item->eq(it, binary_cmp); } - void fix_after_pullout(st_select_lex *new_parent, Item **refptr) + void fix_after_pullout(st_select_lex *new_parent, Item **refptr, bool merge) { - orig_item->fix_after_pullout(new_parent, &orig_item); + orig_item->fix_after_pullout(new_parent, &orig_item, merge); } int save_in_field(Field *to, bool no_conversions); enum Item_result result_type () const { return orig_item->result_type(); } @@ -4422,7 +4437,7 @@ class Item_outer_ref :public Item_direct_ref outer_ref->save_org_in_field(result_field, NULL); } bool fix_fields(THD *, Item **); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); table_map used_tables() const { return (*ref)->const_item() ? 0 : OUTER_REF_TABLE_BIT; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index e45e568e3dadbe8bfb40d87eb3c495f246c421c3..fcb78ca00037c93c0ec36012d680941029594ada 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1229,10 +1229,11 @@ bool Item_in_optimizer::is_top_level_item() } -void Item_in_optimizer::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_in_optimizer::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { /* This will re-calculate attributes of our Item_in_subselect: */ - Item_bool_func::fix_after_pullout(new_parent, ref); + Item_bool_func::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache: */ eval_not_null_tables(NULL); @@ -2060,10 +2061,11 @@ bool Item_func_between::count_sargable_conds(uchar *arg) } -void Item_func_between::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func_between::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { /* This will re-calculate attributes of the arguments */ - Item_func_opt_neg::fix_after_pullout(new_parent, ref); + Item_func_opt_neg::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache according to our special rules */ eval_not_null_tables(NULL); } @@ -2406,10 +2408,11 @@ Item_func_if::eval_not_null_tables(uchar *opt_arg) } -void Item_func_if::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func_if::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { /* This will re-calculate attributes of the arguments */ - Item_func::fix_after_pullout(new_parent, ref); + Item_func::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache according to our special rules */ eval_not_null_tables(NULL); } @@ -4138,10 +4141,11 @@ Item_func_in::eval_not_null_tables(uchar *opt_arg) } -void Item_func_in::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func_in::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { /* This will re-calculate attributes of the arguments */ - Item_func_opt_neg::fix_after_pullout(new_parent, ref); + Item_func_opt_neg::fix_after_pullout(new_parent, ref, merge); /* Then, re-calculate not_null_tables_cache according to our special rules */ eval_not_null_tables(NULL); } @@ -4663,7 +4667,8 @@ Item_cond::eval_not_null_tables(uchar *opt_arg) } -void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { List_iterator li(list); Item *item; @@ -4676,7 +4681,7 @@ void Item_cond::fix_after_pullout(st_select_lex *new_parent, Item **ref) while ((item=li++)) { table_map tmp_table_map; - item->fix_after_pullout(new_parent, li.ref()); + item->fix_after_pullout(new_parent, li.ref(), merge); item= *li.ref(); used_tables_and_const_cache_join(item); @@ -5412,7 +5417,7 @@ void Regexp_processor_pcre::pcre_exec_warn(int rc) const switch (rc) { case PCRE_ERROR_NULL: - errmsg= "pcre_exec: null arguement passed"; + errmsg= "pcre_exec: null argument passed"; break; case PCRE_ERROR_BADOPTION: errmsg= "pcre_exec: bad option"; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a34e70f99180cae0cce26883a65ec08c3d3708b8..cc3362893554691170779942baf1e4dedd0b3190 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -342,7 +342,7 @@ class Item_in_optimizer: public Item_bool_func virtual void get_cache_parameters(List ¶meters); bool is_top_level_item(); bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool invisible_mode(); void reset_cache() { cache= NULL; } }; @@ -824,7 +824,7 @@ class Item_func_between :public Item_func_opt_neg void fix_length_and_dec(); virtual void print(String *str, enum_query_type query_type); bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool count_sargable_conds(uchar *arg); void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, @@ -980,7 +980,7 @@ class Item_func_if :public Item_func_case_abbreviation2 } const char *func_name() const { return "if"; } bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); private: void cache_type_info(Item *source); }; @@ -1595,7 +1595,7 @@ class Item_func_in :public Item_func_opt_neg enum Functype functype() const { return IN_FUNC; } const char *func_name() const { return " IN "; } bool eval_not_null_tables(uchar *opt_arg); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool count_sargable_conds(uchar *arg); }; @@ -2063,7 +2063,7 @@ class Item_cond :public Item_bool_func list.append(nlist); } bool fix_fields(THD *, Item **ref); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); enum Type type() const { return COND_ITEM; } List* argument_list() { return &list; } diff --git a/sql/item_func.cc b/sql/item_func.cc index 5539ba7fc480b665736bf554397b16730eeb5914..6b444a7e86d7324a63a835a59c3272711b533412 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -270,7 +270,8 @@ Item_func::eval_not_null_tables(uchar *opt_arg) } -void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { Item **arg,**arg_end; @@ -281,7 +282,7 @@ void Item_func::fix_after_pullout(st_select_lex *new_parent, Item **ref) { for (arg=args, arg_end=args+arg_count; arg != arg_end ; arg++) { - (*arg)->fix_after_pullout(new_parent, arg); + (*arg)->fix_after_pullout(new_parent, arg, merge); Item *item= *arg; used_tables_and_const_cache_join(item); diff --git a/sql/item_func.h b/sql/item_func.h index ec8ec6fca74d67d0f841ead60b09ed1a5d594124..1209fc5cdd8624353badbfc4ee10ecc49e4b3074 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -126,7 +126,7 @@ class Item_func :public Item_func_or_sum Item_func_or_sum::cleanup(); used_tables_and_const_cache_init(); } - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void quick_fix_field(); table_map not_null_tables() const; void update_used_tables() diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index fd7241b7bc31c268af66fe574002c652ce031408..51a4636df1f59751de9a96babea672e7239cf3c2 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -1194,6 +1194,8 @@ static int setup_relate_func(Geometry *g1, Geometry *g2, } else func->repeat_expression(shape_a); + if (func->reserve_op_buffer(1)) + return 1; func->add_operation(op_matrix(nc%3), 1); if (do_store_shapes) { @@ -1364,11 +1366,13 @@ longlong Item_func_spatial_precise_rel::val_int() Gcalc_function::op_intersection, 2); func.add_operation(Gcalc_function::op_internals, 1); shape_a= func.get_next_expression_pos(); - if ((null_value= g1.store_shapes(&trn))) + if ((null_value= g1.store_shapes(&trn)) || + func.reserve_op_buffer(1)) break; func.add_operation(Gcalc_function::op_internals, 1); shape_b= func.get_next_expression_pos(); - if ((null_value= g2.store_shapes(&trn))) + if ((null_value= g2.store_shapes(&trn)) || + func.reserve_op_buffer(1)) break; func.add_operation(Gcalc_function::v_find_t | Gcalc_function::op_intersection, 2); @@ -1603,6 +1607,8 @@ int Item_func_buffer::Transporter::single_point(double x, double y) { if (buffer_op == Gcalc_function::op_difference) { + if (m_fn->reserve_op_buffer(1)) + return 1; m_fn->add_operation(Gcalc_function::op_false, 0); return 0; } diff --git a/sql/item_inetfunc.cc b/sql/item_inetfunc.cc index 6a09747fa1a81e114e61d308ef219468769de59e..4c4dfa4497b2d3b1bc85db75062cd279e7221860 100644 --- a/sql/item_inetfunc.cc +++ b/sql/item_inetfunc.cc @@ -181,7 +181,8 @@ String *Item_func_inet_str_base::val_str_ascii(String *buffer) return NULL; } - String *arg_str= args[0]->val_str(buffer); + StringBuffer tmp; + String *arg_str= args[0]->val_str(&tmp); if (!arg_str) // Out-of memory happened. The error has been reported. { // Or: the underlying field is NULL null_value= true; @@ -679,7 +680,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str) @retval true The string has been converted sucessfully. */ -bool Item_func_inet6_aton::calc_value(String *arg, String *buffer) +bool Item_func_inet6_aton::calc_value(const String *arg, String *buffer) { // ipv4-string -> varbinary(4) // ipv6-string -> varbinary(16) @@ -719,7 +720,7 @@ bool Item_func_inet6_aton::calc_value(String *arg, String *buffer) @retval true The string has been converted sucessfully. */ -bool Item_func_inet6_ntoa::calc_value(String *arg, String *buffer) +bool Item_func_inet6_ntoa::calc_value(const String *arg, String *buffer) { if (arg->charset() != &my_charset_bin) return false; diff --git a/sql/item_inetfunc.h b/sql/item_inetfunc.h index 82a4405df1e650f7262072be0424763704f08621..eaafd005f911bb0bf209a4d81151e077a7e6d027 100644 --- a/sql/item_inetfunc.h +++ b/sql/item_inetfunc.h @@ -98,7 +98,7 @@ class Item_func_inet_str_base : public Item_str_ascii_func virtual String *val_str_ascii(String *buffer); protected: - virtual bool calc_value(String *arg, String *buffer) = 0; + virtual bool calc_value(const String *arg, String *buffer) = 0; }; @@ -125,7 +125,7 @@ class Item_func_inet6_aton : public Item_func_inet_str_base } protected: - virtual bool calc_value(String *arg, String *buffer); + virtual bool calc_value(const String *arg, String *buffer); }; @@ -157,7 +157,7 @@ class Item_func_inet6_ntoa : public Item_func_inet_str_base } protected: - virtual bool calc_value(String *arg, String *buffer); + virtual bool calc_value(const String *arg, String *buffer); }; diff --git a/sql/item_row.cc b/sql/item_row.cc index b1575b81087cc56661422d750dffcf17ff737920..97f75c4b4cf1ac622ed5b39ef469b31b11416e5e 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -24,7 +24,6 @@ #include "sql_class.h" // THD, set_var.h: THD #include "set_var.h" - void Item_row::illegal_method_call(const char *method) { DBUG_ENTER("Item_row::illegal_method_call"); @@ -110,13 +109,14 @@ void Item_row::split_sum_func(THD *thd, Item **ref_pointer_array, } -void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_row::fix_after_pullout(st_select_lex *new_parent, Item **ref, + bool merge) { used_tables_and_const_cache_init(); not_null_tables_cache= 0; for (uint i= 0; i < arg_count; i++) { - args[i]->fix_after_pullout(new_parent, &args[i]); + args[i]->fix_after_pullout(new_parent, &args[i], merge); used_tables_and_const_cache_join(args[i]); not_null_tables_cache|= args[i]->not_null_tables(); } diff --git a/sql/item_row.h b/sql/item_row.h index 25c9ec7915ba3f78b2cd7527979f15498289e4cf..5e8071ec49553f04328ab542f2bbdb4b4ff8bd1b 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -47,13 +47,10 @@ class Item_row: public Item, Item_row(THD *thd, List &list): Item(thd), Item_args(thd, list), not_null_tables_cache(0), with_null(0) { } - Item_row(THD *thd, Item_row *item): - Item(thd), - Item_args(item), - Used_tables_and_const_cache(item), - not_null_tables_cache(0), - with_null(0) - {} + Item_row(THD *thd, Item_row *row): + Item(thd), Item_args(thd, static_cast(row)), Used_tables_and_const_cache(), + not_null_tables_cache(0), with_null(0) + { } enum Type type() const { return ROW_ITEM; }; void illegal_method_call(const char *); @@ -83,7 +80,7 @@ class Item_row: public Item, return 0; }; bool fix_fields(THD *thd, Item **ref); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void cleanup(); void split_sum_func(THD *thd, Item **ref_pointer_array, List &fields, uint flags); diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 12230014f59e11713afa3a20c1c5a725a6c06268..1c1f09c45676abce04e6e89c57298950f641e598 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -447,7 +447,8 @@ bool Item_subselect::mark_as_dependent(THD *thd, st_select_lex *select, OUTER_REF_TABLE_BIT. */ -void Item_subselect::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_subselect::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { recalc_used_tables(new_parent, TRUE); parent_select= new_parent; @@ -1153,7 +1154,8 @@ Item_singlerow_subselect::select_transformer(JOIN *join) /* as far as we moved content to upper level we have to fix dependences & Co */ - substitution->fix_after_pullout(select_lex->outer_select(), &substitution); + substitution->fix_after_pullout(select_lex->outer_select(), + &substitution, TRUE); } DBUG_RETURN(false); } @@ -1439,6 +1441,10 @@ Item_in_subselect::Item_in_subselect(THD *thd, Item * left_exp, DBUG_ENTER("Item_in_subselect::Item_in_subselect"); DBUG_PRINT("info", ("in_strategy: %u", (uint)in_strategy)); left_expr_orig= left_expr= left_exp; + /* prepare to possible disassembling the item in convert_subq_to_sj() */ + if (left_exp->type() == Item::ROW_ITEM) + left_expr_orig= new (thd->mem_root) + Item_row(thd, static_cast(left_exp)); func= &eq_creator; init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this)); max_columns= UINT_MAX; @@ -1462,6 +1468,10 @@ Item_allany_subselect::Item_allany_subselect(THD *thd, Item * left_exp, { DBUG_ENTER("Item_allany_subselect::Item_allany_subselect"); left_expr_orig= left_expr= left_exp; + /* prepare to possible disassembling the item in convert_subq_to_sj() */ + if (left_exp->type() == Item::ROW_ITEM) + left_expr_orig= new (thd->mem_root) + Item_row(thd, static_cast(left_exp)); func= func_creator(all_arg); init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this)); max_columns= 1; @@ -2926,7 +2936,7 @@ bool Item_exists_subselect::exists2in_processor(uchar *opt_arg) goto out; } } - outer_exp->fix_after_pullout(unit->outer_select(), &outer_exp); + outer_exp->fix_after_pullout(unit->outer_select(), &outer_exp, FALSE); outer_exp->update_used_tables(); outer.push_back(outer_exp, thd->mem_root); } @@ -3307,10 +3317,11 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref) } -void Item_in_subselect::fix_after_pullout(st_select_lex *new_parent, Item **ref) +void Item_in_subselect::fix_after_pullout(st_select_lex *new_parent, + Item **ref, bool merge) { - left_expr->fix_after_pullout(new_parent, &left_expr); - Item_subselect::fix_after_pullout(new_parent, ref); + left_expr->fix_after_pullout(new_parent, &left_expr, merge); + Item_subselect::fix_after_pullout(new_parent, ref, merge); used_tables_cache |= left_expr->used_tables(); } diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 009aff5ed8080c31f4025ac4723adac3d2b0b958..424ea6f051203cce0498388631d281451867b18a 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -169,7 +169,7 @@ class Item_subselect :public Item_result_field, } bool fix_fields(THD *thd, Item **ref); bool mark_as_dependent(THD *thd, st_select_lex *select, Item *item); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); void recalc_used_tables(st_select_lex *new_parent, bool after_pullout); virtual bool exec(); /* @@ -607,7 +607,7 @@ class Item_in_subselect :public Item_exists_subselect virtual void print(String *str, enum_query_type query_type); bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); - void fix_after_pullout(st_select_lex *new_parent, Item **ref); + void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge); bool const_item() const { return Item_subselect::const_item() && left_expr->const_item(); diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index d8a37b37315c04fa0b54d81937b84d9e61e7bbbb..4a94c3a5f89dd6c6155e8a53dbf70bd359ac0498 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1793,9 +1793,18 @@ bool Item_func_sec_to_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) ltime->hour= TIME_MAX_HOUR+1; check_time_range(ltime, decimals, &unused); - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - err->ptr(), err->length(), - MYSQL_TIMESTAMP_TIME, NullS); + if (!err) + { + ErrConvInteger err2(sec, unsigned_flag); + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &err2, MYSQL_TIMESTAMP_TIME, NullS); + } + else + { + ErrConvString err2(err); + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &err2, MYSQL_TIMESTAMP_TIME, NullS); + } return 0; } diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 0e9329d501c2f708e6ccd218a6e0ddafa0e36bd6..927ce12f079b250f73faf588f427a1dbf87f18af 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -502,8 +502,16 @@ class Item_temporal_func: public Item_func { return val_decimal_from_date(decimal_value); } Field *create_field_for_create_select(TABLE *table) { return tmp_table_field_from_field_type(table, false, false); } +#if MARIADB_VERSION_ID > 100300 +#error This code should be removed in 10.3, to use the derived save_in_field() +#else int save_in_field(Field *field, bool no_conversions) - { return save_date_in_field(field); } + { + return field_type() == MYSQL_TYPE_TIME ? + save_time_in_field(field) : + save_date_in_field(field); + } +#endif void fix_length_and_dec(); }; diff --git a/sql/log_event.cc b/sql/log_event.cc index 92885344cd64e980dfaa1952cbab7df1a98340c2..f2f7b8776718c6e0cc14016661ac8b2a59bc1d9f 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2469,8 +2469,8 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr, case 2: { strmake(typestr, "ENUM(2 bytes)", typestr_length); - if (!ptr) - goto return_null; + if (!ptr) + goto return_null; int32 i32= uint2korr(ptr); my_b_printf(file, "%d", i32); @@ -7857,21 +7857,6 @@ User_var_log_event(const char* buf, uint event_len, we keep the flags set to UNDEF_F. */ uint bytes_read= ((val + val_len) - buf_start); -#ifndef DBUG_OFF - bool old_pre_checksum_fd= description_event->is_version_before_checksum( - &description_event->server_version_split); -#endif - DBUG_ASSERT((bytes_read == data_written - - (old_pre_checksum_fd || - (description_event->checksum_alg == - BINLOG_CHECKSUM_ALG_OFF)) ? - 0 : BINLOG_CHECKSUM_LEN) - || - (bytes_read == data_written -1 - - (old_pre_checksum_fd || - (description_event->checksum_alg == - BINLOG_CHECKSUM_ALG_OFF)) ? - 0 : BINLOG_CHECKSUM_LEN)); if ((data_written - bytes_read) > 0) { flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 97d63d99458642d2a94390c4f7bd576efd362c28..8b7fdd2f7058a01cfcd6476de97ff8242d40b5a3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5747,9 +5747,6 @@ int mysqld_main(int argc, char **argv) #ifdef __WIN__ if (!opt_console) { - if (reopen_fstreams(log_error_file, stdout, stderr)) - unireg_abort(1); - setbuf(stderr, NULL); FreeConsole(); // Remove window } diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 1c41aa79af29888510c8829d322dc2a088d93b90..5377e4e4aea32187be3da7f14b79f9dda263dd7c 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8337,6 +8337,34 @@ bool sel_trees_can_be_ored(RANGE_OPT_PARAM* param, DBUG_RETURN(!common_keys->is_clear_all()); } +/* + Check whether the key parts inf_init..inf_end-1 of one index can compose + an infix for the key parts key_init..key_end-1 of another index +*/ + +static +bool is_key_infix(KEY_PART *key_init, KEY_PART *key_end, + KEY_PART *inf_init, KEY_PART *inf_end) +{ + KEY_PART *key_part, *inf_part; + for (key_part= key_init; key_part < key_end; key_part++) + { + if (key_part->field->eq(inf_init->field)) + break; + } + if (key_part == key_end) + return false; + for (key_part++, inf_part= inf_init + 1; + key_part < key_end && inf_part < inf_end; + key_part++, inf_part++) + { + if (!key_part->field->eq(inf_part->field)) + return false; + } + return inf_part == inf_end; +} + + /* Check whether range parts of two trees must be ored for some indexes @@ -8393,14 +8421,9 @@ bool sel_trees_must_be_ored(RANGE_OPT_PARAM* param, KEY_PART *key2_init= param->key[idx2]+tree2->keys[idx2]->part; KEY_PART *key2_end= param->key[idx2]+tree2->keys[idx2]->max_part_no; - KEY_PART *part1, *part2; - for (part1= key1_init, part2= key2_init; - part1 < key1_end && part2 < key2_end; - part1++, part2++) - { - if (!part1->field->eq(part2->field)) - DBUG_RETURN(FALSE); - } + if (!is_key_infix(key1_init, key1_end, key2_init, key2_end) && + !is_key_infix(key2_init, key2_end, key1_init, key1_end)) + DBUG_RETURN(FALSE); } } diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 3680dce81171243318be12b817c0a3785ca12c97..138af3f14b33fb096d551bf53a173dabaf412bad 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1612,6 +1612,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) sj-nest. */ st_select_lex *subq_lex= subq_pred->unit->first_select(); + DBUG_ASSERT(subq_lex->next_select() == NULL); nested_join->join_list.empty(); List_iterator_fast li(subq_lex->top_join_list); TABLE_LIST *tl; @@ -1664,7 +1665,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) { tl->jtbm_table_no= table_no; Item *dummy= tl->jtbm_subselect; - tl->jtbm_subselect->fix_after_pullout(parent_lex, &dummy); + tl->jtbm_subselect->fix_after_pullout(parent_lex, &dummy, true); DBUG_ASSERT(dummy == tl->jtbm_subselect); } SELECT_LEX *old_sl= tl->select_lex; @@ -1715,7 +1716,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) if (subq_pred->left_expr->cols() == 1) { - nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr, + /* add left = select_list_element */ + nested_join->sj_outer_expr_list.push_back(&subq_pred->left_expr, thd->mem_root); /* Create Item_func_eq. Note that @@ -1729,26 +1731,62 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Item_func_eq *item_eq= new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, subq_lex->ref_pointer_array[0]); + if (!item_eq) + DBUG_RETURN(TRUE); if (subq_pred->left_expr_orig != subq_pred->left_expr) thd->change_item_tree(item_eq->arguments(), subq_pred->left_expr); item_eq->in_equality_no= 0; sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq); } - else + else if (subq_pred->left_expr->type() == Item::ROW_ITEM) { + /* + disassemple left expression and add + left1 = select_list_element1 and left2 = select_list_element2 ... + */ for (uint i= 0; i < subq_pred->left_expr->cols(); i++) { - nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr-> - element_index(i), + nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr->addr(i), thd->mem_root); - Item_func_eq *item_eq= + Item_func_eq *item_eq= new (thd->mem_root) - Item_func_eq(thd, subq_pred->left_expr->element_index(i), + Item_func_eq(thd, subq_pred->left_expr_orig->element_index(i), subq_lex->ref_pointer_array[i]); + if (!item_eq) + DBUG_RETURN(TRUE); + DBUG_ASSERT(subq_pred->left_expr->element_index(i)->fixed); + if (subq_pred->left_expr_orig->element_index(i) != + subq_pred->left_expr->element_index(i)) + thd->change_item_tree(item_eq->arguments(), + subq_pred->left_expr->element_index(i)); item_eq->in_equality_no= i; sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq); } } + else + { + /* + add row operation + left = (select_list_element1, select_list_element2, ...) + */ + Item_row *row= new (thd->mem_root) Item_row(thd, subq_lex->pre_fix); + /* fix fields on subquery was call so they should be the same */ + DBUG_ASSERT(subq_pred->left_expr->cols() == row->cols()); + if (!row) + DBUG_RETURN(TRUE); + nested_join->sj_outer_expr_list.push_back(&subq_pred->left_expr); + Item_func_eq *item_eq= + new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, row); + if (!item_eq) + DBUG_RETURN(TRUE); + for (uint i= 0; i < row->cols(); i++) + { + if (row->element_index(i) != subq_lex->ref_pointer_array[i]) + thd->change_item_tree(row->addr(i), subq_lex->ref_pointer_array[i]); + } + item_eq->in_equality_no= 0; + sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq); + } /* Fix the created equality and AND @@ -1768,7 +1806,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Walk through sj nest's WHERE and ON expressions and call item->fix_table_changes() for all items. */ - sj_nest->sj_on_expr->fix_after_pullout(parent_lex, &sj_nest->sj_on_expr); + sj_nest->sj_on_expr->fix_after_pullout(parent_lex, &sj_nest->sj_on_expr, + TRUE); fix_list_after_tbl_changes(parent_lex, &sj_nest->nested_join->join_list); @@ -1927,7 +1966,7 @@ static bool convert_subq_to_jtbm(JOIN *parent_join, DBUG_ASSERT(parent_join->table_count < MAX_TABLES); Item *conds= hash_sj_engine->semi_join_conds; - conds->fix_after_pullout(parent_lex, &conds); + conds->fix_after_pullout(parent_lex, &conds, TRUE); DBUG_EXECUTE("where", print_where(conds,"SJ-EXPR", QT_ORDINARY);); @@ -1979,7 +2018,7 @@ void fix_list_after_tbl_changes(SELECT_LEX *new_parent, List *tlist) while ((table= it++)) { if (table->on_expr) - table->on_expr->fix_after_pullout(new_parent, &table->on_expr); + table->on_expr->fix_after_pullout(new_parent, &table->on_expr, TRUE); if (table->nested_join) fix_list_after_tbl_changes(new_parent, &table->nested_join->join_list); } @@ -3302,8 +3341,8 @@ void restore_prev_sj_state(const table_map remaining_tables, ulonglong get_bound_sj_equalities(TABLE_LIST *sj_nest, table_map remaining_tables) { - List_iterator li(sj_nest->nested_join->sj_outer_expr_list); - Item *item; + List_iterator li(sj_nest->nested_join->sj_outer_expr_list); + Item **item; uint i= 0; ulonglong res= 0; while ((item= li++)) @@ -3314,7 +3353,7 @@ ulonglong get_bound_sj_equalities(TABLE_LIST *sj_nest, class and see if there is an element that is bound? (this is an optional feature) */ - if (!(item->used_tables() & remaining_tables)) + if (!(item[0]->used_tables() & remaining_tables)) { res |= 1ULL << i; } diff --git a/sql/partition_info.cc b/sql/partition_info.cc index cd0ab970d76aba37984d1b639a4e996de90c7ca4..ce9329e8f6ab7e850f6bfdde32575b6e7a0c8461 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -39,9 +39,6 @@ partition_info *partition_info::get_clone(THD *thd) { MEM_ROOT *mem_root= thd->mem_root; DBUG_ENTER("partition_info::get_clone"); - - if (!this) - DBUG_RETURN(NULL); List_iterator part_it(partitions); partition_element *part; partition_info *clone= new (mem_root) partition_info(); diff --git a/sql/slave.cc b/sql/slave.cc index db1c3305b98a9b839db5704ed25c618b42495f56..da394ff711e932cb1b1121b7fb5f1623aa395158 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3188,7 +3188,6 @@ static int init_slave_thread(THD* thd, Master_info *mi, thd->variables.sql_log_slow= opt_log_slow_slave_statements; thd->variables.log_slow_filter= global_system_variables.log_slow_filter; set_slave_thread_options(thd); - thd->client_capabilities = CLIENT_LOCAL_FILES; mysql_mutex_lock(&LOCK_thread_count); thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; mysql_mutex_unlock(&LOCK_thread_count); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index ae274ee8714a1c00e7f4ac5b7298a99637965853..257a1d36a2a3f496eca7bbcd68a27ae409b94649 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -141,7 +141,6 @@ sp_get_item_value(THD *thd, Item *item, String *str) case DECIMAL_RESULT: if (item->field_type() != MYSQL_TYPE_BIT) return item->val_str(str); - else {/* Bit type is handled as binary string */} /* fall through */ case STRING_RESULT: { @@ -2537,10 +2536,18 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access) *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, FALSE, 1, TRUE) && (tables.grant.privilege & SELECT_ACL) != 0) || + /* Check if user owns the routine. */ (!strcmp(sp->m_definer_user.str, thd->security_ctx->priv_user) && !strcmp(sp->m_definer_host.str, - thd->security_ctx->priv_host))); + thd->security_ctx->priv_host)) || + /* Check if current role or any of the sub-granted roles + own the routine. */ + (sp->m_definer_host.length == 0 && + (!strcmp(sp->m_definer_user.str, + thd->security_ctx->priv_role) || + check_role_is_granted(thd->security_ctx->priv_role, NULL, + sp->m_definer_user.str)))); if (!*full_access) return check_some_routine_access(thd, sp->m_db.str, sp->m_name.str, sp->m_type == TYPE_ENUM_PROCEDURE); @@ -4325,4 +4332,3 @@ sp_add_to_query_tables(THD *thd, LEX *lex, lex->add_to_query_tables(table); return table; } - diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index f72614790e188a289cfaf3b1310a2ae1e2fb6df0..5ccc5f7511872164f47e995bc0a3be9d4c81e8fb 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -634,9 +634,6 @@ bool ROLE_GRANT_PAIR::init(MEM_ROOT *mem, char *username, char *hostname, char *rolename, bool with_admin_option) { - if (!this) - return true; - size_t uname_l = safe_strlen(username); size_t hname_l = safe_strlen(hostname); size_t rname_l = safe_strlen(rolename); @@ -8473,6 +8470,17 @@ void get_mqh(const char *user, const char *host, USER_CONN *uc) mysql_mutex_unlock(&acl_cache->lock); } +static int check_role_is_granted_callback(ACL_USER_BASE *grantee, void *data) +{ + LEX_CSTRING *rolename= static_cast(data); + if (rolename->length == grantee->user.length && + !strcmp(rolename->str, grantee->user.str)) + return -1; // End search, we've found our role. + + /* Keep looking, we haven't found our role yet. */ + return 0; +} + /* Initialize a TABLE_LIST array and open grant tables @@ -10452,7 +10460,6 @@ bool check_grant(THD *, ulong, TABLE_LIST *, bool, uint, bool) } #endif /*NO_EMBEDDED_ACCESS_CHECKS */ - SHOW_VAR acl_statistics[] = { #ifndef NO_EMBEDDED_ACCESS_CHECKS {"column_grants", (char*)show_column_grants, SHOW_SIMPLE_FUNC}, @@ -10468,6 +10475,43 @@ SHOW_VAR acl_statistics[] = { {NullS, NullS, SHOW_LONG}, }; +/* Check if a role is granted to a user/role. We traverse the role graph + and return true if we find a match. + + hostname == NULL means we are looking for a role as a starting point, + otherwise a user. +*/ +bool check_role_is_granted(const char *username, + const char *hostname, + const char *rolename) +{ + DBUG_ENTER("check_role_is_granted"); + bool result= false; +#ifndef NO_EMBEDDED_ACCESS_CHECKS + ACL_USER_BASE *root; + mysql_mutex_lock(&acl_cache->lock); + if (hostname) + root= find_user_exact(username, hostname); + else + root= find_acl_role(username); + + LEX_CSTRING role_lex; + role_lex.str= rolename; + role_lex.length= strlen(rolename); + + if (root && /* No grantee, nothing to search. */ + traverse_role_graph_down(root, &role_lex, check_role_is_granted_callback, + NULL) == -1) + { + /* We have found the role during our search. */ + result= true; + } + + /* We haven't found the role or we had no initial grantee to start from. */ + mysql_mutex_unlock(&acl_cache->lock); +#endif + DBUG_RETURN(result); +} int fill_schema_enabled_roles(THD *thd, TABLE_LIST *tables, COND *cond) { @@ -12839,4 +12883,3 @@ maria_declare_plugin(mysql_password) MariaDB_PLUGIN_MATURITY_STABLE /* Maturity */ } maria_declare_plugin_end; - diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 0893504b72d12f25f55f1a1841606bcd300022f3..c2ad9a649e56b66edb44273fa846a9220b1a339b 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -406,6 +406,14 @@ int acl_set_default_role(THD *thd, const char *host, const char *user, extern SHOW_VAR acl_statistics[]; +/* Check if a role is granted to a user/role. + + If hostname == NULL, search for a role as the starting grantee. +*/ +bool check_role_is_granted(const char *username, + const char *hostname, + const char *rolename); + #ifndef DBUG_OFF extern ulong role_global_merges, role_db_merges, role_table_merges, role_column_merges, role_routine_merges; diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 1f4426f20435eca7ca25f2d8a5352c78ee757a6d..0888f012ddade716dfcff37ca7dbd118e0c9eb64 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -66,7 +66,6 @@ static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list) if (thd->get_stmt_da()->is_ok()) thd->get_stmt_da()->reset_diagnostics_area(); table_list->table= NULL; - result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK; DBUG_RETURN(result_code); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1aaeb2a55845b0b5d399878623e05b38f9aeacb5..d3d33e04d002c5d4ae4a04fcf866ebeb659df143 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7853,13 +7853,15 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List &fields, bool setup_fields(THD *thd, Item **ref_pointer_array, List &fields, enum_mark_columns mark_used_columns, - List *sum_func_list, bool allow_sum_func) + List *sum_func_list, List *pre_fix, + bool allow_sum_func) { reg2 Item *item; enum_mark_columns save_mark_used_columns= thd->mark_used_columns; nesting_map save_allow_sum_func= thd->lex->allow_sum_func; List_iterator it(fields); bool save_is_item_list_lookup; + bool make_pre_fix= (pre_fix && (pre_fix->elements == 0)); DBUG_ENTER("setup_fields"); DBUG_PRINT("enter", ("ref_pointer_array: %p", ref_pointer_array)); @@ -7906,6 +7908,9 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, thd->lex->current_select->cur_pos_in_select_list= 0; while ((item= it++)) { + if (make_pre_fix) + pre_fix->push_back(item, thd->stmt_arena->mem_root); + if ((!item->fixed && item->fix_fields(thd, it.ref())) || (item= *(it.ref()))->check_cols(1)) { diff --git a/sql/sql_base.h b/sql/sql_base.h index 9e37a43aab82ffbbbaef8c9e834b02e034d4de57..c73ea3745071969d4ad593a8f1b9d5f9754abd77 100644 --- a/sql/sql_base.h +++ b/sql/sql_base.h @@ -174,7 +174,8 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List &fields, List *sum_func_list, uint wild_num); bool setup_fields(THD *thd, Item** ref_pointer_array, List &item, enum_mark_columns mark_used_columns, - List *sum_func_list, bool allow_sum_func); + List *sum_func_list, List *pre_fix, + bool allow_sum_func); void unfix_fields(List &items); bool fill_record(THD * thd, TABLE *table_arg, List &fields, List &values, bool ignore_errors); @@ -405,7 +406,7 @@ inline bool setup_fields_with_no_wrap(THD *thd, Item **ref_pointer_array, bool res; thd->lex->select_lex.no_wrap_view_item= TRUE; res= setup_fields(thd, ref_pointer_array, item, mark_used_columns, - sum_func_list, allow_sum_func); + sum_func_list, NULL, allow_sum_func); thd->lex->select_lex.no_wrap_view_item= FALSE; return res; } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c12f1ec4dc8047ffa2e29626ee2b6cf50eb4799a..2ebcea2d6f48a0d05cdca42d58e0644560727182 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4858,11 +4858,14 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd) { - if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && - thd->variables.option_bits & OPTION_BIN_LOG) + if (WSREP(thd)) + { + /* for wsrep binlog format is meaningful also when binlogging is off */ return (int) thd->wsrep_binlog_format(); - else - return BINLOG_FORMAT_UNSPEC; + } + if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) + return (int) thd->variables.binlog_format; + return BINLOG_FORMAT_UNSPEC; } extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all) diff --git a/sql/sql_const.h b/sql/sql_const.h index 3e23fc25bef791929e51efab323a9d8c872253b9..946cf13e2ae95c34db04d5dd5b1262f9abf84a4c 100644 --- a/sql/sql_const.h +++ b/sql/sql_const.h @@ -45,7 +45,18 @@ #define MAX_MBWIDTH 3 /* Max multibyte sequence */ #define MAX_FILENAME_MBWIDTH 5 #define MAX_FIELD_CHARLENGTH 255 -#define MAX_FIELD_VARCHARLENGTH 65535 +/* + In MAX_FIELD_VARCHARLENGTH we reserve extra bytes for the overhead: + - 2 bytes for the length + - 1 byte for NULL bits + to avoid the "Row size too large" error for these three corner definitions: + CREATE TABLE t1 (c VARBINARY(65533)); + CREATE TABLE t1 (c VARBINARY(65534)); + CREATE TABLE t1 (c VARBINARY(65535)); + Like VARCHAR(65536), they will be converted to BLOB automatically + in non-sctict mode. +*/ +#define MAX_FIELD_VARCHARLENGTH (65535-2-1) #define MAX_FIELD_BLOBLENGTH UINT_MAX32 /* cf field_blob::get_length() */ #define CONVERT_IF_BIGGER_TO_BLOB 512 /* Threshold *in characters* */ diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c1011410970d7e5ca6d339235162c3b10c3ac9f8..bc067b667a69b5718c0991cf863fbb5d265be2f3 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -766,7 +766,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, DELETE_ACL, SELECT_ACL, TRUE)) DBUG_RETURN(TRUE); if ((wild_num && setup_wild(thd, table_list, field_list, NULL, wild_num)) || - setup_fields(thd, NULL, field_list, MARK_COLUMNS_READ, NULL, 0) || + setup_fields(thd, NULL, field_list, MARK_COLUMNS_READ, NULL, NULL, 0) || setup_conds(thd, table_list, select_lex->leaf_tables, conds) || setup_ftfuncs(select_lex)) DBUG_RETURN(TRUE); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 5d12091c4b468384f18930a3f9326b2a96c2a914..5a0879c20c495eb327bde915220ba8d7725c1e7c 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -466,7 +466,8 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived) // Update used tables cache according to new table map if (derived->on_expr) { - derived->on_expr->fix_after_pullout(parent_lex, &derived->on_expr); + derived->on_expr->fix_after_pullout(parent_lex, &derived->on_expr, + TRUE); fix_list_after_tbl_changes(parent_lex, &derived->nested_join->join_list); } } @@ -636,7 +637,8 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived) SELECT_LEX_UNIT *unit= derived->get_unit(); DBUG_ENTER("mysql_derived_prepare"); bool res= FALSE; - DBUG_PRINT("enter", ("unit 0x%lx", (ulong) unit)); + DBUG_PRINT("enter", ("unit: %p table_list: %p Alias '%s'", + unit, derived, derived->alias)); // Skip already prepared views/DT if (!unit || unit->prepared || diff --git a/sql/sql_do.cc b/sql/sql_do.cc index 9e58031f6a4b6cf9a5193c9a2e1e7241f49188e9..54850494ad0ce410e3554d005c866814096971fe 100644 --- a/sql/sql_do.cc +++ b/sql/sql_do.cc @@ -29,7 +29,7 @@ bool mysql_do(THD *thd, List &values) List_iterator li(values); Item *value; DBUG_ENTER("mysql_do"); - if (setup_fields(thd, 0, values, MARK_COLUMNS_NONE, 0, 0)) + if (setup_fields(thd, 0, values, MARK_COLUMNS_NONE, 0, NULL, 0)) DBUG_RETURN(TRUE); while ((value = li++)) (void) value->is_null(); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 721fff389e0d081b327d8a2e1ef69ba9bd2602d7..c39860593b681f64c581a85bd03a1cba20f97036 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -258,7 +258,7 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list, if (table_list->is_view()) unfix_fields(fields); - res= setup_fields(thd, 0, fields, MARK_COLUMNS_WRITE, 0, 0); + res= setup_fields(thd, 0, fields, MARK_COLUMNS_WRITE, 0, NULL, 0); /* Restore the current context. */ ctx_state.restore_state(context, table_list); @@ -372,7 +372,7 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, } /* Check the fields we are going to modify */ - if (setup_fields(thd, 0, update_fields, MARK_COLUMNS_WRITE, 0, 0)) + if (setup_fields(thd, 0, update_fields, MARK_COLUMNS_WRITE, 0, NULL, 0)) return -1; if (insert_table_list->is_view() && @@ -794,7 +794,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), counter); goto abort; } - if (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, NULL, 0)) goto abort; switch_to_nullable_trigger_fields(*values, table); } @@ -1509,12 +1509,12 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, table_list->next_local= 0; context->resolve_in_table_list_only(table_list); - res= (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, 0) || + res= (setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, NULL, 0) || check_insert_fields(thd, context->table_list, fields, *values, !insert_into_view, 0, &map)); if (!res) - res= setup_fields(thd, 0, update_values, MARK_COLUMNS_READ, 0, 0); + res= setup_fields(thd, 0, update_values, MARK_COLUMNS_READ, 0, NULL, 0); if (!res && duplic == DUP_UPDATE) { @@ -3478,7 +3478,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) */ lex->current_select= &lex->select_lex; - res= (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, 0) || + res= (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, NULL, 0) || check_insert_fields(thd, table_list, *fields, values, !insert_into_view, 1, &map)); @@ -3531,7 +3531,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) ctx_state.get_first_name_resolution_table(); res= res || setup_fields(thd, 0, *info.update_values, - MARK_COLUMNS_READ, 0, 0); + MARK_COLUMNS_READ, 0, NULL, 0); if (!res) { /* diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index b3a30c69a039f88a1fc2408ec53b2aa92537b910..8edd9b3fbd8595ed4cbff82728097381c71c74f4 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4861,4 +4861,3 @@ void binlog_unsafe_map_init() BINLOG_DIRECT_OFF & TRX_CACHE_NOT_EMPTY); } #endif - diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 240eb2373ebd69c9723b682e9df208ca88212edd..116ac815ec003e80a6f3199c908e7c5d3d44bef6 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -743,6 +743,7 @@ class st_select_lex: public st_select_lex_node Group_list_ptrs *group_list_ptrs; List item_list; /* list of fields & expressions */ + List pre_fix; /* above list before fix_fields */ List interval_list; bool is_item_list_lookup; /* diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 1ba9de297d42fa68de70101acf2a0a37523d61f2..45c5dc038fc9bd0eecbd1494778ff903387d5054 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -353,22 +353,22 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, Let us also prepare SET clause, altough it is probably empty in this case. */ - if (setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, 0) || - setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, NULL, 0) || + setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, NULL, 0)) DBUG_RETURN(TRUE); } else { // Part field list /* TODO: use this conds for 'WITH CHECK OPTIONS' */ - if (setup_fields(thd, 0, fields_vars, MARK_COLUMNS_WRITE, 0, 0) || - setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, 0) || + if (setup_fields(thd, 0, fields_vars, MARK_COLUMNS_WRITE, 0, NULL, 0) || + setup_fields(thd, 0, set_fields, MARK_COLUMNS_WRITE, 0, NULL, 0) || check_that_all_fields_are_given_values(thd, table, table_list)) DBUG_RETURN(TRUE); /* Add all fields with default functions to table->write_set. */ if (table->default_field) table->mark_default_fields_for_write(); /* Fix the expressions in SET clause */ - if (setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, set_values, MARK_COLUMNS_READ, 0, NULL, 0)) DBUG_RETURN(TRUE); } switch_to_nullable_trigger_fields(fields_vars, table); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6f9e4677c0bfcafe8b9c455ec12cb7c98443e634..7337a8aeb210362fd82e2a8bde1800f39cf021bc 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1160,8 +1160,7 @@ bool do_command(THD *thd) @retval FALSE The statement isn't updating any relevant tables. */ -static my_bool deny_updates_if_read_only_option(THD *thd, - TABLE_LIST *all_tables) +static bool deny_updates_if_read_only_option(THD *thd, TABLE_LIST *all_tables) { DBUG_ENTER("deny_updates_if_read_only_option"); @@ -1170,11 +1169,7 @@ static my_bool deny_updates_if_read_only_option(THD *thd, LEX *lex= thd->lex; - const my_bool user_is_super= - ((ulong)(thd->security_ctx->master_access & SUPER_ACL) == - (ulong)SUPER_ACL); - - if (user_is_super) + if (thd->security_ctx->master_access & SUPER_ACL) DBUG_RETURN(FALSE); if (!(sql_command_flags[lex->sql_command] & CF_CHANGES_DATA)) @@ -1184,28 +1179,26 @@ static my_bool deny_updates_if_read_only_option(THD *thd, if (lex->sql_command == SQLCOM_UPDATE_MULTI) DBUG_RETURN(FALSE); + if (lex->sql_command == SQLCOM_CREATE_DB || + lex->sql_command == SQLCOM_DROP_DB) + DBUG_RETURN(TRUE); + /* a table-to-be-created is not in the temp table list yet, so CREATE TABLE needs a special treatment */ - const bool update_real_tables= lex->sql_command == SQLCOM_CREATE_TABLE ? - !lex->tmp_table() : some_non_temp_table_to_be_updated(thd, all_tables); - - const bool create_or_drop_databases= - (lex->sql_command == SQLCOM_CREATE_DB) || - (lex->sql_command == SQLCOM_DROP_DB); - - if (update_real_tables || create_or_drop_databases) - { - /* - An attempt was made to modify one or more non-temporary tables. - */ - DBUG_RETURN(TRUE); - } + if (lex->sql_command == SQLCOM_CREATE_TABLE) + DBUG_RETURN(!lex->tmp_table()); + /* + a table-to-be-dropped might not exist (DROP TEMPORARY TABLE IF EXISTS), + cannot use the temp table list either. + */ + if (lex->sql_command == SQLCOM_DROP_TABLE && lex->tmp_table()) + DBUG_RETURN(FALSE); - /* Assuming that only temporary tables are modified. */ - DBUG_RETURN(FALSE); + /* Now, check thd->temporary_tables list */ + DBUG_RETURN(some_non_temp_table_to_be_updated(thd, all_tables)); } @@ -3310,7 +3303,7 @@ mysql_execute_command(THD *thd) #ifdef WITH_PARTITION_STORAGE_ENGINE { partition_info *part_info= thd->lex->part_info; - if (part_info && !(part_info= thd->lex->part_info->get_clone(thd))) + if (part_info && !(part_info= part_info->get_clone(thd))) { res= -1; goto end_with_restore_list; @@ -3780,7 +3773,7 @@ mysql_execute_command(THD *thd) if (up_result != 2) break; } - /* Fall through */ + /* fall through */ case SQLCOM_UPDATE_MULTI: { DBUG_ASSERT(first_table == all_tables && first_table != 0); @@ -3891,7 +3884,7 @@ mysql_execute_command(THD *thd) DBUG_PRINT("debug", ("Just after generate_incident()")); } #endif - /* fall through */ + /* fall through */ case SQLCOM_INSERT: { WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); @@ -5726,6 +5719,24 @@ mysql_execute_command(THD *thd) } if (thd->is_error() || (thd->variables.option_bits & OPTION_MASTER_SQL_ERROR)) trans_rollback_stmt(thd); +#ifdef WITH_WSREP + else if (thd->spcont && + (thd->wsrep_conflict_state == MUST_ABORT || + thd->wsrep_conflict_state == CERT_FAILURE)) + { + /* + The error was cleared, but THD was aborted by wsrep and + wsrep_conflict_state is still set accordingly. This + situation is expected if we are running a stored procedure + that declares a handler that catches ER_LOCK_DEADLOCK error. + In which case the error may have been cleared in method + sp_rcontext::handle_sql_condition(). + */ + trans_rollback_stmt(thd); + thd->wsrep_conflict_state= NO_CONFLICT; + thd->killed= NOT_KILLED; + } +#endif /* WITH_WSREP */ else { /* If commit fails, we should be able to reset the OK status. */ diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 5c6174fbfac3d3bd6be7f0cd8ceca69efaba8cfb..dc5e7fe1a1a96fff005118b6227f3b8bab31deb9 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2005, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, SkySQL Ab. +/* Copyright (c) 2005, 2017, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, SkySQL Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -4712,7 +4712,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, thd->work_part_info= thd->lex->part_info; if (thd->work_part_info && - !(thd->work_part_info= thd->lex->part_info->get_clone(thd))) + !(thd->work_part_info= thd->work_part_info->get_clone(thd))) DBUG_RETURN(TRUE); /* ALTER_ADMIN_PARTITION is handled in mysql_admin_table */ @@ -6832,7 +6832,8 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, lpt->alter_info= alter_info; lpt->create_info= create_info; lpt->db_options= create_info->table_options; - if (create_info->row_type == ROW_TYPE_DYNAMIC) + if (create_info->row_type != ROW_TYPE_FIXED && + create_info->row_type != ROW_TYPE_DEFAULT) lpt->db_options|= HA_OPTION_PACK_RECORD; lpt->table= table; lpt->key_info_buffer= 0; @@ -8308,6 +8309,7 @@ int create_partition_name(char *out, size_t outlen, const char *in1, } else transl_part= in2; + if (name_variant == NORMAL_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part, NullS); else if (name_variant == TEMP_PART_NAME) @@ -8322,25 +8324,19 @@ int create_partition_name(char *out, size_t outlen, const char *in1, return 0; } - -/* - Create subpartition name - - SYNOPSIS - create_subpartition_name() - out:out The buffer for the created partition name string - must be *at least* of FN_REFLEN+1 bytes - in1 First part - in2 Second part - in3 Third part - name_variant Normal, temporary or renamed partition name - - RETURN VALUE - 0 if ok, error if name too long - - DESCRIPTION - This method is used to calculate the subpartition name, service routine to - the del_ren_cre_table method. +/** + Create subpartition name. This method is used to calculate the + subpartition name, service routine to the del_ren_cre_table method. + The output buffer size should be FN_REFLEN + 1(terminating '\0'). + + @param [out] out Created partition name string + @param in1 First part + @param in2 Second part + @param in3 Third part + @param name_variant Normal, temporary or renamed partition name + + @retval true Error. + @retval false Success. */ int create_subpartition_name(char *out, size_t outlen, @@ -8352,6 +8348,7 @@ int create_subpartition_name(char *out, size_t outlen, tablename_to_filename(in2, transl_part_name, FN_REFLEN); tablename_to_filename(in3, transl_subpart_name, FN_REFLEN); + if (name_variant == NORMAL_PART_NAME) end= strxnmov(out, outlen-1, in1, "#P#", transl_part_name, "#SP#", transl_subpart_name, NullS); diff --git a/sql/sql_partition.h b/sql/sql_partition.h index 76f162920f1bed086ddd694741f06630711f0b1b..6629537b2ae81f2b0bb26ef6306cee90d2bc7753 100644 --- a/sql/sql_partition.h +++ b/sql/sql_partition.h @@ -1,7 +1,8 @@ #ifndef SQL_PARTITION_INCLUDED #define SQL_PARTITION_INCLUDED -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. +/* Copyright (c) 2006, 2017, Oracle and/or its affiliates. + Copyright (c) 2011, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 5f50395282819cd0749ce7d0d08e519e24568866..f41d1e0fdbf56b93d8ad0784f9d44a25ed8ed40a 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -228,7 +228,6 @@ static DYNAMIC_ARRAY plugin_array; static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM]; static MEM_ROOT plugin_mem_root; static bool reap_needed= false; -static int plugin_array_version=0; static bool initialized= 0; ulong dlopen_count; @@ -322,7 +321,6 @@ static void unlock_variables(THD *thd, struct system_variables *vars); static void cleanup_variables(struct system_variables *vars); static void plugin_vars_free_values(sys_var *vars); static void restore_ptr_backup(uint n, st_ptr_backup *backup); -static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref plugin); static void intern_plugin_unlock(LEX *lex, plugin_ref plugin); static void reap_plugins(void); @@ -943,15 +941,17 @@ SHOW_COMP_OPTION plugin_status(const char *name, size_t len, int type) } -static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc) +static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc, + uint state_mask= PLUGIN_IS_READY | + PLUGIN_IS_UNINITIALIZED | + PLUGIN_IS_DELETED) { st_plugin_int *pi= plugin_ref_to_int(rc); DBUG_ENTER("intern_plugin_lock"); mysql_mutex_assert_owner(&LOCK_plugin); - if (pi->state & (PLUGIN_IS_READY | PLUGIN_IS_UNINITIALIZED | - PLUGIN_IS_DELETED)) + if (pi->state & state_mask) { plugin_ref plugin; #ifdef DBUG_OFF @@ -1146,7 +1146,6 @@ static bool plugin_add(MEM_ROOT *tmp_root, if (!(tmp_plugin_ptr= plugin_insert_or_reuse(&tmp))) goto err; - plugin_array_version++; if (my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr)) tmp_plugin_ptr->state= PLUGIN_IS_FREED; init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096, MYF(0)); @@ -1240,7 +1239,6 @@ static void plugin_del(struct st_plugin_int *plugin) my_hash_delete(&plugin_hash[plugin->plugin->type], (uchar*)plugin); plugin_dl_del(plugin->plugin_dl); plugin->state= PLUGIN_IS_FREED; - plugin_array_version++; free_root(&plugin->mem_root, MYF(0)); } else @@ -1853,11 +1851,11 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list) switch ((*(p++)= *(list++))) { case '\0': list= NULL; /* terminate the loop */ -#ifndef __WIN__ /* fall through */ + case ';': +#ifndef __WIN__ case ':': /* can't use this as delimiter as it may be drive letter */ #endif - case ';': str->str[str->length]= '\0'; if (str == &name) // load all plugins in named module { @@ -2315,64 +2313,55 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name, bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, int type, uint state_mask, void *arg) { - uint idx, total; - struct st_plugin_int *plugin, **plugins; - int version=plugin_array_version; + uint idx, total= 0; + struct st_plugin_int *plugin; + plugin_ref *plugins; + my_bool res= FALSE; DBUG_ENTER("plugin_foreach_with_mask"); if (!initialized) DBUG_RETURN(FALSE); - state_mask= ~state_mask; // do it only once - mysql_mutex_lock(&LOCK_plugin); - total= type == MYSQL_ANY_PLUGIN ? plugin_array.elements - : plugin_hash[type].records; /* Do the alloca out here in case we do have a working alloca: - leaving the nested stack frame invalidates alloca allocation. + leaving the nested stack frame invalidates alloca allocation. */ - plugins=(struct st_plugin_int **)my_alloca(total*sizeof(plugin)); if (type == MYSQL_ANY_PLUGIN) { - for (idx= 0; idx < total; idx++) + plugins= (plugin_ref*) my_alloca(plugin_array.elements * sizeof(plugin_ref)); + for (idx= 0; idx < plugin_array.elements; idx++) { plugin= *dynamic_element(&plugin_array, idx, struct st_plugin_int **); - plugins[idx]= !(plugin->state & state_mask) ? plugin : NULL; + if ((plugins[total]= intern_plugin_lock(0, plugin_int_to_ref(plugin), + state_mask))) + total++; } } else { HASH *hash= plugin_hash + type; - for (idx= 0; idx < total; idx++) + plugins= (plugin_ref*) my_alloca(hash->records * sizeof(plugin_ref)); + for (idx= 0; idx < hash->records; idx++) { plugin= (struct st_plugin_int *) my_hash_element(hash, idx); - plugins[idx]= !(plugin->state & state_mask) ? plugin : NULL; + if ((plugins[total]= intern_plugin_lock(0, plugin_int_to_ref(plugin), + state_mask))) + total++; } } mysql_mutex_unlock(&LOCK_plugin); for (idx= 0; idx < total; idx++) { - if (unlikely(version != plugin_array_version)) - { - mysql_mutex_lock(&LOCK_plugin); - for (uint i=idx; i < total; i++) - if (plugins[i] && plugins[i]->state & state_mask) - plugins[i]=0; - mysql_mutex_unlock(&LOCK_plugin); - } - plugin= plugins[idx]; /* It will stop iterating on first engine error when "func" returns TRUE */ - if (plugin && func(thd, plugin_int_to_ref(plugin), arg)) - goto err; + if ((res= func(thd, plugins[idx], arg))) + break; } + plugin_unlock_list(0, plugins, total); my_afree(plugins); - DBUG_RETURN(FALSE); -err: - my_afree(plugins); - DBUG_RETURN(TRUE); + DBUG_RETURN(res); } @@ -3491,7 +3480,6 @@ bool sys_var_pluginvar::global_update(THD *thd, set_var *var) options->max_value= getopt_double2ulonglong((opt)->max_val); \ options->block_size= (long) (opt)->blk_sz; - void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt) { diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index e0dd04b08f6d2c30ea1851b9dd237e26ed12b47e..e5b85c3be4504201bec4ddd4392a58d4f4d8b253 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1321,7 +1321,7 @@ static bool mysql_test_insert(Prepared_statement *stmt, my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), counter); goto error; } - if (setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, 0)) + if (setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, NULL, 0)) goto error; } } @@ -1411,7 +1411,7 @@ static int mysql_test_update(Prepared_statement *stmt, table_list->register_want_access(want_privilege); #endif thd->lex->select_lex.no_wrap_view_item= TRUE; - res= setup_fields(thd, 0, select->item_list, MARK_COLUMNS_READ, 0, 0); + res= setup_fields(thd, 0, select->item_list, MARK_COLUMNS_READ, 0, NULL, 0); thd->lex->select_lex.no_wrap_view_item= FALSE; if (res) goto error; @@ -1422,7 +1422,8 @@ static int mysql_test_update(Prepared_statement *stmt, (SELECT_ACL & ~table_list->table->grant.privilege); table_list->register_want_access(SELECT_ACL); #endif - if (setup_fields(thd, 0, stmt->lex->value_list, MARK_COLUMNS_NONE, 0, 0) || + if (setup_fields(thd, 0, stmt->lex->value_list, MARK_COLUMNS_NONE, 0, NULL, + 0) || check_unique_table(thd, table_list)) goto error; /* TODO: here we should send types of placeholders to the client. */ @@ -1592,7 +1593,7 @@ static bool mysql_test_do_fields(Prepared_statement *stmt, if (open_normal_and_derived_tables(thd, tables, MYSQL_OPEN_FORCE_SHARED_MDL, DT_PREPARE | DT_CREATE)) DBUG_RETURN(TRUE); - DBUG_RETURN(setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, 0)); + DBUG_RETURN(setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, NULL, 0)); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f9da12aac296ea3381e500c7bd28906139a04280..b9fe8f3162a0c9b343ef44f8a9bf763ef7fd5af2 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -797,7 +797,7 @@ JOIN::prepare(Item ***rref_pointer_array, wild_num)) || select_lex->setup_ref_array(thd, real_og_num) || setup_fields(thd, (*rref_pointer_array), fields_list, MARK_COLUMNS_READ, - &all_fields, 1) || + &all_fields, &select_lex->pre_fix, 1) || setup_without_group(thd, (*rref_pointer_array), tables_list, select_lex->leaf_tables, fields_list, all_fields, &conds, order, group_list, @@ -7874,9 +7874,11 @@ best_extension_by_limited_search(JOIN *join, best_access_path(join, s, remaining_tables, idx, disable_jbuf, record_count, join->positions + idx, &loose_scan_pos); - /* Compute the cost of extending the plan with 's' */ - - current_record_count= record_count * position->records_read; + /* Compute the cost of extending the plan with 's', avoid overflow */ + if (position->records_read < DBL_MAX / record_count) + current_record_count= record_count * position->records_read; + else + current_record_count= DBL_MAX; current_read_time=read_time + position->read_time + current_record_count / (double) TIME_FOR_COMPARE; @@ -14639,10 +14641,23 @@ simplify_joins(JOIN *join, List *join_list, COND *conds, bool top, nested_join= table->nested_join; if (table->sj_on_expr && !in_sj) { - /* - If this is a semi-join that is not contained within another semi-join, - leave it intact (otherwise it is flattened) - */ + /* + If this is a semi-join that is not contained within another semi-join + leave it intact (otherwise it is flattened) + */ + /* + Make sure that any semi-join appear in + the join->select_lex->sj_nests list only once + */ + List_iterator_fast sj_it(join->select_lex->sj_nests); + TABLE_LIST *sj_nest; + while ((sj_nest= sj_it++)) + { + if (table == sj_nest) + break; + } + if (sj_nest) + continue; join->select_lex->sj_nests.push_back(table, join->thd->mem_root); /* diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 953842e29d1e11cfaaef12d11ff0a3b9f06ba9a8..2c02f9326db876f4f42e98c54c8c80761a1dfedd 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -126,6 +126,12 @@ bool get_lookup_field_values(THD *, COND *, TABLE_LIST *, LOOKUP_FIELD_VALUES *) ** List all table types supported ***************************************************************************/ + +static bool is_show_command(THD *thd) +{ + return sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND; +} + static int make_version_string(char *buf, int buf_length, uint version) { return my_snprintf(buf, buf_length, "%d.%d", version>>8,version&0xff); @@ -265,7 +271,7 @@ int fill_plugins(THD *thd, TABLE_LIST *tables, COND *cond) TABLE *table= tables->table; if (plugin_foreach_with_mask(thd, show_plugins, MYSQL_ANY_PLUGIN, - ~PLUGIN_IS_FREED, table)) + ~(PLUGIN_IS_FREED | PLUGIN_IS_DYING), table)) DBUG_RETURN(1); DBUG_RETURN(0); @@ -973,13 +979,20 @@ find_files(THD *thd, Dynamic_array *files, LEX_STRING *db, if (tl.add_file(file->name)) goto err; } - tl.sort(); } else { if (ha_discover_table_names(thd, db, dirp, &tl, false)) goto err; } +#if MYSQL_VERSION_ID < 100300 + /* incomplete optimization, but a less drastic change in GA version */ + if (!thd->lex->select_lex.order_list.elements && + !thd->lex->select_lex.group_list.elements) +#else + if (is_show_command(thd)) +#endif + tl.sort(); DBUG_PRINT("info",("found: %zu files", files->elements())); my_dirend(dirp); @@ -3640,6 +3653,15 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table) return 0; } } + else if (item->type() == Item::ROW_ITEM) + { + Item_row *item_row= static_cast(item); + for (uint i= 0; i < item_row->cols(); i++) + { + if (!uses_only_table_name_fields(item_row->element_index(i), table)) + return 0; + } + } else if (item->type() == Item::FIELD_ITEM) { Item_field *item_field= (Item_field*)item; @@ -3659,6 +3681,11 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table) strlen(item_field->field_name), 0))) return 0; } + else if (item->type() == Item::EXPR_CACHE_ITEM) + { + Item_cache_wrapper *tmp= static_cast(item); + return uses_only_table_name_fields(tmp->get_orig_item(), table); + } else if (item->type() == Item::REF_ITEM) return uses_only_table_name_fields(item->real_item(), table); @@ -4051,7 +4078,7 @@ make_table_name_list(THD *thd, Dynamic_array *table_names, */ if (res == FIND_FILES_DIR) { - if (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) + if (is_show_command(thd)) return 1; thd->clear_error(); return 2; @@ -5586,7 +5613,8 @@ int fill_schema_engines(THD *thd, TABLE_LIST *tables, COND *cond) DBUG_ENTER("fill_schema_engines"); if (plugin_foreach_with_mask(thd, iter_schema_engines, MYSQL_STORAGE_ENGINE_PLUGIN, - ~PLUGIN_IS_FREED, tables->table)) + ~(PLUGIN_IS_FREED | PLUGIN_IS_DYING), + tables->table)) DBUG_RETURN(1); DBUG_RETURN(0); } @@ -5871,13 +5899,13 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table, val_int() == TYPE_ENUM_PROCEDURE)) return 0; - if ((lex->sql_command == SQLCOM_SHOW_STATUS_PROC && + if (!is_show_command(thd) || + (lex->sql_command == SQLCOM_SHOW_STATUS_PROC && proc_table->field[MYSQL_PROC_MYSQL_TYPE]->val_int() == TYPE_ENUM_PROCEDURE) || (lex->sql_command == SQLCOM_SHOW_STATUS_FUNC && proc_table->field[MYSQL_PROC_MYSQL_TYPE]->val_int() == - TYPE_ENUM_FUNCTION) || - (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0) + TYPE_ENUM_FUNCTION)) { restore_record(table, s->default_values); if (!wild || !wild[0] || !wild_case_compare(system_charset_info, @@ -6009,6 +6037,10 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond) DBUG_RETURN(1); } + /* Disable padding temporarily so it doesn't break the query */ + ulonglong sql_mode_was = thd->variables.sql_mode; + thd->variables.sql_mode &= ~MODE_PAD_CHAR_TO_FULL_LENGTH; + if (proc_table->file->ha_index_init(0, 1)) { res= 1; @@ -6044,6 +6076,7 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond) (void) proc_table->file->ha_index_end(); close_system_tables(thd, &open_tables_state_backup); + thd->variables.sql_mode = sql_mode_was; DBUG_RETURN(res); } @@ -7626,7 +7659,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) tmp_table_param->field_count= field_count; tmp_table_param->schema_table= 1; SELECT_LEX *select_lex= thd->lex->current_select; - bool keep_row_order= sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND; + bool keep_row_order= is_show_command(thd); if (!(table= create_tmp_table(thd, tmp_table_param, field_list, (ORDER*) 0, 0, 0, (select_lex->options | thd->variables.option_bits | diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 2751c79a0a4c603d4d2e7a516b6d23746d2e1519..24b86169d0fa224cd39eff8f2b574428fcb66df5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4161,7 +4161,8 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, if (!sql_field->def && !sql_field->has_default_function() && (sql_field->flags & NOT_NULL_FLAG) && - !is_timestamp_type(sql_field->sql_type)) + (!is_timestamp_type(sql_field->sql_type) || + opt_explicit_defaults_for_timestamp)) { sql_field->flags|= NO_DEFAULT_VALUE_FLAG; sql_field->pack_flag|= FIELDFLAG_NO_DEFAULT; @@ -4170,6 +4171,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, if (thd->variables.sql_mode & MODE_NO_ZERO_DATE && !sql_field->def && !sql_field->vcol_info && is_timestamp_type(sql_field->sql_type) && + !opt_explicit_defaults_for_timestamp && (sql_field->flags & NOT_NULL_FLAG) && (type == Field::NONE || type == Field::TIMESTAMP_UN_FIELD)) { @@ -6902,7 +6904,6 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled, case Alter_info::LEAVE_AS_IS: if (!indexes_were_disabled) break; - /* disabled indexes */ /* fall through */ case Alter_info::DISABLE: error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index a87261aa34b2cc0527ed0a73336a8ff457e4d39c..e1d22e6a1e9ff95c477da8b873b6d1a898804bed 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -359,7 +359,7 @@ int mysql_update(THD *thd, table_list->grant.want_privilege= table->grant.want_privilege= (SELECT_ACL & ~table->grant.privilege); #endif - if (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, 0)) + if (setup_fields(thd, 0, values, MARK_COLUMNS_READ, 0, NULL, 0)) { free_underlaid_joins(thd, select_lex); DBUG_RETURN(1); /* purecov: inspected */ @@ -1711,7 +1711,7 @@ int multi_update::prepare(List ¬_used_values, reference tables */ - int error= setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, 0); + int error= setup_fields(thd, 0, *values, MARK_COLUMNS_READ, 0, NULL, 0); ti.rewind(); while ((table_ref= ti++)) diff --git a/sql/sql_yacc.cc b/sql/sql_yacc.cc index f559fd99a2214b5c5fbf7bca249025a647dec288..27d63955c1c6d34fcb66637ee38cb873ff802c84 100644 --- a/sql/sql_yacc.cc +++ b/sql/sql_yacc.cc @@ -2816,245 +2816,245 @@ static const yytype_uint16 yyrline[] = 4472, 4473, 4474, 4475, 4476, 4477, 4481, 4485, 4486, 4487, 4491, 4492, 4493, 4498, 4506, 4514, 4522, 4535, 4548, 4553, 4558, 4566, 4574, 4582, 4590, 4598, 4606, 4614, 4624, 4634, - 4644, 4646, 4650, 4655, 4665, 4666, 4711, 4710, 4713, 4719, - 4719, 4720, 4734, 4735, 4739, 4741, 4740, 4744, 4743, 4749, - 4786, 4787, 4792, 4791, 4810, 4825, 4824, 4841, 4845, 4853, - 4852, 4855, 4857, 4859, 4861, 4866, 4867, 4873, 4874, 4891, - 4892, 4896, 4897, 4901, 4917, 4927, 4938, 4947, 4948, 4961, - 4963, 4962, 4967, 4965, 4976, 4977, 4981, 4996, 5012, 5013, - 5026, 5035, 5057, 5058, 5063, 5062, 5087, 5099, 5115, 5114, - 5129, 5128, 5145, 5167, 5171, 5200, 5212, 5213, 5218, 5229, - 5217, 5254, 5255, 5259, 5272, 5293, 5306, 5332, 5333, 5338, - 5337, 5375, 5384, 5385, 5389, 5390, 5394, 5396, 5402, 5408, - 5410, 5412, 5414, 5416, 5418, 5428, 5443, 5427, 5457, 5458, - 5462, 5463, 5467, 5468, 5472, 5473, 5478, 5481, 5489, 5492, - 5499, 5503, 5509, 5511, 5515, 5516, 5520, 5521, 5522, 5526, - 5531, 5536, 5541, 5546, 5551, 5556, 5561, 5576, 5582, 5597, - 5602, 5617, 5623, 5641, 5646, 5651, 5656, 5661, 5666, 5672, - 5671, 5697, 5698, 5699, 5704, 5709, 5714, 5716, 5718, 5720, - 5726, 5731, 5736, 5744, 5752, 5758, 5767, 5775, 5792, 5813, - 5824, 5825, 5826, 5827, 5828, 5829, 5830, 5834, 5835, 5836, - 5840, 5841, 5842, 5843, 5848, 5855, 5856, 5860, 5861, 5865, - 5866, 5871, 5870, 5878, 5877, 5885, 5884, 5892, 5891, 5901, - 5898, 5909, 5907, 5916, 5915, 5950, 5953, 5955, 5959, 5963, - 5964, 5968, 5973, 5986, 5972, 6005, 6006, 6012, 6013, 6018, - 6021, 6025, 6032, 6033, 6037, 6038, 6042, 6048, 6054, 6058, - 6071, 6088, 6089, 6090, 6105, 6110, 6114, 6119, 6124, 6128, - 6133, 6138, 6144, 6149, 6155, 6159, 6164, 6169, 6187, 6189, - 6192, 6209, 6212, 6217, 6222, 6233, 6238, 6243, 6248, 6250, - 6252, 6254, 6256, 6258, 6260, 6262, 6264, 6266, 6268, 6270, - 6279, 6280, 6281, 6287, 6288, 6289, 6290, 6291, 6295, 6299, - 6300, 6304, 6305, 6309, 6310, 6311, 6312, 6313, 6317, 6318, - 6319, 6320, 6321, 6325, 6330, 6332, 6338, 6340, 6348, 6349, - 6351, 6356, 6365, 6366, 6370, 6371, 6375, 6376, 6377, 6381, - 6382, 6383, 6384, 6387, 6388, 6392, 6393, 6397, 6398, 6402, - 6403, 6407, 6408, 6409, 6410, 6417, 6418, 6424, 6430, 6436, - 6442, 6443, 6450, 6458, 6466, 6472, 6481, 6496, 6502, 6507, - 6508, 6512, 6517, 6521, 6522, 6526, 6527, 6531, 6537, 6541, - 6542, 6546, 6554, 6555, 6559, 6560, 6564, 6565, 6569, 6570, - 6571, 6579, 6580, 6581, 6582, 6583, 6587, 6588, 6593, 6592, - 6605, 6606, 6610, 6613, 6614, 6615, 6616, 6620, 6628, 6635, - 6636, 6640, 6650, 6651, 6655, 6656, 6659, 6661, 6665, 6677, - 6678, 6682, 6689, 6702, 6703, 6705, 6707, 6713, 6718, 6724, - 6730, 6737, 6747, 6748, 6749, 6750, 6751, 6755, 6756, 6760, - 6761, 6765, 6766, 6770, 6771, 6772, 6776, 6777, 6781, 6785, - 6797, 6798, 6802, 6803, 6807, 6808, 6812, 6813, 6817, 6818, - 6822, 6823, 6827, 6828, 6832, 6833, 6834, 6837, 6839, 6844, - 6846, 6848, 6856, 6864, 6870, 6878, 6879, 6883, 6887, 6888, - 6898, 6899, 6900, 6904, 6908, 6915, 6921, 6933, 6934, 6938, - 6939, 6943, 6945, 6954, 6968, 6953, 6988, 6987, 7001, 7010, - 7009, 7025, 7024, 7040, 7039, 7055, 7049, 7066, 7065, 7100, - 7105, 7110, 7115, 7121, 7120, 7129, 7130, 7131, 7132, 7136, - 7137, 7149, 7150, 7154, 7155, 7158, 7160, 7168, 7176, 7178, - 7180, 7181, 7189, 7190, 7196, 7205, 7203, 7216, 7229, 7228, - 7241, 7239, 7252, 7259, 7269, 7270, 7297, 7304, 7308, 7314, - 7312, 7331, 7333, 7338, 7346, 7345, 7361, 7365, 7364, 7376, - 7377, 7381, 7397, 7398, 7402, 7410, 7414, 7419, 7424, 7431, - 7438, 7448, 7458, 7469, 7479, 7485, 7491, 7500, 7510, 7526, - 7540, 7550, 7554, 7559, 7560, 7563, 7565, 7566, 7567, 7568, - 7571, 7576, 7584, 7589, 7597, 7598, 7602, 7603, 7607, 7607, - 7610, 7612, 7616, 7617, 7621, 7622, 7630, 7631, 7632, 7636, - 7637, 7642, 7650, 7651, 7652, 7653, 7658, 7657, 7667, 7666, - 7673, 7680, 7690, 7707, 7710, 7717, 7721, 7728, 7732, 7736, - 7743, 7743, 7749, 7750, 7754, 7755, 7756, 7760, 7761, 7770, - 7777, 7778, 7783, 7782, 7794, 7795, 7796, 7800, 7801, 7801, - 7806, 7805, 7826, 7827, 7831, 7832, 7836, 7837, 7838, 7842, - 7843, 7848, 7847, 7868, 7869, 7873, 7878, 7879, 7886, 7888, - 7892, 7894, 7893, 7905, 7907, 7906, 7919, 7920, 7925, 7934, - 7935, 7936, 7940, 7947, 7957, 7965, 7966, 7966, 7970, 7969, - 7992, 7993, 7997, 7998, 8002, 8003, 8004, 8005, 8006, 8007, - 8011, 8012, 8017, 8016, 8037, 8038, 8039, 8044, 8043, 8049, - 8056, 8062, 8071, 8072, 8076, 8090, 8089, 8102, 8103, 8107, - 8108, 8112, 8122, 8132, 8133, 8138, 8137, 8148, 8149, 8153, - 8154, 8158, 8168, 8179, 8178, 8186, 8186, 8195, 8196, 8201, - 8202, 8211, 8220, 8221, 8225, 8225, 8237, 8242, 8242, 8251, - 8256, 8255, 8270, 8274, 8275, 8296, 8296, 8310, 8321, 8324, - 8326, 8330, 8336, 8343, 8345, 8353, 8354, 8358, 8359, 8376, - 8395, 8397, 8404, 8415, 8416, 8417, 8431, 8436, 8458, 8464, - 8470, 8476, 8477, 8478, 8479, 8480, 8484, 8485, 8486, 8490, - 8491, 8492, 8496, 8497, 8502, 8553, 8560, 8603, 8609, 8615, - 8621, 8627, 8633, 8639, 8645, 8649, 8655, 8661, 8667, 8673, - 8679, 8683, 8689, 8698, 8704, 8712, 8718, 8728, 8734, 8743, - 8753, 8760, 8770, 8776, 8785, 8789, 8795, 8801, 8807, 8813, - 8819, 8825, 8831, 8837, 8843, 8849, 8855, 8861, 8867, 8873, - 8877, 8878, 8882, 8883, 8887, 8888, 8892, 8893, 8897, 8898, - 8899, 8900, 8901, 8902, 8906, 8907, 8912, 8918, 8922, 8929, - 8936, 8943, 8950, 8957, 8963, 8962, 8970, 8977, 8984, 8992, - 9003, 9025, 9032, 9040, 9041, 9042, 9043, 9044, 9045, 9056, - 9057, 9058, 9059, 9060, 9066, 9070, 9076, 9082, 9088, 9094, - 9096, 9103, 9110, 9116, 9140, 9150, 9157, 9165, 9171, 9178, - 9184, 9194, 9201, 9217, 9223, 9229, 9238, 9247, 9253, 9259, - 9265, 9271, 9285, 9296, 9302, 9308, 9314, 9320, 9326, 9333, - 9340, 9346, 9352, 9358, 9364, 9370, 9376, 9382, 9388, 9394, - 9402, 9423, 9430, 9436, 9443, 9450, 9457, 9464, 9470, 9476, - 9483, 9489, 9496, 9502, 9508, 9514, 9520, 9526, 9544, 9550, - 9556, 9563, 9570, 9578, 9585, 9592, 9599, 9606, 9623, 9629, - 9635, 9641, 9647, 9654, 9660, 9666, 9672, 9678, 9684, 9690, - 9697, 9705, 9711, 9717, 9723, 9729, 9737, 9743, 9757, 9763, - 9769, 9777, 9789, 9796, 9811, 9817, 9824, 9831, 9838, 9845, - 9852, 9856, 9876, 9875, 9947, 9985, 9987, 9992, 9993, 9997, - 9998, 10002, 10003, 10007, 10014, 10022, 10049, 10055, 10061, 10067, - 10073, 10079, 10088, 10095, 10097, 10094, 10104, 10115, 10121, 10127, - 10133, 10139, 10145, 10151, 10157, 10163, 10170, 10169, 10189, 10188, - 10200, 10210, 10218, 10234, 10235, 10240, 10245, 10248, 10251, 10250, - 10266, 10268, 10274, 10273, 10290, 10293, 10292, 10296, 10298, 10300, - 10302, 10304, 10306, 10308, 10310, 10316, 10322, 10325, 10324, 10330, - 10331, 10335, 10342, 10350, 10351, 10355, 10362, 10370, 10371, 10375, - 10376, 10380, 10388, 10399, 10400, 10412, 10423, 10424, 10430, 10431, - 10451, 10455, 10453, 10471, 10469, 10480, 10490, 10488, 10506, 10505, - 10515, 10526, 10524, 10543, 10542, 10553, 10565, 10566, 10567, 10571, - 10572, 10580, 10581, 10585, 10600, 10600, 10615, 10651, 10736, 10747, - 10744, 10769, 10782, 10782, 10798, 10797, 10818, 10835, 10818, 10842, - 10846, 10869, 10870, 10875, 10878, 10879, 10880, 10884, 10885, 10890, - 10889, 10895, 10894, 10902, 10903, 10906, 10908, 10908, 10912, 10912, - 10917, 10918, 10922, 10924, 10929, 10930, 10934, 10945, 10958, 10959, - 10960, 10961, 10962, 10963, 10964, 10965, 10966, 10967, 10968, 10969, - 10973, 10974, 10975, 10976, 10977, 10978, 10979, 10980, 10981, 10985, - 10986, 10987, 10988, 10991, 10993, 10994, 10998, 10999, 11007, 11009, - 11013, 11015, 11014, 11028, 11031, 11030, 11045, 11051, 11065, 11067, - 11071, 11073, 11078, 11079, 11096, 11118, 11122, 11123, 11127, 11139, - 11141, 11146, 11145, 11195, 11197, 11202, 11203, 11204, 11208, 11209, - 11213, 11226, 11233, 11238, 11245, 11252, 11259, 11269, 11296, 11300, - 11306, 11312, 11321, 11329, 11333, 11340, 11341, 11345, 11346, 11347, - 11351, 11352, 11353, 11354, 11355, 11356, 11360, 11361, 11362, 11363, - 11364, 11368, 11369, 11370, 11371, 11372, 11376, 11377, 11378, 11379, - 11380, 11384, 11389, 11390, 11394, 11395, 11399, 11401, 11400, 11438, - 11439, 11443, 11444, 11448, 11458, 11458, 11469, 11470, 11473, 11493, - 11497, 11511, 11512, 11517, 11516, 11526, 11536, 11525, 11538, 11551, - 11563, 11562, 11580, 11579, 11588, 11588, 11605, 11611, 11626, 11642, - 11650, 11654, 11659, 11658, 11667, 11672, 11678, 11683, 11688, 11696, - 11697, 11701, 11712, 11725, 11726, 11730, 11742, 11746, 11755, 11758, - 11765, 11766, 11774, 11782, 11773, 11792, 11799, 11791, 11809, 11817, - 11818, 11826, 11830, 11831, 11842, 11843, 11847, 11856, 11857, 11858, - 11860, 11859, 11870, 11872, 11876, 11877, 11879, 11878, 11882, 11881, - 11887, 11888, 11892, 11893, 11897, 11907, 11908, 11912, 11913, 11918, - 11917, 11931, 11932, 11936, 11941, 11949, 11950, 11958, 11960, 11960, - 11968, 11976, 11967, 11998, 11999, 12003, 12011, 12012, 12016, 12026, - 12027, 12034, 12033, 12049, 12060, 12048, 12063, 12062, 12074, 12073, - 12086, 12088, 12092, 12093, 12097, 12110, 12126, 12127, 12131, 12132, - 12136, 12137, 12138, 12143, 12142, 12163, 12165, 12168, 12170, 12173, - 12174, 12177, 12181, 12185, 12189, 12193, 12197, 12201, 12205, 12209, - 12217, 12220, 12230, 12229, 12245, 12252, 12260, 12268, 12276, 12284, - 12292, 12299, 12306, 12312, 12314, 12316, 12325, 12329, 12334, 12333, - 12340, 12339, 12344, 12353, 12360, 12365, 12370, 12375, 12377, 12379, - 12381, 12383, 12385, 12392, 12400, 12402, 12410, 12417, 12424, 12431, - 12437, 12442, 12450, 12458, 12462, 12467, 12474, 12479, 12486, 12493, - 12499, 12506, 12513, 12518, 12523, 12528, 12535, 12557, 12559, 12561, - 12566, 12567, 12570, 12572, 12576, 12577, 12581, 12582, 12586, 12587, - 12591, 12592, 12596, 12597, 12601, 12602, 12610, 12622, 12621, 12637, - 12636, 12646, 12647, 12648, 12649, 12650, 12654, 12655, 12659, 12666, - 12667, 12668, 12672, 12673, 12685, 12686, 12687, 12702, 12701, 12714, - 12713, 12725, 12729, 12730, 12743, 12746, 12745, 12757, 12758, 12763, - 12765, 12767, 12769, 12771, 12773, 12781, 12783, 12785, 12787, 12792, - 12794, 12802, 12804, 12806, 12808, 12824, 12825, 12829, 12830, 12834, - 12833, 12843, 12844, 12848, 12848, 12852, 12851, 12857, 12861, 12862, - 12866, 12867, 12875, 12874, 12885, 12889, 12893, 12906, 12905, 12920, - 12921, 12922, 12925, 12926, 12927, 12928, 12936, 12940, 12949, 12955, - 12967, 12978, 12988, 12998, 12966, 13006, 13007, 13011, 13012, 13016, - 13017, 13025, 13029, 13030, 13031, 13034, 13036, 13040, 13041, 13045, - 13050, 13057, 13062, 13069, 13071, 13075, 13076, 13080, 13085, 13093, - 13094, 13097, 13099, 13107, 13108, 13112, 13113, 13114, 13118, 13120, - 13125, 13126, 13135, 13136, 13140, 13141, 13145, 13158, 13182, 13194, - 13201, 13220, 13228, 13233, 13246, 13255, 13271, 13288, 13289, 13290, - 13298, 13299, 13300, 13301, 13315, 13321, 13327, 13333, 13339, 13345, - 13363, 13373, 13383, 13389, 13398, 13410, 13416, 13422, 13438, 13439, - 13443, 13452, 13467, 13471, 13514, 13518, 13535, 13539, 13611, 13635, - 13665, 13666, 13676, 13683, 13687, 13693, 13699, 13709, 13715, 13724, - 13734, 13735, 13763, 13777, 13791, 13806, 13807, 13817, 13818, 13828, - 13829, 13830, 13834, 13847, 13877, 13887, 13887, 13889, 13899, 13900, - 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, - 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, - 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, - 13931, 13932, 13933, 13934, 13935, 13936, 13937, 13938, 13939, 13940, - 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, - 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13969, - 13970, 13971, 13972, 13973, 13974, 13975, 13976, 13977, 13978, 13979, - 13980, 13981, 13982, 13983, 13984, 13985, 13986, 13987, 13988, 13989, - 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, - 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, - 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14023, - 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, - 14034, 14035, 14036, 14037, 14038, 14039, 14040, 14041, 14042, 14043, - 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, - 14054, 14055, 14056, 14057, 14058, 14059, 14060, 14061, 14062, 14063, - 14064, 14065, 14066, 14067, 14068, 14069, 14070, 14071, 14072, 14073, - 14074, 14075, 14076, 14077, 14078, 14079, 14080, 14081, 14082, 14083, - 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, - 14094, 14095, 14096, 14097, 14098, 14099, 14100, 14101, 14102, 14103, - 14104, 14105, 14106, 14107, 14108, 14109, 14110, 14111, 14112, 14113, - 14114, 14115, 14116, 14117, 14118, 14119, 14120, 14121, 14122, 14123, - 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, - 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14141, 14142, 14143, - 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, - 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, - 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14171, 14172, 14173, - 14174, 14175, 14176, 14177, 14178, 14179, 14180, 14181, 14182, 14183, - 14184, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, - 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, - 14204, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, - 14214, 14215, 14216, 14217, 14218, 14219, 14220, 14221, 14222, 14223, - 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, - 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, - 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, - 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14263, - 14264, 14265, 14266, 14267, 14268, 14269, 14270, 14271, 14272, 14273, - 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14293, 14292, - 14305, 14313, 14304, 14330, 14331, 14336, 14335, 14342, 14341, 14351, - 14350, 14361, 14360, 14366, 14374, 14376, 14381, 14381, 14390, 14389, - 14403, 14402, 14407, 14411, 14412, 14413, 14417, 14418, 14419, 14420, - 14424, 14425, 14426, 14427, 14432, 14456, 14482, 14493, 14505, 14519, - 14534, 14553, 14570, 14582, 14590, 14606, 14632, 14669, 14683, 14684, - 14685, 14686, 14690, 14708, 14726, 14727, 14731, 14732, 14733, 14734, - 14738, 14752, 14756, 14757, 14758, 14768, 14769, 14770, 14776, 14782, - 14794, 14793, 14806, 14807, 14811, 14812, 14816, 14831, 14832, 14833, - 14838, 14839, 14844, 14843, 14860, 14869, 14879, 14878, 14909, 14910, - 14914, 14915, 14919, 14920, 14921, 14922, 14924, 14923, 14936, 14937, - 14938, 14939, 14940, 14946, 14951, 14957, 14968, 14979, 14983, 14990, - 14999, 15001, 15006, 15011, 15018, 15030, 15042, 15049, 15061, 15062, - 15065, 15066, 15069, 15074, 15082, 15092, 15111, 15114, 15116, 15120, - 15121, 15128, 15130, 15134, 15135, 15140, 15139, 15143, 15142, 15146, - 15145, 15149, 15148, 15151, 15152, 15153, 15154, 15155, 15156, 15157, - 15158, 15159, 15160, 15161, 15162, 15163, 15164, 15165, 15166, 15167, - 15168, 15169, 15170, 15171, 15172, 15173, 15174, 15175, 15176, 15180, - 15181, 15185, 15186, 15190, 15197, 15204, 15214, 15225, 15234, 15243, - 15255, 15260, 15268, 15273, 15281, 15286, 15293, 15293, 15294, 15294, - 15297, 15304, 15309, 15315, 15321, 15327, 15331, 15335, 15336, 15340, - 15368, 15370, 15374, 15378, 15382, 15389, 15390, 15394, 15395, 15399, - 15400, 15404, 15405, 15411, 15417, 15423, 15429, 15439, 15438, 15448, - 15457, 15458, 15462, 15463, 15468, 15469, 15470, 15475, 15476, 15477, - 15481, 15482, 15486, 15498, 15507, 15517, 15526, 15540, 15541, 15546, - 15545, 15561, 15562, 15566, 15567, 15571, 15571, 15592, 15593, 15597, - 15598, 15599, 15603, 15608, 15616, 15619, 15617, 15632, 15639, 15660, - 15684, 15686, 15690, 15691, 15695, 15696, 15704, 15705, 15706, 15707, - 15713, 15719, 15729, 15731, 15733, 15738, 15739, 15740, 15741, 15742, - 15746, 15747, 15748, 15749, 15750, 15751, 15761, 15762, 15767, 15780, - 15796, 15798, 15800, 15806, 15807, 15809, 15815, 15814, 15833, 15834, - 15838, 15844, 15853, 15853, 15877, 15878, 15883, 15884, 15886, 15888, - 15902, 15911, 15917, 15922, 15899, 15972, 15973, 15977, 15997, 16018, - 16022, 16028, 16034, 15993, 16093, 16105, 16114, 16118, 16092, 16135, - 16139, 16143, 16147, 16151, 16155, 16162, 16169, 16176, 16186, 16187, - 16191, 16192, 16193, 16197, 16198, 16203, 16205, 16204, 16210, 16211, - 16215, 16222, 16232, 16238, 16249 + 4644, 4646, 4650, 4655, 4665, 4666, 4705, 4704, 4707, 4713, + 4713, 4714, 4728, 4729, 4733, 4735, 4734, 4738, 4737, 4743, + 4780, 4781, 4786, 4785, 4804, 4819, 4818, 4835, 4839, 4847, + 4846, 4849, 4851, 4853, 4855, 4860, 4861, 4867, 4868, 4885, + 4886, 4890, 4891, 4895, 4911, 4921, 4932, 4941, 4942, 4955, + 4957, 4956, 4961, 4959, 4970, 4971, 4975, 4990, 5006, 5007, + 5020, 5029, 5051, 5052, 5057, 5056, 5081, 5093, 5109, 5108, + 5123, 5122, 5139, 5161, 5165, 5194, 5206, 5207, 5212, 5223, + 5211, 5248, 5249, 5253, 5266, 5287, 5300, 5326, 5327, 5332, + 5331, 5369, 5378, 5379, 5383, 5384, 5388, 5390, 5396, 5402, + 5404, 5406, 5408, 5410, 5412, 5422, 5437, 5421, 5451, 5452, + 5456, 5457, 5461, 5462, 5466, 5467, 5472, 5475, 5483, 5486, + 5493, 5497, 5503, 5505, 5509, 5510, 5514, 5515, 5516, 5520, + 5525, 5530, 5535, 5540, 5545, 5550, 5555, 5570, 5576, 5591, + 5596, 5611, 5617, 5635, 5640, 5645, 5650, 5655, 5660, 5666, + 5665, 5691, 5692, 5693, 5698, 5703, 5708, 5710, 5712, 5714, + 5720, 5725, 5730, 5738, 5746, 5752, 5761, 5769, 5786, 5807, + 5818, 5819, 5820, 5821, 5822, 5823, 5824, 5828, 5829, 5830, + 5834, 5835, 5836, 5837, 5842, 5849, 5850, 5854, 5855, 5859, + 5860, 5865, 5864, 5872, 5871, 5879, 5878, 5886, 5885, 5895, + 5892, 5903, 5901, 5910, 5909, 5944, 5947, 5949, 5953, 5957, + 5958, 5962, 5967, 5980, 5966, 5999, 6000, 6006, 6007, 6012, + 6015, 6019, 6026, 6027, 6031, 6032, 6036, 6042, 6048, 6052, + 6065, 6082, 6083, 6084, 6099, 6104, 6108, 6113, 6118, 6122, + 6127, 6132, 6138, 6143, 6149, 6153, 6158, 6163, 6181, 6183, + 6186, 6203, 6206, 6211, 6216, 6227, 6232, 6237, 6242, 6244, + 6246, 6248, 6250, 6252, 6254, 6256, 6258, 6260, 6262, 6264, + 6273, 6274, 6275, 6281, 6282, 6283, 6284, 6285, 6289, 6293, + 6294, 6298, 6299, 6303, 6304, 6305, 6306, 6307, 6311, 6312, + 6313, 6314, 6315, 6319, 6324, 6326, 6332, 6334, 6342, 6343, + 6345, 6350, 6359, 6360, 6364, 6365, 6369, 6370, 6371, 6375, + 6376, 6377, 6378, 6381, 6382, 6386, 6387, 6391, 6392, 6396, + 6397, 6401, 6402, 6403, 6404, 6411, 6412, 6418, 6424, 6430, + 6436, 6437, 6444, 6452, 6460, 6466, 6475, 6490, 6496, 6501, + 6502, 6506, 6511, 6515, 6516, 6520, 6521, 6525, 6531, 6535, + 6536, 6540, 6548, 6549, 6553, 6554, 6558, 6559, 6563, 6564, + 6565, 6573, 6574, 6575, 6576, 6577, 6581, 6582, 6587, 6586, + 6599, 6600, 6604, 6607, 6608, 6609, 6610, 6614, 6622, 6629, + 6630, 6634, 6644, 6645, 6649, 6650, 6653, 6655, 6659, 6671, + 6672, 6676, 6683, 6696, 6697, 6699, 6701, 6707, 6712, 6718, + 6724, 6731, 6741, 6742, 6743, 6744, 6745, 6749, 6750, 6754, + 6755, 6759, 6760, 6764, 6765, 6766, 6770, 6771, 6775, 6779, + 6791, 6792, 6796, 6797, 6801, 6802, 6806, 6807, 6811, 6812, + 6816, 6817, 6821, 6822, 6826, 6827, 6828, 6831, 6833, 6838, + 6840, 6842, 6850, 6858, 6864, 6872, 6873, 6877, 6881, 6882, + 6892, 6893, 6894, 6898, 6902, 6909, 6915, 6927, 6928, 6932, + 6933, 6937, 6939, 6948, 6962, 6947, 6982, 6981, 6995, 7004, + 7003, 7019, 7018, 7034, 7033, 7049, 7043, 7060, 7059, 7094, + 7099, 7104, 7109, 7115, 7114, 7123, 7124, 7125, 7126, 7130, + 7131, 7143, 7144, 7148, 7149, 7152, 7154, 7162, 7170, 7172, + 7174, 7175, 7183, 7184, 7190, 7199, 7197, 7210, 7223, 7222, + 7235, 7233, 7246, 7253, 7263, 7264, 7291, 7298, 7302, 7308, + 7306, 7325, 7327, 7332, 7340, 7339, 7355, 7359, 7358, 7370, + 7371, 7375, 7391, 7392, 7396, 7404, 7408, 7413, 7418, 7425, + 7432, 7442, 7452, 7463, 7473, 7479, 7485, 7494, 7504, 7520, + 7534, 7544, 7548, 7553, 7554, 7557, 7559, 7560, 7561, 7562, + 7565, 7570, 7578, 7583, 7591, 7592, 7596, 7597, 7601, 7601, + 7604, 7606, 7610, 7611, 7615, 7616, 7624, 7625, 7626, 7630, + 7631, 7636, 7644, 7645, 7646, 7647, 7652, 7651, 7661, 7660, + 7667, 7674, 7684, 7701, 7704, 7711, 7715, 7722, 7726, 7730, + 7737, 7737, 7743, 7744, 7748, 7749, 7750, 7754, 7755, 7764, + 7771, 7772, 7777, 7776, 7788, 7789, 7790, 7794, 7795, 7795, + 7800, 7799, 7820, 7821, 7825, 7826, 7830, 7831, 7832, 7836, + 7837, 7842, 7841, 7862, 7863, 7867, 7872, 7873, 7880, 7882, + 7886, 7888, 7887, 7899, 7901, 7900, 7913, 7914, 7919, 7928, + 7929, 7930, 7934, 7941, 7951, 7959, 7960, 7960, 7964, 7963, + 7986, 7987, 7991, 7992, 7996, 7997, 7998, 7999, 8000, 8001, + 8005, 8006, 8011, 8010, 8031, 8032, 8033, 8038, 8037, 8043, + 8050, 8056, 8065, 8066, 8070, 8084, 8083, 8096, 8097, 8101, + 8102, 8106, 8116, 8126, 8127, 8132, 8131, 8142, 8143, 8147, + 8148, 8152, 8162, 8173, 8172, 8180, 8180, 8189, 8190, 8195, + 8196, 8205, 8214, 8215, 8219, 8219, 8231, 8236, 8236, 8245, + 8250, 8249, 8264, 8268, 8269, 8290, 8290, 8304, 8315, 8318, + 8320, 8324, 8330, 8337, 8339, 8347, 8348, 8352, 8353, 8370, + 8389, 8391, 8398, 8409, 8410, 8411, 8425, 8430, 8452, 8458, + 8464, 8470, 8471, 8472, 8473, 8474, 8478, 8479, 8480, 8484, + 8485, 8486, 8490, 8491, 8496, 8547, 8554, 8597, 8603, 8609, + 8615, 8621, 8627, 8633, 8639, 8643, 8649, 8655, 8661, 8667, + 8673, 8677, 8683, 8692, 8698, 8706, 8712, 8722, 8728, 8737, + 8747, 8754, 8764, 8770, 8779, 8783, 8789, 8795, 8801, 8807, + 8813, 8819, 8825, 8831, 8837, 8843, 8849, 8855, 8861, 8867, + 8871, 8872, 8876, 8877, 8881, 8882, 8886, 8887, 8891, 8892, + 8893, 8894, 8895, 8896, 8900, 8901, 8906, 8912, 8916, 8923, + 8930, 8937, 8944, 8951, 8957, 8956, 8964, 8971, 8978, 8986, + 8997, 9019, 9026, 9034, 9035, 9036, 9037, 9038, 9039, 9050, + 9051, 9052, 9053, 9054, 9060, 9064, 9070, 9076, 9082, 9088, + 9090, 9097, 9104, 9110, 9134, 9144, 9151, 9159, 9165, 9172, + 9178, 9188, 9195, 9211, 9217, 9223, 9232, 9241, 9247, 9253, + 9259, 9265, 9279, 9290, 9296, 9302, 9308, 9314, 9320, 9327, + 9334, 9340, 9346, 9352, 9358, 9364, 9370, 9376, 9382, 9388, + 9396, 9417, 9424, 9430, 9437, 9444, 9451, 9458, 9464, 9470, + 9477, 9483, 9490, 9496, 9502, 9508, 9514, 9520, 9538, 9544, + 9550, 9557, 9564, 9572, 9579, 9586, 9593, 9600, 9617, 9623, + 9629, 9635, 9641, 9648, 9654, 9660, 9666, 9672, 9678, 9684, + 9691, 9699, 9705, 9711, 9717, 9723, 9731, 9737, 9751, 9757, + 9763, 9771, 9783, 9790, 9805, 9811, 9818, 9825, 9832, 9839, + 9846, 9850, 9870, 9869, 9941, 9979, 9981, 9986, 9987, 9991, + 9992, 9996, 9997, 10001, 10008, 10016, 10043, 10049, 10055, 10061, + 10067, 10073, 10082, 10089, 10091, 10088, 10098, 10109, 10115, 10121, + 10127, 10133, 10139, 10145, 10151, 10157, 10164, 10163, 10183, 10182, + 10194, 10204, 10212, 10228, 10229, 10234, 10239, 10242, 10245, 10244, + 10260, 10262, 10268, 10267, 10284, 10287, 10286, 10290, 10292, 10294, + 10296, 10298, 10300, 10302, 10304, 10310, 10316, 10319, 10318, 10324, + 10325, 10329, 10336, 10344, 10345, 10349, 10356, 10364, 10365, 10369, + 10370, 10374, 10382, 10393, 10394, 10406, 10417, 10418, 10424, 10425, + 10445, 10449, 10447, 10465, 10463, 10474, 10484, 10482, 10500, 10499, + 10509, 10520, 10518, 10537, 10536, 10547, 10559, 10560, 10561, 10565, + 10566, 10574, 10575, 10579, 10594, 10594, 10609, 10645, 10730, 10741, + 10738, 10763, 10776, 10776, 10792, 10791, 10812, 10829, 10812, 10836, + 10840, 10863, 10864, 10869, 10872, 10873, 10874, 10878, 10879, 10884, + 10883, 10889, 10888, 10896, 10897, 10900, 10902, 10902, 10906, 10906, + 10911, 10912, 10916, 10918, 10923, 10924, 10928, 10939, 10952, 10953, + 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, + 10967, 10968, 10969, 10970, 10971, 10972, 10973, 10974, 10975, 10979, + 10980, 10981, 10982, 10985, 10987, 10988, 10992, 10993, 11001, 11003, + 11007, 11009, 11008, 11022, 11025, 11024, 11039, 11045, 11059, 11061, + 11065, 11067, 11072, 11073, 11090, 11112, 11116, 11117, 11121, 11133, + 11135, 11140, 11139, 11189, 11191, 11196, 11197, 11198, 11202, 11203, + 11207, 11220, 11227, 11232, 11239, 11246, 11253, 11263, 11290, 11294, + 11300, 11306, 11315, 11323, 11327, 11334, 11335, 11339, 11340, 11341, + 11345, 11346, 11347, 11348, 11349, 11350, 11354, 11355, 11356, 11357, + 11358, 11362, 11363, 11364, 11365, 11366, 11370, 11371, 11372, 11373, + 11374, 11378, 11383, 11384, 11388, 11389, 11393, 11395, 11394, 11432, + 11433, 11437, 11438, 11442, 11452, 11452, 11463, 11464, 11467, 11487, + 11491, 11505, 11506, 11511, 11510, 11520, 11530, 11519, 11532, 11545, + 11557, 11556, 11574, 11573, 11582, 11582, 11599, 11605, 11620, 11636, + 11644, 11648, 11653, 11652, 11661, 11666, 11672, 11677, 11682, 11690, + 11691, 11695, 11706, 11719, 11720, 11724, 11736, 11740, 11749, 11752, + 11759, 11760, 11768, 11776, 11767, 11786, 11793, 11785, 11803, 11811, + 11812, 11820, 11824, 11825, 11836, 11837, 11841, 11850, 11851, 11852, + 11854, 11853, 11864, 11866, 11870, 11871, 11873, 11872, 11876, 11875, + 11881, 11882, 11886, 11887, 11891, 11901, 11902, 11906, 11907, 11912, + 11911, 11925, 11926, 11930, 11935, 11943, 11944, 11952, 11954, 11954, + 11962, 11970, 11961, 11992, 11993, 11997, 12005, 12006, 12010, 12020, + 12021, 12028, 12027, 12043, 12054, 12042, 12057, 12056, 12068, 12067, + 12080, 12082, 12086, 12087, 12091, 12104, 12120, 12121, 12125, 12126, + 12130, 12131, 12132, 12137, 12136, 12157, 12159, 12162, 12164, 12167, + 12168, 12171, 12175, 12179, 12183, 12187, 12191, 12195, 12199, 12203, + 12211, 12214, 12224, 12223, 12239, 12246, 12254, 12262, 12270, 12278, + 12286, 12293, 12300, 12306, 12308, 12310, 12319, 12323, 12328, 12327, + 12334, 12333, 12338, 12347, 12354, 12359, 12364, 12369, 12371, 12373, + 12375, 12377, 12379, 12386, 12394, 12396, 12404, 12411, 12418, 12425, + 12431, 12436, 12444, 12452, 12456, 12461, 12468, 12473, 12480, 12487, + 12493, 12500, 12507, 12512, 12517, 12522, 12529, 12551, 12553, 12555, + 12560, 12561, 12564, 12566, 12570, 12571, 12575, 12576, 12580, 12581, + 12585, 12586, 12590, 12591, 12595, 12596, 12604, 12616, 12615, 12631, + 12630, 12640, 12641, 12642, 12643, 12644, 12648, 12649, 12653, 12660, + 12661, 12662, 12666, 12667, 12679, 12680, 12681, 12696, 12695, 12708, + 12707, 12719, 12723, 12724, 12737, 12740, 12739, 12751, 12752, 12757, + 12759, 12761, 12763, 12765, 12767, 12775, 12777, 12779, 12781, 12786, + 12788, 12796, 12798, 12800, 12802, 12818, 12819, 12823, 12824, 12828, + 12827, 12837, 12838, 12842, 12842, 12846, 12845, 12851, 12855, 12856, + 12860, 12861, 12869, 12868, 12879, 12883, 12887, 12900, 12899, 12914, + 12915, 12916, 12919, 12920, 12921, 12922, 12930, 12934, 12943, 12949, + 12961, 12972, 12982, 12992, 12960, 13000, 13001, 13005, 13006, 13010, + 13011, 13019, 13023, 13024, 13025, 13028, 13030, 13034, 13035, 13039, + 13044, 13051, 13056, 13063, 13065, 13069, 13070, 13074, 13079, 13087, + 13088, 13091, 13093, 13101, 13102, 13106, 13107, 13108, 13112, 13114, + 13119, 13120, 13129, 13130, 13134, 13135, 13139, 13152, 13176, 13188, + 13195, 13214, 13222, 13227, 13240, 13249, 13265, 13282, 13283, 13284, + 13292, 13293, 13294, 13295, 13309, 13315, 13321, 13327, 13333, 13339, + 13357, 13367, 13377, 13383, 13392, 13404, 13410, 13416, 13432, 13433, + 13437, 13446, 13461, 13465, 13508, 13512, 13529, 13533, 13605, 13629, + 13659, 13660, 13670, 13677, 13681, 13687, 13693, 13703, 13709, 13718, + 13728, 13729, 13757, 13771, 13785, 13800, 13801, 13811, 13812, 13822, + 13823, 13824, 13828, 13841, 13871, 13881, 13881, 13883, 13893, 13894, + 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, + 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, + 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, + 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13933, 13934, + 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, + 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13963, + 13964, 13965, 13966, 13967, 13968, 13969, 13970, 13971, 13972, 13973, + 13974, 13975, 13976, 13977, 13978, 13979, 13980, 13981, 13982, 13983, + 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, + 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, + 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14017, + 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, + 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14037, + 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, + 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14057, + 14058, 14059, 14060, 14061, 14062, 14063, 14064, 14065, 14066, 14067, + 14068, 14069, 14070, 14071, 14072, 14073, 14074, 14075, 14076, 14077, + 14078, 14079, 14080, 14081, 14082, 14083, 14084, 14085, 14086, 14087, + 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14096, 14097, + 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, + 14108, 14109, 14110, 14111, 14112, 14113, 14114, 14115, 14116, 14117, + 14118, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, + 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, + 14138, 14139, 14140, 14141, 14142, 14143, 14144, 14145, 14146, 14147, + 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, + 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, + 14168, 14169, 14170, 14171, 14172, 14173, 14174, 14175, 14176, 14177, + 14178, 14179, 14180, 14181, 14182, 14183, 14184, 14185, 14186, 14187, + 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, + 14198, 14199, 14200, 14201, 14202, 14203, 14204, 14205, 14206, 14207, + 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, + 14218, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, + 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, + 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, + 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, + 14258, 14259, 14260, 14261, 14262, 14263, 14264, 14265, 14266, 14267, + 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14287, 14286, + 14299, 14307, 14298, 14324, 14325, 14330, 14329, 14336, 14335, 14345, + 14344, 14355, 14354, 14360, 14368, 14370, 14375, 14375, 14384, 14383, + 14397, 14396, 14401, 14405, 14406, 14407, 14411, 14412, 14413, 14414, + 14418, 14419, 14420, 14421, 14426, 14450, 14476, 14487, 14499, 14513, + 14528, 14547, 14564, 14576, 14584, 14600, 14626, 14663, 14677, 14678, + 14679, 14680, 14684, 14702, 14720, 14721, 14725, 14726, 14727, 14728, + 14732, 14746, 14750, 14751, 14752, 14762, 14763, 14764, 14770, 14776, + 14788, 14787, 14800, 14801, 14805, 14806, 14810, 14825, 14826, 14827, + 14832, 14833, 14838, 14837, 14854, 14863, 14873, 14872, 14903, 14904, + 14908, 14909, 14913, 14914, 14915, 14916, 14918, 14917, 14930, 14931, + 14932, 14933, 14934, 14940, 14945, 14951, 14962, 14973, 14977, 14984, + 14993, 14995, 15000, 15005, 15012, 15024, 15036, 15043, 15055, 15056, + 15059, 15060, 15063, 15068, 15076, 15086, 15105, 15108, 15110, 15114, + 15115, 15122, 15124, 15128, 15129, 15134, 15133, 15137, 15136, 15140, + 15139, 15143, 15142, 15145, 15146, 15147, 15148, 15149, 15150, 15151, + 15152, 15153, 15154, 15155, 15156, 15157, 15158, 15159, 15160, 15161, + 15162, 15163, 15164, 15165, 15166, 15167, 15168, 15169, 15170, 15174, + 15175, 15179, 15180, 15184, 15191, 15198, 15208, 15219, 15228, 15237, + 15249, 15254, 15262, 15267, 15275, 15280, 15287, 15287, 15288, 15288, + 15291, 15298, 15303, 15309, 15315, 15321, 15325, 15329, 15330, 15334, + 15362, 15364, 15368, 15372, 15376, 15383, 15384, 15388, 15389, 15393, + 15394, 15398, 15399, 15405, 15411, 15417, 15423, 15433, 15432, 15442, + 15451, 15452, 15456, 15457, 15462, 15463, 15464, 15469, 15470, 15471, + 15475, 15476, 15480, 15492, 15501, 15511, 15520, 15534, 15535, 15540, + 15539, 15555, 15556, 15560, 15561, 15565, 15565, 15586, 15587, 15591, + 15592, 15593, 15597, 15602, 15610, 15613, 15611, 15626, 15633, 15654, + 15678, 15680, 15684, 15685, 15689, 15690, 15698, 15699, 15700, 15701, + 15707, 15713, 15723, 15725, 15727, 15732, 15733, 15734, 15735, 15736, + 15740, 15741, 15742, 15743, 15744, 15745, 15755, 15756, 15761, 15774, + 15790, 15792, 15794, 15800, 15801, 15803, 15809, 15808, 15827, 15828, + 15832, 15838, 15847, 15847, 15871, 15872, 15877, 15878, 15880, 15882, + 15896, 15905, 15911, 15916, 15893, 15966, 15967, 15971, 15991, 16012, + 16016, 16022, 16028, 15987, 16087, 16099, 16108, 16112, 16086, 16129, + 16133, 16137, 16141, 16145, 16149, 16156, 16163, 16170, 16180, 16181, + 16185, 16186, 16187, 16191, 16192, 16197, 16199, 16198, 16204, 16205, + 16209, 16216, 16226, 16232, 16243 }; #endif @@ -22883,17 +22883,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); switch (end_ptr[0]) { case 'g': - case 'G': - text_shift_number+=10; - /* fall through */ + case 'G': text_shift_number+=30; break; case 'm': - case 'M': - text_shift_number+=10; - /* fall through */ + case 'M': text_shift_number+=20; break; case 'k': - case 'K': - text_shift_number+=10; - break; + case 'K': text_shift_number+=10; break; default: my_yyabort_error((ER_WRONG_SIZE_NUMBER, MYF(0))); } @@ -22905,41 +22899,41 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_WRONG_SIZE_NUMBER, MYF(0))); (yyval.ulonglong_number)= number; } -#line 22909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 476: -#line 4711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.option_list= NULL; } -#line 22915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 477: -#line 4712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 478: -#line 4713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 479: -#line 4719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(1);} -#line 22933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 480: -#line 4719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 481: -#line 4721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.add(DDL_options_st::OPT_LIKE); @@ -22950,53 +22944,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* CREATE TABLE ... LIKE is not allowed for views. */ src_table->required_type= FRMTYPE_TABLE; } -#line 22954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 482: -#line 4734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= (yyvsp[0].table); } -#line 22960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 483: -#line 4735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= (yyvsp[-1].table); } -#line 22966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 484: -#line 4739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 485: -#line 4741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(0);} -#line 22978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 486: -#line 4742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 487: -#line 4744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(1);} -#line 22990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 488: -#line 4745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 22996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 22990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 489: -#line 4750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Remove all tables used in PARTITION clause from the global table @@ -23006,17 +23000,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); last_non_sel_table->next_global= 0; Lex->query_tables_last= &last_non_sel_table->next_global; } -#line 23010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 490: -#line 4786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 492: -#line 4792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info= new (thd->mem_root) partition_info(); @@ -23030,11 +23024,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.flags|= Alter_info::ALTER_PARTITION; } } -#line 23034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 494: -#line 4810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef WITH_PARTITION_STORAGE_ENGINE LEX_STRING partition_name={C_STRING_WITH_LEN("partition")}; @@ -23046,11 +23040,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); "--with-plugin-partition")); #endif } -#line 23050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 495: -#line 4825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!lex->part_info) @@ -23063,82 +23057,82 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); partition info string into part_info data structure. */ } -#line 23067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 496: -#line 4837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 498: -#line 4846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->list_of_part_fields= TRUE; part_info->column_list= FALSE; part_info->part_type= HASH_PARTITION; } -#line 23084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 499: -#line 4853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= HASH_PARTITION; } -#line 23090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 500: -#line 4854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 501: -#line 4856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= RANGE_PARTITION; } -#line 23102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 502: -#line 4858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= RANGE_PARTITION; } -#line 23108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 503: -#line 4860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= LIST_PARTITION; } -#line 23114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 504: -#line 4862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->part_type= LIST_PARTITION; } -#line 23120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 505: -#line 4866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 506: -#line 4868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->linear_hash_ind= TRUE;} -#line 23132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 507: -#line 4873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4867 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;} -#line 23138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 508: -#line 4875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch ((yyvsp[0].ulong_num)) { case 1: @@ -23152,35 +23146,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 509: -#line 4891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 510: -#line 4892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 511: -#line 4896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 512: -#line 4897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 513: -#line 4902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->num_columns++; @@ -23193,21 +23187,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0), "list of partition fields")); } -#line 23197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 514: -#line 4918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->column_list= TRUE; part_info->list_of_part_fields= TRUE; } -#line 23207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 515: -#line 4928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->set_part_expr((yyvsp[-3].simple_string)+1, (yyvsp[-2].item), (yyvsp[-1].simple_string), FALSE)) @@ -23215,26 +23209,26 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->num_columns= 1; part_info->column_list= FALSE; } -#line 23219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 516: -#line 4939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->part_info->set_part_expr((yyvsp[-3].simple_string)+1, (yyvsp[-2].item), (yyvsp[-1].simple_string), TRUE)) { MYSQL_YYABORT; } } -#line 23228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 517: -#line 4947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 518: -#line 4949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint num_parts= (yyvsp[0].ulong_num); partition_info *part_info= Lex->part_info; @@ -23244,57 +23238,57 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->num_parts= num_parts; part_info->use_default_num_partitions= FALSE; } -#line 23248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 519: -#line 4961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 520: -#line 4963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->subpart_type= HASH_PARTITION; } -#line 23260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 521: -#line 4964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 522: -#line 4967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->subpart_type= HASH_PARTITION; part_info->list_of_subpart_fields= TRUE; } -#line 23276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 523: -#line 4972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 524: -#line 4976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 525: -#line 4977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 526: -#line 4982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->subpart_field_list.push_back((yyvsp[0].lex_str).str, thd->mem_root)) @@ -23306,11 +23300,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0), "list of subpartition fields")); } -#line 23310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 527: -#line 4997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 4991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; bool not_corr_func; @@ -23323,17 +23317,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } (yyval.item)=(yyvsp[0].item); } -#line 23327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 528: -#line 5012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 529: -#line 5014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint num_parts= (yyvsp[0].ulong_num); LEX *lex= Lex; @@ -23342,11 +23336,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->part_info->num_subparts= num_parts; lex->part_info->use_default_num_subpartitions= FALSE; } -#line 23346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 530: -#line 5026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->part_type == RANGE_PARTITION) @@ -23356,11 +23350,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0), "LIST")); } -#line 23360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 531: -#line 5036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; uint count_curr_parts= part_info->partitions.elements; @@ -23379,23 +23373,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } part_info->count_curr_subparts= 0; } -#line 23383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 532: -#line 5057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 533: -#line 5058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 534: -#line 5063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; partition_element *p_elem= new (thd->mem_root) partition_element(); @@ -23412,17 +23406,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->use_default_partitions= FALSE; part_info->use_default_num_partitions= FALSE; } -#line 23416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 535: -#line 5083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 536: -#line 5088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; partition_element *p_elem= part_info->curr_part_elem; @@ -23430,11 +23424,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; p_elem->partition_name= (yyvsp[0].lex_str).str; } -#line 23434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 537: -#line 5099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23450,11 +23444,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else part_info->part_type= HASH_PARTITION; } -#line 23454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 538: -#line 5115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23467,17 +23461,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else part_info->part_type= RANGE_PARTITION; } -#line 23471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 539: -#line 5127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 540: -#line 5129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23490,17 +23484,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else part_info->part_type= LIST_PARTITION; } -#line 23494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 541: -#line 5141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 542: -#line 5146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; @@ -23522,17 +23516,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 543: -#line 5167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 544: -#line 5172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23561,11 +23555,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } } } -#line 23565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 545: -#line 5201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->num_columns < 2U) @@ -23574,23 +23568,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 546: -#line 5212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 547: -#line 5213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 548: -#line 5218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->print_debug("( part_value_item", NULL); @@ -23602,17 +23596,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 549: -#line 5229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 550: -#line 5231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->print_debug(") part_value_item", NULL); @@ -23633,23 +23627,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } part_info->curr_list_object= 0; } -#line 23637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 551: -#line 5254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 552: -#line 5255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 553: -#line 5260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->part_type == LIST_PARTITION) @@ -23662,11 +23656,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 554: -#line 5273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; partition_info *part_info= lex->part_info; @@ -23682,11 +23676,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 555: -#line 5293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->num_subparts != 0 && @@ -23700,11 +23694,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 23704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 556: -#line 5307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; if (part_info->num_subparts != 0) @@ -23727,23 +23721,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } part_info->count_curr_subparts= 0; } -#line 23731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 557: -#line 5332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 558: -#line 5333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 559: -#line 5338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; partition_element *curr_part= part_info->current_partition; @@ -23777,113 +23771,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); part_info->use_default_num_subpartitions= FALSE; part_info->count_curr_subparts++; } -#line 23781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 560: -#line 5371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 561: -#line 5376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_ident_length(&(yyvsp[0].lex_str))) MYSQL_YYABORT; Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str; } -#line 23797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 562: -#line 5384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 563: -#line 5385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 564: -#line 5389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 565: -#line 5390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 566: -#line 5395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->tablespace_name= (yyvsp[0].lex_str).str; } -#line 23827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 567: -#line 5397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->curr_part_elem->engine_type= (yyvsp[0].db_type); part_info->default_engine_type= (yyvsp[0].db_type); } -#line 23837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 568: -#line 5403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info->curr_part_elem->connect_string.str= (yyvsp[0].lex_str).str; lex->part_info->curr_part_elem->connect_string.length= (yyvsp[0].lex_str).length; } -#line 23847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 569: -#line 5409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); } -#line 23853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 570: -#line 5411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); } -#line 23859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 571: -#line 5413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); } -#line 23865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 572: -#line 5415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; } -#line 23871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 573: -#line 5417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; } -#line 23877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 574: -#line 5419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; } -#line 23883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 575: -#line 5428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->sql_command == SQLCOM_INSERT) @@ -23898,19 +23892,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); mysql_init_select(lex); lex->current_select->parsing_place= SELECT_LIST; } -#line 23902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 576: -#line 5443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 23910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 577: -#line 5447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* The following work only with the local list, the global list @@ -23918,170 +23912,170 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->current_select->table_list.push_front(&Lex->save_list); } -#line 23922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 578: -#line 5457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 579: -#line 5458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 580: -#line 5462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 581: -#line 5463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 582: -#line 5467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 583: -#line 5468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 584: -#line 5472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 585: -#line 5473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 23970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 586: -#line 5478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= FALSE; } -#line 23978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 587: -#line 5482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= TRUE; } -#line 23986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 588: -#line 5489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).init(); } -#line 23994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 589: -#line 5493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS); } -#line 24002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 23996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 590: -#line 5500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).init(); } -#line 24010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 591: -#line 5504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE); } -#line 24018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 599: -#line 5527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.db_type= (yyvsp[0].db_type); Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; } -#line 24027 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 600: -#line 5532 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.max_rows= (yyvsp[0].ulonglong_number); Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS; } -#line 24036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 601: -#line 5537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.min_rows= (yyvsp[0].ulonglong_number); Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS; } -#line 24045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 602: -#line 5542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.avg_row_length=(yyvsp[0].ulong_num); Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH; } -#line 24054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 603: -#line 5547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.password=(yyvsp[0].lex_str).str; Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD; } -#line 24063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 604: -#line 5552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.comment=(yyvsp[0].lex_str); Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT; } -#line 24072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 605: -#line 5557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.auto_increment_value=(yyvsp[0].ulonglong_number); Lex->create_info.used_fields|= HA_CREATE_USED_AUTO; } -#line 24081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 606: -#line 5562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch((yyvsp[0].ulong_num)) { case 0: @@ -24096,21 +24090,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS; } -#line 24100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 607: -#line 5577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options&= ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS); Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS; } -#line 24110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 608: -#line 5583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch((yyvsp[0].ulong_num)) { case 0: @@ -24125,20 +24119,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC; } -#line 24129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 609: -#line 5598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_DEFAULT; Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC; } -#line 24138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 610: -#line 5603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { switch((yyvsp[0].ulong_num)) { case 0: @@ -24153,21 +24147,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT; } -#line 24157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 611: -#line 5618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options&= ~(HA_OPTION_STATS_PERSISTENT | HA_OPTION_NO_STATS_PERSISTENT); Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT; } -#line 24167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 612: -#line 5624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* From user point of view STATS_SAMPLE_PAGES can be specified as STATS_SAMPLE_PAGES=N (where 0create_info.stats_sample_pages=(yyvsp[0].ulong_num); Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES; } -#line 24189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 613: -#line 5642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.stats_sample_pages=0; Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES; } -#line 24198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 614: -#line 5647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; } -#line 24207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 615: -#line 5652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; } -#line 24216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 616: -#line 5657 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM; Lex->create_info.page_checksum= (yyvsp[0].choice); } -#line 24225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 617: -#line 5662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE; Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE; } -#line 24234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 618: -#line 5667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.row_type= (yyvsp[0].row_type); Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT; } -#line 24243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 619: -#line 5672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->select_lex.table_list.save_and_clear(&Lex->save_list); } -#line 24251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 620: -#line 5676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Move the union list to the merge_list and exclude its tables @@ -24273,84 +24267,84 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_info.used_fields|= HA_CREATE_USED_UNION; } -#line 24277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 623: -#line 5700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.merge_insert_method= (yyvsp[0].ulong_num); Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD; } -#line 24286 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 624: -#line 5705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.data_file_name= (yyvsp[0].lex_str).str; Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR; } -#line 24295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 625: -#line 5710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.index_file_name= (yyvsp[0].lex_str).str; Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR; } -#line 24304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 626: -#line 5715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {Lex->create_info.tablespace= (yyvsp[0].lex_str).str;} -#line 24310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 627: -#line 5717 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {Lex->create_info.storage_media= HA_SM_DISK;} -#line 24316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 628: -#line 5719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {Lex->create_info.storage_media= HA_SM_MEMORY;} -#line 24322 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 629: -#line 5721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.connect_string.str= (yyvsp[0].lex_str).str; Lex->create_info.connect_string.length= (yyvsp[0].lex_str).length; Lex->create_info.used_fields|= HA_CREATE_USED_CONNECTION; } -#line 24332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 630: -#line 5727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE; Lex->create_info.key_block_size= (yyvsp[0].ulong_num); } -#line 24341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 631: -#line 5732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL; Lex->create_info.transactional= (yyvsp[0].choice); } -#line 24350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 632: -#line 5737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -24358,11 +24352,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), true, &Lex->create_info.option_list, &Lex->option_list_last); } -#line 24362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 633: -#line 5745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -24370,40 +24364,40 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), false, &Lex->create_info.option_list, &Lex->option_list_last); } -#line 24374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 634: -#line 5753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].ulonglong_number), &Lex->create_info.option_list, &Lex->option_list_last, thd->mem_root); } -#line 24384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 635: -#line 5759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), &Lex->create_info.option_list, &Lex->option_list_last); } -#line 24394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 636: -#line 5768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))) MYSQL_YYABORT; } -#line 24403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 637: -#line 5776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { HA_CREATE_INFO *cinfo= &Lex->create_info; if ((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) && @@ -24417,11 +24411,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->create_info.default_table_charset= (yyvsp[0].charset); Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET; } -#line 24421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 638: -#line 5793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { plugin_ref plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), thd->lex->create_info.tmp_table()); @@ -24439,11 +24433,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[0].lex_str).str); } } -#line 24443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 639: -#line 5814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { plugin_ref plugin; if ((plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), false))) @@ -24451,199 +24445,199 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str)); } -#line 24455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 640: -#line 5824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_DEFAULT; } -#line 24461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 641: -#line 5825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_FIXED; } -#line 24467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 642: -#line 5826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_DYNAMIC; } -#line 24473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 643: -#line 5827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_COMPRESSED; } -#line 24479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 644: -#line 5828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_REDUNDANT; } -#line 24485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 645: -#line 5829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_COMPACT; } -#line 24491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 646: -#line 5830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.row_type)= ROW_TYPE_PAGE; } -#line 24497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 647: -#line 5834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= MERGE_INSERT_DISABLED; } -#line 24503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 648: -#line 5835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; } -#line 24509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 649: -#line 5836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; } -#line 24515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 650: -#line 5840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) STRING_RESULT; } -#line 24521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 651: -#line 5841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) REAL_RESULT; } -#line 24527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 652: -#line 5842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) DECIMAL_RESULT; } -#line 24533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 653: -#line 5843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num) = (int) INT_RESULT; } -#line 24539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 654: -#line 5849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_last_non_select_table= Lex->last_table(); } -#line 24547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 661: -#line 5871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key(Key::MULTIPLE, (yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))) MYSQL_YYABORT; } -#line 24557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 662: -#line 5876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 663: -#line 5878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key(Key::MULTIPLE, (yyvsp[-2].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))) MYSQL_YYABORT; } -#line 24573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 664: -#line 5883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 665: -#line 5885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-3].key_type), (yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))) MYSQL_YYABORT; } -#line 24589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 666: -#line 5890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 667: -#line 5892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-3].key_type), (yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))) MYSQL_YYABORT; } -#line 24605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 668: -#line 5897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 669: -#line 5901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-3].key_type), (yyvsp[-1].lex_str).str ? (yyvsp[-1].lex_str) : (yyvsp[-4].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))) MYSQL_YYABORT; } -#line 24621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 670: -#line 5906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 671: -#line 5909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_list= NULL; if (Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].lex_str).str ? (yyvsp[-2].lex_str) : (yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))) MYSQL_YYABORT; } -#line 24637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 672: -#line 5914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 673: -#line 5916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->check_add_key((yyvsp[-1].object_ddl_options)) || !(Lex->last_key= (new (thd->mem_root) @@ -24652,11 +24646,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->option_list= NULL; } -#line 24656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 674: -#line 5925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Key *key= (new (thd->mem_root) @@ -24682,35 +24676,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Only used for ALTER TABLE. Ignored otherwise. */ lex->alter_info.flags|= Alter_info::ADD_FOREIGN_KEY; } -#line 24686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 675: -#line 5950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 24692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 679: -#line 5963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 24698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 680: -#line 5964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 24704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 681: -#line 5968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 24710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 682: -#line 5973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Create_field *f= new (thd->mem_root) Create_field(); @@ -24724,17 +24718,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->init_last_field(f, (yyvsp[0].lex_str).str, NULL); } -#line 24728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 683: -#line 5986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_last_field_type((yyvsp[0].field_type)); } -#line 24734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 684: -#line 5988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 5982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Create_field *f= lex->last_field; @@ -24749,91 +24743,91 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (f->flags & (UNIQUE_FLAG | UNIQUE_KEY_FLAG)) add_key_to_list(lex, &(yyvsp[-4].lex_str), Key::UNIQUE, Lex->check_exists); } -#line 24753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 687: -#line 6012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 688: -#line 6013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 689: -#line 6018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE); } -#line 24773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 690: -#line 6022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE); } -#line 24781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 691: -#line 6026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE); } -#line 24789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 692: -#line 6032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 693: -#line 6033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 694: -#line 6037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 24807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 696: -#line 6043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 24817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 697: -#line 6049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 24827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 698: -#line 6054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->comment= (yyvsp[0].lex_str); } -#line 24833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 699: -#line 6059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* "PARSE_VCOL_EXPR" can only be used by the SQL server @@ -24843,11 +24837,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!Lex->parse_vcol_expr) my_yyabort_error((ER_SYNTAX_ERROR, MYF(0))); } -#line 24847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 700: -#line 6072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Virtual_column_info *v= new (thd->mem_root) Virtual_column_info(); if (!v) @@ -24861,23 +24855,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); v->expr_item= (yyvsp[-1].item); Lex->last_field->vcol_info= v; } -#line 24865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 701: -#line 6088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=(yyvsp[-2].field_type); } -#line 24871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 702: -#line 6089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=(yyvsp[-2].field_type); } -#line 24877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 703: -#line 6091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_FLOAT; if (Lex->length && !Lex->dec) @@ -24892,127 +24886,127 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->length= 0; } } -#line 24896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 704: -#line 6106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_BIT; } -#line 24905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 705: -#line 6111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_BIT; } -#line 24913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 706: -#line 6115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_TINY; } -#line 24922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 707: -#line 6120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_TINY; } -#line 24931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 708: -#line 6125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 709: -#line 6129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 710: -#line 6134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_STRING; bincmp_collation(national_charset_info, (yyvsp[0].num)); } -#line 24957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 711: -#line 6139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; (yyval.field_type)=MYSQL_TYPE_STRING; bincmp_collation(national_charset_info, (yyvsp[0].num)); } -#line 24967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 712: -#line 6145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 713: -#line 6150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (char*) "1"; Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_STRING; } -#line 24986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 714: -#line 6156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= MYSQL_TYPE_VARCHAR; } -#line 24994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 715: -#line 6160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= MYSQL_TYPE_VARCHAR; bincmp_collation(national_charset_info, (yyvsp[0].num)); } -#line 25003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 24997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 716: -#line 6165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)= MYSQL_TYPE_VARCHAR; } -#line 25012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 717: -#line 6170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->length) { @@ -25030,24 +25024,24 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } (yyval.field_type)=MYSQL_TYPE_YEAR; } -#line 25034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 718: -#line 6188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_DATE; } -#line 25040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 719: -#line 6190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= opt_mysql56_temporal_format ? MYSQL_TYPE_TIME2 : MYSQL_TYPE_TIME; } -#line 25047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 720: -#line 6193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->variables.sql_mode & MODE_MAXDB) (yyval.field_type)= opt_mysql56_temporal_format ? @@ -25064,36 +25058,36 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); : MYSQL_TYPE_TIMESTAMP; } } -#line 25068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 721: -#line 6210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= opt_mysql56_temporal_format ? MYSQL_TYPE_DATETIME2 : MYSQL_TYPE_DATETIME; } -#line 25075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 722: -#line 6213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_TINY_BLOB; } -#line 25084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 723: -#line 6218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_BLOB; } -#line 25093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 724: -#line 6223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_SPATIAL Lex->charset=&my_charset_bin; @@ -25104,519 +25098,519 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); sym_group_geom.needed_define)); #endif } -#line 25108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 725: -#line 6234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 726: -#line 6239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_LONG_BLOB; } -#line 25126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 727: -#line 6244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset=&my_charset_bin; (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 728: -#line 6249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 729: -#line 6251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_TINY_BLOB; } -#line 25147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 730: -#line 6253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_BLOB; } -#line 25153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 731: -#line 6255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 732: -#line 6257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONG_BLOB; } -#line 25165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 733: -#line 6259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_NEWDECIMAL;} -#line 25171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 734: -#line 6261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_NEWDECIMAL;} -#line 25177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 735: -#line 6263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_NEWDECIMAL;} -#line 25183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 736: -#line 6265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_ENUM; } -#line 25189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 737: -#line 6267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_SET; } -#line 25195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 738: -#line 6269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_MEDIUM_BLOB; } -#line 25201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 739: -#line 6271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONGLONG; Lex->last_field->flags|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | UNIQUE_FLAG); } -#line 25211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 740: -#line 6279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_GEOMETRY; } -#line 25217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 741: -#line 6280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_GEOMETRYCOLLECTION; } -#line 25223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 742: -#line 6282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= const_cast(STRINGIFY_ARG (MAX_LEN_GEOM_POINT_FIELD)); (yyval.geom_type)= Field::GEOM_POINT; } -#line 25233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 743: -#line 6287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_MULTIPOINT; } -#line 25239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 744: -#line 6288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_LINESTRING; } -#line 25245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 745: -#line 6289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_MULTILINESTRING; } -#line 25251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 746: -#line 6290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_POLYGON; } -#line 25257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 747: -#line 6291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.geom_type)= Field::GEOM_MULTIPOLYGON; } -#line 25263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 748: -#line 6295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 749: -#line 6299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 750: -#line 6300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 751: -#line 6304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 752: -#line 6305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 753: -#line 6309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 754: -#line 6310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 755: -#line 6311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 756: -#line 6312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 757: -#line 6313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 758: -#line 6317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONG; } -#line 25329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 759: -#line 6318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_TINY; } -#line 25335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 760: -#line 6319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_SHORT; } -#line 25341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 761: -#line 6320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_INT24; } -#line 25347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 762: -#line 6321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_LONGLONG; } -#line 25353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 763: -#line 6326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ? MYSQL_TYPE_FLOAT : MYSQL_TYPE_DOUBLE; } -#line 25362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 764: -#line 6331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_DOUBLE; } -#line 25368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 765: -#line 6333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)=MYSQL_TYPE_DOUBLE; } -#line 25374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 766: -#line 6338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->srid= 0; } -#line 25380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 767: -#line 6341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->srid=atoi((yyvsp[0].lex_str).str); } -#line 25388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 768: -#line 6348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->dec=Lex->length= (char*)0; } -#line 25394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 769: -#line 6350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->dec= (char*)0; } -#line 25400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 770: -#line 6352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 771: -#line 6357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->length=(yyvsp[-3].lex_str).str; lex->dec=(yyvsp[-1].lex_str).str; } -#line 25416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 772: -#line 6365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 773: -#line 6366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 774: -#line 6370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 775: -#line 6371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 776: -#line 6375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 777: -#line 6376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= UNSIGNED_FLAG;} -#line 25452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 778: -#line 6377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; } -#line 25458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 779: -#line 6381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 780: -#line 6382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 781: -#line 6383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 782: -#line 6384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length= (yyvsp[-1].lex_str).str; } -#line 25482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 783: -#line 6387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->length=(char*) 0; /* use default length */ } -#line 25488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 784: -#line 6388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 25494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 785: -#line 6392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 786: -#line 6393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 787: -#line 6397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 788: -#line 6398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 789: -#line 6402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 791: -#line 6407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags&= ~ NOT_NULL_FLAG; } -#line 25530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 792: -#line 6408 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= NOT_NULL_FLAG; } -#line 25536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 793: -#line 6409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->def= (yyvsp[0].item); } -#line 25542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 794: -#line 6411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num)); if (item == NULL) MYSQL_YYABORT; Lex->last_field->on_update= item; } -#line 25553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 795: -#line 6417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; } -#line 25559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 796: -#line 6419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 797: -#line 6425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= PRI_KEY_FLAG | NOT_NULL_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 798: -#line 6431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 799: -#line 6437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->last_field->flags|= UNIQUE_KEY_FLAG; lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 25599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 800: -#line 6442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6436 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->comment= (yyvsp[0].lex_str); } -#line 25605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 801: -#line 6444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->charset && !my_charset_same(Lex->charset,(yyvsp[0].charset))) my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0), (yyvsp[0].charset)->name,Lex->charset->csname)); Lex->last_field->charset= (yyvsp[0].charset); } -#line 25616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 802: -#line 6451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -25624,11 +25618,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), true, &Lex->last_field->option_list, &Lex->option_list_last); } -#line 25628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 803: -#line 6459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -25636,30 +25630,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), false, &Lex->last_field->option_list, &Lex->option_list_last); } -#line 25640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 804: -#line 6467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].ulonglong_number), &Lex->last_field->option_list, &Lex->option_list_last, thd->mem_root); } -#line 25650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 805: -#line 6473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), &Lex->last_field->option_list, &Lex->option_list_last); } -#line 25659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 806: -#line 6482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.field_type)= (yyvsp[-1].field_type); @@ -25670,214 +25664,214 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->set_last_field_type((yyvsp[-1].field_type)); } -#line 25674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 807: -#line 6497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 25684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 808: -#line 6503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 25690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 809: -#line 6507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 810: -#line 6508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 811: -#line 6513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,MY_CS_PRIMARY,MYF(0)))) my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str)); } -#line 25711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 812: -#line 6517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= &my_charset_bin; } -#line 25717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 813: -#line 6521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 814: -#line 6522 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6516 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 815: -#line 6526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= NULL; } -#line 25735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 816: -#line 6527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= (yyvsp[0].charset); } -#line 25741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 817: -#line 6532 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,MY_CS_PRIMARY,MYF(0))) && !((yyval.charset)=get_old_charset_by_name((yyvsp[0].lex_str).str))) my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str)); } -#line 25751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 818: -#line 6537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= &my_charset_bin; } -#line 25757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 819: -#line 6541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 820: -#line 6542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 821: -#line 6547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)= mysqld_collation_get_by_name((yyvsp[0].lex_str).str))) MYSQL_YYABORT; } -#line 25778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 822: -#line 6554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 823: -#line 6555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 824: -#line 6559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6553 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=(yyvsp[0].charset); } -#line 25796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 825: -#line 6560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)=NULL; } -#line 25802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 826: -#line 6564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 827: -#line 6565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 25814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 828: -#line 6569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= (yyvsp[0].charset); } -#line 25820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 829: -#line 6570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.charset)= &my_charset_latin1; } -#line 25826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 830: -#line 6572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))) my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2")); } -#line 25835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 831: -#line 6579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation(NULL, false); } -#line 25841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 832: -#line 6580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation(&my_charset_bin, false); } -#line 25847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 833: -#line 6581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation((yyvsp[-1].charset), (yyvsp[0].num)); } -#line 25853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 834: -#line 6582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation(NULL, true); } -#line 25859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 835: -#line 6583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bincmp_collation((yyvsp[0].charset), true); } -#line 25865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 836: -#line 6587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 25871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 837: -#line 6588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= true; } -#line 25877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 838: -#line 6593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].ulong_num) == 0) { @@ -25885,148 +25879,148 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 25889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 839: -#line 6601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[-2].ulong_num); } -#line 25895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 840: -#line 6605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 0; } -#line 25901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 841: -#line 6606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; } -#line 25907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 842: -#line 6610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; } -#line 25913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 843: -#line 6613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 0; } -#line 25919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 844: -#line 6614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6608 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 845: -#line 6615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); } -#line 25931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 846: -#line 6616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num) ; } -#line 25937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 847: -#line 6621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num) < 1 ? 1 : ((yyvsp[0].ulong_num) > MY_STRXFRM_NLEVELS ? MY_STRXFRM_NLEVELS : (yyvsp[0].ulong_num)); (yyval.ulong_num)--; } -#line 25946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 848: -#line 6629 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num); } -#line 25954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 849: -#line 6635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6629 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 850: -#line 6636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)|= (yyvsp[0].ulong_num); } -#line 25966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 851: -#line 6641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint start= (yyvsp[-2].ulong_num); uint end= (yyvsp[0].ulong_num); for ((yyval.ulong_num)= 0; start <= end; start++) (yyval.ulong_num)|= (1 << start); } -#line 25977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 852: -#line 6650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 853: -#line 6651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 25989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 854: -#line 6655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= 0; } -#line 25995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 855: -#line 6656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (yyvsp[0].ulong_num); } -#line 26001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 25995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 858: -#line 6670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)=(yyvsp[-3].table); } -#line 26009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 859: -#line 6677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ref_list.empty(); } -#line 26015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 861: -#line 6683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Key_part_spec *key= new (thd->mem_root) Key_part_spec((yyvsp[0].lex_str), 0); if (key == NULL) MYSQL_YYABORT; Lex->ref_list.push_back(key, thd->mem_root); } -#line 26026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 862: -#line 6690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Key_part_spec *key= new (thd->mem_root) Key_part_spec((yyvsp[0].lex_str), 0); if (key == NULL) @@ -26035,181 +26029,181 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->ref_list.empty(); lex->ref_list.push_back(key, thd->mem_root); } -#line 26039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 863: -#line 6702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; } -#line 26045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 864: -#line 6704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; } -#line 26051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 865: -#line 6706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; } -#line 26057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 866: -#line 6708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; } -#line 26063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 867: -#line 6713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= Foreign_key::FK_OPTION_UNDEF; lex->fk_delete_opt= Foreign_key::FK_OPTION_UNDEF; } -#line 26073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 868: -#line 6719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= (yyvsp[0].m_fk_option); lex->fk_delete_opt= Foreign_key::FK_OPTION_UNDEF; } -#line 26083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 869: -#line 6725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= Foreign_key::FK_OPTION_UNDEF; lex->fk_delete_opt= (yyvsp[0].m_fk_option); } -#line 26093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 870: -#line 6732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= (yyvsp[-3].m_fk_option); lex->fk_delete_opt= (yyvsp[0].m_fk_option); } -#line 26103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 871: -#line 6739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->fk_update_opt= (yyvsp[0].m_fk_option); lex->fk_delete_opt= (yyvsp[-3].m_fk_option); } -#line 26113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 872: -#line 6747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_RESTRICT; } -#line 26119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 873: -#line 6748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_CASCADE; } -#line 26125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 874: -#line 6749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_SET_NULL; } -#line 26131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 875: -#line 6750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_NO_ACTION; } -#line 26137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 876: -#line 6751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_fk_option)= Foreign_key::FK_OPTION_DEFAULT; } -#line 26143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 877: -#line 6755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::PRIMARY; } -#line 26149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 878: -#line 6756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::UNIQUE; } -#line 26155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 879: -#line 6760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 880: -#line 6761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 881: -#line 6765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 883: -#line 6770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 884: -#line 6771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 885: -#line 6772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 886: -#line 6776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::MULTIPLE; } -#line 26197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 887: -#line 6777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::UNIQUE; } -#line 26203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 888: -#line 6781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_type)= Key::FULLTEXT;} -#line 26209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 889: -#line 6786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_SPATIAL (yyval.key_type)= Key::SPATIAL; @@ -26218,101 +26212,101 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); sym_group_geom.needed_define)); #endif } -#line 26222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 890: -#line 6797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 891: -#line 6798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->option_list= Lex->option_list; } -#line 26234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 892: -#line 6802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 893: -#line 6803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->option_list= Lex->option_list; } -#line 26246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 894: -#line 6807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 895: -#line 6808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->option_list= Lex->option_list; } -#line 26258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 902: -#line 6827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; } -#line 26264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 903: -#line 6828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= (yyvsp[0].key_alg); } -#line 26270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 904: -#line 6832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; } -#line 26276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 905: -#line 6833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= (yyvsp[0].key_alg); } -#line 26282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 906: -#line 6834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= (yyvsp[0].key_alg); } -#line 26288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 907: -#line 6838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); } -#line 26294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 908: -#line 6840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); } -#line 26300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 909: -#line 6845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num); } -#line 26306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 910: -#line 6847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); } -#line 26312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 911: -#line 6849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -26320,11 +26314,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), true, &Lex->option_list, &Lex->option_list_last); } -#line 26324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 912: -#line 6857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH) my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].lex_str).str)); @@ -26332,85 +26326,85 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].lex_str), false, &Lex->option_list, &Lex->option_list_last); } -#line 26336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 913: -#line 6865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), (yyvsp[0].ulonglong_number), &Lex->option_list, &Lex->option_list_last, thd->mem_root); } -#line 26346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 914: -#line 6871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { new (thd->mem_root) engine_option_value((yyvsp[-2].lex_str), &Lex->option_list, &Lex->option_list_last); } -#line 26355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 919: -#line 6889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (plugin_is_ready(&(yyvsp[0].lex_str), MYSQL_FTPARSER_PLUGIN)) Lex->last_key->key_create_info.parser_name= (yyvsp[0].lex_str); else my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].lex_str).str)); } -#line 26366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 920: -#line 6898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_BTREE; } -#line 26372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 921: -#line 6899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_RTREE; } -#line 26378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 922: -#line 6900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_alg)= HA_KEY_ALG_HASH; } -#line 26384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 923: -#line 6905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root); } -#line 26392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 924: -#line 6909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root); } -#line 26400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 925: -#line 6916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.key_part)= new (thd->mem_root) Key_part_spec((yyvsp[0].lex_str), 0); if ((yyval.key_part) == NULL) MYSQL_YYABORT; } -#line 26410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 926: -#line 6922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int key_part_len= atoi((yyvsp[-1].lex_str).str); if (!key_part_len) @@ -26419,47 +26413,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.key_part) == NULL) MYSQL_YYABORT; } -#line 26423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 927: -#line 6933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 26429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 928: -#line 6934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 26435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 929: -#line 6938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 26441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 930: -#line 6939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 26447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 931: -#line 6944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); } -#line 26453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 932: -#line 6946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); } -#line 26459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 933: -#line 6954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->name= null_lex_str; Lex->only_view= FALSE; @@ -26473,11 +26467,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->create_info.storage_media= HA_SM_DEFAULT; DBUG_ASSERT(!Lex->m_sql_cmd); } -#line 26477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 934: -#line 6968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Lex->select_lex.add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING, @@ -26487,11 +26481,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->select_lex.db= (Lex->select_lex.table_list.first)->db; Lex->create_last_non_select_table= Lex->last_table(); } -#line 26491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 935: -#line 6978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Lex->m_sql_cmd) { @@ -26501,20 +26495,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 26505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 936: -#line 6988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.default_table_charset= NULL; Lex->create_info.used_fields= 0; } -#line 26514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 937: -#line 6993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command=SQLCOM_ALTER_DB; @@ -26523,11 +26517,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->copy_db_to(&lex->name.str, &lex->name.length)) MYSQL_YYABORT; } -#line 26527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 938: -#line 7002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 6996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->sphead) @@ -26535,11 +26529,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_ALTER_DB_UPGRADE; lex->name= (yyvsp[-4].lex_str); } -#line 26539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 939: -#line 7010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26547,22 +26541,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE")); bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); } -#line 26551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 940: -#line 7018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ALTER_PROCEDURE; lex->spname= (yyvsp[-2].spname); } -#line 26562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 941: -#line 7025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26570,22 +26564,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "FUNCTION")); bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); } -#line 26574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 942: -#line 7033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ALTER_FUNCTION; lex->spname= (yyvsp[-2].spname); } -#line 26585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 943: -#line 7040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26593,17 +26587,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "ALTER VIEW")); lex->create_view_mode= VIEW_ALTER; } -#line 26597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 944: -#line 7048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 945: -#line 7055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -26612,17 +26606,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_view_algorithm= VIEW_ALGORITHM_INHERIT; lex->create_view_mode= VIEW_ALTER; } -#line 26616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 946: -#line 7064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 947: -#line 7066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* It is safe to use Lex->spname because @@ -26639,11 +26633,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->sql_command= SQLCOM_ALTER_EVENT; Lex->stmt_definition_begin= (yyvsp[-2].simple_string); } -#line 26643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 948: -#line 7087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))) { @@ -26657,93 +26651,93 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->sql_command= SQLCOM_ALTER_EVENT; Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr(); } -#line 26661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 949: -#line 7101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE; } -#line 26670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 950: -#line 7106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP; } -#line 26679 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 951: -#line 7111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE; } -#line 26688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 952: -#line 7116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_ACCESS_MODE_TABLESPACE; } -#line 26697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 953: -#line 7121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_ALTER_SERVER; lex->server_options.reset((yyvsp[0].lex_str)); } -#line 26707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 954: -#line 7125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 26713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 955: -#line 7129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0;} -#line 26719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 956: -#line 7130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 957: -#line 7131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 958: -#line 7132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 959: -#line 7136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0;} -#line 26743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 960: -#line 7138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Use lex's spname to hold the new name. @@ -26752,35 +26746,35 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->spname= (yyvsp[0].spname); (yyval.num)= 1; } -#line 26756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 961: -#line 7149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0;} -#line 26762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 962: -#line 7150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 26768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 963: -#line 7154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= null_lex_str; } -#line 26774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 964: -#line 7155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 26780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 966: -#line 7161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_discard_import_tablespace( @@ -26788,11 +26782,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 967: -#line 7169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_discard_import_tablespace( @@ -26800,31 +26794,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 973: -#line 7191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_DROP_PARTITION; DBUG_ASSERT(!Lex->if_exists()); Lex->create_info.add((yyvsp[-1].object_ddl_options)); } -#line 26814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 974: -#line 7198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_info.flags|= Alter_info::ALTER_REBUILD_PARTITION; lex->no_write_to_binlog= (yyvsp[-1].num); } -#line 26824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 975: -#line 7205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->no_write_to_binlog= (yyvsp[-1].num); @@ -26835,11 +26829,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 977: -#line 7218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->no_write_to_binlog= (yyvsp[-1].num); @@ -26850,11 +26844,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 978: -#line 7229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->check_opt.init(); @@ -26864,11 +26858,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 980: -#line 7241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->no_write_to_binlog= (yyvsp[-1].num); @@ -26879,22 +26873,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 982: -#line 7253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_info.flags|= Alter_info::ALTER_COALESCE_PARTITION; lex->no_write_to_binlog= (yyvsp[-1].num); lex->alter_info.num_parts= (yyvsp[0].ulong_num); } -#line 26894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 983: -#line 7260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->check_opt.init(); @@ -26904,11 +26898,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 985: -#line 7272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; size_t dummy; @@ -26931,27 +26925,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 26935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 986: -#line 7298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_REMOVE_PARTITIONING; } -#line 26943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 987: -#line 7305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_ALL_PARTITION; } -#line 26951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 989: -#line 7314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info= new (thd->mem_root) partition_info(); @@ -26965,34 +26959,34 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_info.set((yyvsp[-1].object_ddl_options)); lex->no_write_to_binlog= (yyvsp[0].num); } -#line 26969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 990: -#line 7328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 26975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 992: -#line 7334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info->num_parts= lex->part_info->partitions.elements; } -#line 26984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 993: -#line 7339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->part_info->num_parts= (yyvsp[0].ulong_num); } -#line 26992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 26986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 994: -#line 7346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->part_info= new (thd->mem_root) partition_info(); @@ -27003,48 +26997,48 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } lex->no_write_to_binlog= (yyvsp[0].num); } -#line 27007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 996: -#line 7361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_TABLE_REORG; } -#line 27015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 997: -#line 7365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_REORGANIZE_PARTITION; } -#line 27023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 998: -#line 7369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { partition_info *part_info= Lex->part_info; part_info->num_parts= part_info->partitions.elements; } -#line 27032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 999: -#line 7376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1000: -#line 7377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1001: -#line 7382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->alter_info.partition_names.push_back((yyvsp[0].lex_str).str, thd->mem_root)) @@ -27053,66 +27047,66 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 27057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1004: -#line 7403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN; } -#line 27066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1005: -#line 7411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_last_non_select_table= Lex->last_table(); } -#line 27074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1006: -#line 7415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_last_non_select_table= Lex->last_table(); Lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; } -#line 27083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1007: -#line 7420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_ADD_COLUMN | Alter_info::ALTER_ADD_INDEX; } -#line 27092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1008: -#line 7426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN; Lex->create_last_non_select_table= Lex->last_table(); Lex->last_field->change= (yyvsp[-2].lex_str).str; } -#line 27102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1009: -#line 7433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN; Lex->create_last_non_select_table= Lex->last_table(); Lex->last_field->change= Lex->last_field->field_name; } -#line 27112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1010: -#line 7439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27122,11 +27116,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_DROP_COLUMN; } -#line 27126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1011: -#line 7449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27136,11 +27130,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::DROP_FOREIGN_KEY; } -#line 27140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1012: -#line 7459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27151,11 +27145,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX; } -#line 27155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1013: -#line 7470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -27165,31 +27159,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.drop_list.push_back(ad, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_DROP_INDEX; } -#line 27169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1014: -#line 7480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.keys_onoff= Alter_info::DISABLE; lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF; } -#line 27179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1015: -#line 7486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.keys_onoff= Alter_info::ENABLE; lex->alter_info.flags|= Alter_info::ALTER_KEYS_ONOFF; } -#line 27189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1016: -#line 7492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_column *ac= new (thd->mem_root) Alter_column((yyvsp[-3].lex_str).str,(yyvsp[0].item)); @@ -27198,11 +27192,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.alter_list.push_back(ac, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT; } -#line 27202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1017: -#line 7501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7495 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_column *ac= (new (thd->mem_root) @@ -27212,11 +27206,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->alter_info.alter_list.push_back(ac, thd->mem_root); lex->alter_info.flags|= Alter_info::ALTER_CHANGE_COLUMN_DEFAULT; } -#line 27216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1018: -#line 7511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; size_t dummy; @@ -27232,11 +27226,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->name= (yyvsp[0].table)->table; lex->alter_info.flags|= Alter_info::ALTER_RENAME; } -#line 27236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1019: -#line 7527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!(yyvsp[-1].charset)) { @@ -27250,11 +27244,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->alter_info.flags|= Alter_info::ALTER_OPTIONS; } -#line 27254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1020: -#line 7541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.flags|= Alter_info::ALTER_OPTIONS; @@ -27264,230 +27258,230 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->create_info.used_fields&= ~HA_CREATE_USED_ENGINE; } } -#line 27268 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27262 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1021: -#line 7551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_RECREATE; } -#line 27276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1022: -#line 7555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->alter_info.flags|= Alter_info::ALTER_ORDER; } -#line 27285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1030: -#line 7572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.requested_algorithm= Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT; } -#line 27294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1031: -#line 7577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->alter_info.set_requested_algorithm(&(yyvsp[0].lex_str))) my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].lex_str).str)); } -#line 27303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1032: -#line 7585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.requested_lock= Alter_info::ALTER_TABLE_LOCK_DEFAULT; } -#line 27312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1033: -#line 7590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7584 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->alter_info.set_requested_lock(&(yyvsp[0].lex_str))) my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].lex_str).str)); } -#line 27321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1034: -#line 7597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1035: -#line 7598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1036: -#line 7602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 0;} -#line 27339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1037: -#line 7603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1;} -#line 27345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1038: -#line 7607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 0;} -#line 27351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1044: -#line 7621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1;} -#line 27357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1045: -#line 7623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.requested_lock= Alter_info::ALTER_TABLE_LOCK_NONE; } -#line 27366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1046: -#line 7630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->drop_mode= DROP_DEFAULT; } -#line 27372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1047: -#line 7631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->drop_mode= DROP_RESTRICT; } -#line 27378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1048: -#line 7632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->drop_mode= DROP_CASCADE; } -#line 27384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1049: -#line 7636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1050: -#line 7638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { store_position_for_column((yyvsp[0].lex_str).str); Lex->alter_info.flags |= Alter_info::ALTER_COLUMN_ORDER; } -#line 27399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1051: -#line 7643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { store_position_for_column(first_keyword); Lex->alter_info.flags |= Alter_info::ALTER_COLUMN_ORDER; } -#line 27408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1052: -#line 7650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1053: -#line 7651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1054: -#line 7652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1055: -#line 7653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1056: -#line 7658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_START; lex->type = 0; /* If you change this code don't forget to update SLAVE START too */ } -#line 27443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1057: -#line 7665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1058: -#line 7667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_ALL_START; lex->type = 0; } -#line 27459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1059: -#line 7672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1060: -#line 7674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_STOP; lex->type = 0; /* If you change this code don't forget to update SLAVE STOP too */ } -#line 27476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1061: -#line 7681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_SLAVE_ALL_STOP; lex->type = 0; /* If you change this code don't forget to update SLAVE STOP too */ } -#line 27487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1062: -#line 7691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_BEGIN; @@ -27500,103 +27494,103 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } lex->start_transaction_opt= (yyvsp[0].num); } -#line 27504 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1063: -#line 7707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7701 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 27512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1064: -#line 7711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[0].num); } -#line 27520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1065: -#line 7718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[0].num); } -#line 27528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1066: -#line 7722 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num); } -#line 27536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1067: -#line 7729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT; } -#line 27544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1068: -#line 7733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY; } -#line 27552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1069: -#line 7737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE; } -#line 27560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1070: -#line 7743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->slave_thd_opt= 0; } -#line 27566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1071: -#line 7745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1074: -#line 7754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1075: -#line 7755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->slave_thd_opt|=SLAVE_SQL; } -#line 27584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1076: -#line 7756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->slave_thd_opt|=SLAVE_IO; } -#line 27590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1077: -#line 7760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1078: -#line 7762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (((lex->mi.log_file_name || lex->mi.pos) && @@ -27605,60 +27599,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (lex->mi.relay_log_name && lex->mi.relay_log_pos))) my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0))); } -#line 27609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1079: -#line 7771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.gtid_pos_str = (yyvsp[0].lex_str); } -#line 27617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1082: -#line 7783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_CHECKSUM; /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1083: -#line 7790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1084: -#line 7794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags= 0; } -#line 27640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1085: -#line 7795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags= T_QUICK; } -#line 27646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1086: -#line 7796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags= T_EXTEND; } -#line 27652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1088: -#line 7801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->only_view= TRUE; } -#line 27658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1090: -#line 7806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_REPAIR; @@ -27668,11 +27662,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1091: -#line 7816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -27680,65 +27674,65 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 27684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1092: -#line 7826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags = T_MEDIUM; } -#line 27690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1093: -#line 7827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1094: -#line 7831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1095: -#line 7832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1096: -#line 7836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_QUICK; } -#line 27714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1097: -#line 7837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_EXTEND; } -#line 27720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1098: -#line 7838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_USEFRM; } -#line 27726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1099: -#line 7842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 27732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1100: -#line 7843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; } -#line 27738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1101: -#line 7848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_ANALYZE; @@ -27748,11 +27742,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1102: -#line 7858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -27760,137 +27754,137 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 27764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1106: -#line 7878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1107: -#line 7880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->with_persistent_for_clause= TRUE; } -#line 27778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1108: -#line 7887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1109: -#line 7889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1110: -#line 7892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1111: -#line 7894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; lex->column_list= new (thd->mem_root) List; if (lex->column_list == NULL) MYSQL_YYABORT; } -#line 27807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1113: -#line 7905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1114: -#line 7907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; lex->index_list= new (thd->mem_root) List; if (lex->index_list == NULL) MYSQL_YYABORT; } -#line 27824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1116: -#line 7919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1117: -#line 7921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->column_list->push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 27839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1118: -#line 7926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->column_list->push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 27848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1119: -#line 7934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1122: -#line 7941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->index_list->push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 27864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1123: -#line 7948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX_STRING str= {(char*) "PRIMARY", 7}; Lex->index_list->push_back((LEX_STRING*) thd->memdup(&str, sizeof(LEX_STRING)), thd->mem_root); } -#line 27875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1124: -#line 7958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT; Lex->comment= (yyvsp[0].lex_str); } -#line 27884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1126: -#line 7966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->only_view= TRUE; } -#line 27890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1128: -#line 7970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; @@ -27900,11 +27894,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 27904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1129: -#line 7980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; if (lex->sphead) @@ -27914,83 +27908,83 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 27918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1130: -#line 7992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags = T_MEDIUM; } -#line 27924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1131: -#line 7993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1132: -#line 7997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1133: -#line 7998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 27942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1134: -#line 8002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_QUICK; } -#line 27948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1135: -#line 8003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_FAST; } -#line 27954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1136: -#line 8004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_MEDIUM; } -#line 27960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1137: -#line 8005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 7999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_EXTEND; } -#line 27966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1138: -#line 8006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; } -#line 27972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1139: -#line 8007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; } -#line 27978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1140: -#line 8011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 27984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1141: -#line 8012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; } -#line 27990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1142: -#line 8017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_OPTIMIZE; @@ -28000,11 +27994,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Will be overriden during execution. */ YYPS->m_lock_type= TL_UNLOCK; } -#line 28004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 27998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1143: -#line 8027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -28012,71 +28006,71 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 28016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1144: -#line 8037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1145: -#line 8038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 28028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1146: -#line 8039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 28034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1147: -#line 8044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_RENAME_TABLE; } -#line 28042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1148: -#line 8048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1149: -#line 8050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_RENAME_USER; } -#line 28056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1150: -#line 8057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) || Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 28066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1151: -#line 8063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) || Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 28076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1154: -#line 8077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; SELECT_LEX *sl= lex->current_select; @@ -28086,146 +28080,146 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); TL_IGNORE, MDL_EXCLUSIVE)) MYSQL_YYABORT; } -#line 28090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1155: -#line 8090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.reset(); } -#line 28098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1156: -#line 8094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE; lex->ident= (yyvsp[0].lex_str); } -#line 28108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1161: -#line 8113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1162: -#line 8123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1163: -#line 8132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 28136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1164: -#line 8133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str) = default_key_cache_base; } -#line 28142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1165: -#line 8138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command=SQLCOM_PRELOAD_KEYS; lex->alter_info.reset(); } -#line 28152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1166: -#line 8144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1171: -#line 8159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1172: -#line 8169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ, MDL_SHARED_READ, Select->pop_index_hints())) MYSQL_YYABORT; } -#line 28180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1173: -#line 8179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION; } -#line 28188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28182 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1175: -#line 8186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->select_lex.alloc_index_hints(thd); Select->set_index_hint_type(INDEX_HINT_USE, INDEX_HINT_MASK_ALL); } -#line 28198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1177: -#line 8195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 28204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1179: -#line 8201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1180: -#line 8202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_OPTION_IGNORE_LEAVES; } -#line 28216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1181: -#line 8212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SELECT; } -#line 28225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1184: -#line 8225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* In order to correctly parse UNION's global ORDER BY we need to @@ -28233,47 +28227,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->current_select->set_braces(true); } -#line 28237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1185: -#line 8233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (setup_select_in_parentheses(Lex)) MYSQL_YYABORT; } -#line 28246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1187: -#line 8242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->current_select->set_braces(true); } -#line 28254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1188: -#line 8247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (setup_select_in_parentheses(Lex)) MYSQL_YYABORT; } -#line 28263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1190: -#line 8256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; /* Parentheses carry no meaning here */ lex->current_select->set_braces(false); } -#line 28273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1194: -#line 8286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[-9].num) && (yyvsp[-1].num)) /* double "INTO" clause */ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "INTO", "INTO")); @@ -28281,11 +28275,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyvsp[-2].num) && ((yyvsp[-9].num) || (yyvsp[-1].num))) /* "INTO" with "PROCEDURE ANALYSE" */ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "PROCEDURE", "INTO")); } -#line 28285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1195: -#line 8296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -28293,38 +28287,38 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); mysql_init_select(lex); lex->current_select->parsing_place= SELECT_LIST; } -#line 28297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1196: -#line 8304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 28305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1201: -#line 8331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->context.table_list= Select->context.first_name_resolution_table= Select->table_list.first; } -#line 28315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1204: -#line 8346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Select->options & SELECT_DISTINCT && Select->options & SELECT_ALL) my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT")); } -#line 28324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1208: -#line 8360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Allow this flag only on the first top-level SELECT statement, if @@ -28341,11 +28335,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->select_lex.options&= ~OPTION_TO_QUERY_CACHE; Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE; } -#line 28345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1209: -#line 8377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Allow this flag only on the first top-level SELECT statement, if @@ -28362,22 +28356,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->select_lex.options|= OPTION_TO_QUERY_CACHE; Lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE; } -#line 28366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1211: -#line 8398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->current_select->lock_type= TL_WRITE; lex->current_select->set_lock_for_tables(TL_WRITE); lex->safe_to_cache_query=0; } -#line 28377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1212: -#line 8405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS; @@ -28385,11 +28379,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS); lex->safe_to_cache_query=0; } -#line 28389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1215: -#line 8418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_field(thd, &thd->lex->current_select->context, @@ -28400,20 +28394,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (thd->lex->current_select->with_wild)++; } -#line 28404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1216: -#line 8432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_item_to_list(thd, (yyvsp[-1].item))) MYSQL_YYABORT; } -#line 28413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1217: -#line 8437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string)); @@ -28432,113 +28426,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].item)->set_name((yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset()); } } -#line 28436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1218: -#line 8458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (char*) YYLIP->get_tok_start(); } -#line 28444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1219: -#line 8464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start(); } -#line 28452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1220: -#line 8470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end(); } -#line 28460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1221: -#line 8476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=null_lex_str;} -#line 28466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1222: -#line 8477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1223: -#line 8478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1224: -#line 8479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1225: -#line 8480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 28490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1226: -#line 8484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= NOT_FIXED_DEC; } -#line 28496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1227: -#line 8485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= NOT_FIXED_DEC; } -#line 28502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1228: -#line 8486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-1].ulong_num); } -#line 28508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1229: -#line 8490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1230: -#line 8491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 28520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1231: -#line 8492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-1].ulong_num); } -#line 28526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1232: -#line 8496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1233: -#line 8497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 28538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1234: -#line 8503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Design notes: @@ -28589,22 +28583,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 28593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1235: -#line 8554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* XOR is a proprietary extension */ (yyval.item)= new (thd->mem_root) Item_func_xor(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1236: -#line 8561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* See comments in rule expr: expr or expr */ Item_cond_and *item1; @@ -28647,141 +28641,141 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 28651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1237: -#line 8604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= negate_expression(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1238: -#line 8610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1239: -#line 8616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1240: -#line 8622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1241: -#line 8628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1242: -#line 8634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1243: -#line 8640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1245: -#line 8650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1246: -#line 8656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1247: -#line 8662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_equal(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1248: -#line 8668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (*(yyvsp[-1].boolfunc2creator))(0)->create(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1249: -#line 8674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= all_any_subquery_creator(thd, (yyvsp[-5].item), (yyvsp[-4].boolfunc2creator), (yyvsp[-3].num), (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1251: -#line 8684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-4].item), (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1252: -#line 8690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-5].item), (yyvsp[-1].select_lex)); if (item == NULL) @@ -28790,21 +28784,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1253: -#line 8699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8693 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-4].item), true, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1254: -#line 8705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyvsp[-1].item_list)->push_front((yyvsp[-6].item), thd->mem_root); @@ -28812,21 +28806,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28816 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1255: -#line 8713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-5].item), false, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1256: -#line 8719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyvsp[-1].item_list)->push_front((yyvsp[-7].item), thd->mem_root); @@ -28836,21 +28830,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); item->negate(); (yyval.item)= item; } -#line 28840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1257: -#line 8729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_between(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1258: -#line 8735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_func_between *item; item= new (thd->mem_root) Item_func_between(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item)); @@ -28859,11 +28853,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); item->negate(); (yyval.item)= item; } -#line 28863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1259: -#line 8744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item1= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[-3].item)); Item *item4= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[0].item)); @@ -28873,22 +28867,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1260: -#line 8754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[0].item), Lex->escape_used); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1261: -#line 8761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].item), Lex->escape_used); @@ -28898,21 +28892,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1262: -#line 8771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1263: -#line 8777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-3].item), (yyvsp[0].item)); if (item == NULL) @@ -28921,318 +28915,318 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1265: -#line 8790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_or(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1266: -#line 8796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_and(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1267: -#line 8802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_shift_left(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1268: -#line 8808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_shift_right(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1269: -#line 8814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_plus(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1270: -#line 8820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_minus(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1271: -#line 8826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 28995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1272: -#line 8832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 28999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1273: -#line 8838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mul(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1274: -#line 8844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_div(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1275: -#line 8850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1276: -#line 8856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_int_div(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1277: -#line 8862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1278: -#line 8868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_xor(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1288: -#line 8897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_eq_creator; } -#line 29071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1289: -#line 8898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_ge_creator; } -#line 29077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1290: -#line 8899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_gt_creator; } -#line 29083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1291: -#line 8900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_le_creator; } -#line 29089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1292: -#line 8901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_lt_creator; } -#line 29095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1293: -#line 8902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.boolfunc2creator) = &comp_ne_creator; } -#line 29101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1294: -#line 8906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 29107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1295: -#line 8907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 29113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1296: -#line 8912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_NULL; /* automatic type */ lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1297: -#line 8918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[0].num); } -#line 29130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1298: -#line 8923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_INT; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1299: -#line 8930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_UINT; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1300: -#line 8937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DOUBLE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1301: -#line 8944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DOUBLE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1302: -#line 8951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DOUBLE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1303: -#line 8958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= DYN_COL_DECIMAL; Lex->charset= NULL; } -#line 29194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1304: -#line 8963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset= thd->variables.collation_connection; } -#line 29200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1305: -#line 8965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_STRING; lex->length= lex->dec= 0; } -#line 29210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1306: -#line 8971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_STRING; lex->charset= national_charset_info; lex->length= lex->dec= 0; } -#line 29221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1307: -#line 8978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DATE; lex->charset= NULL; lex->length= lex->dec= 0; } -#line 29232 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29226 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1308: -#line 8985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_TIME; @@ -29240,11 +29234,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->dec= lex->length; lex->length= 0; } -#line 29244 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1309: -#line 8993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.num)= DYN_COL_DATETIME; @@ -29252,11 +29246,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->dec= lex->length; lex->length= 0; } -#line 29256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29250 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1310: -#line 9004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 8998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *) @@ -29276,31 +29270,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else (yyval.dyncol_def)->len= 0; } -#line 29280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1311: -#line 9026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.dyncol_def_list)= new (thd->mem_root) List; if ((yyval.dyncol_def_list) == NULL) MYSQL_YYABORT; (yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root); } -#line 29291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1312: -#line 9033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root); (yyval.dyncol_def_list)= (yyvsp[-2].dyncol_def_list); } -#line 29300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1318: -#line 9046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *i1= new (thd->mem_root) Item_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -29311,113 +29305,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1320: -#line 9057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item_param); } -#line 29321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1323: -#line 9061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_concat(thd, (yyvsp[-2].item), (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1324: -#line 9067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 29339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1325: -#line 9071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_neg(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1326: -#line 9077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_bit_neg(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1327: -#line 9083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= negate_expression(thd, (yyvsp[0].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1328: -#line 9089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_singlerow_subselect(thd, (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1329: -#line 9095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[-1].item); } -#line 29385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1330: -#line 9097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1331: -#line 9104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1332: -#line 9111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_exists_subselect(thd, (yyvsp[-1].select_lex)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1333: -#line 9117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= NULL; /* @@ -29441,11 +29435,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) (yyval.item)= (yyvsp[-1].item); } -#line 29445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1334: -#line 9141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-5].item_list)->push_front((yyvsp[-2].item), thd->mem_root); Item_func_match *i1= new (thd->mem_root) Item_func_match(thd, *(yyvsp[-5].item_list), @@ -29455,22 +29449,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Select->add_ftfunc_to_list(thd, i1); (yyval.item)= i1; } -#line 29459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1335: -#line 9151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_cast(thd, (yyvsp[0].item), ITEM_CAST_CHAR, NULL, NULL, &my_charset_bin); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1336: -#line 9158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.item)= create_func_cast(thd, (yyvsp[-3].item), (yyvsp[-1].cast_type), lex->length, lex->dec, @@ -29478,42 +29472,42 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1337: -#line 9166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_case(thd, *(yyvsp[-2].item_list), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1338: -#line 9172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_cast(thd, (yyvsp[-3].item), (yyvsp[-1].cast_type), Lex->length, Lex->dec, Lex->charset); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1339: -#line 9179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_conv_charset(thd, (yyvsp[-3].item), (yyvsp[-1].charset)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1340: -#line 9185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_splocal *il= (yyvsp[-1].item)->get_item_splocal(); if (il) @@ -29523,52 +29517,52 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1341: -#line 9195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_insert_value(thd, Lex->current_context(), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1342: -#line 9203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1343: -#line 9218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1344: -#line 9224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-3].item_list), (yyvsp[-1].charset)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1345: -#line 9230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_current_user(thd, Lex->current_context()); @@ -29577,11 +29571,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query= 0; } -#line 29581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1346: -#line 9239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_current_role(thd, Lex->current_context()); @@ -29590,51 +29584,51 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query= 0; } -#line 29594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1347: -#line 9248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1348: -#line 9254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1349: -#line 9260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1350: -#line 9266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_insert(thd, (yyvsp[-7].item), (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1351: -#line 9272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { List *list= new (thd->mem_root) List; if (list == NULL) @@ -29648,11 +29642,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1352: -#line 9286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root); (yyvsp[-1].item_list)->push_front((yyvsp[-5].item), thd->mem_root); @@ -29663,173 +29657,173 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1353: -#line 9297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_left(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1354: -#line 9303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1355: -#line 9309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1356: -#line 9315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_right(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1357: -#line 9321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1358: -#line 9327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_time_typecast(thd, (yyvsp[-1].item), AUTO_SEC_PART_DIGITS); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1359: -#line 9334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_datetime_typecast(thd, (yyvsp[-1].item), AUTO_SEC_PART_DIGITS); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1360: -#line 9341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_add_time(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1, 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1361: -#line 9347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1362: -#line 9353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_ltrim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1363: -#line 9359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_rtrim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1364: -#line 9365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1365: -#line 9371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_ltrim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1366: -#line 9377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_rtrim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1367: -#line 9383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1368: -#line 9389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_trim(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1369: -#line 9395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_user(thd); if ((yyval.item) == NULL) @@ -29837,186 +29831,186 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query=0; } -#line 29841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1370: -#line 9403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1371: -#line 9424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item), INTERVAL_DAY, 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1372: -#line 9431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1373: -#line 9437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 29883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1374: -#line 9444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curtime_local(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 29894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1375: -#line 9452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1376: -#line 9459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1377: -#line 9465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_extract(thd, (yyvsp[-3].interval), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1378: -#line 9471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_get_format(thd, (yyvsp[-3].date_time_type), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1379: -#line 9477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 29945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1380: -#line 9484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_locate(thd, (yyvsp[-1].item), (yyvsp[-3].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1381: -#line 9490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item), INTERVAL_DAY, 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1382: -#line 9497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1383: -#line 9503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1384: -#line 9509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 29996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 29990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1385: -#line 9515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1386: -#line 9521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1387: -#line 9527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Unlike other time-related functions, SYSDATE() is @@ -30034,104 +30028,104 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1388: -#line 9545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-1].item), (yyvsp[-3].item), (yyvsp[-5].interval_time_st), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1389: -#line 9551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_timestamp_diff(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[-5].interval_time_st)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1390: -#line 9557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1391: -#line 9564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_curtime_utc(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1392: -#line 9571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_now_utc(thd, (yyvsp[0].num)); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1393: -#line 9579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_dyncol_add(thd, (yyvsp[-3].item), *(yyvsp[-1].dyncol_def_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1394: -#line 9586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_dyncol_delete(thd, (yyvsp[-3].item), *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1395: -#line 9593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_dyncol_check(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1396: -#line 9600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1397: -#line 9607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; (yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].cast_type), @@ -30140,133 +30134,133 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1398: -#line 9624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1399: -#line 9630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1400: -#line 9636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_coalesce(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1401: -#line 9642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_collation(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1402: -#line 9648 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_database(thd); if ((yyval.item) == NULL) MYSQL_YYABORT; Lex->safe_to_cache_query=0; } -#line 30195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1403: -#line 9655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_if(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1404: -#line 9661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1405: -#line 9667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1406: -#line 9673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-1].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1407: -#line 9679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_microsecond(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1408: -#line 9685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1409: -#line 9691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item), Item_func_password::OLD); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1410: -#line 9698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9692 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item* i1; i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item)); @@ -30274,51 +30268,51 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyval.item)= i1; } -#line 30278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1411: -#line 9706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_quarter(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1412: -#line 9712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_repeat(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1413: -#line 9718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1414: -#line 9724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_reverse(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1415: -#line 9730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_row_count(thd); if ((yyval.item) == NULL) @@ -30326,21 +30320,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); Lex->safe_to_cache_query= 0; } -#line 30330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1416: -#line 9738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_round(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1417: -#line 9744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *i1; LEX_STRING name= {C_STRING_WITH_LEN("default_week_format")}; @@ -30354,31 +30348,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1418: -#line 9758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-3].item), (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1419: -#line 9764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-2].item), 0, 0, (yyvsp[-1].ulong_num)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1420: -#line 9770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-5].item), 0, (yyvsp[-2].ulong_num), @@ -30386,11 +30380,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1421: -#line 9778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_char_typecast(thd, (yyvsp[-4].item), (yyvsp[-1].ulong_num), &my_charset_bin); @@ -30402,22 +30396,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1422: -#line 9790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-7].item), (yyvsp[-5].ulong_num), (yyvsp[-3].ulong_num), (yyvsp[-1].ulong_num)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1423: -#line 9797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_SPATIAL (yyval.item)= (yyvsp[0].item); @@ -30429,95 +30423,95 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); sym_group_geom.needed_define)); #endif } -#line 30433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1424: -#line 9812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_precise_rel(thd, (yyvsp[-3].item), (yyvsp[-1].item), Item_func::SP_CONTAINS_FUNC)); } -#line 30443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1425: -#line 9818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_geometrycollection, Geometry::wkb_point)); } -#line 30454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1426: -#line 9825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_linestring, Geometry::wkb_point)); } -#line 30465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1427: -#line 9832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_multilinestring, Geometry::wkb_linestring)); } -#line 30476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1428: -#line 9839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_multipoint, Geometry::wkb_point)); } -#line 30487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1429: -#line 9846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_multipolygon, Geometry::wkb_polygon)); } -#line 30498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1430: -#line 9853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_point(thd, (yyvsp[-3].item), (yyvsp[-1].item))); } -#line 30506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1431: -#line 9857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= GEOM_NEW(thd, Item_func_spatial_collection(thd, *(yyvsp[-1].item_list), Geometry::wkb_polygon, Geometry::wkb_linestring)); } -#line 30517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1432: -#line 9876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { #ifdef HAVE_DLOPEN udf_func *udf= 0; @@ -30536,11 +30530,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.udf)= udf; #endif } -#line 30540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1433: -#line 9895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Create_func *builder; Item *item= NULL; @@ -30593,11 +30587,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 30597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1434: -#line 9948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Create_qfunc *builder; Item *item= NULL; @@ -30632,79 +30626,79 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 30636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1435: -#line 9986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); } -#line 30642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1436: -#line 9988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_BOOL; } -#line 30648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1437: -#line 9992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_NL; } -#line 30654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1438: -#line 9993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_NL; } -#line 30660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1439: -#line 9997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 30666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1440: -#line 9998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= FT_EXPAND; } -#line 30672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1441: -#line 10002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= NULL; } -#line 30678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1442: -#line 10003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 9997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[0].item_list); } -#line 30684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1443: -#line 10008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) MYSQL_YYABORT; (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 30695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1444: -#line 10015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-2].item_list); } -#line 30704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1445: -#line 10023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Use Item::name as a storage for the attribute value of user @@ -30728,61 +30722,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].item)->set_name((yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset()); (yyval.item)= (yyvsp[-2].item); } -#line 30732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1446: -#line 10050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), FALSE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1447: -#line 10056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), TRUE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1448: -#line 10062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1449: -#line 10068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1450: -#line 10074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30776 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1451: -#line 10080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1); if (item == NULL) @@ -30791,149 +30785,149 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1452: -#line 10089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1453: -#line 10095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr++; } -#line 30811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1454: -#line 10097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr--; } -#line 30817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1455: -#line 10099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_count(thd, *(yyvsp[-2].item_list)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1456: -#line 10105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1457: -#line 10116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1458: -#line 10122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1459: -#line 10128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1460: -#line 10134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1461: -#line 10140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 0); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1462: -#line 10146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1463: -#line 10152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1464: -#line 10158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), FALSE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1465: -#line 10164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), TRUE); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 30927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1466: -#line 10170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr++; } -#line 30933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1467: -#line 10174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->in_sum_expr--; @@ -30945,28 +30939,28 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-3].item_list)->empty(); sel->gorder_list.empty(); } -#line 30949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1468: -#line 10189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (! Lex->parsing_options.allows_variable) my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0))); } -#line 30958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1469: -#line 10194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 30966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1470: -#line 10201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_func_set_user_var *item; (yyval.item)= item= new (thd->mem_root) Item_func_set_user_var(thd, (yyvsp[-2].lex_str), (yyvsp[0].item)); @@ -30976,11 +30970,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->uncacheable(UNCACHEABLE_SIDEEFFECT); lex->set_var_list.push_back(item, thd->mem_root); } -#line 30980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1471: -#line 10211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, (yyvsp[0].lex_str)); if ((yyval.item) == NULL) @@ -30988,11 +30982,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); LEX *lex= Lex; lex->uncacheable(UNCACHEABLE_SIDEEFFECT); } -#line 30992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 30986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1472: -#line 10219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* disallow "SELECT @@global.global.variable" */ if ((yyvsp[-1].lex_str).str && (yyvsp[0].lex_str).str && check_reserved_words(&(yyvsp[-1].lex_str))) @@ -31005,39 +30999,39 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!((Item_func_get_system_var*) (yyval.item))->is_written_to_binlog()) Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_VARIABLE); } -#line 31009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1473: -#line 10234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1474: -#line 10235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 31021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1475: -#line 10240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1); if ((yyval.string) == NULL) MYSQL_YYABORT; } -#line 31031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1476: -#line 10245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 31037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1478: -#line 10251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -31049,23 +31043,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); "CUBE/ROLLUP", "ORDER BY")); } } -#line 31053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1480: -#line 10267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 31059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1481: -#line 10269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 31065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1482: -#line 10274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->current_select->inc_in_sum_expr()) @@ -31074,206 +31068,206 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1483: -#line 10283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->in_sum_expr--; (yyval.item)= (yyvsp[0].item); } -#line 31087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1484: -#line 10291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->charset= &my_charset_bin; Lex->dec= 0; } -#line 31093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1485: -#line 10293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset= thd->variables.collation_connection; } -#line 31099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1486: -#line 10295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->dec= 0; } -#line 31105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1487: -#line 10297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_CHAR; Lex->charset= national_charset_info; Lex->dec=0; } -#line 31111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1488: -#line 10299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1489: -#line 10301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1490: -#line 10303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_SIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1491: -#line 10305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1492: -#line 10307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_UNSIGNED_INT; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1493: -#line 10309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DATE; Lex->charset= NULL; Lex->dec=Lex->length= (char*)0; } -#line 31147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1494: -#line 10311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_TIME; LEX *lex= Lex; lex->charset= NULL; lex->dec= lex->length; lex->length= (char*)0; } -#line 31157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1495: -#line 10317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DATETIME; LEX *lex= Lex; lex->charset= NULL; lex->dec= lex->length; lex->length= (char*)0; } -#line 31167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1496: -#line 10323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DECIMAL; Lex->charset= NULL; } -#line 31173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1497: -#line 10325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->charset= NULL; Lex->length= Lex->dec= 0;} -#line 31179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1498: -#line 10327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.cast_type)=ITEM_CAST_DOUBLE; } -#line 31185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1499: -#line 10330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= NULL; } -#line 31191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1500: -#line 10331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[0].item_list);} -#line 31197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1501: -#line 10336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) MYSQL_YYABORT; (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 31208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1502: -#line 10343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10337 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-2].item_list); } -#line 31217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1503: -#line 10350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[0].item_list); } -#line 31223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1504: -#line 10351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= (yyvsp[-1].item_list); } -#line 31229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1505: -#line 10356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) MYSQL_YYABORT; (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 31240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1506: -#line 10363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-2].item_list); } -#line 31249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1507: -#line 10370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= NULL; } -#line 31255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1508: -#line 10371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 31261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1509: -#line 10375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= NULL; } -#line 31267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1510: -#line 10376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 31273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1511: -#line 10381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_list)= new (thd->mem_root) List; if ((yyval.item_list) == NULL) @@ -31281,27 +31275,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.item_list)->push_back((yyvsp[-2].item), thd->mem_root); (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root); } -#line 31285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1512: -#line 10389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root); (yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root); (yyval.item_list)= (yyvsp[-4].item_list); } -#line 31295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1513: -#line 10399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[0].table_list); } -#line 31301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1514: -#line 10401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!((yyval.table_list)= lex->current_select->nest_last_join(thd))) @@ -31310,49 +31304,49 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1515: -#line 10412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); } -#line 31320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1516: -#line 10423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[0].table_list); } -#line 31326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1517: -#line 10424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[-1].table_list); } -#line 31332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1518: -#line 10430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table_list)=(yyvsp[0].table_list); } -#line 31338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1519: -#line 10432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list))); } -#line 31346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1520: -#line 10452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list))); (yyvsp[0].table_list)->straight=(yyvsp[-1].num); } -#line 31352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1521: -#line 10455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list)); /* Change the current name resolution context to a local context. */ @@ -31360,50 +31354,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->parsing_place= IN_ON; } -#line 31364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1522: -#line 10463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-3].table_list)->straight=(yyvsp[-4].num); add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item)); Lex->pop_context(); Select->parsing_place= NO_MATTER; } -#line 31375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1523: -#line 10471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list)); } -#line 31383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1524: -#line 10475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[-5].table_list)->straight=(yyvsp[-6].num); add_join_natural((yyvsp[-7].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select); (yyval.table_list)=(yyvsp[-5].table_list); } -#line 31393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1525: -#line 10481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && ((yyval.table_list)=(yyvsp[0].table_list))); (yyvsp[0].table_list)->straight=(yyvsp[-1].num); add_join_natural((yyvsp[-3].table_list),(yyvsp[0].table_list),NULL,Select); } -#line 31403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1526: -#line 10490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list)); /* Change the current name resolution context to a local context. */ @@ -31411,11 +31405,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->parsing_place= IN_ON; } -#line 31415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1527: -#line 10498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item)); Lex->pop_context(); @@ -31423,40 +31417,40 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.table_list)=(yyvsp[-3].table_list); Select->parsing_place= NO_MATTER; } -#line 31427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1528: -#line 10506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list)); } -#line 31435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1529: -#line 10510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { add_join_natural((yyvsp[-9].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select); (yyvsp[-5].table_list)->outer_join|=JOIN_TYPE_LEFT; (yyval.table_list)=(yyvsp[-5].table_list); } -#line 31445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1530: -#line 10516 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list)); add_join_natural((yyvsp[-5].table_list),(yyvsp[0].table_list),NULL,Select); (yyvsp[0].table_list)->outer_join|=JOIN_TYPE_LEFT; (yyval.table_list)=(yyvsp[0].table_list); } -#line 31456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1531: -#line 10526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list)); /* Change the current name resolution context to a local context. */ @@ -31464,11 +31458,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->parsing_place= IN_ON; } -#line 31468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1532: -#line 10534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!((yyval.table_list)= lex->current_select->convert_right_join())) @@ -31477,30 +31471,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->pop_context(); Select->parsing_place= NO_MATTER; } -#line 31481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1533: -#line 10543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list)); } -#line 31489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1534: -#line 10547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (!((yyval.table_list)= lex->current_select->convert_right_join())) MYSQL_YYABORT; add_join_natural((yyval.table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select); } -#line 31500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1535: -#line 10554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list)); add_join_natural((yyvsp[0].table_list),(yyvsp[-5].table_list),NULL,Select); @@ -31508,64 +31502,64 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!((yyval.table_list)= lex->current_select->convert_right_join())) MYSQL_YYABORT; } -#line 31512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1536: -#line 10565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1537: -#line 10566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1538: -#line 10567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 31530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1539: -#line 10571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = (yyvsp[0].num); } -#line 31536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1540: -#line 10572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 0; } -#line 31542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1541: -#line 10580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string_list)= 0;} -#line 31548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1543: -#line 10586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string_list)= (yyvsp[-2].string_list); } -#line 31556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1544: -#line 10600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->table_join_options= 0; } -#line 31565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1545: -#line 10605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-3].table), (yyvsp[-1].lex_str_ptr), Select->get_table_join_options(), @@ -31576,11 +31570,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Select->add_joined_table((yyval.table_list)); } -#line 31580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1546: -#line 10616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -31598,11 +31592,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* incomplete derived tables return NULL, we must be nested in select_derived rule to be here. */ } -#line 31602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1547: -#line 10652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Use $2 instead of Lex->current_select as derived table will alter value of Lex->current_select. */ @@ -31665,11 +31659,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); !(yyval.table_list)->derived->first_select()->next_select()) (yyval.table_list)->select_lex->add_where_field((yyval.table_list)->derived->first_select()); } -#line 31669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1548: -#line 10737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[-1].table_list) && (yyvsp[0].num)) { @@ -31677,20 +31671,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1549: -#line 10747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), FALSE)) MYSQL_YYABORT; } -#line 31690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1550: -#line 10752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Remove from the name resolution context stack the context of the @@ -31704,11 +31698,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1551: -#line 10770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->current_select->set_braces(0)) @@ -31717,11 +31711,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1552: -#line 10782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; SELECT_LEX *sel= lex->current_select; @@ -31729,28 +31723,28 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); mysql_init_select(lex); lex->current_select->parsing_place= SELECT_LIST; } -#line 31733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1553: -#line 10790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 31741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1554: -#line 10798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].select_lex)->init_nested_join(thd)) MYSQL_YYABORT; } -#line 31750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31744 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1555: -#line 10803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* for normal joins, $3 != NULL and end_nested_join() != NULL, for derived tables, both must equal NULL */ @@ -31763,11 +31757,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 31767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1556: -#line 10818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->derived_tables|= DERIVED_SUBQUERY; @@ -31784,25 +31778,25 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select->linkage= DERIVED_TABLE_TYPE; lex->current_select->parsing_place= SELECT_LIST; } -#line 31788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1557: -#line 10835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 31796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1559: -#line 10842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= Select; } -#line 31802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1560: -#line 10847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -31822,113 +31816,113 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); !embedding->nested_join->join_list.elements; /* return true if we are deeply nested */ } -#line 31826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1561: -#line 10869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10863 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1562: -#line 10870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1563: -#line 10875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= thd->variables.old_mode ? INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL; } -#line 31846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1564: -#line 10878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= INDEX_HINT_MASK_JOIN; } -#line 31852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1565: -#line 10879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= INDEX_HINT_MASK_ORDER; } -#line 31858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1566: -#line 10880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= INDEX_HINT_MASK_GROUP; } -#line 31864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1567: -#line 10884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.index_hint)= INDEX_HINT_FORCE; } -#line 31870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1568: -#line 10885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.index_hint)= INDEX_HINT_IGNORE; } -#line 31876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1569: -#line 10890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num)); } -#line 31884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1571: -#line 10895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num)); } -#line 31892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1576: -#line 10908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->alloc_index_hints(thd); } -#line 31898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1578: -#line 10912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->clear_index_hints(); } -#line 31904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1580: -#line 10917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->add_index_hint(thd, NULL, 0); } -#line 31910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1581: -#line 10918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1582: -#line 10923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->add_index_hint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); } -#line 31922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1583: -#line 10925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->add_index_hint(thd, (char *)"PRIMARY", 7); } -#line 31928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1586: -#line 10935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.string_list)= new (thd->mem_root) List)) MYSQL_YYABORT; @@ -31939,11 +31933,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyval.string_list)->push_back(s, thd->mem_root); } -#line 31943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1587: -#line 10946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { String *s= new (thd->mem_root) String((const char *) (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -31953,191 +31947,191 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].string_list)->push_back(s, thd->mem_root); (yyval.string_list)= (yyvsp[-2].string_list); } -#line 31957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1588: -#line 10958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 31963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1589: -#line 10959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_HOUR; } -#line 31969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1590: -#line 10960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_MICROSECOND; } -#line 31975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1591: -#line 10961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_MINUTE; } -#line 31981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1592: -#line 10962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_DAY_SECOND; } -#line 31987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1593: -#line 10963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; } -#line 31993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1594: -#line 10964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_HOUR_MINUTE; } -#line 31999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1595: -#line 10965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_HOUR_SECOND; } -#line 32005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 31999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1596: -#line 10966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; } -#line 32011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1597: -#line 10967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_MINUTE_SECOND; } -#line 32017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1598: -#line 10968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; } -#line 32023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1599: -#line 10969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval)=INTERVAL_YEAR_MONTH; } -#line 32029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1600: -#line 10973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_DAY; } -#line 32035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1601: -#line 10974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_WEEK; } -#line 32041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1602: -#line 10975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_HOUR; } -#line 32047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1603: -#line 10976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_MINUTE; } -#line 32053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1604: -#line 10977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_MONTH; } -#line 32059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1605: -#line 10978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_QUARTER; } -#line 32065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1606: -#line 10979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_SECOND; } -#line 32071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1607: -#line 10980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_MICROSECOND; } -#line 32077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1608: -#line 10981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.interval_time_st)=INTERVAL_YEAR; } -#line 32083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1609: -#line 10985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;} -#line 32089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1610: -#line 10986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;} -#line 32095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1611: -#line 10987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;} -#line 32101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1612: -#line 10988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;} -#line 32107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1616: -#line 10998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str_ptr)=0; } -#line 32113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1617: -#line 11000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 10994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str_ptr)= (LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str),sizeof(LEX_STRING)); if ((yyval.lex_str_ptr) == NULL) MYSQL_YYABORT; } -#line 32123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1620: -#line 11013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->where= 0; } -#line 32129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1621: -#line 11015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= IN_WHERE; } -#line 32137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1622: -#line 11019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *select= Select; select->where= normalize_cond(thd, (yyvsp[0].item)); @@ -32145,19 +32139,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyvsp[0].item)) (yyvsp[0].item)->top_level_item(); } -#line 32149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1624: -#line 11031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= IN_HAVING; } -#line 32157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1625: -#line 11035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->having= normalize_cond(thd, (yyvsp[0].item)); @@ -32165,20 +32159,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyvsp[0].item)) (yyvsp[0].item)->top_level_item(); } -#line 32169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1626: -#line 11046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->escape_used= TRUE; (yyval.item)= (yyvsp[0].item); } -#line 32178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1627: -#line 11051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->escape_used= FALSE; (yyval.item)= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ? @@ -32187,29 +32181,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1630: -#line 11072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1631: -#line 11074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1632: -#line 11078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1633: -#line 11080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* 'WITH CUBE' is reserved in the MySQL syntax, but not implemented, @@ -32226,11 +32220,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE")); } -#line 32230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1634: -#line 11097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* 'WITH ROLLUP' is needed for backward compatibility, @@ -32245,21 +32239,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); "global union parameters")); lex->current_select->olap= ROLLUP_TYPE; } -#line 32249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1638: -#line 11128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { bool ascending= ((yyvsp[0].num) == 1) ? true : false; if (add_order_to_list(thd, (yyvsp[-1].item), ascending)) MYSQL_YYABORT; } -#line 32259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1641: -#line 11146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; SELECT_LEX *sel= lex->current_select; @@ -32302,61 +32296,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select= sel->master_unit()->fake_select_lex; } } -#line 32306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1642: -#line 11189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 32314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1643: -#line 11196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1644: -#line 11198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))) MYSQL_YYABORT; } -#line 32326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1645: -#line 11202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) = 1; } -#line 32332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1646: -#line 11203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) =1; } -#line 32338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1647: -#line 11204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num) =0; } -#line 32344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1648: -#line 11208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1649: -#line 11209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1650: -#line 11214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; if (sel->master_unit()->is_union() && !sel->braces) @@ -32366,71 +32360,71 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); DBUG_ASSERT(Select); } } -#line 32370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1651: -#line 11227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; if (!sel->select_limit->basic_const_item() || sel->select_limit->val_int() > 0) Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } -#line 32381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1652: -#line 11235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } -#line 32389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1653: -#line 11239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } -#line 32397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1654: -#line 11246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[0].item); sel->offset_limit= 0; sel->explicit_limit= 1; } -#line 32408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1655: -#line 11253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[0].item); sel->offset_limit= (yyvsp[-2].item); sel->explicit_limit= 1; } -#line 32419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1656: -#line 11260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[-2].item); sel->offset_limit= (yyvsp[0].item); sel->explicit_limit= 1; } -#line 32430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1657: -#line 11270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_splocal *splocal; LEX *lex= thd->lex; @@ -32457,258 +32451,258 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); splocal->limit_clause_param= TRUE; (yyval.item)= splocal; } -#line 32461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1658: -#line 11297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[0].item_param)->limit_clause_param= TRUE; } -#line 32469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1659: -#line 11301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1660: -#line 11307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1661: -#line 11313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 32499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1662: -#line 11322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->limit_rows_examined= (yyvsp[0].item); } -#line 32508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1663: -#line 11329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->current_select->select_limit= 0; } -#line 32517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1664: -#line 11334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; sel->select_limit= (yyvsp[0].item); Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); sel->explicit_limit= 1; } -#line 32528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1665: -#line 11340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { my_parse_error(thd, ER_SYNTAX_ERROR); MYSQL_YYABORT; } -#line 32534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1666: -#line 11341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { my_parse_error(thd, ER_SYNTAX_ERROR); MYSQL_YYABORT; } -#line 32540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1667: -#line 11345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1668: -#line 11346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1669: -#line 11347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1670: -#line 11351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1671: -#line 11352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); } -#line 32570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1672: -#line 11353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1673: -#line 11354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1674: -#line 11355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11349 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1675: -#line 11356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1676: -#line 11360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1677: -#line 11361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); } -#line 32606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1678: -#line 11362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1679: -#line 11363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1680: -#line 11364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT; } -#line 32624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1681: -#line 11368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1682: -#line 11369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1683: -#line 11370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1684: -#line 11371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1685: -#line 11372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1686: -#line 11376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1687: -#line 11377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1688: -#line 11378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); } -#line 32672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1689: -#line 11379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); } -#line 32678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1690: -#line 11380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT; } -#line 32684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1691: -#line 11385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { my_parse_error(thd, ER_ONLY_INTEGERS_ALLOWED); } -#line 32690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1694: -#line 11394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; } -#line 32696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1695: -#line 11395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.choice)= HA_CHOICE_UNDEF; } -#line 32702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1696: -#line 11399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 32708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1697: -#line 11401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; @@ -32737,67 +32731,67 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->expr_allows_subselect= false; } -#line 32741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1698: -#line 11430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Subqueries are allowed from now.*/ Lex->expr_allows_subselect= true; (yyval.num)= true; } -#line 32751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1699: -#line 11438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1700: -#line 11439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1703: -#line 11449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_proc_to_list(thd, (yyvsp[-1].item))) MYSQL_YYABORT; if (!(yyvsp[-1].item)->name) (yyvsp[-1].item)->set_name((yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset()); } -#line 32774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1704: -#line 11458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->describe && (!(lex->result= new (thd->mem_root) select_dumpvar(thd)))) MYSQL_YYABORT; } -#line 32785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1705: -#line 11465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1707: -#line 11470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1708: -#line 11474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->result) { @@ -32814,19 +32808,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); DBUG_ASSERT(Lex->describe); } } -#line 32818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1709: -#line 11494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user((yyvsp[0].lex_str)) : NULL; } -#line 32826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1710: -#line 11498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_variable *t; @@ -32837,32 +32831,32 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Lex->sphead)) : NULL; } -#line 32841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1711: -#line 11511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 32847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1712: -#line 11512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= true; } -#line 32853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1713: -#line 11517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (! Lex->parsing_options.allows_select_into) my_yyabort_error((ER_VIEW_SELECT_CLAUSE, MYF(0), "INTO")); } -#line 32862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1715: -#line 11526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->uncacheable(UNCACHEABLE_SIDEEFFECT); @@ -32872,17 +32866,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); new (thd->mem_root) select_export(thd, lex->exchange))) MYSQL_YYABORT; } -#line 32876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1716: -#line 11536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->exchange->cs= (yyvsp[0].charset); } -#line 32882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1718: -#line 11539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->describe) @@ -32895,60 +32889,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 32899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1719: -#line 11552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->uncacheable(UNCACHEABLE_SIDEEFFECT); } -#line 32907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1720: -#line 11563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_DO; mysql_init_select(lex); } -#line 32917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1721: -#line 11569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->insert_list= (yyvsp[0].item_list); } -#line 32925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1722: -#line 11580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->set_command(SQLCOM_DROP_TABLE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options)); YYPS->m_lock_type= TL_UNLOCK; YYPS->m_mdl_type= MDL_EXCLUSIVE; } -#line 32936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1723: -#line 11587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1724: -#line 11588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 32948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1725: -#line 11589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Alter_drop *ad= (new (thd->mem_root) @@ -32965,21 +32959,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MDL_SHARED_UPGRADABLE)) MYSQL_YYABORT; } -#line 32969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1726: -#line 11606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->set_command(SQLCOM_DROP_DB, (yyvsp[-1].object_ddl_options)); lex->name= (yyvsp[0].lex_str); } -#line 32979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1727: -#line 11612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; sp_name *spname; @@ -32994,11 +32988,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); spname->init_qname(thd); lex->spname= spname; } -#line 32998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 32992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1728: -#line 11627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; LEX_STRING db= {0, 0}; @@ -33014,11 +33008,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); spname->init_qname(thd); lex->spname= spname; } -#line 33018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1729: -#line 11643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->sphead) @@ -33026,90 +33020,90 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->set_command(SQLCOM_DROP_PROCEDURE, (yyvsp[-1].object_ddl_options)); lex->spname= (yyvsp[0].spname); } -#line 33030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1730: -#line 11651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options)); } -#line 33038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1731: -#line 11655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options)); } -#line 33046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1732: -#line 11659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->set_command(SQLCOM_DROP_VIEW, (yyvsp[0].object_ddl_options)); YYPS->m_lock_type= TL_UNLOCK; YYPS->m_mdl_type= MDL_EXCLUSIVE; } -#line 33057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1733: -#line 11666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1734: -#line 11668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->spname= (yyvsp[0].spname); Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options)); } -#line 33072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1735: -#line 11673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->set_command(SQLCOM_DROP_TRIGGER, (yyvsp[-1].object_ddl_options)); lex->spname= (yyvsp[0].spname); } -#line 33082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1736: -#line 11679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE; } -#line 33091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1737: -#line 11684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP; } -#line 33100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1738: -#line 11689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_DROP_SERVER, (yyvsp[-1].object_ddl_options)); Lex->server_options.reset((yyvsp[0].lex_str)); } -#line 33109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1741: -#line 11702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING, @@ -33117,11 +33111,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1742: -#line 11713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING, @@ -33131,11 +33125,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[0].string_list))) MYSQL_YYABORT; } -#line 33135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1745: -#line 11731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING | TL_OPTION_ALIAS, @@ -33143,109 +33137,109 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1746: -#line 11742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= FALSE; (yyval.num)= 0; } -#line 33156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1747: -#line 11747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->check_exists= TRUE; (yyval.num)= 1; } -#line 33165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1748: -#line 11755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_NONE); } -#line 33173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1749: -#line 11759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS); } -#line 33181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1750: -#line 11765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 33187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1751: -#line 11766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= HA_LEX_CREATE_TMP_TABLE; } -#line 33193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1752: -#line 11774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_INSERT; lex->duplicates= DUP_ERROR; mysql_init_select(lex); } -#line 33204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1753: -#line 11782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_lock_for_tables((yyvsp[-2].lock_type)); Lex->current_select= &Lex->select_lex; } -#line 33213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1754: -#line 11787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1755: -#line 11792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_REPLACE; lex->duplicates= DUP_REPLACE; mysql_init_select(lex); } -#line 33230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1756: -#line 11799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_lock_for_tables((yyvsp[-1].lock_type)); Lex->current_select= &Lex->select_lex; } -#line 33239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1757: -#line 11804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1758: -#line 11809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* If it is SP we do not allow insert optimisation when result of @@ -33254,17 +33248,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } -#line 33258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1759: -#line 11817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } -#line 33264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1760: -#line 11819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() - thd->query()); @@ -33272,23 +33266,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYLIP->yyLength() + 1; (yyval.lock_type)= TL_WRITE_DELAYED; } -#line 33276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1761: -#line 11826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE; } -#line 33282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1762: -#line 11830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= (yyvsp[0].lock_type); } -#line 33288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1763: -#line 11832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() - thd->query()); @@ -33296,222 +33290,222 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYLIP->yyLength() + 1; (yyval.lock_type)= TL_WRITE_DELAYED; } -#line 33300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1764: -#line 11842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1765: -#line 11843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1766: -#line 11848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->field_list.empty(); lex->many_values.empty(); lex->insert_list=0; } -#line 33323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1767: -#line 11856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1768: -#line 11857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1769: -#line 11858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1770: -#line 11860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!(lex->insert_list= new (thd->mem_root) List_item) || lex->many_values.push_back(lex->insert_list, thd->mem_root)) MYSQL_YYABORT; } -#line 33352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1772: -#line 11871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 33358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1773: -#line 11872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 33364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1774: -#line 11876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1775: -#line 11877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1776: -#line 11879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(0);} -#line 33382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1777: -#line 11880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1778: -#line 11882 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->set_braces(1);} -#line 33394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1779: -#line 11883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1784: -#line 11898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->field_list.push_back((yyvsp[-2].item), thd->mem_root) || lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1785: -#line 11907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1786: -#line 11908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1787: -#line 11912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1788: -#line 11913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1789: -#line 11918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!(Lex->insert_list= new (thd->mem_root) List_item)) MYSQL_YYABORT; } -#line 33444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1790: -#line 11923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->many_values.push_back(lex->insert_list, thd->mem_root)) MYSQL_YYABORT; } -#line 33454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1791: -#line 11931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1793: -#line 11937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1794: -#line 11942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1795: -#line 11949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item);} -#line 33484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1796: -#line 11951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context()); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 33494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1798: -#line 11960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->duplicates= DUP_UPDATE; } -#line 33500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1800: -#line 11968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; mysql_init_select(lex); lex->sql_command= SQLCOM_UPDATE; lex->duplicates= DUP_ERROR; } -#line 33511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1801: -#line 11976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->select_lex.table_list.elements > 1) @@ -33530,49 +33524,49 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Select->set_lock_for_tables((yyvsp[-4].lock_type)); } -#line 33534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1802: -#line 11994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1805: -#line 12004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 11998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, (yyvsp[0].item))) MYSQL_YYABORT; } -#line 33549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1808: -#line 12017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->update_list.push_back((yyvsp[-2].item), thd->mem_root) || lex->value_list.push_back((yyvsp[0].item), thd->mem_root)) MYSQL_YYABORT; } -#line 33560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1809: -#line 12026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_DEFAULT; } -#line 33566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1810: -#line 12027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } -#line 33572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1811: -#line 12034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_DELETE; @@ -33583,11 +33577,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->ignore= 0; lex->select_lex.init_order(); } -#line 33587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1813: -#line 12049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING, YYPS->m_lock_type, @@ -33598,61 +33592,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_lock_type= TL_READ_DEFAULT; YYPS->m_mdl_type= MDL_SHARED_READ; } -#line 33602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1814: -#line 12060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1815: -#line 12061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1816: -#line 12063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { mysql_init_multi_delete(Lex); YYPS->m_lock_type= TL_READ_DEFAULT; YYPS->m_mdl_type= MDL_SHARED_READ; } -#line 33624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1817: -#line 12069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (multi_delete_set_locks_and_link_aux_tables(Lex)) MYSQL_YYABORT; } -#line 33633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1818: -#line 12074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { mysql_init_multi_delete(Lex); YYPS->m_lock_type= TL_READ_DEFAULT; YYPS->m_mdl_type= MDL_SHARED_READ; } -#line 33643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1819: -#line 12080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (multi_delete_set_locks_and_link_aux_tables(Lex)) MYSQL_YYABORT; } -#line 33652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1824: -#line 12098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Table_ident *ti= new (thd->mem_root) Table_ident((yyvsp[-1].lex_str)); if (ti == NULL) @@ -33665,11 +33659,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1825: -#line 12111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Table_ident *ti= new (thd->mem_root) Table_ident(thd, (yyvsp[-3].lex_str), (yyvsp[-1].lex_str), 0); if (ti == NULL) @@ -33682,53 +33676,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type)) MYSQL_YYABORT; } -#line 33686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1826: -#line 12126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1827: -#line 12127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1828: -#line 12131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1829: -#line 12132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 33710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1830: -#line 12136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= OPTION_QUICK; } -#line 33716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1831: -#line 12137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; } -#line 33722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1832: -#line 12138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1; } -#line 33728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1833: -#line 12143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= Lex; lex->sql_command= SQLCOM_TRUNCATE; @@ -33739,11 +33733,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_lock_type= TL_WRITE; YYPS->m_mdl_type= MDL_EXCLUSIVE; } -#line 33743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1834: -#line 12154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_sql_cmd); @@ -33751,99 +33745,99 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->m_sql_cmd == NULL) MYSQL_YYABORT; } -#line 33755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1841: -#line 12178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_CPU; } -#line 33763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1842: -#line 12182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_MEMORY; } -#line 33771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1843: -#line 12186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_BLOCK_IO; } -#line 33779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1844: -#line 12190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_CONTEXT; } -#line 33787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1845: -#line 12194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_PAGE_FAULTS; } -#line 33795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1846: -#line 12198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_IPC; } -#line 33803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1847: -#line 12202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_SWAPS; } -#line 33811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1848: -#line 12206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_SOURCE; } -#line 33819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1849: -#line 12210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_options|= PROFILE_ALL; } -#line 33827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1850: -#line 12217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_query_id= 0; } -#line 33835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1851: -#line 12221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->profile_query_id= atoi((yyvsp[0].lex_str).str); } -#line 33843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1852: -#line 12230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->wild=0; @@ -33852,30 +33846,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select->parsing_place= SELECT_LIST; lex->create_info.init(); } -#line 33856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1853: -#line 12239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 33864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1854: -#line 12246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_DATABASES; if (prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)) MYSQL_YYABORT; } -#line 33875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1855: -#line 12253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLES; @@ -33883,11 +33877,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)) MYSQL_YYABORT; } -#line 33887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1856: -#line 12261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TRIGGERS; @@ -33895,11 +33889,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)) MYSQL_YYABORT; } -#line 33899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1857: -#line 12269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_EVENTS; @@ -33907,11 +33901,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_EVENTS)) MYSQL_YYABORT; } -#line 33911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1858: -#line 12277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLE_STATUS; @@ -33919,11 +33913,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_TABLES)) MYSQL_YYABORT; } -#line 33923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1859: -#line 12285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_OPEN_TABLES; @@ -33931,55 +33925,55 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)) MYSQL_YYABORT; } -#line 33935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1860: -#line 12293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_PLUGINS; if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS)) MYSQL_YYABORT; } -#line 33946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1861: -#line 12300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ident= (yyvsp[0].lex_str); Lex->sql_command= SQLCOM_SHOW_PLUGINS; if (prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)) MYSQL_YYABORT; } -#line 33957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1862: -#line 12307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_PLUGINS; if (prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)) MYSQL_YYABORT; } -#line 33967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1863: -#line 12313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.db_type= (yyvsp[-1].db_type); } -#line 33973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1864: -#line 12315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_info.db_type= NULL; } -#line 33979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1865: -#line 12317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_FIELDS; @@ -33988,45 +33982,45 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)) MYSQL_YYABORT; } -#line 33992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1866: -#line 12326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_BINLOGS; } -#line 34000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 33994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1867: -#line 12330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS; } -#line 34008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1868: -#line 12334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS; } -#line 34017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1870: -#line 12340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS; } -#line 34026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1872: -#line 12345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_KEYS; @@ -34035,90 +34029,90 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)) MYSQL_YYABORT; } -#line 34039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1873: -#line 12354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; if (prepare_schema_table(thd, lex, 0, SCH_ENGINES)) MYSQL_YYABORT; } -#line 34050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1874: -#line 12361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_AUTHORS; } -#line 34059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1875: -#line 12366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS; } -#line 34068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1876: -#line 12371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_PRIVILEGES; } -#line 34077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1877: -#line 12376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (void) create_select_for_variable("warning_count"); } -#line 34083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1878: -#line 12378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (void) create_select_for_variable("error_count"); } -#line 34089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1879: -#line 12380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_WARNS;} -#line 34095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1880: -#line 12382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_ERRORS;} -#line 34101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1881: -#line 12384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_PROFILES; } -#line 34107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1882: -#line 12386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_PROFILE; if (prepare_schema_table(thd, lex, NULL, SCH_PROFILES) != 0) MYSQL_YYABORT; } -#line 34118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1883: -#line 12393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS; @@ -34126,17 +34120,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)) MYSQL_YYABORT; } -#line 34130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1884: -#line 12401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;} -#line 34136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1885: -#line 12403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_VARIABLES; @@ -34144,63 +34138,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)) MYSQL_YYABORT; } -#line 34148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1886: -#line 12411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CHARSETS; if (prepare_schema_table(thd, lex, 0, SCH_CHARSETS)) MYSQL_YYABORT; } -#line 34159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1887: -#line 12418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_COLLATIONS; if (prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)) MYSQL_YYABORT; } -#line 34170 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1888: -#line 12425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_GRANTS; if (!(Lex->grant_user= (LEX_USER*)thd->alloc(sizeof(LEX_USER)))) MYSQL_YYABORT; Lex->grant_user->user= current_user_and_current_role; } -#line 34181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1889: -#line 12432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_GRANTS; lex->grant_user=(yyvsp[-1].lex_user); } -#line 34191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1890: -#line 12438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->set_command(SQLCOM_SHOW_CREATE_DB, (yyvsp[-1].object_ddl_options)); Lex->name= (yyvsp[0].lex_str); } -#line 34200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1891: -#line 12443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE; @@ -34208,11 +34202,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->create_info.storage_media= HA_SM_DEFAULT; } -#line 34212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1892: -#line 12451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE; @@ -34220,140 +34214,140 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->only_view= 1; } -#line 34224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1893: -#line 12459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_MASTER_STAT; } -#line 34232 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34226 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1894: -#line 12463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; Lex->verbose= 1; } -#line 34241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1895: -#line 12468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; lex->mi.connection_name= null_lex_str; lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; lex->verbose= 0; } -#line 34252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1896: -#line 12475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; Lex->verbose= 0; } -#line 34261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1897: -#line 12480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE_PROC; lex->spname= (yyvsp[0].spname); } -#line 34272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1898: -#line 12487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE_FUNC; lex->spname= (yyvsp[0].spname); } -#line 34283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1899: -#line 12494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER; lex->spname= (yyvsp[0].spname); } -#line 34293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1900: -#line 12500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS_PROC; if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) MYSQL_YYABORT; } -#line 34304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1901: -#line 12507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS_FUNC; if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) MYSQL_YYABORT; } -#line 34315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1902: -#line 12514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_PROC_CODE; Lex->spname= (yyvsp[0].spname); } -#line 34324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1903: -#line 12519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_FUNC_CODE; Lex->spname= (yyvsp[0].spname); } -#line 34333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1904: -#line 12524 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->spname= (yyvsp[0].spname); Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT; } -#line 34342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1905: -#line 12529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_EXPLAIN; if (prepare_schema_table(thd, Lex, 0, SCH_EXPLAIN)) MYSQL_YYABORT; add_value_to_list(thd, (yyvsp[0].item)); } -#line 34353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1906: -#line 12536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; bool in_plugin; @@ -34372,83 +34366,83 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (make_schema_select(thd, Lex->current_select, table)) MYSQL_YYABORT; } -#line 34376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1907: -#line 12558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; } -#line 34382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1908: -#line 12560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; } -#line 34388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1909: -#line 12562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; } -#line 34394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1914: -#line 12576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= 0; } -#line 34400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1915: -#line 12577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= (yyvsp[0].lex_str).str; } -#line 34406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1916: -#line 12581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->verbose=0; } -#line 34412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1917: -#line 12582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->verbose=1; } -#line 34418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1920: -#line 12591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.log_file_name = 0; } -#line 34424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1921: -#line 12592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.log_file_name = (yyvsp[0].lex_str).str; } -#line 34430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1922: -#line 12596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.pos = 4; /* skip magic number */ } -#line 34436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1923: -#line 12597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->mi.pos = (yyvsp[0].ulonglong_number); } -#line 34442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1924: -#line 12601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.simple_string)= 0; } -#line 34448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1925: -#line 12603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->wild= new (thd->mem_root) String((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, system_charset_info); @@ -34456,22 +34450,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyval.simple_string)= (yyvsp[-1].simple_string); } -#line 34460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1926: -#line 12611 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->where= normalize_cond(thd, (yyvsp[0].item)); if ((yyvsp[0].item)) (yyvsp[0].item)->top_level_item(); (yyval.simple_string)= (yyvsp[-1].simple_string); } -#line 34471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1927: -#line 12622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; mysql_init_select(lex); @@ -34482,66 +34476,66 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)) MYSQL_YYABORT; } -#line 34486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1928: -#line 12633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->parsing_place= NO_MATTER; } -#line 34494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1929: -#line 12637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->describe|= DESCRIBE_NORMAL; } -#line 34500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1930: -#line 12639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->select_lex.options|= SELECT_DESCRIBE; } -#line 34509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1938: -#line 12660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->analyze_stmt= true; } -#line 34517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1939: -#line 12666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->describe|= DESCRIBE_EXTENDED; } -#line 34523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1940: -#line 12667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->describe|= DESCRIBE_PARTITIONS; } -#line 34529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1941: -#line 12668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1942: -#line 12672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1943: -#line 12674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!my_strcasecmp(system_charset_info, (yyvsp[0].lex_str).str, "JSON")) Lex->explain_json= true; @@ -34550,23 +34544,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), (yyvsp[0].lex_str).str)); } -#line 34554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1944: -#line 12685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1945: -#line 12686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12680 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->wild= (yyvsp[0].string); } -#line 34566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1946: -#line 12688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -34574,28 +34568,28 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->wild == NULL) MYSQL_YYABORT; } -#line 34578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1947: -#line 12702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_FLUSH; lex->type= 0; lex->no_write_to_binlog= (yyvsp[0].num); } -#line 34589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1948: -#line 12709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1949: -#line 12714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_TABLES; /* @@ -34605,23 +34599,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_lock_type= TL_READ_NO_INSERT; YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO; } -#line 34609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1950: -#line 12724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1952: -#line 12729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1953: -#line 12731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { TABLE_LIST *tables= Lex->query_tables; for (; tables; tables= tables->next_global) @@ -34631,17 +34625,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tables->open_type= OT_BASE_ONLY; /* Ignore temporary tables. */ } } -#line 34635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1954: -#line 12744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); } -#line 34641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1955: -#line 12746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->query_tables == NULL) // Table list can't be empty { @@ -34650,53 +34644,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } Lex->type|= REFRESH_FOR_EXPORT; } -#line 34654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1956: -#line 12753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1958: -#line 12759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1959: -#line 12764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_ERROR_LOG; } -#line 34672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1960: -#line 12766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_ENGINE_LOG; } -#line 34678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1961: -#line 12768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_GENERAL_LOG; } -#line 34684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1962: -#line 12770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_SLOW_LOG; } -#line 34690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1963: -#line 12772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_BINARY_LOG; } -#line 34696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1964: -#line 12774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->type & REFRESH_RELAY_LOG) @@ -34704,44 +34698,44 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->type|= REFRESH_RELAY_LOG; lex->relay_log_connection_name= lex->mi.connection_name; } -#line 34708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1965: -#line 12782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_QUERY_CACHE_FREE; } -#line 34714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1966: -#line 12784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_HOSTS; } -#line 34720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1967: -#line 12786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_GRANT; } -#line 34726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1968: -#line 12788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_LOG; Lex->relay_log_connection_name= empty_lex_str; } -#line 34735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1969: -#line 12793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_STATUS; } -#line 34741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1970: -#line 12795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->type & REFRESH_SLAVE) @@ -34749,29 +34743,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->type|= REFRESH_SLAVE; lex->reset_slave_info.all= false; } -#line 34753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1971: -#line 12803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_MASTER; } -#line 34759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1972: -#line 12805 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_DES_KEY_FILE; } -#line 34765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1973: -#line 12807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_USER_RESOURCES; } -#line 34771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1974: -#line 12809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_GENERIC; ST_SCHEMA_TABLE *table= find_schema_table(thd, (yyvsp[-1].lex_str).str); @@ -34784,138 +34778,138 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); thd->memdup(&(yyvsp[-1].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 34788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1975: -#line 12824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1976: -#line 12825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1977: -#line 12829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num)= 0;} -#line 34806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1978: -#line 12830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.num)= REFRESH_CHECKPOINT; } -#line 34812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1979: -#line 12834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_RESET; lex->type=0; } -#line 34821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1980: -#line 12839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1983: -#line 12848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_SLAVE; } -#line 34833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1984: -#line 12850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 34839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1985: -#line 12852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_MASTER; Lex->next_binlog_file_number= 0; } -#line 34848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1987: -#line 12857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->type|= REFRESH_QUERY_CACHE;} -#line 34854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1988: -#line 12861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->reset_slave_info.all= false; } -#line 34860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1989: -#line 12862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->reset_slave_info.all= true; } -#line 34866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1990: -#line 12866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1991: -#line 12868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->next_binlog_file_number = (yyvsp[0].ulong_num); } -#line 34880 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1992: -#line 12875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->type=0; lex->sql_command = SQLCOM_PURGE; } -#line 34890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1993: -#line 12881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 34896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1995: -#line 12890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->to_log = (yyvsp[0].lex_str).str; } -#line 34904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1996: -#line 12894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->value_list.empty(); lex->value_list.push_front((yyvsp[0].item), thd->mem_root); lex->sql_command= SQLCOM_PURGE_BEFORE; } -#line 34915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1997: -#line 12906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->value_list.empty(); @@ -34923,97 +34917,97 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_KILL; lex->kill_type= KILL_TYPE_ID; } -#line 34927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1998: -#line 12914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->kill_signal= (killed_state) ((yyvsp[-2].num) | (yyvsp[-1].num)); } -#line 34935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 1999: -#line 12920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_HARD_BIT; } -#line 34941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2000: -#line 12921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_HARD_BIT; } -#line 34947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2001: -#line 12922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 34953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2002: -#line 12925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_CONNECTION; } -#line 34959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2003: -#line 12926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_CONNECTION; } -#line 34965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2004: -#line 12927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_QUERY; } -#line 34971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2005: -#line 12929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (int) KILL_QUERY; Lex->kill_type= KILL_TYPE_QUERY; } -#line 34980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2006: -#line 12937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->value_list.push_front((yyval.item), thd->mem_root); } -#line 34988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2007: -#line 12941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root); Lex->kill_type= KILL_TYPE_USER; } -#line 34997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2008: -#line 12949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_SHUTDOWN; } -#line 35003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 34997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2009: -#line 12956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command=SQLCOM_CHANGE_DB; lex->select_lex.db= (yyvsp[0].lex_str).str; } -#line 35013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2010: -#line 12967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; @@ -35024,11 +35018,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2011: -#line 12978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_LOAD; @@ -35038,11 +35032,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!(lex->exchange= new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))) MYSQL_YYABORT; } -#line 35042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2012: -#line 12988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING, @@ -35052,53 +35046,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->update_list.empty(); lex->value_list.empty(); } -#line 35056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2013: -#line 12998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->exchange->cs= (yyvsp[0].charset); } -#line 35062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2014: -#line 13002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 12996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2015: -#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.filetype)= FILETYPE_CSV; } -#line 35074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2016: -#line 13007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.filetype)= FILETYPE_XML; } -#line 35080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2017: -#line 13011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=0;} -#line 35086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2018: -#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=1;} -#line 35092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2019: -#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_DEFAULT; } -#line 35098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2020: -#line 13018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Ignore this option in SP to avoid problem with query cache and @@ -35106,182 +35100,182 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } -#line 35110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2021: -#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } -#line 35116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2022: -#line 13029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->duplicates=DUP_ERROR; } -#line 35122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2023: -#line 13030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->duplicates=DUP_REPLACE; } -#line 35128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2024: -#line 13031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ignore= 1; } -#line 35134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2029: -#line 13046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->field_term= (yyvsp[0].string); } -#line 35143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2030: -#line 13051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; DBUG_ASSERT(lex->exchange != 0); lex->exchange->enclosed= (yyvsp[0].string); lex->exchange->opt_enclosed= 1; } -#line 35154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2031: -#line 13058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->enclosed= (yyvsp[0].string); } -#line 35163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2032: -#line 13063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->escaped= (yyvsp[0].string); } -#line 35172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2037: -#line 13081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->line_term= (yyvsp[0].string); } -#line 35181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2038: -#line 13086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->line_start= (yyvsp[0].string); } -#line 35190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2039: -#line 13093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 35196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2040: -#line 13095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->exchange->line_term = (yyvsp[0].string); } -#line 35202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2042: -#line 13100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str); } -#line 35211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2043: -#line 13107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 35217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2044: -#line 13108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 35223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2045: -#line 13112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2046: -#line 13113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2047: -#line 13114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2048: -#line 13119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 35247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2049: -#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); } -#line 35253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2050: -#line 13125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {(yyval.item)= (yyvsp[0].item);} -#line 35259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2051: -#line 13127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, (yyvsp[0].lex_str)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2052: -#line 13135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2053: -#line 13136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 35281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2056: -#line 13146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->update_list.push_back((yyvsp[-4].item), thd->mem_root) || @@ -35289,11 +35283,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; (yyvsp[-1].item)->set_name_no_truncate((yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset()); } -#line 35293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2057: -#line 13159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX_STRING tmp; CHARSET_INFO *cs_con= thd->variables.collation_connection; @@ -35317,11 +35311,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2058: -#line 13183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { uint repertoire= Lex->text_string_is_7bit ? MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30; @@ -35333,22 +35327,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2059: -#line 13195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_string_with_introducer(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, (yyvsp[-1].charset)); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2060: -#line 13202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_string* item= (Item_string*) (yyvsp[-1].item); item->append((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35364,11 +35358,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[0].lex_str).length); } } -#line 35368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2061: -#line 13221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string)= new (thd->mem_root) String((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, @@ -35376,17 +35370,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.string) == NULL) MYSQL_YYABORT; } -#line 35380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2062: -#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.string)= (yyvsp[0].string); } -#line 35386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2063: -#line 13234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35399,11 +35393,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp->quick_fix_field(); (yyval.string)= tmp->val_str((String*) 0); } -#line 35403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2064: -#line 13247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35412,11 +35406,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp->quick_fix_field(); (yyval.string)= tmp->val_str((String*) 0); } -#line 35416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2065: -#line 13256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); @@ -35429,11 +35423,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp->quick_fix_field(); (yyval.string)= tmp->val_str((String*) 0); } -#line 35433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2066: -#line 13272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -35447,50 +35441,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!((yyval.item_param)= item) || lex->param_list.push_back(item, thd->mem_root)) my_yyabort_error((ER_OUT_OF_RESOURCES, MYF(0))); } -#line 35451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2067: -#line 13288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item); } -#line 35457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2068: -#line 13289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item_num); } -#line 35463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2069: -#line 13291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyvsp[0].item_num)->max_length++; (yyval.item)= (yyvsp[0].item_num)->neg(thd); } -#line 35472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2070: -#line 13298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item); } -#line 35478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2071: -#line 13299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item) = (yyvsp[0].item_num); } -#line 35484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2072: -#line 13300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 35490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2073: -#line 13302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* For the digest computation, in this context only, @@ -35504,61 +35498,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT; } -#line 35508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2074: -#line 13316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_int(thd, (char*) "FALSE",0,1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2075: -#line 13322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_int(thd, (char*) "TRUE",1,1); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2076: -#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2077: -#line 13334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2078: -#line 13340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2079: -#line 13346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_string_with_introducer *item_str; /* @@ -35573,11 +35567,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.item)= item_str; } -#line 35577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2080: -#line 13364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.item_num)= new (thd->mem_root) @@ -35587,11 +35581,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item_num) == NULL) MYSQL_YYABORT; } -#line 35591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2081: -#line 13374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { int error; (yyval.item_num)= new (thd->mem_root) @@ -35601,21 +35595,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item_num) == NULL) MYSQL_YYABORT; } -#line 35605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2082: -#line 13384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_num)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if ((yyval.item_num) == NULL) MYSQL_YYABORT; } -#line 35615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2083: -#line 13390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_num)= new (thd->mem_root) Item_decimal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, thd->charset()); @@ -35624,11 +35618,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2084: -#line 13399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item_num)= new (thd->mem_root) Item_float(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if (((yyval.item_num) == NULL) || (thd->is_error())) @@ -35636,53 +35630,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2085: -#line 13411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL, MYSQL_TYPE_DATE, true))) MYSQL_YYABORT; } -#line 35650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2086: -#line 13417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL, MYSQL_TYPE_TIME, true))) MYSQL_YYABORT; } -#line 35660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2087: -#line 13423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL, MYSQL_TYPE_DATETIME, true))) MYSQL_YYABORT; } -#line 35670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2088: -#line 13438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 35676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2089: -#line 13439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 35682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2090: -#line 13444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; (yyval.item)= new (thd->mem_root) Item_field(thd, Lex->current_context(), @@ -35691,11 +35685,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; sel->with_wild++; } -#line 35695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2091: -#line 13453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel= Select; const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ? @@ -35707,17 +35701,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; sel->with_wild++; } -#line 35711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2092: -#line 13467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 35717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2093: -#line 13472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -35760,17 +35754,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2094: -#line 13514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 35770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2095: -#line 13519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { SELECT_LEX *sel=Select; if ((sel->parsing_place != IN_HAVING) || @@ -35787,17 +35781,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2096: -#line 13535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)= (yyvsp[0].item); } -#line 35797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2097: -#line 13540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; @@ -35869,11 +35863,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 35873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2098: -#line 13612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; SELECT_LEX *sel= lex->current_select; @@ -35897,11 +35891,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2099: -#line 13636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; SELECT_LEX *sel= lex->current_select; @@ -35928,17 +35922,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 35932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2100: -#line 13665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 35938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2101: -#line 13667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, (yyvsp[-4].lex_str).str, table->db)) @@ -35948,96 +35942,96 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].lex_str).str)); (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 35952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2102: -#line 13677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, (yyvsp[-2].lex_str).str, table->alias)) my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].lex_str).str)); (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 35963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2103: -#line 13683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 35969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2104: -#line 13688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident((yyvsp[0].lex_str)); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 35979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2105: -#line 13694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident(thd, (yyvsp[-2].lex_str), (yyvsp[0].lex_str), 0); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 35989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2106: -#line 13700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* For Delphi */ (yyval.table)= new (thd->mem_root) Table_ident((yyvsp[0].lex_str)); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 35994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2107: -#line 13710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident((yyvsp[-1].lex_str)); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2108: -#line 13716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.table)= new (thd->mem_root) Table_ident(thd, (yyvsp[-3].lex_str), (yyvsp[-1].lex_str), 0); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2109: -#line 13725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX_STRING db={(char*) any_db,3}; (yyval.table)= new (thd->mem_root) Table_ident(thd, db, (yyvsp[0].lex_str), 0); if ((yyval.table) == NULL) MYSQL_YYABORT; } -#line 36031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2110: -#line 13734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)= (yyvsp[0].lex_str); } -#line 36037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2111: -#line 13736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_system_charset) { @@ -36062,11 +36056,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2112: -#line 13764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_system_charset) (yyval.lex_str)= (yyvsp[0].lex_str); @@ -36077,11 +36071,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2113: -#line 13778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_collation_connection) (yyval.lex_str)= (yyvsp[0].lex_str); @@ -36092,11 +36086,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2114: -#line 13792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (thd->charset_is_character_set_filesystem) (yyval.lex_str)= (yyvsp[0].lex_str); @@ -36108,63 +36102,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 36112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2115: -#line 13806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 36118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2116: -#line 13808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str).str= thd->strmake((yyvsp[0].symbol).str, (yyvsp[0].symbol).length); if ((yyval.lex_str).str == NULL) MYSQL_YYABORT; (yyval.lex_str).length= (yyvsp[0].symbol).length; } -#line 36129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2117: -#line 13817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str); } -#line 36135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2118: -#line 13819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str).str= thd->strmake((yyvsp[0].symbol).str, (yyvsp[0].symbol).length); if ((yyval.lex_str).str == NULL) MYSQL_YYABORT; (yyval.lex_str).length= (yyvsp[0].symbol).length; } -#line 36146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2119: -#line 13828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 36152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2120: -#line 13829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 36158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2121: -#line 13830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_str)=(yyvsp[0].lex_str);} -#line 36164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2122: -#line 13835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -36177,11 +36171,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); system_charset_info, 0)) MYSQL_YYABORT; } -#line 36181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2123: -#line 13848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -36211,11 +36205,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.lex_user)->host= host_not_specified; } } -#line 36215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2124: -#line 13878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))) MYSQL_YYABORT; @@ -36223,2241 +36217,2241 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.lex_user)->plugin= empty_lex_str; (yyval.lex_user)->auth= empty_lex_str; } -#line 36227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2127: -#line 13890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if ((yyvsp[0].lex_user)->user.str != current_user.str && (yyvsp[0].lex_user)->host.str == 0) (yyvsp[0].lex_user)->host= host_not_specified; (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 36237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2128: -#line 13899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2129: -#line 13900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2130: -#line 13901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2131: -#line 13902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2132: -#line 13903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2133: -#line 13904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2134: -#line 13905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2135: -#line 13906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2136: -#line 13907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2137: -#line 13908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2138: -#line 13909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2139: -#line 13910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2140: -#line 13911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2141: -#line 13912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2142: -#line 13913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2143: -#line 13914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2144: -#line 13915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2145: -#line 13916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2146: -#line 13917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2147: -#line 13918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2148: -#line 13919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2149: -#line 13920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2150: -#line 13921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2151: -#line 13922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2152: -#line 13923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2153: -#line 13924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2154: -#line 13925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2155: -#line 13926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2156: -#line 13927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2157: -#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2158: -#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2159: -#line 13930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2160: -#line 13931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2161: -#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2162: -#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2163: -#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2164: -#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2165: -#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2166: -#line 13937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2167: -#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2168: -#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2169: -#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2170: -#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2171: -#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2172: -#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2173: -#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2174: -#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2175: -#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2176: -#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2177: -#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2178: -#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2179: -#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2180: -#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2181: -#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2182: -#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2183: -#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2184: -#line 13955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2185: -#line 13956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2186: -#line 13957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2187: -#line 13958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2188: -#line 13959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2189: -#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2190: -#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2191: -#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2192: -#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2193: -#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2194: -#line 13974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2195: -#line 13975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2196: -#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2197: -#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2198: -#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2199: -#line 13979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2200: -#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2201: -#line 13981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2202: -#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2203: -#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2204: -#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2205: -#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2206: -#line 13986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2207: -#line 13987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2208: -#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2209: -#line 13989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2210: -#line 13990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2211: -#line 13991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2212: -#line 13992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2213: -#line 13993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2214: -#line 13994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2215: -#line 13995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2216: -#line 13996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2217: -#line 13997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2218: -#line 13998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2219: -#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2220: -#line 14000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2221: -#line 14001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2222: -#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2223: -#line 14003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2224: -#line 14004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2225: -#line 14005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2226: -#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2227: -#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2228: -#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2229: -#line 14009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2230: -#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2231: -#line 14011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2232: -#line 14012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2233: -#line 14013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2234: -#line 14014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2235: -#line 14015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2236: -#line 14016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2237: -#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2238: -#line 14018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2239: -#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2240: -#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2241: -#line 14025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2242: -#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2243: -#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2244: -#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2245: -#line 14029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2246: -#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2247: -#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2248: -#line 14032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2249: -#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2250: -#line 14034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2251: -#line 14035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2252: -#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2253: -#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2254: -#line 14038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 36999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2255: -#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 36999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2256: -#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2257: -#line 14041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2258: -#line 14042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2259: -#line 14043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2260: -#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2261: -#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2262: -#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2263: -#line 14047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2264: -#line 14048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2265: -#line 14049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2266: -#line 14050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2267: -#line 14051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2268: -#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2269: -#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2270: -#line 14054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2271: -#line 14055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2272: -#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2273: -#line 14057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2274: -#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2275: -#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2276: -#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2277: -#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2278: -#line 14062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2279: -#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2280: -#line 14064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2281: -#line 14065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2282: -#line 14066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2283: -#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2284: -#line 14068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2285: -#line 14069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2286: -#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2287: -#line 14071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2288: -#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2289: -#line 14073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2290: -#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2291: -#line 14075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2292: -#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2293: -#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2294: -#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2295: -#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2296: -#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2297: -#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2298: -#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2299: -#line 14083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2300: -#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2301: -#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2302: -#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2303: -#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2304: -#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2305: -#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2306: -#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2307: -#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2308: -#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2309: -#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2310: -#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2311: -#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2312: -#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2313: -#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2314: -#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2315: -#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2316: -#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2317: -#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2318: -#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2319: -#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2320: -#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2321: -#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2322: -#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2323: -#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2324: -#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2325: -#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2326: -#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2327: -#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2328: -#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2329: -#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2330: -#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2331: -#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2332: -#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2333: -#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2334: -#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2335: -#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2336: -#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2337: -#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2338: -#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2339: -#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2340: -#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2341: -#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2342: -#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2343: -#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2344: -#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2345: -#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2346: -#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2347: -#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2348: -#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2349: -#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2350: -#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2351: -#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2352: -#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2353: -#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2354: -#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2355: -#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2356: -#line 14140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2357: -#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2358: -#line 14142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2359: -#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2360: -#line 14144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2361: -#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2362: -#line 14146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2363: -#line 14147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2364: -#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2365: -#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2366: -#line 14150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2367: -#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2368: -#line 14152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2369: -#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2370: -#line 14154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2371: -#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2372: -#line 14156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2373: -#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2374: -#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2375: -#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2376: -#line 14160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2377: -#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2378: -#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2379: -#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2380: -#line 14164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2381: -#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2382: -#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2383: -#line 14167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2384: -#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2385: -#line 14169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2386: -#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2387: -#line 14171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2388: -#line 14172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2389: -#line 14173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2390: -#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2391: -#line 14175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2392: -#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2393: -#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2394: -#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2395: -#line 14179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2396: -#line 14180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2397: -#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2398: -#line 14182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2399: -#line 14183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2400: -#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2401: -#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2402: -#line 14186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2403: -#line 14187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2404: -#line 14188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2405: -#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2406: -#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2407: -#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2408: -#line 14192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2409: -#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2410: -#line 14194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2411: -#line 14195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2412: -#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2413: -#line 14197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2414: -#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2415: -#line 14199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2416: -#line 14200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2417: -#line 14201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2418: -#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2419: -#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2420: -#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 37995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2421: -#line 14205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 37995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2422: -#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2423: -#line 14207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2424: -#line 14208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2425: -#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2426: -#line 14210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2427: -#line 14211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2428: -#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2429: -#line 14213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2430: -#line 14214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2431: -#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2432: -#line 14216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2433: -#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2434: -#line 14218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2435: -#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2436: -#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2437: -#line 14221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2438: -#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2439: -#line 14223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2440: -#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2441: -#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2442: -#line 14226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2443: -#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2444: -#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2445: -#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2446: -#line 14230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2447: -#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2448: -#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2449: -#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2450: -#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2451: -#line 14235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2452: -#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2453: -#line 14237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2454: -#line 14238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2455: -#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2456: -#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2457: -#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2458: -#line 14242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2459: -#line 14243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2460: -#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2461: -#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2462: -#line 14246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2463: -#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2464: -#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2465: -#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2466: -#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2467: -#line 14251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2468: -#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2469: -#line 14253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2470: -#line 14254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2471: -#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2472: -#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2473: -#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2474: -#line 14258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2475: -#line 14259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2476: -#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2477: -#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2478: -#line 14262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2479: -#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2480: -#line 14264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2481: -#line 14265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2482: -#line 14266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2483: -#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2484: -#line 14268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2485: -#line 14269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2486: -#line 14270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2487: -#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2488: -#line 14272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2489: -#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2490: -#line 14274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2491: -#line 14275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2492: -#line 14276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2493: -#line 14277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2494: -#line 14278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2495: -#line 14279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2496: -#line 14280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2497: -#line 14281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2498: -#line 14293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SET_OPTION; @@ -38467,17 +38461,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->autocommit= 0; sp_create_assignment_lex(thd, yychar == YYEMPTY); } -#line 38471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2499: -#line 14303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2500: -#line 14305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; mysql_init_select(lex); @@ -38485,11 +38479,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_SET_OPTION; lex->autocommit= 0; } -#line 38489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2501: -#line 14313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->table_or_sp_used()) @@ -38497,177 +38491,177 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->stmt_var_list= lex->var_list; lex->var_list.empty(); } -#line 38501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2502: -#line 14321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 38507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2505: -#line 14336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38510 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2507: -#line 14342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_type= OPT_DEFAULT; } -#line 38524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2508: -#line 14346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2509: -#line 14351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_type= (yyvsp[0].var_type); } -#line 38541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2511: -#line 14361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2513: -#line 14367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2516: -#line 14381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_create_assignment_lex(thd, yychar == YYEMPTY); } -#line 38567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2517: -#line 14385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2518: -#line 14390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_create_assignment_lex(thd, yychar == YYEMPTY); } -#line 38584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2519: -#line 14394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (sp_create_assignment_instr(thd, yychar == YYEMPTY)) MYSQL_YYABORT; } -#line 38593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2520: -#line 14403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->option_type= (yyvsp[0].var_type); } -#line 38601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2523: -#line 14411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_GLOBAL; } -#line 38607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2524: -#line 14412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2525: -#line 14413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2526: -#line 14417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2527: -#line 14418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_GLOBAL; } -#line 38631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2528: -#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2529: -#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2530: -#line 14424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_DEFAULT; } -#line 38649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2531: -#line 14425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_GLOBAL; } -#line 38655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2532: -#line 14426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2533: -#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.var_type)=OPT_SESSION; } -#line 38667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2534: -#line 14433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -38687,11 +38681,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 38691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2535: -#line 14457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -38717,11 +38711,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 38721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2536: -#line 14483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Item_func_set_user_var *item; item= new (thd->mem_root) Item_func_set_user_var(thd, (yyvsp[-2].lex_str), (yyvsp[0].item)); @@ -38732,11 +38726,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->var_list.push_back(var, thd->mem_root); } -#line 38736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38730 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2537: -#line 14494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { struct sys_var_with_base tmp= (yyvsp[-2].variable); /* Lookup if necessary: must be a system variable. */ @@ -38748,11 +38742,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (set_system_variable(thd, &tmp, (yyvsp[-3].var_type), (yyvsp[0].item))) MYSQL_YYABORT; } -#line 38752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2538: -#line 14506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; CHARSET_INFO *cs2; @@ -38766,11 +38760,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2539: -#line 14520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; sp_pcontext *spc= lex->spcont; @@ -38785,11 +38779,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } -#line 38789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2540: -#line 14535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; CHARSET_INFO *cs2; @@ -38808,11 +38802,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2541: -#line 14554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; LEX_USER *user; @@ -38829,11 +38823,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->sphead) lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; } -#line 38833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2542: -#line 14571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; set_var_default_role *var= (new (thd->mem_root) @@ -38845,11 +38839,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->sphead) lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; } -#line 38849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2543: -#line 14583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_str)); @@ -38857,11 +38851,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2544: -#line 14591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex = Lex; set_var_password *var= (new (thd->mem_root) @@ -38873,11 +38867,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->sphead) lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; } -#line 38877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2545: -#line 14607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sp_pcontext *spc= thd->lex->spcont; sp_variable *spv; @@ -38903,11 +38897,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.variable).base_name= (yyvsp[0].lex_str); } } -#line 38907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2546: -#line 14633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (check_reserved_words(&(yyvsp[-2].lex_str))) @@ -38944,11 +38938,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.variable).base_name= (yyvsp[-2].lex_str); } } -#line 38948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2547: -#line 14670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { sys_var *tmp=find_sys_var(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length); if (!tmp) @@ -38959,11 +38953,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.variable).base_name.str= (char*) "default"; (yyval.variable).base_name.length= 7; } -#line 38963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2552: -#line 14691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num)); @@ -38978,11 +38972,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 38982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2553: -#line 14709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation)); @@ -38997,47 +38991,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->var_list.push_back(var, thd->mem_root); } -#line 39001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 38995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2554: -#line 14726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= true; } -#line 39007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2555: -#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= false; } -#line 39013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2556: -#line 14731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; } -#line 39019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2557: -#line 14732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_READ_COMMITTED; } -#line 39025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2558: -#line 14733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_REPEATABLE_READ; } -#line 39031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2559: -#line 14734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.tx_isolation)= ISO_SERIALIZABLE; } -#line 39037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2560: -#line 14739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; sp_pcontext *spc= lex->spcont; @@ -39051,82 +39045,82 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->definer->plugin= empty_lex_str; lex->definer->auth= empty_lex_str; } -#line 39055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2561: -#line 14752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer= (yyvsp[-1].lex_user); } -#line 39061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2562: -#line 14756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer->pwhash= (yyvsp[0].lex_str);} -#line 39067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2563: -#line 14757 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer->pwtext= (yyvsp[-1].lex_str); } -#line 39073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2564: -#line 14759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer->pwtext= (yyvsp[-1].lex_str); Lex->definer->pwhash.str= Item_func_password::alloc(thd, (yyvsp[-1].lex_str).str, (yyvsp[-1].lex_str).length, Item_func_password::OLD); Lex->definer->pwhash.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323; } -#line 39084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2565: -#line 14768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=(yyvsp[0].item); } -#line 39090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2566: -#line 14769 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=0; } -#line 39096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2567: -#line 14771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON", 2); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 39106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2568: -#line 14777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 39116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2569: -#line 14783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6); if ((yyval.item) == NULL) MYSQL_YYABORT; } -#line 39126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2570: -#line 14794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -39134,29 +39128,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK")); lex->sql_command= SQLCOM_LOCK_TABLES; } -#line 39138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2571: -#line 14802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2572: -#line 14806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 39150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2573: -#line 14807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { } -#line 39156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2576: -#line 14817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num); bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE); @@ -39168,43 +39162,43 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MDL_SHARED_READ))) MYSQL_YYABORT; } -#line 39172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2577: -#line 14831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_READ_NO_INSERT; } -#line 39178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2578: -#line 14832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_WRITE_DEFAULT; } -#line 39184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2579: -#line 14834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } -#line 39192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2580: -#line 14838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_WRITE_LOW_PRIORITY; } -#line 39198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2581: -#line 14839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= TL_READ; } -#line 39204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2582: -#line 14844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; @@ -39212,17 +39206,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK")); lex->sql_command= SQLCOM_UNLOCK_TABLES; } -#line 39216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2583: -#line 14852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2584: -#line 14861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->sphead) @@ -39231,11 +39225,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!lex->current_select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0)) MYSQL_YYABORT; } -#line 39235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2585: -#line 14870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->sphead) @@ -39244,11 +39238,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0)) MYSQL_YYABORT; } -#line 39248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2586: -#line 14879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->sphead) @@ -39265,11 +39259,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0)) MYSQL_YYABORT; } -#line 39269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2587: -#line 14896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->expr_allows_subselect= TRUE; /* Stored functions are not supported for HANDLER READ. */ @@ -39280,59 +39274,59 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; } } -#line 39284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2588: -#line 14909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ident= null_lex_str; } -#line 39290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2589: -#line 14910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ident= (yyvsp[-1].lex_str); } -#line 39296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2590: -#line 14914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RFIRST; } -#line 39302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2591: -#line 14915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RNEXT; } -#line 39308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2592: -#line 14919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RFIRST; } -#line 39314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2593: -#line 14920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RNEXT; } -#line 39320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2594: -#line 14921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RPREV; } -#line 39326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2595: -#line 14922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ha_read_mode = RLAST; } -#line 39332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2596: -#line 14924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->ha_read_mode = RKEY; @@ -39340,63 +39334,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (!(lex->insert_list= new (thd->mem_root) List_item)) MYSQL_YYABORT; } -#line 39344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2597: -#line 14932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2598: -#line 14936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; } -#line 39356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2599: -#line 14937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; } -#line 39362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2600: -#line 14938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; } -#line 39368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2601: -#line 14939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; } -#line 39374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2602: -#line 14940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; } -#line 39380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2603: -#line 14947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2604: -#line 14952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_REVOKE; lex->type= 0; } -#line 39396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2605: -#line 14958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39407,11 +39401,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_REVOKE; lex->type= TYPE_ENUM_FUNCTION; } -#line 39411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2606: -#line 14969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39422,68 +39416,68 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_REVOKE; lex->type= TYPE_ENUM_PROCEDURE; } -#line 39426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2607: -#line 14980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_REVOKE_ALL; } -#line 39434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2608: -#line 14984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->users_list.push_front ((yyvsp[-2].lex_user)); lex->sql_command= SQLCOM_REVOKE; lex->type= TYPE_ENUM_PROXY; } -#line 39445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2609: -#line 14991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_REVOKE_ROLE; if (Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2610: -#line 15000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 39461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2611: -#line 15002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 14996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 39467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2612: -#line 15007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2613: -#line 15013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_GRANT; lex->type= 0; } -#line 39483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2614: -#line 15020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39494,11 +39488,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_GRANT; lex->type= TYPE_ENUM_FUNCTION; } -#line 39498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2615: -#line 15032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; if (lex->columns.elements) @@ -39509,22 +39503,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_GRANT; lex->type= TYPE_ENUM_PROCEDURE; } -#line 39513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2616: -#line 15043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->users_list.push_front ((yyvsp[-3].lex_user)); lex->sql_command= SQLCOM_GRANT; lex->type= TYPE_ENUM_PROXY; } -#line 39524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2617: -#line 15050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_GRANT_ROLE; @@ -39532,64 +39526,64 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2618: -#line 15061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer = 0; } -#line 39542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2619: -#line 15062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer = (yyvsp[0].lex_user); } -#line 39548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2620: -#line 15065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= false; } -#line 39554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2621: -#line 15066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->with_admin_option= true; } -#line 39560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2622: -#line 15070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2623: -#line 15075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2624: -#line 15083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))) MYSQL_YYABORT; (yyval.lex_user)->user= current_role; (yyval.lex_user)->reset_auth(); } -#line 39589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2625: -#line 15093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { CHARSET_INFO *cs= system_charset_info; /* trim end spaces (as they'll be lost in mysql.user anyway) */ @@ -39608,275 +39602,275 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); cs, 0)) MYSQL_YYABORT; } -#line 39612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2629: -#line 15120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2630: -#line 15122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->all_privileges= 1; Lex->grant= GLOBAL_ACLS; } -#line 39627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2635: -#line 15140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = SELECT_ACL;} -#line 39633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2636: -#line 15141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2637: -#line 15143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = INSERT_ACL;} -#line 39645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2638: -#line 15144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2639: -#line 15146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = UPDATE_ACL; } -#line 39657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2640: -#line 15147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2641: -#line 15149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->which_columns = REFERENCES_ACL;} -#line 39669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2642: -#line 15150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2643: -#line 15151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= DELETE_ACL;} -#line 39681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2644: -#line 15152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2645: -#line 15153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= INDEX_ACL;} -#line 39693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2646: -#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= ALTER_ACL;} -#line 39699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2647: -#line 15155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_ACL;} -#line 39705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2648: -#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= DROP_ACL;} -#line 39711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2649: -#line 15157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= EXECUTE_ACL;} -#line 39717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2650: -#line 15158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= RELOAD_ACL;} -#line 39723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2651: -#line 15159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SHUTDOWN_ACL;} -#line 39729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2652: -#line 15160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= PROCESS_ACL;} -#line 39735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2653: -#line 15161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= FILE_ACL;} -#line 39741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2654: -#line 15162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= GRANT_ACL;} -#line 39747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2655: -#line 15163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SHOW_DB_ACL;} -#line 39753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2656: -#line 15164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SUPER_ACL;} -#line 39759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2657: -#line 15165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_TMP_ACL;} -#line 39765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2658: -#line 15166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= LOCK_TABLES_ACL; } -#line 39771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2659: -#line 15167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= REPL_SLAVE_ACL; } -#line 39777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2660: -#line 15168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= REPL_CLIENT_ACL; } -#line 39783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2661: -#line 15169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_VIEW_ACL; } -#line 39789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2662: -#line 15170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= SHOW_VIEW_ACL; } -#line 39795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2663: -#line 15171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_PROC_ACL; } -#line 39801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2664: -#line 15172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= ALTER_PROC_ACL; } -#line 39807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2665: -#line 15173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_USER_ACL; } -#line 39813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2666: -#line 15174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= EVENT_ACL;} -#line 39819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2667: -#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= TRIGGER_ACL; } -#line 39825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2668: -#line 15176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= CREATE_TABLESPACE_ACL; } -#line 39831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2669: -#line 15180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2670: -#line 15181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 39843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2673: -#line 15191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->x509_subject) my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT")); lex->x509_subject=(yyvsp[0].lex_str).str; } -#line 39854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2674: -#line 15198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->x509_issuer) my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER")); lex->x509_issuer=(yyvsp[0].lex_str).str; } -#line 39865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2675: -#line 15205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (lex->ssl_cipher) my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER")); lex->ssl_cipher=(yyvsp[0].lex_str).str; } -#line 39876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2676: -#line 15215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; size_t dummy; @@ -39887,11 +39881,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (lex->columns.elements) my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0))); } -#line 39891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2677: -#line 15226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->current_select->db = (yyvsp[-2].lex_str).str; @@ -39900,11 +39894,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (lex->columns.elements) my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0))); } -#line 39904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2678: -#line 15235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->current_select->db = NULL; @@ -39913,11 +39907,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else if (lex->columns.elements) my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0))); } -#line 39917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2679: -#line 15244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->current_select->add_table_to_list(thd, (yyvsp[0].table),NULL, @@ -39926,120 +39920,120 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (lex->grant == GLOBAL_ACLS) lex->grant = TABLE_ACLS & ~GRANT_ACL; } -#line 39930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2680: -#line 15256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2681: -#line 15261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2682: -#line 15269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2683: -#line 15274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2684: -#line 15282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2685: -#line 15287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)) MYSQL_YYABORT; } -#line 39984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2690: -#line 15298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-3].lex_user); (yyvsp[-3].lex_user)->pwtext= (yyvsp[0].lex_str); if (Lex->sql_command == SQLCOM_REVOKE) MYSQL_YYABORT; } -#line 39995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2691: -#line 15305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-4].lex_user); (yyvsp[-4].lex_user)->pwhash= (yyvsp[0].lex_str); } -#line 40004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 39998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2692: -#line 15310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-3].lex_user); (yyvsp[-3].lex_user)->plugin= (yyvsp[0].lex_str); (yyvsp[-3].lex_user)->auth= empty_lex_str; } -#line 40014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2693: -#line 15316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[-5].lex_user); (yyvsp[-5].lex_user)->plugin= (yyvsp[-2].lex_str); (yyvsp[-5].lex_user)->auth= (yyvsp[0].lex_str); } -#line 40024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2694: -#line 15322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.lex_user)= (yyvsp[0].lex_user); } -#line 40030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2695: -#line 15327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->grant |= lex->which_columns; } -#line 40039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2699: -#line 15341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { String *new_str= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,(yyvsp[0].lex_str).length,system_charset_info); if (new_str == NULL) @@ -40065,227 +40059,227 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->columns.push_back(col, thd->mem_root); } } -#line 40069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2701: -#line 15371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_SPECIFIED; } -#line 40077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2702: -#line 15375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_ANY; } -#line 40085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2703: -#line 15379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_X509; } -#line 40093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2704: -#line 15383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->ssl_type=SSL_TYPE_NONE; } -#line 40101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2705: -#line 15389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2707: -#line 15394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2708: -#line 15395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= GRANT_ACL;} -#line 40119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2709: -#line 15399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2710: -#line 15400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2711: -#line 15404 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->grant |= GRANT_ACL;} -#line 40137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2712: -#line 15406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.questions=(yyvsp[0].ulong_num); lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR; } -#line 40147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2713: -#line 15412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.updates=(yyvsp[0].ulong_num); lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR; } -#line 40157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2714: -#line 15418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.conn_per_hour= (yyvsp[0].ulong_num); lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR; } -#line 40167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2715: -#line 15424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.user_conn= (yyvsp[0].num); lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS; } -#line 40177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2716: -#line 15430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->mqh.max_statement_time= (yyvsp[0].item_num)->val_real(); lex->mqh.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME; } -#line 40187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2717: -#line 15439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command = SQLCOM_BEGIN; lex->start_transaction_opt= 0; } -#line 40197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2718: -#line 15444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2719: -#line 15449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command= SQLCOM_COMPOUND; Lex->sphead->set_stmt_end(thd); Lex->sphead->restore_thd_mem_root(thd); } -#line 40213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2720: -#line 15457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 40219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2721: -#line 15458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 40225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2722: -#line 15462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2723: -#line 15463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2724: -#line 15468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; } -#line 40243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2725: -#line 15469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_NO; } -#line 40249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2726: -#line 15470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_YES; } -#line 40255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2727: -#line 15475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; } -#line 40261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2728: -#line 15476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_YES; } -#line 40267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2729: -#line 15477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.m_yes_no_unk)= TVL_NO; } -#line 40273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2730: -#line 15481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2731: -#line 15482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2732: -#line 15487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_COMMIT; @@ -40294,11 +40288,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->tx_chain= (yyvsp[-1].m_yes_no_unk); lex->tx_release= (yyvsp[0].m_yes_no_unk); } -#line 40298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2733: -#line 15499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ROLLBACK; @@ -40307,56 +40301,56 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->tx_chain= (yyvsp[-1].m_yes_no_unk); lex->tx_release= (yyvsp[0].m_yes_no_unk); } -#line 40311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2734: -#line 15509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT; lex->ident= (yyvsp[0].lex_str); } -#line 40321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2735: -#line 15518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_SAVEPOINT; lex->ident= (yyvsp[0].lex_str); } -#line 40331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2736: -#line 15527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; lex->sql_command= SQLCOM_RELEASE_SAVEPOINT; lex->ident= (yyvsp[0].lex_str); } -#line 40341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2737: -#line 15540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2739: -#line 15546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), TRUE)) MYSQL_YYABORT; } -#line 40356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2740: -#line 15551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* Remove from the name resolution context stack the context of the @@ -40364,29 +40358,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ Lex->pop_context(); } -#line 40368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2742: -#line 15562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 40374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2743: -#line 15566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 0; } -#line 40380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2744: -#line 15567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)= 1; } -#line 40386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2745: -#line 15571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); @@ -40400,80 +40394,80 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } thd->where= "global ORDER clause"; } -#line 40404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2746: -#line 15585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->current_select->no_table_names_allowed= 0; thd->where= ""; } -#line 40413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2749: -#line 15597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=1; } -#line 40419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2750: -#line 15598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=1; } -#line 40425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2751: -#line 15599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.num)=0; } -#line 40431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2752: -#line 15605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= Lex->current_select->master_unit()->first_select(); } -#line 40439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2753: -#line 15610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= Lex->current_select->master_unit()->first_select(); } -#line 40447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2755: -#line 15619 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), FALSE)) MYSQL_YYABORT; } -#line 40456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2756: -#line 15624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->pop_context(); (yyval.select_lex)= (yyvsp[-4].select_lex); } -#line 40465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2757: -#line 15633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { (yyval.select_lex)= (yyvsp[-1].select_lex); } -#line 40473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2758: -#line 15639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; if (!lex->expr_allows_subselect || @@ -40492,11 +40486,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (mysql_new_select(Lex, 1)) MYSQL_YYABORT; } -#line 40496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2759: -#line 15660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex=Lex; @@ -40519,17 +40513,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->current_select->select_n_having_items+= child->select_n_having_items; } -#line 40523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2764: -#line 15695 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_STRAIGHT_JOIN; } -#line 40529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2765: -#line 15697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_simple_select()) MYSQL_YYABORT; @@ -40537,73 +40531,73 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYPS->m_mdl_type= MDL_SHARED_READ; Select->options|= SELECT_HIGH_PRIORITY; } -#line 40541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2766: -#line 15704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_DISTINCT; } -#line 40547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2767: -#line 15705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_SMALL_RESULT; } -#line 40553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2768: -#line 15706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_BIG_RESULT; } -#line 40559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2769: -#line 15708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_simple_select()) MYSQL_YYABORT; Select->options|= OPTION_BUFFER_RESULT; } -#line 40569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2770: -#line 15714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (check_simple_select()) MYSQL_YYABORT; Select->options|= OPTION_FOUND_ROWS; } -#line 40579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2771: -#line 15719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Select->options|= SELECT_ALL; } -#line 40585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2772: -#line 15730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2773: -#line 15732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2774: -#line 15734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2788: -#line 15767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* We have to distinguish missing DEFINER-clause from case when @@ -40614,58 +40608,58 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); */ thd->lex->definer= 0; } -#line 40618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2789: -#line 15781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->definer= (yyvsp[0].lex_user); Lex->ssl_type= SSL_TYPE_NOT_SPECIFIED; Lex->ssl_cipher= Lex->x509_subject= Lex->x509_issuer= 0; bzero(&(Lex->mqh), sizeof(Lex->mqh)); } -#line 40629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2790: -#line 15797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; } -#line 40635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2791: -#line 15799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; } -#line 40641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2792: -#line 15801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; } -#line 40647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2793: -#line 15806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_suid= VIEW_SUID_DEFAULT; } -#line 40653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2794: -#line 15808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_suid= VIEW_SUID_DEFINER; } -#line 40659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2795: -#line 15810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_suid= VIEW_SUID_INVOKER; } -#line 40665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2796: -#line 15815 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; if (lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))) @@ -40679,37 +40673,37 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB; } -#line 40683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2798: -#line 15833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 40689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2800: -#line 15839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->view_list.push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 40699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2801: -#line 15845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->view_list.push_back((LEX_STRING*) thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)), thd->mem_root); } -#line 40709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2802: -#line 15853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->parsing_options.allows_variable= FALSE; @@ -40718,11 +40712,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->parsing_options.allows_derived= FALSE; lex->create_view_select.str= (char *) YYLIP->get_cpp_ptr(); } -#line 40722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2803: -#line 15862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str; @@ -40735,60 +40729,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->parsing_options.allows_select_procedure= TRUE; lex->parsing_options.allows_derived= TRUE; } -#line 40739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2806: -#line 15883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_NONE; } -#line 40745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2807: -#line 15885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_CASCADED; } -#line 40751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2808: -#line 15887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_CASCADED; } -#line 40757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2809: -#line 15889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->create_view_check= VIEW_CHECK_LOCAL; } -#line 40763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2810: -#line 15902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))) MYSQL_YYABORT; } -#line 40772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2811: -#line 15911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $10 */ Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start(); } -#line 40780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2812: -#line 15917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $14 */ Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start(); } -#line 40788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2813: -#line 15922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $17 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -40806,11 +40800,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sphead->set_body_start(thd, lip->get_cpp_ptr()); } -#line 40810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2814: -#line 15940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $19 */ LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -40834,23 +40828,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MDL_SHARED_NO_WRITE)) MYSQL_YYABORT; } -#line 40838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2815: -#line 15972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->udf.type= UDFTYPE_AGGREGATE; } -#line 40844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2816: -#line 15973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { thd->lex->udf.type= UDFTYPE_FUNCTION; } -#line 40850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2817: -#line 15979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; if (lex->add_create_options_with_check((yyvsp[-5].object_ddl_options))) @@ -40862,11 +40856,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->udf.returns= (Item_result) (yyvsp[-2].num); lex->udf.dl= (yyvsp[0].lex_str).str; } -#line 40866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2818: -#line 15997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 15991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $5 */ LEX *lex= Lex; Lex_input_stream *lip= YYLIP; @@ -40886,50 +40880,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp_param_begin++; lex->sphead->m_param_begin= tmp_param_begin; } -#line 40890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2819: -#line 16018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $8 */ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); } -#line 40898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2820: -#line 16022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $10 */ LEX *lex= Lex; lex->init_last_field(&lex->sphead->m_return_field_def, NULL, thd->variables.collation_database); } -#line 40908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2821: -#line 16028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $12 */ if (Lex->sphead->fill_field_definition(thd, Lex, (yyvsp[0].field_type), Lex->last_field)) MYSQL_YYABORT; } -#line 40918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2822: -#line 16034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { /* $14 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; lex->sphead->set_body_start(thd, lip->get_cpp_tok_start()); } -#line 40929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2823: -#line 16041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= thd->lex; sp_head *sp= lex->sphead; @@ -40978,11 +40972,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } sp->restore_thd_mem_root(thd); } -#line 40982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2824: -#line 16093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { if (Lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))) MYSQL_YYABORT; @@ -40994,11 +40988,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); MYSQL_YYABORT; Lex->spname= (yyvsp[0].spname); } -#line 40998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 40992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2825: -#line 16105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { const char* tmp_param_begin; @@ -41006,27 +41000,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); tmp_param_begin++; Lex->sphead->m_param_begin= tmp_param_begin; } -#line 41010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2826: -#line 16114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); } -#line 41018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2827: -#line 16118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start()); } -#line 41026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2828: -#line 16122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -41035,209 +41029,209 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); lex->sql_command= SQLCOM_CREATE_PROCEDURE; sp->restore_thd_mem_root(thd); } -#line 41039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2829: -#line 16136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_START; } -#line 41047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2830: -#line 16140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_END; } -#line 41055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2831: -#line 16144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_PREPARE; } -#line 41063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2832: -#line 16148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_COMMIT; } -#line 41071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2833: -#line 16152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_ROLLBACK; } -#line 41079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2834: -#line 16156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->sql_command = SQLCOM_XA_RECOVER; } -#line 41087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2835: -#line 16163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) MYSQL_YYABORT; Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0); } -#line 41098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2836: -#line 16170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) MYSQL_YYABORT; Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length()); } -#line 41109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2837: -#line 16177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE && (yyvsp[-2].string)->length() <= MAXBQUALSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) MYSQL_YYABORT; Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length()); } -#line 41120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2838: -#line 16186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 41126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2839: -#line 16187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 41132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2840: -#line 16191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_NONE; } -#line 41138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2841: -#line 16192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_JOIN; } -#line 41144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2842: -#line 16193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_RESUME; } -#line 41150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2843: -#line 16197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_NONE; } -#line 41156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2844: -#line 16198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_ONE_PHASE; } -#line 41162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2845: -#line 16203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_NONE; } -#line 41168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2846: -#line 16205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_SUSPEND; } -#line 41174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2848: -#line 16210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ {} -#line 41180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2849: -#line 16211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { Lex->xa_opt=XA_FOR_MIGRATE; } -#line 41186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2850: -#line 16216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_INSTALL_PLUGIN; lex->comment= (yyvsp[-2].lex_str); lex->ident= (yyvsp[0].lex_str); } -#line 41197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2851: -#line 16223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_INSTALL_PLUGIN; lex->comment= null_lex_str; lex->ident= (yyvsp[0].lex_str); } -#line 41208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2852: -#line 16233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_UNINSTALL_PLUGIN; lex->comment= (yyvsp[0].lex_str); } -#line 41218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2853: -#line 16239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { LEX *lex= Lex; lex->sql_command= SQLCOM_UNINSTALL_PLUGIN; lex->comment= null_lex_str; lex->ident= (yyvsp[0].lex_str); } -#line 41229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; case 2854: -#line 16250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ +#line 16244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */ { YYERROR; } -#line 41237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ break; -#line 41241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ +#line 41235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b4c0c4d45c33096db6d3a45f6906f6a841088447..3fda8832f6b30665c0531a30158e73d9a8ec3e28 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4678,17 +4678,11 @@ size_number: switch (end_ptr[0]) { case 'g': - case 'G': - text_shift_number+=10; - /* fall through */ + case 'G': text_shift_number+=30; break; case 'm': - case 'M': - text_shift_number+=10; - /* fall through */ + case 'M': text_shift_number+=20; break; case 'k': - case 'K': - text_shift_number+=10; - break; + case 'K': text_shift_number+=10; break; default: my_yyabort_error((ER_WRONG_SIZE_NUMBER, MYF(0))); } diff --git a/sql/table.cc b/sql/table.cc index 94b3bc9d526204ee0f0a05af0776a85de0d434fe..53d88bc02aa1429f4cb1b42f9b78abaec3d18c84 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -5348,7 +5348,8 @@ Item *Field_iterator_table::create_item(THD *thd) Item_field *item= new (thd->mem_root) Item_field(thd, &select->context, *ptr); if (item && thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY && - !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS) + !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS && + select->join) { select->join->non_agg_fields.push_back(item); item->marker= select->cur_pos_in_select_list; diff --git a/sql/table.h b/sql/table.h index 876f496a31268396d38d6060dc02cb8cd9b9f43b..7d9b5292a064c5310229f95ead2d6b32f15634df 100644 --- a/sql/table.h +++ b/sql/table.h @@ -35,6 +35,7 @@ /* Structs that defines the TABLE */ class Item; /* Needed by ORDER */ +typedef Item (*Item_ptr); class Item_subselect; class Item_field; class GRANT_TABLE; @@ -2528,7 +2529,7 @@ typedef struct st_nested_join table_map sj_depends_on; /* Outer non-trivially correlated tables */ table_map sj_corr_tables; - List sj_outer_expr_list; + List sj_outer_expr_list; /** True if this join nest node is completely covered by the query execution plan. This means two things. diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 2733a91a3c9e7bb3cc6bf6ff4e9d09302e5e4a6b..75c1526cb155d9d213f03e71278dabd717fa2b2b 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -505,6 +505,9 @@ wsrep_run_wsrep_commit(THD *thd, bool all) } mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + DEBUG_SYNC(thd, "wsrep_after_replication"); + switch(rcode) { case 0: /* diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 1d117766db465f25612b1029eba924bf2f2b09d5..b21041eb0f81e1fb62ea0b4a7bfbb72d45d485ea 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -301,8 +301,9 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type) if (wsrep_inited == 1) wsrep_deinit(false); - char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider + char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider //when fails + if (wsrep_init()) { my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp); diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 1f687c3c8d886ee18adc7cb13c831371b21f599b..69b2ef783168f6578d0db1659cea1f817f4252a8 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -38,41 +38,24 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h) # Definitions that are shared for all OSes # add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS) -add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY ) +add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT ) # # OS specific C flags, definitions and source files. # IF(UNIX) - if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - # Bar: -Wfatal-errors removed (does not present in gcc on solaris10) - if(WITH_WARNINGS) - add_definitions(-Wall -Wextra -Wmissing-declarations) - #message(STATUS "CONNECT: GCC: All warnings enabled") - else() - add_definitions(-Wall -Wmissing-declarations) - add_definitions(-Wno-write-strings) - add_definitions(-Wno-unused-variable) - # Bar: -Wno-unused-but-set-variables commented (does not present on sol10) - # add_definitions(-Wno-unused-but-set-variable) - add_definitions(-Wno-unused-value) - add_definitions(-Wno-unused-function) - add_definitions(-Wno-parentheses) - #add_definitions(-Wno-missing-declarations) - # Bar: -Wno-int-to-pointer-cast commended (does not present in gcc on sol10) - # add_definitions(-Wno-int-to-pointer-cast) - # Bar: -Wno-narrowing commented (does not present in gcc on solaris10) - # add_definitions(-Wno-narrowing) - -# This switch is for pure C only: -# add_definitions(-Wno-implicit-function-declaration) -# These switches are for C++ only -# add_definitions(-Wno-reorder) - - #message(STATUS "CONNECT: GCC: Some warnings disabled") - endif(WITH_WARNINGS) - endif() + MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations") + if(NOT WITH_WARNINGS) + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") + endif(NOT WITH_WARNINGS) add_definitions( -DUNIX -DLINUX -DUBUNTU ) @@ -247,7 +230,7 @@ ENDIF(CONNECT_WITH_ODBC) # # JDBC with MongoDB Java Driver included but disabled # -#OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) +# OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON) IF(CONNECT_WITH_JDBC) @@ -260,17 +243,16 @@ IF(CONNECT_WITH_JDBC) # SET(JDBC_LIBRARY ${JAVA_JVM_LIBRARY}) will be dynamically linked SET(CONNECT_SOURCES ${CONNECT_SOURCES} javaconn.cpp jdbconn.cpp tabjdbc.cpp + jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp jdbccat.h javaconn.h jdbconn.h tabjdbc.h + jmgfam.h jmgoconn.h mongo.h tabjmg.h JdbcInterface.java ApacheInterface.java MariadbInterface.java MysqlInterface.java OracleInterface.java PostgresqlInterface.java + Mongo2Interface.java Mongo3Interface.java JavaWrappers.jar) - add_definitions(-DJDBC_SUPPORT) + add_definitions(-DJAVA_SUPPORT) IF(CONNECT_WITH_MONGO) - SET(CONNECT_SOURCES ${CONNECT_SOURCES} - jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp - jmgfam.h jmgoconn.h mongo.h tabjmg.h - Mongo2Interface.java Mongo3Interface.java) - add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=0) + add_definitions(-DMONGO_SUPPORT) ENDIF() ELSE() SET(JDBC_LIBRARY "") @@ -313,10 +295,7 @@ IF(CONNECT_WITH_MONGO) add_definitions(-DCMGO_SUPPORT) IF (NOT JAVA_FOUND AND JNI_FOUND) SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h) - add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=1) - ELSE () - remove_definitions(-DMONGO_ENABLED=0) - add_definitions(-DMONGO_ENABLED=1) + add_definitions(-DMONGO_SUPPORT) ENDIF (NOT JAVA_FOUND AND JNI_FOUND) ENDIF(libmongoc-1.0_FOUND) ENDIF(CONNECT_WITH_MONGO) diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index 59a53487a7eeea7831207afa312f16d41e8f6270..639edf63a1a9fa81872d85d436f4e671b5d731b6 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -520,7 +520,7 @@ bool ARRAY::FilTest(PGLOBAL g, PVAL valp, OPVAL opc, int opm) } else if (opc != OP_EXIST) { sprintf(g->Message, MSG(MISSING_ARG), opc); - throw (int)TYPE_ARRAY; + throw (int)TYPE_ARRAY; } else // OP_EXIST return Nval > 0; diff --git a/storage/connect/cmgoconn.cpp b/storage/connect/cmgoconn.cpp index fdd5904025739f34d414874849fd590c1d9b46cd..44fac56137f341a8639974e1571b749f6c1b89a6 100644 --- a/storage/connect/cmgoconn.cpp +++ b/storage/connect/cmgoconn.cpp @@ -22,17 +22,10 @@ #include "filter.h" #include "cmgoconn.h" -bool IsNum(PSZ s); - -// Required to initialize libmongoc's internals -void mongo_init(bool init) -{ - if (init) - mongoc_init(); - else - mongoc_cleanup(); +bool CMgoConn::IsInit = false; -} // end of mongo_init +bool IsNum(PSZ s); +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s); /* --------------------------- Class INCOL --------------------------- */ @@ -139,11 +132,36 @@ CMgoConn::CMgoConn(PGLOBAL g, PCPARM pcg) m_Connected = false; } // end of CMgoConn standard constructor +/***********************************************************************/ +/* Required to initialize libmongoc's internals. */ +/***********************************************************************/ +void CMgoConn::mongo_init(bool init) +{ + if (init) + mongoc_init(); + else if (IsInit) + mongoc_cleanup(); + + IsInit = init; +} // end of mongo_init + /***********************************************************************/ /* Connect to the MongoDB server and get the collection. */ /***********************************************************************/ bool CMgoConn::Connect(PGLOBAL g) { + if (!IsInit) +#if defined(__WIN__) + __try { + mongo_init(true); + } __except (EXCEPTION_EXECUTE_HANDLER) { + strcpy(g->Message, "Cannot load MongoDB C driver"); + return true; + } // end try/except +#else // !__WIN__ + mongo_init(true); +#endif // !__WIN__ + Uri = mongoc_uri_new(Pcg->Uristr); if (!Uri) { @@ -240,12 +258,13 @@ int CMgoConn::CollSize(PGLOBAL g) /***********************************************************************/ bool CMgoConn::MakeCursor(PGLOBAL g) { - const char *p; - bool id, b = false, all = false; - PCSZ options = Pcg->Options; - PTDB tp = Pcg->Tdbp; - PCOL cp; - PSTRG s = NULL; + const char *p; + bool id, b = false, all = false; + PCSZ options = Pcg->Options; + PTDB tp = Pcg->Tdbp; + PCOL cp; + PSTRG s = NULL; + PFIL filp = tp->GetFilter(); id = (tp->GetMode() != MODE_READ); @@ -274,10 +293,10 @@ bool CMgoConn::MakeCursor(PGLOBAL g) s = new(g) STRING(g, 1023, (PSZ)options); - if (tp->GetFilter()) { + if (filp) { s->Append(",{\"$match\":"); - if (tp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return true; } else @@ -330,15 +349,15 @@ bool CMgoConn::MakeCursor(PGLOBAL g) } // endif error } else { - if (Pcg->Filter || tp->GetFilter()) { + if (Pcg->Filter || filp) { if (trace) { if (Pcg->Filter) htrc("Filter: %s\n", Pcg->Filter); - if (tp->GetFilter()) { + if (filp) { char buf[512]; - tp->GetFilter()->Prints(g, buf, 511); + filp->Prints(g, buf, 511); htrc("To_Filter: %s\n", buf); } // endif To_Filter @@ -346,11 +365,11 @@ bool CMgoConn::MakeCursor(PGLOBAL g) s = new(g) STRING(g, 1023, (PSZ)Pcg->Filter); - if (tp->GetFilter()) { + if (filp) { if (Pcg->Filter) s->Append(','); - if (tp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return NULL; } // endif Selector diff --git a/storage/connect/cmgoconn.h b/storage/connect/cmgoconn.h index f5cefea34420ed9ad2cbd2576544b540d108ea35..b1216ac576c39ea5ecbd0871d1335591abdbcc45 100644 --- a/storage/connect/cmgoconn.h +++ b/storage/connect/cmgoconn.h @@ -93,6 +93,7 @@ class CMgoConn : public BLOCK { PSZ Mini(PGLOBAL g, PCOL colp, const bson_t *bson, bool b); void GetColumnValue(PGLOBAL g, PCOL colp); bool AddValue(PGLOBAL g, PCOL colp, bson_t *doc, char *key, bool upd); + static void mongo_init(bool init); protected: // Members @@ -112,4 +113,5 @@ class CMgoConn : public BLOCK { PINCOL Fpc; // To insert INCOL classes PFBLOCK fp; bool m_Connected; + static bool IsInit; }; // end of class CMgoConn diff --git a/storage/connect/filter.cpp b/storage/connect/filter.cpp index 6a96240c469b58891e7e38b4ddcf9d5fa4eaf79d..079128f9aa63a976f40967a1a2833fd116111156 100644 --- a/storage/connect/filter.cpp +++ b/storage/connect/filter.cpp @@ -10,7 +10,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include "my_global.h" -#include "sql_class.h" +//#include "sql_class.h" //#include "sql_time.h" #if defined(__WIN__) diff --git a/storage/connect/filter.h b/storage/connect/filter.h index 11b77aec132cd2beb76dd9028ca1f9a4b49cba8d..c6ab8fddd35cb6a7d93ad9dae071a5996b7fad01 100644 --- a/storage/connect/filter.h +++ b/storage/connect/filter.h @@ -61,9 +61,6 @@ class DllExport FILTER : public XOBJECT { /* Filter description block */ //virtual PXOB CheckSubQuery(PGLOBAL, PSQL); //virtual bool CheckLocal(PTDB); //virtual int CheckSpcCol(PTDB tdbp, int n); -#if defined(MONGO_SUPPORT) - bool MakeSelector(PGLOBAL g, PSTRG s); -#endif // MONGO_SUPPORT virtual void Printf(PGLOBAL g, FILE *f, uint n); virtual void Prints(PGLOBAL g, char *ps, uint z); // PFIL Linearize(bool nosep); diff --git a/storage/connect/fmdlex.c b/storage/connect/fmdlex.c index 548a7ae5b7e2d9211098549af5a913ea7f452260..64429d9b93ec13a82cb468272ad3299c6392809c 100644 --- a/storage/connect/fmdlex.c +++ b/storage/connect/fmdlex.c @@ -417,10 +417,10 @@ static PDTP pp; static void MakeParm(int n); static void MakeMMDD(int n); static void MakeAMPM(int n); -static void MakeIn(char *); -static void MakeOut(char *); -static void Quotin(char *); -static void Quotout(char *); +static void MakeIn(const char *); +static void MakeOut(const char *); +static void Quotin(const char *); +static void Quotout(const char *); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1492,7 +1492,7 @@ void MakeAMPM(int n) } /* end of MakeAMPM */ -void MakeIn(char *text) +void MakeIn(const char *text) { if (!pp->InFmt) return; @@ -1500,14 +1500,14 @@ void MakeIn(char *text) strncat(pp->InFmt, text, (pp->Outsize - 1) - strlen(pp->InFmt)); } /* end of MakeIn */ -void MakeOut(char *text) +void MakeOut(const char *text) { if (!pp->OutFmt) return; strncat(pp->OutFmt, text, (pp->Outsize - 1) - strlen(pp->OutFmt)); } /* end of MakeOut */ -void Quotin(char *text) +void Quotin(const char *text) { if (!pp->InFmt) return; @@ -1516,7 +1516,7 @@ void Quotin(char *text) pp->InFmt[strlen(pp->InFmt)-1] = '\0'; } /* end of Quotin */ -void Quotout(char *text) +void Quotout(const char *text) { if (!pp->OutFmt) return; diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 692c7674eb6d9468eefb787b76341809168a58db..787ec2affc1c9f19466a4c7eafed97aaffda7024 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -129,10 +129,13 @@ #if defined(ODBC_SUPPORT) #include "odbccat.h" #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) #include "tabjdbc.h" #include "jdbconn.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT +#if defined(CMGO_SUPPORT) +#include "cmgoconn.h" +#endif // CMGO_SUPPORT #include "tabmysql.h" #include "filamdbf.h" #include "tabxcl.h" @@ -171,18 +174,18 @@ #define JSONMAX 10 // JSON Default max grp size extern "C" { - char version[]= "Version 1.06.0004 September 03, 2017"; + char version[]= "Version 1.06.0005 October 14, 2017"; #if defined(__WIN__) - char compver[]= "Version 1.06.0004 " __DATE__ " " __TIME__; + char compver[]= "Version 1.06.0005 " __DATE__ " " __TIME__; char slash= '\\'; #else // !__WIN__ char slash= '/'; #endif // !__WIN__ } // extern "C" -#if defined(NEW_MAR) +#if MYSQL_VERSION_ID > 100200 #define stored_in_db stored_in_db() -#endif // NEW_MAR) +#endif // MYSQL_VERSION_ID #if defined(XMAP) my_bool xmap= false; @@ -196,10 +199,10 @@ extern "C" { } // extern "C" #endif // XMSG -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) char *JvmPath; char *ClassPath; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT pthread_mutex_t parmut; pthread_mutex_t usrmut; @@ -222,7 +225,7 @@ bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, PCSZ host, PCSZ db, bool ZipLoadFile(PGLOBAL, PCSZ, PCSZ, PCSZ, bool, bool); bool ExactInfo(void); #if defined(CMGO_SUPPORT) -void mongo_init(bool); +//void mongo_init(bool); #endif // CMGO_SUPPORT USETEMP UseTemp(void); int GetConvSize(void); @@ -234,6 +237,8 @@ uint GetWorkSize(void); void SetWorkSize(uint); extern "C" const char *msglang(void); +static char *strz(PGLOBAL g, LEX_STRING &ls); + static void PopUser(PCONNECT xp); static PCONNECT GetUser(THD *thd, PCONNECT xp); static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); @@ -350,14 +355,21 @@ static MYSQL_THDVAR_UINT(json_grp_size, "max number of rows for JSON aggregate functions.", NULL, NULL, JSONMAX, 1, INT_MAX, 1); -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) // Default java wrapper to use with JDBC tables static MYSQL_THDVAR_STR(java_wrapper, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, "Java wrapper class name", // check_java_wrapper, update_java_wrapper, NULL, NULL, "wrappers/JdbcInterface"); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT + +#if 0 // This is apparently not acceptable for a plugin +// Enabling MONGO table type +static MYSQL_THDVAR_BOOL(enable_mongo, PLUGIN_VAR_RQCMDARG, + "Enabling the MongoDB access", + NULL, NULL, MONGO_ENABLED); +#endif // 0 #if defined(MONGO_SUPPORT) // Enabling MONGO table type @@ -421,10 +433,14 @@ extern "C" const char *msglang(void) } // end of msglang #else // !XMSG && !NEWMSG -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) char *GetJavaWrapper(void) {return connect_hton ? THDVAR(current_thd, java_wrapper) : (char*)"wrappers/JdbcInterface";} -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT + +#if defined(JAVA_SUPPORT) +//bool MongoEnabled(void) { return THDVAR(current_thd, enable_mongo); } +#endif // JAVA_SUPPORT #if defined(MONGO_SUPPORT) bool MongoEnabled(void) { return THDVAR(current_thd, enable_mongo); } @@ -705,7 +721,7 @@ static int connect_init_func(void *p) XmlInitParserLib(); #endif // LIBXML2_SUPPORT -#if defined(CMGO_SUPPORT) +#if 0 //defined(CMGO_SUPPORT) mongo_init(true); #endif // CMGO_SUPPORT @@ -726,9 +742,9 @@ static int connect_init_func(void *p) DTVAL::SetTimeShift(); // Initialize time zone shift once for all BINCOL::SetEndian(); // Initialize host endian setting -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) JAVAConn::SetJVM(); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT DBUG_RETURN(0); } // end of connect_init_func @@ -748,12 +764,12 @@ static int connect_done_func(void *) #endif // LIBXML2_SUPPORT #if defined(CMGO_SUPPORT) - mongo_init(false); + CMgoConn::mongo_init(false); #endif // CMGO_SUPPORT -#ifdef JDBC_SUPPORT +#ifdef JAVA_SUPPORT JAVAConn::ResetJVM(); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #if !defined(__WIN__) PROFILE_End(); @@ -1758,7 +1774,7 @@ bool ha_connect::IsPartitioned(void) } // end of IsPartitioned -const char *ha_connect::GetDBName(const char* name) +PCSZ ha_connect::GetDBName(PCSZ name) { return (name) ? name : table->s->db.str; } // end of GetDBName @@ -1821,7 +1837,7 @@ void ha_connect::AddColName(char *cp, Field *fp) /***********************************************************************/ /* This function sets the current database path. */ /***********************************************************************/ -bool ha_connect::SetDataPath(PGLOBAL g, const char *path) +bool ha_connect::SetDataPath(PGLOBAL g, PCSZ path) { return (!(datapath= SetPath(g, path))); } // end of SetDataPath @@ -2181,7 +2197,7 @@ int ha_connect::MakeRecord(char *buf) /***********************************************************************/ /* Set row values from a MySQL pseudo record. Specific to MySQL. */ /***********************************************************************/ -int ha_connect::ScanRecord(PGLOBAL g, uchar *) +int ha_connect::ScanRecord(PGLOBAL g, const uchar *) { char attr_buffer[1024]; char data_buffer[1024]; @@ -2324,7 +2340,7 @@ int ha_connect::ScanRecord(PGLOBAL g, uchar *) /* Check change in index column. Specific to MySQL. */ /* Should be elaborated to check for real changes. */ /***********************************************************************/ -int ha_connect::CheckRecord(PGLOBAL g, const uchar *, uchar *newbuf) +int ha_connect::CheckRecord(PGLOBAL g, const uchar *, const uchar *newbuf) { return ScanRecord(g, newbuf); } // end of dummy CheckRecord @@ -2517,7 +2533,7 @@ const char *ha_connect::GetValStr(OPVAL vop, bool neg) val= (neg) ? " IS NOT NULL" : " IS NULL"; break; case OP_LIKE: - val= " LIKE "; + val= (neg) ? " NOT LIKE " : " LIKE "; break; case OP_XX: val= (neg) ? " NOT BETWEEN " : " BETWEEN "; @@ -2886,7 +2902,10 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GT_FUNC: vop= OP_GT; break; - case Item_func::LIKE_FUNC: vop= OP_LIKE; break; + case Item_func::LIKE_FUNC: + vop= OP_LIKE; + neg = ((Item_func_opt_neg *)condf)->negated; + break; case Item_func::ISNOTNULL_FUNC: neg = true; // fall through @@ -4417,8 +4436,8 @@ bool ha_connect::IsSameIndex(PIXDEF xp1, PIXDEF xp2) return b; } // end of IsSameIndex -MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, - MODE newmode, bool *chk, bool *cras) +MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, + MODE newmode, bool *chk, bool *cras) { #if defined(DEVELOPMENT) if (true) { @@ -5386,13 +5405,11 @@ static int connect_assisted_discovery(handlerton *, THD* thd, bool cnc= false; int cto= -1, qto= -1; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) || defined(MONGO_SUPPORT) -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) PJPARM sjp= NULL; -#endif // JDBC_SUPPORT PCSZ driver= NULL; char *url= NULL; -#endif // JDBC_SUPPORT || MONGO_SUPPORT +#endif // JAVA_SUPPORT uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); bool bif, ok= false, dbf= false; TABTYPE ttp= TAB_UNDEF; @@ -5453,9 +5470,9 @@ static int connect_assisted_discovery(handlerton *, THD* thd, if ((ucnc= GetListOption(g, "UseDSN", topt->oplist))) cnc= (!*ucnc || *ucnc == 'y' || *ucnc == 'Y' || atoi(ucnc) != 0); #endif -#if defined(JDBC_SUPPORT) || defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) driver= GetListOption(g, "Driver", topt->oplist, NULL); -#endif // JDBC_SUPPORT || MONGO_SUPPORT +#endif // JAVA_SUPPORT #if defined(PROMPT_OK) cop= atoi(GetListOption(g, "checkdsn", topt->oplist, "0")); #endif // PROMPT_OK @@ -5542,7 +5559,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, supfnc |= (FNC_TABLE | FNC_DSN | FNC_DRIVER); break; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_JDBC: if (fnc & FNC_DRIVER) { ok = true; @@ -5576,10 +5593,10 @@ static int connect_assisted_discovery(handlerton *, THD* thd, supfnc |= (FNC_DRIVER | FNC_TABLE); break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT case TAB_DBF: dbf = true; - // fall through + // Passthru case TAB_CSV: if (!fn && fnc != FNC_NO) sprintf(g->Message, "Missing %s file name", topt->type); @@ -5633,10 +5650,8 @@ static int connect_assisted_discovery(handlerton *, THD* thd, ok = true; break; #endif // __WIN__ -#if defined(PIVOT_SUPPORT) case TAB_PIVOT: supfnc = FNC_NO; -#endif // PIVOT_SUPPORT case TAB_PRX: case TAB_TBL: case TAB_XCL: @@ -5667,14 +5682,14 @@ static int connect_assisted_discovery(handlerton *, THD* thd, ok = true; break; -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_MONGO: if (!topt->tabname) topt->tabname = tab; ok = true; break; -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT case TAB_VIR: ok = true; break; @@ -5747,7 +5762,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, break; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_JDBC: switch (fnc) { case FNC_NO: @@ -5776,7 +5791,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } // endswitch info break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT case TAB_MYSQL: qrp = MyColumns(g, thd, host, db, user, pwd, tab, NULL, port, fnc == FNC_COL); @@ -5806,11 +5821,9 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } // endif OcrColumns break; -#if defined(PIVOT_SUPPORT) case TAB_PIVOT: qrp = PivotColumns(g, tab, src, pic, fcl, skc, host, db, user, pwd, port); break; -#endif // PIVOT_SUPPORT case TAB_VIR: qrp = VirColumns(g, fnc == FNC_COL); break; @@ -5819,9 +5832,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, break; #if defined(MONGO_SUPPORT) case TAB_MONGO: - if (!(url = strz(g, create_info->connect_string)) || !*url) - url = "mongodb://localhost:27017"; - + url = strz(g, create_info->connect_string); qrp = MGOColumns(g, db, url, topt, fnc == FNC_COL); break; #endif // MONGO_SUPPORT @@ -5949,7 +5960,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, break; case FLD_SCHEM: -#if defined(ODBC_SUPPORT) || defined(JDBC_SUPPORT) +#if defined(ODBC_SUPPORT) || defined(JAVA_SUPPORT) if ((ttp == TAB_ODBC || ttp == TAB_JDBC) && crp->Kdata) { if (schem && stricmp(schem, crp->Kdata->GetCharValue(i))) { sprintf(g->Message, @@ -5960,7 +5971,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, schem = crp->Kdata->GetCharValue(i); } // endif ttp -#endif // ODBC_SUPPORT || JDBC_SUPPORT +#endif // ODBC_SUPPORT || JAVA_SUPPORT default: break; // Ignore } // endswitch Fld @@ -6008,7 +6019,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd, } else #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) if (ttp == TAB_JDBC) { int plgtyp; @@ -7151,7 +7162,7 @@ static MYSQL_SYSVAR_STR(errmsg_dir_path, msg_path, "../../../../storage/connect/"); // for testing #endif // XMSG -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) static MYSQL_SYSVAR_STR(jvm_path, JvmPath, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, "Path to the directory where is the JVM lib", @@ -7163,7 +7174,7 @@ static MYSQL_SYSVAR_STR(class_path, ClassPath, "Java class path", // check_class_path, update_class_path, NULL, NULL, NULL); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT static struct st_mysql_sys_var* connect_system_variables[]= { @@ -7184,14 +7195,14 @@ static struct st_mysql_sys_var* connect_system_variables[]= { #endif // XMSG MYSQL_SYSVAR(json_null), MYSQL_SYSVAR(json_grp_size), -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) MYSQL_SYSVAR(jvm_path), MYSQL_SYSVAR(class_path), MYSQL_SYSVAR(java_wrapper), -#endif // JDBC_SUPPORT -#if defined(MONGO_SUPPORT) - MYSQL_SYSVAR(enable_mongo), -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT +#if defined(JAVA_SUPPORT) +//MYSQL_SYSVAR(enable_mongo), +#endif // JAVA_SUPPORT NULL }; @@ -7208,7 +7219,7 @@ maria_declare_plugin(connect) 0x0106, /* version number (1.05) */ NULL, /* status variables */ connect_system_variables, /* system variables */ - "1.06.0004", /* string version */ + "1.06.0005", /* string version */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ } maria_declare_plugin_end; diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index e839590dbc8c8484c0e01d2fe425c4535685a478..4c5bf5856cc433fb01a649e2b988b6c0d8036c49 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -32,8 +32,6 @@ /****************************************************************************/ #include "mycat.h" -static char *strz(PGLOBAL g, LEX_STRING &ls); - /****************************************************************************/ /* Structures used to pass info between CONNECT and ha_connect. */ /****************************************************************************/ @@ -207,13 +205,13 @@ class ha_connect: public handler bool IsOpened(void); int CloseTable(PGLOBAL g); int MakeRecord(char *buf); - int ScanRecord(PGLOBAL g, uchar *buf); - int CheckRecord(PGLOBAL g, const uchar *oldbuf, uchar *newbuf); + int ScanRecord(PGLOBAL g, const uchar *buf); + int CheckRecord(PGLOBAL g, const uchar *oldbuf, const uchar *newbuf); int ReadIndexed(uchar *buf, OPVAL op, const key_range *kr= NULL); bool IsIndexed(Field *fp); bool MakeKeyWhere(PGLOBAL g, PSTRG qry, OPVAL op, char q, const key_range *kr); - inline char *Strz(LEX_STRING &ls); +//inline char *Strz(LEX_STRING &ls); key_range start_key; @@ -231,7 +229,7 @@ class ha_connect: public handler /** @brief The file extensions. */ - const char **bas_ext() const; +//const char **bas_ext() const; /** Check if a storage engine supports a particular alter table in-place diff --git a/storage/connect/javaconn.cpp b/storage/connect/javaconn.cpp index 3ba99ed89f8d6a9add32dc87148072a6e6ac7fb1..90f834ef9a70c4bb0dd95c2b8edd89bc9b412627 100644 --- a/storage/connect/javaconn.cpp +++ b/storage/connect/javaconn.cpp @@ -17,7 +17,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include -#include +//#include #if defined(__WIN__) #include // for getcwd #if defined(__BORLANDC__) @@ -57,6 +57,7 @@ extern "C" HINSTANCE s_hModule; // Saved module handle extern char *JvmPath; // The connect_jvm_path global variable value extern char *ClassPath; // The connect_class_path global variable value +char *GetPluginDir(void); char *GetJavaWrapper(void); // The connect_java_wrapper variable value /***********************************************************************/ @@ -453,7 +454,7 @@ bool JAVAConn::Open(PGLOBAL g) vm_args.options = options; vm_args.ignoreUnrecognized = false; // invalid options make the JVM init fail - //=============== load and initialize Java VM and JNI interface ============= + //=============== load and initialize Java VM and JNI interface ============= rc = CreateJavaVM(&jvm, (void**)&env, &vm_args); // YES !! delete options; // we then no longer need the initialisation options. diff --git a/storage/connect/javaconn.h b/storage/connect/javaconn.h index 5d82570365b8325ffa286180ba68e7896aec8e43..54b7c4e92b7a42aa71c2f42e3ccc05333a02d418 100644 --- a/storage/connect/javaconn.h +++ b/storage/connect/javaconn.h @@ -54,12 +54,12 @@ typedef jint(JNICALL *GETJVM) (JavaVM **, jsize, jsize *); typedef jint(JNICALL *GETDEF) (void *); #endif // _DEBUG -class JAVAConn; +//class JAVAConn; /***********************************************************************/ /* JAVAConn class. */ /***********************************************************************/ -class JAVAConn : public BLOCK { +class DllExport JAVAConn : public BLOCK { friend class TDBJMG; friend class JMGDISC; private: diff --git a/storage/connect/jdbccat.h b/storage/connect/jdbccat.h index 1210aff77d8b20b19aaf85b675f7ec9ae42f0875..d137164b53ae0b005db8fa16ad0229d91ef3ca59 100644 --- a/storage/connect/jdbccat.h +++ b/storage/connect/jdbccat.h @@ -6,7 +6,7 @@ #define DEFAULT_QUERY_TIMEOUT -1 // means do not set typedef struct jdbc_parms { - int CheckSize(int rows); + int CheckSize(int rows); PCSZ Driver; // JDBC driver PCSZ Url; // Driver URL PCSZ User; // User connect info diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp index cfe74cabacd4178978255b7898520bb4511b623d..4c21c2c9681c1535a24be417a88690f7e3db299e 100644 --- a/storage/connect/jdbconn.cpp +++ b/storage/connect/jdbconn.cpp @@ -654,7 +654,7 @@ bool JDBConn::Connect(PJPARM sop) if (gmID(g, typid, "ColumnType", "(ILjava/lang/String;)I")) return true; else - m_Opened = true; + m_Connected = true; return false; } // end of Connect diff --git a/storage/connect/jmgoconn.cpp b/storage/connect/jmgoconn.cpp index 7535431c82e8c2794cf0d8a6d744a75cd4a8c132..4736641ef3f5c464d16c78d9bf414d4ffeab54c5 100644 --- a/storage/connect/jmgoconn.cpp +++ b/storage/connect/jmgoconn.cpp @@ -25,6 +25,7 @@ #define nullptr 0 bool IsNum(PSZ s); +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s); /* --------------------------- Class JNCOL --------------------------- */ @@ -123,12 +124,13 @@ void JMgoConn::AddJars(PSTRG jpop, char sep) #if defined(DEVELOPMENT) if (m_Version == 2) { jpop->Append(sep); - jpop->Append("C:/Eclipse/workspace/MongoWrap2/bin"); +// jpop->Append("C:/Eclipse/workspace/MongoWrap2/bin"); jpop->Append(sep); jpop->Append("C:/mongo-java-driver/mongo-java-driver-2.13.3.jar"); } else { jpop->Append(sep); - jpop->Append("C:/Eclipse/workspace/MongoWrap3/bin"); +// jpop->Append("C:/Eclipse/workspace/MongoWrap3/bin"); +// jpop->Append("C:/Program Files/MariaDB 10.1/lib/plugin/JavaWrappers.jar"); jpop->Append(sep); jpop->Append("C:/mongo-java-driver/mongo-java-driver-3.4.2.jar"); } // endif m_Version @@ -238,6 +240,7 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, PSZ jp; PCSZ op = NULL, sf = NULL, Options = options; PSTRG s = NULL; + PFIL filp = tdbp->GetFilter(); if (Options && !stricmp(Options, "all")) { Options = NULL; @@ -264,10 +267,10 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, s = new(g) STRING(g, 1023, (PSZ)Options); - if (tdbp->GetFilter()) { + if (filp) { s->Append(",{\"$match\":"); - if (tdbp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return NULL; } else @@ -314,15 +317,15 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, return AggregateCollection(p); } else { - if (filter || tdbp->GetFilter()) { + if (filter || filp) { if (trace) { if (filter) htrc("Filter: %s\n", filter); - if (tdbp->GetFilter()) { + if (filp) { char buf[512]; - tdbp->GetFilter()->Prints(g, buf, 511); + filp->Prints(g, buf, 511); htrc("To_Filter: %s\n", buf); } // endif To_Filter @@ -331,11 +334,11 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options, s = new(g) STRING(g, 1023, (PSZ)filter); len = s->GetLength(); - if (tdbp->GetFilter()) { + if (filp) { if (filter) s->Append(','); - if (tdbp->GetFilter()->MakeSelector(g, s)) { + if (MakeSelector(g, filp, s)) { strcpy(g->Message, "Failed making selector"); return NULL; } // endif Selector diff --git a/storage/connect/json.h b/storage/connect/json.h index cf7b2b18737312ac84561a93829ce82a8b3dcef5..375532212c48e30305a107604ac8cb92653244b3 100644 --- a/storage/connect/json.h +++ b/storage/connect/json.h @@ -53,8 +53,8 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty); bool SerializeArray(JOUT *js, PJAR jarp, bool b); bool SerializeObject(JOUT *js, PJOB jobp); bool SerializeValue(JOUT *js, PJVAL jvp); -bool IsNum(PSZ s); char *NextChr(PSZ s, char sep); +DllExport bool IsNum(PSZ s); /***********************************************************************/ /* Class JOUT. Used by Serialize. */ diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 4f0978cb5485c663e58b0f99ef2acd64bc59f5ab..504ea837fee908018b9715fb2ceee798dd7b8df1 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -497,28 +497,23 @@ PVAL JSNX::ExpandArray(PGLOBAL g, PJAR arp, int n) /*********************************************************************************/ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) { -//int i, ars, nv = 0, nextsame = Tjp->NextSame; - int i, nv = 0, nextsame = 0; - my_bool err; + int i, ars = arp->size(), nv = 0; + bool err; OPVAL op = Nodes[n].Op; PVAL val[2], vp = Nodes[n].Valp; PJVAL jvrp, jvp; JVALUE jval; vp->Reset(); -//ars = arp->size(); if (trace) - htrc("CalculateArray size=%d\n", arp->size()); -// htrc("CalculateArray size=%d\n", ars); + htrc("CalculateArray size=%d op=%d\n", ars, op); for (i = 0; i < arp->size(); i++) { -//for (i = 0; i < ars; i++) { because compiler bug jvrp = arp->GetValue(i); if (trace) - htrc("Value %s null=%d nv=%d\n", - jvrp->GetString(g), jvrp->IsNull() ? 1 : 0, nv); + htrc("i=%d nv=%d\n", i, nv); if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) { if (jvrp->IsNull()) { @@ -530,6 +525,10 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) } else jvp = jvrp; + if (trace) + htrc("jvp=%s null=%d\n", + jvp->GetString(g), jvp->IsNull() ? 1 : 0); + if (!nv++) { SetJsonValue(g, vp, jvp, n); continue; @@ -562,6 +561,13 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) if (err) vp->Reset(); + if (trace) { + char buf(32); + + htrc("vp='%s' err=%d\n", + vp->GetCharString(&buf), err ? 1 : 0); + } // endif trace + } // endif Zero } // endif jvrp @@ -579,7 +585,6 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) } // endif Op -//Tjp->NextSame = nextsame; return vp; } // end of CalculateArray @@ -1510,7 +1515,7 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n, if (!(g->Sarea = PlugAllocMem(g, ml))) { char errmsg[MAX_STR]; - sprintf(errmsg, MSG(WORK_AREA), g->Message); + snprintf(errmsg, sizeof(errmsg)-1, MSG(WORK_AREA), g->Message); strcpy(g->Message, errmsg); g->Sarea_Size = 0; return true; diff --git a/storage/connect/mongo.cpp b/storage/connect/mongo.cpp index 12f2f428112210a439f88ac1a41ee22d0994dd3b..088dc2d29d1788f71af5f29ab57754b584718f29 100644 --- a/storage/connect/mongo.cpp +++ b/storage/connect/mongo.cpp @@ -18,12 +18,13 @@ #include "plgdbsem.h" #include "xtable.h" #include "tabext.h" +#include "filter.h" #if defined(CMGO_SUPPORT) #include "tabcmg.h" -#endif // MONGO_SUPPORT -#if defined(JDBC_SUPPORT) +#endif // CMGO_SUPPORT +#if defined(JAVA_SUPPORT) #include "tabjmg.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #include "resource.h" /***********************************************************************/ @@ -32,8 +33,89 @@ #define MAXCOL 200 /* Default max column nb in result */ #define TYPE_UNKNOWN 12 /* Must be greater than other types */ +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s); bool IsNum(PSZ s); +/***********************************************************************/ +/* Make selector json representation for Mongo tables. */ +/***********************************************************************/ +bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s) +{ + OPVAL opc = fp->GetOpc(); + + s->Append('{'); + + if (opc == OP_AND || opc == OP_OR) { + if (fp->GetArgType(0) != TYPE_FILTER || fp->GetArgType(1) != TYPE_FILTER) + return true; + + s->Append("\"$"); + s->Append(opc == OP_AND ? "and" : "or"); + s->Append("\":["); + + if (MakeSelector(g, (PFIL)fp->Arg(0), s)) + return true; + + s->Append(','); + + if (MakeSelector(g, (PFIL)fp->Arg(1), s)) + return true; + + s->Append(']'); + } else { + if (fp->GetArgType(0) != TYPE_COLBLK) + return true; + + s->Append('"'); + s->Append(((PCOL)fp->Arg(0))->GetJpath(g, false)); + s->Append("\":{\"$"); + + switch (opc) { + case OP_EQ: + s->Append("eq"); + break; + case OP_NE: + s->Append("ne"); + break; + case OP_GT: + s->Append("gt"); + break; + case OP_GE: + s->Append("gte"); + break; + case OP_LT: + s->Append("lt"); + break; + case OP_LE: + s->Append("lte"); + break; + case OP_NULL: + case OP_LIKE: + case OP_EXIST: + default: + return true; + } // endswitch Opc + + s->Append("\":"); + + if (fp->GetArgType(1) == TYPE_COLBLK) { + s->Append("\"$"); + s->Append(((PEXTCOL)fp->Arg(1))->GetJpath(g, false)); + s->Append('"'); + } else { + char buf[501]; + + fp->Arg(1)->Prints(g, buf, 500); + s->Append(buf); + } // endif Type + + s->Append('}'); + } // endif opc + + s->Append('}'); + return false; +} // end of MakeSelector + /***********************************************************************/ /* MGOColumns: construct the result blocks containing the description */ /* of all the columns of a document contained inside MongoDB. */ @@ -49,7 +131,7 @@ PQRYRES MGOColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt, bool info) int i, n = 0; PCSZ drv; PBCOL bcp; - MGODISC *cmgd; + MGODISC *cmgd = NULL; PQRYRES qrp; PCOLRES crp; @@ -72,7 +154,7 @@ PQRYRES MGOColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt, bool info) goto err; #endif } else if (drv && toupper(*drv) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) cmgd = new(g) JMGDISC(g, (int*)length); #else sprintf(g->Message, "Mongo %s Driver not available", "Java"); @@ -142,7 +224,7 @@ PQRYRES MGOColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt, bool info) return qrp; err: - if (cmgd->tmgp) + if (cmgd && cmgd->tmgp) cmgd->tmgp->CloseDB(g); return NULL; @@ -181,7 +263,7 @@ int MGODISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ uri, PTOS topt) /* Open the MongoDB collection. */ /*********************************************************************/ tdp = new(g) MGODEF; - tdp->Uri = uri; + tdp->Uri = (uri && *uri) ? uri : "mongodb://localhost:27017"; tdp->Driver = drv; tdp->Tabname = GetStringTableOption(g, topt, "Name", NULL); tdp->Tabname = GetStringTableOption(g, topt, "Tabname", tdp->Tabname); @@ -346,7 +428,7 @@ PTDB MGODEF::GetTable(PGLOBAL g, MODE m) return NULL; #endif } else if (Driver && toupper(*Driver) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) if (Catfunc == FNC_COL) return new(g) TDBJGL(this); else diff --git a/storage/connect/mongo.h b/storage/connect/mongo.h index af69226ea8b4e33e7d25ba45264642bde4cfe715..97c391a217facbabb0c91e13a0bf87f07d3dd8ab 100644 --- a/storage/connect/mongo.h +++ b/storage/connect/mongo.h @@ -63,7 +63,7 @@ class DllExport MGODEF : public EXTDEF { /* Table description */ friend class TDBJGL; friend class CMGFAM; friend class MGODISC; - friend PQRYRES MGOColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); + friend DllExport PQRYRES MGOColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); public: // Constructor MGODEF(void); diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index 0f8d7b76b602c4ee1e2811718f782bd2615b13bd..bb77512be62efe4885bdd08466190184538319cd 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -83,22 +83,20 @@ #define NODBC #include "tabodbc.h" #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) #define NJDBC #include "tabjdbc.h" -#endif // JDBC_SUPPORT -#if defined(PIVOT_SUPPORT) +#endif // JAVA_SUPPORT #include "tabpivot.h" -#endif // PIVOT_SUPPORT #include "tabvir.h" #include "tabjson.h" #include "ha_connect.h" #if defined(XML_SUPPORT) #include "tabxml.h" #endif // XML_SUPPORT -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) #include "mongo.h" -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT #if defined(ZIP_SUPPORT) #include "tabzip.h" #endif // ZIP_SUPPORT @@ -111,9 +109,9 @@ extern "C" HINSTANCE s_hModule; // Saved module handle #endif // !__WIN__ -#if defined(MONGO_SUPPORT) -bool MongoEnabled(void); -#endif // MONGO_SUPPORT +#if defined(JAVA_SUPPORT) +//bool MongoEnabled(void); +#endif // JAVA_SUPPORT PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); /***********************************************************************/ @@ -144,8 +142,9 @@ TABTYPE GetTypeID(const char *type) #if defined(ODBC_SUPPORT) : (!stricmp(type, "ODBC")) ? TAB_ODBC #endif -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) : (!stricmp(type, "JDBC")) ? TAB_JDBC + : (!stricmp(type, "MONGO")) ? TAB_MONGO #endif : (!stricmp(type, "MYSQL")) ? TAB_MYSQL : (!stricmp(type, "MYPRX")) ? TAB_MYSQL @@ -159,16 +158,11 @@ TABTYPE GetTypeID(const char *type) : (!stricmp(type, "OCCUR")) ? TAB_OCCUR : (!stricmp(type, "CATLG")) ? TAB_PRX // Legacy : (!stricmp(type, "PROXY")) ? TAB_PRX -#if defined(PIVOT_SUPPORT) : (!stricmp(type, "PIVOT")) ? TAB_PIVOT -#endif : (!stricmp(type, "VIR")) ? TAB_VIR : (!stricmp(type, "JSON")) ? TAB_JSON #if defined(ZIP_SUPPORT) : (!stricmp(type, "ZIP")) ? TAB_ZIP -#endif -#if defined(MONGO_SUPPORT) - : (!stricmp(type, "MONGO")) ? TAB_MONGO #endif : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; } // end of GetTypeID @@ -542,9 +536,9 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) #if defined(ODBC_SUPPORT) case TAB_ODBC: tdp= new(g) ODBCDEF; break; #endif // ODBC_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) case TAB_JDBC: tdp= new(g) JDBCDEF; break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #if defined(__WIN__) case TAB_MAC: tdp= new(g) MACDEF; break; case TAB_WMI: tdp= new(g) WMIDEF; break; @@ -555,17 +549,15 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) case TAB_PRX: tdp= new(g) PRXDEF; break; case TAB_OCCUR: tdp= new(g) OCCURDEF; break; case TAB_MYSQL: tdp= new(g) MYSQLDEF; break; -#if defined(PIVOT_SUPPORT) case TAB_PIVOT: tdp= new(g) PIVOTDEF; break; -#endif // PIVOT_SUPPORT case TAB_VIR: tdp= new(g) VIRDEF; break; case TAB_JSON: tdp= new(g) JSONDEF; break; #if defined(MONGO_SUPPORT) case TAB_MONGO: - if (MongoEnabled()) +// if (MongoEnabled()) tdp = new(g) MGODEF; - else - strcpy(g->Message, "MONGO type not enabled"); +// else +// strcpy(g->Message, "MONGO type not enabled"); break; #endif // MONGO_SUPPORT diff --git a/storage/connect/mysql-test/connect/r/json_java_2.result b/storage/connect/mysql-test/connect/r/json_java_2.result index ad1ca0fe85f3900e39aa17096f4d097c19e24212..783d86e6595e418d896269fe9704217692730027 100644 --- a/storage/connect/mysql-test/connect/r/json_java_2.result +++ b/storage/connect/mysql-test/connect/r/json_java_2.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; # # Test the MONGO table type # @@ -310,7 +309,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=JSON TABNAME='cities' OPTION_LIST='Driver=Java,Version=2' CONNECTION='mongodb://localhost:27017' LRECL=4096 DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -382,4 +381,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/json_java_3.result b/storage/connect/mysql-test/connect/r/json_java_3.result index d7d185956d66033f77f74b8cdad9a12912577442..a301e0273d518c5197e52438982c00eabce3bd12 100644 --- a/storage/connect/mysql-test/connect/r/json_java_3.result +++ b/storage/connect/mysql-test/connect/r/json_java_3.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; # # Test the MONGO table type # @@ -310,7 +309,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=JSON TABNAME='cities' OPTION_LIST='Driver=Java,Version=3' CONNECTION='mongodb://localhost:27017' LRECL=4096 DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -382,4 +381,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/json_mongo_c.result b/storage/connect/mysql-test/connect/r/json_mongo_c.result index afcad8d2ea2a83a12f7c0a49e9ab65ecd77ceded..8adc006a51bb938fd9005ded3fd5933b8f51fd63 100644 --- a/storage/connect/mysql-test/connect/r/json_mongo_c.result +++ b/storage/connect/mysql-test/connect/r/json_mongo_c.result @@ -1,4 +1,3 @@ -set connect_enable_mongo=1; # # Test the MONGO table type # @@ -309,7 +308,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=JSON TABNAME='cities' OPTION_LIST='Driver=C,Version=0' CONNECTION='mongodb://localhost:27017' LRECL=1024 DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -381,4 +380,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/mongo_c.result b/storage/connect/mysql-test/connect/r/mongo_c.result index f90f3a94b44ee00570a36793bc95e5331bb681a4..c7aadcf116591d48e81aba3fb84eec0491668426 100644 --- a/storage/connect/mysql-test/connect/r/mongo_c.result +++ b/storage/connect/mysql-test/connect/r/mongo_c.result @@ -1,4 +1,3 @@ -set connect_enable_mongo=1; # # Test the MONGO table type # @@ -305,7 +304,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=MONGO TABNAME='cities' OPTION_LIST='Driver=C,Version=0' DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -377,4 +376,3 @@ planner 167 41.750000 postcard 23 5.750000 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/mongo_java_2.result b/storage/connect/mysql-test/connect/r/mongo_java_2.result index a77ccd2d452fb3903ad6ef225b1623599a85124e..708b6f1cc7c7c021d3928baaea6948ec44a56398 100644 --- a/storage/connect/mysql-test/connect/r/mongo_java_2.result +++ b/storage/connect/mysql-test/connect/r/mongo_java_2.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo2.jar'; # # Test the MONGO table type # @@ -306,7 +305,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=MONGO TABNAME='cities' OPTION_LIST='Driver=Java,Version=2' DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -378,4 +377,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/mongo_java_3.result b/storage/connect/mysql-test/connect/r/mongo_java_3.result index ceb1be9ddcbf4eb7174544e6bcaddbac74bd0aad..672d9f15b809b12a155341ef826618d50229b069 100644 --- a/storage/connect/mysql-test/connect/r/mongo_java_3.result +++ b/storage/connect/mysql-test/connect/r/mongo_java_3.result @@ -1,5 +1,4 @@ -SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; -set connect_enable_mongo=1; +SET GLOBAL connect_class_path='C:/MariaDB-10.1/MariaDB/storage/connect/mysql-test/connect/std_data/Mongo3.jar'; # # Test the MONGO table type # @@ -306,7 +305,7 @@ loc_0 double(12,6) NOT NULL `FIELD_FORMAT`='loc.0', loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=MONGO TABNAME='cities' OPTION_LIST='Driver=Java,Version=3' DATA_CHARSET='utf8'; # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -378,4 +377,3 @@ planner 167 41.75 postcard 23 5.75 DROP TABLE t1; true -set connect_enable_mongo=0; diff --git a/storage/connect/mysql-test/connect/r/odbc_firebird.result b/storage/connect/mysql-test/connect/r/odbc_firebird.result index b0c2582abeb9b4daa2adf81af34d5c939e57085a..3c4cd84fffc8411e0db38995ee27439e9b199ed9 100644 --- a/storage/connect/mysql-test/connect/r/odbc_firebird.result +++ b/storage/connect/mysql-test/connect/r/odbc_firebird.result @@ -9,29 +9,13 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Sources' SELECT * FROM t1; Name Description -dBASE Files Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx) -PLUGDB_DEBUG PLUGODBC_Driver -PLUGDB_ODBC PLUGODBC_Driver -SafeDB_ODBC SDB_ODBC_Driver -Firebird Firebird/InterBase(r) driver -ConnectEngineXLS Microsoft Excel Driver (*.xls) Excel Files Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) -MariaODBC MySQL ODBC 5.2a Driver -MariaODBCbeta MariaDB ODBC 1.0 Driver -MyODBC MySQL ODBC 5.2a Driver MS Access Database Microsoft Access Driver (*.mdb, *.accdb) -MS Access Db1 Microsoft Access Driver (*.mdb) -MySQL-ANSI MySQL ODBC 5.3 ANSI Driver -MySQL-Unicode MySQL ODBC 5.3 Unicode Driver -Xtreme Sample Database 2008 Microsoft Access Driver (*.mdb) -PlugDB test PLUGODBC_Driver -SQLite3 Datasource SQLite3 ODBC Driver -SQLite Datasource SQLite ODBC Driver -SQLite UTF-8 Datasource SQLite ODBC (UTF-8) Driver ORACLE_TEST Oracle in XE -ConnectEnginePostgresql PostgreSQL ODBC Driver(ANSI) +SQLServer_Test SQL Server Native Client 11.0 +Firebird Firebird/InterBase(r) driver ConnectEngineOracle Oracle in XE -ConnectEngineSQLServer SQL Server +ConnectEngineSQLServer SQL Server Native Client 11.0 DROP TABLE t1; CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Drivers; SHOW CREATE TABLE t1; @@ -42,51 +26,12 @@ t1 CREATE TABLE `t1` ( ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='ODBC' `CATFUNC`='Drivers' SELECT * FROM t1; Description Attributes -SQL Server UsageCount=1;SQLLevel=1;FileUsage=0;DriverODBCVer=03.50;ConnectFunctions=YYY;APILevel=2;CPTimeout=60; -Microsoft ODBC for Oracle UsageCount=1;SQLLevel=1;FileUsage=0;DriverODBCVer=02.50;ConnectFunctions=YYY;APILevel=1;CPTimeout=120; -Microsoft Access Driver (*.mdb) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=2;FileExtns=*.mdb;SQLLevel=0; -Microsoft Access-Treiber (*.mdb) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=2;FileExtns=*.mdb;SQLLevel=0; -Driver do Microsoft Access (*.mdb) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=2;FileExtns=*.mdb;SQLLevel=0; -Microsoft dBase Driver (*.dbf) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.ndx,*.mdx;SQLLevel=0; -Microsoft dBase-Treiber (*.dbf) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.ndx,*.mdx;SQLLevel=0; -Driver do Microsoft dBase (*.dbf) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.ndx,*.mdx;SQLLevel=0; -Microsoft Excel Driver (*.xls) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.xls;SQLLevel=0; -Microsoft Excel-Treiber (*.xls) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.xls;SQLLevel=0; -Driver do Microsoft Excel(*.xls) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.xls;SQLLevel=0; -Microsoft Paradox Driver (*.db ) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.db;SQLLevel=0; -Microsoft Paradox-Treiber (*.db ) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.db;SQLLevel=0; -Driver do Microsoft Paradox (*.db ) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.db;SQLLevel=0; -Microsoft Text Driver (*.txt; *.csv) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.,*.asc,*.csv,*.tab,*.txt,*.csv;SQLLevel=0; -Microsoft Text-Treiber (*.txt; *.csv) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.,*.asc,*.csv,*.tab,*.txt,*.csv;SQLLevel=0; -Driver da Microsoft para arquivos texto (*.txt; *.csv) UsageCount=1;APILevel=1;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.,*.asc,*.csv,*.tab,*.txt,*.csv;SQLLevel=0; -Microsoft Visual FoxPro Driver UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Microsoft FoxPro VFP Driver (*.dbf) UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Microsoft dBase VFP Driver (*.dbf) UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Microsoft Visual FoxPro-Treiber UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -Driver para o Microsoft Visual FoxPro UsageCount=1;APILevel=0;ConnectFunctions=YYN;DriverODBCVer=02.50;FileUsage=1;FileExtns=*.dbf,*.cdx,*.idx,*.fpt;SQLLevel=0; -SQL Native Client UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=09.00;FileUsage=0;SQLLevel=1; -CR Sybase Wire Protocol ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=0;SQLLevel=0;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -CR SQL Server Native Wire Protocol ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=0;SQLLevel=1;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -CR SQL Server Classic Wire Protocol ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=0;SQLLevel=1;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -CR TextFile ODBC Driver 6.0 UsageCount=1;APILevel=1;ConnectFunctions=YYY;DriverODBCVer=3.52;FileUsage=1;FileExtns=*.*;SQLLevel=0;CPTimeout=60;HelpRootDirectory=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\help; -PLUGODBC_Driver UsageCount=1; -SDB_ODBC_Driver UsageCount=2; -Microsoft Access Text Driver (*.txt, *.csv) SQLLevel=0;FileExtns=*.txt, *.csv;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx) SQLLevel=0;FileExtns=*.dbf, *.ndx, *.mdx;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb) SQLLevel=0;FileExtns=*.xls,*.xlsx, *.xlsb;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -Microsoft Access Driver (*.mdb, *.accdb) SQLLevel=0;FileExtns=*.mdb,*.accdb;FileUsage=2;DriverODBCVer=02.50;ConnectFunctions=YYN;APILevel=1;UsageCount=3; -SQLite3 ODBC Driver UsageCount=1; -SQLite ODBC Driver UsageCount=1; -SQLite ODBC (UTF-8) Driver UsageCount=1; +SQL Server APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.50;FileUsage=0;SQLLevel=1;UsageCount=1; Oracle in XE ConnectionFunctions=YYY;DriverODBCVer=03.51;CPTimeout=60;FileUsage=0;APILevel=1;SQLLevel=1; -Oracle in instantclient_12_1 APILevel=1;ConnectionFunctions=YYY;CPTimeout=60;DriverODBCVer=03.51;FileUsage=0;SQLLevel=1; -PostgreSQL ODBC Driver(ANSI) APILevel=1;ConnectFunctions=YYN;DriverODBCVer=09.02.0100;FileUsage=0;SQLLevel=1; -PostgreSQL ODBC Driver(UNICODE) APILevel=1;ConnectFunctions=YYN;DriverODBCVer=09.02.0100;FileUsage=0;SQLLevel=1; SQL Server Native Client 11.0 UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.80;FileUsage=0;SQLLevel=1; -MariaDB ODBC 1.0 Driver UsageCount=1; +ODBC Driver 13 for SQL Server UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.80;FileUsage=0;SQLLevel=1; +SQL Server Native Client RDA 11.0 UsageCount=1;APILevel=2;ConnectFunctions=YYY;CPTimeout=60;DriverODBCVer=03.80;FileUsage=0;SQLLevel=1; Firebird/InterBase(r) driver UsageCount=1;FileExtns=*.fdb,*.gdb;APILevel=1;ConnectFunctions=YYY;FileUsage=0;DriverODBCVer=03.51;SQLLevel=1; -MySQL ODBC 5.3 ANSI Driver UsageCount=1; -MySQL ODBC 5.3 Unicode Driver UsageCount=1; DROP TABLE t1; CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=ODBC CATFUNC=Tables CONNECTION='Not important'; SHOW CREATE TABLE t1; @@ -154,9 +99,9 @@ EMP_NO FIRST_NAME LAST_NAME PHONE_EXT HIRE_DATE DEPT_NO JOB_CODE JOB_GRADE JOB_C 113 Mary Page 845 1993-04-12 00:00:00 671 Eng 4 USA 48000.00 Page, Mary 114 Bill Parker 247 1993-06-01 00:00:00 623 Eng 5 USA 35000.00 Parker, Bill 118 Takashi Yamamoto 23 1993-07-01 00:00:00 115 SRep 4 Japan 7480000.00 Yamamoto, Takashi -121 Roberto Ferrari 1 1993-07-12 00:00:00 125 SRep 4 Italy 99000000.00 Ferrari, Roberto +121 Roberto Ferrari 1 1993-07-12 00:00:00 125 SRep 4 Italy 33000.00 Ferrari, Roberto 127 Michael Yanowski 492 1993-08-09 00:00:00 100 SRep 4 USA 44000.00 Yanowski, Michael -134 Jacques Glon NULL 1993-08-23 00:00:00 123 SRep 4 France 390500.00 Glon, Jacques +134 Jacques Glon NULL 1993-08-23 00:00:00 123 SRep 4 France 38500.00 Glon, Jacques 136 Scott Johnson 265 1993-09-13 00:00:00 623 Doc 3 USA 60000.00 Johnson, Scott 138 T.J. Green 218 1993-11-01 00:00:00 621 Eng 4 USA 36000.00 Green, T.J. 141 Pierre Osborne NULL 1994-01-03 00:00:00 121 SRep 4 Switzerland 110000.00 Osborne, Pierre diff --git a/storage/connect/mysql-test/connect/t/mongo_test.inc b/storage/connect/mysql-test/connect/t/mongo_test.inc index c728b85fd2f907b40303e36fface8b6c8bfa07aa..dfc223e9074a72a5ebe5a2cf08216b58ee597527 100644 --- a/storage/connect/mysql-test/connect/t/mongo_test.inc +++ b/storage/connect/mysql-test/connect/t/mongo_test.inc @@ -1,4 +1,4 @@ -set connect_enable_mongo=1; +#set connect_enable_mongo=1; --echo # --echo # Test the MONGO table type @@ -156,7 +156,7 @@ eval CREATE TABLE t1 ( loc_1 char(12) NOT NULL `FIELD_FORMAT`='loc.1', pop int(11) NOT NULL, state char(2) NOT NULL) -ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE='MONGO' TABNAME='cities' +ENGINE=CONNECT CONNECTION='mongodb://localhost:27017' TABLE_TYPE=$TYPE TABNAME='cities' OPTION_LIST='Driver=$DRV,Version=$VERS' $CONN DATA_CHARSET='utf8'; --echo # Using SQL for grouping SELECT state, sum(pop) AS totalPop FROM t1 GROUP BY state HAVING totalPop >= 10000000 ORDER BY totalPop DESC; @@ -204,4 +204,4 @@ SELECT * FROM t1; DROP TABLE t1; --exec $MONGO --eval "db.testcoll.drop()" --quiet -set connect_enable_mongo=0; +#set connect_enable_mongo=0; diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index 25da31625163f051e2c13fa089bb97375d755133..0a6507315db025609c07f5753ddc0d55c7db00ed 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -38,6 +38,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include "my_global.h" +#include "my_pthread.h" #if defined(__WIN__) #include #include @@ -71,12 +72,12 @@ #ifdef ZIP_SUPPORT #include "filamzip.h" #endif // ZIP_SUPPORT -#ifdef JDBC_SUPPORT +#ifdef JAVA_SUPPORT #include "javaconn.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #ifdef CMGO_SUPPORT #include "cmgoconn.h" -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT /***********************************************************************/ /* DB static variables. */ @@ -952,20 +953,20 @@ int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all) fp->File = NULL; break; #endif // ZIP_SUPPORT -#ifdef JDBC_SUPPORT +#ifdef JAVA_SUPPORT case TYPE_FB_JAVA: ((JAVAConn*)fp->File)->Close(); fp->Count = 0; fp->File = NULL; break; -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #ifdef CMGO_SUPPORT case TYPE_FB_MONGO: ((CMgoConn*)fp->File)->Close(); fp->Count = 0; fp->File = NULL; break; -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT default: rc = RC_FX; } // endswitch Type diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp index d63674e2e3607cac0ac086802df8e6d97731e034..0855e26570441fd5197f7e9bf1c2b1f746424fea 100644 --- a/storage/connect/plugutil.cpp +++ b/storage/connect/plugutil.cpp @@ -162,7 +162,7 @@ PGLOBAL PlugInit(LPCSTR Language, uint worksize) /*******************************************************************/ if (worksize && !(g->Sarea = PlugAllocMem(g, worksize))) { char errmsg[MAX_STR]; - sprintf(errmsg, MSG(WORK_AREA), g->Message); + snprintf(errmsg, sizeof(errmsg) - 1, MSG(WORK_AREA), g->Message); strcpy(g->Message, errmsg); g->Sarea_Size = 0; } else diff --git a/storage/connect/preparse.h b/storage/connect/preparse.h index 3db7a2af1cd7088ded2adc397359450d71864797..f16624548fb7491372930fdf75e442a73905e85a 100644 --- a/storage/connect/preparse.h +++ b/storage/connect/preparse.h @@ -8,7 +8,7 @@ /***********************************************************************/ typedef struct _datpar { const char *Format; // Points to format to decode - const char *Curp; // Points to current parsing position + char *Curp; // Points to current parsing position char *InFmt; // Start of input format char *OutFmt; // Start of output format int Index[8]; // Indexes of date values diff --git a/storage/connect/rcmsg.c b/storage/connect/rcmsg.c index 75759e033149308657d8c687b8c3c9f5aae98438..895f8f5862bfccc4fc7610a39c2a5ba42e173d20 100644 --- a/storage/connect/rcmsg.c +++ b/storage/connect/rcmsg.c @@ -27,9 +27,9 @@ char *msglang(void); -char *GetMsgid(int id) +const char *GetMsgid(int id) { - char *p = NULL; + const char *p = NULL; // This conditional until a real fix is found for MDEV-7304 #if defined(FRENCH) @@ -55,7 +55,8 @@ char *GetMsgid(int id) int GetRcString(int id, char *buf, int bufsize) { - char *p = NULL, msg[32]; + const char *p = NULL; + char msg[32]; if (!(p = GetMsgid(id))) { sprintf(msg, "ID=%d unknown", id); diff --git a/storage/connect/rcmsg.h b/storage/connect/rcmsg.h index b22e77f51756dbff8075e586b2c70c3339d519fe..499ca3b2dd43436852fcaa333f50ef88de95fa7f 100644 --- a/storage/connect/rcmsg.h +++ b/storage/connect/rcmsg.h @@ -5,7 +5,7 @@ extern "C" { #endif -char *GetMsgid(int id); +const char *GetMsgid(int id); int GetRcString(int id, char *buf, int bufsize); #ifdef __cplusplus diff --git a/storage/connect/reldef.h b/storage/connect/reldef.h index 84ae2a491f0382c0135adf83a24d3ffaa8ba99c8..f8256a59b3d67279a7680f7a144909dc99986960 100644 --- a/storage/connect/reldef.h +++ b/storage/connect/reldef.h @@ -11,7 +11,7 @@ #include "block.h" #include "catalog.h" -#include "my_sys.h" +//#include "my_sys.h" #include "mycat.h" typedef class INDEXDEF *PIXDEF; @@ -114,7 +114,7 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */ int Sort; /* Table already sorted ??? */ int Multiple; /* 0: No 1: DIR 2: Section 3: filelist */ int Degree; /* Number of columns in the table */ - int Pseudo; /* Bit: 1 ROWID }Ok, 2 FILEID Ok */ + int Pseudo; /* Bit: 1 ROWID }Ok, 2 FILEID Ok */ bool Read_Only; /* true for read only tables */ const CHARSET_INFO *m_data_charset; const char *csname; /* Table charset name */ diff --git a/storage/connect/tabjmg.cpp b/storage/connect/tabjmg.cpp index 50efd7276042608182b92bd20f7989202ea3314d..ba3e1c3e7c05daecea123544cda11cbb081b674b 100644 --- a/storage/connect/tabjmg.cpp +++ b/storage/connect/tabjmg.cpp @@ -73,9 +73,10 @@ bool JMGDISC::ColDesc(PGLOBAL g, jobject obj, char *pcn, char *pfmt, int ncol, int k) { const char *key; - char colname[65]; - char fmt[129]; - bool rc = true; + char colname[65]; + char fmt[129]; + bool rc = true; + size_t z; jint *n = nullptr; jstring jkey; jobject jres; @@ -105,14 +106,16 @@ bool JMGDISC::ColDesc(PGLOBAL g, jobject obj, char *pcn, char *pfmt, if (pcn) { strncpy(colname, pcn, 64); colname[64] = 0; - strncat(strncat(colname, "_", 65), key, 65); + z = 65 - strlen(colname); + strncat(strncat(colname, "_", z), key, z - 1); } else strcpy(colname, key); if (pfmt) { strncpy(fmt, pfmt, 128); fmt[128] = 0; - strncat(strncat(fmt, ".", 129), key, 129); + z = 129 - strlen(fmt); + strncat(strncat(fmt, ".", z), key, z - 1); } else strcpy(fmt, key); @@ -178,7 +181,7 @@ TDBJMG::TDBJMG(PMGODEF tdp) : TDBEXT(tdp) Ops.User = NULL; Ops.Pwd = NULL; Ops.Scrollable = false; - Ops.Fsize = Ops.CheckSize(Rows); + Ops.Fsize = 0; Fpos = -1; N = 0; Done = false; diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 401441520da8b71fa8aea0e08a4b513548afea2e..8778b7d4b4703c4dfde2f1fa3824e09cd454fe3a 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -31,14 +31,12 @@ #if defined(ZIP_SUPPORT) #include "filamzip.h" #endif // ZIP_SUPPORT -#if defined(MONGO_SUPPORT) -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) #include "jmgfam.h" -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #if defined(CMGO_SUPPORT) #include "cmgfam.h" #endif // CMGO_SUPPORT -#endif // MONGO_SUPPORT #include "tabmul.h" #include "checklvl.h" #include "resource.h" @@ -149,7 +147,7 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) tdp->Fn, tdp->Objname, tdp->Pretty, lvl); if (tdp->Uri) { -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) tdp->Collname = GetStringTableOption(g, topt, "Name", NULL); tdp->Collname = GetStringTableOption(g, topt, "Tabname", tdp->Collname); tdp->Schema = GetStringTableOption(g, topt, "Dbname", "test"); @@ -157,10 +155,8 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) tdp->Pipe = GetBooleanTableOption(g, topt, "Pipeline", false); tdp->Driver = (PSZ)GetStringTableOption(g, topt, "Driver", NULL); tdp->Version = GetIntegerTableOption(g, topt, "Version", 3); -#if defined(JDBC_SUPPORT) tdp->Wrapname = (PSZ)GetStringTableOption(g, topt, "Wrapper", (tdp->Version == 2) ? "Mongo2Interface" : "Mongo3Interface"); -#endif // JDBC_SUPPORT tdp->Pretty = 0; #else // !MONGO_SUPPORT sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); @@ -201,7 +197,6 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) return NULL; #endif // !ZIP_SUPPORT } else if (tdp->Uri) { -#if defined(MONGO_SUPPORT) if (tdp->Driver && toupper(*tdp->Driver) == 'C') { #if defined(CMGO_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp)); @@ -210,7 +205,7 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) return NULL; #endif } else if (tdp->Driver && toupper(*tdp->Driver) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); #else sprintf(g->Message, "Mongo %s Driver not available", "Java"); @@ -219,14 +214,14 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info) } else { // Driver not specified #if defined(CMGO_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp)); -#else +#elif defined(JAVA_SUPPORT) tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); +#else + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); + return NULL; #endif } // endif Driver -#else - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); - return NULL; -#endif // MONGO_SUPPORT + } else tjnp = new(g) TDBJSN(tdp, new(g) DOSFAM(tdp)); @@ -497,16 +492,12 @@ JSONDEF::JSONDEF(void) Base = 0; Strict = false; Sep = '.'; -#if defined(MONGO_SUPPORT) Uri = NULL; Collname = Options = Filter = NULL; Pipe = false; Driver = NULL; Version = 0; -#if defined(JDBC_SUPPORT) Wrapname = NULL; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT } // end of JSONDEF constructor /***********************************************************************/ @@ -524,7 +515,7 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Sep = *GetStringCatInfo(g, "Separator", "."); if (Uri = GetStringCatInfo(g, "Connect", NULL)) { -#if defined(MONGO_SUPPORT) +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) Collname = GetStringCatInfo(g, "Name", (Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name); Collname = GetStringCatInfo(g, "Tabname", Collname); @@ -534,12 +525,12 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Driver = GetStringCatInfo(g, "Driver", NULL); Version = GetIntCatInfo("Version", 3); Pretty = 0; -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) if (Version == 2) Wrapname = GetStringCatInfo(g, "Wrapper", "Mongo2Interface"); else Wrapname = GetStringCatInfo(g, "Wrapper", "Mongo3Interface"); -#endif // JDBC_SUPPORT +#endif // JAVA_SUPPORT #else // !MONGO_SUPPORT sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); return true; @@ -569,7 +560,6 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) (m == MODE_UPDATE || m == MODE_DELETE)); if (Uri) { -#if defined(MONGO_SUPPORT) if (Driver && toupper(*Driver) == 'C') { #if defined(CMGO_SUPPORT) txfp = new(g) CMGFAM(this); @@ -578,7 +568,7 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) return NULL; #endif } else if (Driver && toupper(*Driver) == 'J') { -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) txfp = new(g) JMGFAM(this); #else sprintf(g->Message, "Mongo %s Driver not available", "Java"); @@ -587,14 +577,14 @@ PTDB JSONDEF::GetTable(PGLOBAL g, MODE m) } else { // Driver not specified #if defined(CMGO_SUPPORT) txfp = new(g) CMGFAM(this); -#else +#elif defined(JAVA_SUPPORT) txfp = new(g) JMGFAM(this); -#endif +#else // !MONGO_SUPPORT + sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); + return NULL; +#endif // !MONGO_SUPPORT } // endif Driver -#else - sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); - return NULL; -#endif // MONGO_SUPPORT + } else if (Zipped) { #if defined(ZIP_SUPPORT) if (m == MODE_READ || m == MODE_ANY || m == MODE_ALTER) { @@ -1591,8 +1581,7 @@ PVAL JSONCOL::ExpandArray(PGLOBAL g, PJAR arp, int n) /***********************************************************************/ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) { -//int i, ars, nv = 0, nextsame = Tjp->NextSame; - int i, nv = 0, nextsame = Tjp->NextSame; + int i, ars, nv = 0, nextsame = Tjp->NextSame; bool err; OPVAL op = Nodes[n].Op; PVAL val[2], vp = Nodes[n].Valp; @@ -1600,12 +1589,18 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) JVALUE jval; vp->Reset(); -//ars = MY_MIN(Tjp->Limit, arp->size()); + ars = MY_MIN(Tjp->Limit, arp->size()); + + if (trace) + htrc("CalculateArray: size=%d op=%d nextsame=%d\n", + ars, op, nextsame); -//for (i = 0; i < ars; i++) { - for (i = 0; i < arp->size(); i++) { + for (i = 0; i < ars; i++) { jvrp = arp->GetValue(i); + if (trace) + htrc("i=%d nv=%d\n", i, nv); + if (!jvrp->IsNull() || (op == OP_CNC && GetJsonNull())) do { if (jvrp->IsNull()) { jvrp->Value = AllocateValue(g, GetJsonNull(), TYPE_STRING); @@ -1617,13 +1612,16 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) } else jvp = jvrp; - if (!nv++) { + if (trace) + htrc("jvp=%s null=%d\n", + jvp->GetString(g), jvp->IsNull() ? 1 : 0); + + if (!nv++) { SetJsonValue(g, vp, jvp, n); continue; } else SetJsonValue(g, MulVal, jvp, n); - -// if (!MulVal->IsZero()) { + if (!MulVal->IsNull()) { switch (op) { case OP_CNC: @@ -1634,7 +1632,7 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) val[0] = MulVal; err = vp->Compute(g, val, 1, op); - break; + break; // case OP_NUM: case OP_SEP: val[0] = Nodes[n].Valp; @@ -1650,7 +1648,15 @@ PVAL JSONCOL::CalculateArray(PGLOBAL g, PJAR arp, int n) if (err) vp->Reset(); - } // endif Null + if (trace) { + char buf(32); + + htrc("vp='%s' err=%d\n", + vp->GetCharString(&buf), err ? 1 : 0); + + } // endif trace + + } // endif Null } while (Tjp->NextSame > nextsame); diff --git a/storage/connect/tabjson.h b/storage/connect/tabjson.h index 00e2f4614e72f43a5dcbeeb022ddf94d2893c027..17583cba333f4cbe57dbe4859d6e4c417c342cd9 100644 --- a/storage/connect/tabjson.h +++ b/storage/connect/tabjson.h @@ -36,14 +36,12 @@ class DllExport JSONDEF : public DOSDEF { /* Table description */ friend class TDBJSON; friend class TDBJSN; friend class TDBJCL; -#if defined(MONGO_SUPPORT) #if defined(CMGO_SUPPORT) friend class CMGFAM; #endif // CMGO_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) friend class JMGFAM; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT friend PQRYRES JSONColumns(PGLOBAL, PCSZ, PCSZ, PTOS, bool); public: // Constructor @@ -68,17 +66,13 @@ class DllExport JSONDEF : public DOSDEF { /* Table description */ bool Strict; /* Strict syntax checking */ char Sep; /* The Jpath separator */ const char *Uri; /* MongoDB connection URI */ -#if defined(MONGO_SUPPORT) PCSZ Collname; /* External collection name */ PSZ Options; /* Colist ; Pipe */ PSZ Filter; /* Filter */ PSZ Driver; /* MongoDB Driver (C or JAVA) */ bool Pipe; /* True if Colist is a pipeline */ int Version; /* Driver version */ -#if defined(JDBC_SUPPORT) PSZ Wrapname; /* MongoDB java wrapper name */ -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT }; // end of JSONDEF /* -------------------------- TDBJSN class --------------------------- */ @@ -90,14 +84,12 @@ class DllExport JSONDEF : public DOSDEF { /* Table description */ class DllExport TDBJSN : public TDBDOS { friend class JSONCOL; friend class JSONDEF; -#if defined(MONGO_SUPPORT) #if defined(CMGO_SUPPORT) friend class CMGFAM; #endif // CMGO_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) friend class JMGFAM; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT public: // Constructor TDBJSN(PJDEF tdp, PTXF txfp); @@ -162,14 +154,12 @@ class DllExport TDBJSN : public TDBDOS { class DllExport JSONCOL : public DOSCOL { friend class TDBJSN; friend class TDBJSON; -#if defined(MONGO_SUPPORT) #if defined(CMGO_SUPPORT) friend class CMGFAM; #endif // CMGO_SUPPORT -#if defined(JDBC_SUPPORT) +#if defined(JAVA_SUPPORT) friend class JMGFAM; -#endif // JDBC_SUPPORT -#endif // MONGO_SUPPORT +#endif // JAVA_SUPPORT public: // Constructors JSONCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i); diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp index 5c41f9094aca871815c655c78f3d1bb19126ac51..0967afca6cdf933f49074d5cbf532028c94d4316 100644 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -203,12 +203,12 @@ bool TDBMUL::InitFileNames(PGLOBAL g) // Data files can be imported from Windows (having CRLF) if (*p == '\n' || *p == '\r') { // is this enough for Unix ??? - *p--; // Eliminate ending CR or LF character + p--; // Eliminate ending CR or LF character if (p >= filename) // is this enough for Unix ??? if (*p == '\n' || *p == '\r') - *p--; // Eliminate ending CR or LF character + p--; // Eliminate ending CR or LF character } // endif p diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp index bb7eae9c2567704126588587fc3492f937ce20cf..d3fb31fb57a6e6e24e57a67692bb21e423fd7755 100644 --- a/storage/connect/tabtbl.cpp +++ b/storage/connect/tabtbl.cpp @@ -650,7 +650,7 @@ bool TDBTBM::IsLocal(PTABLE tbp) return ((!stricmp(tdbp->Host, "localhost") || !strcmp(tdbp->Host, "127.0.0.1")) && - tdbp->Port == GetDefaultPort()); + tdbp->Port == (int)GetDefaultPort()); } // end of IsLocal /***********************************************************************/ diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index af77c87ef8d23d66e48fbee049570659bc5b2287..5d8d7c1b9f86c85acddd3ee9c1d875aea940b739 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -120,7 +120,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, FLD_REM, FLD_NO, FLD_CHARSET}; unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32}; PCSZ fmt; - char *pn, *tn, *fld, *colname, v; //, *chset; + char *pn, *tn, *fld, *colname, v; // *chset int i, n, ncol = sizeof(buftyp) / sizeof(int); int prec, len, type, scale; int zconv = GetConvSize(); @@ -185,7 +185,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, colname = (char *)fp->field_name; crp->Kdata->SetValue(colname, i); -// chset = (char *)fp->charset()->name; +// chset = (char *)fp->charset()->name; // v = (!strcmp(chset, "binary")) ? 'B' : 0; v = 0; diff --git a/storage/connect/tabxml.h b/storage/connect/tabxml.h index 813f62dde524e4ee4e2885210d6cf27cd3eae596..f55b7d98de7834196a9d225c1677929b4aa2b462 100644 --- a/storage/connect/tabxml.h +++ b/storage/connect/tabxml.h @@ -53,6 +53,8 @@ class DllExport XMLDEF : public TABDEF { /* Logical table description */ }; // end of XMLDEF #if defined(INCLUDE_TDBXML) +#include "m_ctype.h" + /***********************************************************************/ /* This is the class declaration for the simple XML tables. */ /***********************************************************************/ diff --git a/storage/connect/valblk.h b/storage/connect/valblk.h index a3d7bf30fcf07ad9986333d4fee25f36b63f17fb..ad9701058684b451ac91d22589309fc42fa671ae 100644 --- a/storage/connect/valblk.h +++ b/storage/connect/valblk.h @@ -40,7 +40,7 @@ class MBVALS : public BLOCK { // Methods void *GetMemp(void) {return Mblk.Memp;} PVBLK Allocate(PGLOBAL g, int type, int len, int prec, - int n, bool sub = FALSE); + int n, bool sub = false); bool ReAllocate(PGLOBAL g, int n); void Free(void); diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index f08d18b54218050ef89dcaaf02371918a67228af..74a3a1f807518629525e838d82130e4f4b71b076 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -1374,7 +1374,7 @@ bool TYPVAL::SetValue_char(const char *cp, int n) } else if (cp != Strp) { const char *p = cp + n - 1; - for (p; p >= cp; p--, n--) + for (; p >= cp; p--, n--) if (*p && *p != ' ') break; @@ -1656,38 +1656,48 @@ bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op) char *p[2], val[2][32]; int i; - for (i = 0; i < np; i++) - p[i] = vp[i]->IsNull() ? NULL : vp[i]->GetCharString(val[i]); + if (trace) + htrc("Compute: np=%d op=%d\n", np, op); - if (p[i]) { - switch (op) { - case OP_CNC: - assert(np == 1 || np == 2); + for (i = 0; i < np; i++) + if (!vp[i]->IsNull()) { + p[i] = vp[i]->GetCharString(val[i]); - if (np == 2) - SetValue_psz(p[0]); + if (trace) + htrc("p[%d]=%s\n", i, p[i]); - if ((i = Len - (signed)strlen(Strp)) > 0) - strncat(Strp, p[np - 1], i); + } else + return false; - break; - case OP_MIN: - assert(np == 2); - SetValue_psz((strcmp(p[0], p[1]) < 0) ? p[0] : p[1]); - break; - case OP_MAX: - assert(np == 2); - SetValue_psz((strcmp(p[0], p[1]) > 0) ? p[0] : p[1]); - break; - default: - // sprintf(g->Message, MSG(BAD_EXP_OPER), op); - strcpy(g->Message, "Function not supported"); - return true; - } // endswitch op + switch (op) { + case OP_CNC: + assert(np == 1 || np == 2); - Null = false; - } // endif p[i] + if (np == 2) + SetValue_psz(p[0]); + if ((i = Len - (signed)strlen(Strp)) > 0) + strncat(Strp, p[np - 1], i); + + if (trace) + htrc("Strp=%s\n", Strp); + + break; + case OP_MIN: + assert(np == 2); + SetValue_psz((strcmp(p[0], p[1]) < 0) ? p[0] : p[1]); + break; + case OP_MAX: + assert(np == 2); + SetValue_psz((strcmp(p[0], p[1]) > 0) ? p[0] : p[1]); + break; + default: + // sprintf(g->Message, MSG(BAD_EXP_OPER), op); + strcpy(g->Message, "Function not supported"); + return true; + } // endswitch op + + Null = false; return false; } // end of Compute diff --git a/storage/connect/value.h b/storage/connect/value.h index f771d33dc52f3334ec0bf7124e47db76da4bef90..6613e25100a594f1bd4326cdf44f70dae11ee818 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -102,7 +102,7 @@ class DllExport VALUE : public BLOCK { virtual bool SetValue_pval(PVAL valp, bool chktype = false) = 0; virtual bool SetValue_char(const char *p, int n) = 0; virtual void SetValue_psz(PCSZ s) = 0; - virtual void SetValue_bool(bool) {assert(FALSE);} + virtual void SetValue_bool(bool) {assert(false);} virtual int CompareValue(PVAL vp) = 0; virtual BYTE TestValue(PVAL vp); virtual void SetValue(char) {assert(false);} diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index ebef7a2549a0962efd20bf708867d2b026a58bcb..bc9265e0223e94bb671f319863216a04338f2fbf 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -16,7 +16,7 @@ #include "assert.h" #include "block.h" #include "colblk.h" -#include "m_ctype.h" +//#include "m_ctype.h" #include "reldef.h" typedef class CMD *PCMD; diff --git a/storage/federatedx/federatedx_io_mysql.cc b/storage/federatedx/federatedx_io_mysql.cc index 54059c0ecff4d5bb3765bde0d34459cb368a28c4..2068716eebadb97d6794841d8d2d56f36a9ba420 100644 --- a/storage/federatedx/federatedx_io_mysql.cc +++ b/storage/federatedx/federatedx_io_mysql.cc @@ -265,9 +265,8 @@ ulong federatedx_io_mysql::savepoint_release(ulong sp) savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *); if (savept->level < sp) break; - if ((savept->flags & (SAVEPOINT_REALIZED | - SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED) - last= savept; + if ((savept->flags & (SAVEPOINT_REALIZED | SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED) + last= savept; savepoints.elements--; } @@ -293,8 +292,8 @@ ulong federatedx_io_mysql::savepoint_rollback(ulong sp) while (savepoints.elements) { savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *); - if (savept->level <= sp) - break; + if (savept->level <= sp) + break; savepoints.elements--; } diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index e348e6b300270828d4f862d05e1577d81233be5f..841b14e76f43be2f19dba2b092049d0141a058f9 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/storage/innobase/btr/btr0btr.cc @@ -2052,7 +2052,7 @@ btr_page_reorganize_low( "InnoDB: Error: page old max ins size %lu" " new max ins size %lu\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (unsigned long) data_size1, (unsigned long) data_size2, (unsigned long) max_ins_size1, (unsigned long) max_ins_size2); diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 5597a08552571aba3f06bda7d5272ae260efd665..bb010190af744b360c8c50d58cafeaf2ef8277eb 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -3433,7 +3433,6 @@ btr_cur_pessimistic_delete( ulint n_reserved = 0; ibool success; ibool ret = FALSE; - ulint level; mem_heap_t* heap; ulint* offsets; @@ -3484,6 +3483,10 @@ btr_cur_pessimistic_delete( #endif /* UNIV_ZIP_DEBUG */ } + if (flags == 0) { + lock_update_delete(block, rec); + } + if (UNIV_UNLIKELY(page_get_n_recs(page) < 2) && UNIV_UNLIKELY(dict_index_get_page(index) != buf_block_get_page_no(block))) { @@ -3498,13 +3501,7 @@ btr_cur_pessimistic_delete( goto return_after_reservations; } - if (flags == 0) { - lock_update_delete(block, rec); - } - - level = btr_page_get_level(page, mtr); - - if (level > 0 + if (!page_is_leaf(page) && UNIV_UNLIKELY(rec == page_rec_get_next( page_get_infimum_rec(page)))) { @@ -3527,6 +3524,7 @@ btr_cur_pessimistic_delete( on a page, we have to change the father node pointer so that it is equal to the new leftmost node pointer on the page */ + ulint level = btr_page_get_level(page, mtr); btr_node_ptr_delete(index, block, mtr); diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 46df26922b549531a27c43489a9c28056c2263e3..7267028339fcf85ff0ac9f39b29e4c327922c813 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -731,6 +731,7 @@ buf_page_is_corrupted( const void* space) #endif { + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", return(TRUE); ); ulint checksum_field1 = 0; ulint checksum_field2 = 0; #ifndef UNIV_INNOCHECKSUM @@ -844,8 +845,6 @@ buf_page_is_corrupted( return(false); } - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", return(true); ); - #ifndef UNIV_INNOCHECKSUM ulint page_no = mach_read_from_4(read_buf + FIL_PAGE_OFFSET); #endif @@ -3060,8 +3059,8 @@ buf_page_get_gen( ib_mutex_t* fix_mutex = NULL; buf_pool_t* buf_pool = buf_pool_get(space, offset); - ut_ad(mtr); - ut_ad(mtr->state == MTR_ACTIVE); + ut_ad((mtr == NULL) == (mode == BUF_EVICT_IF_IN_POOL)); + ut_ad(!mtr || mtr->state == MTR_ACTIVE); ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH) || (rw_latch == RW_NO_LATCH)); @@ -3072,23 +3071,29 @@ buf_page_get_gen( #ifdef UNIV_DEBUG switch (mode) { + case BUF_EVICT_IF_IN_POOL: + /* After DISCARD TABLESPACE, the tablespace would not exist, + but in IMPORT TABLESPACE, PageConverter::operator() must + replace any old pages, which were not evicted during DISCARD. + Skip the assertion on zip_size. */ + break; case BUF_GET_NO_LATCH: ut_ad(rw_latch == RW_NO_LATCH); - break; + /* fall through */ case BUF_GET: case BUF_GET_IF_IN_POOL: case BUF_PEEK_IF_IN_POOL: case BUF_GET_IF_IN_POOL_OR_WATCH: case BUF_GET_POSSIBLY_FREED: + ut_ad(zip_size == fil_space_get_zip_size(space)); break; default: ut_error; } #endif /* UNIV_DEBUG */ - ut_ad(zip_size == fil_space_get_zip_size(space)); ut_ad(ut_is_2pow(zip_size)); #ifndef UNIV_LOG_DEBUG - ut_ad(!ibuf_inside(mtr) + ut_ad(!mtr || !ibuf_inside(mtr) || ibuf_page_low(space, zip_size, offset, FALSE, file, line, NULL)); #endif @@ -3153,9 +3158,11 @@ buf_page_get_gen( rw_lock_x_unlock(hash_lock); } - if (mode == BUF_GET_IF_IN_POOL - || mode == BUF_PEEK_IF_IN_POOL - || mode == BUF_GET_IF_IN_POOL_OR_WATCH) { + switch (mode) { + case BUF_GET_IF_IN_POOL: + case BUF_GET_IF_IN_POOL_OR_WATCH: + case BUF_PEEK_IF_IN_POOL: + case BUF_EVICT_IF_IN_POOL: #ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX)); ut_ad(!rw_lock_own(hash_lock, RW_LOCK_SHARED)); @@ -3244,8 +3251,10 @@ buf_page_get_gen( ut_ad(page_zip_get_size(&block->page.zip) == zip_size); - if (mode == BUF_GET_IF_IN_POOL || mode == BUF_PEEK_IF_IN_POOL) { - + switch (mode) { + case BUF_GET_IF_IN_POOL: + case BUF_PEEK_IF_IN_POOL: + case BUF_EVICT_IF_IN_POOL: bool must_read; { @@ -3274,6 +3283,19 @@ buf_page_get_gen( buf_page_t* bpage; case BUF_BLOCK_FILE_PAGE: + if (UNIV_UNLIKELY(mode == BUF_EVICT_IF_IN_POOL)) { +evict_from_pool: + ut_ad(!fix_block->page.oldest_modification); + buf_pool_mutex_enter(buf_pool); + buf_block_unfix(fix_block); + + if (!buf_LRU_free_page(&fix_block->page, true)) { + ut_ad(0); + } + + buf_pool_mutex_exit(buf_pool); + return(NULL); + } break; case BUF_BLOCK_ZIP_PAGE: @@ -3306,6 +3328,10 @@ buf_page_get_gen( goto loop; } + if (UNIV_UNLIKELY(mode == BUF_EVICT_IF_IN_POOL)) { + goto evict_from_pool; + } + /* Buffer-fix the block so that it cannot be evicted or relocated while we are attempting to allocate an uncompressed page. */ @@ -4849,7 +4875,7 @@ buf_page_io_complete(buf_page_t* bpage, bool evict) if (err != DB_SUCCESS) { /* Not a real corruption if it was triggered by error injection */ - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", if (bpage->space > TRX_SYS_SPACE) { buf_mark_space_corrupt(bpage); ib_logf(IB_LOG_LEVEL_INFO, @@ -4905,7 +4931,7 @@ buf_page_io_complete(buf_page_t* bpage, bool evict) } } - DBUG_EXECUTE_IF("buf_page_is_corrupt_failure", + DBUG_EXECUTE_IF("buf_page_import_corrupt_failure", page_not_corrupt: bpage = bpage; ); if (recv_recovery_is_on()) { diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 31feb322826a1f7e152307ca4224e5937edfefe3..dacddfca385f0bc266bfefe96e6340975af5d944 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -715,7 +715,6 @@ buf_flush_update_zip_checksum( srv_checksum_algorithm))); mach_write_to_8(page + FIL_PAGE_LSN, lsn); - memset(page + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8); mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum); } @@ -894,8 +893,6 @@ buf_flush_write_block_low( bpage->newest_modification); ut_a(page_zip_verify_checksum(frame, zip_size)); - - memset(frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8); break; case BUF_BLOCK_FILE_PAGE: frame = bpage->zip.data; diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 8c2b5df4bcecf4af6c2f786533687d211f0f0c3c..a047b28f4fd08c59450b1e29f70a608b3d5a0425 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -528,26 +528,20 @@ buf_flush_or_remove_page( return(processed); } -/******************************************************************//** -Remove all dirty pages belonging to a given tablespace inside a specific +/** Remove all dirty pages belonging to a given tablespace inside a specific buffer pool instance when we are deleting the data file(s) of that tablespace. The pages still remain a part of LRU and are evicted from the list as they age towards the tail of the LRU. +@param[in,out] buf_pool buffer pool +@param[in] id tablespace identifier +@param[in] trx transaction (to check for interrupt), + or NULL if the files should not be written to @retval DB_SUCCESS if all freed @retval DB_FAIL if not all freed @retval DB_INTERRUPTED if the transaction was interrupted */ static MY_ATTRIBUTE((nonnull(1), warn_unused_result)) dberr_t -buf_flush_or_remove_pages( -/*======================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id, /*!< in: target space id for which - to remove or flush pages */ - bool flush, /*!< in: flush to disk if true but - don't remove else remove without - flushing to disk */ - const trx_t* trx) /*!< to check if the operation must - be interrupted, can be 0 */ +buf_flush_or_remove_pages(buf_pool_t* buf_pool, ulint id, const trx_t* trx) { buf_page_t* prev; buf_page_t* bpage; @@ -574,7 +568,7 @@ buf_flush_or_remove_pages( /* Skip this block, as it does not belong to the target space. */ - } else if (!buf_flush_or_remove_page(buf_pool, bpage, flush)) { + } else if (!buf_flush_or_remove_page(buf_pool, bpage, trx)) { /* Remove was unsuccessful, we have to try again by scanning the entire list from the end. @@ -597,7 +591,7 @@ buf_flush_or_remove_pages( iteration. */ all_freed = false; - } else if (flush) { + } else if (trx) { /* The processing was successful. And during the processing we have released the buf_pool mutex @@ -616,19 +610,17 @@ buf_flush_or_remove_pages( processed = 0; } -#ifdef DBUG_OFF - if (flush) { + if (trx) { DBUG_EXECUTE_IF("ib_export_flush_crash", static ulint n_pages; if (++n_pages == 4) {DBUG_SUICIDE();}); - } -#endif /* DBUG_OFF */ - /* The check for trx is interrupted is expensive, we want - to check every N iterations. */ - if (!processed && trx && trx_is_interrupted(trx)) { - buf_flush_list_mutex_exit(buf_pool); - return(DB_INTERRUPTED); + /* The check for trx is interrupted is + expensive, we want to check every N iterations. */ + if (!processed && trx_is_interrupted(trx)) { + buf_flush_list_mutex_exit(buf_pool); + return(DB_INTERRUPTED); + } } } @@ -637,28 +629,25 @@ buf_flush_or_remove_pages( return(all_freed ? DB_SUCCESS : DB_FAIL); } -/******************************************************************//** -Remove or flush all the dirty pages that belong to a given tablespace +/** Remove or flush all the dirty pages that belong to a given tablespace inside a specific buffer pool instance. The pages will remain in the LRU list and will be evicted from the LRU list as they age and move towards -the tail of the LRU list. */ +the tail of the LRU list. +@param[in,out] buf_pool buffer pool +@param[in] id tablespace identifier +@param[in] trx transaction (to check for interrupt), + or NULL if the files should not be written to +*/ static MY_ATTRIBUTE((nonnull(1))) void -buf_flush_dirty_pages( -/*==================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id, /*!< in: space id */ - bool flush, /*!< in: flush to disk if true otherwise - remove the pages without flushing */ - const trx_t* trx) /*!< to check if the operation must - be interrupted */ +buf_flush_dirty_pages(buf_pool_t* buf_pool, ulint id, const trx_t* trx) { dberr_t err; do { buf_pool_mutex_enter(buf_pool); - err = buf_flush_or_remove_pages(buf_pool, id, flush, trx); + err = buf_flush_or_remove_pages(buf_pool, id, trx); buf_pool_mutex_exit(buf_pool); @@ -679,231 +668,27 @@ buf_flush_dirty_pages( || buf_pool_get_dirty_pages_count(buf_pool, id) == 0); } -/******************************************************************//** -Remove all pages that belong to a given tablespace inside a specific -buffer pool instance when we are DISCARDing the tablespace. */ -static MY_ATTRIBUTE((nonnull)) +/** Empty the flush list for all pages belonging to a tablespace. +@param[in] id tablespace identifier +@param[in] trx transaction, for checking for user interrupt; + or NULL if nothing is to be written +@param[in] drop_ahi whether to drop the adaptive hash index */ +UNIV_INTERN void -buf_LRU_remove_all_pages( -/*=====================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id) /*!< in: space id */ +buf_LRU_flush_or_remove_pages(ulint id, const trx_t* trx, bool drop_ahi) { - buf_page_t* bpage; - ibool all_freed; - -scan_again: - buf_pool_mutex_enter(buf_pool); - - all_freed = TRUE; - - for (bpage = UT_LIST_GET_LAST(buf_pool->LRU); - bpage != NULL; - /* No op */) { - - rw_lock_t* hash_lock; - buf_page_t* prev_bpage; - ib_mutex_t* block_mutex = NULL; - - ut_a(buf_page_in_file(bpage)); - ut_ad(bpage->in_LRU_list); - - prev_bpage = UT_LIST_GET_PREV(LRU, bpage); - - /* bpage->space and bpage->io_fix are protected by - buf_pool->mutex and the block_mutex. It is safe to check - them while holding buf_pool->mutex only. */ - - if (buf_page_get_space(bpage) != id) { - /* Skip this block, as it does not belong to - the space that is being invalidated. */ - goto next_page; - } else if (buf_page_get_io_fix(bpage) != BUF_IO_NONE) { - /* We cannot remove this page during this scan - yet; maybe the system is currently reading it - in, or flushing the modifications to the file */ - - all_freed = FALSE; - goto next_page; - } else { - ulint fold = buf_page_address_fold( - bpage->space, bpage->offset); - - hash_lock = buf_page_hash_lock_get(buf_pool, fold); - - rw_lock_x_lock(hash_lock); - - block_mutex = buf_page_get_mutex(bpage); - mutex_enter(block_mutex); - - if (bpage->buf_fix_count > 0) { - - mutex_exit(block_mutex); - - rw_lock_x_unlock(hash_lock); - - /* We cannot remove this page during - this scan yet; maybe the system is - currently reading it in, or flushing - the modifications to the file */ - - all_freed = FALSE; - - goto next_page; - } - } - - ut_ad(mutex_own(block_mutex)); - -#ifdef UNIV_DEBUG - if (buf_debug_prints) { - fprintf(stderr, - "Dropping space %lu page %lu\n", - (ulong) buf_page_get_space(bpage), - (ulong) buf_page_get_page_no(bpage)); - } -#endif - if (buf_page_get_state(bpage) != BUF_BLOCK_FILE_PAGE) { - /* Do nothing, because the adaptive hash index - covers uncompressed pages only. */ - } else if (((buf_block_t*) bpage)->index) { - ulint page_no; - ulint zip_size; - - buf_pool_mutex_exit(buf_pool); - - zip_size = buf_page_get_zip_size(bpage); - page_no = buf_page_get_page_no(bpage); - - rw_lock_x_unlock(hash_lock); - - mutex_exit(block_mutex); - - /* Note that the following call will acquire - and release block->lock X-latch. */ - - btr_search_drop_page_hash_when_freed( - id, zip_size, page_no); - - goto scan_again; - } - - if (bpage->oldest_modification != 0) { - - buf_flush_remove(bpage); - } - - ut_ad(!bpage->in_flush_list); - - /* Remove from the LRU list. */ - - if (buf_LRU_block_remove_hashed(bpage, true)) { - buf_LRU_block_free_hashed_page((buf_block_t*) bpage); - } else { - ut_ad(block_mutex == &buf_pool->zip_mutex); + for (ulint i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool = buf_pool_from_array(i); + if (drop_ahi) { + buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); } - - ut_ad(!mutex_own(block_mutex)); - -#ifdef UNIV_SYNC_DEBUG - /* buf_LRU_block_remove_hashed() releases the hash_lock */ - ut_ad(!rw_lock_own(hash_lock, RW_LOCK_EX)); - ut_ad(!rw_lock_own(hash_lock, RW_LOCK_SHARED)); -#endif /* UNIV_SYNC_DEBUG */ - -next_page: - bpage = prev_bpage; - } - - buf_pool_mutex_exit(buf_pool); - - if (!all_freed) { - os_thread_sleep(20000); - - goto scan_again; + buf_flush_dirty_pages(buf_pool, id, trx); } -} - -/******************************************************************//** -Remove pages belonging to a given tablespace inside a specific -buffer pool instance when we are deleting the data file(s) of that -tablespace. The pages still remain a part of LRU and are evicted from -the list as they age towards the tail of the LRU only if buf_remove -is BUF_REMOVE_FLUSH_NO_WRITE. */ -static MY_ATTRIBUTE((nonnull(1))) -void -buf_LRU_remove_pages( -/*=================*/ - buf_pool_t* buf_pool, /*!< buffer pool instance */ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove, /*!< in: remove or flush strategy */ - const trx_t* trx) /*!< to check if the operation must - be interrupted */ -{ - switch (buf_remove) { - case BUF_REMOVE_ALL_NO_WRITE: - buf_LRU_remove_all_pages(buf_pool, id); - break; - - case BUF_REMOVE_FLUSH_NO_WRITE: - ut_a(trx == 0); - buf_flush_dirty_pages(buf_pool, id, false, NULL); - break; - case BUF_REMOVE_FLUSH_WRITE: - ut_a(trx != 0); - buf_flush_dirty_pages(buf_pool, id, true, trx); + if (trx && !trx_is_interrupted(trx)) { /* Ensure that all asynchronous IO is completed. */ os_aio_wait_until_no_pending_writes(); fil_flush(id); - break; - } -} - -/******************************************************************//** -Flushes all dirty pages or removes all pages belonging -to a given tablespace. A PROBLEM: if readahead is being started, what -guarantees that it will not try to read in pages after this operation -has completed? */ -UNIV_INTERN -void -buf_LRU_flush_or_remove_pages( -/*==========================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove, /*!< in: remove or flush strategy */ - const trx_t* trx) /*!< to check if the operation must - be interrupted */ -{ - ulint i; - - /* Before we attempt to drop pages one by one we first - attempt to drop page hash index entries in batches to make - it more efficient. The batching attempt is a best effort - attempt and does not guarantee that all pages hash entries - will be dropped. We get rid of remaining page hash entries - one by one below. */ - for (i = 0; i < srv_buf_pool_instances; i++) { - buf_pool_t* buf_pool; - - buf_pool = buf_pool_from_array(i); - - switch (buf_remove) { - case BUF_REMOVE_ALL_NO_WRITE: - buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); - break; - - case BUF_REMOVE_FLUSH_NO_WRITE: - /* It is a DROP TABLE for a single table - tablespace. No AHI entries exist because - we already dealt with them when freeing up - extents. */ - case BUF_REMOVE_FLUSH_WRITE: - /* We allow read-only queries against the - table, there is no need to drop the AHI entries. */ - break; - } - - buf_LRU_remove_pages(buf_pool, id, buf_remove, trx); } } diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 1a3923047b02184bc25bec2528252f751c9723aa..8d7c1275c3b11c01be2ffdd5aef788c7554d954a 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -570,15 +570,14 @@ dict_table_close( ut_ad(mutex_own(&dict_sys->mutex)); ut_a(table->n_ref_count > 0); - --table->n_ref_count; + const bool last_handle = !--table->n_ref_count; /* Force persistent stats re-read upon next open of the table so that FLUSH TABLE can be used to forcibly fetch stats from disk if they have been manually modified. We reset table->stat_initialized only if table reference count is 0 because we do not want too frequent stats re-reads (e.g. in other cases than FLUSH TABLE). */ - if (strchr(table->name, '/') != NULL - && table->n_ref_count == 0 + if (last_handle && strchr(table->name, '/') != NULL && dict_stats_is_persistent_enabled(table)) { dict_stats_deinit(table); @@ -598,11 +597,8 @@ dict_table_close( if (!dict_locked) { table_id_t table_id = table->id; - ibool drop_aborted; - - drop_aborted = try_drop + const bool drop_aborted = last_handle && try_drop && table->drop_aborted - && table->n_ref_count == 1 && dict_table_get_first_index(table); mutex_exit(&dict_sys->mutex); @@ -642,40 +638,6 @@ dict_table_get_col_name( return(s); } -/**********************************************************************//** -Returns a column's name. -@return column name. NOTE: not guaranteed to stay valid if table is -modified in any way (columns added, etc.). */ -UNIV_INTERN -const char* -dict_table_get_col_name_for_mysql( -/*==============================*/ - const dict_table_t* table, /*!< in: table */ - const char* col_name)/*! in: MySQL table column name */ -{ - ulint i; - const char* s; - - ut_ad(table); - ut_ad(col_name); - ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - - s = table->col_names; - if (s) { - /* If we have many virtual columns MySQL key_part->fieldnr - could be larger than number of columns in InnoDB table - when creating new indexes. */ - for (i = 0; i < table->n_def; i++) { - - if (!innobase_strcasecmp(s, col_name)) { - break; /* Found */ - } - s += strlen(s) + 1; - } - } - - return(s); -} #ifndef UNIV_HOTBACKUP /** Allocate and init the autoinc latch of a given table. This function must not be called concurrently on the same table object. @@ -1711,7 +1673,7 @@ dict_table_rename_in_cache( filepath = fil_make_ibd_name(table->name, false); } - fil_delete_tablespace(table->space, BUF_REMOVE_ALL_NO_WRITE); + fil_delete_tablespace(table->space, true); /* Delete any temp file hanging around. */ if (os_file_status(filepath, &exists, &ftype) @@ -2145,8 +2107,9 @@ dict_table_remove_from_cache_low( } if (lru_evict && table->drop_aborted) { - /* Do as dict_table_try_drop_aborted() does. */ - + /* When evicting the table definition, + drop the orphan indexes from the data dictionary + and free the index pages. */ trx_t* trx = trx_allocate_for_background(); ut_ad(mutex_own(&dict_sys->mutex)); @@ -2157,12 +2120,7 @@ dict_table_remove_from_cache_low( trx->dict_operation_lock_mode = RW_X_LATCH; trx_set_dict_operation(trx, TRX_DICT_OP_INDEX); - - /* Silence a debug assertion in row_merge_drop_indexes(). */ - ut_d(table->n_ref_count++); - row_merge_drop_indexes(trx, table, TRUE); - ut_d(table->n_ref_count--); - ut_ad(table->n_ref_count == 0); + row_merge_drop_indexes_dict(trx, table->id); trx_commit_for_mysql(trx); trx->dict_operation_lock_mode = 0; trx_free_for_background(trx); diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index 57a5912941eb98b4370491a596d5c4c1de93bd6f..43ee1a236cead0b0bcad76ecbc95e6eb30b9a3f3 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -336,7 +336,7 @@ dict_stats_wait_bg_to_stop_using_table( unlocking/locking the data dict */ { while (!dict_stats_stop_bg(table)) { - DICT_STATS_BG_YIELD(trx); + DICT_BG_YIELD(trx); } } diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 7200c3c32e2c1bca7e6f29bf242199a4544c1de2..ac30f3c7a25328183dc64984b51d4f1acc8b0f50 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1037,155 +1037,26 @@ fil_space_extend_must_retry( page_size = UNIV_PAGE_SIZE; } -#ifdef _WIN32 - const ulint io_completion_type = OS_FILE_READ; - /* Logically or physically extend the file with zero bytes, - depending on whether it is sparse. */ + /* fil_read_first_page() expects UNIV_PAGE_SIZE bytes. + fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes.*/ - /* FIXME: Call DeviceIoControl(node->handle, FSCTL_SET_SPARSE, ...) - when opening a file when FSP_FLAGS_HAS_PAGE_COMPRESSION(). */ - { - FILE_END_OF_FILE_INFO feof; - /* fil_read_first_page() expects UNIV_PAGE_SIZE bytes. - fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes. - Do not shrink short ROW_FORMAT=COMPRESSED files. */ - feof.EndOfFile.QuadPart = std::max( - os_offset_t(size - file_start_page_no) * page_size, - os_offset_t(FIL_IBD_FILE_INITIAL_SIZE - * UNIV_PAGE_SIZE)); - *success = SetFileInformationByHandle(node->handle, - FileEndOfFileInfo, - &feof, sizeof feof); - if (!*success) { - ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s" - " from " INT64PF - " to " INT64PF " bytes failed with %u", - node->name, - os_offset_t(node->size) * page_size, - feof.EndOfFile.QuadPart, GetLastError()); - } else { - start_page_no = size; - } - } -#else - /* We will logically extend the file with ftruncate() if - page_compression is enabled, because the file is expected to - be sparse in that case. Make sure that ftruncate() can deal - with large files. */ - const bool is_sparse = sizeof(off_t) >= 8 - && FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags); - -# ifdef HAVE_POSIX_FALLOCATE - /* We must complete the I/O request after invoking - posix_fallocate() to avoid an assertion failure at shutdown. - Because no actual writes were dispatched, a read operation - will suffice. */ - const ulint io_completion_type = srv_use_posix_fallocate - || is_sparse ? OS_FILE_READ : OS_FILE_WRITE; - - if (srv_use_posix_fallocate && !is_sparse) { - const os_offset_t start_offset - = os_offset_t(start_page_no - file_start_page_no) - * page_size; - const ulint n_pages = size - start_page_no; - const os_offset_t len = os_offset_t(n_pages) * page_size; - - int err; - do { - err = posix_fallocate(node->handle, start_offset, len); - } while (err == EINTR - && srv_shutdown_state == SRV_SHUTDOWN_NONE); - - *success = !err; - if (!*success) { - ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s" - " from " INT64PF " to " INT64PF " bytes" - " failed with error %d", - node->name, start_offset, len + start_offset, - err); - } - - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - *success = FALSE; - os_has_said_disk_full = TRUE;); - - if (*success) { - os_has_said_disk_full = FALSE; - start_page_no = size; - } - } else -# else - const ulint io_completion_type = is_sparse - ? OS_FILE_READ : OS_FILE_WRITE; -# endif - if (is_sparse) { - /* fil_read_first_page() expects UNIV_PAGE_SIZE bytes. - fil_node_open_file() expects at least 4 * UNIV_PAGE_SIZE bytes. - Do not shrink short ROW_FORMAT=COMPRESSED files. */ - off_t s = std::max(off_t(size - file_start_page_no) - * off_t(page_size), - off_t(FIL_IBD_FILE_INITIAL_SIZE - * UNIV_PAGE_SIZE)); - *success = !ftruncate(node->handle, s); - if (!*success) { - ib_logf(IB_LOG_LEVEL_ERROR, "ftruncate of file %s" - " from " INT64PF " to " INT64PF " bytes" - " failed with error %d", - node->name, - os_offset_t(start_page_no - file_start_page_no) - * page_size, os_offset_t(s), errno); - } else { - start_page_no = size; - } - } else { - /* Extend at most 64 pages at a time */ - ulint buf_size = ut_min(64, size - start_page_no) - * page_size; - byte* buf2 = static_cast( - calloc(1, buf_size + page_size)); - *success = buf2 != NULL; - if (!buf2) { - ib_logf(IB_LOG_LEVEL_ERROR, "Cannot allocate " ULINTPF - " bytes to extend file", - buf_size + page_size); - } - byte* const buf = static_cast( - ut_align(buf2, page_size)); - - while (*success && start_page_no < size) { - ulint n_pages - = ut_min(buf_size / page_size, - size - start_page_no); - - os_offset_t offset = static_cast( - start_page_no - file_start_page_no) - * page_size; - - *success = os_aio(OS_FILE_WRITE, 0, OS_AIO_SYNC, - node->name, node->handle, buf, - offset, page_size * n_pages, - page_size, node, NULL, 0); - - DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - *success = FALSE; - os_has_said_disk_full = TRUE;); - - if (*success) { - os_has_said_disk_full = FALSE; - } - /* Let us measure the size of the file - to determine how much we were able to - extend it */ - os_offset_t fsize = os_file_get_size(node->handle); - ut_a(fsize != os_offset_t(-1)); + os_offset_t new_size = std::max( + os_offset_t(size - file_start_page_no) * page_size, + os_offset_t(FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE)); - start_page_no = ulint(fsize / page_size) - + file_start_page_no; - } + *success = os_file_set_size(node->name, node->handle, new_size, + FSP_FLAGS_HAS_PAGE_COMPRESSION(space->flags)); - free(buf2); + + DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", + *success = FALSE; + os_has_said_disk_full = TRUE;); + + if (*success) { + os_has_said_disk_full = FALSE; + start_page_no = size; } -#endif + mutex_enter(&fil_system->mutex); ut_a(node->being_extended); @@ -1195,7 +1066,7 @@ fil_space_extend_must_retry( space->size += file_size - node->size; node->size = file_size; - fil_node_complete_io(node, fil_system, io_completion_type); + fil_node_complete_io(node, fil_system, OS_FILE_READ); node->being_extended = FALSE; @@ -2655,8 +2526,7 @@ fil_op_log_parse_or_replay( switch (type) { case MLOG_FILE_DELETE: if (fil_tablespace_exists_in_mem(space_id)) { - dberr_t err = fil_delete_tablespace( - space_id, BUF_REMOVE_FLUSH_NO_WRITE); + dberr_t err = fil_delete_tablespace(space_id); ut_a(err == DB_SUCCESS); } @@ -2934,7 +2804,7 @@ fil_close_tablespace( completely and permanently. The flag stop_new_ops also prevents fil_flush() from being applied to this tablespace. */ - buf_LRU_flush_or_remove_pages(id, BUF_REMOVE_FLUSH_WRITE, trx); + buf_LRU_flush_or_remove_pages(id, trx); #endif mutex_enter(&fil_system->mutex); @@ -2961,18 +2831,13 @@ fil_close_tablespace( return(err); } -/*******************************************************************//** -Deletes a single-table tablespace. The tablespace must be cached in the -memory cache. +/** Delete a tablespace and associated .ibd file. +@param[in] id tablespace identifier +@param[in] drop_ahi whether to drop the adaptive hash index @return DB_SUCCESS or error */ UNIV_INTERN dberr_t -fil_delete_tablespace( -/*==================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove) /*!< in: specify the action to take - on the tables pages in the buffer - pool */ +fil_delete_tablespace(ulint id, bool drop_ahi) { char* path = 0; fil_space_t* space = 0; @@ -3028,7 +2893,7 @@ fil_delete_tablespace( To deal with potential read requests by checking the ::stop_new_ops flag in fil_io() */ - buf_LRU_flush_or_remove_pages(id, buf_remove, 0); + buf_LRU_flush_or_remove_pages(id, NULL, drop_ahi); #endif /* !UNIV_HOTBACKUP */ @@ -3139,7 +3004,7 @@ fil_discard_tablespace( { dberr_t err; - switch (err = fil_delete_tablespace(id, BUF_REMOVE_ALL_NO_WRITE)) { + switch (err = fil_delete_tablespace(id, true)) { case DB_SUCCESS: break; diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc index 7a61f17836bec0eb580c42ab85cc1d4e5ad47391..edc932f36f5f193d990e255fa1bb9e6639e6aeab 100644 --- a/storage/innobase/fil/fil0pagecompress.cc +++ b/storage/innobase/fil/fil0pagecompress.cc @@ -106,6 +106,9 @@ fil_compress_page( int comp_level = level; ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE; ulint write_size = 0; +#if HAVE_LZO + lzo_uint write_size_lzo = write_size; +#endif /* Cache to avoid change during function execution */ ulint comp_method = innodb_compression_algorithm; bool allocated = false; @@ -207,7 +210,9 @@ fil_compress_page( #ifdef HAVE_LZO case PAGE_LZO_ALGORITHM: err = lzo1x_1_15_compress( - buf, len, out_buf+header_len, &write_size, out_buf+UNIV_PAGE_SIZE); + buf, len, out_buf+header_len, &write_size_lzo, out_buf+UNIV_PAGE_SIZE); + + write_size = write_size_lzo; if (err != LZO_E_OK || write_size > UNIV_PAGE_SIZE-header_len) { if (space && !space->printed_compression_failure) { @@ -604,8 +609,11 @@ fil_decompress_page( #ifdef HAVE_LZO case PAGE_LZO_ALGORITHM: { ulint olen = 0; + lzo_uint olen_lzo = olen; err = lzo1x_decompress((const unsigned char *)buf+header_len, - actual_size,(unsigned char *)in_buf, &olen, NULL); + actual_size,(unsigned char *)in_buf, &olen_lzo, NULL); + + olen = olen_lzo; if (err != LZO_E_OK || (olen == 0 || olen > UNIV_PAGE_SIZE)) { ib_logf(IB_LOG_LEVEL_ERROR, diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index bfe32e2aec46b13ecd43719dab6fa5d07a492f93..2ba58c9a590fb674e427d22de3d27cc6e5d398af 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1,7 +1,7 @@ /***************************************************************************** -Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. All Rights reserved. +Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2016, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -26,6 +26,7 @@ Full Text Search interface #include "row0mysql.h" #include "row0upd.h" #include "dict0types.h" +#include "dict0stats_bg.h" #include "row0sel.h" #include "fts0fts.h" @@ -868,18 +869,37 @@ fts_drop_index( err = fts_drop_index_tables(trx, index); - fts_free(table); - + for(;;) { + bool retry = false; + if (index->index_fts_syncing) { + retry = true; + } + if (!retry){ + fts_free(table); + break; + } + DICT_BG_YIELD(trx); + } return(err); } - current_doc_id = table->fts->cache->next_doc_id; - first_doc_id = table->fts->cache->first_doc_id; - fts_cache_clear(table->fts->cache); - fts_cache_destroy(table->fts->cache); - table->fts->cache = fts_cache_create(table); - table->fts->cache->next_doc_id = current_doc_id; - table->fts->cache->first_doc_id = first_doc_id; + for(;;) { + bool retry = false; + if (index->index_fts_syncing) { + retry = true; + } + if (!retry){ + current_doc_id = table->fts->cache->next_doc_id; + first_doc_id = table->fts->cache->first_doc_id; + fts_cache_clear(table->fts->cache); + fts_cache_destroy(table->fts->cache); + table->fts->cache = fts_cache_create(table); + table->fts->cache->next_doc_id = current_doc_id; + table->fts->cache->first_doc_id = first_doc_id; + break; + } + DICT_BG_YIELD(trx); + } } else { fts_cache_t* cache = table->fts->cache; fts_index_cache_t* index_cache; @@ -889,9 +909,17 @@ fts_drop_index( index_cache = fts_find_index_cache(cache, index); if (index_cache != NULL) { - if (index_cache->words) { - fts_words_free(index_cache->words); - rbt_free(index_cache->words); + for(;;) { + bool retry = false; + if (index->index_fts_syncing) { + retry = true; + } + if (!retry && index_cache->words) { + fts_words_free(index_cache->words); + rbt_free(index_cache->words); + break; + } + DICT_BG_YIELD(trx); } ib_vector_remove(cache->indexes, *(void**) index_cache); @@ -2645,22 +2673,23 @@ fts_get_next_doc_id( will consult the CONFIG table and user table to re-establish the initial value of the Doc ID */ - if (cache->first_doc_id != 0 || !fts_init_doc_id(table)) { - if (!DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { - *doc_id = FTS_NULL_DOC_ID; - return(DB_SUCCESS); + if (!DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { + if (cache->first_doc_id == FTS_NULL_DOC_ID) { + fts_init_doc_id(table); } + *doc_id = FTS_NULL_DOC_ID; + return(DB_SUCCESS); + } - /* Otherwise, simply increment the value in cache */ - mutex_enter(&cache->doc_id_lock); - *doc_id = ++cache->next_doc_id; - mutex_exit(&cache->doc_id_lock); - } else { - mutex_enter(&cache->doc_id_lock); - *doc_id = cache->next_doc_id; - mutex_exit(&cache->doc_id_lock); + if (cache->first_doc_id == FTS_NULL_DOC_ID) { + fts_init_doc_id(table); } + DEBUG_SYNC_C("get_next_FTS_DOC_ID"); + mutex_enter(&cache->doc_id_lock); + *doc_id = cache->next_doc_id++; + mutex_exit(&cache->doc_id_lock); + return(DB_SUCCESS); } @@ -3033,53 +3062,6 @@ fts_modify( return(error); } -/*********************************************************************//** -Create a new document id. -@return DB_SUCCESS if all went well else error */ -UNIV_INTERN -dberr_t -fts_create_doc_id( -/*==============*/ - dict_table_t* table, /*!< in: row is of this table. */ - dtuple_t* row, /* in/out: add doc id value to this - row. This is the current row that is - being inserted. */ - mem_heap_t* heap) /*!< in: heap */ -{ - doc_id_t doc_id; - dberr_t error = DB_SUCCESS; - - ut_a(table->fts->doc_col != ULINT_UNDEFINED); - - if (!DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID)) { - if (table->fts->cache->first_doc_id == FTS_NULL_DOC_ID) { - error = fts_get_next_doc_id(table, &doc_id); - } - return(error); - } - - error = fts_get_next_doc_id(table, &doc_id); - - if (error == DB_SUCCESS) { - dfield_t* dfield; - doc_id_t* write_doc_id; - - ut_a(doc_id > 0); - - dfield = dtuple_get_nth_field(row, table->fts->doc_col); - write_doc_id = static_cast( - mem_heap_alloc(heap, sizeof(*write_doc_id))); - - ut_a(doc_id != FTS_NULL_DOC_ID); - ut_a(sizeof(doc_id) == dfield->type.len); - fts_write_doc_id((byte*) write_doc_id, doc_id); - - dfield_set_data(dfield, write_doc_id, sizeof(*write_doc_id)); - } - - return(error); -} - /*********************************************************************//** The given transaction is about to be committed; do whatever is necessary from the FTS system's POV. @@ -4615,10 +4597,16 @@ fts_sync( index_cache = static_cast( ib_vector_get(cache->indexes, i)); - if (index_cache->index->to_be_dropped) { + if (index_cache->index->to_be_dropped + || index_cache->index->table->to_be_dropped) { continue; } + index_cache->index->index_fts_syncing = true; + DBUG_EXECUTE_IF("fts_instrument_sync_sleep_drop_waits", + os_thread_sleep(10000000); + ); + error = fts_sync_index(sync, index_cache); if (error != DB_SUCCESS && !sync->interrupted) { @@ -4651,11 +4639,33 @@ fts_sync( end_sync: if (error == DB_SUCCESS && !sync->interrupted) { error = fts_sync_commit(sync); + if (error == DB_SUCCESS) { + for (i = 0; i < ib_vector_size(cache->indexes); ++i) { + fts_index_cache_t* index_cache; + index_cache = static_cast( + ib_vector_get(cache->indexes, i)); + if (index_cache->index->index_fts_syncing) { + index_cache->index->index_fts_syncing + = false; + } + } + } } else { fts_sync_rollback(sync); } rw_lock_x_lock(&cache->lock); + /* Clear fts syncing flags of any indexes incase sync is + interrupeted */ + for (i = 0; i < ib_vector_size(cache->indexes); ++i) { + fts_index_cache_t* index_cache; + index_cache = static_cast( + ib_vector_get(cache->indexes, i)); + if (index_cache->index->index_fts_syncing == true) { + index_cache->index->index_fts_syncing = false; + } + } + sync->interrupted = false; sync->in_progress = false; os_event_set(sync->event); diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc index cb30122adcb555b6bcdf9c9d07c1d0dc124c3da1..d9f969480003b1fcd0a66b1c13e64779c9653ab8 100644 --- a/storage/innobase/fts/fts0opt.cc +++ b/storage/innobase/fts/fts0opt.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2016, MariaDB Corporation. All Rights reserved. This program is free software; you can redistribute it and/or modify it under @@ -2971,13 +2971,6 @@ fts_optimize_sync_table( { dict_table_t* table = NULL; - /* Prevent DROP INDEX etc. from running when we are syncing - cache in background. */ - if (!rw_lock_s_lock_nowait(&dict_operation_lock, __FILE__, __LINE__)) { - /* Exit when fail to get dict operation lock. */ - return; - } - table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL); if (table) { @@ -2987,8 +2980,6 @@ fts_optimize_sync_table( dict_table_close(table, FALSE, FALSE); } - - rw_lock_s_unlock(&dict_operation_lock); } /**********************************************************************//** diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc index 26bd0378aedaad15dc081cfc1ce1b1a7eff94c87..b874309964b4c6c979cb676684330bb310941cd9 100644 --- a/storage/innobase/fts/fts0que.cc +++ b/storage/innobase/fts/fts0que.cc @@ -1,6 +1,7 @@ /***************************************************************************** -Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2007, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -3633,6 +3634,10 @@ fts_query_free( fts_doc_ids_free(query->deleted); } + if (query->intersection) { + fts_query_free_doc_ids(query, query->intersection); + } + if (query->doc_ids) { fts_query_free_doc_ids(query, query->doc_ids); } @@ -3657,8 +3662,6 @@ fts_query_free( rbt_free(query->word_freqs); } - ut_a(!query->intersection); - if (query->word_map) { rbt_free(query->word_map); } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e50f9fc97747a49bce15a5529e039e75a9628eda..9a7258bc924c0443fb22b0daad16b9fef33af5e8 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5427,8 +5427,6 @@ innobase_match_index_columns( if (innodb_idx_fld >= innodb_idx_fld_end) { DBUG_RETURN(FALSE); } - - mtype = innodb_idx_fld->col->mtype; } // MariaDB-5.5 compatibility @@ -10420,7 +10418,7 @@ wsrep_append_foreign_key( shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, copy); if (rcode) { - DBUG_PRINT("wsrep", ("row key failed: %lu", rcode)); + DBUG_PRINT("wsrep", ("row key failed: %zu", rcode)); WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu", (wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void", rcode); @@ -18416,7 +18414,7 @@ buffer_pool_load_now( const void* save) /*!< in: immediate result from check function */ { - if (*(my_bool*) save) { + if (*(my_bool*) save && !srv_read_only_mode) { buf_load_start(); } } @@ -18439,7 +18437,7 @@ buffer_pool_load_abort( const void* save) /*!< in: immediate result from check function */ { - if (*(my_bool*) save) { + if (*(my_bool*) save && !srv_read_only_mode) { buf_load_abort(); } } @@ -18711,7 +18709,7 @@ wsrep_innobase_kill_one_trx( wsrep_thd_awake(thd, signal); } else { /* abort currently executing query */ - DBUG_PRINT("wsrep",("sending KILL_QUERY to: %ld", + DBUG_PRINT("wsrep",("sending KILL_QUERY to: %lu", thd_get_thread_id(thd))); WSREP_DEBUG("kill query for: %ld", thd_get_thread_id(thd)); @@ -18842,7 +18840,8 @@ wsrep_fake_trx_id( mutex_enter(&trx_sys->mutex); trx_id_t trx_id = trx_sys_get_new_trx_id(); mutex_exit(&trx_sys->mutex); - WSREP_DEBUG("innodb fake trx id: %lu thd: %s", trx_id, wsrep_thd_query(thd)); + WSREP_DEBUG("innodb fake trx id: " TRX_ID_FMT " thd: %s", + trx_id, wsrep_thd_query(thd)); wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id); } diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 2a74ac489c99b444e5dad9c0b4e29913f99ac530..bdc4987b5c9896e7f666197c995818ebf1caa17d 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2013, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -208,60 +208,44 @@ innobase_fulltext_exist( return(false); } -/*******************************************************************//** -Determine if ALTER TABLE needs to rebuild the table. -@param ha_alter_info the DDL operation -@param altered_table MySQL original table +/** Determine if ALTER TABLE needs to rebuild the table. +@param ha_alter_info the DDL operation +@param table metadata before ALTER TABLE @return whether it is necessary to rebuild the table */ static MY_ATTRIBUTE((nonnull, warn_unused_result)) bool innobase_need_rebuild( -/*==================*/ const Alter_inplace_info* ha_alter_info, - const TABLE* altered_table) + const TABLE* table) { Alter_inplace_info::HA_ALTER_FLAGS alter_inplace_flags = - ha_alter_info->handler_flags & ~(INNOBASE_INPLACE_IGNORE); + ha_alter_info->handler_flags & ~INNOBASE_INPLACE_IGNORE; + + if (alter_inplace_flags & Alter_inplace_info::CHANGE_CREATE_OPTION) { + const ha_table_option_struct& alt_opt= + *ha_alter_info->create_info->option_struct; + const ha_table_option_struct& opt= *table->s->option_struct; + + if (alt_opt.page_compressed != opt.page_compressed + || alt_opt.page_compression_level + != opt.page_compression_level + || alt_opt.encryption != opt.encryption + || alt_opt.encryption_key_id != opt.encryption_key_id) { + return(true); + } + } - if (alter_inplace_flags - == Alter_inplace_info::CHANGE_CREATE_OPTION + if (alter_inplace_flags == Alter_inplace_info::CHANGE_CREATE_OPTION && !(ha_alter_info->create_info->used_fields & (HA_CREATE_USED_ROW_FORMAT | HA_CREATE_USED_KEY_BLOCK_SIZE))) { /* Any other CHANGE_CREATE_OPTION than changing - ROW_FORMAT or KEY_BLOCK_SIZE is ignored. */ + ROW_FORMAT or KEY_BLOCK_SIZE can be done without + rebuilding the table. */ return(false); } - /* If alter table changes column name and adds a new - index, we need to check is this new index created - to new column name. This is because column name - changes are done normally after creating indexes. */ - if ((ha_alter_info->handler_flags - & Alter_inplace_info::ALTER_COLUMN_NAME) && - ((ha_alter_info->handler_flags - & Alter_inplace_info::ADD_INDEX) || - (ha_alter_info->handler_flags - & Alter_inplace_info::ADD_FOREIGN_KEY))) { - for (ulint i = 0; i < ha_alter_info->index_add_count; i++) { - const KEY* key = &ha_alter_info->key_info_buffer[ - ha_alter_info->index_add_buffer[i]]; - - for (ulint j = 0; j < key->user_defined_key_parts; j++) { - const KEY_PART_INFO* key_part = &(key->key_part[j]); - const Field* field = altered_table->field[key_part->fieldnr]; - - /* Field used on added index is renamed on - this same alter table. We need table - rebuild. */ - if (field && field->flags & FIELD_IS_RENAMED) { - return (true); - } - } - } - } - - return(!!(ha_alter_info->handler_flags & INNOBASE_ALTER_REBUILD)); + return(!!(alter_inplace_flags & INNOBASE_ALTER_REBUILD)); } /** Check if InnoDB supports a particular alter table in-place @@ -311,29 +295,6 @@ ha_innobase::check_if_supported_inplace_alter( update_thd(); trx_search_latch_release_if_reserved(prebuilt->trx); - /* Change on engine specific table options require rebuild of the - table */ - if (ha_alter_info->handler_flags - & Alter_inplace_info::CHANGE_CREATE_OPTION) { - ha_table_option_struct *new_options= ha_alter_info->create_info->option_struct; - ha_table_option_struct *old_options= table->s->option_struct; - - if (new_options->page_compressed != old_options->page_compressed || - new_options->page_compression_level != old_options->page_compression_level || - new_options->atomic_writes != old_options->atomic_writes) { - ha_alter_info->unsupported_reason = innobase_get_err_msg( - ER_ALTER_OPERATION_NOT_SUPPORTED_REASON); - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } - - if (new_options->encryption != old_options->encryption || - new_options->encryption_key_id != old_options->encryption_key_id) { - ha_alter_info->unsupported_reason = innobase_get_err_msg( - ER_ALTER_OPERATION_NOT_SUPPORTED_REASON); - DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); - } - } - if (ha_alter_info->handler_flags & ~(INNOBASE_INPLACE_IGNORE | INNOBASE_ALTER_NOREBUILD @@ -612,7 +573,7 @@ ha_innobase::check_if_supported_inplace_alter( operation is possible. */ } else if (((ha_alter_info->handler_flags & Alter_inplace_info::ADD_PK_INDEX) - || innobase_need_rebuild(ha_alter_info, table)) + || innobase_need_rebuild(ha_alter_info, table)) && (innobase_fulltext_exist(altered_table))) { /* Refuse to rebuild the table online, if fulltext indexes are to survive the rebuild. */ @@ -1548,38 +1509,49 @@ innobase_check_index_keys( return(0); } -/*******************************************************************//** -Create index field definition for key part */ +/** Create index field definition for key part +@param[in] new_clustered true if alter is generating a new clustered +index +@param[in] altered_table MySQL table that is being altered +@param[in] key_part MySQL key definition +@param[out] index_field index field defition for key_part */ static MY_ATTRIBUTE((nonnull(2,3))) void innobase_create_index_field_def( -/*============================*/ - const TABLE* altered_table, /*!< in: MySQL table that is - being altered, or NULL - if a new clustered index is - not being created */ - const KEY_PART_INFO* key_part, /*!< in: MySQL key definition */ - index_field_t* index_field, /*!< out: index field - definition for key_part */ - const Field** fields) /*!< in: MySQL table fields */ + bool new_clustered, + const TABLE* altered_table, + const KEY_PART_INFO* key_part, + index_field_t* index_field) { const Field* field; ibool is_unsigned; ulint col_type; + ulint innodb_fieldnr=0; DBUG_ENTER("innobase_create_index_field_def"); ut_ad(key_part); ut_ad(index_field); + ut_ad(altered_table); + + /* Virtual columns are not stored in InnoDB data dictionary, thus + if there is virtual columns we need to skip them to find the + correct field. */ + for(ulint i = 0; i < key_part->fieldnr; i++) { + const Field* table_field = altered_table->field[i]; + if (!table_field->stored_in_db) { + continue; + } + innodb_fieldnr++; + } - field = altered_table - ? altered_table->field[key_part->fieldnr] + field = new_clustered ? + altered_table->field[key_part->fieldnr] : key_part->field; - ut_a(field); - index_field->col_no = key_part->fieldnr; - index_field->col_name = altered_table ? field->field_name : fields[key_part->fieldnr]->field_name; + ut_a(field); + index_field->col_no = innodb_fieldnr; col_type = get_innobase_type_from_mysql_type(&is_unsigned, field); if (DATA_BLOB == col_type @@ -1613,10 +1585,8 @@ innobase_create_index_def( bool key_clustered, /*!< in: true if this is the new clustered index */ index_def_t* index, /*!< out: index definition */ - mem_heap_t* heap, /*!< in: heap where memory + mem_heap_t* heap) /*!< in: heap where memory is allocated */ - const Field** fields) /*!< in: MySQL table fields - */ { const KEY* key = &keys[key_number]; ulint i; @@ -1627,10 +1597,10 @@ innobase_create_index_def( DBUG_ENTER("innobase_create_index_def"); DBUG_ASSERT(!key_clustered || new_clustered); + ut_ad(altered_table); + index->fields = static_cast( mem_heap_alloc(heap, n_fields * sizeof *index->fields)); - memset(index->fields, 0, n_fields * sizeof *index->fields); - index->ind_type = 0; index->key_number = key_number; index->n_fields = n_fields; @@ -1661,13 +1631,12 @@ innobase_create_index_def( index->ind_type |= DICT_FTS; } - if (!new_clustered) { - altered_table = NULL; - } - for (i = 0; i < n_fields; i++) { innobase_create_index_field_def( - altered_table, &key->key_part[i], &index->fields[i], fields); + new_clustered, + altered_table, + &key->key_part[i], + &index->fields[i]); } DBUG_VOID_RETURN; @@ -1993,7 +1962,7 @@ innobase_create_key_defs( /* Create the PRIMARY key index definition */ innobase_create_index_def( altered_table, key_info, primary_key_number, - TRUE, TRUE, indexdef++, heap, (const Field **)altered_table->field); + TRUE, TRUE, indexdef++, heap); created_clustered: n_add = 1; @@ -2005,7 +1974,7 @@ innobase_create_key_defs( /* Copy the index definitions. */ innobase_create_index_def( altered_table, key_info, i, TRUE, FALSE, - indexdef, heap, (const Field **)altered_table->field); + indexdef, heap); if (indexdef->ind_type & DICT_FTS) { n_fts_add++; @@ -2050,7 +2019,7 @@ innobase_create_key_defs( for (ulint i = 0; i < n_add; i++) { innobase_create_index_def( altered_table, key_info, add[i], FALSE, FALSE, - indexdef, heap, (const Field **)altered_table->field); + indexdef, heap); if (indexdef->ind_type & DICT_FTS) { n_fts_add++; @@ -2067,7 +2036,6 @@ innobase_create_key_defs( index->fields = static_cast( mem_heap_alloc(heap, sizeof *index->fields)); - memset(index->fields, 0, sizeof *index->fields); index->n_fields = 1; index->fields->col_no = fts_doc_id_col; index->fields->prefix_len = 0; @@ -2157,7 +2125,7 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx /** mapping of old column numbers to new ones, or NULL */ const ulint* col_map; /** new column names, or NULL if nothing was renamed */ - const char** col_names; + const char** col_names; /** added AUTO_INCREMENT column position, or ULINT_UNDEFINED */ const ulint add_autoinc; /** default values of ADD COLUMN, or NULL */ @@ -2884,7 +2852,6 @@ prepare_inplace_alter_table_dict( to rebuild the table with a temporary name. */ if (new_clustered) { - fil_space_crypt_t* crypt_data; const char* new_table_name = dict_mem_create_temporary_tablename( ctx->heap, @@ -2895,13 +2862,29 @@ prepare_inplace_alter_table_dict( ulint key_id = FIL_DEFAULT_ENCRYPTION_KEY; fil_encryption_t mode = FIL_ENCRYPTION_DEFAULT; - fil_space_t* space = fil_space_acquire(ctx->prebuilt->table->space); - crypt_data = space->crypt_data; - fil_space_release(space); + if (fil_space_t* space + = fil_space_acquire(ctx->prebuilt->table->space)) { + if (const fil_space_crypt_t* crypt_data + = space->crypt_data) { + key_id = crypt_data->key_id; + mode = crypt_data->encryption; + } - if (crypt_data) { - key_id = crypt_data->key_id; - mode = crypt_data->encryption; + fil_space_release(space); + } + + if (ha_alter_info->handler_flags + & Alter_inplace_info::CHANGE_CREATE_OPTION) { + const ha_table_option_struct& alt_opt= + *ha_alter_info->create_info->option_struct; + const ha_table_option_struct& opt= + *old_table->s->option_struct; + if (alt_opt.encryption != opt.encryption + || alt_opt.encryption_key_id + != opt.encryption_key_id) { + key_id = alt_opt.encryption_key_id; + mode = fil_encryption_t(alt_opt.encryption); + } } if (innobase_check_foreigns( @@ -3114,8 +3097,7 @@ prepare_inplace_alter_table_dict( for (ulint a = 0; a < ctx->num_to_add_index; a++) { ctx->add_index[a] = row_merge_create_index( - ctx->trx, ctx->new_table, - &index_defs[a], ctx->col_names); + ctx->trx, ctx->new_table, &index_defs[a]); add_key_nums[a] = index_defs[a].key_number; @@ -5917,7 +5899,47 @@ ha_innobase::commit_inplace_alter_table( break; } - DICT_STATS_BG_YIELD(trx); + DICT_BG_YIELD(trx); + } + + /* Make a concurrent Drop fts Index to wait until sync of that + fts index is happening in the background */ + for (;;) { + bool retry = false; + + for (inplace_alter_handler_ctx** pctx = ctx_array; + *pctx; pctx++) { + int count =0; + ha_innobase_inplace_ctx* ctx + = static_cast(*pctx); + DBUG_ASSERT(new_clustered == ctx->need_rebuild()); + + if (dict_fts_index_syncing(ctx->old_table)) { + count++; + if (count == 100) { + fprintf(stderr, + "Drop index waiting for background sync" + "to finish\n"); + } + retry = true; + } + + if (new_clustered && dict_fts_index_syncing(ctx->new_table)) { + count++; + if (count == 100) { + fprintf(stderr, + "Drop index waiting for background sync" + "to finish\n"); + } + retry = true; + } + } + + if (!retry) { + break; + } + + DICT_BG_YIELD(trx); } /* Apply the changes to the data dictionary tables, for all @@ -6233,8 +6255,13 @@ ha_innobase::commit_inplace_alter_table( ut_d(dict_table_check_for_dup_indexes( ctx->new_table, CHECK_ABORTED_OK)); - ut_a(fts_check_cached_index(ctx->new_table)); +#ifdef UNIV_DEBUG + if (!(ctx->new_table->fts != NULL + && ctx->new_table->fts->cache->sync->in_progress)) { + ut_a(fts_check_cached_index(ctx->new_table)); + } +#endif if (new_clustered) { /* Since the table has been rebuilt, we remove all persistent statistics corresponding to the diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 145100c88388f50d126916ba9055ae2d65474ca8..2c82c1b49318789ab2fd8e0cb783a31679ad57c3 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -6383,6 +6383,7 @@ i_s_sys_tables_fill_table_stats( } heap = mem_heap_create(1000); + rw_lock_s_lock(&dict_operation_lock); mutex_enter(&dict_sys->mutex); mtr_start(&mtr); @@ -6409,9 +6410,11 @@ i_s_sys_tables_fill_table_stats( err_msg); } + rw_lock_s_unlock(&dict_operation_lock); mem_heap_empty(heap); /* Get the next record */ + rw_lock_s_lock(&dict_operation_lock); mutex_enter(&dict_sys->mutex); mtr_start(&mtr); rec = dict_getnext_system(&pcur, &mtr); @@ -6419,6 +6422,7 @@ i_s_sys_tables_fill_table_stats( mtr_commit(&mtr); mutex_exit(&dict_sys->mutex); + rw_lock_s_unlock(&dict_operation_lock); mem_heap_free(heap); DBUG_RETURN(0); @@ -7722,8 +7726,6 @@ i_s_dict_fill_sys_tablespaces( { Field** fields; ulint atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(flags); - ulint page_size = fsp_flags_get_page_size(flags); - ulint zip_size = fsp_flags_get_zip_size(flags); const char* file_format; const char* row_format; @@ -7740,13 +7742,11 @@ i_s_dict_fill_sys_tablespaces( fields = table_to_fill->field; - OK(fields[SYS_TABLESPACES_SPACE]->store( - static_cast(space))); + OK(fields[SYS_TABLESPACES_SPACE]->store(space, true)); OK(field_store_string(fields[SYS_TABLESPACES_NAME], name)); - OK(fields[SYS_TABLESPACES_FLAGS]->store( - static_cast(flags))); + OK(fields[SYS_TABLESPACES_FLAGS]->store(flags, true)); OK(field_store_string(fields[SYS_TABLESPACES_FILE_FORMAT], file_format)); @@ -7754,11 +7754,18 @@ i_s_dict_fill_sys_tablespaces( OK(field_store_string(fields[SYS_TABLESPACES_ROW_FORMAT], row_format)); - OK(fields[SYS_TABLESPACES_PAGE_SIZE]->store( - static_cast(page_size))); + ulint cflags = fsp_flags_is_valid(flags, space) + ? flags : fsp_flags_convert_from_101(flags); + if (cflags != ULINT_UNDEFINED) { + OK(fields[SYS_TABLESPACES_PAGE_SIZE]->store( + fsp_flags_get_page_size(cflags), true)); - OK(fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->store( - static_cast(zip_size))); + OK(fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->store( + fsp_flags_get_zip_size(cflags), true)); + } else { + fields[SYS_TABLESPACES_PAGE_SIZE]->set_null(); + fields[SYS_TABLESPACES_ZIP_PAGE_SIZE]->set_null(); + } OK(schema_table_store_record(thd, table_to_fill)); diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index 356dbbfb6ec2aae76c4041ac60af66b419040c47..c621ed5f71a94237364822646f96b79d26bd17db 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -4000,7 +4000,7 @@ ibuf_insert_to_index_page_low( (ulong) zip_size, (ulong) old_bits); fputs("InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); DBUG_RETURN(NULL); } @@ -4073,7 +4073,7 @@ ibuf_insert_to_index_page( " Please run CHECK TABLE on\n" "InnoDB: your tables.\n" "InnoDB: Submit a detailed bug report to" - " http://bugs.mysql.com!\n", stderr); + " https://jira.mariadb.org/\n", stderr); DBUG_VOID_RETURN; } @@ -4249,7 +4249,7 @@ ibuf_set_del_mark( fprintf(stderr, "\nspace %u offset %u" " (%u records, index id %llu)\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (unsigned) buf_block_get_space(block), (unsigned) buf_block_get_page_no(block), (unsigned) page_get_n_recs(page), @@ -4313,7 +4313,7 @@ ibuf_delete( fprintf(stderr, "\nspace %u offset %u" " (%u records, index id %llu)\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (unsigned) buf_block_get_space(block), (unsigned) buf_block_get_page_no(block), (unsigned) page_get_n_recs(page), @@ -4384,7 +4384,7 @@ ibuf_restore_pos( } else { fprintf(stderr, "InnoDB: ERROR: Submit the output to" - " http://bugs.mysql.com\n" + " https://jira.mariadb.org/\n" "InnoDB: ibuf cursor restoration fails!\n" "InnoDB: ibuf record inserted to page %lu:%lu\n", (ulong) space, (ulong) page_no); @@ -4703,7 +4703,7 @@ ibuf_merge_or_delete_for_page( "InnoDB: to determine if they are corrupt" " after this.\n\n" "InnoDB: Please submit a detailed bug report" - " to http://bugs.mysql.com\n\n", + " to https://jira.mariadb.org/\n\n", (ulong) page_no, (ulong) fil_page_get_type(block->frame)); @@ -5136,7 +5136,20 @@ ibuf_check_bitmap_on_import( return(DB_TABLE_NOT_FOUND); } - size = fil_space_get_size(space_id); + mtr_t mtr; + mtr_start(&mtr); + { + buf_block_t* sp = buf_page_get(space_id, zip_size, 0, + RW_S_LATCH, &mtr); + if (sp) { + size = mach_read_from_4( + FSP_HEADER_OFFSET + FSP_FREE_LIMIT + + sp->frame); + } else { + size = 0; + } + } + mtr_commit(&mtr); if (size == 0) { return(DB_TABLE_NOT_FOUND); @@ -5147,7 +5160,6 @@ ibuf_check_bitmap_on_import( page_size = zip_size ? zip_size : UNIV_PAGE_SIZE; for (page_no = 0; page_no < size; page_no += page_size) { - mtr_t mtr; page_t* bitmap_page; ulint i; diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 002e562f2832196bab84977b1f42aebc6204167a..857bdf9d2be77019ab6a6a586a0d5d66b1a75237 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -59,6 +59,7 @@ Created 11/5/1995 Heikki Tuuri #define BUF_GET_POSSIBLY_FREED 16 /*!< Like BUF_GET, but do not mind if the file page has been freed. */ +#define BUF_EVICT_IF_IN_POOL 20 /*!< evict a clean block if found */ /* @} */ /** @name Modes for buf_page_get_known_nowait */ /* @{ */ diff --git a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h index a7a65df33aa6615782ba03314288259db2025e27..308bda20c7b4af5f207b753dbf92d31a4d60109d 100644 --- a/storage/innobase/include/buf0lru.h +++ b/storage/innobase/include/buf0lru.h @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -51,19 +52,14 @@ These are low-level functions /** Minimum LRU list length for which the LRU_old pointer is defined */ #define BUF_LRU_OLD_MIN_LEN 512 /* 8 megabytes of 16k pages */ -/******************************************************************//** -Flushes all dirty pages or removes all pages belonging -to a given tablespace. A PROBLEM: if readahead is being started, what -guarantees that it will not try to read in pages after this operation -has completed? */ +/** Empty the flush list for all pages belonging to a tablespace. +@param[in] id tablespace identifier +@param[in] trx transaction, for checking for user interrupt; + or NULL if nothing is to be written +@param[in] drop_ahi whether to drop the adaptive hash index */ UNIV_INTERN void -buf_LRU_flush_or_remove_pages( -/*==========================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove, /*!< in: remove or flush strategy */ - const trx_t* trx); /*!< to check if the operation must - be interrupted */ +buf_LRU_flush_or_remove_pages(ulint id, const trx_t* trx, bool drop_ahi=false); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /********************************************************************//** diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h index 11bbc9b5c8a7f0c6c0d45317c27cdf3a06c5931c..511240d669d965427ba8e24dad6d733c675f1699 100644 --- a/storage/innobase/include/buf0types.h +++ b/storage/innobase/include/buf0types.h @@ -58,17 +58,6 @@ enum buf_flush_t { BUF_FLUSH_N_TYPES /*!< index of last element + 1 */ }; -/** Algorithm to remove the pages for a tablespace from the buffer pool. -See buf_LRU_flush_or_remove_pages(). */ -enum buf_remove_t { - BUF_REMOVE_ALL_NO_WRITE, /*!< Remove all pages from the buffer - pool, don't write or sync to disk */ - BUF_REMOVE_FLUSH_NO_WRITE, /*!< Remove only, from the flush list, - don't write or sync to disk */ - BUF_REMOVE_FLUSH_WRITE /*!< Flush dirty pages to disk only - don't remove from the buffer pool */ -}; - /** Flags for io_fix types */ enum buf_io_fix { BUF_IO_NONE = 0, /**< no pending I/O */ diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.ic index b4dbf4b1213ed78ca1c472cb27fbc0c2ff0f493a..bf433036e61bbe412abaa9da2c9870380c65e313 100644 --- a/storage/innobase/include/data0type.ic +++ b/storage/innobase/include/data0type.ic @@ -576,7 +576,7 @@ dtype_get_fixed_size_low( return(len); #endif /* !UNIV_HOTBACKUP */ /* Treat as variable-length. */ - /* Fall through */ + /* fall through */ case DATA_VARCHAR: case DATA_BINARY: case DATA_DECIMAL: diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 6e88c91557a73d162db789b56bd8c8e22e3c94c3..0d5ade1631e55160167d0cfafdb7fbe3a6edd3b8 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -620,17 +620,6 @@ dict_table_get_col_name( ulint col_nr) /*!< in: column number */ MY_ATTRIBUTE((nonnull, warn_unused_result)); /**********************************************************************//** -Returns a column's name. -@return column name. NOTE: not guaranteed to stay valid if table is -modified in any way (columns added, etc.). */ -UNIV_INTERN -const char* -dict_table_get_col_name_for_mysql( -/*==============================*/ - const dict_table_t* table, /*!< in: table */ - const char* col_name)/*!< in: MySQL table column name */ - MY_ATTRIBUTE((nonnull, warn_unused_result)); -/**********************************************************************//** Prints a table data. */ UNIV_INTERN void diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index 147968a343a049719064ff977d167660dc3ea0fc..22b96a58f66ec3f4f6378a0e039bbb665a6cd711 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2013, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -1076,6 +1076,27 @@ dict_table_x_lock_indexes( } } +/*********************************************************************//** +Returns true if the particular FTS index in the table is still syncing +in the background, false otherwise. +@param [in] table Table containing FTS index +@return True if sync of fts index is still going in the background */ +UNIV_INLINE +bool +dict_fts_index_syncing( + dict_table_t* table) +{ + dict_index_t* index; + + for (index = dict_table_get_first_index(table); + index != NULL; + index = dict_table_get_next_index(index)) { + if (index->index_fts_syncing) { + return(true); + } + } + return(false); +} /*********************************************************************//** Release the exclusive locks on all index tree. */ UNIV_INLINE diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 1c0f4d730062613eb0c49580961f3da902615daf..9a6cc0aa0c19c8e4a31354799d719cac73621ccd 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. Copyright (c) 2013, 2017, MariaDB Corporation. @@ -704,6 +704,8 @@ struct dict_index_t{ dict_sys->mutex. Other changes are protected by index->lock. */ dict_field_t* fields; /*!< array of field descriptions */ + bool index_fts_syncing;/*!< Whether the fts index is + still syncing in the background */ #ifndef UNIV_HOTBACKUP UT_LIST_NODE_T(dict_index_t) indexes;/*!< list of indexes of the table */ diff --git a/storage/innobase/include/dict0stats_bg.h b/storage/innobase/include/dict0stats_bg.h index 8f3385eb22b6a1365da013e942c0cf34ae76247b..66fcf7a09982e46221c13cc64fdc6ddfd61c53f1 100644 --- a/storage/innobase/include/dict0stats_bg.h +++ b/storage/innobase/include/dict0stats_bg.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -83,7 +83,7 @@ dict_stats_defrag_pool_del( /** Yield the data dictionary latch when waiting for the background thread to stop accessing a table. @param trx transaction holding the data dictionary locks */ -#define DICT_STATS_BG_YIELD(trx) do { \ +#define DICT_BG_YIELD(trx) do { \ row_mysql_unlock_data_dictionary(trx); \ os_thread_sleep(250000); \ row_mysql_lock_data_dictionary(trx); \ diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 38250949380d198f58d601d0b835d6d8d66bc145..81f207d1e2096ee3f550ed2042141c3b2ec2478a 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -851,18 +851,13 @@ fil_op_log_parse_or_replay( only be parsed but not replayed */ ulint log_flags); /*!< in: redo log flags (stored in the page number parameter) */ -/*******************************************************************//** -Deletes a single-table tablespace. The tablespace must be cached in the -memory cache. -@return TRUE if success */ +/** Delete a tablespace and associated .ibd file. +@param[in] id tablespace identifier +@param[in] drop_ahi whether to drop the adaptive hash index +@return DB_SUCCESS or error */ UNIV_INTERN dberr_t -fil_delete_tablespace( -/*==================*/ - ulint id, /*!< in: space id */ - buf_remove_t buf_remove); /*!< in: specify the action to take - on the tables pages in the buffer - pool */ +fil_delete_tablespace(ulint id, bool drop_ahi = false); /*******************************************************************//** Closes a single-table tablespace. The tablespace must be cached in the memory cache. Free all pages used by the tablespace. diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h index 7aa7055640c671743238450ed8f01d09ae812185..cd94956dc558678dbeb08d05aa06113356accbc3 100644 --- a/storage/innobase/include/fts0fts.h +++ b/storage/innobase/include/fts0fts.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, MariaDB Corporation. All Rights reserved. +Copyright (c) 2016, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -429,21 +429,6 @@ fts_update_next_doc_id( MY_ATTRIBUTE((nonnull(2))); /******************************************************************//** -Create a new document id . -@return DB_SUCCESS if all went well else error */ -UNIV_INTERN -dberr_t -fts_create_doc_id( -/*==============*/ - dict_table_t* table, /*!< in: row is of this - table. */ - dtuple_t* row, /*!< in/out: add doc id - value to this row. This is the - current row that is being - inserted. */ - mem_heap_t* heap) /*!< in: heap */ - MY_ATTRIBUTE((nonnull)); -/******************************************************************//** Create a new fts_doc_ids_t. @return new fts_doc_ids_t. */ UNIV_INTERN diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic index 6457e02d45593fa4f6bd011670b94211c86c2b12..bdfd98709d1939551311d60651a2353c9779856a 100644 --- a/storage/innobase/include/mtr0log.ic +++ b/storage/innobase/include/mtr0log.ic @@ -215,7 +215,7 @@ mlog_write_initial_log_record_fast( "%d on page %lu of space %lu in the " "doublewrite buffer, continuing anyway.\n" "Please post a bug report to " - "bugs.mysql.com.\n", + "https://jira.mariadb.org/\n", type, offset, space); ut_ad(0); } diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index fea6bd99799e800f4e27605e408748812ae65c29..6129d03fa09e1c9208e4e5f70bf9b1f0a03a0f4c 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -108,7 +108,6 @@ struct index_field_t { ulint col_no; /*!< column offset */ ulint prefix_len; /*!< column prefix length, or 0 if indexing the whole column */ - const char* col_name; /*!< column name or NULL */ }; /** Definition of an index being created */ @@ -265,11 +264,7 @@ row_merge_create_index( /*===================*/ trx_t* trx, /*!< in/out: trx (sets error_state) */ dict_table_t* table, /*!< in: the index is on this table */ - const index_def_t* index_def, - /*!< in: the index definition */ - const char** col_names); - /*! in: column names if columns are - renamed or NULL */ + const index_def_t* index_def); /*!< in: the index definition */ /*********************************************************************//** Check if a transaction can use an index. @return TRUE if index can be used by the transaction else FALSE */ diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index fb6caf2691ed245ea3696c4aa9597656729f9f8a..6b2c309e432c3f0708247e1d7a932ef16fe602d0 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -2351,6 +2351,7 @@ lock_rec_insert_by_trx_age( return DB_SUCCESS; } +#ifdef UNIV_DEBUG static bool lock_queue_validate( @@ -2384,6 +2385,7 @@ lock_queue_validate( } return true; } +#endif /* UNIV_DEBUG */ /*********************************************************************//** Enqueues a waiting request for a lock which cannot be granted immediately. @@ -2451,7 +2453,7 @@ lock_rec_enqueue_waiting( dict_index_name_print(stderr, trx, index); fputs(".\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); } @@ -5185,7 +5187,7 @@ lock_table_enqueue_waiting( ut_print_name(stderr, trx, TRUE, table->name); fputs(".\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); } diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc index fe1b41202eaf1f0a75606991d23e6aa5efc7c834..13d691187799082f7c64c8a66d0c657913956fde 100644 --- a/storage/innobase/log/log0crypt.cc +++ b/storage/innobase/log/log0crypt.cc @@ -246,7 +246,7 @@ log_blocks_crypt( ENCRYPTION_FLAG_DECRYPT @param[in] offs offset to block @param[in] space_id tablespace id -@return true if successfull, false in case of failure +@return true if successful, false in case of failure */ static bool diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 44093935bc73a07eec5ace6d01ef6a20a0aedb9a..e9abdc91ff8807152f030b25f83dc2de093ad61d 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -2335,12 +2335,21 @@ os_file_get_size( return(offset); #else - return((os_offset_t) lseek(file, 0, SEEK_END)); - + struct stat statbuf; + return fstat(file, &statbuf) ? os_offset_t(-1) : statbuf.st_size; #endif /* __WIN__ */ } -/** Set the size of a newly created file. +/** Extend a file. + +On Windows, extending a file allocates blocks for the file, +unless the file is sparse. + +On Unix, we will extend the file with ftruncate(), if +file needs to be sparse. Otherwise posix_fallocate() is used +when available, and if not, binary zeroes are added to the end +of file. + @param[in] name file name @param[in] file file handle @param[in] size desired file size @@ -2381,25 +2390,41 @@ os_file_set_size( if (srv_use_posix_fallocate) { int err; do { - err = posix_fallocate(file, 0, size); + os_offset_t current_size = os_file_get_size(file); + err = current_size >= size + ? 0 : posix_fallocate(file, current_size, + size - current_size); } while (err == EINTR && srv_shutdown_state == SRV_SHUTDOWN_NONE); - if (err) { + switch (err) { + case 0: + return true; + default: ib_logf(IB_LOG_LEVEL_ERROR, "preallocating " INT64PF " bytes for" "file %s failed with error %d", size, name, err); + /* fall through */ + case EINTR: + errno = err; + return false; + case EINVAL: + /* fall back to the code below */ + break; } - return(!err); } # endif + os_offset_t current_size = os_file_get_size(file); + + if (current_size >= size) { + return true; + } + /* Write up to 1 megabyte at a time. */ ulint buf_size = ut_min(64, (ulint) (size / UNIV_PAGE_SIZE)) * UNIV_PAGE_SIZE; - os_offset_t current_size = 0; - byte* buf2 = static_cast(calloc(1, buf_size + UNIV_PAGE_SIZE)); if (!buf2) { @@ -2429,11 +2454,12 @@ os_file_set_size( } current_size += n_bytes; - } while (current_size < size); + } while (current_size < size + && srv_shutdown_state == SRV_SHUTDOWN_NONE); free(buf2); - return(ret && os_file_flush(file)); + return(ret && current_size >= size && os_file_flush(file)); #endif } diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 801ac1ecc3519e84c9a28df1da2adbe8f4ef78e0..9cf55699d3f97fc58b188ba4b17aa3ef3e973fcd 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1601,18 +1601,16 @@ PageConverter::PageConverter( : AbstractCallback(trx), m_cfg(cfg), + m_index(cfg->m_indexes), + m_current_lsn(log_get_lsn()), m_page_zip_ptr(0), - m_heap(0) UNIV_NOTHROW + m_rec_iter(), + m_offsets_(), m_offsets(m_offsets_), + m_heap(0), + m_cluster_index(dict_table_get_first_index(cfg->m_table)) UNIV_NOTHROW { - m_index = m_cfg->m_indexes; - - m_current_lsn = log_get_lsn(); ut_a(m_current_lsn > 0); - - m_offsets = m_offsets_; rec_offs_init(m_offsets_); - - m_cluster_index = dict_table_get_first_index(m_cfg->m_table); } /** @@ -2103,7 +2101,7 @@ PageConverter::operator() ( we can work on them */ if ((err = update_page(block, page_type)) != DB_SUCCESS) { - return(err); + break; } /* Note: For compressed pages this function will write to the @@ -2140,9 +2138,15 @@ PageConverter::operator() ( "%s: Page %lu at offset " UINT64PF " looks corrupted.", m_filepath, (ulong) (offset / m_page_size), offset); - return(DB_CORRUPTION); + err = DB_CORRUPTION; } + /* If we already had and old page with matching number + in the buffer pool, evict it now, because + we no longer evict the pages on DISCARD TABLESPACE. */ + buf_page_get_gen(get_space_id(), get_zip_size(), block->page.offset, + RW_NO_LATCH, NULL, BUF_EVICT_IF_IN_POOL, + __FILE__, __LINE__, NULL); return(err); } @@ -3716,8 +3720,7 @@ row_import_for_mysql( The only dirty pages generated should be from the pessimistic purge of delete marked records that couldn't be purged in Phase I. */ - buf_LRU_flush_or_remove_pages( - prebuilt->table->space, BUF_REMOVE_FLUSH_WRITE, trx); + buf_LRU_flush_or_remove_pages(prebuilt->table->space, trx); if (trx_is_interrupted(trx)) { ib_logf(IB_LOG_LEVEL_INFO, "Phase III - Flush interrupted"); diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index cbbb584d6b637af636a63b0279d8b16fa6743a41..acbffb3a386a23ebf5e49ee532a0dbb7f54e7e93 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1137,7 +1137,7 @@ row_ins_foreign_check_on_constraint( rec_print(stderr, clust_rec, clust_index); fputs("\n" "InnoDB: Submit a detailed bug report to" - " http://bugs.mysql.com\n", stderr); + " https://jira.mariadb.org/\n", stderr); ut_ad(0); err = DB_SUCCESS; @@ -1291,12 +1291,11 @@ row_ins_foreign_check_on_constraint( #ifdef WITH_WSREP err = wsrep_append_foreign_key( - thr_get_trx(thr), - foreign, - clust_rec, - clust_index, - FALSE, - (node) ? TRUE : FALSE); + thr_get_trx(thr), + foreign, + clust_rec, + clust_index, + FALSE, FALSE); if (err != DB_SUCCESS) { fprintf(stderr, "WSREP: foreign key append failed: %d\n", err); diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index ec6b4a6068042978799c58b257aba6c4d6f3d1f6..9107ad6236c9b9ef65d8353b3110e47e2ddbe5fa 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -182,7 +182,6 @@ struct row_log_t { dict_table_t* table; /*!< table that is being rebuilt, or NULL when this is a secondary index that is being created online */ - dict_index_t* index; /*!< index to be build */ bool same_pk;/*!< whether the definition of the PRIMARY KEY has remained the same */ const dtuple_t* add_cols; @@ -385,7 +384,7 @@ row_log_online_op( byte_offset, index->table->space)) { log->error = DB_DECRYPTION_FAILED; - goto err_exit; + goto write_failed; } srv_stats.n_rowlog_blocks_encrypted.inc(); @@ -479,13 +478,15 @@ static MY_ATTRIBUTE((nonnull)) void row_log_table_close_func( /*=====================*/ - row_log_t* log, /*!< in/out: online rebuild log */ + dict_index_t* index, /*!< in/out: online rebuilt index */ #ifdef UNIV_DEBUG const byte* b, /*!< in: end of log record */ #endif /* UNIV_DEBUG */ ulint size, /*!< in: size of log record */ ulint avail) /*!< in: available size for log record */ { + row_log_t* log = index->online_log; + ut_ad(mutex_own(&log->mutex)); if (size >= avail) { @@ -520,7 +521,7 @@ row_log_table_close_func( srv_sort_buf_size, log->crypt_tail, byte_offset, - log->index->table->space)) { + index->table->space)) { log->error = DB_DECRYPTION_FAILED; goto err_exit; } @@ -559,11 +560,11 @@ row_log_table_close_func( } #ifdef UNIV_DEBUG -# define row_log_table_close(log, b, size, avail) \ - row_log_table_close_func(log, b, size, avail) +# define row_log_table_close(index, b, size, avail) \ + row_log_table_close_func(index, b, size, avail) #else /* UNIV_DEBUG */ # define row_log_table_close(log, b, size, avail) \ - row_log_table_close_func(log, size, avail) + row_log_table_close_func(index, size, avail) #endif /* UNIV_DEBUG */ /******************************************************//** @@ -735,8 +736,7 @@ row_log_table_delete( b += ext_size; } - row_log_table_close( - index->online_log, b, mrec_size, avail_size); + row_log_table_close(index, b, mrec_size, avail_size); } func_exit: @@ -859,8 +859,7 @@ row_log_table_low_redundant( b + extra_size, index, tuple->fields, tuple->n_fields); b += size; - row_log_table_close( - index->online_log, b, mrec_size, avail_size); + row_log_table_close(index, b, mrec_size, avail_size); } mem_heap_free(heap); @@ -969,8 +968,7 @@ row_log_table_low( memcpy(b, rec, rec_offs_data_size(offsets)); b += rec_offs_data_size(offsets); - row_log_table_close( - index->online_log, b, mrec_size, avail_size); + row_log_table_close(index, b, mrec_size, avail_size); } } @@ -2678,7 +2676,7 @@ row_log_table_apply_ops( /* If encryption is enabled decrypt buffer after reading it from file system. */ - if (log_tmp_is_encrypted()) { + if (success && log_tmp_is_encrypted()) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size, index->online_log->crypt_head, @@ -2999,7 +2997,6 @@ row_log_allocate( log->head.total = 0; log->path = path; log->crypt_tail = log->crypt_head = NULL; - log->index = index; dict_index_set_online_status(index, ONLINE_INDEX_CREATION); index->online_log = log; @@ -3548,7 +3545,7 @@ row_log_apply_ops( /* If encryption is enabled decrypt buffer after reading it from file system. */ - if (log_tmp_is_encrypted()) { + if (success && log_tmp_is_encrypted()) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size, index->online_log->crypt_head, diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 62dc98a3e3046556c5d24ead0ea9521038229fd8..f4120e5fd90839e5a98724b1239c875a9297836a 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -880,8 +880,8 @@ row_merge_read( success = os_file_read_no_error_handling_int_fd(fd, buf, ofs, srv_sort_buf_size); - /* For encrypted tables, decrypt data after reading and copy data */ - if (log_tmp_is_encrypted()) { + /* If encryption is enabled decrypt buffer */ + if (success && log_tmp_is_encrypted()) { if (!log_tmp_block_decrypt(buf, srv_sort_buf_size, crypt_buf, ofs, space)) { return (FALSE); @@ -3733,11 +3733,7 @@ row_merge_create_index( /*===================*/ trx_t* trx, /*!< in/out: trx (sets error_state) */ dict_table_t* table, /*!< in: the index is on this table */ - const index_def_t* index_def, - /*!< in: the index definition */ - const char** col_names) - /*! in: column names if columns are - renamed or NULL */ + const index_def_t* index_def) /*!< in: the index definition */ { dict_index_t* index; dberr_t err; @@ -3757,28 +3753,10 @@ row_merge_create_index( for (i = 0; i < n_fields; i++) { index_field_t* ifield = &index_def->fields[i]; - const char * col_name; - - /* - Alter table renaming a column and then adding a index - to this new name e.g ALTER TABLE t - CHANGE COLUMN b c INT NOT NULL, ADD UNIQUE INDEX (c); - requires additional check as column names are not yet - changed when new index definitions are created. Table's - new column names are on a array of column name pointers - if any of the column names are changed. */ - - if (col_names && col_names[i]) { - col_name = col_names[i]; - } else { - col_name = ifield->col_name ? - dict_table_get_col_name_for_mysql(table, ifield->col_name) : - dict_table_get_col_name(table, ifield->col_no); - } dict_mem_index_add_field( index, - col_name, + dict_table_get_col_name(table, ifield->col_no), ifield->prefix_len); } @@ -3915,22 +3893,13 @@ row_merge_build_indexes( DBUG_RETURN(DB_OUT_OF_MEMORY); } - /* Get crypt data from tablespace if present. We should be protected - from concurrent DDL (e.g. drop table) by MDL-locks. */ - fil_space_t* space = fil_space_acquire(new_table->space); - - if (!space) { - DBUG_RETURN(DB_TABLESPACE_NOT_FOUND); - } - - /* If tablespace is encrypted, allocate additional buffer for + /* If temporal log file is encrypted allocate memory for encryption/decryption. */ if (log_tmp_is_encrypted()) { crypt_block = static_cast( os_mem_alloc_large(&block_size)); if (crypt_block == NULL) { - fil_space_release(space); DBUG_RETURN(DB_OUT_OF_MEMORY); } } @@ -4310,9 +4279,5 @@ row_merge_build_indexes( } } - if (space) { - fil_space_release(space); - } - DBUG_RETURN(error); } diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 1d64d66cd49b2d69c461466834996b01ddf32a17..dcf4413a1c4267efcce26ee308d7d784ffa4383a 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2015, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -59,6 +59,7 @@ Created 9/17/2000 Heikki Tuuri #include "btr0defragment.h" #include "fil0fil.h" #include "fil0crypt.h" +#include "srv0srv.h" #include "ibuf0ibuf.h" #include "fts0fts.h" #include "fts0types.h" @@ -570,11 +571,33 @@ row_mysql_convert_row_to_innobase( /* If there is a FTS doc id column and it is not user supplied ( generated by server) then assign it a new doc id. */ - if (prebuilt->table->fts) { + if (!prebuilt->table->fts) { + return; + } - ut_a(prebuilt->table->fts->doc_col != ULINT_UNDEFINED); + ut_a(prebuilt->table->fts->doc_col != ULINT_UNDEFINED); - fts_create_doc_id(prebuilt->table, row, prebuilt->heap); + doc_id_t doc_id; + + if (!DICT_TF2_FLAG_IS_SET(prebuilt->table, DICT_TF2_FTS_HAS_DOC_ID)) { + if (prebuilt->table->fts->cache->first_doc_id + == FTS_NULL_DOC_ID) { + fts_get_next_doc_id(prebuilt->table, &doc_id); + } + return; + } + + dfield_t* fts_doc_id = dtuple_get_nth_field( + row, prebuilt->table->fts->doc_col); + + if (fts_get_next_doc_id(prebuilt->table, &doc_id) == DB_SUCCESS) { + ut_a(doc_id != FTS_NULL_DOC_ID); + ut_ad(sizeof(doc_id) == fts_doc_id->type.len); + dfield_set_data(fts_doc_id, prebuilt->ins_upd_rec_buff + + prebuilt->mysql_row_len, 8); + fts_write_doc_id(fts_doc_id->data, doc_id); + } else { + dfield_set_null(fts_doc_id); } } @@ -1049,7 +1072,10 @@ row_get_prebuilt_insert_row( prebuilt->ins_upd_rec_buff = static_cast( mem_heap_alloc( prebuilt->heap, - prebuilt->mysql_row_len)); + DICT_TF2_FLAG_IS_SET(prebuilt->table, + DICT_TF2_FTS_HAS_DOC_ID) + ? prebuilt->mysql_row_len + 8/* FTS_DOC_ID */ + : prebuilt->mysql_row_len)); } dtuple_t* row; @@ -2451,10 +2477,7 @@ row_create_table_for_mysql( /* We already have .ibd file here. it should be deleted. */ if (table->space - && fil_delete_tablespace( - table->space, - BUF_REMOVE_FLUSH_NO_WRITE) - != DB_SUCCESS) { + && fil_delete_tablespace(table->space) != DB_SUCCESS) { ut_print_timestamp(stderr); fprintf(stderr, @@ -3083,9 +3106,6 @@ row_discard_tablespace( 4) FOREIGN KEY operations: if table->n_foreign_key_checks_running > 0, we do not allow the discard. */ - /* Play safe and remove all insert buffer entries, though we should - have removed them already when DISCARD TABLESPACE was called */ - ibuf_delete_for_discarded_space(table->space); table_id_t new_id; @@ -4001,6 +4021,16 @@ row_drop_table_for_mysql( ut_ad(!table->fts->add_wq); ut_ad(lock_trx_has_sys_table_locks(trx) == 0); + for (;;) { + bool retry = false; + if (dict_fts_index_syncing(table)) { + retry = true; + } + if (!retry) { + break; + } + DICT_BG_YIELD(trx); + } row_mysql_unlock_data_dictionary(trx); fts_optimize_remove_table(table); row_mysql_lock_data_dictionary(trx); @@ -4460,9 +4490,7 @@ row_drop_table_for_mysql( fil_delete_file(filepath); - } else if (fil_delete_tablespace( - space_id, - BUF_REMOVE_FLUSH_NO_WRITE) + } else if (fil_delete_tablespace(space_id) != DB_SUCCESS) { fprintf(stderr, "InnoDB: We removed now the InnoDB" diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc index 583fbe60fb34b4ccb60c4e8772b6553aa00789d4..6c4e6adb96ce6e655bbbf2972b9b6d726ac166b5 100644 --- a/storage/innobase/row/row0quiesce.cc +++ b/storage/innobase/row/row0quiesce.cc @@ -1,6 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -542,8 +543,7 @@ row_quiesce_table_start( } if (!trx_is_interrupted(trx)) { - buf_LRU_flush_or_remove_pages( - table->space, BUF_REMOVE_FLUSH_WRITE, trx); + buf_LRU_flush_or_remove_pages(table->space, trx); if (trx_is_interrupted(trx)) { diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 04894d29e683ab250bb0981d1da3854412303993..d309cf4c7422671de8bcde791bb5d6469754bceb 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -2724,6 +2724,7 @@ row_sel_field_store_in_mysql_format_func( case DATA_SYS: /* These column types should never be shipped to MySQL. */ ut_ad(0); + /* fall through */ case DATA_CHAR: case DATA_FIXBINARY: @@ -2758,8 +2759,6 @@ row_sel_field_store_in_mysql_format_func( @param[in] field_no templ->rec_field_no or templ->clust_rec_field_no or templ->icp_rec_field_no - or sec field no if clust_templ_for_sec - is TRUE @param[in] templ row template */ static MY_ATTRIBUTE((warn_unused_result)) @@ -2912,10 +2911,6 @@ be needed in the query. @param[in] rec_clust TRUE if the rec in the clustered index @param[in] index index of rec @param[in] offsets array returned by rec_get_offsets(rec) -@param[in] clust_templ_for_sec TRUE if rec belongs to secondary index - but the prebuilt->template is in - clustered index format and it is - used only for end range comparison @return TRUE on success, FALSE if not all columns could be retrieved */ static MY_ATTRIBUTE((warn_unused_result)) ibool @@ -3098,7 +3093,7 @@ row_sel_get_clust_rec_for_mysql( trx_print(stderr, trx, 600); fputs("\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); } diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index a97c89212a24fb7fe1e8f8e25c664f90cec8c6dc..4aa5cfdc4da637105c9706ed76ebdbfff16e15d6 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -683,7 +683,7 @@ row_undo_mod_del_unmark_sec_and_undo_update( trx_print(stderr, trx, 0); fputs("\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ib_logf(IB_LOG_LEVEL_WARN, "record in index %s was not found" diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index ba874ac6deceaf4e0ec6f14bd0d80ceaeb3cbe39..ef51e2046ae41ebd9e2db76e1fffba0671af34a2 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -1952,7 +1952,7 @@ row_upd_sec_index_entry( trx_print(stderr, trx, 0); fputs("\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + " to https://jira.mariadb.org/\n", stderr); ut_ad(0); break; case ROW_FOUND: diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 1431211279bfb8ff3814cfca44014ef4d5a3ea06..749ece33a067fb1fdd54903d53f91edd4fdf3f57 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -1914,7 +1914,7 @@ DECLARE_THREAD(srv_error_monitor_thread)(void*) " was greater\n" "InnoDB: than the new log sequence number " LSN_PF "!\n" "InnoDB: Please submit a bug report" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org\n", old_lsn, new_lsn); ut_ad(0); } diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index 8eff14e0e993777a61b1df25fca67fd947af35f6..5553de4814fe42fc8ed84d1f17c08c7f221a82b4 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -603,7 +603,7 @@ trx_purge_rseg_get_next_history_log( "InnoDB: but its length is still" " reported as %lu! Make a detailed bug\n" "InnoDB: report, and submit it" - " to http://bugs.mysql.com\n", + " to https://jira.mariadb.org/\n", (ulong) trx_sys->rseg_history_len); ut_ad(0); } diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index ab92d1ef06cdf1bb1c528958c58306273a621a64..1010f60940b4875dea14c66c03a063daf6d34242 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -772,7 +772,25 @@ trx_undo_page_report_modify( const dict_col_t* col = dict_table_get_nth_col(table, col_no); - if (col->ord_part) { + if (!col->ord_part) { + continue; + } + + if (update) { + for (i = 0; i < update->n_fields; i++) { + const dict_field_t* f + = dict_index_get_nth_field( + index, + upd_get_nth_field( + update, i) + ->field_no); + if (f->col == col) { + goto already_logged; + } + } + } + + if (TRUE) { ulint pos; /* Write field number to undo log */ @@ -823,6 +841,9 @@ trx_undo_page_report_modify( ptr += flen; } } + +already_logged: + continue; } mach_write_to_2(old_ptr, ptr - old_ptr); @@ -1001,7 +1022,7 @@ trx_undo_update_rec_get_update( fprintf(stderr, "\n" "InnoDB: but index has only %lu fields\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n" + " to https://jira.mariadb.org/\n" "InnoDB: Run also CHECK TABLE ", (ulong) dict_index_get_n_fields(index)); ut_print_name(stderr, trx, TRUE, index->table_name); diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index c7db5cb5efb28fc0c16690537d21ba3686fa062d..1cd0b6ede51237bee3b402e8f8adabe7b989f89c 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -314,8 +314,9 @@ trx_free_prepared( trx_t* trx) /*!< in, own: trx object */ { ut_a(trx_state_eq(trx, TRX_STATE_PREPARED) - || (trx_state_eq(trx, TRX_STATE_ACTIVE) - && trx->is_recovered + || (trx->is_recovered + && (trx_state_eq(trx, TRX_STATE_ACTIVE) + || trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY)) && (srv_read_only_mode || srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO))); ut_a(trx->magic_n == TRX_MAGIC_N); @@ -2434,4 +2435,3 @@ trx_start_for_ddl_low( ut_error; } - diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index 220589dd9ff4a3f46c8cd95d62ee6b94f21a06d4..1836d282cd44f86b5a71949bbaf8aba59e8e99ee 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2017, MariaDB Corporation. All Rights Reserved. +Copyright (c) 2014, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2015,6 +2015,12 @@ trx_undo_free_prepared( switch (trx->update_undo->state) { case TRX_UNDO_PREPARED: break; + case TRX_UNDO_CACHED: + case TRX_UNDO_TO_FREE: + case TRX_UNDO_TO_PURGE: + ut_ad(trx_state_eq(trx, + TRX_STATE_COMMITTED_IN_MEMORY)); + /* fall through */ case TRX_UNDO_ACTIVE: /* lock_trx_release_locks() assigns trx->is_recovered=false */ @@ -2033,6 +2039,12 @@ trx_undo_free_prepared( switch (trx->insert_undo->state) { case TRX_UNDO_PREPARED: break; + case TRX_UNDO_CACHED: + case TRX_UNDO_TO_FREE: + case TRX_UNDO_TO_PURGE: + ut_ad(trx_state_eq(trx, + TRX_STATE_COMMITTED_IN_MEMORY)); + /* fall through */ case TRX_UNDO_ACTIVE: /* lock_trx_release_locks() assigns trx->is_recovered=false */ diff --git a/storage/innobase/ut/ut0dbg.cc b/storage/innobase/ut/ut0dbg.cc index a1cad144da4d1a1abb76fe2faa2e2af0ba174117..a0bd82b385ab4b64d4a2033ae00c0f2bac18232f 100644 --- a/storage/innobase/ut/ut0dbg.cc +++ b/storage/innobase/ut/ut0dbg.cc @@ -63,7 +63,7 @@ ut_dbg_assertion_failed( fputs("InnoDB: We intentionally generate a memory trap.\n" "InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com.\n" + " to https://jira.mariadb.org/\n" "InnoDB: If you get repeated assertion failures" " or crashes, even\n" "InnoDB: immediately after the mysqld startup, there may be\n" diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c index 99c9df2303060bf4a8d28edbeefae39772b6535e..6c74bb52f513adf1d79448ab127d121f88585cbc 100644 --- a/storage/maria/ma_extra.c +++ b/storage/maria/ma_extra.c @@ -314,7 +314,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function, share->state.open_count= 1; share->changed= 1; _ma_mark_file_changed_now(share); - /* Fall through */ + /* fall through */ case HA_EXTRA_PREPARE_FOR_RENAME: { my_bool do_flush= MY_TEST(function != HA_EXTRA_PREPARE_FOR_DROP); @@ -660,4 +660,3 @@ my_bool ma_killed_standalone(MARIA_HA *info __attribute__((unused))) { return 0; } - diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index defa11ad6b4900a2d1a11013260458ab421fe7e9..7a3d4a216ddef17232d247871bf205e93c446812 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -2727,7 +2727,7 @@ static my_bool translog_recover_page_up_to_sector(uchar *page, uint16 offset) DBUG_PRINT("enter", ("offset: %u first chunk: %u", (uint) offset, (uint) chunk_offset)); - while (page[chunk_offset] != TRANSLOG_FILLER && chunk_offset < offset) + while (chunk_offset < offset && page[chunk_offset] != TRANSLOG_FILLER) { uint16 chunk_length; if ((chunk_length= diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c index b1d2378870f442ce96fea062a6ba5c517087068c..b0b547a3070784e7df08757fd8939443dd88c6b9 100644 --- a/storage/maria/ma_recovery.c +++ b/storage/maria/ma_recovery.c @@ -3058,7 +3058,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const case LOGREC_REDO_INDEX: case LOGREC_REDO_INDEX_FREE_PAGE: index_page_redo_entry= 1; - /* Fall through */ + /* fall through*/ case LOGREC_REDO_INSERT_ROW_HEAD: case LOGREC_REDO_INSERT_ROW_TAIL: case LOGREC_REDO_PURGE_ROW_HEAD: diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt index 39dad9ce16b6a6d746165edea0fe30682beffd97..5d8e8c1eeb83bcf21233c754664a8ea06eeff542 100644 --- a/storage/mroonga/CMakeLists.txt +++ b/storage/mroonga/CMakeLists.txt @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA cmake_minimum_required(VERSION 2.6) project(mroonga) @@ -51,6 +51,14 @@ if(MSVC) endif() endif() +if(MRN_BUNDLED) + if(WITHOUT_MROONGA OR + WITHOUT_MROONGA_STORAGE_ENGINE OR + "${PLUGIN_MROONGA}" STREQUAL "NO") + return() + endif() +endif() + set(MRN_BUNDLED_GROONGA_RELATIVE_DIR "vendor/groonga") set(MRN_BUNDLED_GROONGA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") @@ -79,6 +87,58 @@ file(READ ${MRN_SOURCE_DIR}/version_micro MRN_VERSION_MICRO) file(READ ${MRN_SOURCE_DIR}/version_in_hex MRN_VERSION_IN_HEX) file(READ ${MRN_SOURCE_DIR}/plugin_version MRN_PLUGIN_VERSION) +if(MRN_GROONGA_BUNDLED) + option(MRN_GROONGA_EMBED + "Embed libgroonga" + ON) + if(MRN_GROONGA_EMBED) + set(GRN_EMBED ON) + endif() + + set(MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR + "${MRN_BUNDLED_GROONGA_DIR}/vendor/plugins/groonga-normalizer-mysql") + option(MRN_GROONGA_NORMALIZER_MYSQL_EMBED + "Embed groonga-normalizer-mysql Groonga plugin" + ON) + if(EXISTS ${MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR}) + set(GROONGA_NORMALIZER_MYSQL_FOUND ON) + else() + set(GROONGA_NORMALIZER_MYSQL_FOUND OFF) + set(MRN_GROONGA_NORMALIZER_MYSQL_EMBED OFF) + endif() + if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) + set(GROONGA_NORMALIZER_MYSQL_EMBED ON) + endif() + + file(READ "${MRN_BUNDLED_GROONGA_DIR}/bundled_lz4_version" + MRN_BUNDLED_LZ4_VERSION) + string(STRIP + "${MRN_BUNDLED_LZ4_VERSION}" + MRN_BUNDLED_LZ4_VERSION) + set(MRN_BUNDLED_LZ4_DIR + "${MRN_BUNDLED_GROONGA_DIR}/vendor/lz4-${MRN_BUNDLED_LZ4_VERSION}") + if(EXISTS ${MRN_BUNDLED_LZ4_DIR}) + set(GRN_WITH_BUNDLED_LZ4 ON) + set(GRN_WITH_LZ4 "yes") + else() + set(GRN_WITH_LZ4 "no") + endif() + + add_subdirectory("${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") +else() + set(MRN_GROONGA_EMBED OFF) + + file(READ ${MRN_SOURCE_DIR}/required_groonga_version REQUIRED_GROONGA_VERSION) + string(STRIP "${REQUIRED_GROONGA_VERSION}" REQUIRED_GROONGA_VERSION) + + file(READ + ${MRN_SOURCE_DIR}/required_groonga_normalizer_mysql_version + REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) + string(STRIP + "${REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION}" + REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) +endif() + set(MRN_PACKAGE_STRING "${PROJECT_NAME} ${MRN_VERSION}") include(CheckCCompilerFlag) @@ -107,18 +167,7 @@ read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/udf/sources.am MRN_UDF_SOURCES) string(REGEX REPLACE "([^;]+)" "${MRN_RELATIVE_DIR_PREFIX}udf/\\1" MRN_UDF_SOURCES "${MRN_UDF_SOURCES}") -set(MRN_ALL_SOURCES - ${MRN_SOURCES} - ${MRN_UDF_SOURCES} - ${LIBMRN_NO_MYSQL_SOURCES} - ${LIBMRN_NEED_MYSQL_SOURCES}) - if(MRN_BUNDLED) - mysql_add_plugin(mroonga ${MRN_ALL_SOURCES} STORAGE_ENGINE MODULE_ONLY) - if(NOT TARGET mroonga) - return() - endif() - set(MYSQL_SOURCE_DIR ${CMAKE_SOURCE_DIR}) set(MYSQL_BUILD_DIR ${MYSQL_SOURCE_DIR}) set(MYSQL_CONFIG ${CMAKE_SOURCE_DIR}/scripts/mysql_config) @@ -134,44 +183,6 @@ else() endif() find_path(MYSQL_CONFIG "${MYSQL_CONFIG}") -if(MRN_GROONGA_BUNDLED) - option(MRN_GROONGA_EMBED - "Embed libgroonga" - ON) - if(MRN_GROONGA_EMBED) - set(GRN_EMBED ON) - endif() - - set(MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR - "${MRN_BUNDLED_GROONGA_DIR}/vendor/plugins/groonga-normalizer-mysql") - option(MRN_GROONGA_NORMALIZER_MYSQL_EMBED - "Embed groonga-normalizer-mysql Groonga plugin" - ON) - if(EXISTS ${MRN_BUNDLED_GROONGA_NORMALIZER_MYSQL_DIR}) - set(GROONGA_NORMALIZER_MYSQL_FOUND ON) - else() - set(GROONGA_NORMALIZER_MYSQL_FOUND OFF) - set(MRN_GROONGA_NORMALIZER_MYSQL_EMBED OFF) - endif() - if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) - set(GROONGA_NORMALIZER_MYSQL_EMBED ON) - endif() - - add_subdirectory("${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") -else() - set(MRN_GROONGA_EMBED OFF) - - file(READ ${MRN_SOURCE_DIR}/required_groonga_version REQUIRED_GROONGA_VERSION) - string(STRIP "${REQUIRED_GROONGA_VERSION}" REQUIRED_GROONGA_VERSION) - - file(READ - ${MRN_SOURCE_DIR}/required_groonga_normalizer_mysql_version - REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) - string(STRIP - "${REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION}" - REQUIRED_GROONGA_NORMALIZER_MYSQL_VERSION) -endif() - if(EXISTS "${MYSQL_SOURCE_DIR}/storage/maria") set(MYSQL_VARIANT "MariaDB") else() @@ -194,6 +205,7 @@ if(EXISTS "${MYSQL_SOURCE_DIR}/libbinlogevents") set(MYSQL_LIBBINLOGEVENTS_EXPORT_DIR "${MYSQL_SOURCE_DIR}/libbinlogevents/export") set(MYSQL_LIBBINLOGEVENTS_INCLUDE_DIR + "${MYSQL_BUILD_DIR}/libbinlogevents/include" "${MYSQL_SOURCE_DIR}/libbinlogevents/include") else() set(MYSQL_LIBBINLOGEVENTS_EXPORT_DIR) @@ -270,6 +282,7 @@ else() set(MRN_LIBRARY_DIRS ${MRN_LIBRARY_DIRS} ${GROONGA_LIBRARY_DIRS}) + set(MRN_LIBRARIES ${GROONGA_LIBRARIES}) endif() include_directories( @@ -291,11 +304,17 @@ link_directories( ${MRN_LIBRARY_DIRS} ${MYSQL_LIBRARY_DIRS}) +set(MRN_ALL_SOURCES + ${MRN_SOURCES} + ${MRN_UDF_SOURCES} + ${LIBMRN_NO_MYSQL_SOURCES} + ${LIBMRN_NEED_MYSQL_SOURCES}) + if(MRN_BUNDLED) - target_link_libraries(mroonga ${MRN_LIBRARIES}) - if(NOT TARGET mroonga) - return() - endif() + mysql_add_plugin(mroonga + ${MRN_ALL_SOURCES} + STORAGE_ENGINE MODULE_ONLY + LINK_LIBRARIES ${MRN_LIBRARIES}) else() add_library(mroonga MODULE ${MRN_ALL_SOURCES}) @@ -340,9 +359,14 @@ else() MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated") MY_CHECK_AND_SET_COMPILER_FLAG("-fno-implicit-templates") - MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions") - MY_CHECK_AND_SET_COMPILER_FLAG("-fno-rtti") + if(("${MYSQL_VARIANT}" STREQUAL "MariaDB") OR + ("${MYSQL_VARIANT}" STREQUAL "MySQL" AND + ${MYSQL_VERSION} VERSION_LESS "5.7.0")) + MY_CHECK_AND_SET_COMPILER_FLAG("-fno-exceptions") + MY_CHECK_AND_SET_COMPILER_FLAG("-fno-rtti") + endif() MY_CHECK_AND_SET_COMPILER_FLAG("-felide-constructors") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") endif() set_source_files_properties(${MRN_SOURCES} PROPERTIES COMPILE_FLAGS "${MYSQL_CFLAGS} ${MRN_CXX_COMPILE_FLAGS}") @@ -361,10 +385,20 @@ else() install(TARGETS mroonga DESTINATION "${MYSQL_PLUGIN_DIR}") endif() +option(MRN_BUILD_FOR_EMBEDDED_SERVER + "Whether to build Mroonga for embedded server or not. You can't use Mroonga built for embedded server with non embedded server." + OFF) +if(MRN_BUILD_FOR_EMBEDDED_SERVER) + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "EMBEDDED_LIBRARY") +endif() + if(GROONGA_NORMALIZER_MYSQL_FOUND) - add_definitions("-DWITH_GROONGA_NORMALIZER_MYSQL=1") + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "WITH_GROONGA_NORMALIZER_MYSQL=1") if(MRN_GROONGA_NORMALIZER_MYSQL_EMBED) - add_definitions("-DMRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED") + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "MRN_GROONGA_NORMALIZER_MYSQL_EMBEDDED") else() set_property(TARGET mroonga APPEND PROPERTY COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_PLUGIN_NAME=\"normalizers/mysql\"") @@ -372,7 +406,8 @@ if(GROONGA_NORMALIZER_MYSQL_FOUND) endif() if(MRN_GROONGA_EMBED) - add_definitions("-DMRN_GROONGA_EMBEDDED") + set_property(TARGET mroonga APPEND PROPERTY + COMPILE_DEFINITIONS "MRN_GROONGA_EMBEDDED") endif() set(MRN_DEFAULT_PARSER "" CACHE STRING @@ -418,6 +453,8 @@ else() set(MRN_DATA_DIR "share/${PROJECT_NAME}") endif() install(FILES + "${PROJECT_SOURCE_DIR}/AUTHORS" + "${PROJECT_SOURCE_DIR}/COPYING" "${PROJECT_BINARY_DIR}/data/install.sql" "${PROJECT_SOURCE_DIR}/data/uninstall.sql" DESTINATION "${MRN_DATA_DIR}/") diff --git a/storage/mroonga/Makefile.am b/storage/mroonga/Makefile.am index d783ec883f9d7098be6cf2eb5465af59e8c65bc1..69349ea6a8d9b869d3a21ae8e147133046e668c6 100644 --- a/storage/mroonga/Makefile.am +++ b/storage/mroonga/Makefile.am @@ -1,9 +1,9 @@ +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_ARGS} AUTOMAKE_OPTIONS = 1.9.7 LOCALES = ja AM_CPPFLAGS = $(MYSQL_INCLUDES) $(GROONGA_CFLAGS) -I$(top_srcdir)/lib -ACLOCAL_AMFLAGS = $$ACLOCAL_ARGS include sources.am @@ -49,7 +49,13 @@ tag: cd $(top_srcdir) && \ git tag v$(VERSION) -a -m 'Mroonga $(VERSION)!!!' -update-latest-release: misc +ensure-cutter-source-path: + @if test -z "$(CUTTER_SOURCE_PATH)"; then \ + echo "\$$(CUTTER_SOURCE_PATH) is missing"; \ + exit 1; \ + fi + +update-latest-release: ensure-cutter-source-path @if test -z "$(OLD_RELEASE)"; then \ echo "\$$(OLD_RELEASE) is missing"; \ exit 1; \ @@ -63,17 +69,40 @@ update-latest-release: misc exit 1; \ fi cd $(top_srcdir) && \ - misc/update-latest-release.rb \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ $(PACKAGE) $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ $(VERSION) $(NEW_RELEASE_DATE) \ packages/rpm/centos/mariadb-mroonga.spec.in \ + packages/rpm/centos/mariadb-10.1-mroonga.spec.in \ + packages/rpm/centos/mariadb-10.2-mroonga.spec.in \ packages/rpm/centos/mysql55-mroonga.spec.in \ packages/rpm/centos/mysql56-community-mroonga.spec.in \ - packages/debian/changelog \ + packages/rpm/centos/mysql57-community-mroonga.spec.in \ + packages/rpm/centos/percona-server-56-mroonga.spec.in \ + packages/rpm/centos/percona-server-57-mroonga.spec.in \ doc/source/install/*.rst \ doc/locale/*/LC_MESSAGES/install.po \ - $(MROONGA_GITHUB_COM_PATH)/index.html \ - $(MROONGA_GITHUB_COM_PATH)/ja/index.html + $(MROONGA_GITHUB_COM_PATH)/_config.yml + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-5.5 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-5.5/changelog + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-5.6 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-5.6/changelog + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-5.7 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-5.7/changelog + cd $(top_srcdir) && \ + "$(CUTTER_SOURCE_PATH)/misc/update-latest-release.rb" \ + $(PACKAGE)-mariadb-10.0 $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ + $(VERSION) $(NEW_RELEASE_DATE) \ + packages/debian-mariadb-10.0/changelog update-po: @for lang in $(LOCALES); do \ @@ -144,10 +173,3 @@ upload-to-github: echo-cutter: echo $(CUTTER) - -misc: - @if test -z "$(CUTTER_SOURCE_PATH)"; then \ - echo "\$$(CUTTER_SOURCE_PATH) is missing"; \ - exit 1; \ - fi - ln -s "$(CUTTER_SOURCE_PATH)/misc" misc diff --git a/storage/mroonga/appveyor.yml b/storage/mroonga/appveyor.yml index 038d590054ead23187e7b8bfe71e645fc2207b22..3cf8ff8d3318a91640f3e20b71bfd79fcfdcbf7c 100644 --- a/storage/mroonga/appveyor.yml +++ b/storage/mroonga/appveyor.yml @@ -1,54 +1,63 @@ version: "{build}" clone_depth: 10 +environment: + global: + MARIADB_VERSION: 10.1.26 + matrix: + - CMAKE_GENERATOR_NAME: "Visual Studio 14 2015" + - CMAKE_GENERATOR_NAME: "Visual Studio 14 2015 Win64" + install: - cd .. - choco install -y curl 7zip.commandline - - curl -O http://mirror.jmu.edu/pub/mariadb/mariadb-10.0.20/source/mariadb-10.0.20.tar.gz - - 7z x mariadb-10.0.20.tar.gz - - 7z x mariadb-10.0.20.tar > nul - - cd mariadb-10.0.20 + - curl -O http://mirror.jmu.edu/pub/mariadb/mariadb-%MARIADB_VERSION%/source/mariadb-%MARIADB_VERSION%.tar.gz + - 7z x mariadb-%MARIADB_VERSION%.tar.gz + - 7z x mariadb-%MARIADB_VERSION%.tar > nul + - cd mariadb-%MARIADB_VERSION% - rmdir /S /Q storage\mroonga\ - move ..\mroonga storage\mroonga - - git clone --quiet --depth 1 https://github.com/groonga/groonga.git ..\groonga - - cd ..\groonga - - git submodule update --init - - cd ..\mariadb-10.0.20 + - git clone --quiet --depth 1 --recursive https://github.com/groonga/groonga.git ..\groonga - rmdir /S /Q ..\groonga\test\ + - cd ..\groonga\vendor + - c:\Ruby22-x64\bin\ruby -v download_lz4.rb + - c:\Ruby22-x64\bin\ruby -v download_mecab.rb + - cd ..\..\mariadb-%MARIADB_VERSION% - mkdir storage\mroonga\vendor - move ..\groonga storage\mroonga\vendor\groonga - git clone --quiet --depth 1 https://github.com/groonga/groonga-normalizer-mysql.git storage\mroonga\vendor\groonga\vendor\plugins\groonga-normalizer-mysql build_script: - "echo # > win\\packaging\\CMakeLists.txt" - - cmake . -G "Visual Studio 12 Win64" + - cmake . -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=Debug - -DWITHOUT_ARCHIVE=ON - -DWITHOUT_BLACKHOLE=ON - -DWITHOUT_CASSANDRA=ON - -DWITHOUT_CONNECT=ON - -DWITHOUT_CSV=ON - -DWITHOUT_EXAMPLE=ON - -DWITHOUT_FEDERATED=ON - -DWITHOUT_FEDERATEDX=ON - -DWITHOUT_HEAP=ON - -DWITHOUT_INNOBASE=ON - -DWITHOUT_MYISAM=ON - -DWITHOUT_MYISAMMRG=ON - -DWITHOUT_OQGRAPH=ON - -DWITHOUT_PERFSCHEMA=OFF - -DWITHOUT_SEQUENCE=ON - -DWITHOUT_SPHINX=ON - -DWITHOUT_SPIDER=ON - -DWITHOUT_TEST_SQL_DISCOVERY=ON - -DWITHOUT_TOKUDB=ON - -DWITHOUT_XTRADB=ON + -DPLUGIN_ARCHIVE=NO + -DPLUGIN_BLACKHOLE=NO + -DPLUGIN_CASSANDRA=NO + -DPLUGIN_CONNECT=NO + -DPLUGIN_CSV=NO + -DPLUGIN_EXAMPLE=NO + -DPLUGIN_FEDERATED=NO + -DPLUGIN_FEDERATEDX=NO + -DPLUGIN_HEAP=NO + -DPLUGIN_INNOBASE=NO + -DPLUGIN_MYISAM=NO + -DPLUGIN_MYISAMMRG=NO + -DPLUGIN_OQGRAPH=NO + -DPLUGIN_PERFSCHEMA=NO + -DPLUGIN_SEQUENCE=NO + -DPLUGIN_SPHINX=NO + -DPLUGIN_SPIDER=NO + -DPLUGIN_TEST_SQL_DISCOVERY=NO + -DPLUGIN_TOKUDB=NO + -DPLUGIN_XTRADB=NO -DWITH_UNIT_TESTS=OFF + -DWITH_MARIABACKUP=OFF + -DGRN_WITH_BUNDLED_MECAB=ON - cmake --build . --config Debug notifications: - provider: Email to: - groonga-mysql-commit@lists.sourceforge.jp - - kou@clear-code.com on_build_status_changed: true test: off diff --git a/storage/mroonga/autogen.sh b/storage/mroonga/autogen.sh index 7a1d38635d498c5a29add8ee8dcc59dd75182d09..f795ad000ec2fdd6a06e07f7f0686a96403e905e 100755 --- a/storage/mroonga/autogen.sh +++ b/storage/mroonga/autogen.sh @@ -1,116 +1,11 @@ #!/bin/sh -warn() { - echo " WARNING: $@" 1>&2 -} - -# init - -LIBTOOLIZE=libtoolize -ACLOCAL=aclocal -AUTOCONF=autoconf -AUTOHEADER=autoheader -AUTOMAKE=automake - -case `uname -s` in -Darwin) - LIBTOOLIZE=glibtoolize - ;; +case $(uname -s) in FreeBSD) - ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal/" - ;; + ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal/" + ;; esac +mkdir -p m4 -# libtoolize -echo "Searching libtoolize..." -if [ `which $LIBTOOLIZE` ] ; then - echo " FOUND: libtoolize -> $LIBTOOLIZE" -else - warn "Cannot Found libtoolize... input libtool command" - read LIBTOOLIZE - LIBTOOLIZE=`which $LIBTOOLIZE` - if [ `which $LIBTOOLIZE` ] ; then - echo " SET: libtoolize -> $LIBTOOLIZE" - else - warn "$LIBTOOLIZE: Command not found." - exit 1; - fi -fi - -# aclocal -echo "Searching aclocal..." -if [ `which $ACLOCAL` ] ; then - echo " FOUND: aclocal -> $ACLOCAL" -else - warn "Cannot Found aclocal... input aclocal command" - read ACLOCAL - ACLOCAL=`which $ACLOCAL` - if [ `which $ACLOCAL` ] ; then - echo " SET: aclocal -> $ACLOCAL" - else - warn "$ACLOCAL: Command not found." - exit 1; - fi -fi - -# automake -echo "Searching automake..." -if [ `which $AUTOMAKE` ] ; then - echo " FOUND: automake -> $AUTOMAKE" -else - warn "Cannot Found automake... input automake command" - read AUTOMAKE - ACLOCAL=`which $AUTOMAKE` - if [ `which $AUTOMAKE` ] ; then - echo " SET: automake -> $AUTOMAKE" - else - warn "$AUTOMAKE: Command not found." - exit 1; - fi -fi - -# autoheader -echo "Searching autoheader..." -if [ `which $AUTOHEADER` ] ; then - echo " FOUND: autoheader -> $AUTOHEADER" -else - warn "Cannot Found autoheader... input autoheader command" - read AUTOHEADER - ACLOCAL=`which $AUTOHEADER` - if [ `which $AUTOHEADER` ] ; then - echo " SET: autoheader -> $AUTOHEADER" - else - warn "$AUTOHEADER: Command not found." - exit 1; - fi -fi - -# autoconf -echo "Searching autoconf..." -if [ `which $AUTOCONF` ] ; then - echo " FOUND: autoconf -> $AUTOCONF" -else - warn "Cannot Found autoconf... input autoconf command" - read AUTOCONF - ACLOCAL=`which $AUTOCONF` - if [ `which $AUTOCONF` ] ; then - echo " SET: autoconf -> $AUTOCONF" - else - warn "$AUTOCONF: Command not found." - exit 1; - fi -fi - -set -e - -echo "Running libtoolize ..." -$LIBTOOLIZE --force --copy -echo "Running aclocal ..." -$ACLOCAL ${ACLOCAL_ARGS} -echo "Running autoheader..." -$AUTOHEADER -echo "Running automake ..." -$AUTOMAKE --add-missing --copy -echo "Running autoconf ..." -$AUTOCONF +${AUTORECONF:-autoreconf} --force --install "$@" diff --git a/storage/mroonga/build/makefiles/sphinx-build.am b/storage/mroonga/build/makefiles/sphinx-build.am index e237377ba8033469522997ff27016e102c7bd093..57bbcd614e15d22f4573991b82d15f5786b9011c 100644 --- a/storage/mroonga/build/makefiles/sphinx-build.am +++ b/storage/mroonga/build/makefiles/sphinx-build.am @@ -10,10 +10,8 @@ PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) -E $(SPHINXOPTS) $(SOURCE_DIR) -SPHINX_DIR = $(abs_top_builddir)/doc/sphinx SPHINX_BUILD_COMMAND = \ DOCUMENT_VERSION="$(DOCUMENT_VERSION)" \ DOCUMENT_VERSION_FULL="$(DOCUMENT_VERSION_FULL)" \ LOCALE="$(LOCALE)" \ - PYTHONPATH="$(SPHINX_DIR):$$PYTHONPATH" \ $(SPHINX_BUILD) diff --git a/storage/mroonga/config.sh.in b/storage/mroonga/config.sh.in index e86973bdf88127d8a92839b912bff9c5fcc1339f..32e88fd5c3dc028483b9f05ad2b853b86afa818a 100644 --- a/storage/mroonga/config.sh.in +++ b/storage/mroonga/config.sh.in @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA MYSQL_SOURCE_DIR="@MYSQL_SOURCE_DIR@" MYSQL_BUILD_DIR="@MYSQL_BUILD_DIR@" diff --git a/storage/mroonga/configure.ac b/storage/mroonga/configure.ac index f60b481e0ea234d8c687a195734ce5ad06a10abe..b1e66904f75f2719321851d796f248b6b61d400e 100644 --- a/storage/mroonga/configure.ac +++ b/storage/mroonga/configure.ac @@ -8,6 +8,7 @@ m4_define([mrn_version_in_hex], m4_include(version_in_hex)) m4_define([mrn_plugin_version], m4_include(plugin_version)) AC_INIT([mroonga], [mrn_version], [groonga-talk@lists.sourceforge.net]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([tar-pax foreign subdir-objects]) @@ -173,18 +174,27 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ MYSQL_INCLUDES="" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_build_dir/include" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/sql" + if test -d "$ac_mysql_source_dir/sql/auth"; then + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/sql/auth" + fi MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/include" if test -d "$ac_mysql_source_dir/extra/rapidjson"; then mysql_rapidjson_include_dir="$ac_mysql_source_dir/extra/rapidjson/include" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_rapidjson_include_dir" fi - if test -d "$ac_mysql_source_dir/pcre"; then - mysql_regex_include_dir="$ac_mysql_source_dir/pcre" + if test -d "$ac_mysql_source_dir/extra/regex"; then + mysql_regex_include_dir="$ac_mysql_source_dir/extra/regex" + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_regex_include_dir" else - mysql_regex_include_dir="$ac_mysql_source_dir/regex" + if test -d "$ac_mysql_source_dir/pcre"; then + mysql_regex_include_dir="$ac_mysql_source_dir/pcre" + else + mysql_regex_include_dir="$ac_mysql_source_dir/regex" + fi + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_regex_include_dir" fi - MYSQL_INCLUDES="$MYSQL_INCLUDES -I$mysql_regex_include_dir" if test -d "$ac_mysql_source_dir/libbinlogevents"; then + MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_build_dir/libbinlogevents/include" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/libbinlogevents/export" MYSQL_INCLUDES="$MYSQL_INCLUDES -I$ac_mysql_source_dir/libbinlogevents/include" fi @@ -199,7 +209,7 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[ MYSQL_CXXFLAGS="-fno-implicit-templates -felide-constructors" case "$MYSQL_MAJOR_MINOR_VERSION" in - 5.7) + 5.7|8.*) : ;; *) @@ -381,6 +391,13 @@ AC_ARG_WITH(rsync-path, [RSYNC_PATH="packages@packages.groonga.org:public"]) AC_SUBST(RSYNC_PATH) +AC_ARG_WITH(launchpad-ppa, + [AS_HELP_STRING([--with-launchpad-ppa=PPA], + [specify Launchpad Personal Package Archive. [default=groonga-ppa]])], + [LAUNCHPAD_PPA="$withval"], + [LAUNCHPAD_PPA="groonga-ppa"]) +AC_SUBST(LAUNCHPAD_PPA) + AC_ARG_WITH(launchpad-uploader-pgp-key, [AS_HELP_STRING([--with-launchpad-uploader-pgp-key=KEY], [specify PGP key UID to upload Groonga packages to Launchpad.])], @@ -429,7 +446,7 @@ if test x"$enable_document" != x"no"; then AC_PATH_PROG(SPHINX_BUILD, sphinx-build, []) if test -n "$SPHINX_BUILD"; then sphinx_build_version=`"$SPHINX_BUILD" --version` - if ! echo "$sphinx_build_version" | grep -q ' 1\.[[23]]'; then + if ! echo "$sphinx_build_version" | grep -q ' 1\.[[2-6]]'; then AC_MSG_ERROR([ sphinx-build is old: $sphinx_build_version Sphinx 1.2 or later is required.]) @@ -509,12 +526,19 @@ AC_OUTPUT([ mrn_version.h mysql-test/mroonga/storage/information_schema/r/plugins.result mysql-test/mroonga/storage/variable/r/version.result - packages/debian/control + packages/debian-5.5/control + packages/debian-5.6/control + packages/debian-5.7/control + packages/debian-mariadb-10.0/control packages/apt/env.sh packages/rpm/centos/mysql55-mroonga.spec packages/rpm/centos/mysql56-community-mroonga.spec + packages/rpm/centos/mysql57-community-mroonga.spec packages/rpm/centos/mariadb-mroonga.spec + packages/rpm/centos/mariadb-10.1-mroonga.spec + packages/rpm/centos/mariadb-10.2-mroonga.spec packages/rpm/centos/percona-server-56-mroonga.spec + packages/rpm/centos/percona-server-57-mroonga.spec packages/yum/env.sh data/install.sql ]) diff --git a/storage/mroonga/data/install.sql.in b/storage/mroonga/data/install.sql.in index b0c930c8144e4b7c091cd4a771ee1bf6054b8e05..d7d5f3c4ad6e03c5a92d8a0f9778726e31525774 100644 --- a/storage/mroonga/data/install.sql.in +++ b/storage/mroonga/data/install.sql.in @@ -17,3 +17,19 @@ CREATE FUNCTION mroonga_command RETURNS STRING DROP FUNCTION IF EXISTS mroonga_escape; CREATE FUNCTION mroonga_escape RETURNS STRING SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_snippet_html; +CREATE FUNCTION mroonga_snippet_html RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_normalize; +CREATE FUNCTION mroonga_normalize RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_highlight_html; +CREATE FUNCTION mroonga_highlight_html RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; + +DROP FUNCTION IF EXISTS mroonga_query_expand; +CREATE FUNCTION mroonga_query_expand RETURNS STRING + SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@'; diff --git a/storage/mroonga/data/uninstall.sql b/storage/mroonga/data/uninstall.sql index b79e6c03d18025d6c548421a6973d6adea39ef61..5713e07422432e0acb36aa53bf4f0acf95afc0cf 100644 --- a/storage/mroonga/data/uninstall.sql +++ b/storage/mroonga/data/uninstall.sql @@ -2,6 +2,10 @@ DROP FUNCTION IF EXISTS last_insert_grn_id; DROP FUNCTION IF EXISTS mroonga_snippet; DROP FUNCTION IF EXISTS mroonga_command; DROP FUNCTION IF EXISTS mroonga_escape; +DROP FUNCTION IF EXISTS mroonga_snippet_html; +DROP FUNCTION IF EXISTS mroonga_normalize; +DROP FUNCTION IF EXISTS mroonga_highlight_html; +DROP FUNCTION IF EXISTS mroonga_query_expand; UNINSTALL PLUGIN Mroonga; diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 597ec4690cff02da0b647eea07481c038dddc39c..96f506f9e369108c03f415a76a3e2407d59abf88 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2015 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou Copyright(C) 2013 Kenji Maruyama This library is free software; you can redistribute it and/or @@ -66,14 +66,9 @@ # include #endif -#define MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(type, variable_name, variable_size) \ - type *variable_name = \ - (type *)mrn_my_malloc(sizeof(type) * (variable_size), MYF(MY_WME)) -#define MRN_FREE_VARIABLE_LENGTH_ARRAYS(variable_name) \ - my_free(variable_name) - #include "mrn_err.h" #include "mrn_table.hpp" +#include #include "ha_mroonga.hpp" #include #include @@ -91,9 +86,17 @@ #include #include #include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include #ifdef MRN_SUPPORT_FOREIGN_KEYS # include @@ -143,10 +146,18 @@ static mysql_mutex_t *mrn_LOCK_open; # define MRN_NEED_M_LOCK_TYPE_CHECK_FOR_WRAPPER_EXTERNAL_LOCK #endif -#if MYSQL_VERSION_ID >= 50603 && !defined(MRN_MARIADB_P) -# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +#ifdef MRN_MARIADB_P +# if MYSQL_VERSION_ID >= 100200 +# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +# else +# define MRN_ORDER_IS_ASC(order) ((order)->asc) +# endif #else -# define MRN_ORDER_IS_ASC(order) ((order)->asc) +# if MYSQL_VERSION_ID >= 50603 +# define MRN_ORDER_IS_ASC(order) ((order)->direction == ORDER::ORDER_ASC) +# else +# define MRN_ORDER_IS_ASC(order) ((order)->asc) +# endif #endif #define MRN_STRINGIFY(macro_or_string) MRN_STRINGIFY_ARG(macro_or_string) @@ -199,22 +210,6 @@ static mysql_mutex_t *mrn_LOCK_open; calculate_key_len(table, key_index, buffer, keypart_map) #endif -#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) -# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ - ((select_lex)->where_cond()) -# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ - ((select_lex)->having_cond()) -# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ - ((select_lex)->active_options()) -#else -# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ - ((select_lex)->where) -# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ - ((select_lex)->having) -# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ - ((select_lex)->options) -#endif - #if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) # define MRN_TABLE_LIST_GET_DERIVED(table_list) NULL #else @@ -249,10 +244,6 @@ static const char *MRN_PLUGIN_AUTHOR = "The Mroonga project"; extern "C" { #endif -/* groonga's internal functions */ -int grn_atoi(const char *nptr, const char *end, const char **rest); -uint grn_atoui(const char *nptr, const char *end, const char **rest); - #ifdef HAVE_PSI_INTERFACE # ifdef WIN32 # ifdef MRN_TABLE_SHARE_HAVE_LOCK_SHARE @@ -266,18 +257,41 @@ static PSI_mutex_key mrn_allocated_thds_mutex_key; PSI_mutex_key mrn_share_mutex_key; PSI_mutex_key mrn_long_term_share_auto_inc_mutex_key; static PSI_mutex_key mrn_log_mutex_key; +static PSI_mutex_key mrn_query_log_mutex_key; static PSI_mutex_key mrn_db_manager_mutex_key; +static PSI_mutex_key mrn_context_pool_mutex_key; +static PSI_mutex_key mrn_operations_mutex_key; + +# if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_MUTEXT_INFO_ENTRY(key, name, flags, volatility) \ + {key, name, flags, volatility} +# else +# define MRN_MUTEXT_INFO_ENTRY(key, name, flags, volatility) \ + {key, name, flags} +# endif static PSI_mutex_info mrn_mutexes[] = { - {&mrn_open_tables_mutex_key, "open_tables", PSI_FLAG_GLOBAL}, - {&mrn_long_term_share_mutex_key, "long_term_share", PSI_FLAG_GLOBAL}, - {&mrn_allocated_thds_mutex_key, "allocated_thds", PSI_FLAG_GLOBAL}, - {&mrn_share_mutex_key, "share", 0}, - {&mrn_long_term_share_auto_inc_mutex_key, - "long_term_share::auto_inc", 0}, - {&mrn_log_mutex_key, "log", PSI_FLAG_GLOBAL}, - {&mrn_db_manager_mutex_key, "DatabaseManager", PSI_FLAG_GLOBAL} + MRN_MUTEXT_INFO_ENTRY(&mrn_open_tables_mutex_key, + "mrn::open_tables", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_long_term_share_mutex_key, + "mrn::long_term_share", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_allocated_thds_mutex_key, + "mrn::allocated_thds", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_share_mutex_key, + "mrn::share", 0, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_long_term_share_auto_inc_mutex_key, + "mrn::long_term_share::auto_inc", 0, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_log_mutex_key, + "mrn::log", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_query_log_mutex_key, + "mrn::query_log", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_db_manager_mutex_key, + "mrn::DatabaseManager", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_context_pool_mutex_key, + "mrn::ContextPool", PSI_FLAG_GLOBAL, 0), + MRN_MUTEXT_INFO_ENTRY(&mrn_operations_mutex_key, + "mrn::Operations", PSI_FLAG_GLOBAL, 0) }; #endif @@ -294,10 +308,14 @@ mysql_mutex_t mrn_allocated_thds_mutex; /* internal variables */ static grn_ctx mrn_ctx; static mysql_mutex_t mrn_log_mutex; +static mysql_mutex_t mrn_query_log_mutex; static grn_obj *mrn_db; static grn_ctx mrn_db_manager_ctx; static mysql_mutex_t mrn_db_manager_mutex; mrn::DatabaseManager *mrn_db_manager = NULL; +static mysql_mutex_t mrn_context_pool_mutex; +mrn::ContextPool *mrn_context_pool = NULL; +static mysql_mutex_t mrn_operations_mutex; #ifdef WIN32 @@ -539,6 +557,26 @@ static const char *mrn_inspect_extra_function(enum ha_extra_function operation) case HA_EXTRA_PREPARE_FOR_FORCED_CLOSE: inspected = "HA_EXTRA_PREPARE_FOR_FORCED_CLOSE"; break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW + case HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW: + inspected = "HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW"; + break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_BEGIN_ALTER_COPY + case HA_EXTRA_BEGIN_ALTER_COPY: + inspected = "HA_EXTRA_BEGIN_ALTER_COPY"; + break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_END_ALTER_COPY + case HA_EXTRA_END_ALTER_COPY: + inspected = "HA_EXTRA_END_ALTER_COPY"; + break; +#endif +#ifdef MRN_HAVE_HA_EXTRA_NO_AUTOINC_LOCKING + case HA_EXTRA_NO_AUTOINC_LOCKING: + inspected = "HA_EXTRA_NO_AUTOINC_LOCKING"; + break; #endif } return inspected; @@ -576,6 +614,7 @@ static FILE *mrn_log_file = NULL; static bool mrn_log_file_opened = false; static grn_log_level mrn_log_level_default = GRN_LOG_DEFAULT_LEVEL; static ulong mrn_log_level = mrn_log_level_default; +static char *mrn_query_log_file_path = NULL; char *mrn_default_tokenizer = NULL; char *mrn_default_wrapper_engine = NULL; @@ -583,16 +622,10 @@ static int mrn_lock_timeout = grn_get_lock_timeout(); static char *mrn_libgroonga_version = const_cast(grn_get_version()); static char *mrn_version = const_cast(MRN_VERSION); static char *mrn_vector_column_delimiter = NULL; -static my_bool mrn_libgroonga_support_zlib = FALSE; -static my_bool mrn_libgroonga_support_lz4 = FALSE; -typedef enum { - MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT = (1 << 0), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_QUERY = (1 << 1), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT = (1 << 2), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN = (1 << 3), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE = (1 << 4), - MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT = (1 << 5) -} mrn_boolean_mode_syntax_flag; +static mrn_bool mrn_libgroonga_support_zlib = false; +static mrn_bool mrn_libgroonga_support_lz4 = false; +static mrn_bool mrn_libgroonga_support_zstd = false; +static mrn_bool mrn_enable_operations_recording = true; #ifdef MRN_SUPPORT_THDVAR_SET static const char *mrn_boolean_mode_sytnax_flag_names[] = { "DEFAULT", @@ -611,28 +644,13 @@ static TYPELIB mrn_boolean_mode_syntax_flags_typelib = { }; #endif #ifdef MRN_GROONGA_EMBEDDED -static my_bool mrn_libgroonga_embedded = TRUE; +static mrn_bool mrn_libgroonga_embedded = true; #else -static my_bool mrn_libgroonga_embedded = FALSE; +static mrn_bool mrn_libgroonga_embedded = false; #endif -typedef enum { - MRN_ACTION_ON_ERROR_ERROR, - MRN_ACTION_ON_ERROR_ERROR_AND_LOG, - MRN_ACTION_ON_ERROR_IGNORE, - MRN_ACTION_ON_ERROR_IGNORE_AND_LOG, -} mrn_action_on_error; - -static const char *mrn_action_on_error_names[] = { - "ERROR", - "ERROR_AND_LOG", - "IGNORE", - "IGNORE_AND_LOG", - NullS, -}; - -static mrn_action_on_error mrn_action_on_fulltext_query_error_default = - MRN_ACTION_ON_ERROR_ERROR_AND_LOG; +static mrn::variables::ActionOnError mrn_action_on_fulltext_query_error_default = + mrn::variables::ACTION_ON_ERROR_ERROR_AND_LOG; static void mrn_logger_log(grn_ctx *ctx, grn_log_level level, const char *timestamp, const char *title, @@ -749,20 +767,19 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var, const char *new_value = *((const char **)save); char **old_value_ptr = (char **)var_ptr; - grn_ctx ctx; - grn_ctx_init(&ctx, 0); - mrn_change_encoding(&ctx, system_charset_info); + grn_ctx *ctx = &mrn_ctx; + mrn_change_encoding(ctx, system_charset_info); const char *new_log_file_name; new_log_file_name = *old_value_ptr; if (strcmp(*old_value_ptr, new_value) == 0) { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "log file isn't changed " "because the requested path isn't different: <%s>", new_value); } else { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "log file is changed: <%s> -> <%s>", *old_value_ptr, new_value); @@ -783,18 +800,18 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var, } if (log_file_open_errno == 0) { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "log file is changed: <%s> -> <%s>", *old_value_ptr, new_value); new_log_file_name = new_value; } else { if (mrn_log_file) { - GRN_LOG(&ctx, GRN_LOG_ERROR, + GRN_LOG(ctx, GRN_LOG_ERROR, "log file isn't changed " "because the requested path can't be opened: <%s>: <%s>", new_value, strerror(log_file_open_errno)); } else { - GRN_LOG(&ctx, GRN_LOG_ERROR, + GRN_LOG(ctx, GRN_LOG_ERROR, "log file can't be opened: <%s>: <%s>", new_value, strerror(log_file_open_errno)); } @@ -809,8 +826,6 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var, *old_value_ptr = mrn_my_strdup(new_log_file_name, MYF(MY_WME)); #endif - grn_ctx_fin(&ctx); - DBUG_VOID_RETURN; } @@ -821,23 +836,100 @@ static MYSQL_SYSVAR_STR(log_file, mrn_log_file_path, mrn_log_file_update, MRN_LOG_FILE_PATH); +static void mrn_query_log_file_update(THD *thd, struct st_mysql_sys_var *var, + void *var_ptr, const void *save) +{ + MRN_DBUG_ENTER_FUNCTION(); + const char *new_value = *((const char **)save); + char **old_value_ptr = (char **)var_ptr; + const char *normalized_new_value = NULL; + + grn_ctx *ctx = &mrn_ctx; + mrn_change_encoding(ctx, system_charset_info); + + const char *new_query_log_file_name; + new_query_log_file_name = *old_value_ptr; + + bool need_update = false; + if (!*old_value_ptr) { + if (new_value && new_value[0] != '\0') { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log is enabled: <%s>", + new_value); + need_update = true; + normalized_new_value = new_value; + } else { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file is still disabled"); + } + } else { + if (!new_value || new_value[0] == '\0') { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file is disabled: <%s>", + *old_value_ptr); + need_update = true; + normalized_new_value = NULL; + } else if (strcmp(*old_value_ptr, new_value) == 0) { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file isn't changed " + "because the requested path isn't different: <%s>", + new_value); + } else { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "query log file is changed: <%s> -> <%s>", + *old_value_ptr, new_value); + need_update = true; + normalized_new_value = new_value; + } + } + + if (need_update) { + { // TODO: Remove me when Groonga 7.0.5 is released. + mrn::Lock lock(&mrn_query_log_mutex); + grn_default_query_logger_set_path(normalized_new_value); + } + grn_query_logger_reopen(ctx); + new_query_log_file_name = normalized_new_value; + } + +#ifdef MRN_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR + char *old_query_log_file_name = *old_value_ptr; +#endif + if (new_query_log_file_name) { + *old_value_ptr = mrn_my_strdup(new_query_log_file_name, MYF(0)); + } else { + *old_value_ptr = NULL; + } +#ifdef MRN_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR + my_free(old_query_log_file_name); +#endif + + DBUG_VOID_RETURN; +} + +static MYSQL_SYSVAR_STR(query_log_file, mrn_query_log_file_path, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, + "query log file for " MRN_PLUGIN_NAME_STRING, + NULL, + mrn_query_log_file_update, + NULL); + static void mrn_default_tokenizer_update(THD *thd, struct st_mysql_sys_var *var, void *var_ptr, const void *save) { MRN_DBUG_ENTER_FUNCTION(); const char *new_value = *((const char **)save); char **old_value_ptr = (char **)var_ptr; - grn_ctx ctx; + grn_ctx *ctx = &mrn_ctx; - grn_ctx_init(&ctx, 0); - mrn_change_encoding(&ctx, system_charset_info); + mrn_change_encoding(ctx, system_charset_info); if (strcmp(*old_value_ptr, new_value) == 0) { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "default tokenizer for fulltext index isn't changed " "because the requested default tokenizer isn't different: <%s>", new_value); } else { - GRN_LOG(&ctx, GRN_LOG_NOTICE, + GRN_LOG(ctx, GRN_LOG_NOTICE, "default tokenizer for fulltext index is changed: <%s> -> <%s>", *old_value_ptr, new_value); } @@ -849,8 +941,6 @@ static void mrn_default_tokenizer_update(THD *thd, struct st_mysql_sys_var *var, *old_value_ptr = (char *)new_value; #endif - grn_ctx_fin(&ctx); - DBUG_VOID_RETURN; } @@ -956,6 +1046,14 @@ static MYSQL_SYSVAR_STR(default_wrapper_engine, mrn_default_wrapper_engine, NULL, NULL); +static const char *mrn_action_on_error_names[] = { + "ERROR", + "ERROR_AND_LOG", + "IGNORE", + "IGNORE_AND_LOG", + NullS, +}; + static TYPELIB mrn_action_on_error_typelib = { array_elements(mrn_action_on_error_names) - 1, @@ -1010,7 +1108,7 @@ static MYSQL_SYSVAR_STR(version, mrn_version, NULL, MRN_VERSION); -static my_bool grn_check_zlib_support() +static mrn_bool grn_check_zlib_support() { bool is_zlib_support = false; grn_obj grn_support_p; @@ -1023,7 +1121,14 @@ static my_bool grn_check_zlib_support() return is_zlib_support; } -static my_bool grn_check_lz4_support() +static MYSQL_SYSVAR_BOOL(libgroonga_support_zlib, mrn_libgroonga_support_zlib, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "The status of libgroonga supports zlib", + NULL, + NULL, + grn_check_zlib_support()); + +static mrn_bool grn_check_lz4_support() { bool is_lz4_support = false; grn_obj grn_support_p; @@ -1036,19 +1141,51 @@ static my_bool grn_check_lz4_support() return is_lz4_support; } -static MYSQL_SYSVAR_BOOL(libgroonga_support_zlib, mrn_libgroonga_support_zlib, +static MYSQL_SYSVAR_BOOL(libgroonga_support_lz4, mrn_libgroonga_support_lz4, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "The status of libgroonga supports zlib", + "The status of libgroonga supports LZ4", NULL, NULL, - grn_check_zlib_support()); + grn_check_lz4_support()); -static MYSQL_SYSVAR_BOOL(libgroonga_support_lz4, mrn_libgroonga_support_lz4, +static mrn_bool grn_check_zstd_support() +{ + bool is_zstd_support = false; + grn_obj grn_support_p; + + GRN_BOOL_INIT(&grn_support_p, 0); + grn_obj_get_info(&mrn_ctx, NULL, GRN_INFO_SUPPORT_ZSTD, &grn_support_p); + is_zstd_support = (GRN_BOOL_VALUE(&grn_support_p)); + grn_obj_unlink(&mrn_ctx, &grn_support_p); + + return is_zstd_support; +} + +static MYSQL_SYSVAR_BOOL(libgroonga_support_zstd, mrn_libgroonga_support_zstd, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "The status of libgroonga supports LZ4", + "The status of libgroonga supports Zstandard", NULL, NULL, - grn_check_lz4_support()); + grn_check_zstd_support()); + +static void mrn_enable_operations_recording_update(THD *thd, struct st_mysql_sys_var *var, + void *var_ptr, const void *save) +{ + MRN_DBUG_ENTER_FUNCTION(); + const bool new_value = *static_cast(save); + bool *old_value_ptr = static_cast(var_ptr); + + *old_value_ptr = new_value; + + DBUG_VOID_RETURN; +} + +static MYSQL_SYSVAR_BOOL(enable_operations_recording, mrn_enable_operations_recording, + PLUGIN_VAR_RQCMDARG, + "Whether recording operations for recovery is enabled or not", + NULL, + mrn_enable_operations_recording_update, + true); #ifdef MRN_SUPPORT_THDVAR_SET static MYSQL_THDVAR_SET(boolean_mode_syntax_flags, @@ -1060,7 +1197,7 @@ static MYSQL_THDVAR_SET(boolean_mode_syntax_flags, "ALLOW_COLUMN, ALLOW_UPDATE and ALLOW_LEADING_NOT", NULL, NULL, - MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT, + mrn::variables::BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT, &mrn_boolean_mode_syntax_flags_typelib); #endif @@ -1102,11 +1239,14 @@ static struct st_mysql_sys_var *mrn_system_variables[] = MYSQL_SYSVAR(vector_column_delimiter), MYSQL_SYSVAR(libgroonga_support_zlib), MYSQL_SYSVAR(libgroonga_support_lz4), + MYSQL_SYSVAR(libgroonga_support_zstd), #ifdef MRN_SUPPORT_THDVAR_SET MYSQL_SYSVAR(boolean_mode_syntax_flags), #endif MYSQL_SYSVAR(max_n_records_for_estimate), MYSQL_SYSVAR(libgroonga_embedded), + MYSQL_SYSVAR(query_log_file), + MYSQL_SYSVAR(enable_operations_recording), NULL }; @@ -1188,6 +1328,9 @@ struct st_mysql_plugin i_s_mrn_stats = "Statistics for " MRN_PLUGIN_NAME_STRING, PLUGIN_LICENSE_GPL, i_s_mrn_stats_init, +#ifdef MRN_ST_MYSQL_PLUGIN_HAVE_CHECK_UNINSTALL + NULL, +#endif i_s_mrn_stats_deinit, MRN_VERSION_IN_HEX, NULL, @@ -1196,7 +1339,12 @@ struct st_mysql_plugin i_s_mrn_stats = }; /* End of mroonga information schema implementations */ -static handler *mrn_handler_create(handlerton *hton, TABLE_SHARE *share, MEM_ROOT *root) +static handler *mrn_handler_create(handlerton *hton, + TABLE_SHARE *share, +#ifdef MRN_HANDLERTON_CREATE_HAVE_PARTITIONED + bool partitioned, +#endif + MEM_ROOT *root) { MRN_DBUG_ENTER_FUNCTION(); handler *new_handler = new (root) ha_mroonga(hton, share); @@ -1407,6 +1555,11 @@ static grn_builtin_type mrn_grn_type_from_field(grn_ctx *ctx, Field *field, case MYSQL_TYPE_GEOMETRY: // case-by-case type = GRN_DB_WGS84_GEO_POINT; // 8bytes break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + type = GRN_DB_TEXT; + break; +#endif } return type; } @@ -1457,6 +1610,17 @@ static bool mrn_parse_grn_column_create_flags(THD *thd, "COMPRESS_LZ4"); } flag_names += 12; + } else if (rest_length >= 13 && !memcmp(flag_names, "COMPRESS_ZSTD", 13)) { + if (mrn_libgroonga_support_zstd) { + *column_flags |= GRN_OBJ_COMPRESS_ZSTD; + found = true; + } else { + push_warning_printf(thd, MRN_SEVERITY_WARNING, + ER_MRN_UNSUPPORTED_COLUMN_FLAG_NUM, + ER_MRN_UNSUPPORTED_COLUMN_FLAG_STR, + "COMPRESS_ZSTD"); + } + flag_names += 13; } else { char invalid_flag_name[MRN_MESSAGE_BUFFER_SIZE]; snprintf(invalid_flag_name, MRN_MESSAGE_BUFFER_SIZE, @@ -1477,7 +1641,7 @@ static bool mrn_parse_grn_index_column_flags(THD *thd, grn_ctx *ctx, const char *flag_names, uint flag_names_length, - grn_obj_flags *index_column_flags) + grn_column_flags *index_column_flags) { const char *flag_names_end = flag_names + flag_names_length; bool found = false; @@ -1504,6 +1668,14 @@ static bool mrn_parse_grn_index_column_flags(THD *thd, *index_column_flags |= GRN_OBJ_WITH_WEIGHT; flag_names += 11; found = true; + } else if (rest_length >= 11 && !memcmp(flag_names, "INDEX_SMALL", 11)) { + *index_column_flags |= GRN_OBJ_INDEX_SMALL; + flag_names += 11; + found = true; + } else if (rest_length >= 12 && !memcmp(flag_names, "INDEX_MEDIUM", 12)) { + *index_column_flags |= GRN_OBJ_INDEX_MEDIUM; + flag_names += 12; + found = true; } else { char invalid_flag_name[MRN_MESSAGE_BUFFER_SIZE]; snprintf(invalid_flag_name, MRN_MESSAGE_BUFFER_SIZE, @@ -1615,8 +1787,7 @@ static int mrn_init(void *p) { // init handlerton grn_ctx *ctx = NULL; - handlerton *hton; - hton = (handlerton *)p; + handlerton *hton = static_cast(p); hton->state = SHOW_OPTION_YES; hton->create = mrn_handler_create; hton->flags = HTON_NO_FLAGS; @@ -1671,7 +1842,7 @@ static int mrn_init(void *p) # endif #endif -#ifdef HAVE_PSI_INTERFACE +#ifdef MRN_HAVE_PSI_SERVER if (PSI_server) { const char *category = "mroonga"; int n_mutexes = array_elements(mrn_mutexes); @@ -1679,6 +1850,8 @@ static int mrn_init(void *p) } #endif + grn_default_query_logger_set_path(mrn_query_log_file_path); + if (grn_init() != GRN_SUCCESS) { goto err_grn_init; } @@ -1705,6 +1878,11 @@ static int mrn_init(void *p) MY_MUTEX_INIT_FAST) != 0) { goto err_log_mutex_init; } + if (mysql_mutex_init(mrn_query_log_mutex_key, + &mrn_query_log_mutex, + MY_MUTEX_INIT_FAST) != 0) { + goto err_query_log_mutex_init; + } mrn_logger.max_level = static_cast(mrn_log_level); grn_logger_set(ctx, &mrn_logger); @@ -1737,13 +1915,31 @@ static int mrn_init(void *p) if (!mrn_db_manager->init()) { goto err_db_manager_init; } + + if (mysql_mutex_init(mrn_context_pool_mutex_key, + &mrn_context_pool_mutex, + MY_MUTEX_INIT_FAST) != 0) { + GRN_LOG(ctx, GRN_LOG_ERROR, + "failed to initialize mutex for context pool"); + goto error_context_pool_mutex_init; + } + mrn_context_pool = new mrn::ContextPool(&mrn_context_pool_mutex); + + if (mysql_mutex_init(mrn_operations_mutex_key, + &mrn_operations_mutex, + MY_MUTEX_INIT_FAST) != 0) { + GRN_LOG(ctx, GRN_LOG_ERROR, + "failed to initialize mutex for operations"); + goto error_operations_mutex_init; + } + if ((mysql_mutex_init(mrn_allocated_thds_mutex_key, &mrn_allocated_thds_mutex, MY_MUTEX_INIT_FAST) != 0)) { goto err_allocated_thds_mutex_init; } - if (my_hash_init(&mrn_allocated_thds, system_charset_info, 32, 0, 0, - mrn_allocated_thds_get_key, 0, 0)) { + if (mrn_my_hash_init(&mrn_allocated_thds, system_charset_info, 32, 0, 0, + mrn_allocated_thds_get_key, 0, 0)) { goto error_allocated_thds_hash_init; } if ((mysql_mutex_init(mrn_open_tables_mutex_key, @@ -1751,8 +1947,8 @@ static int mrn_init(void *p) MY_MUTEX_INIT_FAST) != 0)) { goto err_allocated_open_tables_mutex_init; } - if (my_hash_init(&mrn_open_tables, system_charset_info, 32, 0, 0, - mrn_open_tables_get_key, 0, 0)) { + if (mrn_my_hash_init(&mrn_open_tables, system_charset_info, 32, 0, 0, + mrn_open_tables_get_key, 0, 0)) { goto error_allocated_open_tables_hash_init; } if ((mysql_mutex_init(mrn_long_term_share_mutex_key, @@ -1760,8 +1956,8 @@ static int mrn_init(void *p) MY_MUTEX_INIT_FAST) != 0)) { goto error_allocated_long_term_share_mutex_init; } - if (my_hash_init(&mrn_long_term_share, system_charset_info, 32, 0, 0, - mrn_long_term_share_get_key, 0, 0)) { + if (mrn_my_hash_init(&mrn_long_term_share, system_charset_info, 32, 0, 0, + mrn_long_term_share_get_key, 0, 0)) { goto error_allocated_long_term_share_hash_init; } @@ -1782,6 +1978,11 @@ static int mrn_init(void *p) error_allocated_thds_hash_init: mysql_mutex_destroy(&mrn_allocated_thds_mutex); err_allocated_thds_mutex_init: + mysql_mutex_destroy(&mrn_operations_mutex); +error_operations_mutex_init: + delete mrn_context_pool; + mysql_mutex_destroy(&mrn_context_pool_mutex); +error_context_pool_mutex_init: err_db_manager_init: delete mrn_db_manager; mysql_mutex_destroy(&mrn_db_manager_mutex); @@ -1794,6 +1995,8 @@ static int mrn_init(void *p) mrn_log_file_opened = false; } err_log_file_open: + mysql_mutex_destroy(&mrn_query_log_mutex); +err_query_log_mutex_init: mysql_mutex_destroy(&mrn_log_mutex); err_log_mutex_init: err_mrn_change_encoding: @@ -1838,6 +2041,9 @@ static int mrn_deinit(void *p) mysql_mutex_destroy(&mrn_open_tables_mutex); my_hash_free(&mrn_allocated_thds); mysql_mutex_destroy(&mrn_allocated_thds_mutex); + mysql_mutex_destroy(&mrn_operations_mutex); + delete mrn_context_pool; + mysql_mutex_destroy(&mrn_context_pool_mutex); delete mrn_db_manager; mysql_mutex_destroy(&mrn_db_manager_mutex); grn_ctx_fin(&mrn_db_manager_ctx); @@ -1850,6 +2056,7 @@ static int mrn_deinit(void *p) fclose(mrn_log_file); mrn_log_file_opened = false; } + mysql_mutex_destroy(&mrn_query_log_mutex); mysql_mutex_destroy(&mrn_log_mutex); return 0; @@ -2336,7 +2543,8 @@ ha_mroonga::ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg) ignoring_no_key_columns(false), replacing_(false), written_by_row_based_binlog(0), - current_ft_item(NULL) + current_ft_item(NULL), + operations_(NULL) { MRN_DBUG_ENTER_METHOD(); grn_ctx_init(ctx, 0); @@ -2355,6 +2563,9 @@ ha_mroonga::ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg) ha_mroonga::~ha_mroonga() { MRN_DBUG_ENTER_METHOD(); + + delete operations_; + if (analyzed_for_create) { if (wrap_handler_for_create) { delete wrap_handler_for_create; @@ -2619,6 +2830,12 @@ ulonglong ha_mroonga::wrapper_table_flags() const #endif #ifdef HA_CAN_FULLTEXT_EXT table_flags |= HA_CAN_FULLTEXT_EXT; +#endif +#ifdef HA_GENERATED_COLUMNS + table_flags |= HA_GENERATED_COLUMNS; +#endif +#ifdef HA_CAN_VIRTUAL_COLUMNS + table_flags |= HA_CAN_VIRTUAL_COLUMNS; #endif DBUG_RETURN(table_flags); } @@ -2648,6 +2865,12 @@ ulonglong ha_mroonga::storage_table_flags() const #endif #ifdef HA_CAN_FULLTEXT_EXT flags |= HA_CAN_FULLTEXT_EXT; +#endif +#ifdef HA_GENERATED_COLUMNS + flags |= HA_GENERATED_COLUMNS; +#endif +#ifdef HA_CAN_VIRTUAL_COLUMNS + flags |= HA_CAN_VIRTUAL_COLUMNS; #endif DBUG_RETURN(flags); } @@ -2713,7 +2936,7 @@ ulong ha_mroonga::storage_index_flags(uint idx, uint part, bool all_parts) const part = 0; } Field *field = &(key->key_part[part].field[0]); - if (field && should_normalize(field)) { + if (field && (have_custom_normalizer(key) || should_normalize(field))) { need_normalize_p = true; } if (!need_normalize_p) { @@ -2737,7 +2960,7 @@ ulong ha_mroonga::index_flags(uint idx, uint part, bool all_parts) const DBUG_RETURN(HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR); } if (mrn_is_geo_key(key)) { - DBUG_RETURN(HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR); + DBUG_RETURN(HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR | HA_READ_RANGE); } int error = 0; @@ -2854,9 +3077,11 @@ int ha_mroonga::wrapper_create(const char *name, TABLE *table, DBUG_RETURN(ER_REQUIRES_PRIMARY_KEY); } - mrn::PathMapper mapper(name); - error = wrapper_create_index(name, table, info, tmp_share, - mapper.table_name()); + error = ensure_database_open(name); + if (error) + DBUG_RETURN(error); + + error = wrapper_create_index(name, table, tmp_share); if (error) DBUG_RETURN(error); @@ -2904,6 +3129,7 @@ int ha_mroonga::wrapper_create(const char *name, TABLE *table, delete hnd; if (error) { + mrn::PathMapper mapper(name); generic_delete_table(name, mapper.table_name()); } @@ -2967,7 +3193,7 @@ int ha_mroonga::wrapper_create_index_fulltext(const char *grn_table_name, GRN_OBJ_PERSISTENT; grn_obj *index_table; - grn_obj_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; + grn_column_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; if (!find_index_column_flags(key_info, &index_column_flags)) { index_column_flags |= GRN_OBJ_WITH_POSITION; @@ -3014,7 +3240,8 @@ int ha_mroonga::wrapper_create_index_fulltext(const char *grn_table_name, grn_obj_unlink(ctx, &token_filters); } - if (should_normalize(&key_info->key_part->field[0])) { + if (have_custom_normalizer(key_info) || + should_normalize(&key_info->key_part->field[0])) { grn_info_type info_type = GRN_INFO_NORMALIZER; grn_obj *normalizer = find_normalizer(key_info); if (normalizer) { @@ -3103,22 +3330,18 @@ int ha_mroonga::wrapper_create_index_geo(const char *grn_table_name, } int ha_mroonga::wrapper_create_index(const char *name, TABLE *table, - HA_CREATE_INFO *info, - MRN_SHARE *tmp_share, - const char *grn_table_name) + MRN_SHARE *tmp_share) { MRN_DBUG_ENTER_METHOD(); int error = 0; - error = ensure_database_open(name); - if (error) - DBUG_RETURN(error); - error = mrn_change_encoding(ctx, system_charset_info); if (error) DBUG_RETURN(error); grn_obj *grn_index_table; + mrn::PathMapper mapper(name); + const char *grn_table_name = mapper.table_name(); char *grn_table_path = NULL; // we don't specify path grn_obj *pkey_type = grn_ctx_at(ctx, GRN_DB_SHORT_TEXT); grn_obj *pkey_value_type = NULL; // we don't use this @@ -3307,10 +3530,9 @@ int ha_mroonga::storage_create(const char *name, TABLE *table, uint n_columns = table->s->fields; for (uint i = 0; i < n_columns; i++) { Field *field = table->s->field[i]; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); + mrn::ColumnName column_name(field->field_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, column_name.mysql_name()) == 0) { continue; } @@ -3325,6 +3547,12 @@ int ha_mroonga::storage_create(const char *name, TABLE *table, } #endif +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + grn_obj_flags col_flags = GRN_OBJ_PERSISTENT; if (!find_column_flags(field, tmp_share, i, &col_flags)) { col_flags |= GRN_OBJ_COLUMN_SCALAR; @@ -3341,12 +3569,13 @@ int ha_mroonga::storage_create(const char *name, TABLE *table, } char *col_path = NULL; // we don't specify path - grn_column_create(ctx, table_obj, column_name, column_name_size, + grn_column_create(ctx, table_obj, + column_name.c_str(), column_name.length(), col_path, col_flags, col_type); if (ctx->rc) { - grn_obj_remove(ctx, table_obj); error = ER_CANT_CREATE_TABLE; my_message(error, ctx->errbuf, MYF(0)); + grn_obj_remove(ctx, table_obj); DBUG_RETURN(error); } } @@ -3484,7 +3713,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, if (!grn_table_ref) { error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; - sprintf(err_msg, "refference table [%s.%s] is not mroonga table", + sprintf(err_msg, "reference table [%s.%s] is not mroonga table", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3503,7 +3732,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, grn_obj_unlink(ctx, grn_table_ref); error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; - sprintf(err_msg, "refference table [%s.%s] is not found", + sprintf(err_msg, "reference table [%s.%s] is not found", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3516,7 +3745,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, grn_obj_unlink(ctx, grn_table_ref); error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; - sprintf(err_msg, "refference table [%s.%s] has no primary key", + sprintf(err_msg, "reference table [%s.%s] has no primary key", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3531,7 +3760,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; sprintf(err_msg, - "refference table [%s.%s] primary key is multiple column", + "reference table [%s.%s] primary key is multiple column", table->s->db.str, ref_table_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3545,7 +3774,7 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, error = ER_CANT_CREATE_TABLE; char err_msg[MRN_BUFFER_SIZE]; sprintf(err_msg, - "refference column [%s.%s.%s] is not used for primary key", + "reference column [%s.%s.%s] is not used for primary key", table->s->db.str, ref_table_name.str, ref_field_name.str); my_message(error, err_msg, MYF(0)); DBUG_RETURN(false); @@ -3721,11 +3950,14 @@ int ha_mroonga::storage_create_index_table(TABLE *table, grn_obj *normalizer = NULL; Field *field = &(key_info->key_part->field[0]); if (key_info->flags & HA_FULLTEXT) { - if (should_normalize(field)) { + if (have_custom_normalizer(key_info) || + should_normalize(field)) { normalizer = find_normalizer(key_info); } } else if (key_alg != HA_KEY_ALG_HASH) { - if (!is_multiple_column_index && should_normalize(field)) { + if (!is_multiple_column_index && + (have_custom_normalizer(key_info) || + should_normalize(field))) { normalizer = find_normalizer(key_info); } } @@ -3748,19 +3980,48 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, { MRN_DBUG_ENTER_METHOD(); int error = 0; - grn_obj *index_table, *index_column; - const char *column_name = NULL; - int column_name_size = 0; + grn_obj *index_column; bool is_multiple_column_index = KEY_N_KEY_PARTS(key_info) > 1; if (!is_multiple_column_index) { Field *field = key_info->key_part[0].field; - column_name = field->field_name; - column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, field->field_name) == 0) { // skipping _id virtual column DBUG_RETURN(0); } + + if (is_foreign_key_field(table->s->table_name.str, + field->field_name)) { + DBUG_RETURN(0); + } + +#ifdef HA_CAN_VIRTUAL_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: storage: failed to create index: " + ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_STR, + field->field_name); + error = ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_NUM; + my_message(error, error_message, MYF(0)); + DBUG_RETURN(error); + } + } else { + int j, n_key_parts = KEY_N_KEY_PARTS(key_info); + for (j = 0; j < n_key_parts; j++) { + Field *field = key_info->key_part[j].field; + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: storage: failed to create index: " + ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_STR, + field->field_name); + error = ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_NUM; + my_message(error, error_message, MYF(0)); + DBUG_RETURN(error); + } + } +#endif } error = mrn_change_encoding(ctx, system_charset_info); @@ -3773,16 +4034,21 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, if (error) DBUG_RETURN(error); - grn_obj_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; + grn_obj *index_table = index_tables[i]; + + grn_column_flags index_column_flags = GRN_OBJ_COLUMN_INDEX | GRN_OBJ_PERSISTENT; if (!find_index_column_flags(key_info, &index_column_flags)) { - index_column_flags |= GRN_OBJ_WITH_POSITION; - if (is_multiple_column_index) { + grn_obj *tokenizer = grn_obj_get_info(ctx, index_table, + GRN_INFO_DEFAULT_TOKENIZER, NULL); + if (tokenizer) { + index_column_flags |= GRN_OBJ_WITH_POSITION; + } + if (is_multiple_column_index && (key_info->flags & HA_FULLTEXT)) { index_column_flags |= GRN_OBJ_WITH_SECTION; } } - index_table = index_tables[i]; const char *index_column_name; if (tmp_share->index_table && tmp_share->index_table[i]) { index_column_name = key_info->name; @@ -3813,10 +4079,11 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, int j, n_key_parts = KEY_N_KEY_PARTS(key_info); for (j = 0; j < n_key_parts; j++) { Field *field = key_info->key_part[j].field; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); - grn_obj *source_column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + mrn::ColumnName column_name(field->field_name); + grn_obj *source_column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); grn_id source_id = grn_obj_id(ctx, source_column); GRN_UINT32_PUT(ctx, &source_ids, source_id); grn_obj_unlink(ctx, source_column); @@ -3826,8 +4093,13 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name, grn_obj_unlink(ctx, &source_ids); } } else { + Field *field = key_info->key_part[0].field; + mrn::ColumnName column_name(field->field_name); grn_obj *column; - column = grn_obj_column(ctx, grn_table, column_name, column_name_size); + column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (column) { grn_obj source_ids; grn_id source_id = grn_obj_id(ctx, column); @@ -3887,18 +4159,31 @@ int ha_mroonga::storage_create_indexes(TABLE *table, const char *grn_table_name, DBUG_RETURN(error); } -int ha_mroonga::ensure_database_open(const char *name) +int ha_mroonga::ensure_database_open(const char *name, mrn::Database **db) { int error; MRN_DBUG_ENTER_METHOD(); - grn_obj *db; - error = mrn_db_manager->open(name, &db); + if (db) + *db = NULL; + + mrn::Database *local_db; + error = mrn_db_manager->open(name, &local_db); if (error) DBUG_RETURN(error); - grn_ctx_use(ctx, db); + if (db) + *db = local_db; + grn_ctx_use(ctx, local_db->get()); + + delete operations_; + operations_ = new mrn::Operations(ctx); + if (mrn_enable_operations_recording) { + operations_->enable_recording(); + } else { + operations_->disable_recording(); + } DBUG_RETURN(error); } @@ -3913,6 +4198,9 @@ int ha_mroonga::ensure_database_remove(const char *name) if (error) DBUG_RETURN(error); + delete operations_; + operations_ = NULL; + mrn_db_manager->close(name); mrn::PathMapper mapper(name); @@ -3922,7 +4210,14 @@ int ha_mroonga::ensure_database_remove(const char *name) } -int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info) +int ha_mroonga::create(const char *name, + TABLE *table, + HA_CREATE_INFO *info +#ifdef MRN_HANDLER_CREATE_HAVE_TABLE_DEFINITION + , + dd::Table *table_def +#endif + ) { int error = 0; MRN_SHARE *tmp_share; @@ -3954,26 +4249,17 @@ int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info) DBUG_RETURN(error); } -int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked) +int ha_mroonga::wrapper_open(const char *name, int mode, uint open_options) { int error = 0; MRN_DBUG_ENTER_METHOD(); - if (thd_sql_command(ha_thd()) == SQLCOM_REPAIR) { - error = ensure_database_remove(name); - if (error) - DBUG_RETURN(error); - error = ensure_database_open(name); - if (error) - DBUG_RETURN(error); - grn_table = NULL; - grn_index_tables = NULL; - grn_index_columns = NULL; - } else { - error = ensure_database_open(name); - if (error) - DBUG_RETURN(error); + mrn::Database *db = NULL; + error = ensure_database_open(name, &db); + if (error) + DBUG_RETURN(error); + if (!(open_options & HA_OPEN_FOR_REPAIR)) { error = open_table(name); if (error) DBUG_RETURN(error); @@ -4012,7 +4298,7 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked) #ifdef MRN_HANDLER_HAVE_SET_HA_SHARE_REF wrap_handler->set_ha_share_ref(&table->s->ha_share); #endif - error = wrap_handler->ha_open(table, name, mode, test_if_locked); + error = wrap_handler->ha_open(table, name, mode, open_options); } else { if (!(wrap_handler = parent_for_clone->wrap_handler->clone(name, mem_root_for_clone))) @@ -4039,6 +4325,39 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked) pk_keypart_map = make_prev_keypart_map( KEY_N_KEY_PARTS(&(table->key_info[table_share->primary_key]))); + if (!error) { + if (open_options & HA_OPEN_FOR_REPAIR) { + // TODO: How to check whether is DISABLE KEYS used or not? + error = wrapper_recreate_indexes(ha_thd()); + } else if (db) { + mrn::Lock lock(&mrn_operations_mutex); + mrn::PathMapper mapper(name); + const char *table_name = mapper.table_name(); + size_t table_name_size = strlen(table_name); + if (db->is_broken_table(table_name, table_name_size)) { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is started: <%s>", + name); + error = operations_->clear(table_name, table_name_size); + if (!error) { + db->mark_table_repaired(table_name, table_name_size); + if (!share->disable_keys) { + // TODO: implemented by "reindex" instead of "remove and recreate". + // Because "remove and recreate" invalidates opened indexes by + // other threads. + error = wrapper_disable_indexes_mroonga(HA_KEY_SWITCH_ALL); + if (!error) { + error = wrapper_enable_indexes_mroonga(HA_KEY_SWITCH_ALL); + } + } + } + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is done: <%s>: %s", + name, error == 0 ? "success" : "failure"); + } + } + } + if (error) { grn_obj_unlink(ctx, grn_table); @@ -4098,6 +4417,11 @@ int ha_mroonga::wrapper_open_indexes(const char *name) grn_index_tables[i] = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (ctx->rc == GRN_SUCCESS && !grn_index_tables[i]) { + grn_index_tables[i] = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (ctx->rc) { DBUG_PRINT("info", ("mroonga: sql_command=%u", thd_sql_command(ha_thd()))); @@ -4160,8 +4484,16 @@ void ha_mroonga::wrapper_overwrite_index_bits() { Field *field = table_share->field[i]; field->part_of_key.clear_all(); +#ifdef MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED field->part_of_key_not_clustered.clear_all(); +#endif field->part_of_sortkey.clear_all(); + /* + TODO: We may need to update field->part_of_key_not_extended for + MySQL >= 5.7.18. If users report "raw InnoDB can use index for + this case but Mroonga wrapper mode for InnoDB can't use index + for the same case", we'll reconsider it again. + */ } for (i = 0; i < table_share->keys; i++) { KEY *key_info = &table->s->key_info[i]; @@ -4176,7 +4508,9 @@ void ha_mroonga::wrapper_overwrite_index_bits() { table_share->keys_for_keyread.set_bit(i); field->part_of_key.set_bit(i); +#ifdef MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED field->part_of_key_not_clustered.set_bit(i); +#endif } if (index_flags(i, j, 1) & HA_READ_ORDER) field->part_of_sortkey.set_bit(i); @@ -4195,12 +4529,93 @@ void ha_mroonga::wrapper_overwrite_index_bits() DBUG_VOID_RETURN; } -int ha_mroonga::storage_open(const char *name, int mode, uint test_if_locked) +int ha_mroonga::storage_reindex() { int error = 0; MRN_DBUG_ENTER_METHOD(); - error = ensure_database_open(name); + uint n_keys = table_share->keys; + KEY *key_info = table->key_info; + + bool have_multiple_column_index = false; + bitmap_clear_all(table->read_set); + for (uint i = 0; i < n_keys; ++i) { + if (!grn_index_columns[i]) + continue; + + grn_hash *columns = grn_hash_create(ctx, NULL, sizeof(grn_id), 0, + GRN_OBJ_TABLE_HASH_KEY); + grn_table_columns(ctx, grn_index_tables[i], NULL, 0, + reinterpret_cast(columns)); + unsigned int n_columns = + grn_table_size(ctx, reinterpret_cast(columns)); + grn_hash_close(ctx, columns); + + bool is_multiple_column_index = + (KEY_N_KEY_PARTS(&(key_info[i])) != 1 && + !(key_info[i].flags & HA_FULLTEXT)); + + if (n_columns == 1 || is_multiple_column_index) { + grn_table_truncate(ctx, grn_index_tables[i]); + if (ctx->rc != GRN_SUCCESS) { + error = ER_ERROR_ON_WRITE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + char index_table_name[GRN_TABLE_MAX_KEY_SIZE]; + int index_table_name_size; + index_table_name_size = + grn_obj_name(ctx, grn_index_tables[i], + index_table_name, GRN_TABLE_MAX_KEY_SIZE); + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: reindex: failed to truncate index table: " + "<%.*s>: <%s>(%d)", + index_table_name_size, index_table_name, + ctx->errbuf, ctx->rc); + my_message(error, error_message, MYF(0)); + break; + } + } + + if (is_multiple_column_index) { + mrn_set_bitmap_by_key(table->read_set, &key_info[i]); + have_multiple_column_index = true; + } else { + grn_obj_reindex(ctx, grn_index_columns[i]); + if (ctx->rc != GRN_SUCCESS) { + error = ER_ERROR_ON_WRITE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + char index_column_name[GRN_TABLE_MAX_KEY_SIZE]; + int index_column_name_size; + index_column_name_size = + grn_obj_name(ctx, grn_index_columns[i], + index_column_name, GRN_TABLE_MAX_KEY_SIZE); + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: reindex: failed to reindex: " + "<%.*s>: <%s>(%d)", + index_column_name_size, index_column_name, + ctx->errbuf, ctx->rc); + my_message(error, error_message, MYF(0)); + break; + } + } + } + + if (!error && have_multiple_column_index) + error = storage_add_index_multiple_columns(key_info, n_keys, + grn_index_tables, + grn_index_columns, + false); + bitmap_set_all(table->read_set); + + DBUG_RETURN(error); +} + +int ha_mroonga::storage_open(const char *name, int mode, uint open_options) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + + mrn::Database *db; + error = ensure_database_open(name, &db); if (error) DBUG_RETURN(error); @@ -4215,19 +4630,38 @@ int ha_mroonga::storage_open(const char *name, int mode, uint test_if_locked) DBUG_RETURN(error); } - if (!(ha_thd()->open_options & HA_OPEN_FOR_REPAIR)) { + if (!(open_options & HA_OPEN_FOR_REPAIR)) { error = storage_open_indexes(name); if (error) { + storage_close_columns(); grn_obj_unlink(ctx, grn_table); grn_table = NULL; - // TODO: unlink elements - free(grn_columns); - // TODO: unlink elements - free(grn_column_ranges); DBUG_RETURN(error); } storage_set_keys_in_use(); + + { + mrn::Lock lock(&mrn_operations_mutex); + mrn::PathMapper mapper(name); + const char *table_name = mapper.table_name(); + size_t table_name_size = strlen(table_name); + if (db->is_broken_table(table_name, table_name_size)) { + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is started: <%s>", + name); + error = operations_->repair(table_name, table_name_size); + if (!error) + db->mark_table_repaired(table_name, table_name_size); + if (!share->disable_keys) { + if (!error) + error = storage_reindex(); + } + GRN_LOG(ctx, GRN_LOG_NOTICE, + "Auto repair is done: <%s>: %s", + name, error == 0 ? "success" : "failure"); + } + } } ref_length = sizeof(grn_id); @@ -4294,18 +4728,26 @@ int ha_mroonga::storage_open_columns(void) for (int i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); + mrn::ColumnName column_name(field->field_name); if (table_share->blob_fields) { blob_buffers[i].set_charset(field->charset()); } - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, column_name.mysql_name()) == 0) { continue; } +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + grn_columns[i] = NULL; + grn_column_ranges[i] = NULL; + continue; + } +#endif - grn_columns[i] = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + grn_columns[i] = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (!grn_columns[i]) { error = ER_CANT_OPEN_FILE; my_message(error, ctx->errbuf, MYF(0)); @@ -4322,25 +4764,31 @@ int ha_mroonga::storage_open_columns(void) } if (error != 0) { - for (int i = 0; i < n_columns; i++) { - grn_obj *column = grn_columns[i]; - if (column) { - grn_obj_unlink(ctx, column); - } + storage_close_columns(); + } - grn_obj *range = grn_column_ranges[i]; - if (range) { - grn_obj_unlink(ctx, range); - } + DBUG_RETURN(error); +} + +void ha_mroonga::storage_close_columns(void) +{ + int n_columns = table->s->fields; + for (int i = 0; i < n_columns; i++) { + grn_obj *column = grn_columns[i]; + if (column) { + grn_obj_unlink(ctx, column); } - free(grn_columns); - grn_columns = NULL; - free(grn_column_ranges); - grn_column_ranges = NULL; + grn_obj *range = grn_column_ranges[i]; + if (range) { + grn_obj_unlink(ctx, range); + } } - DBUG_RETURN(error); + free(grn_columns); + grn_columns = NULL; + free(grn_column_ranges); + grn_column_ranges = NULL; } int ha_mroonga::storage_open_indexes(const char *name) @@ -4400,6 +4848,11 @@ int ha_mroonga::storage_open_indexes(const char *name) grn_index_tables[i] = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (ctx->rc == GRN_SUCCESS && !grn_index_tables[i]) { + grn_index_tables[i] = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (ctx->rc == GRN_SUCCESS) { grn_index_columns[i] = grn_obj_column(ctx, grn_index_tables[i], @@ -4458,7 +4911,14 @@ int ha_mroonga::storage_open_indexes(const char *name) DBUG_RETURN(error); } -int ha_mroonga::open(const char *name, int mode, uint test_if_locked) +int ha_mroonga::open(const char *name, + int mode, + uint open_options +#ifdef MRN_HANDLER_OPEN_HAVE_TABLE_DEFINITION + , + const dd::Table *table_def +#endif + ) { int error = 0; MRN_DBUG_ENTER_METHOD(); @@ -4476,9 +4936,9 @@ int ha_mroonga::open(const char *name, int mode, uint test_if_locked) if (share->wrapper_mode) { - error = wrapper_open(name, mode, test_if_locked); + error = wrapper_open(name, mode, open_options); } else { - error = storage_open(name, mode, test_if_locked); + error = storage_open(name, mode, open_options); } if (error) @@ -4546,7 +5006,10 @@ int ha_mroonga::close() DBUG_RETURN(error); } - error = add_wrap_hton(share->table_name, share->hton); + if (thd) + { + error = add_wrap_hton(share->table_name, share->hton); + } bitmap_free(&multiple_column_key_bitmap); if (share->use_count == 1) { mrn_free_long_term_share(share->long_term_share); @@ -4605,7 +5068,7 @@ int ha_mroonga::generic_delete_table(const char *name, const char *table_name) error = drop_indexes(table_name); grn_obj *table_obj = grn_ctx_get(ctx, table_name, strlen(table_name)); - if (!ctx->rc) { + if (table_obj) { grn_obj_remove(ctx, table_obj); } if (ctx->rc) { @@ -4648,6 +5111,46 @@ int ha_mroonga::delete_table(const char *name) } } + if (!wrap_handlerton) { + bool open_table_to_get_wrap_handlerton = true; + if (mapper.is_internal_table_name()) { + open_table_to_get_wrap_handlerton = false; + } + if (open_table_to_get_wrap_handlerton) { + TABLE_LIST table_list; + table_list.init_one_table(mapper.db_name(), strlen(mapper.db_name()), + mapper.mysql_table_name(), + strlen(mapper.mysql_table_name()), + mapper.mysql_table_name(), + TL_WRITE); + mrn_open_mutex_lock(NULL); + TABLE_SHARE *tmp_table_share = + mrn_create_tmp_table_share(&table_list, name, &error); + error = 0; + mrn_open_mutex_unlock(NULL); + if (tmp_table_share) { + TABLE tmp_table; + tmp_table.s = tmp_table_share; +#ifdef WITH_PARTITION_STORAGE_ENGINE + tmp_table.part_info = NULL; +#endif + MRN_SHARE *tmp_share = mrn_get_share(name, &tmp_table, &error); + if (tmp_share) { + wrap_handlerton = tmp_share->hton; + mrn_free_long_term_share(tmp_share->long_term_share); + tmp_share->long_term_share = NULL; + mrn_free_share(tmp_share); + } + mrn_open_mutex_lock(NULL); + mrn_free_tmp_table_share(tmp_table_share); + mrn_open_mutex_unlock(NULL); + if (error) { + DBUG_RETURN(error); + } + } + } + } + if (wrap_handlerton) { error = wrapper_delete_table(name, wrap_handlerton, mapper.table_name()); @@ -4658,8 +5161,8 @@ int ha_mroonga::delete_table(const char *name) error = generic_delete_table(name, mapper.table_name()); } - if (!error && is_temporary_table_name(name)) { - mrn_db_manager->drop(name); + if (!error) { + error = operations_->clear(name, strlen(name)); } DBUG_RETURN(error); @@ -5032,6 +5535,70 @@ int ha_mroonga::rnd_end() DBUG_RETURN(error); } +#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR +int ha_mroonga::wrapper_records(ha_rows *num_rows) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + MRN_SET_WRAP_SHARE_KEY(share, table->s); + MRN_SET_WRAP_TABLE_KEY(this, table); + error = wrap_handler->ha_records(num_rows); + MRN_SET_BASE_SHARE_KEY(share, table->s); + MRN_SET_BASE_TABLE_KEY(this, table); + DBUG_RETURN(error); +} + +int ha_mroonga::storage_records(ha_rows *num_rows) +{ + MRN_DBUG_ENTER_METHOD(); + int error = handler::records(num_rows); + DBUG_RETURN(error); +} + +int ha_mroonga::records(ha_rows *num_rows) +{ + MRN_DBUG_ENTER_METHOD(); + int error = 0; + if (share->wrapper_mode) { + error = wrapper_records(num_rows); + } else { + error = storage_records(num_rows); + } + DBUG_RETURN(error); +} +#else +ha_rows ha_mroonga::wrapper_records() +{ + ha_rows num_rows; + MRN_DBUG_ENTER_METHOD(); + MRN_SET_WRAP_SHARE_KEY(share, table->s); + MRN_SET_WRAP_TABLE_KEY(this, table); + num_rows = wrap_handler->records(); + MRN_SET_BASE_SHARE_KEY(share, table->s); + MRN_SET_BASE_TABLE_KEY(this, table); + DBUG_RETURN(num_rows); +} + +ha_rows ha_mroonga::storage_records() +{ + MRN_DBUG_ENTER_METHOD(); + ha_rows num_rows = handler::records(); + DBUG_RETURN(num_rows); +} + +ha_rows ha_mroonga::records() +{ + MRN_DBUG_ENTER_METHOD(); + ha_rows num_rows; + if (share->wrapper_mode) { + num_rows = wrapper_records(); + } else { + num_rows = storage_records(); + } + DBUG_RETURN(num_rows); +} +#endif + int ha_mroonga::wrapper_rnd_next(uchar *buf) { int error = 0; @@ -5273,7 +5840,15 @@ int ha_mroonga::wrapper_write_row(uchar *buf) { int error = 0; THD *thd = ha_thd(); + MRN_DBUG_ENTER_METHOD(); + + mrn::Operation operation(operations_, + "write", + table->s->table_name.str, + table->s->table_name.length); + + operation.record_target(record_id); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); tmp_disable_binlog(thd); @@ -5388,6 +5963,11 @@ int ha_mroonga::storage_write_row(uchar *buf) DBUG_RETURN(error); } + mrn::Operation operation(operations_, + "write", + table->s->table_name.str, + table->s->table_name.length); + THD *thd = ha_thd(); int i; int n_columns = table->s->fields; @@ -5401,11 +5981,17 @@ int ha_mroonga::storage_write_row(uchar *buf) mrn::DebugColumnAccess debug_column_access(table, table->read_set); for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; + +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif if (field->is_null()) continue; - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + mrn::ColumnName column_name(field->field_name); + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { push_warning_printf(thd, MRN_SEVERITY_WARNING, WARN_DATA_TRUNCATED, MRN_GET_ERR_MSG(WARN_DATA_TRUNCATED), @@ -5489,17 +6075,25 @@ int ha_mroonga::storage_write_row(uchar *buf) } DBUG_RETURN(error); } + operation.record_target(record_id); } grn_obj colbuf; GRN_VOID_INIT(&colbuf); for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; if (field->is_null()) continue; +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + + mrn::ColumnName column_name(field->field_name); + #ifdef MRN_HAVE_SPATIAL bool is_null_geometry_value = field->real_type() == MYSQL_TYPE_GEOMETRY && @@ -5509,39 +6103,63 @@ int ha_mroonga::storage_write_row(uchar *buf) } #endif - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { continue; } error = mrn_change_encoding(ctx, field->charset()); if (error) { - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); goto err; } error = generic_store_bulk(field, &colbuf); if (error) { - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); goto err; } - if (added && is_grn_zero_column_value(grn_columns[i], &colbuf)) { - // WORKAROUND: groonga can't index newly added '0' value for - // fix size column. So we add non-'0' value first then add - // real '0' value again. It will be removed when groonga - // supports 'null' value. - char *bytes = GRN_BULK_HEAD(&colbuf); - bytes[0] = '\1'; - grn_obj_set_value(ctx, grn_columns[i], record_id, &colbuf, GRN_OBJ_SET); - bytes[0] = '\0'; + + grn_obj *column = grn_columns[i]; + if (is_foreign_key_field(table->s->table_name.str, field->field_name)) { + grn_obj value; + GRN_RECORD_INIT(&value, 0, grn_obj_get_range(ctx, column)); + grn_rc cast_rc = grn_obj_cast(ctx, &colbuf, &value, GRN_FALSE); + if (cast_rc != GRN_SUCCESS) { + grn_obj inspected; + GRN_TEXT_INIT(&inspected, 0); + grn_inspect(ctx, &inspected, &colbuf); + error = HA_ERR_NO_REFERENCED_ROW; + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "foreign record doesn't exist: <%s>:<%.*s>", + field->field_name, + static_cast(GRN_TEXT_LEN(&inspected)), + GRN_TEXT_VALUE(&inspected)); + GRN_OBJ_FIN(ctx, &value); + GRN_OBJ_FIN(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &inspected); + goto err; + } + grn_obj_set_value(ctx, column, record_id, &value, GRN_OBJ_SET); + } else { + if (added && is_grn_zero_column_value(column, &colbuf)) { + // WORKAROUND: groonga can't index newly added '0' value for + // fix size column. So we add non-'0' value first then add + // real '0' value again. It will be removed when groonga + // supports 'null' value. + char *bytes = GRN_BULK_HEAD(&colbuf); + bytes[0] = '\1'; + grn_obj_set_value(ctx, column, record_id, &colbuf, GRN_OBJ_SET); + bytes[0] = '\0'; + } + grn_obj_set_value(ctx, column, record_id, &colbuf, GRN_OBJ_SET); } - grn_obj_set_value(ctx, grn_columns[i], record_id, &colbuf, GRN_OBJ_SET); if (ctx->rc) { - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); error = ER_ERROR_ON_WRITE; goto err; } } - grn_obj_unlink(ctx, &colbuf); + GRN_OBJ_FIN(ctx, &colbuf); error = storage_write_row_multiple_column_indexes(buf, record_id); if (error) { @@ -5862,6 +6480,12 @@ int ha_mroonga::wrapper_update_row(const uchar *old_data, uchar *new_data) int error = 0; THD *thd = ha_thd(); + + mrn::Operation operation(operations_, + "update", + table->s->table_name.str, + table->s->table_name.length); + MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); tmp_disable_binlog(thd); @@ -5999,6 +6623,12 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) DBUG_RETURN(error); } + mrn::Operation operation(operations_, + "update", + table->s->table_name.str, + table->s->table_name.length); + operation.record_target(record_id); + grn_obj colbuf; int i; uint j; @@ -6007,11 +6637,22 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; - if (bitmap_is_set(table->write_set, field->field_index)) { - if (field->is_null()) continue; - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + + if (!bitmap_is_set(table->write_set, field->field_index)) + continue; + + if (field->is_null()) + continue; + + { + mrn::ColumnName column_name(field->field_name); + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { push_warning_printf(thd, MRN_SEVERITY_WARNING, WARN_DATA_TRUNCATED, MRN_GET_ERR_MSG(WARN_DATA_TRUNCATED), MRN_COLUMN_NAME_ID, @@ -6021,6 +6662,38 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) } } } + + if (!is_foreign_key_field(table->s->table_name.str, field->field_name)) + continue; + + { + grn_obj *column = grn_columns[i]; + grn_obj new_value; + GRN_VOID_INIT(&new_value); + { + mrn::DebugColumnAccess debug_column_access(table, table->read_set); + generic_store_bulk(field, &new_value); + } + grn_obj casted_value; + GRN_RECORD_INIT(&casted_value, 0, grn_obj_get_range(ctx, column)); + grn_rc cast_rc = grn_obj_cast(ctx, &new_value, &casted_value, GRN_FALSE); + GRN_OBJ_FIN(ctx, &casted_value); + if (cast_rc != GRN_SUCCESS) { + grn_obj inspected; + GRN_TEXT_INIT(&inspected, 0); + grn_inspect(ctx, &inspected, &new_value); + GRN_OBJ_FIN(ctx, &new_value); + error = HA_ERR_NO_REFERENCED_ROW; + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "foreign record doesn't exist: <%s>:<%.*s>", + field->field_name, + static_cast(GRN_TEXT_LEN(&inspected)), + GRN_TEXT_VALUE(&inspected)); + GRN_OBJ_FIN(ctx, &inspected); + DBUG_RETURN(error); + } + GRN_OBJ_FIN(ctx, &new_value); + } } KEY *pkey_info = NULL; @@ -6044,14 +6717,21 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) GRN_VOID_INIT(&colbuf); for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; - const char *column_name = field->field_name; + +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + if (bitmap_is_set(table->write_set, field->field_index)) { mrn::DebugColumnAccess debug_column_access(table, table->read_set); DBUG_PRINT("info", ("mroonga: update column %d(%d)",i,field->field_index)); if (field->is_null()) continue; - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + mrn::ColumnName column_name(field->field_name); + if (strcmp(MRN_COLUMN_NAME_ID, column_name.c_str()) == 0) { continue; } @@ -6059,30 +6739,43 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data) if (error) goto err; + bool is_pkey = false; bool on_duplicate_key_update = (inserting_with_update && ignoring_duplicated_key); - if (!on_duplicate_key_update && pkey_info) { - bool have_pkey = false; + if (pkey_info && !on_duplicate_key_update) { for (j = 0; j < KEY_N_KEY_PARTS(pkey_info); j++) { Field *pkey_field = pkey_info->key_part[j].field; - if (strcmp(pkey_field->field_name, column_name) == 0) { - if (!replacing_) { - char message[MRN_BUFFER_SIZE]; - snprintf(message, MRN_BUFFER_SIZE, - "data truncated for primary key column: <%s>", - column_name); - push_warning(thd, MRN_SEVERITY_WARNING, - WARN_DATA_TRUNCATED, message); - } - have_pkey = true; + if (strcmp(pkey_field->field_name, column_name.c_str()) == 0) { + is_pkey = true; + break; } } - if (have_pkey) { - continue; - } } generic_store_bulk(field, &colbuf); + if (is_pkey) { + bool is_multiple_column_index = KEY_N_KEY_PARTS(pkey_info) > 1; + bool is_same_value; + if (is_multiple_column_index) { + is_same_value = false; + } else { + grn_id found_record_id = grn_table_get(ctx, + grn_table, + GRN_BULK_HEAD(&colbuf), + GRN_BULK_VSIZE(&colbuf)); + is_same_value = (record_id == found_record_id); + } + if (!is_same_value && !replacing_) { + char message[MRN_BUFFER_SIZE]; + snprintf(message, MRN_BUFFER_SIZE, + "data truncated for primary key column: <%s>", + column_name.c_str()); + push_warning(thd, MRN_SEVERITY_WARNING, + WARN_DATA_TRUNCATED, message); + } + continue; + } + grn_obj_set_value(ctx, grn_columns[i], record_id, &colbuf, GRN_OBJ_SET); if (ctx->rc) { grn_obj_unlink(ctx, &colbuf); @@ -6340,6 +7033,12 @@ int ha_mroonga::wrapper_delete_row(const uchar *buf) int error = 0; THD *thd= ha_thd(); + + mrn::Operation operation(operations_, + "delete", + table->s->table_name.str, + table->s->table_name.length); + MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); tmp_disable_binlog(thd); @@ -6429,6 +7128,69 @@ int ha_mroonga::storage_delete_row(const uchar *buf) DBUG_RETURN(0); } + mrn::Operation operation(operations_, + "delete", + table->s->table_name.str, + table->s->table_name.length); + operation.record_target(record_id); + + { + grn_id referencing_child_table_id = GRN_ID_NIL; + grn_hash *columns = grn_hash_create(ctx, NULL, sizeof(grn_id), 0, + GRN_OBJ_TABLE_HASH_KEY|GRN_HASH_TINY); + grn_table_columns(ctx, grn_table, "", 0, + reinterpret_cast(columns)); + GRN_HASH_EACH_BEGIN(ctx, columns, cursor, id) { + void *key; + grn_hash_cursor_get_key(ctx, cursor, &key); + grn_id column_id = *static_cast(key); + grn_obj *column = grn_ctx_at(ctx, column_id); + if (!column) + continue; + + if (column->header.type != GRN_COLUMN_INDEX) + continue; + + grn_ii_cursor *ii_cursor = + grn_ii_cursor_open(ctx, + reinterpret_cast(column), + record_id, + GRN_ID_NIL, + GRN_ID_MAX, + 0, + 0); + if (!ii_cursor) + continue; + + if (grn_ii_cursor_next(ctx, ii_cursor)) { + referencing_child_table_id = grn_obj_get_range(ctx, column); + } + + grn_ii_cursor_close(ctx, ii_cursor); + + if (referencing_child_table_id != GRN_ID_NIL) + break; + } GRN_HASH_EACH_END(ctx, cursor); + grn_hash_close(ctx, columns); + + if (referencing_child_table_id != GRN_ID_NIL) { + grn_obj *referencing_child_table = + grn_ctx_at(ctx, referencing_child_table_id); + char name[GRN_TABLE_MAX_KEY_SIZE]; + int name_size; + name_size = grn_obj_name(ctx, + referencing_child_table, + name, + GRN_TABLE_MAX_KEY_SIZE); + error = HA_ERR_ROW_IS_REFERENCED; + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "one or more child rows exist in <%.*s>", + name_size, + name); + DBUG_RETURN(error); + } + } + storage_store_fields_for_prep_update(buf, NULL, record_id); { mrn::Lock lock(&(share->record_mutex), have_unique_index()); @@ -6799,6 +7561,13 @@ ha_rows ha_mroonga::storage_records_in_range(uint key_nr, key_range *range_min, grn_ii *ii = reinterpret_cast(index_column); row_count = grn_ii_estimate_size_for_lexicon_cursor(ctx, ii, cursor); grn_table_cursor_close(ctx, cursor); + + unsigned int max_n_lexicon_records = + grn_table_size(ctx, grn_index_tables[key_nr]); + if (cursor_limit >= 0 && + static_cast(cursor_limit) < max_n_lexicon_records) { + row_count++; + } } DBUG_RETURN(row_count); } @@ -6960,7 +7729,7 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, enum ha_rkey_function find_flag) { MRN_DBUG_ENTER_METHOD(); - check_count_skip(keypart_map, 0, false); + check_count_skip(keypart_map); int error = 0; @@ -6976,6 +7745,29 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, clear_cursor_geo(); clear_empty_value_records(); + switch (find_flag) { + case HA_READ_BEFORE_KEY: + flags |= GRN_CURSOR_LT | GRN_CURSOR_DESCENDING; + break; + case HA_READ_PREFIX_LAST: + flags |= GRN_CURSOR_PREFIX | GRN_CURSOR_DESCENDING; + break; + case HA_READ_PREFIX_LAST_OR_PREV: + flags |= GRN_CURSOR_LE | GRN_CURSOR_DESCENDING; + break; + case HA_READ_AFTER_KEY: + flags |= GRN_CURSOR_GT | GRN_CURSOR_ASCENDING; + break; + case HA_READ_KEY_OR_NEXT: + flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; + break; + case HA_READ_KEY_EXACT: + flags |= GRN_CURSOR_LE | GRN_CURSOR_GE; + break; + default: + break; + } + bool is_multiple_column_index = KEY_N_KEY_PARTS(key_info) > 1; if (is_multiple_column_index) { mrn_change_encoding(ctx, NULL); @@ -6987,13 +7779,21 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, "multiple column index key length=<%u>", key_length, key_info->key_length)); if (key_length == key_info->key_length) { - if (find_flag == HA_READ_BEFORE_KEY || - find_flag == HA_READ_PREFIX_LAST_OR_PREV) { + switch (find_flag) { + case HA_READ_BEFORE_KEY: + case HA_READ_PREFIX_LAST_OR_PREV: key_max = key_max_entity; storage_encode_multiple_column_key(key_info, key, key_length, key_max, &size_max); - } else { + break; + case HA_READ_PREFIX_LAST: + key_min = key_min_entity; + storage_encode_multiple_column_key(key_info, + key, key_length, + key_min, &size_min); + break; + default: key_min = key_min_entity; storage_encode_multiple_column_key(key_info, key, key_length, @@ -7002,13 +7802,102 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, key_max = key_min; size_max = size_min; } + break; } } else { - flags |= GRN_CURSOR_PREFIX; - key_min = key_min_entity; - storage_encode_multiple_column_key(key_info, - key, key_length, - key_min, &size_min); + const uchar *prev_key = NULL; + uint prev_key_length = 0; + if ((keypart_map >> 1) > 0) { + prev_key = key; + prev_key_length = + mrn_calculate_key_len(table, active_index, key, keypart_map >> 1); + } + switch (find_flag) { + case HA_READ_BEFORE_KEY: + if (prev_key) { + flags |= GRN_CURSOR_GE; + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + prev_key, prev_key_length, + NULL, 0, + key_min, &size_min, + NULL, NULL); + } + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + key, key_length, + NULL, 0, + key_max, &size_max, + NULL, NULL); + break; + case HA_READ_PREFIX_LAST: + key_min = key_min_entity; + storage_encode_multiple_column_key(key_info, + key, key_length, + key_min, &size_min); + break; + case HA_READ_PREFIX_LAST_OR_PREV: + if (prev_key) { + flags |= GRN_CURSOR_GE; + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + prev_key, prev_key_length, + NULL, 0, + key_min, &size_min, + NULL, NULL); + } + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + key, key_length, + NULL, NULL, + key_max, &size_max); + break; + case HA_READ_AFTER_KEY: + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + key, key_length, + NULL, NULL, + key_min, &size_min); + if (prev_key) { + flags |= GRN_CURSOR_LE; + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + prev_key, prev_key_length, + NULL, NULL, + key_max, &size_max); + } + break; + case HA_READ_KEY_OR_NEXT: + key_min = key_min_entity; + storage_encode_multiple_column_key_range(key_info, + key, key_length, + NULL, 0, + key_min, &size_min, + NULL, NULL); + if (prev_key) { + flags |= GRN_CURSOR_LE; + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + NULL, 0, + prev_key, prev_key_length, + NULL, NULL, + key_max, &size_max); + } + break; + case HA_READ_KEY_EXACT: + key_min = key_min_entity; + key_max = key_max_entity; + storage_encode_multiple_column_key_range(key_info, + key, key_length, + key, key_length, + key_min, &size_min, + key_max, &size_max); + default: + break; + } } } else if (mrn_is_geo_key(key_info)) { error = mrn_change_encoding(ctx, key_info->key_part->field->charset()); @@ -7055,23 +7944,6 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, } } - switch (find_flag) { - case HA_READ_BEFORE_KEY: - flags |= GRN_CURSOR_LT | GRN_CURSOR_DESCENDING; - break; - case HA_READ_PREFIX_LAST_OR_PREV: - flags |= GRN_CURSOR_LE | GRN_CURSOR_DESCENDING; - break; - case HA_READ_AFTER_KEY: - flags |= GRN_CURSOR_GT | GRN_CURSOR_ASCENDING; - break; - case HA_READ_KEY_OR_NEXT: - flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; - break; - default: - break; - } - uint pkey_nr = table->s->primary_key; if (key_nr == pkey_nr) { DBUG_PRINT("info", ("mroonga: use primary key")); @@ -7509,222 +8381,6 @@ int ha_mroonga::index_next_same(uchar *buf, const uchar *key, uint keylen) DBUG_RETURN(error); } -int ha_mroonga::wrapper_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted) -{ - int error = 0; - MRN_DBUG_ENTER_METHOD(); - KEY *key_info = &(table->key_info[active_index]); - if (mrn_is_geo_key(key_info)) { - clear_cursor_geo(); - error = generic_geo_open_cursor(start_key->key, start_key->flag); - if (!error) { - error = wrapper_get_next_geo_record(table->record[0]); - } - DBUG_RETURN(error); - } - MRN_SET_WRAP_SHARE_KEY(share, table->s); - MRN_SET_WRAP_TABLE_KEY(this, table); - if (fulltext_searching) - set_pk_bitmap(); - error = wrap_handler->read_range_first(start_key, end_key, eq_range, - sorted); - MRN_SET_BASE_SHARE_KEY(share, table->s); - MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_RETURN(error); -} - -int ha_mroonga::storage_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted) -{ - MRN_DBUG_ENTER_METHOD(); - check_count_skip(start_key ? start_key->keypart_map : 0, - end_key ? end_key->keypart_map : 0, false); - int flags = 0, error; - uint size_min = 0, size_max = 0; - uchar *key_min = NULL, *key_max = NULL; - uchar key_min_entity[MRN_MAX_KEY_SIZE]; - uchar key_max_entity[MRN_MAX_KEY_SIZE]; - KEY *key_info = &(table->s->key_info[active_index]); - - clear_cursor(); - - bool is_multiple_column_index = KEY_N_KEY_PARTS(key_info) > 1; - if (is_multiple_column_index) { - mrn_change_encoding(ctx, NULL); - if (start_key && end_key && - start_key->length == end_key->length && - memcmp(start_key->key, end_key->key, start_key->length) == 0) { - flags |= GRN_CURSOR_PREFIX; - key_min = key_min_entity; - storage_encode_multiple_column_key(key_info, - start_key->key, start_key->length, - key_min, &size_min); - } else { - key_min = key_min_entity; - key_max = key_max_entity; - storage_encode_multiple_column_key_range(key_info, - start_key, end_key, - key_min, &size_min, - key_max, &size_max); - if (size_min == 0) { - key_min = NULL; - } - if (size_max == 0) { - key_max = NULL; - } - } - } else { - Field *field = key_info->key_part[0].field; - const char *column_name = field->field_name; - error = mrn_change_encoding(ctx, field->charset()); - if (error) - DBUG_RETURN(error); - if (start_key) { - key_min = key_min_entity; - storage_encode_key(field, start_key->key, key_min_entity, - &size_min); - if (start_key->flag == HA_READ_KEY_EXACT) { - // for _id - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { - grn_id found_record_id = *((grn_id *)key_min); - if (grn_table_at(ctx, grn_table, found_record_id) != GRN_ID_NIL) { // found - storage_store_fields(table->record[0], found_record_id); - table->status = 0; - cursor = NULL; - record_id = found_record_id; - DBUG_RETURN(0); - } else { - table->status = STATUS_NOT_FOUND; - cursor = NULL; - record_id = GRN_ID_NIL; - DBUG_RETURN(HA_ERR_END_OF_FILE); - } - } - } - } - if (end_key) { - key_max = key_max_entity; - storage_encode_key(field, end_key->key, key_max, &size_max); - } - } - - if (start_key) { - switch (start_key->flag) { - case HA_READ_AFTER_KEY: - flags |= GRN_CURSOR_GT | GRN_CURSOR_ASCENDING; - break; - case HA_READ_KEY_OR_NEXT: - flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; - break; - default: - break; - } - } - if (end_key) { - switch (end_key->flag) { - case HA_READ_BEFORE_KEY: - flags |= GRN_CURSOR_LT | GRN_CURSOR_ASCENDING; - break; - case HA_READ_AFTER_KEY: - flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING; - break; - default: - break; - } - } - - uint pkey_nr = table->s->primary_key; - if (active_index == pkey_nr) { - DBUG_PRINT("info", ("mroonga: use primary key")); - cursor = grn_table_cursor_open(ctx, grn_table, - key_min, size_min, key_max, size_max, - 0, -1, flags); - } else { - if (is_multiple_column_index) { - DBUG_PRINT("info", ("mroonga: use multiple column key%u", active_index)); - } else { - DBUG_PRINT("info", ("mroonga: use key%u", active_index)); - } - index_table_cursor = grn_table_cursor_open(ctx, - grn_index_tables[active_index], - key_min, size_min, - key_max, size_max, - 0, -1, flags); - cursor = grn_index_cursor_open(ctx, index_table_cursor, - grn_index_columns[active_index], - 0, GRN_ID_MAX, 0); - } - if (ctx->rc) { - my_message(ER_ERROR_ON_READ, ctx->errbuf, MYF(0)); - DBUG_RETURN(ER_ERROR_ON_READ); - } - error = storage_get_next_record(table->record[0]); - DBUG_RETURN(error); -} - -int ha_mroonga::read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted) -{ - MRN_DBUG_ENTER_METHOD(); - int error = 0; - if (share->wrapper_mode) - { - error = wrapper_read_range_first(start_key, end_key, eq_range, - sorted); - } else { - error = storage_read_range_first(start_key, end_key, eq_range, sorted); - } - DBUG_RETURN(error); -} - -int ha_mroonga::wrapper_read_range_next() -{ - int error = 0; - MRN_DBUG_ENTER_METHOD(); - KEY *key_info = &(table->key_info[active_index]); - if (mrn_is_geo_key(key_info)) { - error = wrapper_get_next_geo_record(table->record[0]); - DBUG_RETURN(error); - } - MRN_SET_WRAP_SHARE_KEY(share, table->s); - MRN_SET_WRAP_TABLE_KEY(this, table); - if (fulltext_searching) - set_pk_bitmap(); - error = wrap_handler->read_range_next(); - MRN_SET_BASE_SHARE_KEY(share, table->s); - MRN_SET_BASE_TABLE_KEY(this, table); - DBUG_RETURN(error); -} - -int ha_mroonga::storage_read_range_next() -{ - MRN_DBUG_ENTER_METHOD(); - - if (cursor == NULL) { - DBUG_RETURN(HA_ERR_END_OF_FILE); - } - int error = storage_get_next_record(count_skip ? NULL : table->record[0]); - - DBUG_RETURN(error); -} - -int ha_mroonga::read_range_next() -{ - MRN_DBUG_ENTER_METHOD(); - int error = 0; - if (share->wrapper_mode) - { - error = wrapper_read_range_next(); - } else { - error = storage_read_range_next(); - } - DBUG_RETURN(error); -} - int ha_mroonga::generic_ft_init() { MRN_DBUG_ENTER_METHOD(); @@ -7749,257 +8405,63 @@ int ha_mroonga::generic_ft_init() if (sorted_result) { if (grn_table->header.type == GRN_TABLE_NO_KEY) { mrn_ft_info->id_accessor = grn_obj_column(ctx, sorted_result, - MRN_COLUMN_NAME_ID, - strlen(MRN_COLUMN_NAME_ID)); - } else { - mrn_ft_info->key_accessor = grn_obj_column(ctx, sorted_result, - MRN_COLUMN_NAME_KEY, - strlen(MRN_COLUMN_NAME_KEY)); - } - } else { - mrn_ft_info->key_accessor = grn_obj_column(ctx, mrn_ft_info->result, - MRN_COLUMN_NAME_KEY, - strlen(MRN_COLUMN_NAME_KEY)); - } - } - DBUG_RETURN(error); -} - -int ha_mroonga::wrapper_ft_init() -{ - MRN_DBUG_ENTER_METHOD(); - int error = generic_ft_init(); - DBUG_RETURN(error); -} - -int ha_mroonga::storage_ft_init() -{ - MRN_DBUG_ENTER_METHOD(); - int error = generic_ft_init(); - record_id = GRN_ID_NIL; - DBUG_RETURN(error); -} - -int ha_mroonga::ft_init() -{ - MRN_DBUG_ENTER_METHOD(); - int error = 0; - if (share->wrapper_mode) - { - error = wrapper_ft_init(); - } else { - error = storage_ft_init(); - } - DBUG_RETURN(error); -} - -void ha_mroonga::generic_ft_init_ext_add_conditions_fast_order_limit( - struct st_mrn_ft_info *info, grn_obj *expression) -{ - MRN_DBUG_ENTER_METHOD(); - - Item *where = - MRN_SELECT_LEX_GET_WHERE_COND(table->pos_in_table_list->select_lex); - - bool is_storage_mode = !(share->wrapper_mode); - mrn::ConditionConverter converter(info->ctx, grn_table, is_storage_mode); - converter.convert(where, expression); - - DBUG_VOID_RETURN; -} - -bool ha_mroonga::generic_ft_init_ext_parse_pragma_d(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_operator *default_operator, - uint *consumed_keyword_length) -{ - MRN_DBUG_ENTER_METHOD(); - - grn_bool succeeded = true; - if (keyword_length >= 1 && keyword[0] == '+') { - *default_operator = GRN_OP_AND; - *consumed_keyword_length = 1; - } else if (keyword_length >= 1 && keyword[0] == '-') { - *default_operator = GRN_OP_AND_NOT; - *consumed_keyword_length = 1; - } else if (keyword_length >= 2 && memcmp(keyword, "OR", 2) == 0) { - *default_operator = GRN_OP_OR; - *consumed_keyword_length = 2; - } else { - succeeded = false; - } - - DBUG_RETURN(succeeded); -} - -void ha_mroonga::generic_ft_init_ext_parse_pragma_w_append_section( - struct st_mrn_ft_info *info, - grn_obj *index_column, - grn_obj *match_columns, - uint section, - grn_obj *section_value_buffer, - int weight, - uint n_weights) -{ - MRN_DBUG_ENTER_METHOD(); - - grn_expr_append_obj(info->ctx, match_columns, index_column, GRN_OP_PUSH, 1); - GRN_UINT32_SET(info->ctx, section_value_buffer, section); - grn_expr_append_const(info->ctx, match_columns, section_value_buffer, - GRN_OP_PUSH, 1); - grn_expr_append_op(info->ctx, match_columns, GRN_OP_GET_MEMBER, 2); - - if (weight != 1) { - grn_expr_append_const_int(info->ctx, match_columns, weight, - GRN_OP_PUSH, 1); - grn_expr_append_op(info->ctx, match_columns, GRN_OP_STAR, 2); - } - - if (n_weights >= 2) { - grn_expr_append_op(info->ctx, match_columns, GRN_OP_OR, 2); - } - - DBUG_VOID_RETURN; -} - -bool ha_mroonga::generic_ft_init_ext_parse_pragma_w(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_obj *index_column, - grn_obj *match_columns, - uint *consumed_keyword_length, - grn_obj *tmp_objects) -{ - MRN_DBUG_ENTER_METHOD(); - - *consumed_keyword_length = 0; - - uint n_sections = KEY_N_KEY_PARTS(info->key_info); - - grn_obj section_value_buffer; - GRN_UINT32_INIT(§ion_value_buffer, 0); - - MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(bool, specified_sections, n_sections); - for (uint i = 0; i < n_sections; ++i) { - specified_sections[i] = false; - } - - uint n_weights = 0; - while (keyword_length >= 1) { - if (n_weights >= 1) { - if (keyword[0] != ',') { - break; - } - uint n_used_keyword_length = 1; - *consumed_keyword_length += n_used_keyword_length; - keyword_length -= n_used_keyword_length; - keyword += n_used_keyword_length; - if (keyword_length == 0) { - break; - } - } - - uint section = 0; - if ('1' <= keyword[0] && keyword[0] <= '9') { - const char *section_start = keyword; - const char *keyword_end = keyword + keyword_length; - const char *keyword_rest; - section = grn_atoui(section_start, keyword_end, &keyword_rest); - if (section_start == keyword_rest) { - break; - } - if (!(0 < section && section <= n_sections)) { - break; + MRN_COLUMN_NAME_ID, + strlen(MRN_COLUMN_NAME_ID)); + } else { + mrn_ft_info->key_accessor = grn_obj_column(ctx, sorted_result, + MRN_COLUMN_NAME_KEY, + strlen(MRN_COLUMN_NAME_KEY)); } - section -= 1; - specified_sections[section] = true; - uint n_used_keyword_length = keyword_rest - keyword; - *consumed_keyword_length += n_used_keyword_length; - keyword_length -= n_used_keyword_length; - keyword += n_used_keyword_length; } else { - break; - } - - int weight = 1; - if (keyword_length >= 2 && keyword[0] == ':') { - const char *weight_start = keyword + 1; - const char *keyword_end = keyword + keyword_length; - const char *keyword_rest; - weight = grn_atoi(weight_start, keyword_end, &keyword_rest); - if (weight_start == keyword_rest) { - break; - } - uint n_used_keyword_length = keyword_rest - keyword; - *consumed_keyword_length += n_used_keyword_length; - keyword_length -= n_used_keyword_length; - keyword += n_used_keyword_length; + mrn_ft_info->key_accessor = grn_obj_column(ctx, mrn_ft_info->result, + MRN_COLUMN_NAME_KEY, + strlen(MRN_COLUMN_NAME_KEY)); } - - n_weights++; - - generic_ft_init_ext_parse_pragma_w_append_section(info, - index_column, - match_columns, - section, - §ion_value_buffer, - weight, - n_weights); } + DBUG_RETURN(error); +} - for (uint section = 0; section < n_sections; ++section) { - if (specified_sections[section]) { - continue; - } +int ha_mroonga::wrapper_ft_init() +{ + MRN_DBUG_ENTER_METHOD(); + int error = generic_ft_init(); + DBUG_RETURN(error); +} - ++n_weights; +int ha_mroonga::storage_ft_init() +{ + MRN_DBUG_ENTER_METHOD(); + int error = generic_ft_init(); + record_id = GRN_ID_NIL; + DBUG_RETURN(error); +} - int default_weight = 1; - generic_ft_init_ext_parse_pragma_w_append_section(info, - index_column, - match_columns, - section, - §ion_value_buffer, - default_weight, - n_weights); +int ha_mroonga::ft_init() +{ + MRN_DBUG_ENTER_METHOD(); + int error = 0; + if (share->wrapper_mode) + { + error = wrapper_ft_init(); + } else { + error = storage_ft_init(); } - MRN_FREE_VARIABLE_LENGTH_ARRAYS(specified_sections); - - GRN_OBJ_FIN(info->ctx, §ion_value_buffer); - - DBUG_RETURN(n_weights > 0); + DBUG_RETURN(error); } -grn_expr_flags ha_mroonga::expr_flags_in_boolean_mode() +void ha_mroonga::generic_ft_init_ext_add_conditions_fast_order_limit( + struct st_mrn_ft_info *info, grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); - ulonglong syntax_flags = MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT; -#ifdef MRN_SUPPORT_THDVAR_SET - syntax_flags = THDVAR(ha_thd(), boolean_mode_syntax_flags); -#endif - grn_expr_flags expression_flags = 0; - if (syntax_flags == MRN_BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT) { - expression_flags = GRN_EXPR_SYNTAX_QUERY | GRN_EXPR_ALLOW_LEADING_NOT; - } else { - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT) { - expression_flags |= GRN_EXPR_SYNTAX_SCRIPT; - } else { - expression_flags |= GRN_EXPR_SYNTAX_QUERY; - } - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN) { - expression_flags |= GRN_EXPR_ALLOW_COLUMN; - } - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE) { - expression_flags |= GRN_EXPR_ALLOW_UPDATE; - } - if (syntax_flags & MRN_BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT) { - expression_flags |= GRN_EXPR_ALLOW_LEADING_NOT; - } - } + Item *where = + MRN_SELECT_LEX_GET_WHERE_COND(table->pos_in_table_list->select_lex); + + bool is_storage_mode = !(share->wrapper_mode); + mrn::ConditionConverter converter(info->ctx, grn_table, is_storage_mode); + converter.convert(where, expression); - DBUG_RETURN(expression_flags); + DBUG_VOID_RETURN; } grn_rc ha_mroonga::generic_ft_init_ext_prepare_expression_in_boolean_mode( @@ -8007,107 +8469,17 @@ grn_rc ha_mroonga::generic_ft_init_ext_prepare_expression_in_boolean_mode( String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects) + grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); - grn_rc rc = GRN_SUCCESS; - - const char *keyword, *keyword_original; - uint keyword_length, keyword_length_original; - grn_operator default_operator = GRN_OP_OR; - grn_bool weight_specified = false; - keyword = keyword_original = key->ptr(); - keyword_length = keyword_length_original = key->length(); - // WORKAROUND: support only "D" and "W" pragmas. - if (keyword_length >= 2 && keyword[0] == '*') { - bool parsed = false; - bool done = false; - keyword++; - keyword_length--; - while (!done) { - uint consumed_keyword_length = 0; - switch (keyword[0]) { - case 'D': - if (generic_ft_init_ext_parse_pragma_d(info, - keyword + 1, - keyword_length - 1, - &default_operator, - &consumed_keyword_length)) { - parsed = true; - consumed_keyword_length += 1; - keyword += consumed_keyword_length; - keyword_length -= consumed_keyword_length; - } else { - done = true; - } - break; - case 'W': - if (generic_ft_init_ext_parse_pragma_w(info, - keyword + 1, - keyword_length - 1, - index_column, - match_columns, - &consumed_keyword_length, - tmp_objects)) { - parsed = true; - weight_specified = true; - consumed_keyword_length += 1; - keyword += consumed_keyword_length; - keyword_length -= consumed_keyword_length; - } else { - done = true; - } - break; - default: - done = true; - break; - } - } - if (!parsed) { - keyword = keyword_original; - keyword_length = keyword_length_original; - } - } - // WORKAROUND: ignore the first '+' to support "+apple macintosh" pattern. - while (keyword_length > 0 && keyword[0] == ' ') { - keyword++; - keyword_length--; - } - if (keyword_length > 0 && keyword[0] == '+') { - keyword++; - keyword_length--; - } - if (!weight_specified) { - grn_expr_append_obj(info->ctx, match_columns, index_column, GRN_OP_PUSH, 1); - } - rc = grn_expr_parse(info->ctx, expression, - keyword, keyword_length, - match_columns, GRN_OP_MATCH, default_operator, - expr_flags_in_boolean_mode()); - if (rc) { - char error_message[MRN_MESSAGE_BUFFER_SIZE]; - snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, - "failed to parse fulltext search keyword: <%.*s>: <%s>", - keyword_length_original, keyword_original, - info->ctx->errbuf); - ulong action = THDVAR(ha_thd(), action_on_fulltext_query_error); - switch (static_cast(action)) { - case MRN_ACTION_ON_ERROR_ERROR: - my_message(ER_PARSE_ERROR, error_message, MYF(0)); - break; - case MRN_ACTION_ON_ERROR_ERROR_AND_LOG: - my_message(ER_PARSE_ERROR, error_message, MYF(0)); - GRN_LOG(info->ctx, GRN_LOG_ERROR, "%s", error_message); - break; - case MRN_ACTION_ON_ERROR_IGNORE: - break; - case MRN_ACTION_ON_ERROR_IGNORE_AND_LOG: - GRN_LOG(info->ctx, GRN_LOG_ERROR, "%s", error_message); - break; - } - } + mrn::QueryParser query_parser(info->ctx, + ha_thd(), + expression, + index_column, + KEY_N_KEY_PARTS(info->key_info), + match_columns); + grn_rc rc = query_parser.parse(key->ptr(), key->length()); DBUG_RETURN(rc); } @@ -8117,8 +8489,7 @@ grn_rc ha_mroonga::generic_ft_init_ext_prepare_expression_in_normal_mode( String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects) + grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); @@ -8152,6 +8523,18 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, info->result = grn_table_create(info->ctx, NULL, 0, NULL, GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, grn_table, 0); + if (!info->result) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "[mroonga][ft-init] failed to create a table " + "to store matched records for one search: <%s>", + ctx->errbuf); + my_message(ER_ERROR_ON_READ, error_message, MYF(0)); + GRN_LOG(ctx, GRN_LOG_ERROR, "%s", error_message); + delete info; + DBUG_RETURN(NULL); + } + info->score_column = grn_obj_column(info->ctx, info->result, MRN_COLUMN_NAME_SCORE, strlen(MRN_COLUMN_NAME_SCORE)); @@ -8177,8 +8560,6 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, grn_obj *expression, *expression_variable; GRN_EXPR_CREATE_FOR_QUERY(info->ctx, info->table, expression, expression_variable); - grn_obj tmp_objects; - GRN_PTR_INIT(&tmp_objects, GRN_OBJ_VECTOR, GRN_ID_NIL); grn_rc rc = GRN_SUCCESS; if (flags & FT_BOOL) { @@ -8186,15 +8567,13 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, key, index_column, match_columns, - expression, - &tmp_objects); + expression); } else { rc = generic_ft_init_ext_prepare_expression_in_normal_mode(info, key, index_column, match_columns, - expression, - &tmp_objects); + expression); } if (rc == GRN_SUCCESS) { @@ -8210,12 +8589,6 @@ struct st_mrn_ft_info *ha_mroonga::generic_ft_init_ext_select(uint flags, grn_obj_unlink(info->ctx, expression); grn_obj_unlink(info->ctx, match_columns); - uint n_tmp_objects = GRN_BULK_VSIZE(&tmp_objects) / sizeof(grn_obj *); - for (uint i = 0; i < n_tmp_objects; ++i) { - grn_obj_unlink(info->ctx, GRN_PTR_VALUE_AT(&tmp_objects, i)); - } - grn_obj_unlink(info->ctx, &tmp_objects); - DBUG_RETURN(info); } @@ -8223,7 +8596,7 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) { MRN_DBUG_ENTER_METHOD(); - check_count_skip(0, 0, true); + check_count_skip(0); mrn_change_encoding(ctx, system_charset_info); grn_operator operation = GRN_OP_OR; @@ -8231,6 +8604,16 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) matched_record_keys = grn_table_create(ctx, NULL, 0, NULL, GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, grn_table, 0); + if (!matched_record_keys) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "[mroonga][ft-init] " + "failed to create a table to store all matched records: <%s>", + ctx->errbuf); + my_message(ER_ERROR_ON_READ, error_message, MYF(0)); + GRN_LOG(ctx, GRN_LOG_ERROR, "%s", error_message); + DBUG_RETURN(NULL); + } } grn_table_sort_key *sort_keys = NULL; @@ -8238,8 +8621,10 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) longlong limit = -1; check_fast_order_limit(&sort_keys, &n_sort_keys, &limit); - struct st_mrn_ft_info *info = - generic_ft_init_ext_select(flags, key_nr, key); + struct st_mrn_ft_info *info = generic_ft_init_ext_select(flags, key_nr, key); + if (!info) { + DBUG_RETURN(NULL); + } grn_rc rc; rc = grn_table_setoperation(ctx, matched_record_keys, info->result, @@ -8253,6 +8638,9 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) GRN_LOG(ctx, GRN_LOG_ERROR, "%s", error_message); } if (fast_order_limit) { + if (sorted_result) { + grn_obj_close(ctx, sorted_result); + } sorted_result = grn_table_create(ctx, NULL, 0, NULL, GRN_OBJ_TABLE_NO_KEY, NULL, @@ -8291,20 +8679,31 @@ FT_INFO *ha_mroonga::generic_ft_init_ext(uint flags, uint key_nr, String *key) FT_INFO *ha_mroonga::wrapper_ft_init_ext(uint flags, uint key_nr, String *key) { MRN_DBUG_ENTER_METHOD(); + FT_INFO *info = generic_ft_init_ext(flags, key_nr, key); + if (!info) { + DBUG_RETURN(NULL); + } + struct st_mrn_ft_info *mrn_ft_info = (struct st_mrn_ft_info *)info; mrn_ft_info->please = &mrn_wrapper_ft_vft; #ifdef HA_CAN_FULLTEXT_EXT mrn_ft_info->could_you = &mrn_wrapper_ft_vft_ext; #endif ++wrap_ft_init_count; + DBUG_RETURN(info); } FT_INFO *ha_mroonga::storage_ft_init_ext(uint flags, uint key_nr, String *key) { MRN_DBUG_ENTER_METHOD(); + FT_INFO *info = generic_ft_init_ext(flags, key_nr, key); + if (!info) { + DBUG_RETURN(NULL); + } + struct st_mrn_ft_info *mrn_ft_info = (struct st_mrn_ft_info *)info; mrn_ft_info->please = &mrn_storage_ft_vft; #ifdef HA_CAN_FULLTEXT_EXT @@ -8453,7 +8852,8 @@ const Item *ha_mroonga::storage_cond_push(const Item *cond) const Item *reminder_cond = cond; if (!pushed_cond) { mrn::ConditionConverter converter(ctx, grn_table, true); - if (converter.find_match_against(cond) && converter.is_convertable(cond)) { + if (converter.count_match_against(cond) == 1 && + converter.is_convertable(cond)) { reminder_cond = NULL; } } @@ -8566,6 +8966,47 @@ bool ha_mroonga::have_unique_index() DBUG_RETURN(false); } +bool ha_mroonga::is_foreign_key_field(const char *table_name, + const char *field_name) +{ + MRN_DBUG_ENTER_METHOD(); + + grn_obj *table = grn_ctx_get(ctx, table_name, -1); + if (!table) { + DBUG_RETURN(false); + } + + mrn::ColumnName column_name(field_name); + grn_obj *column = grn_obj_column(ctx, + table, + column_name.c_str(), + column_name.length()); + if (!column) { + DBUG_RETURN(false); + } + + grn_obj *range = grn_ctx_at(ctx, grn_obj_get_range(ctx, column)); + if (!range) { + DBUG_RETURN(false); + } + + if (!mrn::grn::is_table(range)) { + DBUG_RETURN(false); + } + + grn_obj *foreign_index_column; + mrn::IndexColumnName index_column_name(table_name, field_name); + foreign_index_column = grn_obj_column(ctx, range, + index_column_name.c_str(), + index_column_name.length()); + if (foreign_index_column) { + grn_obj_unlink(ctx, foreign_index_column); + DBUG_RETURN(true); + } + + DBUG_RETURN(false); +} + void ha_mroonga::push_warning_unsupported_spatial_index_search(enum ha_rkey_function flag) { char search_name[MRN_BUFFER_SIZE]; @@ -8745,7 +9186,7 @@ void ha_mroonga::remove_related_files(const char *base_path) if (stat(entry->d_name, &file_status) != 0) { continue; } - if (!((file_status.st_mode & S_IFMT) & S_IFREG)) { + if (!((file_status.st_mode & S_IFMT) && S_IFREG)) { continue; } if (strncmp(entry->d_name, base_path, base_path_length) == 0) { @@ -8806,6 +9247,11 @@ int ha_mroonga::drop_index(MRN_SHARE *target_share, uint key_index) grn_obj *index_table = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (index_table) { target_name_length = grn_obj_name(ctx, index_table, target_name, GRN_TABLE_MAX_KEY_SIZE); @@ -8953,7 +9399,9 @@ int ha_mroonga::drop_indexes_normal(const char *table_name, grn_obj *table) DBUG_RETURN(error); } -int ha_mroonga::drop_indexes_multiple(const char *table_name, grn_obj *table) +int ha_mroonga::drop_indexes_multiple(const char *table_name, + grn_obj *table, + const char *index_table_name_separator) { MRN_DBUG_ENTER_METHOD(); @@ -8961,7 +9409,7 @@ int ha_mroonga::drop_indexes_multiple(const char *table_name, grn_obj *table) char index_table_name_prefix[GRN_TABLE_MAX_KEY_SIZE]; snprintf(index_table_name_prefix, GRN_TABLE_MAX_KEY_SIZE, - "%s%s", table_name, mrn::IndexTableName::SEPARATOR); + "%s%s", table_name, index_table_name_separator); grn_table_cursor *cursor = grn_table_cursor_open(ctx, grn_ctx_db(ctx), @@ -9050,7 +9498,12 @@ int ha_mroonga::drop_indexes(const char *table_name) error = drop_indexes_normal(table_name, table.get()); if (error == 0) { - error = drop_indexes_multiple(table_name, table.get()); + error = drop_indexes_multiple(table_name, table.get(), + mrn::IndexTableName::SEPARATOR); + } + if (error == 0) { + error = drop_indexes_multiple(table_name, table.get(), + mrn::IndexTableName::OLD_SEPARATOR); } DBUG_RETURN(error); @@ -9177,6 +9630,26 @@ grn_obj *ha_mroonga::find_tokenizer(const char *name, int name_length) DBUG_RETURN(tokenizer); } +bool ha_mroonga::have_custom_normalizer(KEY *key) const +{ + MRN_DBUG_ENTER_METHOD(); + +#ifdef MRN_SUPPORT_CUSTOM_OPTIONS + if (key->option_struct && key->option_struct->normalizer) { + DBUG_RETURN(true); + } +#endif + + if (key->comment.length > 0) { + mrn::ParametersParser parser(key->comment.str, + key->comment.length); + parser.parse(); + DBUG_RETURN(parser["normalizer"] != NULL); + } + + DBUG_RETURN(false); +} + grn_obj *ha_mroonga::find_normalizer(KEY *key) { MRN_DBUG_ENTER_METHOD(); @@ -9223,7 +9696,7 @@ grn_obj *ha_mroonga::find_normalizer(KEY *key, const char *name) DBUG_RETURN(normalizer); } -bool ha_mroonga::find_index_column_flags(KEY *key, grn_obj_flags *index_column_flags) +bool ha_mroonga::find_index_column_flags(KEY *key, grn_column_flags *index_column_flags) { MRN_DBUG_ENTER_METHOD(); bool found = false; @@ -9604,154 +10077,51 @@ bool ha_mroonga::should_normalize(Field *field) const DBUG_RETURN(need_normalize_p); } -bool ha_mroonga::is_temporary_table_name(const char *name) const -{ - MRN_DBUG_ENTER_METHOD(); - DBUG_PRINT("info", ("mroonga: table name = %s", name)); -#ifdef MRN_USE_MYSQL_DATA_HOME - bool temporary_table_name_p = false; - if (name[0] != '.') { - int len = strlen(name); - int mysql_data_home_len = strlen(mysql_data_home); - if (len < mysql_data_home_len || - strncmp(name, mysql_data_home, mysql_data_home_len) || - !strchr(&name[mysql_data_home_len], FN_LIBCHAR)) { - temporary_table_name_p = true; - } - } -#else - bool temporary_table_name_p = (name[0] != '.'); -#endif - DBUG_RETURN(temporary_table_name_p); -} - -void ha_mroonga::check_count_skip(key_part_map start_key_part_map, - key_part_map end_key_part_map, bool fulltext) +void ha_mroonga::check_count_skip(key_part_map target_key_part_map) { MRN_DBUG_ENTER_METHOD(); if (!is_enable_optimization()) { - DBUG_PRINT("info", ("mroonga: count skip: optimization is disabled")); + GRN_LOG(ctx, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] optimization is disabled"); count_skip = false; DBUG_VOID_RETURN; } - st_select_lex *select_lex = table->pos_in_table_list->select_lex; - - if ( - thd_sql_command(ha_thd()) == SQLCOM_SELECT && - select_lex->item_list.elements == 1 && - !select_lex->group_list.elements && - !MRN_SELECT_LEX_GET_HAVING_COND(select_lex) && - select_lex->table_list.elements == 1 - ) { - Item *info = (Item *) select_lex->item_list.first_node()->info; - if ( - info->type() != Item::SUM_FUNC_ITEM || - ((Item_sum *) info)->sum_func() != Item_sum::COUNT_FUNC || - ((Item_sum *) info)->nest_level || - ((Item_sum *) info)->aggr_level || - ((Item_sum *) info)->max_arg_level != -1 || - ((Item_sum *) info)->max_sum_func_level != -1 - ) { - DBUG_PRINT("info", ("mroonga: count skip: sum func is not match")); - count_skip = false; - DBUG_VOID_RETURN; - } + if (thd_sql_command(ha_thd()) != SQLCOM_SELECT) { + GRN_LOG(ctx, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not SELECT"); + count_skip = false; + DBUG_VOID_RETURN; + } - uint i = 0; - Item *where; - if (fulltext) { - DBUG_PRINT("info", ("mroonga: count skip: fulltext")); - where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex); - if (!where || - where->type() != Item::FUNC_ITEM || - ((Item_func *)where)->functype() != Item_func::FT_FUNC) { - DBUG_PRINT("info", ("mroonga: count skip: ft func is not match")); - count_skip = false; - DBUG_VOID_RETURN; - } - if (select_lex->select_n_where_fields != 1) { - DBUG_PRINT("info", - ("mroonga: count skip: " - "where clause is not fulltext search only")); - count_skip = false; - DBUG_VOID_RETURN; - } - if (share->wrapper_mode && - !(wrap_handler->ha_table_flags() & HA_NO_TRANSACTIONS)) { - DBUG_PRINT("info", ("mroonga: count skip: transactional wrapper mode")); - count_skip = false; - DBUG_VOID_RETURN; - } - DBUG_PRINT("info", ("mroonga: count skip: skip enabled")); - count_skip = true; - mrn_count_skip++; - DBUG_VOID_RETURN; - } else if (share->wrapper_mode) { - DBUG_PRINT("info", ("mroonga: count skip: wrapper mode")); - count_skip = false; - DBUG_VOID_RETURN; - } else { - DBUG_PRINT("info", ("mroonga: count skip: without fulltext")); - uint key_nr = active_index; - KEY *key_info = &(table->key_info[key_nr]); - KEY_PART_INFO *key_part = key_info->key_part; - for (where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex); - where; - where = where->next) { - Item *target = where; - - if (where->type() == Item::FUNC_ITEM) { - Item_func *func_item = static_cast(where); - if (func_item->argument_count() == 0) { - break; - } - target = func_item->key_item(); - where = where->next; - if (func_item->arguments()[0] == where) { - uint n_args = func_item->argument_count(); - for (; n_args > 0; --n_args) { - where = where->next; - } - } - } + if (share->wrapper_mode && + !(wrap_handler->ha_table_flags() & HA_NO_TRANSACTIONS)) { + GRN_LOG(ctx, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] wrapped engine is transactional"); + count_skip = false; + DBUG_VOID_RETURN; + } - if (target->type() == Item::FIELD_ITEM) - { - Field *field = ((Item_field *)target)->field; - if (!field) - break; - if (field->table != table) - break; - uint j; - for (j = 0; j < KEY_N_KEY_PARTS(key_info); j++) { - if (key_part[j].field == field) - { - if (!(start_key_part_map >> j) && !(end_key_part_map >> j)) - j = KEY_N_KEY_PARTS(key_info); - else - i++; - break; - } - } - if (j >= KEY_N_KEY_PARTS(key_info)) - break; - } - if (i >= select_lex->select_n_where_fields) - { - DBUG_PRINT("info", ("mroonga: count skip: skip enabled")); - count_skip = true; - mrn_count_skip++; - DBUG_VOID_RETURN; - } - } - DBUG_PRINT("info", ("mroonga: count skip: skip disabled")); - } + st_select_lex *select_lex = table->pos_in_table_list->select_lex; + KEY *key_info = NULL; + if (active_index != MAX_KEY) { + key_info = &(table->key_info[active_index]); + } + mrn::CountSkipChecker checker(ctx, + table, + select_lex, + key_info, + target_key_part_map, + !share->wrapper_mode); + if (checker.check()) { + count_skip = true; + mrn_count_skip++; + DBUG_VOID_RETURN; + } else { + count_skip = false; + DBUG_VOID_RETURN; } - DBUG_PRINT("info", ("mroonga: count skip: select type is not match")); - count_skip = false; - DBUG_VOID_RETURN; } bool ha_mroonga::is_grn_zero_column_value(grn_obj *column, grn_obj *value) @@ -9861,15 +10231,22 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, if (!converter.is_convertable(where)) { DBUG_PRINT("info", ("mroonga: fast_order_limit = false: " - "not groonga layer condition search")); + "not Groonga layer condition search")); + fast_order_limit = false; + DBUG_VOID_RETURN; + } + unsigned int n_match_againsts = converter.count_match_against(where); + if (n_match_againsts == 0) { + DBUG_PRINT("info", + ("mroonga: fast_order_limit = false: " + "Groonga layer condition but not fulltext search")); fast_order_limit = false; DBUG_VOID_RETURN; } - match_against = converter.find_match_against(where); - if (!match_against) { + if (n_match_againsts > 1) { DBUG_PRINT("info", ("mroonga: fast_order_limit = false: " - "groonga layer condition but not fulltext search")); + "MATCH AGAINST must be only one")); fast_order_limit = false; DBUG_VOID_RETURN; } @@ -9890,8 +10267,7 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, if (item->type() == Item::FIELD_ITEM) { Field *field = static_cast(item)->field; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); + mrn::ColumnName column_name(field->field_name); if (should_normalize(field)) { @@ -9906,7 +10282,8 @@ void ha_mroonga::check_fast_order_limit(grn_table_sort_key **sort_keys, if (is_storage_mode) { (*sort_keys)[i].key = grn_obj_column(ctx, matched_record_keys, - column_name, column_name_size); + column_name.c_str(), + column_name.length()); } else { if (is_primary_key_field(field)) { (*sort_keys)[i].key = grn_obj_column(ctx, matched_record_keys, @@ -10365,6 +10742,20 @@ int ha_mroonga::generic_store_bulk_geometry(Field *field, grn_obj *buf) DBUG_RETURN(error); } +#ifdef MRN_HAVE_MYSQL_TYPE_JSON +int ha_mroonga::generic_store_bulk_json(Field *field, grn_obj *buf) +{ + MRN_DBUG_ENTER_METHOD(); + int error = 0; + String buffer; + Field_json *json = static_cast(field); + String *value = json->val_str(&buffer, NULL); + grn_obj_reinit(ctx, buf, GRN_DB_TEXT, 0); + GRN_TEXT_SET(ctx, buf, value->ptr(), value->length()); + DBUG_RETURN(error); +} +#endif + int ha_mroonga::generic_store_bulk(Field *field, grn_obj *buf) { MRN_DBUG_ENTER_METHOD(); @@ -10455,6 +10846,11 @@ int ha_mroonga::generic_store_bulk(Field *field, grn_obj *buf) case MYSQL_TYPE_GEOMETRY: error = generic_store_bulk_geometry(field, buf); break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + error = generic_store_bulk_json(field, buf); + break; +#endif default: error = HA_ERR_UNSUPPORTED; break; @@ -10815,6 +11211,18 @@ void ha_mroonga::storage_store_field_geometry(Field *field, DBUG_VOID_RETURN; } +#ifdef MRN_HAVE_MYSQL_TYPE_JSON +void ha_mroonga::storage_store_field_json(Field *field, + const char *value, + uint value_length) +{ + MRN_DBUG_ENTER_METHOD(); + Field_json *json = static_cast(field); + json->store(value, value_length, field->charset()); + DBUG_VOID_RETURN; +} +#endif + void ha_mroonga::storage_store_field(Field *field, const char *value, uint value_length) { @@ -10898,6 +11306,11 @@ void ha_mroonga::storage_store_field(Field *field, case MYSQL_TYPE_GEOMETRY: storage_store_field_geometry(field, value, value_length); break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + storage_store_field_json(field, value, value_length); + break; +#endif } } @@ -10906,6 +11319,10 @@ void ha_mroonga::storage_store_field_column(Field *field, bool is_primary_key, { MRN_DBUG_ENTER_METHOD(); + if (!grn_columns[nth_column]) { + DBUG_VOID_RETURN; + } + grn_obj *column = grn_columns[nth_column]; grn_id range_id = grn_obj_get_range(ctx, column); grn_obj *range = grn_column_ranges[nth_column]; @@ -11041,6 +11458,11 @@ void ha_mroonga::storage_store_fields_for_prep_update(const uchar *old_data, for (i = 0; i < n_columns; i++) { Field *field = table->field[i]; +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif if ( !bitmap_is_set(table->read_set, field->field_index) && !bitmap_is_set(table->write_set, field->field_index) && @@ -11658,8 +12080,10 @@ int ha_mroonga::storage_encode_multiple_column_key(KEY *key_info, } int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, - const key_range *start, - const key_range *end, + const uchar *start, + uint start_size, + const uchar *end, + uint end_size, uchar *min_buffer, uint *min_encoded_size, uchar *max_buffer, @@ -11671,14 +12095,14 @@ int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, uint encoded_key_size = codec.size(); if (start) { memset(min_buffer, 0, encoded_key_size); - error = codec.encode(start->key, start->length, + error = codec.encode(start, start_size, min_buffer, min_encoded_size); // TODO: handle error? *min_encoded_size = encoded_key_size; } if (end) { memset(max_buffer, 0xff, encoded_key_size); - error = codec.encode(end->key, end->length, + error = codec.encode(end, end_size, max_buffer, max_encoded_size); // TODO: handle error? *max_encoded_size = encoded_key_size; @@ -11686,6 +12110,40 @@ int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, DBUG_RETURN(error); } +int ha_mroonga::storage_encode_multiple_column_key_range(KEY *key_info, + const key_range *start, + const key_range *end, + uchar *min_buffer, + uint *min_encoded_size, + uchar *max_buffer, + uint *max_encoded_size) +{ + MRN_DBUG_ENTER_METHOD(); + + const uchar *start_data = NULL; + uint start_size = 0; + const uchar *end_data = NULL; + uint end_size = 0; + if (start) { + start_data = start->key; + start_size = start->length; + } + if (end) { + end_data = end->key; + end_size = end->length; + } + + int error = storage_encode_multiple_column_key_range(key_info, + start_data, start_size, + end_data, end_size, + min_buffer, + min_encoded_size, + max_buffer, + max_encoded_size); + + DBUG_RETURN(error); +} + int ha_mroonga::generic_reset() { MRN_DBUG_ENTER_METHOD(); @@ -12349,6 +12807,29 @@ int ha_mroonga::storage_delete_all_rows() { MRN_DBUG_ENTER_METHOD(); int error = generic_delete_all_rows(grn_table, __FUNCTION__); + if (!error) { + uint n_keys = table->s->keys; + for (uint i = 0; i < n_keys; i++) { + if (i == table->s->primary_key) { + continue; + } + + KEY *key_info = &(table->key_info[i]); + if (!(key_info->flags & HA_NOSAME)) { + continue; + } + + grn_obj *index_table = grn_index_tables[i]; + if (!index_table) { + continue; + } + + error = generic_delete_all_rows(index_table, __FUNCTION__); + if (error) { + break; + } + } + } DBUG_RETURN(error); } @@ -12512,6 +12993,10 @@ int ha_mroonga::truncate() } else { error = storage_truncate(); } + if (!error) { + operations_->clear(table->s->table_name.str, + table->s->table_name.length); + } DBUG_RETURN(error); } @@ -12592,6 +13077,7 @@ double ha_mroonga::read_time(uint index, uint ranges, ha_rows rows) DBUG_RETURN(time); } +#ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *ha_mroonga::wrapper_keys_to_use_for_scanning() { const key_map *res; @@ -12622,6 +13108,7 @@ const key_map *ha_mroonga::keys_to_use_for_scanning() } DBUG_RETURN(key_map); } +#endif ha_rows ha_mroonga::wrapper_estimate_rows_upper_bound() { @@ -12776,11 +13263,16 @@ int ha_mroonga::wrapper_rename_index(const char *from, const char *to, for (i = 0; i < tmp_table_share->keys; i++) { const char *mysql_index_name = tmp_table_share->key_info[i].name; mrn::IndexTableName from_index_table_name(from_table_name, mysql_index_name); - mrn::IndexTableName to_index_table_name(to_table_name, mysql_index_name); + mrn::IndexTableName to_index_table_name(to_table_name, mysql_index_name); grn_obj *index_table; index_table = grn_ctx_get(ctx, from_index_table_name.c_str(), from_index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + from_index_table_name.old_c_str(), + from_index_table_name.old_length()); + } if (index_table) { rc = grn_table_rename(ctx, index_table, to_index_table_name.c_str(), @@ -12846,6 +13338,11 @@ int ha_mroonga::storage_rename_table(const char *from, const char *to, index_table = grn_ctx_get(ctx, from_index_table_name.c_str(), from_index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + from_index_table_name.old_c_str(), + from_index_table_name.old_length()); + } if (index_table) { rc = grn_table_rename(ctx, index_table, to_index_table_name.c_str(), @@ -12899,34 +13396,32 @@ int ha_mroonga::storage_rename_foreign_key(MRN_SHARE *tmp_share, MRN_DBUG_ENTER_METHOD(); for (i = 0; i < n_columns; ++i) { Field *field = tmp_table_share->field[i]; - const char *column_name = field->field_name; - uint column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (!is_foreign_key_field(from_table_name, field->field_name)) { continue; } - column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + grn_obj *grn_from_table = grn_ctx_get(ctx, from_table_name, -1); + mrn::ColumnName column_name(field->field_name); + column = grn_obj_column(ctx, + grn_from_table, + column_name.c_str(), + column_name.length()); if (!column) { continue; } grn_id ref_table_id = grn_obj_get_range(ctx, column); grn_obj *ref_table = grn_ctx_at(ctx, ref_table_id); - if (ref_table->header.type != GRN_TABLE_NO_KEY && - ref_table->header.type != GRN_TABLE_HASH_KEY && - ref_table->header.type != GRN_TABLE_PAT_KEY && - ref_table->header.type != GRN_TABLE_DAT_KEY) { - continue; - } - mrn::IndexColumnName from_index_column_name(from_table_name, column_name); + mrn::IndexColumnName from_index_column_name(from_table_name, + column_name.c_str()); ref_column = grn_obj_column(ctx, ref_table, from_index_column_name.c_str(), from_index_column_name.length()); if (!ref_column) { continue; } - mrn::IndexColumnName to_index_column_name(to_table_name, column_name); + mrn::IndexColumnName to_index_column_name(to_table_name, + column_name.c_str()); rc = grn_column_rename(ctx, ref_column, to_index_column_name.c_str(), to_index_column_name.length()); @@ -13109,6 +13604,11 @@ int ha_mroonga::generic_disable_index(int i, KEY *key_info) grn_obj *index_table = grn_ctx_get(ctx, index_table_name.c_str(), index_table_name.length()); + if (!index_table) { + index_table = grn_ctx_get(ctx, + index_table_name.old_c_str(), + index_table_name.old_length()); + } if (index_table) { grn_obj_remove(ctx, index_table); } @@ -13125,6 +13625,42 @@ int ha_mroonga::generic_disable_index(int i, KEY *key_info) DBUG_RETURN(error); } +int ha_mroonga::wrapper_disable_indexes_mroonga(uint mode) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { + uint i; + for (i = 0; i < table_share->keys; i++) { + if (i == table->s->primary_key) { + continue; + } + if (share->wrap_key_nr[i] < MAX_KEY) { + continue; + } + if (!grn_index_tables[i]) { + DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); + DBUG_RETURN(0); + } + } + KEY *key_info = table_share->key_info; + for (i = 0; i < table_share->keys; i++) { + if (!(key_info[i].flags & HA_FULLTEXT) && + !mrn_is_geo_key(&key_info[i])) { + continue; + } + + int sub_error = generic_disable_index(i, key_info); + if (error != 0 && sub_error != 0) { + error = sub_error; + } + } + } else { + error = HA_ERR_WRONG_COMMAND; + } + DBUG_RETURN(error); +} + int ha_mroonga::wrapper_disable_indexes(uint mode) { int error = 0; @@ -13138,35 +13674,7 @@ int ha_mroonga::wrapper_disable_indexes(uint mode) error = 0; } if (!error) { - if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { - uint i; - for (i = 0; i < table_share->keys; i++) { - if (i == table->s->primary_key) { - continue; - } - if (share->wrap_key_nr[i] < MAX_KEY) { - continue; - } - if (!grn_index_tables[i]) { - DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i)); - DBUG_RETURN(0); - } - } - KEY *key_info = table_share->key_info; - for (i = 0; i < table_share->keys; i++) { - if (!(key_info[i].flags & HA_FULLTEXT) && - !mrn_is_geo_key(&key_info[i])) { - continue; - } - - int sub_error = generic_disable_index(i, key_info); - if (error != 0 && sub_error != 0) { - error = sub_error; - } - } - } else { - error = HA_ERR_WRONG_COMMAND; - } + error = wrapper_disable_indexes_mroonga(mode); } DBUG_RETURN(error); } @@ -13220,9 +13728,9 @@ int ha_mroonga::disable_indexes(uint mode) DBUG_RETURN(error); } -int ha_mroonga::wrapper_enable_indexes(uint mode) +int ha_mroonga::wrapper_enable_indexes_mroonga(uint mode) { - int error = 0, tmp_error = 0; + int error = 0; MRN_DBUG_ENTER_METHOD(); if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) { uint i, j; @@ -13293,8 +13801,17 @@ int ha_mroonga::wrapper_enable_indexes(uint mode) MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables); MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns); } else { - tmp_error = HA_ERR_WRONG_COMMAND; + error = HA_ERR_WRONG_COMMAND; } + DBUG_RETURN(error); +} + +int ha_mroonga::wrapper_enable_indexes(uint mode) +{ + int error = 0; + MRN_DBUG_ENTER_METHOD(); + + int mroonga_error = wrapper_enable_indexes_mroonga(mode); MRN_SET_WRAP_SHARE_KEY(share, table->s); MRN_SET_WRAP_TABLE_KEY(this, table); @@ -13302,7 +13819,7 @@ int ha_mroonga::wrapper_enable_indexes(uint mode) MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); if (error == HA_ERR_WRONG_COMMAND) { - error = tmp_error; + error = mroonga_error; } DBUG_RETURN(error); } @@ -13416,10 +13933,10 @@ int ha_mroonga::storage_check(THD* thd, HA_CHECK_OPT* check_opt) { MRN_DBUG_ENTER_METHOD(); mrn::DatabaseRepairer repairer(ctx, thd); - if (repairer.repair()) { - DBUG_RETURN(HA_ADMIN_OK); - } else { + if (repairer.is_corrupt()) { DBUG_RETURN(HA_ADMIN_CORRUPT); + } else { + DBUG_RETURN(HA_ADMIN_OK); } } @@ -13575,10 +14092,16 @@ int ha_mroonga::wrapper_recreate_indexes(THD *thd) "%s.%s", index_table_name.c_str(), INDEX_COLUMN_NAME); remove_grn_obj_force(index_column_full_name); remove_grn_obj_force(index_table_name.c_str()); + + char index_column_full_old_name[MRN_MAX_PATH_SIZE]; + snprintf(index_column_full_old_name, MRN_MAX_PATH_SIZE, + "%s.%s", index_table_name.old_c_str(), INDEX_COLUMN_NAME); + remove_grn_obj_force(index_column_full_old_name); + remove_grn_obj_force(index_table_name.old_c_str()); + mrn_set_bitmap_by_key(table->read_set, &key_info[i]); } - error = wrapper_create_index(table_share->normalized_path.str, table, - NULL, share, mapper.table_name()); + error = wrapper_create_index(table_share->normalized_path.str, table, share); if (error) DBUG_RETURN(error); error = wrapper_open_indexes(table_share->normalized_path.str); @@ -13627,6 +14150,12 @@ int ha_mroonga::storage_recreate_indexes(THD *thd) "%s.%s", index_table_name.c_str(), INDEX_COLUMN_NAME); remove_grn_obj_force(index_column_full_name); remove_grn_obj_force(index_table_name.c_str()); + + char index_column_full_old_name[MRN_MAX_PATH_SIZE]; + snprintf(index_column_full_old_name, MRN_MAX_PATH_SIZE, + "%s.%s", index_table_name.old_c_str(), INDEX_COLUMN_NAME); + remove_grn_obj_force(index_column_full_old_name); + remove_grn_obj_force(index_table_name.old_c_str()); } int error; @@ -13969,8 +14498,8 @@ enum_alter_inplace_result ha_mroonga::wrapper_check_if_supported_inplace_alter( ( Alter_inplace_info::ADD_COLUMN | Alter_inplace_info::DROP_COLUMN | - Alter_inplace_info::ALTER_COLUMN_TYPE | - Alter_inplace_info::ALTER_COLUMN_ORDER | + MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_TYPE | + MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_ORDER | Alter_inplace_info::ALTER_COLUMN_NULLABLE | Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE | Alter_inplace_info::ALTER_COLUMN_STORAGE_TYPE | @@ -14082,15 +14611,22 @@ enum_alter_inplace_result ha_mroonga::storage_check_if_supported_inplace_alter( Alter_inplace_info *ha_alter_info) { MRN_DBUG_ENTER_METHOD(); + Alter_inplace_info::HA_ALTER_FLAGS explicitly_unsupported_flags = + Alter_inplace_info::ADD_FOREIGN_KEY | + Alter_inplace_info::DROP_FOREIGN_KEY; Alter_inplace_info::HA_ALTER_FLAGS supported_flags = Alter_inplace_info::ADD_INDEX | Alter_inplace_info::DROP_INDEX | Alter_inplace_info::ADD_UNIQUE_INDEX | Alter_inplace_info::DROP_UNIQUE_INDEX | - Alter_inplace_info::ADD_COLUMN | + MRN_ALTER_INPLACE_INFO_ADD_VIRTUAL_COLUMN | + MRN_ALTER_INPLACE_INFO_ADD_STORED_BASE_COLUMN | + MRN_ALTER_INPLACE_INFO_ADD_STORED_GENERATED_COLUMN | Alter_inplace_info::DROP_COLUMN | Alter_inplace_info::ALTER_COLUMN_NAME; - if (ha_alter_info->handler_flags & supported_flags) { + if (ha_alter_info->handler_flags & explicitly_unsupported_flags) { + DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); + } else if (ha_alter_info->handler_flags & supported_flags) { DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); } else { DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED); @@ -14284,18 +14820,11 @@ bool ha_mroonga::wrapper_inplace_alter_table( need_fill_index = true; } if (!error && need_fill_index) { - my_ptrdiff_t ptr_diff = PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); - uint n_columns = altered_table->s->fields; - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(ptr_diff); - } + my_ptrdiff_t diff = + PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); + mrn::TableFieldsOffsetMover mover(altered_table, diff); error = wrapper_fill_indexes(ha_thd(), altered_table->key_info, index_columns, ha_alter_info->key_count); - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(-ptr_diff); - } } bitmap_set_all(table->read_set); @@ -14354,31 +14883,12 @@ bool ha_mroonga::wrapper_inplace_alter_table( DBUG_RETURN(result); } -bool ha_mroonga::storage_inplace_alter_table_index( +bool ha_mroonga::storage_inplace_alter_table_add_index( TABLE *altered_table, Alter_inplace_info *ha_alter_info) { MRN_DBUG_ENTER_METHOD(); - bool have_error = false; - int error = 0; - uint n_keys; - uint i, j = 0; - KEY *key_info = table_share->key_info; - mrn::PathMapper mapper(share->table_name); - n_keys = ha_alter_info->index_drop_count; - for (i = 0; i < n_keys; ++i) { - KEY *key = ha_alter_info->index_drop_buffer[i]; - while (strcmp(key_info[j].name, key->name)) { - ++j; - } - error = drop_index(share, j); - if (error) - DBUG_RETURN(true); - grn_index_tables[j] = NULL; - grn_index_columns[j] = NULL; - } - MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, ha_alter_info->key_count); MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, @@ -14424,11 +14934,11 @@ bool ha_mroonga::storage_inplace_alter_table_index( KEY *p_key_info = &table->key_info[table_share->primary_key]; mrn_set_bitmap_by_key(table->read_set, p_key_info); } - n_keys = ha_alter_info->index_add_count; - for (i = 0; i < n_keys; ++i) { + int error = 0; + uint n_keys = ha_alter_info->index_add_count; + for (uint i = 0; i < n_keys; ++i) { uint key_pos = ha_alter_info->index_add_buffer[i]; - KEY *key = - &altered_table->key_info[key_pos]; + KEY *key = &altered_table->key_info[key_pos]; if (share->disable_keys && !(key->flags & HA_NOSAME)) { continue; // key is disabled } @@ -14437,6 +14947,7 @@ bool ha_mroonga::storage_inplace_alter_table_index( break; } DBUG_PRINT("info", ("mroonga: add key pos=%u", key_pos)); + mrn::PathMapper mapper(share->table_name); if ((error = storage_create_index(table, mapper.table_name(), grn_table, tmp_share, key, index_tables, index_columns, key_pos))) @@ -14464,12 +14975,9 @@ bool ha_mroonga::storage_inplace_alter_table_index( } } if (!error && have_multiple_column_index) { - my_ptrdiff_t ptr_diff = PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); - uint n_columns = altered_table->s->fields; - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(ptr_diff); - } + my_ptrdiff_t diff = + PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); + mrn::TableFieldsOffsetMover mover(altered_table, diff); error = storage_add_index_multiple_columns(altered_table->key_info, ha_alter_info->key_count, index_tables, @@ -14480,17 +14988,14 @@ bool ha_mroonga::storage_inplace_alter_table_index( } else if (error) { my_message(error, "failed to create multiple column index", MYF(0)); } - for (i = 0; i < n_columns; ++i) { - Field *field = altered_table->field[i]; - field->move_field_offset(-ptr_diff); - } } bitmap_set_all(table->read_set); + bool have_error = false; if (error) { n_keys = ha_alter_info->index_add_count; - for (i = 0; i < n_keys; ++i) { + for (uint i = 0; i < n_keys; ++i) { uint key_pos = ha_alter_info->index_add_buffer[i]; KEY *key = &altered_table->key_info[key_pos]; @@ -14513,6 +15018,33 @@ bool ha_mroonga::storage_inplace_alter_table_index( DBUG_RETURN(have_error); } +bool ha_mroonga::storage_inplace_alter_table_drop_index( + TABLE *altered_table, + Alter_inplace_info *ha_alter_info) +{ + MRN_DBUG_ENTER_METHOD(); + + bool have_error = false; + uint n_keys; + uint i, j = 0; + KEY *key_info = table_share->key_info; + mrn::PathMapper mapper(share->table_name); + n_keys = ha_alter_info->index_drop_count; + for (i = 0; i < n_keys; ++i) { + KEY *key = ha_alter_info->index_drop_buffer[i]; + while (strcmp(key_info[j].name, key->name) != 0) { + ++j; + } + int error = drop_index(share, j); + if (error != 0) + DBUG_RETURN(true); + grn_index_tables[j] = NULL; + grn_index_columns[j] = NULL; + } + + DBUG_RETURN(have_error); +} + bool ha_mroonga::storage_inplace_alter_table_add_column( TABLE *altered_table, Alter_inplace_info *ha_alter_info) @@ -14566,9 +15098,14 @@ bool ha_mroonga::storage_inplace_alter_table_add_column( } Field *field = altered_table->s->field[i]; - const char *column_name = field->field_name; - int column_name_size = strlen(column_name); +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field)) { + continue; + } +#endif + + mrn::ColumnName column_name(field->field_name); int error = mrn_add_column_param(tmp_share, field, i); if (error) { have_error = true; @@ -14593,20 +15130,114 @@ bool ha_mroonga::storage_inplace_alter_table_add_column( char *col_path = NULL; // we don't specify path grn_obj *column_obj = - grn_column_create(ctx, table_obj, column_name, column_name_size, + grn_column_create(ctx, table_obj, + column_name.c_str(), + column_name.length(), col_path, col_flags, col_type); if (ctx->rc) { error = ER_WRONG_COLUMN_NAME; my_message(error, ctx->errbuf, MYF(0)); have_error = true; - } - if (column_obj) { - grn_obj_unlink(ctx, column_obj); + break; } - if (have_error) { - break; +#ifdef MRN_SUPPORT_GENERATED_COLUMNS + if (MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field)) { +# ifndef MRN_MARIADB_P + MY_BITMAP generated_column_bitmap; + if (bitmap_init(&generated_column_bitmap, NULL, + altered_table->s->fields, false)) { + error = HA_ERR_OUT_OF_MEM; + my_message(ER_OUTOFMEMORY, + "mroonga: storage: " + "failed to allocate memory for getting generated value", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + mrn::SmartBitmap smart_generated_column_bitmap(&generated_column_bitmap); + bitmap_set_bit(&generated_column_bitmap, field->field_index); +# endif + + my_ptrdiff_t diff = + PTR_BYTE_DIFF(table->record[0], altered_table->record[0]); + mrn::TableFieldsOffsetMover mover(altered_table, diff); + + error = storage_rnd_init(true); + if (error) { + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + + Field *altered_field = altered_table->field[i]; + grn_obj new_value; + GRN_VOID_INIT(&new_value); + mrn::SmartGrnObj smart_new_value(ctx, &new_value); + while (!have_error) { + int next_error = storage_rnd_next(table->record[0]); + if (next_error == HA_ERR_END_OF_FILE) { + break; + } else if (next_error != 0) { + error = next_error; + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + +# ifdef MRN_MARIADB_P + MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(altered_table, altered_field); +# else + if (update_generated_write_fields(&generated_column_bitmap, altered_table)) { + error = ER_ERROR_ON_WRITE; + my_message(error, + "mroonga: storage: " + "failed to update generated value for updating column", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } +# endif + + error = mrn_change_encoding(ctx, altered_field->charset()); + if (error) { + my_message(error, + "mroonga: storage: " + "failed to change encoding to store generated value", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + error = generic_store_bulk(altered_field, &new_value); + if (error) { + my_message(error, + "mroonga: storage: " + "failed to get generated value for updating column", + MYF(0)); + have_error = true; + grn_obj_remove(ctx, column_obj); + break; + } + + grn_obj_set_value(ctx, column_obj, record_id, &new_value, GRN_OBJ_SET); + if (ctx->rc) { + error = ER_ERROR_ON_WRITE; + my_message(error, ctx->errbuf, MYF(0)); + break; + } + } + + int end_error = storage_rnd_end(); + if (end_error != 0 && error == 0) { + error = end_error; + grn_obj_remove(ctx, column_obj); + break; + } } +#endif } grn_obj_unlink(ctx, table_obj); @@ -14736,16 +15367,14 @@ bool ha_mroonga::storage_inplace_alter_table( have_error = true; } - Alter_inplace_info::HA_ALTER_FLAGS index_related_flags = - Alter_inplace_info::ADD_INDEX | + Alter_inplace_info::HA_ALTER_FLAGS drop_index_related_flags = Alter_inplace_info::DROP_INDEX | - Alter_inplace_info::ADD_UNIQUE_INDEX | Alter_inplace_info::DROP_UNIQUE_INDEX | - Alter_inplace_info::ADD_PK_INDEX | Alter_inplace_info::DROP_PK_INDEX; if (!have_error && - (ha_alter_info->handler_flags & index_related_flags)) { - have_error = storage_inplace_alter_table_index(altered_table, ha_alter_info); + (ha_alter_info->handler_flags & drop_index_related_flags)) { + have_error = storage_inplace_alter_table_drop_index(altered_table, + ha_alter_info); } Alter_inplace_info::HA_ALTER_FLAGS add_column_related_flags = @@ -14769,6 +15398,16 @@ bool ha_mroonga::storage_inplace_alter_table( have_error = storage_inplace_alter_table_rename_column(altered_table, ha_alter_info); } + Alter_inplace_info::HA_ALTER_FLAGS add_index_related_flags = + Alter_inplace_info::ADD_INDEX | + Alter_inplace_info::ADD_UNIQUE_INDEX | + Alter_inplace_info::ADD_PK_INDEX; + if (!have_error && + (ha_alter_info->handler_flags & add_index_related_flags)) { + have_error = storage_inplace_alter_table_add_index(altered_table, + ha_alter_info); + } + DBUG_RETURN(have_error); } @@ -15874,26 +16513,22 @@ char *ha_mroonga::storage_get_foreign_key_create_info() create_info_str.length(0); for (i = 0; i < n_columns; ++i) { Field *field = table_share->field[i]; - const char *column_name = field->field_name; - uint column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (!is_foreign_key_field(table_share->table_name.str, + field->field_name)) { continue; } - column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + mrn::ColumnName column_name(field->field_name); + column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (!column) { continue; } grn_id ref_table_id = grn_obj_get_range(ctx, column); grn_obj *ref_table = grn_ctx_at(ctx, ref_table_id); - if (ref_table->header.type != GRN_TABLE_NO_KEY && - ref_table->header.type != GRN_TABLE_HASH_KEY && - ref_table->header.type != GRN_TABLE_PAT_KEY && - ref_table->header.type != GRN_TABLE_DAT_KEY) { - continue; - } char ref_table_buff[NAME_LEN + 1]; int ref_table_name_length = grn_obj_name(ctx, ref_table, ref_table_buff, NAME_LEN); @@ -15903,14 +16538,18 @@ char *ha_mroonga::storage_get_foreign_key_create_info() DBUG_RETURN(NULL); } create_info_str.q_append(",\n CONSTRAINT ", 15); - append_identifier(ha_thd(), &create_info_str, column_name, - column_name_size); + append_identifier(ha_thd(), + &create_info_str, + column_name.c_str(), + column_name.length()); if (create_info_str.reserve(14)) { DBUG_RETURN(NULL); } create_info_str.q_append(" FOREIGN KEY (", 14); - append_identifier(ha_thd(), &create_info_str, column_name, - column_name_size); + append_identifier(ha_thd(), + &create_info_str, + column_name.c_str(), + column_name.length()); if (create_info_str.reserve(13)) { DBUG_RETURN(NULL); } @@ -16081,37 +16720,35 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd, MRN_DBUG_ENTER_METHOD(); for (i = 0; i < n_columns; ++i) { Field *field = table_share->field[i]; - const char *column_name = field->field_name; - uint column_name_size = strlen(column_name); - if (strcmp(MRN_COLUMN_NAME_ID, column_name) == 0) { + if (!is_foreign_key_field(table_share->table_name.str, field->field_name)) { continue; } - column = grn_obj_column(ctx, grn_table, - column_name, column_name_size); + mrn::ColumnName column_name(field->field_name); + column = grn_obj_column(ctx, + grn_table, + column_name.c_str(), + column_name.length()); if (!column) { continue; } grn_id ref_table_id = grn_obj_get_range(ctx, column); grn_obj *ref_table = grn_ctx_at(ctx, ref_table_id); - if (ref_table->header.type != GRN_TABLE_NO_KEY && - ref_table->header.type != GRN_TABLE_HASH_KEY && - ref_table->header.type != GRN_TABLE_PAT_KEY && - ref_table->header.type != GRN_TABLE_DAT_KEY) { - continue; - } FOREIGN_KEY_INFO f_key_info; - f_key_info.foreign_id = thd_make_lex_string(thd, NULL, column_name, - column_name_size, TRUE); + f_key_info.foreign_id = thd_make_lex_string(thd, + NULL, + column_name.c_str(), + column_name.length(), + TRUE); f_key_info.foreign_db = thd_make_lex_string(thd, NULL, - table_share->db.str, - table_share->db.length, - TRUE); + table_share->db.str, + table_share->db.length, + TRUE); f_key_info.foreign_table = thd_make_lex_string(thd, NULL, - table_share->table_name.str, - table_share->table_name.length, - TRUE); + table_share->table_name.str, + table_share->table_name.length, + TRUE); f_key_info.referenced_db = f_key_info.foreign_db; char ref_table_buff[NAME_LEN + 1]; @@ -16124,14 +16761,22 @@ int ha_mroonga::storage_get_foreign_key_list(THD *thd, ref_table_buff, ref_table_name_length, TRUE); +#ifdef MRN_FOREIGN_KEY_USE_METHOD_ENUM + f_key_info.update_method = FK_OPTION_RESTRICT; + f_key_info.delete_method = FK_OPTION_RESTRICT; +#else f_key_info.update_method = thd_make_lex_string(thd, NULL, "RESTRICT", 8, TRUE); f_key_info.delete_method = thd_make_lex_string(thd, NULL, "RESTRICT", 8, TRUE); +#endif f_key_info.referenced_key_name = thd_make_lex_string(thd, NULL, "PRIMARY", 7, TRUE); - LEX_STRING *field_name = thd_make_lex_string(thd, NULL, column_name, - column_name_size, TRUE); + LEX_STRING *field_name = thd_make_lex_string(thd, + NULL, + column_name.c_str(), + column_name.length(), + TRUE); f_key_info.foreign_fields.push_back(field_name); char ref_path[FN_REFLEN + 1]; @@ -16333,6 +16978,7 @@ void ha_mroonga::free_foreign_key_create_info(char* str) DBUG_VOID_RETURN; } +#ifdef MRN_RBR_UPDATE_NEED_ALL_COLUMNS bool ha_mroonga::check_written_by_row_based_binlog() { MRN_DBUG_ENTER_METHOD(); @@ -16366,6 +17012,7 @@ bool ha_mroonga::check_written_by_row_based_binlog() DBUG_RETURN(true); } +#endif #ifdef MRN_HAVE_HA_REBIND_PSI void ha_mroonga::wrapper_unbind_psi() @@ -16495,3 +17142,20 @@ my_bool ha_mroonga::register_query_cache_table(THD *thd, #ifdef __cplusplus } #endif + +namespace mrn { + namespace variables { + ulonglong get_boolean_mode_syntax_flags(THD *thd) { + ulonglong flags = BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT; +#ifdef MRN_SUPPORT_THDVAR_SET + flags = THDVAR(thd, boolean_mode_syntax_flags); +#endif + return flags; + } + + ActionOnError get_action_on_fulltext_query_error(THD *thd) { + ulong action = THDVAR(thd, action_on_fulltext_query_error); + return static_cast(action); + } + } +} diff --git a/storage/mroonga/ha_mroonga.def b/storage/mroonga/ha_mroonga.def index 5770cde72e74f59ebdd1387e19a18f8187c08952..7f8394fe4ca3395a2dc5a1040245271fe39402ff 100644 --- a/storage/mroonga/ha_mroonga.def +++ b/storage/mroonga/ha_mroonga.def @@ -13,3 +13,6 @@ EXPORTS mroonga_escape mroonga_escape_init mroonga_escape_deinit + mroonga_normalize + mroonga_normalize_init + mroonga_normalize_deinit diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp index 37059210dd110196020a3cf0674d52c6fa47817b..2533913961e1f63854638ada500290a647322154 100644 --- a/storage/mroonga/ha_mroonga.hpp +++ b/storage/mroonga/ha_mroonga.hpp @@ -32,6 +32,14 @@ extern "C" { #include #include "mrn_mysql_compat.h" +#include +#include + +#if __cplusplus >= 201402 +# define mrn_override override +#else +# define mrn_override +#endif #if (MYSQL_VERSION_ID >= 50514 && MYSQL_VERSION_ID < 50600) # define MRN_HANDLER_HAVE_FINAL_ADD_INDEX 1 @@ -102,6 +110,13 @@ extern "C" { # define MRN_HAVE_HA_EXTRA_PREPARE_FOR_FORCED_CLOSE #endif +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +#define MRN_HAVE_HA_EXTRA_SKIP_SERIALIZABLE_DD_VIEW +#define MRN_HAVE_HA_EXTRA_BEGIN_ALTER_COPY +#define MRN_HAVE_HA_EXTRA_END_ALTER_COPY +#define MRN_HAVE_HA_EXTRA_NO_AUTOINC_LOCKING +#endif + #if MYSQL_VERSION_ID >= 50607 && \ (!defined(MRN_MARIADB_P) || MYSQL_VERSION_ID < 100008) # define MRN_HAVE_HA_EXTRA_EXPORT @@ -196,6 +211,10 @@ extern "C" { # define MRN_FOREIGN_KEY_USE_CONST_STRING #endif +#if MYSQL_VERSION_ID >= 100203 && defined(MRN_MARIADB_P) +# define MRN_FOREIGN_KEY_USE_METHOD_ENUM +#endif + #if MYSQL_VERSION_ID < 50706 || defined(MRN_MARIADB_P) # define MRN_HANDLER_IS_FATAL_ERROR_HAVE_FLAGS #endif @@ -204,6 +223,45 @@ extern "C" { # define MRN_HANDLER_HAVE_RESET_AUTO_INCREMENT #endif +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50709) || \ + (defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100203) +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_TYPE \ + Alter_inplace_info::ALTER_STORED_COLUMN_TYPE +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_ORDER \ + Alter_inplace_info::ALTER_STORED_COLUMN_ORDER +#else +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_TYPE \ + Alter_inplace_info::ALTER_COLUMN_TYPE +# define MRN_ALTER_INPLACE_INFO_ALTER_STORED_COLUMN_ORDER \ + Alter_inplace_info::ALTER_COLUMN_ORDER +#endif + +#if MYSQL_VERSION_ID >= 50700 && !defined(MRN_MARIADB_P) +# define MRN_HANDLER_RECORDS_RETURN_ERROR +#endif + +#if MYSQL_VERSION_ID < 80002 || defined(MRN_MARIADB_P) +# define MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_ST_MYSQL_PLUGIN_HAVE_CHECK_UNINSTALL +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_HANDLER_OPEN_HAVE_TABLE_DEFINITION +# define MRN_HANDLER_CREATE_HAVE_TABLE_DEFINITION +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define MRN_HANDLERTON_CREATE_HAVE_PARTITIONED +#endif + +#if defined(HAVE_PSI_INTERFACE) && \ + (MYSQL_VERSION_ID < 80002 || defined(MRN_MARIADB_P)) +# define MRN_HAVE_PSI_SERVER +#endif + class ha_mroonga; /* structs */ @@ -347,6 +405,8 @@ private: // for ft in where clause test Item_func_match *current_ft_item; + mrn::Operations *operations_; + public: ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg); ~ha_mroonga(); @@ -357,8 +417,20 @@ public: ulonglong table_flags() const; // required ulong index_flags(uint idx, uint part, bool all_parts) const; // required - int create(const char *name, TABLE *form, HA_CREATE_INFO *info); // required - int open(const char *name, int mode, uint test_if_locked); // required + // required + int create(const char *name, TABLE *form, HA_CREATE_INFO *info +#ifdef MRN_HANDLER_CREATE_HAVE_TABLE_DEFINITION + , + dd::Table *table_def +#endif + ) mrn_override; + // required + int open(const char *name, int mode, uint open_options +#ifdef MRN_HANDLER_OPEN_HAVE_TABLE_DEFINITION + , + const dd::Table *table_def +#endif + ) mrn_override; #ifndef MRN_HANDLER_HAVE_HA_CLOSE int close(); // required #endif @@ -419,11 +491,6 @@ public: #endif int index_next_same(uchar *buf, const uchar *key, uint keylen); - int read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted); - int read_range_next(); - int ft_init(); FT_INFO *ft_init_ext(uint flags, uint inx, String *key); int ft_read(uchar *buf); @@ -469,7 +536,9 @@ public: int truncate(); double scan_time(); double read_time(uint index, uint ranges, ha_rows rows); +#ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *keys_to_use_for_scanning(); +#endif ha_rows estimate_rows_upper_bound(); void update_create_info(HA_CREATE_INFO* create_info); int rename_table(const char *from, const char *to); @@ -518,6 +587,11 @@ public: int start_stmt(THD *thd, thr_lock_type lock_type); protected: +#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR + int records(ha_rows *num_rows); +#else + ha_rows records(); +#endif #ifdef MRN_HANDLER_HAVE_HA_RND_NEXT int rnd_next(uchar *buf); #endif @@ -580,6 +654,9 @@ private: bool have_unique_index(); + bool is_foreign_key_field(const char *table_name, + const char *field_name); + void push_warning_unsupported_spatial_index_search(enum ha_rkey_function flag); void clear_cursor(); void clear_cursor_geo(); @@ -592,7 +669,8 @@ private: void remove_grn_obj_force(const char *name); int drop_index(MRN_SHARE *target_share, uint key_index); int drop_indexes_normal(const char *table_name, grn_obj *table); - int drop_indexes_multiple(const char *table_name, grn_obj *table); + int drop_indexes_multiple(const char *table_name, grn_obj *table, + const char *index_table_name_separator); int drop_indexes(const char *table_name); bool find_column_flags(Field *field, MRN_SHARE *mrn_share, int i, grn_obj_flags *column_flags); @@ -600,9 +678,10 @@ private: int error_code); grn_obj *find_tokenizer(KEY *key, MRN_SHARE *mrn_share, int i); grn_obj *find_tokenizer(const char *name, int name_length); + bool have_custom_normalizer(KEY *key) const; grn_obj *find_normalizer(KEY *key); grn_obj *find_normalizer(KEY *key, const char *name); - bool find_index_column_flags(KEY *key, grn_obj_flags *index_column_flags); + bool find_index_column_flags(KEY *key, grn_column_flags *index_column_flags); bool find_token_filters(KEY *key, grn_obj *token_filters); bool find_token_filters_put(grn_obj *token_filters, const char *token_filter_name, @@ -622,9 +701,7 @@ private: bool is_dry_write(); bool is_enable_optimization(); bool should_normalize(Field *field) const; - bool is_temporary_table_name(const char *name) const; - void check_count_skip(key_part_map start_key_part_map, - key_part_map end_key_part_map, bool fulltext); + void check_count_skip(key_part_map target_key_part_map); bool is_grn_zero_column_value(grn_obj *column, grn_obj *value); bool is_primary_key_field(Field *field) const; void check_fast_order_limit(grn_table_sort_key **sort_keys, int *n_sort_keys, @@ -652,6 +729,9 @@ private: int generic_store_bulk_new_decimal(Field *field, grn_obj *buf); int generic_store_bulk_blob(Field *field, grn_obj *buf); int generic_store_bulk_geometry(Field *field, grn_obj *buf); +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + int generic_store_bulk_json(Field *field, grn_obj *buf); +#endif int generic_store_bulk(Field *field, grn_obj *buf); void storage_store_field_string(Field *field, @@ -687,6 +767,10 @@ private: const char *value, uint value_length); void storage_store_field_geometry(Field *field, const char *value, uint value_length); +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + void storage_store_field_json(Field *field, + const char *value, uint value_length); +#endif void storage_store_field(Field *field, const char *value, uint value_length); void storage_store_field_column(Field *field, bool is_primary_key, int nth_column, grn_id record_id); @@ -731,6 +815,15 @@ private: int storage_encode_multiple_column_key(KEY *key_info, const uchar *key, uint key_length, uchar *buffer, uint *encoded_length); + int storage_encode_multiple_column_key_range(KEY *key_info, + const uchar *start, + uint start_size, + const uchar *end, + uint end_size, + uchar *min_buffer, + uint *min_encoded_size, + uchar *max_buffer, + uint *max_encoded_size); int storage_encode_multiple_column_key_range(KEY *key_info, const key_range *start, const key_range *end, @@ -758,9 +851,7 @@ private: grn_obj **index_tables, grn_obj **index_columns, MRN_SHARE *tmp_share); - int wrapper_create_index(const char *name, TABLE *table, - HA_CREATE_INFO *info, MRN_SHARE *tmp_share, - const char *grn_table_name); + int wrapper_create_index(const char *name, TABLE *table, MRN_SHARE *tmp_share); int storage_create_validate_pseudo_column(TABLE *table); #ifdef MRN_SUPPORT_FOREIGN_KEYS bool storage_create_foreign_key(TABLE *table, const char *grn_table_name, @@ -778,16 +869,18 @@ private: int storage_create_indexes(TABLE *table, const char *grn_table_name, grn_obj *grn_table, MRN_SHARE *tmp_share); int close_databases(); - int ensure_database_open(const char *name); + int ensure_database_open(const char *name, mrn::Database **db=NULL); int ensure_database_remove(const char *name); int wrapper_delete_table(const char *name, handlerton *wrap_handlerton, const char *table_name); int generic_delete_table(const char *name, const char *table_name); - int wrapper_open(const char *name, int mode, uint test_if_locked); + int wrapper_open(const char *name, int mode, uint open_options); int wrapper_open_indexes(const char *name); - int storage_open(const char *name, int mode, uint test_if_locked); + int storage_reindex(); + int storage_open(const char *name, int mode, uint open_options); int open_table(const char *name); int storage_open_columns(void); + void storage_close_columns(void); int storage_open_indexes(const char *name); void wrapper_overwrite_index_bits(); int wrapper_close(); @@ -872,6 +965,13 @@ private: void storage_info_variable(); void storage_info_variable_records(); void storage_info_variable_data_file_length(); +#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR + int wrapper_records(ha_rows *num_rows); + int storage_records(ha_rows *num_rows); +#else + ha_rows wrapper_records(); + ha_rows storage_records(); +#endif int wrapper_rnd_init(bool scan); int storage_rnd_init(bool scan); int wrapper_rnd_end(); @@ -914,14 +1014,6 @@ private: int storage_index_last(uchar *buf); int wrapper_index_next_same(uchar *buf, const uchar *key, uint keylen); int storage_index_next_same(uchar *buf, const uchar *key, uint keylen); - int wrapper_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted); - int storage_read_range_first(const key_range *start_key, - const key_range *end_key, - bool eq_range, bool sorted); - int wrapper_read_range_next(); - int storage_read_range_next(); int generic_ft_init(); int wrapper_ft_init(); int storage_ft_init(); @@ -929,41 +1021,18 @@ private: FT_INFO *storage_ft_init_ext(uint flags, uint key_nr, String *key); void generic_ft_init_ext_add_conditions_fast_order_limit( struct st_mrn_ft_info *info, grn_obj *expression); - bool generic_ft_init_ext_parse_pragma_d(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_operator *default_operator, - uint *consumed_keyword_length); - void generic_ft_init_ext_parse_pragma_w_append_section( - struct st_mrn_ft_info *info, - grn_obj *index_column, - grn_obj *match_columns, - uint section, - grn_obj *section_value_buffer, - int weight, - uint n_weights); - bool generic_ft_init_ext_parse_pragma_w(struct st_mrn_ft_info *info, - const char *keyword, - uint keyword_length, - grn_obj *index_column, - grn_obj *match_columns, - uint *consumed_keyword_length, - grn_obj *tmp_objects); - grn_expr_flags expr_flags_in_boolean_mode(); grn_rc generic_ft_init_ext_prepare_expression_in_boolean_mode( struct st_mrn_ft_info *info, String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects); + grn_obj *expression); grn_rc generic_ft_init_ext_prepare_expression_in_normal_mode( struct st_mrn_ft_info *info, String *key, grn_obj *index_column, grn_obj *match_columns, - grn_obj *expression, - grn_obj *tmp_objects); + grn_obj *expression); struct st_mrn_ft_info *generic_ft_init_ext_select(uint flags, uint key_nr, String *key); @@ -1041,8 +1110,10 @@ private: double storage_scan_time(); double wrapper_read_time(uint index, uint ranges, ha_rows rows); double storage_read_time(uint index, uint ranges, ha_rows rows); +#ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING const key_map *wrapper_keys_to_use_for_scanning(); const key_map *storage_keys_to_use_for_scanning(); +#endif ha_rows wrapper_estimate_rows_upper_bound(); ha_rows storage_estimate_rows_upper_bound(); void wrapper_update_create_info(HA_CREATE_INFO* create_info); @@ -1069,8 +1140,10 @@ private: bool wrapper_auto_repair(int error) const; bool storage_auto_repair(int error) const; int generic_disable_index(int i, KEY *key_info); + int wrapper_disable_indexes_mroonga(uint mode); int wrapper_disable_indexes(uint mode); int storage_disable_indexes(uint mode); + int wrapper_enable_indexes_mroonga(uint mode); int wrapper_enable_indexes(uint mode); int storage_enable_indexes(uint mode); int wrapper_check(THD* thd, HA_CHECK_OPT* check_opt); @@ -1111,8 +1184,10 @@ private: Alter_inplace_info *ha_alter_info); bool wrapper_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info); - bool storage_inplace_alter_table_index(TABLE *altered_table, - Alter_inplace_info *ha_alter_info); + bool storage_inplace_alter_table_add_index(TABLE *altered_table, + Alter_inplace_info *ha_alter_info); + bool storage_inplace_alter_table_drop_index(TABLE *altered_table, + Alter_inplace_info *ha_alter_info); bool storage_inplace_alter_table_add_column(TABLE *altered_table, Alter_inplace_info *ha_alter_info); bool storage_inplace_alter_table_drop_column(TABLE *altered_table, @@ -1208,7 +1283,9 @@ private: void storage_free_foreign_key_create_info(char* str); void wrapper_set_keys_in_use(); void storage_set_keys_in_use(); +#ifdef MRN_RBR_UPDATE_NEED_ALL_COLUMNS bool check_written_by_row_based_binlog(); +#endif #ifdef MRN_HAVE_HA_REBIND_PSI void wrapper_unbind_psi(); void storage_unbind_psi(); diff --git a/storage/mroonga/lib/libmrn_need_mysql_sources.am b/storage/mroonga/lib/libmrn_need_mysql_sources.am index 575f38adbd1af7e3278adc12aaf99ead984cdfbe..e8c03c63a92c56f0f631d0bbfb52a957aba9b492 100644 --- a/storage/mroonga/lib/libmrn_need_mysql_sources.am +++ b/storage/mroonga/lib/libmrn_need_mysql_sources.am @@ -28,4 +28,23 @@ libmrn_need_mysql_la_SOURCES = \ mrn_value_decoder.cpp \ mrn_value_decoder.hpp \ mrn_database_repairer.cpp \ - mrn_database_repairer.hpp + mrn_database_repairer.hpp \ + mrn_context_pool.cpp \ + mrn_context_pool.hpp \ + mrn_operations.cpp \ + mrn_operations.hpp \ + mrn_operation.cpp \ + mrn_operation.hpp \ + mrn_database.cpp \ + mrn_database.hpp \ + mrn_column_name.cpp \ + mrn_column_name.hpp \ + mrn_count_skip_checker.cpp \ + mrn_count_skip_checker.hpp \ + mrn_query_parser.cpp \ + mrn_query_parser.hpp \ + mrn_current_thread.hpp \ + mrn_smart_bitmap.cpp \ + mrn_smart_bitmap.hpp \ + mrn_table_fields_offset_mover.cpp \ + mrn_table_fields_offset_mover.hpp diff --git a/storage/mroonga/lib/mrn_column_name.cpp b/storage/mroonga/lib/mrn_column_name.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e469ad2fd1935ef46ecddb3ae9860ac422feaa40 --- /dev/null +++ b/storage/mroonga/lib/mrn_column_name.cpp @@ -0,0 +1,63 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2016 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include + +#include "mrn_column_name.hpp" + +#include + +#include + +// for debug +#define MRN_CLASS_NAME "mrn::ColumnName" + +namespace mrn { + ColumnName::ColumnName(const char *mysql_name) + : mysql_name_(mysql_name) { + encode(); + } + + const char *ColumnName::mysql_name() { + return mysql_name_; + } + + const char *ColumnName::c_str() { + return name_; + } + + size_t ColumnName::length() { + return length_; + } + + void ColumnName::encode() { + MRN_DBUG_ENTER_METHOD(); + uint errors; + length_ = mrn_strconvert(system_charset_info, + mysql_name_, + strlen(mysql_name_), + &my_charset_filename, + name_, + MRN_MAX_PATH_SIZE, + &errors); + name_[length_] = '\0'; + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_column_name.hpp b/storage/mroonga/lib/mrn_column_name.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ed8fb67e50609573574ebf25ba18818645356df7 --- /dev/null +++ b/storage/mroonga/lib/mrn_column_name.hpp @@ -0,0 +1,38 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2016 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include + +namespace mrn { + class ColumnName { + public: + ColumnName(const char *mysql_name); + const char *mysql_name(); + const char *c_str(); + size_t length(); + private: + const char *mysql_name_; + char name_[MRN_MAX_PATH_SIZE]; + size_t length_; + + void encode(); + }; +} diff --git a/storage/mroonga/lib/mrn_condition_converter.cpp b/storage/mroonga/lib/mrn_condition_converter.cpp index 1527a54693843ff274fc16d661e099fd915773f4..6df601d62506ab9c6a1c3dab2905fc5597377c3b 100644 --- a/storage/mroonga/lib/mrn_condition_converter.cpp +++ b/storage/mroonga/lib/mrn_condition_converter.cpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2013-2014 Kouhei Sutou + Copyright(C) 2013-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -175,7 +175,7 @@ namespace mrn { bool convertable = false; - enum_field_types field_type = field_item->field_type(); + enum_field_types field_type = field_item->field->real_type(); NormalizedType normalized_type = normalize_field_type(field_type); switch (normalized_type) { case STRING_TYPE: @@ -185,7 +185,12 @@ namespace mrn { } break; case INT_TYPE: - convertable = value_item->type() == Item::INT_ITEM; + if (field_type == MYSQL_TYPE_ENUM) { + convertable = (value_item->type() == Item::STRING_ITEM || + value_item->type() == Item::INT_ITEM); + } else { + convertable = value_item->type() == Item::INT_ITEM; + } break; case TIME_TYPE: if (is_valid_time_value(field_item, value_item)) { @@ -206,7 +211,7 @@ namespace mrn { bool convertable = false; - enum_field_types field_type = field_item->field_type(); + enum_field_types field_type = field_item->field->type(); NormalizedType normalized_type = normalize_field_type(field_type); switch (normalized_type) { case STRING_TYPE: @@ -251,7 +256,7 @@ namespace mrn { bool error; Item *real_value_item = value_item->real_item(); - switch (field_item->field_type()) { + switch (field_item->field->type()) { case MYSQL_TYPE_TIME: error = real_value_item->get_time(mysql_time); break; @@ -352,6 +357,11 @@ namespace mrn { case MYSQL_TYPE_GEOMETRY: type = UNSUPPORTED_TYPE; break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + type = STRING_TYPE; + break; +#endif } DBUG_RETURN(type); @@ -404,11 +414,11 @@ namespace mrn { DBUG_RETURN(have); } - const Item_func *ConditionConverter::find_match_against(const Item *item) { + unsigned int ConditionConverter::count_match_against(const Item *item) { MRN_DBUG_ENTER_METHOD(); if (!item) { - DBUG_RETURN(NULL); + DBUG_RETURN(0); } switch (item->type()) { @@ -416,14 +426,13 @@ namespace mrn { if (is_storage_mode_) { Item_cond *cond_item = (Item_cond *)item; if (cond_item->functype() == Item_func::COND_AND_FUNC) { + unsigned int n_match_againsts = 0; List_iterator iterator(*((cond_item)->argument_list())); const Item *sub_item; while ((sub_item = iterator++)) { - const Item_func *match_against = find_match_against(sub_item); - if (match_against) { - DBUG_RETURN(match_against); - } + n_match_againsts += count_match_against(sub_item); } + DBUG_RETURN(n_match_againsts); } } break; @@ -432,7 +441,7 @@ namespace mrn { const Item_func *func_item = (const Item_func *)item; switch (func_item->functype()) { case Item_func::FT_FUNC: - DBUG_RETURN(func_item); + DBUG_RETURN(1); break; default: break; @@ -443,7 +452,7 @@ namespace mrn { break; } - DBUG_RETURN(NULL); + DBUG_RETURN(0); } void ConditionConverter::convert(const Item *where, grn_obj *expression) { @@ -560,7 +569,7 @@ namespace mrn { grn_obj *expression) { MRN_DBUG_ENTER_METHOD(); - enum_field_types field_type = field_item->field_type(); + enum_field_types field_type = field_item->field->real_type(); NormalizedType normalized_type = normalize_field_type(field_type); switch (normalized_type) { @@ -574,7 +583,21 @@ namespace mrn { break; case INT_TYPE: grn_obj_reinit(ctx_, &value_, GRN_DB_INT64, 0); - GRN_INT64_SET(ctx_, &value_, const_item->val_int()); + if (field_type == MYSQL_TYPE_ENUM) { + if (const_item->type() == Item::STRING_ITEM) { + String *string; + string = const_item->val_str(NULL); + Field_enum *enum_field = static_cast(field_item->field); + int enum_value = find_type(string->c_ptr(), + enum_field->typelib, + FIND_TYPE_BASIC); + GRN_INT64_SET(ctx_, &value_, enum_value); + } else { + GRN_INT64_SET(ctx_, &value_, const_item->val_int()); + } + } else { + GRN_INT64_SET(ctx_, &value_, const_item->val_int()); + } break; case TIME_TYPE: grn_obj_reinit(ctx_, &value_, GRN_DB_TIME, 0); diff --git a/storage/mroonga/lib/mrn_condition_converter.hpp b/storage/mroonga/lib/mrn_condition_converter.hpp index 3a7fbd048dc511906dc72b1c8ea2ab40b07fc50b..f8a48b6209abd96ba5bfe67c5b70a89429e9feb5 100644 --- a/storage/mroonga/lib/mrn_condition_converter.hpp +++ b/storage/mroonga/lib/mrn_condition_converter.hpp @@ -33,7 +33,7 @@ namespace mrn { ~ConditionConverter(); bool is_convertable(const Item *item); - const Item_func *find_match_against(const Item *item); + unsigned int count_match_against(const Item *item); // caller must check "where" can be convertable by // is_convertable(). This method doesn't validate "where". void convert(const Item *where, grn_obj *expression); diff --git a/storage/mroonga/lib/mrn_context_pool.cpp b/storage/mroonga/lib/mrn_context_pool.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d297ee9a33893243e74749ca52e0542a067b52ce --- /dev/null +++ b/storage/mroonga/lib/mrn_context_pool.cpp @@ -0,0 +1,120 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "mrn_context_pool.hpp" +#include "mrn_lock.hpp" + +#include + +namespace mrn { + // for debug +#define MRN_CLASS_NAME "mrn::ContextPool::Impl" + + class ContextPool::Impl { + public: + Impl(mysql_mutex_t *mutex) + : mutex_(mutex), + pool_(NULL), + last_pull_time_(0) { + } + + ~Impl(void) { + clear(); + } + + grn_ctx *pull(void) { + MRN_DBUG_ENTER_METHOD(); + grn_ctx *ctx = NULL; + + { + time_t now; + time(&now); + + mrn::Lock lock(mutex_); + if (pool_) { + ctx = static_cast(pool_->data); + list_pop(pool_); + if ((now - last_pull_time_) >= CLEAR_THREATHOLD_IN_SECONDS) { + clear(); + } + } + last_pull_time_ = now; + } + + if (!ctx) { + ctx = grn_ctx_open(0); + } + + DBUG_RETURN(ctx); + } + + void release(grn_ctx *ctx) { + MRN_DBUG_ENTER_METHOD(); + + { + mrn::Lock lock(mutex_); + list_push(pool_, ctx); + grn_ctx_use(ctx, NULL); + } + + DBUG_VOID_RETURN; + } + + private: + static const unsigned int CLEAR_THREATHOLD_IN_SECONDS = 60 * 5; + + mysql_mutex_t *mutex_; + LIST *pool_; + time_t last_pull_time_; + + void clear(void) { + MRN_DBUG_ENTER_METHOD(); + while (pool_) { + grn_ctx *ctx = static_cast(pool_->data); + grn_ctx_close(ctx); + list_pop(pool_); + } + DBUG_VOID_RETURN; + } + }; + + // For debug +#undef MRN_CLASS_NAME +#define MRN_CLASS_NAME "mrn::ContextPool" + + ContextPool::ContextPool(mysql_mutex_t *mutex) + : impl_(new Impl(mutex)) { + } + + ContextPool::~ContextPool(void) { + delete impl_; + } + + grn_ctx *ContextPool::pull(void) { + MRN_DBUG_ENTER_METHOD(); + grn_ctx *ctx = impl_->pull(); + DBUG_RETURN(ctx); + } + + void ContextPool::release(grn_ctx *ctx) { + MRN_DBUG_ENTER_METHOD(); + impl_->release(ctx); + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_context_pool.hpp b/storage/mroonga/lib/mrn_context_pool.hpp new file mode 100644 index 0000000000000000000000000000000000000000..4c64933ac81b63d4b6eabec110a37e75371f3e0e --- /dev/null +++ b/storage/mroonga/lib/mrn_context_pool.hpp @@ -0,0 +1,41 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_CONTEXT_POOL_HPP_ +#define MRN_CONTEXT_POOL_HPP_ + +#include + +#include + +namespace mrn { + class ContextPool { + public: + ContextPool(mysql_mutex_t *mutex); + ~ContextPool(void); + grn_ctx *pull(void); + void release(grn_ctx *context); + + private: + class Impl; + Impl *impl_; + }; +} + +#endif /* MRN_CONTEXT_POOL_HPP_ */ diff --git a/storage/mroonga/lib/mrn_count_skip_checker.cpp b/storage/mroonga/lib/mrn_count_skip_checker.cpp new file mode 100644 index 0000000000000000000000000000000000000000..216f3b7b7b568c660bdf86c8f6f32f12b6248935 --- /dev/null +++ b/storage/mroonga/lib/mrn_count_skip_checker.cpp @@ -0,0 +1,303 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2010-2013 Kentoku SHIBA + Copyright(C) 2011-2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "mrn_count_skip_checker.hpp" + +#include + +// for debug +#define MRN_CLASS_NAME "mrn::CountSkipChecker" + +namespace mrn { + CountSkipChecker::CountSkipChecker(grn_ctx *ctx, + TABLE *table, + SELECT_LEX *select_lex, + KEY *key_info, + key_part_map target_key_part_map, + bool is_storage_mode) + : ctx_(ctx), + table_(table), + select_lex_(select_lex), + key_info_(key_info), + target_key_part_map_(target_key_part_map), + is_storage_mode_(is_storage_mode) { + } + + CountSkipChecker::~CountSkipChecker() { + } + + bool CountSkipChecker::check() { + MRN_DBUG_ENTER_METHOD(); + + if (select_lex_->item_list.elements != 1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not only one item: %u", + select_lex_->item_list.elements); + DBUG_RETURN(false); + } + if (select_lex_->group_list.elements > 0) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] have groups: %u", + select_lex_->group_list.elements); + DBUG_RETURN(false); + } + if (MRN_SELECT_LEX_GET_HAVING_COND(select_lex_)) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] have HAVING"); + DBUG_RETURN(false); + } + if (select_lex_->table_list.elements != 1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not only one table: %u", + select_lex_->table_list.elements); + DBUG_RETURN(false); + } + + Item *info = static_cast(select_lex_->item_list.first_node()->info); + if (info->type() != Item::SUM_FUNC_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] item isn't sum function: %u", + info->type()); + DBUG_RETURN(false); + } + Item_sum *sum_item = static_cast(info); + if (sum_item->sum_func() != Item_sum::COUNT_FUNC) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not COUNT: %u", + sum_item->sum_func()); + DBUG_RETURN(false); + } + if (ITEM_SUM_GET_NEST_LEVEL(sum_item) != 0 || + ITEM_SUM_GET_AGGR_LEVEL(sum_item) != 0 || + ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) != -1 || + sum_item->max_sum_func_level != -1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not simple COUNT(*): %d:%d:%d:%d", + ITEM_SUM_GET_NEST_LEVEL(sum_item), + ITEM_SUM_GET_AGGR_LEVEL(sum_item), + ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item), + sum_item->max_sum_func_level); + DBUG_RETURN(false); + } + + Item *where = MRN_SELECT_LEX_GET_WHERE_COND(select_lex_); + if (!where) { + if (is_storage_mode_) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] no condition"); + DBUG_RETURN(true); + } else { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] no condition with wrapper mode"); + DBUG_RETURN(false); + } + } + + bool skippable = is_skippable(where); + DBUG_RETURN(skippable); + } + + bool CountSkipChecker::is_skippable(Item *where) { + MRN_DBUG_ENTER_METHOD(); + + bool skippable = false; + switch (where->type()) { + case Item::COND_ITEM: + { + Item_cond *cond_item = static_cast(where); + skippable = is_skippable(cond_item); + if (skippable) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] skippable multiple conditions"); + } + } + break; + case Item::FUNC_ITEM: + { + Item_func *func_item = static_cast(where); + if (func_item->functype() == Item_func::FT_FUNC) { + if (select_lex_->select_n_where_fields == 1) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] " + "only one full text search condition"); + DBUG_RETURN(true); + } else { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] " + "full text search condition and more conditions: %u", + select_lex_->select_n_where_fields); + DBUG_RETURN(false); + } + } else { + skippable = is_skippable(func_item); + if (skippable) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][true] skippable condition"); + } + } + } + break; + default: + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] unsupported top level item: %u", + where->type()); + break; + } + + DBUG_RETURN(skippable); + } + + bool CountSkipChecker::is_skippable(Item_cond *cond_item) { + MRN_DBUG_ENTER_METHOD(); + + List_iterator iterator(*(cond_item->argument_list())); + Item *sub_item; + while ((sub_item = iterator++)) { + if (sub_item->type() != Item::FUNC_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] " + "sub condition isn't function item: %u", + sub_item->type()); + DBUG_RETURN(false); + } + if (!is_skippable(static_cast(sub_item))) { + DBUG_RETURN(false); + } + } + DBUG_RETURN(true); + } + + bool CountSkipChecker::is_skippable(Item_func *func_item) { + MRN_DBUG_ENTER_METHOD(); + + switch (func_item->functype()) { + case Item_func::EQ_FUNC: + case Item_func::EQUAL_FUNC: + case Item_func::NE_FUNC: + case Item_func::LT_FUNC: + case Item_func::LE_FUNC: + case Item_func::GE_FUNC: + case Item_func::GT_FUNC: + { + Item **arguments = func_item->arguments(); + Item *left_item = arguments[0]; + if (left_item->type() != Item::FIELD_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] not field: %u:%u", + func_item->functype(), + left_item->type()); + DBUG_RETURN(false); + } + + bool skippable = is_skippable(static_cast(left_item)); + DBUG_RETURN(skippable); + } + break; + case Item_func::BETWEEN: + { + Item **arguments = func_item->arguments(); + Item *target_item = arguments[0]; + if (target_item->type() != Item::FIELD_ITEM) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] BETWEEN target isn't field: %u", + target_item->type()); + DBUG_RETURN(false); + } + + bool skippable = is_skippable(static_cast(target_item)); + DBUG_RETURN(skippable); + } + break; + case Item_func::MULT_EQUAL_FUNC: +#ifdef MRN_HAVE_ITEM_EQUAL_FIELDS_ITERATOR + { + Item_equal *equal_item = static_cast(func_item); + Item_equal_fields_iterator iterator(*equal_item); + Item *field_item; + while ((field_item = iterator++)) { + bool skippable = is_skippable(static_cast(field_item)); + if (!skippable) { + DBUG_RETURN(skippable); + } + } + DBUG_RETURN(true); + } +#endif + break; + default: + break; + } + + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] unsupported function item: %u", + func_item->functype()); + DBUG_RETURN(false); + } + + bool CountSkipChecker::is_skippable(Item_field *field_item) { + MRN_DBUG_ENTER_METHOD(); + + Field *field = field_item->field; + if (!field) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] field is missing"); + DBUG_RETURN(false); + } + + if (field->table != table_) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] external table's field"); + DBUG_RETURN(false); + } + + if (!key_info_) { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] no active index: <%s>:<%s>", + *(field->table_name), + field->field_name); + DBUG_RETURN(false); + } + + uint i; + KEY_PART_INFO *key_part = key_info_->key_part; + for (i = 0; i < KEY_N_KEY_PARTS(key_info_); i++) { + if (key_part[i].field == field) { + if ((target_key_part_map_ >> i) & 1) { + DBUG_RETURN(true); + } else { + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] " + "field's index are out of key part map: %u:%lu: <%s>:<%s>", + i, + target_key_part_map_, + *(field->table_name), + field->field_name); + DBUG_RETURN(false); + } + } + } + + GRN_LOG(ctx_, GRN_LOG_DEBUG, + "[mroonga][count-skip][false] field isn't indexed: <%s>:<%s>", + *(field->table_name), + field->field_name); + DBUG_RETURN(false); + } +} diff --git a/storage/mroonga/lib/mrn_count_skip_checker.hpp b/storage/mroonga/lib/mrn_count_skip_checker.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b813ecdcc08f2001ea581dcdf470ec3bc737587c --- /dev/null +++ b/storage/mroonga/lib/mrn_count_skip_checker.hpp @@ -0,0 +1,57 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2016 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_COUNT_SKIP_CHECKER_HPP_ +#define MRN_COUNT_SKIP_CHECKER_HPP_ + +#include + +#include + +#include + +namespace mrn { + class CountSkipChecker { + public: + CountSkipChecker(grn_ctx *ctx, + TABLE *table, + SELECT_LEX *select_lex, + KEY *key_info, + key_part_map target_key_part_map, + bool is_storage_mode); + ~CountSkipChecker(); + + bool check(); + + private: + grn_ctx *ctx_; + TABLE *table_; + SELECT_LEX *select_lex_; + KEY *key_info_; + key_part_map target_key_part_map_; + bool is_storage_mode_; + + bool is_skippable(Item *where); + bool is_skippable(Item_cond *cond_item); + bool is_skippable(Item_func *func_item); + bool is_skippable(Item_field *field_item); + }; +} + +#endif /* MRN_COUNT_SKIP_CHECKER_HPP_ */ diff --git a/storage/mroonga/lib/mrn_current_thread.hpp b/storage/mroonga/lib/mrn_current_thread.hpp new file mode 100644 index 0000000000000000000000000000000000000000..367057fce66c96e97fbd5142ead19bacda44036d --- /dev/null +++ b/storage/mroonga/lib/mrn_current_thread.hpp @@ -0,0 +1,27 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# include +#endif diff --git a/storage/mroonga/lib/mrn_database.cpp b/storage/mroonga/lib/mrn_database.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52e315e1b77f46f340d02f471eaa81c8b2776967 --- /dev/null +++ b/storage/mroonga/lib/mrn_database.cpp @@ -0,0 +1,89 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include "mrn_database.hpp" +#include "mrn_operations.hpp" + +// for debug +#define MRN_CLASS_NAME "mrn::Database" + +namespace mrn { + Database::Database(grn_ctx *ctx, grn_obj *db) + : ctx_(ctx), + db_(db), + broken_table_names_(NULL), + is_broken_(false) { + Operations operations(ctx_); + broken_table_names_ = operations.collect_processing_table_names(); + is_broken_ = operations.is_locked(); + } + + Database::~Database(void) { + close(); + } + + void Database::close() { + MRN_DBUG_ENTER_METHOD(); + if (db_) { + grn_hash_close(ctx_, broken_table_names_); + broken_table_names_ = NULL; + grn_obj_close(ctx_, db_); + db_ = NULL; + } + DBUG_VOID_RETURN; + } + + grn_rc Database::remove() { + MRN_DBUG_ENTER_METHOD(); + grn_rc rc = GRN_SUCCESS; + if (db_) { + grn_hash_close(ctx_, broken_table_names_); + broken_table_names_ = NULL; + rc = grn_obj_remove(ctx_, db_); + if (rc == GRN_SUCCESS) { + db_ = NULL; + } + } + DBUG_RETURN(rc); + } + + grn_obj *Database::get() { + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(db_); + } + + bool Database::is_broken() { + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(is_broken_); + } + + bool Database::is_broken_table(const char *name, size_t name_size) { + MRN_DBUG_ENTER_METHOD(); + grn_id id = grn_hash_get(ctx_, broken_table_names_, name, name_size, NULL); + DBUG_RETURN(id != GRN_ID_NIL); + } + + void Database::mark_table_repaired(const char *name, size_t name_size) { + MRN_DBUG_ENTER_METHOD(); + grn_hash_delete(ctx_, broken_table_names_, name, name_size, NULL); + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_database.hpp b/storage/mroonga/lib/mrn_database.hpp new file mode 100644 index 0000000000000000000000000000000000000000..c2c7e460b581fa73c8b9a3e70d2488020fbdf5b8 --- /dev/null +++ b/storage/mroonga/lib/mrn_database.hpp @@ -0,0 +1,47 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_DATABASE_HPP_ +#define MRN_DATABASE_HPP_ + +#include + +namespace mrn { + class Database { + public: + Database(grn_ctx *ctx, grn_obj *db); + ~Database(void); + + void close(); + grn_rc remove(); + grn_obj *get(); + + bool is_broken(); + bool is_broken_table(const char *name, size_t name_size); + void mark_table_repaired(const char *name, size_t name_size); + + private: + grn_ctx *ctx_; + grn_obj *db_; + grn_hash *broken_table_names_; + bool is_broken_; + }; +} + +#endif /* MRN_DATABASE_HPP_ */ diff --git a/storage/mroonga/lib/mrn_database_manager.cpp b/storage/mroonga/lib/mrn_database_manager.cpp index 753d1551ff475f9956be8dcdc56888feeba2ed10..d52d2639d7daa67fed51d9e66b3e2c71ae392542 100644 --- a/storage/mroonga/lib/mrn_database_manager.cpp +++ b/storage/mroonga/lib/mrn_database_manager.cpp @@ -56,9 +56,9 @@ namespace mrn { if (cache_) { void *db_address; GRN_HASH_EACH(ctx_, cache_, id, NULL, 0, &db_address, { - grn_obj *db; + Database *db; memcpy(&db, db_address, sizeof(grn_obj *)); - grn_obj_unlink(ctx_, db); + delete db; }); grn_hash_close(ctx_, cache_); } @@ -80,7 +80,7 @@ namespace mrn { DBUG_RETURN(true); } - int DatabaseManager::open(const char *path, grn_obj **db) { + int DatabaseManager::open(const char *path, Database **db) { MRN_DBUG_ENTER_METHOD(); int error = 0; @@ -100,36 +100,54 @@ namespace mrn { mapper.db_name(), strlen(mapper.db_name()), &db_address); if (id == GRN_ID_NIL) { + grn_obj *grn_db; struct stat db_stat; if (stat(mapper.db_path(), &db_stat)) { GRN_LOG(ctx_, GRN_LOG_INFO, "database not found. creating...: <%s>", mapper.db_path()); if (path[0] == FN_CURLIB && - (path[1] == FN_LIBCHAR || path[1] == FN_LIBCHAR2)) { + mrn_is_directory_separator(path[1])) { ensure_database_directory(); } - *db = grn_db_create(ctx_, mapper.db_path(), NULL); + grn_db = grn_db_create(ctx_, mapper.db_path(), NULL); if (ctx_->rc) { error = ER_CANT_CREATE_TABLE; my_message(error, ctx_->errbuf, MYF(0)); DBUG_RETURN(error); } } else { - *db = grn_db_open(ctx_, mapper.db_path()); + grn_db = grn_db_open(ctx_, mapper.db_path()); if (ctx_->rc) { error = ER_CANT_OPEN_FILE; my_message(error, ctx_->errbuf, MYF(0)); DBUG_RETURN(error); } } + *db = new Database(ctx_, grn_db); grn_hash_add(ctx_, cache_, mapper.db_name(), strlen(mapper.db_name()), &db_address, NULL); - memcpy(db_address, db, sizeof(grn_obj *)); - error = ensure_normalizers_registered(*db); + memcpy(db_address, db, sizeof(Database *)); + error = ensure_normalizers_registered((*db)->get()); + if (!error) { + if ((*db)->is_broken()) { + error = ER_CANT_OPEN_FILE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: database: open: " + "The database maybe broken. " + "We recommend you to recreate the database. " + "If the database isn't broken, " + "you can remove this error by running " + "'groonga %s table_remove mroonga_operations' " + "on server. But the latter isn't recommended.", + mapper.db_path()); + my_message(error, error_message, MYF(0)); + } + } } else { - memcpy(db, db_address, sizeof(grn_obj *)); - grn_ctx_use(ctx_, *db); + memcpy(db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, (*db)->get()); } DBUG_RETURN(error); @@ -150,10 +168,11 @@ namespace mrn { DBUG_VOID_RETURN; } - grn_obj *db = NULL; - memcpy(&db, db_address, sizeof(grn_obj *)); + Database *db = NULL; + memcpy(&db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, db->get()); if (db) { - grn_obj_close(ctx_, db); + delete db; } grn_hash_delete_by_id(ctx_, cache_, id, NULL); @@ -173,29 +192,35 @@ namespace mrn { mapper.db_name(), strlen(mapper.db_name()), &db_address); - grn_obj *db = NULL; + Database *db = NULL; if (id == GRN_ID_NIL) { struct stat dummy; if (stat(mapper.db_path(), &dummy) == 0) { - db = grn_db_open(ctx_, mapper.db_path()); + grn_obj *grn_db = grn_db_open(ctx_, mapper.db_path()); + db = new Database(ctx_, grn_db); } } else { - memcpy(&db, db_address, sizeof(grn_obj *)); + memcpy(&db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, db->get()); } if (!db) { DBUG_RETURN(false); } - if (grn_obj_remove(ctx_, db) == GRN_SUCCESS) { + if (db->remove() == GRN_SUCCESS) { if (id != GRN_ID_NIL) { grn_hash_delete_by_id(ctx_, cache_, id, NULL); } + delete db; DBUG_RETURN(true); } else { GRN_LOG(ctx_, GRN_LOG_ERROR, "failed to drop database: <%s>: <%s>", mapper.db_path(), ctx_->errbuf); + if (id == GRN_ID_NIL) { + delete db; + } DBUG_RETURN(false); } } @@ -223,22 +248,28 @@ namespace mrn { break; } void *db_address; - grn_obj *db; + Database *db; grn_hash_cursor_get_value(ctx_, cursor, &db_address); - memcpy(&db, db_address, sizeof(grn_obj *)); + memcpy(&db, db_address, sizeof(Database *)); + grn_ctx_use(ctx_, db->get()); grn_rc rc = grn_hash_cursor_delete(ctx_, cursor, NULL); if (rc) { error = ER_ERROR_ON_READ; my_message(error, ctx_->errbuf, MYF(0)); break; } - grn_obj_close(ctx_, db); + delete db; } grn_hash_cursor_close(ctx_, cursor); DBUG_RETURN(error); } + const char *DatabaseManager::error_message() { + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(ctx_->errbuf); + } + void DatabaseManager::mkdir_p(const char *directory) { MRN_DBUG_ENTER_METHOD(); @@ -246,8 +277,7 @@ namespace mrn { char sub_directory[MRN_MAX_PATH_SIZE]; sub_directory[0] = '\0'; while (true) { - if (directory[i] == FN_LIBCHAR || - directory[i] == FN_LIBCHAR2 || + if (mrn_is_directory_separator(directory[i]) || directory[i] == '\0') { sub_directory[i] = '\0'; struct stat directory_status; @@ -290,8 +320,10 @@ namespace mrn { const char *last_path_separator; last_path_separator = strrchr(path_prefix, FN_LIBCHAR); +#ifdef FN_LIBCHAR2 if (!last_path_separator) last_path_separator = strrchr(path_prefix, FN_LIBCHAR2); +#endif if (!last_path_separator) DBUG_VOID_RETURN; if (path_prefix == last_path_separator) diff --git a/storage/mroonga/lib/mrn_database_manager.hpp b/storage/mroonga/lib/mrn_database_manager.hpp index 76c76dab6d5d8a5c8fec0ec42b2415d9a668a570..877b7ca889ac40db7d35493b30e8b12aa83acf3a 100644 --- a/storage/mroonga/lib/mrn_database_manager.hpp +++ b/storage/mroonga/lib/mrn_database_manager.hpp @@ -22,6 +22,8 @@ #ifndef MRN_DATABASE_MANAGER_HPP_ #define MRN_DATABASE_MANAGER_HPP_ +#include "mrn_database.hpp" + #include namespace mrn { @@ -30,10 +32,11 @@ namespace mrn { DatabaseManager(grn_ctx *ctx, mysql_mutex_t *mutex); ~DatabaseManager(void); bool init(void); - int open(const char *path, grn_obj **db); + int open(const char *path, Database **db); void close(const char *path); bool drop(const char *path); int clear(void); + const char *error_message(); private: grn_ctx *ctx_; diff --git a/storage/mroonga/lib/mrn_database_repairer.cpp b/storage/mroonga/lib/mrn_database_repairer.cpp index f04c027f8bbfe9a87f06172f6462bceec91fe307..47badbd8b93af22a44affd8128261afc7d05b356 100644 --- a/storage/mroonga/lib/mrn_database_repairer.cpp +++ b/storage/mroonga/lib/mrn_database_repairer.cpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2015 Kouhei Sutou + Copyright(C) 2015-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -36,6 +36,16 @@ #endif namespace mrn { + struct CheckResult { + CheckResult() : + is_crashed(false), + is_corrupt(false) { + } + + bool is_crashed; + bool is_corrupt; + }; + DatabaseRepairer::DatabaseRepairer(grn_ctx *ctx, THD *thd) : ctx_(ctx), thd_(thd), @@ -53,10 +63,19 @@ namespace mrn { bool DatabaseRepairer::is_crashed(void) { MRN_DBUG_ENTER_METHOD(); - bool is_crashed = false; - each_database(&DatabaseRepairer::is_crashed_body, &is_crashed); + CheckResult result; + each_database(&DatabaseRepairer::check_body, &result); + + DBUG_RETURN(result.is_crashed); + } + + bool DatabaseRepairer::is_corrupt(void) { + MRN_DBUG_ENTER_METHOD(); + + CheckResult result; + each_database(&DatabaseRepairer::check_body, &result); - DBUG_RETURN(is_crashed); + DBUG_RETURN(result.is_corrupt); } bool DatabaseRepairer::repair(void) { @@ -81,9 +100,19 @@ namespace mrn { DBUG_VOID_RETURN; } - do { - each_database_body(data.cFileName, each_body_func, user_data); - } while (FindNextFile(finder, &data) != 0); + grn_ctx ctx; + grn_rc rc = grn_ctx_init(&ctx, 0); + if (rc == GRN_SUCCESS) { + do { + each_database_body(data.cFileName, &ctx, each_body_func, user_data); + } while (FindNextFile(finder, &data) != 0); + grn_ctx_fin(&ctx); + } else { + GRN_LOG(ctx_, GRN_LOG_WARNING, + "[mroonga][database][repairer][each] " + "failed to initialize grn_ctx: %d: %s", + rc, grn_rc_to_string(rc)); + } FindClose(finder); #else DIR *dir = opendir(base_directory_); @@ -91,8 +120,18 @@ namespace mrn { DBUG_VOID_RETURN; } - while (struct dirent *entry = readdir(dir)) { - each_database_body(entry->d_name, each_body_func, user_data); + grn_ctx ctx; + grn_rc rc = grn_ctx_init(&ctx, 0); + if (rc == GRN_SUCCESS) { + while (struct dirent *entry = readdir(dir)) { + each_database_body(entry->d_name, &ctx, each_body_func, user_data); + } + grn_ctx_fin(&ctx); + } else { + GRN_LOG(ctx_, GRN_LOG_WARNING, + "[mroonga][database][repairer][each] " + "failed to initialize grn_ctx: %d: %s", + rc, grn_rc_to_string(rc)); } closedir(dir); #endif @@ -101,6 +140,7 @@ namespace mrn { } void DatabaseRepairer::each_database_body(const char *base_path, + grn_ctx *ctx, EachBodyFunc each_body_func, void *user_data) { MRN_DBUG_ENTER_METHOD(); @@ -123,14 +163,14 @@ namespace mrn { char db_path[MRN_MAX_PATH_SIZE]; snprintf(db_path, MRN_MAX_PATH_SIZE, "%s%c%s", base_directory_, FN_LIBCHAR, base_path); - grn_obj *db = grn_db_open(ctx_, db_path); + grn_obj *db = grn_db_open(ctx, db_path); if (!db) { DBUG_VOID_RETURN; } - (this->*each_body_func)(db, db_path, user_data); + (this->*each_body_func)(ctx, db, db_path, user_data); - grn_obj_close(ctx_, db); + grn_obj_close(ctx, db); DBUG_VOID_RETURN; } @@ -150,8 +190,7 @@ namespace mrn { size_t raw_path_prefix_length = strlen(raw_path_prefix); size_t separator_position = raw_path_prefix_length; for (; separator_position > 0; separator_position--) { - if (base_directory_buffer_[separator_position] == FN_LIBCHAR || - base_directory_buffer_[separator_position] == FN_LIBCHAR2) { + if (mrn_is_directory_separator(base_directory_buffer_[separator_position])) { break; } } @@ -169,34 +208,46 @@ namespace mrn { DBUG_VOID_RETURN; } - void DatabaseRepairer::is_crashed_body(grn_obj *db, - const char *db_path, - void *user_data) { + void DatabaseRepairer::check_body(grn_ctx *ctx, + grn_obj *db, + const char *db_path, + void *user_data) { MRN_DBUG_ENTER_METHOD(); - bool *is_crashed = static_cast(user_data); + CheckResult *result = static_cast(user_data); - if (grn_obj_is_locked(ctx_, db)) { - *is_crashed = true; + if (grn_obj_is_locked(ctx, db)) { + result->is_crashed = true; + result->is_corrupt = true; DBUG_VOID_RETURN; } grn_table_cursor *cursor; - cursor = grn_table_cursor_open(ctx_, db, + cursor = grn_table_cursor_open(ctx, db, NULL, 0, NULL, 0, 0, -1, GRN_CURSOR_BY_ID); if (!cursor) { - *is_crashed = true; + result->is_crashed = true; + result->is_corrupt = true; DBUG_VOID_RETURN; } grn_id id; - while ((id = grn_table_cursor_next(ctx_, cursor)) != GRN_ID_NIL) { - grn_obj *object = grn_ctx_at(ctx_, id); + while ((id = grn_table_cursor_next(ctx, cursor)) != GRN_ID_NIL) { + if (grn_id_is_builtin(ctx, id)) { + continue; + } + + grn_obj *object = grn_ctx_at(ctx, id); if (!object) { - continue; + if (ctx->rc == GRN_SUCCESS) { + continue; + } else { + result->is_corrupt = true; + break; + } } switch (object->header.type) { @@ -207,37 +258,40 @@ namespace mrn { case GRN_COLUMN_FIX_SIZE: case GRN_COLUMN_VAR_SIZE: case GRN_COLUMN_INDEX: - grn_obj_is_locked(ctx_, object); - *is_crashed = true; + if (grn_obj_is_locked(ctx_, object)) { + result->is_crashed = true; + result->is_corrupt = true; + } break; default: break; } - grn_obj_unlink(ctx_, object); + grn_obj_unlink(ctx, object); - if (*is_crashed) { + if (result->is_crashed || result->is_corrupt) { break; } } - grn_table_cursor_close(ctx_, cursor); + grn_table_cursor_close(ctx, cursor); DBUG_VOID_RETURN; } - void DatabaseRepairer::repair_body(grn_obj *db, + void DatabaseRepairer::repair_body(grn_ctx *ctx, + grn_obj *db, const char *db_path, void *user_data) { MRN_DBUG_ENTER_METHOD(); bool *succeeded = static_cast(user_data); - if (grn_db_recover(ctx_, db) != GRN_SUCCESS) { + if (grn_db_recover(ctx, db) != GRN_SUCCESS) { push_warning_printf(thd_, MRN_SEVERITY_WARNING, ER_NOT_KEYFILE, "mroonga: repair: " "Failed to recover database: <%s>: <%s>", - db_path, ctx_->errbuf); + db_path, ctx->errbuf); *succeeded = false; } diff --git a/storage/mroonga/lib/mrn_database_repairer.hpp b/storage/mroonga/lib/mrn_database_repairer.hpp index 12e2bbc9c798e14887aa9d58d72298a40e84d028..d46ae83807254b3a436f4c9c7202bd27f17c9bfe 100644 --- a/storage/mroonga/lib/mrn_database_repairer.hpp +++ b/storage/mroonga/lib/mrn_database_repairer.hpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2015 Kouhei Sutou + Copyright(C) 2015-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,7 @@ namespace mrn { DatabaseRepairer(grn_ctx *ctx, THD *thd); ~DatabaseRepairer(void); bool is_crashed(void); + bool is_corrupt(void); bool repair(void); private: @@ -40,18 +41,26 @@ namespace mrn { size_t path_prefix_length_; size_t mrn_db_file_suffix_length_; - typedef void (DatabaseRepairer::*EachBodyFunc)(grn_obj *db, + typedef void (DatabaseRepairer::*EachBodyFunc)(grn_ctx *ctx, + grn_obj *db, const char *db_path, void *user_data); void each_database(EachBodyFunc each_body_func, void *user_data); void each_database_body(const char *base_path, + grn_ctx *ctx, EachBodyFunc each_body_func, void *user_data); void detect_paths(void); - void is_crashed_body(grn_obj *db, const char *db_path, void *user_data); - void repair_body(grn_obj *db, const char *db_path, void *user_data); + void check_body(grn_ctx *ctx, + grn_obj *db, + const char *db_path, + void *user_data); + void repair_body(grn_ctx *ctx, + grn_obj *db, + const char *db_path, + void *user_data); }; } diff --git a/storage/mroonga/lib/mrn_index_table_name.cpp b/storage/mroonga/lib/mrn_index_table_name.cpp index a4a687c7996b1bffd55a32bb76ce4198579e0b5e..1cc510ad7dbaedd8a1d43cf64675272a213a9985 100644 --- a/storage/mroonga/lib/mrn_index_table_name.cpp +++ b/storage/mroonga/lib/mrn_index_table_name.cpp @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2011 Kentoku SHIBA - Copyright(C) 2011-2012 Kouhei Sutou + Copyright(C) 2011-2015 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -26,7 +26,8 @@ #define MRN_CLASS_NAME "mrn::IndexTableName" namespace mrn { - const char *IndexTableName::SEPARATOR = "-"; + const char *IndexTableName::SEPARATOR = "#"; + const char *IndexTableName::OLD_SEPARATOR = "-"; bool IndexTableName::is_custom_name(const char *table_name, size_t table_name_length, @@ -43,9 +44,12 @@ namespace mrn { DBUG_RETURN(true); } - if (strncmp(SEPARATOR, - index_table_name + table_name_length, - strlen(SEPARATOR)) != 0) { + if ((strncmp(OLD_SEPARATOR, + index_table_name + table_name_length, + strlen(OLD_SEPARATOR)) != 0) && + (strncmp(SEPARATOR, + index_table_name + table_name_length, + strlen(SEPARATOR)) != 0)) { DBUG_RETURN(true); } @@ -63,6 +67,12 @@ namespace mrn { encoded_mysql_index_name_multibyte + MRN_MAX_KEY_SIZE, mysql_index_name_multibyte, mysql_index_name_multibyte + strlen(mysql_index_name_)); + snprintf(old_name_, MRN_MAX_KEY_SIZE, + "%s%s%s", + table_name_, + OLD_SEPARATOR, + encoded_mysql_index_name_multibyte); + old_length_ = strlen(old_name_); snprintf(name_, MRN_MAX_KEY_SIZE, "%s%s%s", table_name_, @@ -79,6 +89,14 @@ namespace mrn { return length_; } + const char *IndexTableName::old_c_str() { + return old_name_; + } + + size_t IndexTableName::old_length() { + return old_length_; + } + uint IndexTableName::encode(uchar *encoded_start, uchar *encoded_end, const uchar *mysql_string_start, diff --git a/storage/mroonga/lib/mrn_index_table_name.hpp b/storage/mroonga/lib/mrn_index_table_name.hpp index c4f1622861056042374b0a66e16a8bd3758b9166..abaccfae220cb5232c6b5c0d27120bde6f9181ec 100644 --- a/storage/mroonga/lib/mrn_index_table_name.hpp +++ b/storage/mroonga/lib/mrn_index_table_name.hpp @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2011 Kentoku SHIBA - Copyright(C) 2011-2012 Kouhei Sutou + Copyright(C) 2011-2015 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,7 @@ namespace mrn { class IndexTableName { public: static const char *SEPARATOR; + static const char *OLD_SEPARATOR; static bool is_custom_name(const char *table_name, size_t table_name_length, @@ -36,9 +37,13 @@ namespace mrn { IndexTableName(const char *table_name, const char *mysql_index_name); const char *c_str(); size_t length(); + const char *old_c_str(); + size_t old_length(); private: const char *table_name_; const char *mysql_index_name_; + char old_name_[MRN_MAX_KEY_SIZE]; + size_t old_length_; char name_[MRN_MAX_KEY_SIZE]; size_t length_; diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp index c7ef9dd5851bff04930302ab701908346b0decef..0038a7fe34f9276c1159d5bbde5fe8c232572e00 100644 --- a/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp +++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp @@ -288,6 +288,7 @@ namespace mrn { decode_long_long_int(current_grn_key, &grn_time); TimeConverter time_converter; MYSQL_TIME mysql_time; + mysql_time.neg = FALSE; mysql_time.time_type = MYSQL_TIMESTAMP_DATETIME; time_converter.grn_time_to_mysql_time(grn_time, &mysql_time); long long int mysql_datetime_packed = @@ -518,6 +519,14 @@ namespace mrn { *data_type = TYPE_BYTE_SEQUENCE; *data_size = key_part->length; break; +#ifdef MRN_HAVE_MYSQL_TYPE_JSON + case MYSQL_TYPE_JSON: + // TODO + DBUG_PRINT("info", ("mroonga: MYSQL_TYPE_JSON")); + *data_type = TYPE_BYTE_SEQUENCE; + *data_size = key_part->length; + break; +#endif } DBUG_VOID_RETURN; } diff --git a/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp b/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp index 2b3f935d4e414acff7319570a2e43e9c6726946f..14003cda9f58f66c1679fb8ea497278f817f75e8 100644 --- a/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp +++ b/storage/mroonga/lib/mrn_multiple_column_key_codec.hpp @@ -20,11 +20,11 @@ #ifndef MRN_MULTIPLE_COLUMN_KEY_CODEC_HPP_ #define MRN_MULTIPLE_COLUMN_KEY_CODEC_HPP_ -#include - #include #include +#include + namespace mrn { class MultipleColumnKeyCodec { public: diff --git a/storage/mroonga/lib/mrn_operation.cpp b/storage/mroonga/lib/mrn_operation.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2dab41108a72d37248b936ea6296c1cb957c00f9 --- /dev/null +++ b/storage/mroonga/lib/mrn_operation.cpp @@ -0,0 +1,51 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include "mrn_operation.hpp" + +// for debug +#define MRN_CLASS_NAME "mrn::Operation" + +namespace mrn { + Operation::Operation(mrn::Operations *operations, + const char *type, + const char *table_name, + size_t table_name_size) + : operations_(operations), + id_(operations_->start(type, table_name, table_name_size)) { + } + + Operation::~Operation() { + MRN_DBUG_ENTER_METHOD(); + + operations_->finish(id_); + + DBUG_VOID_RETURN; + } + + void Operation::record_target(grn_id record_id) { + MRN_DBUG_ENTER_METHOD(); + + operations_->record_target(id_, record_id); + + DBUG_VOID_RETURN; + } +} diff --git a/storage/mroonga/lib/mrn_operation.hpp b/storage/mroonga/lib/mrn_operation.hpp new file mode 100644 index 0000000000000000000000000000000000000000..899c92e950863904fd7d017013ea4118d83cbdcc --- /dev/null +++ b/storage/mroonga/lib/mrn_operation.hpp @@ -0,0 +1,42 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_OPERATION_HPP_ +#define MRN_OPERATION_HPP_ + +#include + +namespace mrn { + class Operation { + public: + Operation(mrn::Operations *operations, + const char *type, + const char *table_name, + size_t table_name_size); + ~Operation(); + + void record_target(grn_id record_id); + + private: + mrn::Operations *operations_; + grn_id id_; + }; +} + +#endif /* MRN_OPERATION_HPP_ */ diff --git a/storage/mroonga/lib/mrn_operations.cpp b/storage/mroonga/lib/mrn_operations.cpp new file mode 100644 index 0000000000000000000000000000000000000000..572907cdc5536be19d9ad96ad5f7428825cb6d70 --- /dev/null +++ b/storage/mroonga/lib/mrn_operations.cpp @@ -0,0 +1,401 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +#include + +#include "mrn_operations.hpp" + +// for debug +#define MRN_CLASS_NAME "mrn::Operations" + +#define TABLE_NAME "mroonga_operations" +#define COLUMN_TYPE_NAME "type" +#define COLUMN_TABLE_NAME "table" +#define COLUMN_RECORD_NAME "record" + +namespace mrn { + Operations::Operations(grn_ctx *ctx) + : ctx_(ctx) { + MRN_DBUG_ENTER_METHOD(); + + GRN_TEXT_INIT(&text_buffer_, GRN_OBJ_DO_SHALLOW_COPY); + GRN_UINT32_INIT(&id_buffer_, 0); + + table_ = grn_ctx_get(ctx_, TABLE_NAME, -1); + if (!table_) { + table_ = grn_table_create(ctx_, + TABLE_NAME, strlen(TABLE_NAME), + NULL, + GRN_OBJ_TABLE_NO_KEY | GRN_OBJ_PERSISTENT, + NULL, NULL); + columns_.type_ = + grn_column_create(ctx_, table_, + COLUMN_TYPE_NAME, strlen(COLUMN_TYPE_NAME), + NULL, + GRN_OBJ_COLUMN_SCALAR | GRN_OBJ_PERSISTENT, + grn_ctx_at(ctx_, GRN_DB_SHORT_TEXT)); + columns_.table_ = + grn_column_create(ctx_, table_, + COLUMN_TABLE_NAME, strlen(COLUMN_TABLE_NAME), + NULL, + GRN_OBJ_COLUMN_SCALAR | GRN_OBJ_PERSISTENT, + grn_ctx_at(ctx_, GRN_DB_SHORT_TEXT)); + columns_.record_ = + grn_column_create(ctx_, table_, + COLUMN_RECORD_NAME, strlen(COLUMN_RECORD_NAME), + NULL, + GRN_OBJ_COLUMN_SCALAR | GRN_OBJ_PERSISTENT, + grn_ctx_at(ctx_, GRN_DB_UINT32)); + } else { + columns_.type_ = grn_ctx_get(ctx_, TABLE_NAME "." COLUMN_TYPE_NAME, -1); + columns_.table_ = grn_ctx_get(ctx_, TABLE_NAME "." COLUMN_TABLE_NAME, -1); + columns_.record_ = grn_ctx_get(ctx_, TABLE_NAME "." COLUMN_RECORD_NAME, -1); + } + + is_enabled_recording_ = true; + + DBUG_VOID_RETURN; + } + + Operations::~Operations() { + MRN_DBUG_ENTER_METHOD(); + + GRN_OBJ_FIN(ctx_, &id_buffer_); + GRN_OBJ_FIN(ctx_, &text_buffer_); + + DBUG_VOID_RETURN; + } + + bool Operations::is_locked() { + MRN_DBUG_ENTER_METHOD(); + + if (grn_obj_is_locked(ctx_, table_) > 0) + DBUG_RETURN(true); + + if (grn_obj_is_locked(ctx_, columns_.type_) > 0) + DBUG_RETURN(true); + + if (grn_obj_is_locked(ctx_, columns_.table_) > 0) + DBUG_RETURN(true); + + if (grn_obj_is_locked(ctx_, columns_.record_) > 0) + DBUG_RETURN(true); + + DBUG_RETURN(false); + } + + grn_id Operations::start(const char *type, + const char *table_name, size_t table_name_size) { + MRN_DBUG_ENTER_METHOD(); + + if (!is_enabled_recording_) { + DBUG_RETURN(GRN_ID_NIL); + } + + grn_id id = grn_table_add(ctx_, table_, NULL, 0, NULL); + + GRN_TEXT_SETS(ctx_, &text_buffer_, type); + grn_obj_set_value(ctx_, columns_.type_, id, &text_buffer_, GRN_OBJ_SET); + + GRN_TEXT_SET(ctx_, &text_buffer_, table_name, table_name_size); + grn_obj_set_value(ctx_, columns_.table_, id, &text_buffer_, GRN_OBJ_SET); + + DBUG_RETURN(id); + } + + void Operations::record_target(grn_id id, grn_id record_id) { + MRN_DBUG_ENTER_METHOD(); + + if (!is_enabled_recording_) { + DBUG_VOID_RETURN; + } + + GRN_UINT32_SET(ctx_, &id_buffer_, record_id); + grn_obj_set_value(ctx_, columns_.record_, id, &id_buffer_, GRN_OBJ_SET); + + DBUG_VOID_RETURN; + } + + void Operations::finish(grn_id id) { + MRN_DBUG_ENTER_METHOD(); + + if (!is_enabled_recording_) { + DBUG_VOID_RETURN; + } + + grn_table_delete_by_id(ctx_, table_, id); + + DBUG_VOID_RETURN; + } + + void Operations::enable_recording() { + MRN_DBUG_ENTER_METHOD(); + + is_enabled_recording_ = true; + + DBUG_VOID_RETURN; + } + + void Operations::disable_recording() { + MRN_DBUG_ENTER_METHOD(); + + is_enabled_recording_ = false; + + DBUG_VOID_RETURN; + } + + grn_hash *Operations::collect_processing_table_names() { + MRN_DBUG_ENTER_METHOD(); + + grn_hash *table_names = + grn_hash_create(ctx_, NULL, GRN_TABLE_MAX_KEY_SIZE, 0, + GRN_OBJ_TABLE_HASH_KEY | GRN_OBJ_KEY_VAR_SIZE); + + grn_table_cursor *cursor; + cursor = grn_table_cursor_open(ctx_, table_, NULL, 0, NULL, 0, 0, -1, 0); + if (!cursor) { + GRN_LOG(ctx_, GRN_LOG_NOTICE, + "[operations] failed to open cursor: %s", + ctx_->errbuf); + DBUG_RETURN(table_names); + } + + grn_id id; + while ((id = grn_table_cursor_next(ctx_, cursor))) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.table_, id, &text_buffer_); + if (GRN_TEXT_LEN(&text_buffer_) > 0) { + grn_hash_add(ctx_, table_names, + GRN_TEXT_VALUE(&text_buffer_), + GRN_TEXT_LEN(&text_buffer_), + NULL, + NULL); + } + } + grn_table_cursor_close(ctx_, cursor); + + DBUG_RETURN(table_names); + } + + int Operations::repair(const char *table_name, size_t table_name_size) { + MRN_DBUG_ENTER_METHOD(); + + int error = 0; + + grn_table_cursor *cursor; + cursor = grn_table_cursor_open(ctx_, table_, NULL, 0, NULL, 0, 0, -1, 0); + if (!cursor) { + error = HA_ERR_CRASHED_ON_USAGE; + if (ctx_->rc) { + my_message(error, ctx_->errbuf, MYF(0)); + } else { + my_message(error, + "mroonga: repair: " + "failed to open cursor for operations table", + MYF(0)); + } + DBUG_RETURN(error); + } + + grn_obj *target_table = grn_ctx_get(ctx_, table_name, table_name_size); + if (!target_table) { + GRN_LOG(ctx_, GRN_LOG_WARNING, + "table doesn't exist for auto repair: <%.*s>", + static_cast(table_name_size), table_name); + } + + grn_id id; + while ((id = grn_table_cursor_next(ctx_, cursor))) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.table_, id, &text_buffer_); + if (!((static_cast(GRN_TEXT_LEN(&text_buffer_)) == + table_name_size) && + memcmp(GRN_TEXT_VALUE(&text_buffer_), + table_name, + table_name_size) == 0)) { + continue; + } + + if (!target_table) { + grn_rc rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: failed to delete an orphan operation: " + "[%u]: <%.*s>[%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + continue; + } + + GRN_BULK_REWIND(&id_buffer_); + grn_obj_get_value(ctx_, columns_.record_, id, &id_buffer_); + grn_id record_id = GRN_UINT32_VALUE(&id_buffer_); + if (record_id == GRN_ID_NIL) { + grn_rc rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: " + "failed to delete an operation that has no related record: " + "[%u]: <%.*s>[%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + continue; + } + + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + if (strcmp(GRN_TEXT_VALUE(&text_buffer_), "write") == 0 || + strcmp(GRN_TEXT_VALUE(&text_buffer_), "delete") == 0) { + grn_rc rc = grn_table_delete_by_id(ctx_, target_table, record_id); + if (rc != GRN_SUCCESS) { + error = HA_ERR_CRASHED_ON_USAGE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: failed to delete an incomplete record: " + "[%u]: <%.*s>[%u]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + record_id, + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + + rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + error = HA_ERR_CRASHED_ON_USAGE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: failed to delete an incomplete operation: " + "[%u]: <%.*s>[%u][%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + record_id, + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + } else if (strcmp(GRN_TEXT_VALUE(&text_buffer_), "update") == 0) { + error = HA_ERR_CRASHED_ON_USAGE; + my_message(error, + "mroonga: repair: can't recover from crash while updating", + MYF(0)); + break; + } else { + error = HA_ERR_CRASHED_ON_USAGE; + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: repair: unknown operation type: " + "[%u]: <%.*s>[%u]: <%s>", + id, + static_cast(table_name_size), table_name, + record_id, + GRN_TEXT_VALUE(&text_buffer_)); + my_message(error, error_message, MYF(0)); + break; + } + } + grn_table_cursor_close(ctx_, cursor); + + DBUG_RETURN(error); + } + + int Operations::clear(const char *table_name, size_t table_name_size) { + MRN_DBUG_ENTER_METHOD(); + + int error = 0; + + grn_table_cursor *cursor; + cursor = grn_table_cursor_open(ctx_, table_, NULL, 0, NULL, 0, 0, -1, 0); + if (!cursor) { + error = HA_ERR_CRASHED_ON_USAGE; + if (ctx_->rc) { + my_message(error, ctx_->errbuf, MYF(0)); + } else { + my_message(error, + "mroonga: clear: " + "failed to open cursor for operations table", + MYF(0)); + } + DBUG_RETURN(error); + } + + grn_id id; + while ((id = grn_table_cursor_next(ctx_, cursor))) { + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.table_, id, &text_buffer_); + if ((static_cast(GRN_TEXT_LEN(&text_buffer_)) == + table_name_size) && + memcmp(GRN_TEXT_VALUE(&text_buffer_), + table_name, + table_name_size) == 0) { + grn_rc rc = grn_table_cursor_delete(ctx_, cursor); + if (rc != GRN_SUCCESS) { + error = HA_ERR_CRASHED_ON_USAGE; + GRN_BULK_REWIND(&id_buffer_); + grn_obj_get_value(ctx_, columns_.record_, id, &id_buffer_); + GRN_BULK_REWIND(&text_buffer_); + grn_obj_get_value(ctx_, columns_.type_, id, &text_buffer_); + GRN_TEXT_PUTC(ctx_, &text_buffer_, '\0'); + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "mroonga: clear: failed to delete an operation: " + "[%u]: <%.*s>[%u][%s]: <%s>(%d)", + id, + static_cast(table_name_size), table_name, + GRN_UINT32_VALUE(&id_buffer_), + GRN_TEXT_VALUE(&text_buffer_), + ctx_->errbuf, + rc); + my_message(error, error_message, MYF(0)); + break; + } + } + } + grn_table_cursor_close(ctx_, cursor); + + DBUG_RETURN(error); + } +} diff --git a/storage/mroonga/lib/mrn_operations.hpp b/storage/mroonga/lib/mrn_operations.hpp new file mode 100644 index 0000000000000000000000000000000000000000..762a5ee9d434c78bfd54d3ccb365a1bb53d94bf9 --- /dev/null +++ b/storage/mroonga/lib/mrn_operations.hpp @@ -0,0 +1,60 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2015 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef MRN_OPERATIONS_HPP_ +#define MRN_OPERATIONS_HPP_ + +#include + +namespace mrn { + class Operations { + public: + Operations(grn_ctx *ctx); + ~Operations(); + + bool is_locked(); + + grn_id start(const char *type, + const char *table_name, size_t table_name_size); + void record_target(grn_id id, grn_id target_id); + void finish(grn_id id); + + void enable_recording(); + void disable_recording(); + + grn_hash *collect_processing_table_names(); + + int repair(const char *table_name, size_t table_name_size); + int clear(const char *table_name, size_t table_name_size); + + private: + grn_ctx *ctx_; + grn_obj text_buffer_; + grn_obj id_buffer_; + grn_obj *table_; + struct { + grn_obj *type_; + grn_obj *table_; + grn_obj *record_; + } columns_; + bool is_enabled_recording_; + }; +} + +#endif /* MRN_OPERATIONS_HPP_ */ diff --git a/storage/mroonga/lib/mrn_path_mapper.cpp b/storage/mroonga/lib/mrn_path_mapper.cpp index 7a595986f01a5878a4dc8daaa2e6fe2b4376c00e..43f276f4e82a0d556f81f703fc74018f5a0e19d3 100644 --- a/storage/mroonga/lib/mrn_path_mapper.cpp +++ b/storage/mroonga/lib/mrn_path_mapper.cpp @@ -222,4 +222,8 @@ namespace mrn { mysql_path_[i] = '\0'; return mysql_path_; } + + bool PathMapper::is_internal_table_name() { + return mysql_table_name()[0] == '#'; + } } diff --git a/storage/mroonga/lib/mrn_path_mapper.hpp b/storage/mroonga/lib/mrn_path_mapper.hpp index 607bfe4cdce4c89cba1f4fb7388d3dfcc3100317..9849d5e28efeb860f90fd976d17cce9aeff5ccfa 100644 --- a/storage/mroonga/lib/mrn_path_mapper.hpp +++ b/storage/mroonga/lib/mrn_path_mapper.hpp @@ -38,6 +38,8 @@ namespace mrn { const char *table_name(); const char *mysql_table_name(); const char *mysql_path(); + bool is_internal_table_name(); + bool is_temporary_table_name(); private: const char *original_mysql_path_; const char *path_prefix_; diff --git a/storage/mroonga/lib/mrn_query_parser.cpp b/storage/mroonga/lib/mrn_query_parser.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4e05069a3a9ecc7b74539490b6f4bba316bb9b16 --- /dev/null +++ b/storage/mroonga/lib/mrn_query_parser.cpp @@ -0,0 +1,361 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "mrn_query_parser.hpp" + +#include + +extern "C" { + /* Groonga's internal functions */ + int grn_atoi(const char *nptr, const char *end, const char **rest); + uint grn_atoui(const char *nptr, const char *end, const char **rest); +} + +#define MRN_CLASS_NAME "mrn::QueryParser" + +namespace mrn { + QueryParser::QueryParser(grn_ctx *ctx, + THD *thd, + grn_obj *expression, + grn_obj *default_column, + uint n_sections, + grn_obj *match_columns) + : ctx_(ctx), + thd_(thd), + expression_(expression), + default_column_(default_column), + n_sections_(n_sections), + match_columns_(match_columns) { + } + + QueryParser::~QueryParser() { + } + + grn_rc QueryParser::parse(const char *query, size_t query_length) { + MRN_DBUG_ENTER_METHOD(); + + const char *raw_query = NULL; + size_t raw_query_length = 0; + grn_operator default_operator = GRN_OP_OR; + grn_expr_flags expression_flags = 0; + parse_pragma(query, + query_length, + &raw_query, + &raw_query_length, + &default_operator, + &expression_flags); + + grn_obj *default_column = default_column_; + if (match_columns_) { + default_column = match_columns_; + } + grn_rc rc = grn_expr_parse(ctx_, + expression_, + raw_query, + raw_query_length, + default_column, + GRN_OP_MATCH, + default_operator, + expression_flags); + if (rc != GRN_SUCCESS) { + char error_message[MRN_MESSAGE_BUFFER_SIZE]; + snprintf(error_message, MRN_MESSAGE_BUFFER_SIZE, + "failed to parse fulltext search keyword: <%.*s>: <%s>", + static_cast(query_length), + query, + ctx_->errbuf); + variables::ActionOnError action = + variables::get_action_on_fulltext_query_error(thd_); + switch (action) { + case variables::ACTION_ON_ERROR_ERROR: + my_message(ER_PARSE_ERROR, error_message, MYF(0)); + break; + case variables::ACTION_ON_ERROR_ERROR_AND_LOG: + my_message(ER_PARSE_ERROR, error_message, MYF(0)); + GRN_LOG(ctx_, GRN_LOG_ERROR, "%s", error_message); + break; + case variables::ACTION_ON_ERROR_IGNORE: + break; + case variables::ACTION_ON_ERROR_IGNORE_AND_LOG: + GRN_LOG(ctx_, GRN_LOG_ERROR, "%s", error_message); + break; + } + } + + DBUG_RETURN(rc); + } + + void QueryParser::parse_pragma(const char *query, + size_t query_length, + const char **raw_query, + size_t *raw_query_length, + grn_operator *default_operator, + grn_expr_flags *flags) { + MRN_DBUG_ENTER_METHOD(); + + const char *current_query = query; + size_t current_query_length = query_length; + + *default_operator = GRN_OP_OR; + + if (current_query_length >= 4 && memcmp(current_query, "*SS ", 4) == 0) { + *raw_query = current_query + 4; + *raw_query_length = current_query_length - 4; + *flags = GRN_EXPR_SYNTAX_SCRIPT; + DBUG_VOID_RETURN; + } + + bool weight_specified = false; + *raw_query = query; + *raw_query_length = query_length; + *flags = default_expression_flags(); + if (current_query_length >= 2 && current_query[0] == '*') { + bool parsed = false; + bool done = false; + current_query++; + current_query_length--; + while (!done) { + size_t consumed_query_length = 0; + switch (current_query[0]) { + case 'D': + if (parse_pragma_d(current_query + 1, + current_query_length - 1, + default_operator, + &consumed_query_length)) { + parsed = true; + consumed_query_length += 1; + current_query += consumed_query_length; + current_query_length -= consumed_query_length; + } else { + done = true; + } + break; + case 'W': + if (parse_pragma_w(current_query + 1, + current_query_length - 1, + &consumed_query_length)) { + parsed = true; + weight_specified = true; + consumed_query_length += 1; + current_query += consumed_query_length; + current_query_length -= consumed_query_length; + } else { + done = true; + } + break; + default: + done = true; + break; + } + } + if (parsed) { + *raw_query = current_query; + *raw_query_length = current_query_length; + } + } + + // WORKAROUND: ignore the first '+' to support "+apple macintosh" pattern. + while (*raw_query_length > 0 && (*raw_query)[0] == ' ') { + (*raw_query)++; + (*raw_query_length)--; + } + if (*raw_query_length > 0 && (*raw_query)[0] == '+') { + (*raw_query)++; + (*raw_query_length)--; + } + if (!weight_specified && match_columns_) { + grn_expr_append_obj(ctx_, match_columns_, default_column_, GRN_OP_PUSH, 1); + } + + DBUG_VOID_RETURN; + } + + bool QueryParser::parse_pragma_w(const char *query, + size_t query_length, + size_t *consumed_query_length) { + MRN_DBUG_ENTER_METHOD(); + + *consumed_query_length = 0; + + grn_obj section_value_buffer; + GRN_UINT32_INIT(§ion_value_buffer, 0); + + MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(bool, specified_sections, n_sections_); + for (uint i = 0; i < n_sections_; ++i) { + specified_sections[i] = false; + } + + uint n_weights = 0; + while (query_length >= 1) { + if (n_weights >= 1) { + if (query[0] != ',') { + break; + } + size_t n_used_query_length = 1; + *consumed_query_length += n_used_query_length; + query_length -= n_used_query_length; + query += n_used_query_length; + if (query_length == 0) { + break; + } + } + + uint section = 0; + if ('1' <= query[0] && query[0] <= '9') { + const char *section_start = query; + const char *query_end = query + query_length; + const char *query_rest; + section = grn_atoui(section_start, query_end, &query_rest); + if (section_start == query_rest) { + break; + } + if (!(0 < section && section <= n_sections_)) { + break; + } + section -= 1; + specified_sections[section] = true; + size_t n_used_query_length = query_rest - query; + *consumed_query_length += n_used_query_length; + query_length -= n_used_query_length; + query += n_used_query_length; + } else { + break; + } + + int weight = 1; + if (query_length >= 2 && query[0] == ':') { + const char *weight_start = query + 1; + const char *query_end = query + query_length; + const char *query_rest; + weight = grn_atoi(weight_start, query_end, &query_rest); + if (weight_start == query_rest) { + break; + } + size_t n_used_query_length = query_rest - query; + *consumed_query_length += n_used_query_length; + query_length -= n_used_query_length; + query += n_used_query_length; + } + + n_weights++; + + append_section(section, + §ion_value_buffer, + weight, + n_weights); + } + + for (uint section = 0; section < n_sections_; ++section) { + if (specified_sections[section]) { + continue; + } + + ++n_weights; + + int default_weight = 1; + append_section(section, + §ion_value_buffer, + default_weight, + n_weights); + } + MRN_FREE_VARIABLE_LENGTH_ARRAYS(specified_sections); + + GRN_OBJ_FIN(ctx_, §ion_value_buffer); + + DBUG_RETURN(n_weights > 0); + } + + void QueryParser::append_section(uint section, + grn_obj *section_value_buffer, + int weight, + uint n_weights) { + MRN_DBUG_ENTER_METHOD(); + + if (!match_columns_) { + DBUG_VOID_RETURN; + } + + grn_expr_append_obj(ctx_, match_columns_, default_column_, GRN_OP_PUSH, 1); + GRN_UINT32_SET(ctx_, section_value_buffer, section); + grn_expr_append_const(ctx_, match_columns_, section_value_buffer, + GRN_OP_PUSH, 1); + grn_expr_append_op(ctx_, match_columns_, GRN_OP_GET_MEMBER, 2); + + if (weight != 1) { + grn_expr_append_const_int(ctx_, match_columns_, weight, GRN_OP_PUSH, 1); + grn_expr_append_op(ctx_, match_columns_, GRN_OP_STAR, 2); + } + + if (n_weights >= 2) { + grn_expr_append_op(ctx_, match_columns_, GRN_OP_OR, 2); + } + + DBUG_VOID_RETURN; + } + + bool QueryParser::parse_pragma_d(const char *query, + size_t query_length, + grn_operator *default_operator, + size_t *consumed_query_length) { + MRN_DBUG_ENTER_METHOD(); + + bool succeeded = true; + if (query_length >= 1 && query[0] == '+') { + *default_operator = GRN_OP_AND; + *consumed_query_length = 1; + } else if (query_length >= 1 && query[0] == '-') { + *default_operator = GRN_OP_AND_NOT; + *consumed_query_length = 1; + } else if (query_length >= 2 && memcmp(query, "OR", 2) == 0) { + *default_operator = GRN_OP_OR; + *consumed_query_length = 2; + } else { + succeeded = false; + } + + DBUG_RETURN(succeeded); + } + + grn_expr_flags QueryParser::default_expression_flags() { + MRN_DBUG_ENTER_METHOD(); + + ulonglong syntax_flags = variables::get_boolean_mode_syntax_flags(thd_); + grn_expr_flags expression_flags = 0; + if (syntax_flags == variables::BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT) { + expression_flags = GRN_EXPR_SYNTAX_QUERY | GRN_EXPR_ALLOW_LEADING_NOT; + } else { + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT) { + expression_flags |= GRN_EXPR_SYNTAX_SCRIPT; + } else { + expression_flags |= GRN_EXPR_SYNTAX_QUERY; + } + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN) { + expression_flags |= GRN_EXPR_ALLOW_COLUMN; + } + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE) { + expression_flags |= GRN_EXPR_ALLOW_UPDATE; + } + if (syntax_flags & variables::BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT) { + expression_flags |= GRN_EXPR_ALLOW_LEADING_NOT; + } + } + + DBUG_RETURN(expression_flags); + } +} diff --git a/storage/mroonga/lib/mrn_query_parser.hpp b/storage/mroonga/lib/mrn_query_parser.hpp new file mode 100644 index 0000000000000000000000000000000000000000..8b3c4084c8d0bd2e7763a26fa2799995ae937e09 --- /dev/null +++ b/storage/mroonga/lib/mrn_query_parser.hpp @@ -0,0 +1,67 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include + +#include + +namespace mrn { + class QueryParser { + public: + QueryParser(grn_ctx *ctx, + THD *thd, + grn_obj *expression, + grn_obj *default_column, + uint n_sections, + grn_obj *match_columns=NULL); + ~QueryParser(); + + grn_rc parse(const char *query, size_t query_length); + void parse_pragma(const char *query, + size_t query_length, + const char **raw_query, + size_t *raw_query_length, + grn_operator *default_operator, + grn_expr_flags *flags); + + private: + grn_ctx *ctx_; + THD *thd_; + grn_obj *expression_; + grn_obj *default_column_; + uint n_sections_; + grn_obj *match_columns_; + + bool parse_pragma_w(const char *query, + size_t query_length, + size_t *consumed_query_length); + void append_section(uint section, + grn_obj *section_value_buffer, + int weight, + uint n_weights); + bool parse_pragma_d(const char *query, + size_t query_length, + grn_operator *default_operator, + size_t *consumed_query_length); + grn_expr_flags default_expression_flags(); + }; +} diff --git a/storage/mroonga/lib/mrn_smart_bitmap.cpp b/storage/mroonga/lib/mrn_smart_bitmap.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9dc91ff29d5e51ac76be578029c6c07193f0a95e --- /dev/null +++ b/storage/mroonga/lib/mrn_smart_bitmap.cpp @@ -0,0 +1,42 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "mrn_smart_bitmap.hpp" + +namespace mrn { + SmartBitmap::SmartBitmap(MY_BITMAP *bitmap) + : bitmap_(bitmap) { + } + + SmartBitmap::~SmartBitmap() { + if (bitmap_) { + bitmap_free(bitmap_); + } + } + + MY_BITMAP *SmartBitmap::get() { + return bitmap_; + } + + MY_BITMAP *SmartBitmap::release() { + MY_BITMAP *bitmap = bitmap_; + bitmap_ = NULL; + return bitmap; + } +} diff --git a/storage/mroonga/lib/mrn_smart_bitmap.hpp b/storage/mroonga/lib/mrn_smart_bitmap.hpp new file mode 100644 index 0000000000000000000000000000000000000000..dfb569560242f380973ea258e2a8e48f13313a37 --- /dev/null +++ b/storage/mroonga/lib/mrn_smart_bitmap.hpp @@ -0,0 +1,36 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include +#include + +namespace mrn { + class SmartBitmap { + public: + SmartBitmap(MY_BITMAP *bitmap); + ~SmartBitmap(); + + MY_BITMAP *get(); + MY_BITMAP *release(); + private: + MY_BITMAP *bitmap_; + }; +} diff --git a/storage/mroonga/lib/mrn_table_fields_offset_mover.cpp b/storage/mroonga/lib/mrn_table_fields_offset_mover.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f1dae266c7e40d4ec67939c6f1fe1d6f7df1906 --- /dev/null +++ b/storage/mroonga/lib/mrn_table_fields_offset_mover.cpp @@ -0,0 +1,41 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "mrn_table_fields_offset_mover.hpp" + +namespace mrn { + TableFieldsOffsetMover::TableFieldsOffsetMover(TABLE *table, + my_ptrdiff_t diff) + : table_(table), + diff_(diff) { + uint n_columns = table_->s->fields; + for (uint i = 0; i < n_columns; ++i) { + Field *field = table_->field[i]; + field->move_field_offset(diff_); + } + } + + TableFieldsOffsetMover::~TableFieldsOffsetMover() { + uint n_columns = table_->s->fields; + for (uint i = 0; i < n_columns; ++i) { + Field *field = table_->field[i]; + field->move_field_offset(-diff_); + } + } +} diff --git a/storage/mroonga/lib/mrn_table_fields_offset_mover.hpp b/storage/mroonga/lib/mrn_table_fields_offset_mover.hpp new file mode 100644 index 0000000000000000000000000000000000000000..a8d12be19eddff56497f859bfefded458862976c --- /dev/null +++ b/storage/mroonga/lib/mrn_table_fields_offset_mover.hpp @@ -0,0 +1,33 @@ +/* -*- c-basic-offset: 2 -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#include + +namespace mrn { + class TableFieldsOffsetMover { + public: + TableFieldsOffsetMover(TABLE *table, my_ptrdiff_t diff); + ~TableFieldsOffsetMover(); + private: + TABLE *table_; + my_ptrdiff_t diff_; + }; +} diff --git a/storage/mroonga/mrn_err.h b/storage/mroonga/mrn_err.h index d109f87bb48903ae4425e3d3d7599a388b446c6e..95b1b047c7963cce2c88790b1f183222721ca3bc 100644 --- a/storage/mroonga/mrn_err.h +++ b/storage/mroonga/mrn_err.h @@ -39,5 +39,8 @@ #define ER_MRN_INVALID_INDEX_FLAG_NUM 16508 #define ER_MRN_INVALID_INDEX_FLAG_STR \ "The index flag '%-.64s' is invalid. It is ignored" +#define ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_NUM 16509 +#define ER_MRN_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN_STR \ + "Index for virtual generated column is not supported: %s" #endif /* MRN_ERR_H_ */ diff --git a/storage/mroonga/mrn_mysql.h b/storage/mroonga/mrn_mysql.h index 644825dcf3904f86caaa2290d4c44d5d22db6aca..086d1ea2e3fe4712f08c96c885350ed63cc35db0 100644 --- a/storage/mroonga/mrn_mysql.h +++ b/storage/mroonga/mrn_mysql.h @@ -43,21 +43,18 @@ #define MYSQL_SERVER 1 #include -#if MYSQL_VERSION_ID < 50500 -# include -# include -#else -# include -# include -# include -# include -#endif -#include - #ifdef MARIADB_BASE_VERSION # define MRN_MARIADB_P 1 #endif +#include +#include +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID < 80002) +# include +#endif +#include +#include + #define MRN_MESSAGE_BUFFER_SIZE 1024 #define MRN_DBUG_ENTER_FUNCTION() DBUG_ENTER(__FUNCTION__) diff --git a/storage/mroonga/mrn_mysql_compat.h b/storage/mroonga/mrn_mysql_compat.h index 660c72b4d256c3449bd3a309b4b9e03065eec9af..d33a8c88d879bcdfb5092058c212c96cb6398e47 100644 --- a/storage/mroonga/mrn_mysql_compat.h +++ b/storage/mroonga/mrn_mysql_compat.h @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2011-2015 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,10 @@ # define MRN_HAVE_MYSQL_TYPE_TIME2 #endif +#if MYSQL_VERSION_ID >= 50709 && !defined(MRN_MARIADB_P) +# define MRN_HAVE_MYSQL_TYPE_JSON +#endif + #if MYSQL_VERSION_ID < 50603 typedef MYSQL_ERROR Sql_condition; #endif @@ -42,6 +46,10 @@ typedef char *range_id_t; #endif +#if defined(MRN_MARIADB_P) || MYSQL_VERSION_ID < 80002 + typedef st_select_lex SELECT_LEX; +#endif + #if MYSQL_VERSION_ID >= 50609 # define MRN_KEY_HAS_USER_DEFINED_KEYPARTS #endif @@ -99,6 +107,9 @@ #if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100009 # define MRN_HAVE_TDC_ACQUIRE_SHARE +# if MYSQL_VERSION_ID < 100200 +# define MRN_TDC_ACQUIRE_SHARE_REQUIRE_KEY +# endif #endif #if MYSQL_VERSION_ID >= 50613 @@ -206,6 +217,26 @@ # define MRN_SUPPORT_CUSTOM_OPTIONS #endif +#ifdef MRN_MARIADB_P +# define MRN_HAVE_ITEM_EQUAL_FIELDS_ITERATOR +#endif + +#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) +# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ + ((select_lex)->where_cond()) +# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ + ((select_lex)->having_cond()) +# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ + ((select_lex)->active_options()) +#else +# define MRN_SELECT_LEX_GET_WHERE_COND(select_lex) \ + ((select_lex)->where) +# define MRN_SELECT_LEX_GET_HAVING_COND(select_lex) \ + ((select_lex)->having) +# define MRN_SELECT_LEX_GET_ACTIVE_OPTIONS(select_lex) \ + ((select_lex)->options) +#endif + #if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100000 # if MYSQL_VERSION_ID >= 100104 # define mrn_init_sql_alloc(thd, mem_root) \ @@ -221,17 +252,25 @@ MYF(0)) # endif #else +# if MYSQL_VERSION_ID >= 50709 +# define mrn_init_sql_alloc(thd, mem_root) \ + init_sql_alloc(mrn_memory_key, \ + mem_root, \ + TABLE_ALLOC_BLOCK_SIZE, \ + 0) +# else # define mrn_init_sql_alloc(thd, mem_root) \ init_sql_alloc(mem_root, \ TABLE_ALLOC_BLOCK_SIZE, \ 0) +# endif #endif #ifdef MRN_MARIADB_P # define MRN_ABORT_ON_WARNING(thd) thd->abort_on_warning #else # if MYSQL_VERSION_ID >= 50706 -# define MRN_ABORT_ON_WARNING(thd) false +# define MRN_ABORT_ON_WARNING(thd) thd->is_strict_mode() # else # define MRN_ABORT_ON_WARNING(thd) thd->abort_on_warning # endif @@ -240,4 +279,204 @@ #define MRN_ERROR_CODE_DATA_TRUNCATE(thd) \ (MRN_ABORT_ON_WARNING(thd) ? ER_WARN_DATA_OUT_OF_RANGE : WARN_DATA_TRUNCATED) +#if MYSQL_VERSION_ID >= 50709 && !defined(MRN_MARIADB_P) +# define mrn_my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags) \ + my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags, \ + mrn_memory_key) +#else +# define mrn_my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags) \ + my_hash_init(hash, \ + charset, \ + default_array_elements, \ + key_offset, \ + key_length, \ + get_key, \ + free_element, \ + flags) +#endif + +#if defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100000 +# define mrn_strconvert(from_cs, \ + from, \ + from_length, \ + to_cs, \ + to, \ + to_length, \ + errors) \ + strconvert((from_cs), \ + (from), \ + (from_length), \ + (to_cs), \ + (to), \ + (to_length), \ + (errors)) +#else +# define mrn_strconvert(from_cs, \ + from, \ + from_length, \ + to_cs, \ + to, \ + to_length, \ + errors) \ + strconvert((from_cs), \ + (from), \ + (to_cs), \ + (to), \ + (to_length), \ + (errors)) +#endif + +#if MYSQL_VERSION_ID >= 50717 && !defined(MRN_MARIADB_P) +# define mrn_is_directory_separator(c) \ + is_directory_separator((c)) +#else +# define mrn_is_directory_separator(c) \ + (c == FN_LIBCHAR || c == FN_LIBCHAR2) +#endif + +#if ((MYSQL_VERSION_ID < 50636) || \ + (MYSQL_VERSION_ID >= 50700 && MYSQL_VERSION_ID < 50718)) && !defined(MRN_MARIADB_P) +# define MRN_HAVE_MYSQL_FIELD_PART_OF_KEY_NOT_CLUSTERED +#endif + +#if defined(MRN_MARIADB_P) && \ + ((MYSQL_VERSION_ID >= 100207) || \ + ((MYSQL_VERSION_ID >= 100126) && (MYSQL_VERSION_ID < 100200)) || \ + ((MYSQL_VERSION_ID >= 100032) && (MYSQL_VERSION_ID < 100100)) || \ + ((MYSQL_VERSION_ID >= 50557) && (MYSQL_VERSION_ID < 100000))) +# define mrn_create_partition_name(out, \ + out_length, \ + in1, \ + in2, \ + name_variant, \ + translate) \ + create_partition_name(out, out_length, in1, in2, name_variant, translate) +# define mrn_create_subpartition_name(out, \ + out_length, \ + in1, \ + in2, \ + in3, \ + name_variant) \ + create_subpartition_name(out, out_length, in1, in2, in3, name_variant) +#else +# define mrn_create_partition_name(out, \ + out_length, \ + in1, \ + in2, \ + name_variant, \ + translate) \ + (create_partition_name(out, in1, in2, name_variant, translate), 0) +# define mrn_create_subpartition_name(out, \ + out_length, \ + in1, \ + in2, \ + in3, \ + name_variant) \ + (create_subpartition_name(out, in1, in2, in3, name_variant), 0) +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) +# define ITEM_SUM_GET_NEST_LEVEL(sum_item) (sum_item)->base_select->nest_level +# define ITEM_SUM_GET_AGGR_LEVEL(sum_item) (sum_item)->aggr_select->nest_level +# define ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) (sum_item)->max_aggr_level +#else +# define ITEM_SUM_GET_NEST_LEVEL(sum_item) (sum_item)->nest_level +# define ITEM_SUM_GET_AGGR_LEVEL(sum_item) (sum_item)->aggr_level +# define ITEM_SUM_GET_MAX_AGGR_LEVEL(sum_item) (sum_item)->max_arg_level +#endif + +#if (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 80002) + typedef bool mrn_bool; +#else + typedef my_bool mrn_bool; +#endif + +#define MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(type, variable_name, variable_size) \ + type *variable_name = \ + (type *)mrn_my_malloc(sizeof(type) * (variable_size), MYF(MY_WME)) +#define MRN_FREE_VARIABLE_LENGTH_ARRAYS(variable_name) \ + my_free(variable_name) + +#if ((defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 100203)) || \ + (!defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50711) +# define MRN_ALTER_INPLACE_INFO_ADD_VIRTUAL_COLUMN \ + Alter_inplace_info::ADD_VIRTUAL_COLUMN +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_BASE_COLUMN \ + Alter_inplace_info::ADD_STORED_BASE_COLUMN +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_GENERATED_COLUMN \ + Alter_inplace_info::ADD_STORED_GENERATED_COLUMN +#else +# define MRN_ALTER_INPLACE_INFO_ADD_VIRTUAL_COLUMN 0 +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_BASE_COLUMN \ + Alter_inplace_info::ADD_COLUMN +# define MRN_ALTER_INPLACE_INFO_ADD_STORED_GENERATED_COLUMN 0 +#endif + +#if (defined(HA_CAN_VIRTUAL_COLUMNS) || defined(HA_GENERATED_COLUMNS)) +# define MRN_SUPPORT_GENERATED_COLUMNS +#endif + +#ifdef MRN_MARIADB_P +# if (MYSQL_VERSION_ID >= 100200) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (!field->stored_in_db()) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->vcol_info && field->vcol_info->is_stored()) +# elif (MYSQL_VERSION_ID >= 50500) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (!field->stored_in_db) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->vcol_info && field->vcol_info->is_stored()) +# else +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) false +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) false +# endif +#else +# if (MYSQL_VERSION_ID >= 50708) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (field->is_virtual_gcol()) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->is_gcol() && !field->is_virtual_gcol()) +# elif (MYSQL_VERSION_ID >= 50706) +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) \ + (!field->stored_in_db) +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) \ + (field->gcol_info && field->gcol_info->get_field_stored()) +# else +# define MRN_GENERATED_COLUMNS_FIELD_IS_VIRTUAL(field) false +# define MRN_GENERATED_COLUMNS_FIELD_IS_STORED(field) false +# endif +#endif + +#ifdef MRN_MARIADB_P +# if (MYSQL_VERSION_ID >= 100203) +# define MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(table, field) \ + (table->update_virtual_field(field)) +# else +# define MRN_GENERATED_COLUMNS_UPDATE_VIRTUAL_FIELD(table, field) \ + (field->vcol_info->expr_item->save_in_field(field, 0)) +# endif +#endif + #endif /* MRN_MYSQL_COMPAT_H_ */ diff --git a/storage/mroonga/mrn_table.cpp b/storage/mroonga/mrn_table.cpp index 3320fb8ff305e4bbf9a6a075685c57ed6906b2fc..c20f688fa6dc4ba77469fecba7414e3eb65e0ea1 100644 --- a/storage/mroonga/mrn_table.cpp +++ b/storage/mroonga/mrn_table.cpp @@ -1,7 +1,7 @@ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2011-2013 Kentoku SHIBA - Copyright(C) 2011-2015 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -202,7 +202,6 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, const TABLE *table, partition_element **part_elem, partition_element **sub_elem) { - char tmp_name[FN_REFLEN + 1]; partition_info *part_info = table->part_info; partition_element *tmp_part_elem = NULL, *tmp_sub_elem = NULL; bool tmp_flg = FALSE, tmp_find_flg = FALSE; @@ -224,18 +223,24 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, List_iterator sub_it((*part_elem)->subpartitions); while ((*sub_elem = sub_it++)) { - if (create_subpartition_name(tmp_name, sizeof(tmp_name), table->s->path.str, - (*part_elem)->partition_name, (*sub_elem)->partition_name, - NORMAL_PART_NAME)) + char subpartition_name[FN_REFLEN + 1]; + int error = mrn_create_subpartition_name(subpartition_name, + sizeof(subpartition_name), + table->s->path.str, + (*part_elem)->partition_name, + (*sub_elem)->partition_name, + NORMAL_PART_NAME); + if (error != 0) DBUG_VOID_RETURN; - DBUG_PRINT("info", ("mroonga tmp_name=%s", tmp_name)); - if (table_name && !memcmp(table_name, tmp_name, table_name_length + 1)) + DBUG_PRINT("info", ("mroonga subpartition name=%s", subpartition_name)); + if (table_name && + memcmp(table_name, subpartition_name, table_name_length + 1) == 0) DBUG_VOID_RETURN; if ( tmp_flg && table_name && - *(tmp_name + table_name_length - 5) == '\0' && - !memcmp(table_name, tmp_name, table_name_length - 5) + *(subpartition_name + table_name_length - 5) == '\0' && + memcmp(table_name, subpartition_name, table_name_length - 5) == 0 ) { tmp_part_elem = *part_elem; tmp_sub_elem = *sub_elem; @@ -244,17 +249,24 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length, } } } else { - if (create_partition_name(tmp_name, sizeof(tmp_name), table->s->path.str, - (*part_elem)->partition_name, NORMAL_PART_NAME, TRUE)) + char partition_name[FN_REFLEN + 1]; + int error = mrn_create_partition_name(partition_name, + sizeof(partition_name), + table->s->path.str, + (*part_elem)->partition_name, + NORMAL_PART_NAME, + TRUE); + if (error != 0) DBUG_VOID_RETURN; - DBUG_PRINT("info", ("mroonga tmp_name=%s", tmp_name)); - if (table_name && !memcmp(table_name, tmp_name, table_name_length + 1)) + DBUG_PRINT("info", ("mroonga partition name=%s", partition_name)); + if (table_name && + memcmp(table_name, partition_name, table_name_length + 1) == 0) DBUG_VOID_RETURN; if ( tmp_flg && table_name && - *(tmp_name + table_name_length - 5) == '\0' && - !memcmp(table_name, tmp_name, table_name_length - 5) + *(partition_name + table_name_length - 5) == '\0' && + memcmp(table_name, partition_name, table_name_length - 5) == 0 ) { tmp_part_elem = *part_elem; tmp_flg = FALSE; @@ -518,6 +530,7 @@ int mrn_add_index_param(MRN_SHARE *share, KEY *key_info, int i) char *sprit_ptr[2]; char *tmp_ptr, *start_ptr; #endif + THD *thd = current_thd; MRN_DBUG_ENTER_FUNCTION(); #if MYSQL_VERSION_ID >= 50500 @@ -580,6 +593,10 @@ int mrn_add_index_param(MRN_SHARE *share, KEY *key_info, int i) MRN_PARAM_STR_LIST("table", index_table, i); break; case 6: + push_warning_printf(thd, MRN_SEVERITY_WARNING, + ER_WARN_DEPRECATED_SYNTAX, + ER(ER_WARN_DEPRECATED_SYNTAX), + "parser", "tokenizer"); MRN_PARAM_STR_LIST("parser", key_tokenizer, i); break; case 9: @@ -1000,29 +1017,34 @@ int mrn_free_share(MRN_SHARE *share) TABLE_SHARE *mrn_get_table_share(TABLE_LIST *table_list, int *error) { - uint key_length; TABLE_SHARE *share; THD *thd = current_thd; MRN_DBUG_ENTER_FUNCTION(); -#ifdef MRN_HAVE_GET_TABLE_DEF_KEY +#if defined(MRN_HAVE_TDC_ACQUIRE_SHARE) && \ + !defined(MRN_TDC_ACQUIRE_SHARE_REQUIRE_KEY) + share = tdc_acquire_share(thd, table_list, GTS_TABLE); +#else + uint key_length; +# ifdef MRN_HAVE_GET_TABLE_DEF_KEY const char *key; key_length = get_table_def_key(table_list, &key); -#else +# else char key[MAX_DBKEY_LENGTH]; key_length = create_table_def_key(thd, key, table_list, FALSE); -#endif -#ifdef MRN_HAVE_TABLE_DEF_CACHE +# endif +# ifdef MRN_HAVE_TABLE_DEF_CACHE my_hash_value_type hash_value; hash_value = my_calc_hash(mrn_table_def_cache, (uchar*) key, key_length); share = get_table_share(thd, table_list, key, key_length, 0, error, hash_value); -#elif defined(MRN_HAVE_TDC_ACQUIRE_SHARE) +# elif defined(MRN_HAVE_TDC_ACQUIRE_SHARE) share = tdc_acquire_share(thd, table_list->db, table_list->table_name, key, key_length, table_list->mdl_request.key.tc_hash_value(), GTS_TABLE, NULL); -#else +# else share = get_table_share(thd, table_list, key, key_length, 0, error); +# endif #endif DBUG_RETURN(share); } @@ -1053,7 +1075,7 @@ TABLE_SHARE *mrn_create_tmp_table_share(TABLE_LIST *table_list, const char *path *error = ER_CANT_OPEN_FILE; DBUG_RETURN(NULL); } - share->tmp_table = INTERNAL_TMP_TABLE; // TODO: is this right? + share->tmp_table = NO_TMP_TABLE; // TODO: is this right? share->path.str = (char *) path; share->path.length = strlen(share->path.str); share->normalized_path.str = mrn_my_strdup(path, MYF(MY_WME)); diff --git a/storage/mroonga/mrn_variables.hpp b/storage/mroonga/mrn_variables.hpp index 6bc948a1cacbcc782b1f2f00c23b673d04d84542..0866403e54caa0ddd7082cd5aa106e6db0b1d363 100644 --- a/storage/mroonga/mrn_variables.hpp +++ b/storage/mroonga/mrn_variables.hpp @@ -26,4 +26,28 @@ extern PSI_memory_key mrn_memory_key; #endif +namespace mrn { + namespace variables { + enum BooleanModeSyntaxFlag { + BOOLEAN_MODE_SYNTAX_FLAG_DEFAULT = (1 << 0), + BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_QUERY = (1 << 1), + BOOLEAN_MODE_SYNTAX_FLAG_SYNTAX_SCRIPT = (1 << 2), + BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_COLUMN = (1 << 3), + BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_UPDATE = (1 << 4), + BOOLEAN_MODE_SYNTAX_FLAG_ALLOW_LEADING_NOT = (1 << 5) + }; + + ulonglong get_boolean_mode_syntax_flags(THD *thd); + + enum ActionOnError { + ACTION_ON_ERROR_ERROR, + ACTION_ON_ERROR_ERROR_AND_LOG, + ACTION_ON_ERROR_IGNORE, + ACTION_ON_ERROR_IGNORE_AND_LOG, + }; + + ActionOnError get_action_on_fulltext_query_error(THD *thd); + } +} + #endif /* MRN_VARIABLES_HPP_ */ diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_64bit.inc similarity index 83% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/check_64bit.inc index 1b3cf9c0942f3475d823944bc7d623d5c833daad..06b5361f3bd8567b8a08bc617ec45d2f80acc871 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_64bit.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_64bit.inc @@ -12,14 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA disable_query_log; disable_warnings; -let $VERSION_COMPILE_64BIT= - `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +let $version_compile_64bit= + `SELECT IF(@@version_compile_machine LIKE '%64%', 1, 0)`; enable_warnings; enable_query_log; -if (!$VERSION_COMPILE_64BIT) { - skip Need a 64 binary; -} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc index 39503a9c68d44a666e80163dd94edf7537bb764d..7449724b5defa5420deff8a2fcf586a8fd396f64 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_freebsd.inc @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log -let $VERSION_COMPILE_OS_FREEBSD=`SELECT IF(@@version_compile_os like 'FREEBSD%', 1, 0);`; +let $version_compile_os_freebsd= + `SELECT IF(@@version_compile_os LIKE '%freebsd%', 1, 0);`; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc index b2212fd94a8ba08d5979aa2ed65b3d5dd715ce52..7063c1d1b3d22a17709b771d9f9a708161f1a20e 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_ha_mroonga_so.inc @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_windows.inc diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc index 6f89f05b869f36a4abc8022a5ed40c0cc12d88a4..f608f5f220f08fbb866b4dc8b142fca9218441c5 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_embedded.inc @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $libgroonga_embedded = `SELECT @@mroonga_libgroonga_embedded;`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc index 076be2582ba3a4888b1a01c41a6ef909c7c6fe83..a61058b92ffdf6238ae1a5d746b186498ed70db2 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_lz4.inc @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $libgroonga_support_lz4 = diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc index 5d4862957ae19a98c37262f5a1343febc951de7b..8f79d05af295a36291b513f7865dc879096b4f80 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zlib.inc @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $libgroonga_support_zlib = diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc new file mode 100644 index 0000000000000000000000000000000000000000..1038fe9eea625d873cd24dcfbce8f31407d0fb51 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc @@ -0,0 +1,20 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--disable_query_log +let $libgroonga_support_zstd = + `SELECT @@mroonga_libgroonga_support_zstd;`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc index 0ef2199b7043326eb5768a66d44896712fbc329e..50ee66d64c65edf59772b73a2bab30a4ebcd6747 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_mariadb.inc @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $mariadb = `SELECT LOCATE('MariaDB', @@global.version) > 0`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc index a664a9c51f4217d44db025758fe6cf4c6edc10dc..2808e107bc8e6f717618aba70674ae0818221f0f 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_osx.inc @@ -1,4 +1,5 @@ # Copyright(C) 2014 Toshihisa Tashiro +# Copyright(C) 2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +13,19 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log -let $VERSION_COMPILE_OS_OSX=`SELECT IF(@@version_compile_os like 'osx%', 1, 0);`; +let $version_compile_os_osx=`SELECT IF(@@version_compile_os like 'osx%', 1, 0);`; +if ($version_compile_os_osx) { + let $version_compile_os_osx_10_8_or_later= + `SELECT IF(@@version_compile_os = 'osx10.6', 0, 1);`; + if ($version_compile_os_osx_10_8_or_later) { + let $version_compile_os_osx_10_8_or_later= + `SELECT IF(@@version_compile_os = 'osx10.7', 0, 1);`; + } +} +if (!$version_comiple_os_osx) { + let $version_compile_os_osx_10_8_or_later=0; +} --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc new file mode 100644 index 0000000000000000000000000000000000000000..cad909d022a4d75988893d480df6692709612f53 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_solaris.inc @@ -0,0 +1,20 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--disable_query_log +let $version_compile_os_solaris= + `SELECT IF(@@version_compile_os LIKE 'sun-solaris%', 1, 0);`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc new file mode 100644 index 0000000000000000000000000000000000000000..88dfd6602e96b311bf2e7d74b9c44ca4ffb85516 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_strict_sql_mode.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--disable_query_log +let $strict_sql_mode = + `SELECT @@sql_mode LIKE '%STRICT_TRANS_TABLES%' OR + @@sql_mode LIKE '%STRICT_ALL_TABLES%'`; +--enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc index cfa7c008e5127dc08dafee2544c201a6901e6a02..aaf4f8dacc8751fdd084d46719abbb2c097e35f6 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,19 +12,22 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $version_major_minor = `SELECT CAST(SUBSTRING_INDEX(@@global.version, '.', 2) AS DECIMAL(4, 2))`; -let $version_55 = `SELECT $version_major_minor = 5.5`; -let $version_56 = `SELECT $version_major_minor = 5.6`; -let $version_57 = `SELECT $version_major_minor = 5.7`; -let $version_100 = `SELECT $version_major_minor = 10.0`; +let $version_5_5 = `SELECT $version_major_minor = 5.5`; +let $version_5_6 = `SELECT $version_major_minor = 5.6`; +let $version_5_7 = `SELECT $version_major_minor = 5.7`; +let $version_10_0 = `SELECT $version_major_minor = 10.0`; +let $version_10_1 = `SELECT $version_major_minor = 10.1`; +let $version_10_2 = `SELECT $version_major_minor = 10.2`; -let $version_55_or_later = `SELECT $version_major_minor >= 5.5`; -let $version_56_or_later = `SELECT $version_major_minor >= 5.6`; -let $version_57_or_later = `SELECT $version_major_minor >= 5.7`; -let $version_100_or_later = `SELECT $version_major_minor >= 10.0`; +let $version_5_5_or_later = `SELECT $version_major_minor >= 5.5`; +let $version_5_6_or_later = `SELECT $version_major_minor >= 5.6`; +let $version_5_7_or_later = `SELECT $version_major_minor >= 5.7`; +let $version_10_0_or_later = `SELECT $version_major_minor >= 10.0`; +let $version_10_2_or_later = `SELECT $version_major_minor >= 10.2`; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc index b258225fa9fb3605ddd7d9ae78acf20f9b50864d..179e0329600fcfcec6e2bc61008fc1363b26fbb6 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_windows.inc @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log let $VERSION_COMPILE_OS_WIN=`SELECT IF(@@version_compile_os like 'Win%', 1, 0)`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc deleted file mode 100644 index ae44649df9e707524dc39a316c5f2ef2746973ef..0000000000000000000000000000000000000000 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_32bit.inc +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright(C) 2013 Kentoku SHIBA -# Copyright(C) 2014 Toshihisa Tashiro -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - ---source ../../include/mroonga/skip_osx.inc - -disable_query_log; -disable_warnings; -let $VERSION_COMPILE_64BIT= - `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; -enable_warnings; -enable_query_log; -if ($VERSION_COMPILE_64BIT) { - skip Need a 32 bit machine/binary; -} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc index 90a203c91ef0dc0cd9d9ee499d668f5277df7395..88f8594c352a0a88290e3c6a726057a7e43fc504 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_fractional_seconds.inc @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_mariadb.inc --source ../../include/mroonga/check_version.inc @@ -22,11 +22,11 @@ if ($mariadb) { } if (!$mariadb) { - if ($version_56) { + if ($version_5_6) { let $fractional_seconds = `SELECT @@global.version >= '5.6'`; } } if (!$fractional_seconds) { - skip fractional seconds in time values are available in MySQL version 5.6 or later or MariaDB; + --skip fractional seconds in time values are available in MySQL version 5.6 or later or MariaDB } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc index fc6cddc5b14c40f8de661c5cc90c8877db6eed13..3daf0e7c37919575ad93afab2d59061ed45475a4 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_freebsd.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_freebsd.inc -if (!$VERSION_COMPILE_OS_FREEBSD) { - skip Need OS FreeBSD; +if (!$version_compile_os_freebsd) { + --skip Need OS FreeBSD } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc index dfd3ae12c93da85b0e70bbdfa4e5c3263fcff960..19b52287cc1f4aa9b9116d74f90a185c0a03fdde 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_groonga_plugin_register.inc @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_libgroonga_embedded.inc if ($libgroonga_embedded) { --source ../../include/mroonga/have_mroonga_deinit.inc - skip "This test requires plugin_register of Groonga. libgroonga embedded build doesn't support it."; + --skip This test requires plugin_register of Groonga. libgroonga embedded build doesn't support it. } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc index 7f76ef05021fc2bdfcd917635ecd11960e57ed68..5f38c66c2c55de9df50505e25b8b27f70148c94b 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_mariadb.inc if (!$mariadb) { - skip This test is for MariaDB; + --skip This test is for MariaDB } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc new file mode 100644 index 0000000000000000000000000000000000000000..e11c15ec7963ef39653371986cb85383e9a3cf2d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mariadb_10_2_or_later.inc @@ -0,0 +1,26 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if (!$mariadb) { + --skip This test is for MariaDB version 10.2.x or later +} + +if (!$version_10_2_or_later) { + --skip This test is for MariaDB version 10.2.x or later +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc index 7bb3ca8b371c1ea89c9c29f3332c444e303f1c99..b88839e55fe68c290822e015533b4bd350e356ca 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga.inc @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_ha_mroonga_so.inc diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc index bd5e4cf7f9fea7c0e6ac4156da3f81442b0ff7d4..bd5242c8d348bb85adda5a4e10d4d9360a501350 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA disable_query_log; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc index f0bad1a490d33c3d12bc88e17123b7084959b918..f78a760a5636a28ac7f2493b4d2c540c318cc15d 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc @@ -12,6 +12,6 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA let $MYSQLD_DATADIR= `select @@datadir`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc index e2a791aff5e33dea5ceb833584cad13b0b194aa5..f3c2129203e9ce927d55f5133eabaadb8058be73 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_mariadb.inc if ($mariadb) { - skip This test is for MySQL; + --skip This test is for MySQL } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc new file mode 100644 index 0000000000000000000000000000000000000000..cf638a9c73a9627a27531022852ecb3a6b1a5f54 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mysql_5_7_or_later.inc @@ -0,0 +1,26 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + --skip This test is for MySQL version 5.7.x or later +} + +if (!$version_5_7_or_later) { + --skip This test is for MySQL version 5.7.x or later +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc new file mode 100644 index 0000000000000000000000000000000000000000..90eca856e5e668a31cdb2f25f80c09a33d1bb6c4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_signed_64bit_time_t.inc @@ -0,0 +1,28 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_64bit.inc +--source ../../include/mroonga/check_osx.inc + +if (!$version_compile_64bit) { + --skip Need a 64 binary for signed 64bit time_t +} + +if ($version_compile_os_osx) { + if (!$version_compile_os_osx_10_8_or_later) { + --skip Need OS X 10.8 or later for signed 64bit time_t + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc new file mode 100644 index 0000000000000000000000000000000000000000..fc89e733f0ecd7e341a1e140c3cbda40988daed3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_solaris.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_solaris.inc + +if (!$version_compile_os_solaris) { + --skip Need Solaris +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc new file mode 100644 index 0000000000000000000000000000000000000000..678ba6ab46047b46fc3f02ce5907556fa6c94cf2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_strict_sql_mode.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_strict_sql_mode.inc + +if (!$strict_sql_mode) { + --skip This test is for STRICT_ALL_TABLES or STRICT_TRANS_TABLES +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0.inc similarity index 83% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0.inc index a08d789d6f2f8b248b9bf9fc3bda3a96e6f2d544..356b2295743fb203db082839bdd47b78364ef8a7 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_55.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_55) { - skip This test is for MySQL version 5.5.x; +if (!$version_10_0) { + --skip This test is for MariaDB version 10.0.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0_or_later.inc similarity index 82% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0_or_later.inc index 09e5acc01879663fa17e79ae5a4db9f5fd4c5da1..1a8883f0478c06646b529008ca9f1f6fad36b18a 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100_or_later.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_10_0_or_later.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_100_or_later) { - skip This test is for MariaDB version 10.0.x or later; +if (!$version_10_0_or_later) { + --skip This test is for MariaDB version 10.0.x or later } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_5.inc similarity index 84% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_5.inc index b48d4e9d1bbe9e3e4e73a7898cf487c3517f5a20..b1708abe195b5f82047c56fb4acfe44867d4c010 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_100.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_5.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_100) { - skip This test is for MariaDB version 10.0.x; +if (!$version_5_5) { + --skip This test is for MySQL version 5.5.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6.inc similarity index 90% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6.inc index fbb4152fc4a7be25caf20f147abe95e0c6dcf6ce..cfa3c7ac60d4a97c4b3db908fa87f0a77d580461 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_56) { - skip This test is for MySQL version 5.6.x; +if (!$version_5_6) { + --skip This test is for MySQL version 5.6.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6_or_later.inc similarity index 88% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6_or_later.inc index 350f51616ba151b5b52c3852770a66452550bdfa..b9481afdee825e4995e23d267f94f894caec2753 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_56_or_later.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_6_or_later.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_56_or_later) { - skip This test is for MySQL version 5.6.x or later; +if (!$version_5_6_or_later) { + --skip This test is for MySQL version 5.6.x or later } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7.inc similarity index 90% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7.inc index ca2d06ae617b1c8c2a6c34af9664eea6ee840544..4b65def94636735a45ea0c11414345d264daf8ef 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_57.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc -if (!$version_57) { - skip This test is for MySQL version 5.7.x; +if (!$version_5_7) { + --skip This test is for MySQL version 5.7.x } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc new file mode 100644 index 0000000000000000000000000000000000000000..1b18b5749ca639a506f500b9f9b21779b4d70c45 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_version_5_7_or_later.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2015-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc + +if (!$version_5_7_or_later) { + --skip This test is for MySQL version 5.7.x or later or MariaDB 10.0.x or later +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc index 6e563721fc72def8ef05919a073c46d18377bb3b..9ca1b0d116841cd0e9b67407ecba5765a6c5238f 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/load_mroonga_functions.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_ha_mroonga_so.inc @@ -21,4 +21,8 @@ eval CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME $ha_mroonga_so; eval CREATE FUNCTION mroonga_snippet RETURNS STRING SONAME $ha_mroonga_so; eval CREATE FUNCTION mroonga_command RETURNS STRING SONAME $ha_mroonga_so; eval CREATE FUNCTION mroonga_escape RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_snippet_html RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_normalize RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_highlight_html RETURNS STRING SONAME $ha_mroonga_so; +eval CREATE FUNCTION mroonga_query_expand RETURNS STRING SONAME $ha_mroonga_so; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc index ed13b737fb504abecc6e25127beb5af2503716a5..bf0bed98480b1dffaf95c3fb1b9d28112abd11f0 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_freebsd.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_freebsd.inc -if ($VERSION_COMPILE_OS_FREEBSD) { - skip This test is not for FreeBSD; +if ($version_compile_os_freebsd) { + --skip This test is not for FreeBSD } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc new file mode 100644 index 0000000000000000000000000000000000000000..5fd84f1b2a8fd0d0e096ae1b9bb462728f3f2c26 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_0_or_later.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2012-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + if ($version_10_0_or_later) { + --skip This test is not for MariaDB 10.x + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc similarity index 85% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc index 93eead8791eb49125b9b212e1a51b11e1f7b4b35..b954d1c75f742f99199dbf6f8038bdda6459ea49 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_55.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2013 Kouhei Sutou +# Copyright(C) 2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,13 +12,13 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_55) { +if ($version_10_1) { if ($mariadb) { - skip This test is not for MariaDB 5.5.x; + --skip This test is not for MariaDB 10.1.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc new file mode 100644 index 0000000000000000000000000000000000000000..2af6f2adb0d73bab9bb06b758fda2434c5956d4e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1_or_earlier.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + if (!$version_10_2_or_later) { + --skip This test is not for MariaDB 5.x, MariaDB 10.0.x nor 10.1.x + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc new file mode 100644 index 0000000000000000000000000000000000000000..5f67748a17978553b77852159a56049c865b4ecd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_2_or_later.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($mariadb) { + if ($version_10_2_or_later) { + --skip This test is not for MariaDB 10.2.x or later + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_5_5.inc similarity index 85% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_5_5.inc index 9fbfd222df4e9dd863b192a38b123364ccde526c..0695b96fa23ec985e9d47d81c94499ca22decc78 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_100_or_later.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_5_5.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,13 +12,13 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_100_or_later) { +if ($version_5_5) { if ($mariadb) { - skip This test is not for MariaDB 10.x; + --skip This test is not for MariaDB 5.5.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_55.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_5.inc similarity index 85% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_55.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_5.inc index e29fae84d46bd0f42e6e17a3811a6df7d0aced4b..633450e9c0da92ef8f23aaead75dff36a27fcd3d 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_55.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_5.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,13 +12,13 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_55) { +if ($version_5_5) { if (!$mariadb) { - skip This test is not for MySQL 5.5.x; + --skip This test is not for MySQL 5.5.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7.inc similarity index 91% rename from storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc rename to storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7.inc index 39ee22834e7941bd07f47c12ffd9a1769d8d1e3a..e984d60f760940342581ffd44e9172af5496955a 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_57.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7.inc @@ -12,13 +12,13 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_version.inc --source ../../include/mroonga/check_mariadb.inc -if ($version_57) { +if ($version_5_7) { if (!$mariadb) { - skip This test is not for MySQL 5.7.x; + --skip This test is not for MySQL 5.7.x } } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc new file mode 100644 index 0000000000000000000000000000000000000000..075e60441970d73cae22fbe7b5dcf3122d1bb9dd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mysql_5_7_or_later.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($version_5_7_or_later) { + if (!$mariadb) { + --skip This test is not for MySQL 5.7.x or later + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc index 45a70d34ad748ba17afcbd592bec96767189454f..c29795892114a9c76541021d22d9a84c9e7d739f 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_osx.inc @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_osx.inc if ($VERSION_COMPILE_OS_OSX) { - skip This test is not for OSX; + --skip This test is not for OSX } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc new file mode 100644 index 0000000000000000000000000000000000000000..1ba1d09be60db901560af3336ef38cd9728e3098 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_signed_64bit_time_t.inc @@ -0,0 +1,28 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_64bit.inc +--source ../../include/mroonga/check_osx.inc + +if ($version_compile_64bit) { + --skip This test is for environment that doesn't have signed 64bit time_t +} + +if ($version_compile_os_osx) { + if (!$version_compile_os_osx_10_8_or_later) { + --skip This test is not for OS X 10.7 or earlier that isn't detected signed 64bit time_t availability + } +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc new file mode 100644 index 0000000000000000000000000000000000000000..6bf7422492350b57f0aae12ba1c9ff4f86e6eb3c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_solaris.inc + +if ($version_compile_os_solaris) { + --skip This test is not for Solaris +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc deleted file mode 100644 index 7cee5c38c531491fb0716b62720211d05ef719cb..0000000000000000000000000000000000000000 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc +++ /dev/null @@ -1,3 +0,0 @@ -if (`SELECT @@version_compile_os='solaris10'`) { - skip This test is not for Solaris 10; -} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc new file mode 100644 index 0000000000000000000000000000000000000000..fc0d665b3022ca735348070be0c2298d1a103f48 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_strict_sql_mode.inc @@ -0,0 +1,21 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_strict_sql_mode.inc + +if ($strict_sql_mode) { + --skip This test is not for STRICT_ALL_TABLES nor STRICT_TRANS_TABLES +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc index 5e21a446f1b298a802f9e868f3807e0d26c15d72..249c6b59b17de2cf1838802ae9900d0411338643 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_lz4.inc @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_libgroonga_support_lz4.inc if (!$libgroonga_support_lz4) { --source ../../include/mroonga/have_mroonga_deinit.inc - skip "This test is for libgroonga supports lz4"; + --skip This test is for libgroonga supports lz4 } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc index d04826aa7dd7bbf52eadc455f19cc06ff94831aa..fd8b9e998a03823e4531ed1daafca29eca3a495f 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zlib.inc @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_libgroonga_support_zlib.inc if (!$libgroonga_support_zlib) { --source ../../include/mroonga/have_mroonga_deinit.inc - skip "This test is for libgroonga supports zlib"; + --skip This test is for libgroonga supports zlib } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc new file mode 100644 index 0000000000000000000000000000000000000000..0e7ca4460205c408b5eb52a5de5188184df551cf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc @@ -0,0 +1,22 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_libgroonga_support_zstd.inc + +if (!$libgroonga_support_zstd) { + --source ../../include/mroonga/have_mroonga_deinit.inc + --skip This test is for libgroonga supports zstd +} diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc index 8d0d13f91256f091b3ed9c173d192d39f80e9d9e..cbe345a7e045f81c6afd2b7a0623d19f75a727b8 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unload_mroonga_functions.inc @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,11 +12,15 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --disable_query_log DROP FUNCTION last_insert_grn_id; DROP FUNCTION mroonga_snippet; DROP FUNCTION mroonga_command; DROP FUNCTION mroonga_escape; +DROP FUNCTION mroonga_snippet_html; +DROP FUNCTION mroonga_normalize; +DROP FUNCTION mroonga_highlight_html; +DROP FUNCTION mroonga_query_expand; --enable_query_log diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc index dcc049078f8b547821bc3ee0e74d6f7160ccfd33..210058edc3c290ca528e6376f46bfcbf1cbdb20f 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_lz4.inc @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_libgroonga_support_lz4.inc if ($libgroonga_support_lz4) { --source ../../include/mroonga/have_mroonga_deinit.inc - skip "This test is for libgroonga doesn't support lz4"; + --skip This test is for libgroonga doesn't support lz4 } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc index 7533f786f22ef53d2c98e91aa8624368eea4eec5..cb00da15a879092c5adec715d383519f7ba1f91e 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zlib.inc @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/check_libgroonga_support_zlib.inc if ($libgroonga_support_zlib) { --source ../../include/mroonga/have_mroonga_deinit.inc - skip "This test is for libgroonga doesn't support zlib"; + --skip This test is for libgroonga doesn't support zlib } diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc new file mode 100644 index 0000000000000000000000000000000000000000..037e66a9e7c4093b762890e5dbc98bfa22a164fd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc @@ -0,0 +1,22 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_libgroonga_support_zstd.inc + +if ($libgroonga_support_zstd) { + --source ../../include/mroonga/have_mroonga_deinit.inc + --skip This test is for libgroonga doesn't support zstd +} diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result index 52a72155af3281a62b435903d3bb125f6160c79b..15cd3499d4ca26cb9f5c80ad937d70565da2f404 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_after.result @@ -1,22 +1,22 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -body TEXT +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries ADD title TEXT AFTER id; +ALTER TABLE diaries ADD title VARCHAR(40) AFTER id; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result index 81feeefc58918f53e7fcb41bd8c3e139ed29b6c0..8b3de1bf7de40f361d7967e318cc7977815cf65a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_first.result @@ -1,22 +1,22 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -body TEXT +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries ADD title TEXT FIRST; +ALTER TABLE diaries ADD title VARCHAR(40) FIRST; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `title` text, + `title` varchar(40) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result index e441df32c922f5645e8c062c2b832b12755480ff..de0482e626c4c6c85446c344cda8b8f6eb3fb48b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_comment.result @@ -4,6 +4,11 @@ id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ALTER TABLE tags ADD COLUMN name VARCHAR(64) COMMENT 'flags "COLUMN_VECTOR"'; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + table_create tags TABLE_PAT_KEY UInt32 column_create tags id COLUMN_SCALAR UInt32 column_create tags name COLUMN_VECTOR ShortText diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result index 6f2a1870ac7718839459ee2c1ce5190700f9cca7..b3c9875faeb1c05de4c94eb3479e8dadefb90366 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_flags_parameter.result @@ -11,6 +11,11 @@ tags CREATE TABLE `tags` ( ) ENGINE=Mroonga DEFAULT CHARSET=utf8 SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + table_create tags TABLE_PAT_KEY UInt32 column_create tags id COLUMN_SCALAR UInt32 column_create tags name COLUMN_VECTOR ShortText diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result index 0bd8985f2e870b897897716c77cd85f487c29423..8a1c18b731d9eb7fdaaa50eaf64f2e796d3e3a04 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_comment.result @@ -7,12 +7,17 @@ id INT UNSIGNED PRIMARY KEY ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'groonga_type "tags"'; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create tags TABLE_PAT_KEY UInt32 -column_create tags id COLUMN_SCALAR UInt32 - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY UInt32 +column_create tags id COLUMN_SCALAR UInt32 + column_create bugs name COLUMN_SCALAR tags DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result index fe4843729991188fe08abb37ce687ba00adab264..85330471c443dd57e3c9450d193ae3cc1e3b2921 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_groonga_type_parameter.result @@ -10,17 +10,21 @@ Table Create Table bugs CREATE TABLE `bugs` ( `id` int(10) unsigned NOT NULL, `name` varchar(64) DEFAULT NULL `GROONGA_TYPE`='tags', - PRIMARY KEY (`id`), - CONSTRAINT `name` FOREIGN KEY (`name`) REFERENCES `test`.`tags` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT + PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create tags TABLE_PAT_KEY UInt32 -column_create tags id COLUMN_SCALAR UInt32 - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY UInt32 +column_create tags id COLUMN_SCALAR UInt32 + column_create bugs name COLUMN_SCALAR tags DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result new file mode 100644 index 0000000000000000000000000000000000000000..6fb1a1071f87fd8748384ec8151bb1b9069e80b9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_cp932.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +id int PRIMARY KEY +) DEFAULT CHARSET=cp932; +ALTER TABLE users +ADD COLUMN –¼‘O text, +ADD FULLTEXT INDEX (–¼‘O); +INSERT INTO users VALUES (1, "‚â‚Ü‚¾"); +INSERT INTO users VALUES (2, "‚½‚È‚©"); +INSERT INTO users VALUES (3, "‚·‚¸‚«"); +SELECT * FROM users; +id –¼‘O +1 ‚â‚Ü‚¾ +2 ‚½‚È‚© +3 ‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +id –¼‘O +2 ‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_PAT_KEY Int32 +column_create users @540d@524d COLUMN_SCALAR LongText +column_create users id COLUMN_SCALAR Int32 + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result new file mode 100644 index 0000000000000000000000000000000000000000..70c9ea0c546ecd33422542279e088af4928bfb7a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multibyte_utf8.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int PRIMARY KEY +) DEFAULT CHARSET=utf8; +ALTER TABLE users +ADD COLUMN åå‰ text, +ADD FULLTEXT INDEX (åå‰); +INSERT INTO users VALUES (1, "ã‚„ã¾ã "); +INSERT INTO users VALUES (2, "ãŸãªã‹"); +INSERT INTO users VALUES (3, "ã™ãšã"); +SELECT * FROM users; +id åå‰ +1 ã‚„ã¾ã  +2 ãŸãªã‹ +3 ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +id åå‰ +2 ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_PAT_KEY Int32 +column_create users @540d@524d COLUMN_SCALAR LongText +column_create users id COLUMN_SCALAR Int32 + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result index bb157539ac95859c78be42f6aff3f9e2508f4d2d..6c6024e47731b79faa76e85d541b6d66547bacf5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_multiple.result @@ -1,13 +1,13 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT +title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title) VALUES ("survey"); @@ -15,7 +15,7 @@ SELECT * FROM diaries; id title 1 survey ALTER TABLE diaries -ADD COLUMN body TEXT FIRST, +ADD COLUMN body VARCHAR(140) FIRST, ADD COLUMN published BOOLEAN AFTER id, ADD COLUMN created_at DATETIME; UPDATE diaries SET body = "will start groonga!"; @@ -34,10 +34,10 @@ started groonga. 3 0 groonga (2) 2014-02-09 12:19:00 SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `body` text, + `body` varchar(140) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, `published` tinyint(1) DEFAULT NULL, - `title` text, + `title` varchar(40) DEFAULT NULL, `created_at` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result index df5a15568d85944538c08384b273531a3cd31c12..5a5d3715621e3dc0612feeeda974059ad81edf76 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_plain.result @@ -1,20 +1,20 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT +title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; id title 1 survey -ALTER TABLE diaries ADD COLUMN body TEXT; +ALTER TABLE diaries ADD COLUMN body VARCHAR(140); UPDATE diaries SET body = "will start groonga!"; SELECT * FROM diaries; id title body @@ -30,8 +30,8 @@ SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result index b4c3044c7d5de105f004600fecacd31b9bd137f3..5136282687cb321a4c9852f217d7ddf16b4b159d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_column_type_comment.result @@ -7,12 +7,17 @@ id INT UNSIGNED PRIMARY KEY ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create tags TABLE_PAT_KEY UInt32 -column_create tags id COLUMN_SCALAR UInt32 - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY UInt32 +column_create tags id COLUMN_SCALAR UInt32 + column_create bugs name COLUMN_SCALAR tags DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result index 65e608dddeba525ac22284998773b73a4de61a37..373c70e81be6afcb330b955501da8a44304ffbc5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_add_index_token_filters_one_token_filter.result @@ -11,7 +11,12 @@ mroonga_command("dump --dump_plugins no") table_create memos TABLE_NO_KEY column_create memos content COLUMN_SCALAR ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result index 19d5d017fb23c759236dfefe9d0f9ba47c666f2d..a9b192e999e37ed6b08d5bdafd4534478075e9be 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_after.result @@ -1,24 +1,24 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries CHANGE body description TEXT AFTER id; +ALTER TABLE diaries CHANGE body description VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `description` text, - `title` text, + `description` varchar(140) DEFAULT NULL, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result index cf2bcc0fc2c79c7f20cd2fda49a0976b640ccfcd..4faf39ad1adbe12a225e1bd59e927d15f4a8ba4e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_first.result @@ -1,24 +1,24 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries CHANGE body description TEXT FIRST; +ALTER TABLE diaries CHANGE body description VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `description` text, + `description` varchar(140) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result index c73030805c8326883f3b5b3e5f7c4f660f3b03ac..6c87244ba47fafb822e8f8bbd6b959731d3a6361 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result @@ -1,34 +1,32 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 ALTER TABLE diaries -CHANGE body description TEXT FIRST, -CHANGE title subject TEXT AFTER internal_id, -CHANGE id internal_id INT; +CHANGE body description VARCHAR(140) FIRST, +CHANGE title subject VARCHAR(40) AFTER internal_id, +CHANGE id internal_id INT AUTO_INCREMENT; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `description` text, - `internal_id` int(11) NOT NULL, - `subject` text, + `description` varchar(140) DEFAULT NULL, + `internal_id` int(11) NOT NULL AUTO_INCREMENT, + `subject` varchar(40) DEFAULT NULL, PRIMARY KEY (`internal_id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (subject, description) VALUES ("groonga (1)", "starting groonga."); -Warnings: -Warning 1364 Field 'internal_id' doesn't have a default value SELECT * FROM diaries; description internal_id subject -starting groonga. 0 groonga (1) +starting groonga. 1 groonga (1) DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result index 6d60200e5ce0cc5c663c687eee9187eda5e4430d..d49acc526116686139275b151a1f6ad7b3d50b35 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_no_order.result @@ -1,24 +1,24 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 -ALTER TABLE diaries CHANGE body description TEXT; +ALTER TABLE diaries CHANGE body description VARCHAR(140); SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `description` text, + `title` varchar(40) DEFAULT NULL, + `description` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_decimal.result similarity index 63% rename from storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result rename to storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_decimal.result index 6bbedd41e95e3689bd14190095b6500bb45ae9ce..dc2ae02533665a14d0298b1b007add74412a9a61 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_engine_decimal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_decimal.result @@ -1,37 +1,34 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, temperature DECIMAL(6, 3) ) ENGINE InnoDB DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, `temperature` decimal(6,3) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (temperature) VALUES (21.281); SELECT * FROM diaries; -id title temperature -1 clear day 21.281 +id temperature +1 21.281 ALTER TABLE diaries ENGINE = mroonga; SELECT * FROM diaries; -id title temperature -1 clear day 21.281 -INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); -INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +id temperature +1 21.281 +INSERT INTO diaries (temperature) VALUES (14.213); +INSERT INTO diaries (temperature) VALUES (17.821); SELECT * FROM diaries; -id title temperature -1 clear day 21.281 -2 rainy day 14.213 -3 cloudy day 17.821 +id temperature +1 21.281 +2 14.213 +3 17.821 SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, `temperature` decimal(6,3) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_fulltext_index.result similarity index 64% rename from storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result rename to storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_fulltext_index.result index 3a7413e389b01512c8736d52672e900dd26f9c66..706764a5105ec53797c4ab298a143a43f428b90e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_engine_fulltext_index.result @@ -6,16 +6,11 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine +diaries MyISAM INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); SELECT * FROM diaries @@ -24,16 +19,11 @@ MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); id title body 1 survey will start groonga! ALTER TABLE diaries ENGINE = mroonga; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine +diaries Mroonga SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result index 60d302cc6a5dafeec0f2cbdd15343ec56b025fc2..9fc3b408474d7b6b4d25d5b62ed923e06074b410 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_token_filter.result @@ -12,14 +12,19 @@ FULLTEXT INDEX (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI -column_create terms is_stop_word COLUMN_SCALAR Int8 -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI +column_create terms is_stop_word COLUMN_SCALAR Int8 +column_create terms term COLUMN_SCALAR ShortText + column_create terms content COLUMN_INDEX|WITH_POSITION memos content ALTER TABLE terms COMMENT='default_tokenizer "TokenBigram", token_filters "TokenFilterStopWord"'; SELECT mroonga_command("dump --dump_plugins no"); @@ -28,6 +33,11 @@ table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord column_create terms is_stop_word COLUMN_SCALAR Int8 column_create terms term COLUMN_SCALAR ShortText @@ -39,6 +49,11 @@ table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord column_create terms is_stop_word COLUMN_SCALAR Int8 column_create terms term COLUMN_SCALAR ShortText diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result index ba6cf6c24ed1668a7f788818b97af484db32ad93..7416481e3902fcb37863185c1dc718d803bc5a62 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result @@ -10,22 +10,32 @@ FULLTEXT INDEX content_index (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText + column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content ALTER TABLE memos DISABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result index 6475de51b219cfec17c1eaee25d349953196bf55..a8b8edf2f6356ef631e50232cd34d4d231752165 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_multiple.result @@ -1,15 +1,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result index cbc94cebccf2023bed685d2abf38bbe816ccc831..569bba2f557a23109e4042eb957988973df1fad0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_drop_column_one.result @@ -1,15 +1,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); @@ -21,7 +21,7 @@ SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result index 452caa574f94598b597e2b2250c05bc89d8b968b..7b3b2863e5f544044d987ed15bd218605e52ce87 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result @@ -11,22 +11,32 @@ FULLTEXT INDEX content_index (content) COMMENT 'table "terms"' ALTER TABLE memos DISABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText ALTER TABLE memos ENABLE KEYS; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +column_create terms term COLUMN_SCALAR ShortText + column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result index d98dc431a0b4f86c9f5e56a04a3737dc1eb898e6..cf6840a9897414b23c918796f22cf24f2eae325d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_fulltext_add_normal.result @@ -7,15 +7,7 @@ INSERT INTO memos (content) values ("Starting Groonga..."); INSERT INTO memos (content) values ("Started Groonga."); INSERT INTO memos (content) values ("Starting Mroonga..."); ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content_index` (`content`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 -SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); +SELECT * FROM memos WHERE MATCH(content) AGAINST("+groonga" IN BOOLEAN MODE); id content 1 Starting Groonga... 2 Started Groonga. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result index d831d02d76aaafc23639ad9e500af6c2424bb838..9b7040bd5c887190b47e461b81ddf51d1aeab6b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_after.result @@ -1,28 +1,28 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; id title body 1 groonga (1) starting groonga. -ALTER TABLE diaries MODIFY body TEXT AFTER id; +ALTER TABLE diaries MODIFY body VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - `title` text, + `body` varchar(140) DEFAULT NULL, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result index bd936507211e6a39b5f439a97683e536b8220464..f6b3df92c67e40df3788495b4e0337f1bdd8eec9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_first.result @@ -1,28 +1,28 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; id title body 1 groonga (1) starting groonga. -ALTER TABLE diaries MODIFY body TEXT FIRST; +ALTER TABLE diaries MODIFY body VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( - `body` text, + `body` varchar(140) DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result index d8d963d87b44338a8020890d79449b35dc80cfce..e156a7fda0329a850bcd92619072ae46f802109c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_modify_column_no_order.result @@ -1,15 +1,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, -body TEXT +title VARCHAR(40), +body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, + `title` varchar(40) DEFAULT NULL, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); @@ -22,7 +22,7 @@ Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) DEFAULT NULL, - `body` text, + `body` varchar(140) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result index 64f524de06caf52e0665f57cff7fa69ca710e62b..6ee8f8bafc196abb09b4505e74c7a82877cf7df8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_recreate_anonymous_index_at_once.result @@ -5,15 +5,6 @@ title TEXT, body TEXT, FULLTEXT INDEX (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("survey", "will start mroonga!"); SELECT * FROM diaries; @@ -35,13 +26,4 @@ SELECT * FROM diaries WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); id title body 1 survey will start groonga! -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result index eac322ceb260366412ad80f42afa39b64c301562..84861ea7162efb253d1ba8082406d13f703c5b40 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_rename_table.result @@ -6,16 +6,11 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine +diaries Mroonga INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; id title body @@ -32,14 +27,9 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); id title body -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 +SELECT table_name, engine +FROM information_schema.tables +WHERE table_name = 'memos'; +table_name engine +memos Mroonga DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result index ed36927e7b914a9fc2f369f4dfda6bd8c7d9553b..ac1a096de4a6af7b3fdb08c00d6d984879b664f1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_spatial.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS shops; CREATE TABLE shops ( id INT PRIMARY KEY AUTO_INCREMENT, -name TEXT, +name VARCHAR(40), location GEOMETRY NOT NULL ); INSERT INTO shops (name, location) @@ -124,7 +124,7 @@ SHOW CREATE TABLE shops; Table Create Table shops CREATE TABLE `shops` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, + `name` varchar(40) DEFAULT NULL, `location` geometry NOT NULL, PRIMARY KEY (`id`), SPATIAL KEY `location_index` (`location`) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result new file mode 100644 index 0000000000000000000000000000000000000000..4926a72a77af4ee04b367fe84d774da08a04e1a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_broken.result @@ -0,0 +1,18 @@ +SET NAMES UTF8; +CREATE DATABASE check_test; +USE check_test; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX (title) +); +INSERT INTO diaries VALUES ('Hello'); +FLUSH TABLES; +CHECK TABLE diaries; +Table Op Msg_type Msg_text +check_test.diaries check error Corrupt +REPAIR TABLE diaries; +Table Op Msg_type Msg_text +check_test.diaries repair status OK +DROP TABLE diaries; +DROP DATABASE check_test; +USE test; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result new file mode 100644 index 0000000000000000000000000000000000000000..def3368ecac18d20214540fdd853d16234d9a161 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/check_table_not_broken.result @@ -0,0 +1,13 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +title TEXT +); +INSERT INTO diaries VALUES ('Hello'); +CHECK TABLE diaries; +Table Op Msg_type Msg_text +test.diaries check status OK +SELECT * FROM diaries; +title +Hello +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result index e24a56be3a297474ab6844d0cbacf8c8ca335467..9aec8dd6e7916adedc5624d07e58ee0078e1a1fc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_with_index.result @@ -1,7 +1,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, +title VARCHAR(40), created_at DATE, KEY (created_at) ) DEFAULT CHARSET UTF8; @@ -9,7 +9,7 @@ SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, `created_at` date DEFAULT NULL, PRIMARY KEY (`id`), KEY `created_at` (`created_at`) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result index 018ee8eb5b8deb2817a0bfa61001cf36c8f222bc..4d2166eca0a4c4ca27422879585f03b64d4a29c6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_without_index.result @@ -1,14 +1,14 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, -title TEXT, +title VARCHAR(40), created_at DATE ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; Table Create Table diaries CREATE TABLE `diaries` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, + `title` varchar(40) DEFAULT NULL, `created_at` date DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result index 453f641968b9cfa7ee530e60b84966aedec3023d..70a980e2e8c74e128060a16734289e365dc57d32 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_2038.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result index 10824d7c28ddd7186471a92f93fc5fdfdffb4720..a48be4da873c777fcf096043ac656a5071ccb9aa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_before_unix_epoch.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result index f3a7b27f3428a5b841308092d00ae6ae2ecc08f4..b28a1744947aec4d5b15569e808ddd3b35377790 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_max.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result index d7acad79bab166399fd81e5a2863d44faebaec6b..838eaf45f5c06abe61854aa1c99da30bebaeb357 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_32bit_out_of_range.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result index 56e38902f28c04623684f5c2acd7acf1ede138f0..f0f03a82c9851d45164bc0adf9e451efc2f98eda 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_2038.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2038-01-19 03:14:07', '2038-01-19 03:14:07'); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result index c3ca2628bcaa530a867ad114745c2f653e9f8bc6..8a775960ef78aeff8d21111395f299353fe420d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_before_unix_epoch.result @@ -4,17 +4,9 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) -VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); +VALUES ('1000-01-02 00:00:00', '1000-01-02 00:00:00'); SELECT * FROM diaries; id title created_at -1 1000-01-01 00:00:00 1000-01-01 00:00:00 +1 1000-01-02 00:00:00 1000-01-02 00:00:00 DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result index 0373d17530e43ead5ece6fc39bfcbd031b41933e..44d20d972f20161fb41c75c016800bb99726e5f8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_max.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result new file mode 100644 index 0000000000000000000000000000000000000000..2d5e5e64147d0c2e49b3f01ca7ae77989c492108 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_strict_sql_mode_out_of_range.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT, +created_at DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO diaries (title, created_at) +VALUES ('2012', '2012'); +ERROR 22007: Incorrect datetime value: '2012' for column 'created_at' at row 1 +SELECT * FROM diaries; +id title created_at +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_5_out_of_range.result similarity index 65% rename from storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result rename to storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_5_out_of_range.result index 733217fda85f7086ab24eec58053e99eb29e8e52..21e715e1f638d99a3e3def108771c14f4f34cec6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_55_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_5_out_of_range.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_6_or_later_out_of_range.result similarity index 65% rename from storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result rename to storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_6_or_later_out_of_range.result index 962212c86f8a998bcb5271620c1d810470d16523..352638031b773a6bba38b99a409fce9dd321fdcf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_5_6_or_later_out_of_range.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result index a31042f768dd794787032c9daa5c7ff8483715f4..e7094fd4e55ca5d244bfe38fcc29f54279bdd736 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_with_index.result @@ -5,15 +5,6 @@ title TEXT, created_at DATETIME(6), KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime(6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `created_at` (`created_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result index 0b1bf0f0eb4a8cc18dab165cb03216fe96e5cfe2..028fb2577a2c2578d6639f0f6c6878eb5893b3fb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME(6) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime(6) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result index 10824d7c28ddd7186471a92f93fc5fdfdffb4720..a48be4da873c777fcf096043ac656a5071ccb9aa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_freebsd_before_unix_epoch.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); Warnings: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_date.result similarity index 61% rename from storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result rename to storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_date.result index c4d73e2f57de01fd917f156aeb34d08911d5190c..ffd6a707605472e14b4f09333715073c9b3aa8fd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date_strict.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_date.result @@ -3,17 +3,8 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -Table Create Table -timestamps CREATE TABLE `timestamps` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `create_dt` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -SET sql_mode='STRICT_TRANS_TABLES'; INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); ERROR 22003: Out of range value for column 'create_dt' at row 1 -SET sql_mode=default; SELECT * FROM timestamps; id create_dt INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result new file mode 100644 index 0000000000000000000000000000000000000000..61d2ed8dfd31e6004c4086ada84fa88e63a4d4ed --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mariadb_10_2_or_later_zero_month_day.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +ERROR 22003: Out of range value for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +ERROR 22003: Out of range value for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result new file mode 100644 index 0000000000000000000000000000000000000000..0ca19e548f36fe4c58b7ede984f393ac0b163f9e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_date.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; +id create_dt +1 2015-06-17 00:00:00 +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result new file mode 100644 index 0000000000000000000000000000000000000000..94479c2307d6bd8f1f65b9140ef6216210328c26 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_mysql_5_7_or_later_zero_month_day.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +ERROR 22007: Incorrect datetime value: '2012-00-01 00:00:00' for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +ERROR 22007: Incorrect datetime value: '2012-01-00 00:00:00' for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result index 82f01b9f2373f97faab3afae652ef1e50280339a..510fa2dc061c10dd72ca37da39b5cfa0351185a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_null.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ('NULL', NULL); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result index b205031dec14dc2f409018c838f54c030c8e917b..6f79b31fe24831c2025e120bdf4c1a490d20ea38 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_with_index.result @@ -5,15 +5,6 @@ title TEXT, created_at DATETIME, KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `created_at` (`created_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result index 6592df35fcb142312d1fab81728e630331d827f4..8a45ece7813f1b1e37f49ed4ca6178fd07afaf60 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); INSERT INTO diaries (title, created_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result index c22a63f97443b2ddf879c34ca761369d9ab00e14..659c574202a63bc2b105fb0dca169f9202847ae1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result @@ -3,25 +3,14 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -Table Create Table -timestamps CREATE TABLE `timestamps` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `create_dt` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); -Warnings: -Warning 1265 Data truncated for column 'create_dt' at row 1 -INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); -Warnings: -Warning 1265 Data truncated for column 'create_dt' at row 1 +SET sql_mode='STRICT_TRANS_TABLES'; +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); +ERROR 22003: Out of range value for column 'create_dt' at row 1 +SET sql_mode=default; SELECT * FROM timestamps; id create_dt -1 2012-01-01 00:00:00 -2 2012-01-01 00:00:00 -SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; id create_dt -1 2012-01-01 00:00:00 -2 2012-01-01 00:00:00 +2 2015-06-17 00:00:00 DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result new file mode 100644 index 0000000000000000000000000000000000000000..03633a50b7a3e64c6244b90fe27b87fd1931ff28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_month_day.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS timestamps; +CREATE TABLE timestamps ( +id INT PRIMARY KEY AUTO_INCREMENT, +create_dt DATETIME +) DEFAULT CHARSET UTF8; +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +Warnings: +Warning 1265 Data truncated for column 'create_dt' at row 1 +SELECT * FROM timestamps; +id create_dt +1 2012-01-01 00:00:00 +2 2012-01-01 00:00:00 +SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +id create_dt +1 2012-01-01 00:00:00 +2 2012-01-01 00:00:00 +DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result index 4a21d62dd14f032327e5741e826a38e7f890aa56..196e4b80f60571509e541a54ebb2fffbe706915b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_with_index.result @@ -5,15 +5,6 @@ title TEXT, temperature DECIMAL(6, 3), KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(6,3) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `temperature` (`temperature`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result index cd939fa5483006bf4150f8022eb0ac705f881cf3..b67846bb29c8f2813812842b34f7b900881095ff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_fractional_seconds_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, temperature DECIMAL(6, 3) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(6,3) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result index 56a6a360dc9cc0a345e36cf139fe0bda81c1e39d..620e9b6906c7f70714e02d49ed6a8dcd032fb673 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_with_index.result @@ -5,15 +5,6 @@ title TEXT, temperature DECIMAL, KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(10,0) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `temperature` (`temperature`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result index 06162f76dddd537ef27cd6879eb461fea978a8dd..1ba47b3494a04e5aaf95d7673eb48b73891ba468 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_decimal_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, temperature DECIMAL ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `temperature` decimal(10,0) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result new file mode 100644 index 0000000000000000000000000000000000000000..20213f0cbf834e8023609e625d04c2d9acd77f41 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result new file mode 100644 index 0000000000000000000000000000000000000000..1ee7d8f6570b8a15abf80cf605668b5ad0c892fa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result new file mode 100644 index 0000000000000000000000000000000000000000..5b51851660e7a4bfc82904776905c533139f7561 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_drop_column.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..ff22175ec06cba2baaf07dc391dd921a7c2dd892 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result new file mode 100644 index 0000000000000000000000000000000000000000..fac8246771260c69ef907f6d09467bdcd5415089 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_reindex.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result new file mode 100644 index 0000000000000000000000000000000000000000..71fc442dd6fdda8adecfd546456d4e12f4365a02 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_stored_update.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "shutdown"} "shutdown" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result new file mode 100644 index 0000000000000000000000000000000000000000..27c9effc2ba5775ccc0d5ade8760160169c3b14d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result new file mode 100644 index 0000000000000000000000000000000000000000..260c774e200f536cd51a484b11a825cef654f76f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs; +id record message +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result new file mode 100644 index 0000000000000000000000000000000000000000..bc9339ab0745de35d4fbb2ae8df249a54db30339 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_drop_column.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..92463c945950834d36f13ca2270a4586c4ed3339 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result new file mode 100644 index 0000000000000000000000000000000000000000..1a502edf29bc8da4c472b4beeb41ddf3bb8f08c3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_add_index.result @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +ALTER TABLE logs ADD INDEX (message); +ERROR HY000: mroonga: storage: failed to create index: Index for virtual generated column is not supported: message +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result new file mode 100644 index 0000000000000000000000000000000000000000..16acc89bf09aa84e7dd553aa4f844543d95caa74 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.result @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL, +FULLTEXT INDEX (message) +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +ERROR HY000: mroonga: storage: failed to create index: Index for virtual generated column is not supported: message diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result new file mode 100644 index 0000000000000000000000000000000000000000..93046e39ba5a642dbb6422a14b936b9099fb6d1c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_mysql_5_7_or_later_add_index.result @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +ALTER TABLE logs ADD INDEX (message); +ERROR HY000: Table storage engine 'Mroonga' does not support the create option 'Index on virtual generated column' +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result new file mode 100644 index 0000000000000000000000000000000000000000..c4e46d0d4f33497ffb861186877f9b86cf3b2b41 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_generated_virtual_update.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "shutdown"} "shutdown" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result index 724d20edd623d19e402139983cd768258a8af097..f9fc836627062a3eb800877ad0d4734538a9e95e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_fulltext_vector_other_table.result @@ -14,12 +14,17 @@ FULLTEXT INDEX bugs_tags_index (tags) COMMENT 'table "tags"' INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); SELECT mroonga_command("dump --dump_plugins no --dump_records no"); mroonga_command("dump --dump_plugins no --dump_records no") -table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit -column_create tags name COLUMN_SCALAR ShortText - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit +column_create tags name COLUMN_SCALAR ShortText + column_create bugs tags COLUMN_VECTOR tags column_create tags bugs_tags_index COLUMN_INDEX|WITH_POSITION bugs tags diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result index aa7735ef7804953d300669d1ee8ca8fd7631da2d..0f57885cdb9bbd12ad7d27226b8cc4d6b45153fc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_index_int_other_table.result @@ -15,15 +15,20 @@ INSERT INTO bugs (id, priority) VALUES (2, 3); INSERT INTO bugs (id, priority) VALUES (3, -2); SELECT mroonga_command("dump --dump_plugins no --dump_records no"); mroonga_command("dump --dump_plugins no --dump_records no") -table_create priorities TABLE_PAT_KEY Int32 -column_create priorities id COLUMN_SCALAR Int32 - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create priorities TABLE_PAT_KEY Int32 +column_create priorities id COLUMN_SCALAR Int32 + column_create bugs priority COLUMN_SCALAR priorities -column_create priorities bugs_priority_index COLUMN_INDEX|WITH_POSITION bugs priority +column_create priorities bugs_priority_index COLUMN_INDEX bugs priority SELECT * FROM bugs WHERE priority = 3; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.result new file mode 100644 index 0000000000000000000000000000000000000000..a9c917f8c8fe26d3233ff1cca522a494e46e70bf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_support_zstd.result @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS entries; +CREATE TABLE entries ( +id INT UNSIGNED PRIMARY KEY, +content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' +) DEFAULT CHARSET=utf8; +INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); +SELECT * FROM entries; +id content +1 I found Mroonga that is a MySQL storage engine to use Groonga! +DROP TABLE entries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zstd.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zstd.result new file mode 100644 index 0000000000000000000000000000000000000000..b2bb3b89c13183ddca5e29467e5e3d2055a471d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_scalar_unsupport_zstd.result @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS entries; +CREATE TABLE entries ( +id INT UNSIGNED PRIMARY KEY, +content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' +) DEFAULT CHARSET=utf8; +Warnings: +Warning 16506 The column flag 'COMPRESS_ZSTD' is unsupported. It is ignored +INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); +SELECT * FROM entries; +id content +1 I found Mroonga that is a MySQL storage engine to use Groonga! +DROP TABLE entries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result index 515dad1da2e1d63fdd9bee8afd7b2a2ac7b1238e..a6afe72faffc520719a2d50a5d61cbe5d89394a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_groonga_vector_reference.result @@ -6,8 +6,15 @@ COLLATE=utf8_bin COMMENT='default_tokenizer "TokenDelimit"'; CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, -tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' +tags VARCHAR(128) DEFAULT '' COMMENT 'flags "COLUMN_VECTOR", type "tags"' ) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE bugs; +Table Create Table +bugs CREATE TABLE `bugs` ( + `id` int(10) unsigned NOT NULL, + `tags` varchar(128) DEFAULT '' COMMENT 'flags "COLUMN_VECTOR", type "tags"', + PRIMARY KEY (`id`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); SELECT * FROM bugs; id tags diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..e6a3aa5ea89ec35a5a9b7155c04f1a8f451247e8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_json_insert.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; +INSERT INTO logs VALUES ('{"message": "start"}'); +INSERT INTO logs VALUES ('{"message": "restart"}'); +INSERT INTO logs VALUES ('{"message": "shutdown"}'); +SELECT * FROM logs; +record +{"message": "start"} +{"message": "restart"} +{"message": "shutdown"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result new file mode 100644 index 0000000000000000000000000000000000000000..eb1a08f2cd3d3146b05f5dd7ab5a7cf7d8ad7391 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_cp932.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +–¼‘O text, +FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932; +INSERT INTO users VALUES ("‚â‚Ü‚¾"); +INSERT INTO users VALUES ("‚½‚È‚©"); +INSERT INTO users VALUES ("‚·‚¸‚«"); +SELECT * FROM users; +–¼‘O +‚â‚Ü‚¾ +‚½‚È‚© +‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +–¼‘O +‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_NO_KEY +column_create users @540d@524d COLUMN_SCALAR LongText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result new file mode 100644 index 0000000000000000000000000000000000000000..6f63b5b385614f9107f3a822db4ec4e4722598ea --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_multibyte_utf8.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +åå‰ text, +FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8; +INSERT INTO users VALUES ("ã‚„ã¾ã "); +INSERT INTO users VALUES ("ãŸãªã‹"); +INSERT INTO users VALUES ("ã™ãšã"); +SELECT * FROM users; +åå‰ +ã‚„ã¾ã  +ãŸãªã‹ +ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +åå‰ +ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_NO_KEY +column_create users @540d@524d COLUMN_SCALAR LongText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users @540d@524d +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result index 9c2a8e876e30f660a6ee90a90f287e6abb7d2485..35434a00160f4a4a248769b9c93b1934ab916660 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_fractional_seconds_with_index.result @@ -6,16 +6,6 @@ average TIME(6), max TIME(6), KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `average` time(6) DEFAULT NULL, - `max` time(6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `average` (`average`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00.000001", "01:05:00.000001"); INSERT INTO running_records (title, average, max) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result index da75fd97424b21912b2a6557a0bee1805b3288ef..a0b0350a8e3a1fc0c9a4b665404dc54657f06bec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_time_with_index.result @@ -6,16 +6,6 @@ average TIME, max TIME, KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `average` time DEFAULT NULL, - `max` time DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `average` (`average`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00", "01:05:00"); INSERT INTO running_records (title, average, max) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result index da245535f2c3cd006009a6d35370f7b3b03ea65a..7ccb1fa234b9bda0a6b03fb8ba9bd0127289f3eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result @@ -6,16 +6,6 @@ created_at TIMESTAMP(6), updated_at TIMESTAMP(6), KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), - `updated_at` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000', - PRIMARY KEY (`id`), - KEY `updated_at` (`updated_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", "2012-01-29 21:51:01.111111", diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result index b310de481114eabb619f31e6a42c2a7ae7ba20be..4c221d9ecb636482997ad70dc1ba6a15122122af 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result @@ -2,20 +2,10 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, -created_at TIMESTAMP, -updated_at TIMESTAMP, +created_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', +updated_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`), - KEY `updated_at` (`updated_at`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", "2012-01-29 21:51:01", "2012-01-29 21:51:02"); INSERT INTO diaries (title, created_at, updated_at) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result index 3ee91c1a408096ba38d17104c69f9bde9a513de9..be97d4fc9cb5234b1b91dc893b29bf146cfe842b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_with_index.result @@ -5,15 +5,6 @@ title TEXT, party_year YEAR, KEY (party_year) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; -Table Create Table -aniversary_memos CREATE TABLE `aniversary_memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `party_year` year(4) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `party_year` (`party_year`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); INSERT INTO aniversary_memos (title, party_year) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result index 254a0c0718af3b0e2c922c3050edb183fa98be4c..a56271bccf152914e972ab9bc53d06238136f968 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_year_without_index.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, party_year YEAR ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; -Table Create Table -aniversary_memos CREATE TABLE `aniversary_memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `party_year` year(4) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); INSERT INTO aniversary_memos (title, party_year) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/count_star.result b/storage/mroonga/mysql-test/mroonga/storage/r/count_star.result new file mode 100644 index 0000000000000000000000000000000000000000..ab6be3a7b77e04e4eb42e8ce094bb60c65f49fa2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/count_star.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int PRIMARY KEY +); +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +SELECT COUNT(*) FROM ids; +COUNT(*) +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_comment.result similarity index 60% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_comment.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_comment.result index af3c19e9bb086e90594a3ca3338dd493546bfd63..e4c4ea059e7f6875127d26ae24c419f741cbe2b3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_comment.result @@ -7,4 +7,9 @@ mroonga_command("dump --dump_plugins no") table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 column_create bugs tags COLUMN_VECTOR LongText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_parameter.result similarity index 59% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_parameter.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_parameter.result index 9e089e53f498bac182951d8936904b4e6c9948e5..9923b91f477f68293f3741a94a11dba172df732e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_flags_parameter.result @@ -2,16 +2,14 @@ CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, tags TEXT FLAGS='COLUMN_VECTOR' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE bugs; -Table Create Table -bugs CREATE TABLE `bugs` ( - `id` int(10) unsigned NOT NULL, - `tags` text `FLAGS`='COLUMN_VECTOR', - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 column_create bugs tags COLUMN_VECTOR LongText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_comment.result similarity index 70% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_comment.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_comment.result index 5e5980ac62bd37a1c87dea88ba7471d775bfdfb1..7dede8671367ae6fb255c3ebb6120752c5b2cb5f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_comment.result @@ -7,12 +7,17 @@ tag VARCHAR(64) COMMENT 'groonga_type "tags"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create tags TABLE_PAT_KEY ShortText -column_create tags name COLUMN_SCALAR ShortText - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText + column_create bugs tag COLUMN_SCALAR tags DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_nonexistent.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_nonexistent.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_nonexistent.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_parameter.result similarity index 74% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_parameter.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_parameter.result index 24941f043c78a6079b1465bcdc6ce7be49c13eeb..89e28aea6cf6cef1ea9ff75d507a95bbc8869f25 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_groonga_type_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_groonga_type_parameter.result @@ -10,17 +10,21 @@ Table Create Table bugs CREATE TABLE `bugs` ( `id` int(10) unsigned NOT NULL, `tag` varchar(64) DEFAULT NULL `GROONGA_TYPE`='tags', - PRIMARY KEY (`id`), - CONSTRAINT `tag` FOREIGN KEY (`tag`) REFERENCES `test`.`tags` (`name`) ON DELETE RESTRICT ON UPDATE RESTRICT + PRIMARY KEY (`id`) ) ENGINE=Mroonga DEFAULT CHARSET=utf8 SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create tags TABLE_PAT_KEY ShortText -column_create tags name COLUMN_SCALAR ShortText - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText + column_create bugs tag COLUMN_SCALAR tags DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_comment.result similarity index 70% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_comment.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_comment.result index dc3f39d286e8868a2ae691abb350d27190a3c813..357adfdfbd431ec3964d46e042ddc77a5c42391b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_comment.result @@ -7,12 +7,17 @@ tag VARCHAR(64) COMMENT 'type "tags"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create tags TABLE_PAT_KEY ShortText -column_create tags name COLUMN_SCALAR ShortText - table_create bugs TABLE_PAT_KEY UInt32 column_create bugs id COLUMN_SCALAR UInt32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create tags TABLE_PAT_KEY ShortText +column_create tags name COLUMN_SCALAR ShortText + column_create bugs tag COLUMN_SCALAR tags DROP TABLE bugs; DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_nonexistent.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/create_table_field_type_nonexistent.result rename to storage/mroonga/mysql-test/mroonga/storage/r/create_table_column_type_nonexistent.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result index 9302037b7e10718ffdac31b3037abea5f3e5d844..0c33fac1deb94d70d7cdefcca677388ddc088980 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_default_tokenizer.result @@ -5,6 +5,11 @@ COLLATE=utf8_bin COMMENT='default_tokenizer "TokenDelimit"'; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + table_create tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit column_create tags name COLUMN_SCALAR ShortText DROP TABLE tags; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result index 828de3ebbadc45a9e8fd019681b5cde6fc1ce345..8d39cac4ee87d707c93f6796c61e2ccb68820c44 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_comment.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'flags "WITH_POSITION|WITH_WEIGHT"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content +column_create memos#content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_medium.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_medium.result new file mode 100644 index 0000000000000000000000000000000000000000..e9d90b0bd4808f1f180906c077872f56ec4d58f6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_medium.result @@ -0,0 +1,10 @@ +SET NAMES utf8; +CREATE TABLE memos ( +content VARCHAR(64) NOT NULL, +content_size INT NOT NULL, +KEY (content_size) COMMENT 'flags "INDEX_MEDIUM"' +) DEFAULT CHARSET=utf8; +SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); +mroonga_command("dump --dump_plugins no --dump_schema no") +column_create memos#content_size index COLUMN_INDEX|INDEX_MEDIUM memos content_size +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result new file mode 100644 index 0000000000000000000000000000000000000000..38a83b899a37f1b64c5c65db7513e7f8f69072a1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_index_small.result @@ -0,0 +1,10 @@ +SET NAMES utf8; +CREATE TABLE memos ( +content VARCHAR(64) NOT NULL, +is_read BOOL NOT NULL, +KEY (is_read) COMMENT 'flags "INDEX_SMALL"' +) DEFAULT CHARSET=utf8; +SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); +mroonga_command("dump --dump_plugins no --dump_schema no") +column_create memos#is_read index COLUMN_INDEX|INDEX_SMALL memos is_read +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result index b5368b433e641c41a6b5f4a423703e519b1e1a7e..e90fd833d1705438cd9de7667a20c954429e12ff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_none.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'flags "NONE"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX memos content +column_create memos#content index COLUMN_INDEX memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result index 7e0d29a1e1f8a7bb41a6fda59c5555fb1312bec7..8fbbd197f6c9b8b26435969f063cc351fbd5d41d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_flags_parameter.result @@ -11,5 +11,5 @@ memos CREATE TABLE `memos` ( ) ENGINE=Mroonga DEFAULT CHARSET=utf8 SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content +column_create memos#content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result index c9283db72bb60e1a2a1cb3b4d762854e8e00cc25..3d31400fbbebdfea7788bdc371b0577de3bfd2a9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_none.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX memos content +column_create memos#content index COLUMN_INDEX memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result index 853845d5c15992e3029e86b61d79ac5e4ca43d07..8f0c49953433311c39931c126d41a639f0a1a585 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_index_flags_with_position_and_with_weight.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content +column_create memos#content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_fulltext_index_bin.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_fulltext_index_bin.result new file mode 100644 index 0000000000000000000000000000000000000000..b6da79c72c929a2f90a6af47535ccaf3b27cf0c3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_fulltext_index_bin.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +content VARCHAR(64) NOT NULL, +FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んã ã€‚"); +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ãµã‚‰ã¤ã" IN BOOLEAN MODE); +day content +SELECT * FROM diaries +WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); +day content +2013-04-23 ブラックコーヒーを飲んã ã€‚ +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result new file mode 100644 index 0000000000000000000000000000000000000000..2a05ccdc62ca74e8333ea71c04921696fa106713 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_normalizer_index_bin.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +day DATE PRIMARY KEY, +content VARCHAR(64) NOT NULL, +INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +SELECT mroonga_command("dump --dump_plugins no"); +mroonga_command("dump --dump_plugins no") +table_create diaries TABLE_PAT_KEY Time +column_create diaries content COLUMN_SCALAR ShortText +column_create diaries day COLUMN_SCALAR Time + +table_create diaries#content TABLE_PAT_KEY ShortText --normalizer NormalizerAuto + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create diaries#content index COLUMN_INDEX diaries content +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result index 4088caf49d51c6ab3ae433fc98952ef11cc89971..29f27d156f1bc3532df74b8be098e2ff7f281cec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_comment.result @@ -5,15 +5,11 @@ body text, FULLTEXT INDEX body_index (body) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead INSERT INTO diaries (body) VALUES ("will start Groonga!"); +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); SELECT * FROM diaries; @@ -29,3 +25,5 @@ id body 2 starting Groonga... 3 started Groonga. DROP TABLE diaries; +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result index a18614d19fc9b533119749118a2a5207bfabb004..7f9ddd50e92312a111ef3e8e1667d963573f3d03 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_default.result @@ -6,14 +6,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result index 77765f61dc306a84f5f16d086c0f4ce8d6c6c5c9..320fb9a5635b3d20ae594197dd5e26b50335608d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_parser_off.result @@ -4,15 +4,11 @@ id INT PRIMARY KEY AUTO_INCREMENT, name TEXT, FULLTEXT INDEX (name) COMMENT 'parser "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; -Table Create Table -variables CREATE TABLE `variables` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `name` (`name`) COMMENT 'parser "off"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead INSERT INTO variables (name) VALUES ("mroonga_default_parser"); INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); INSERT INTO variables (name) VALUES ("mroonga_dry_write"); @@ -40,3 +36,5 @@ id name 3 mroonga_default_wrapper_engine 2 mroonga_default_parser DROP TABLE variables; +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result index c730bafc8e315b923ac100bcfb3cafc39aad97fa..ad68ca010cca922dca06d44bdea47fbac568f254 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_multiple_token_filters.result @@ -11,7 +11,12 @@ mroonga_command("dump --dump_plugins no") table_create memos TABLE_NO_KEY column_create memos content COLUMN_SCALAR ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result index e0809eb0f4b8ff977d0a462272c4cfb44b9185a0..2cbb5a6b2e7727d8615095e1c3c5ac40de86e5ec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_one_token_filter.result @@ -11,7 +11,12 @@ mroonga_command("dump --dump_plugins no") table_create memos TABLE_NO_KEY column_create memos content COLUMN_SCALAR ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result index df529282a91682acaeab0953247e54099f93519d..333cf3d5d1f00e95123dee6427830d63d3758460 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_token_filters_parameter.result @@ -17,7 +17,12 @@ mroonga_command("dump --dump_plugins no") table_create memos TABLE_NO_KEY column_create memos content COLUMN_SCALAR ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos content +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result index 5b8d0cd780e1fc662e63e3c02fd7acffa91872ce..a390421684a3da70a029ed32753c79e8ba644d01 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_comment.result @@ -5,14 +5,6 @@ body text, FULLTEXT INDEX body_index (body) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result index 9efa08bab53f2ba04a89081644491c8d0e392b38..34545ecc30a3e980a1361d23a4d270cc8d477606 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_default.result @@ -6,14 +6,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result index 780ac2faa3d1772c9eebadad059732b7a67e44fb..91a5b96d184d6e77b760570bc2aebf92b0edeb26 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_off.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, name TEXT, FULLTEXT INDEX (name) COMMENT 'tokenizer "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; -Table Create Table -variables CREATE TABLE `variables` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `name` (`name`) COMMENT 'tokenizer "off"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); INSERT INTO variables (name) VALUES ("mroonga_default_tokenizer"); INSERT INTO variables (name) VALUES ("mroonga_default_wrapper_engine"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result index 671709258267149f2d46893935c1e82f91427ec2..c827abe2cf49dbabd78b48ef522e9b1fa2df1b17 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_index_tokenizer_parameter.result @@ -4,14 +4,6 @@ id int PRIMARY KEY AUTO_INCREMENT, body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) `TOKENIZER`='TokenBigramSplitSymbolAlphaDigit' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result index 6308b33d4cf0993df2ac3e8d81040a994d36ccb3..8934be78d47617b48f8cb56ebda1b02bf21d955d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_multiple_token_filters.result @@ -12,14 +12,19 @@ FULLTEXT INDEX (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord -column_create terms is_stop_word COLUMN_SCALAR Int8 -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord +column_create terms is_stop_word COLUMN_SCALAR Int8 +column_create terms term COLUMN_SCALAR ShortText + column_create terms content COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result index 2f4a90d40865c384a8ee51c888cec8eb79ed5d36..e3df285093b7aed13103eb7299e5cd5607701ea1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/create_table_table_token_filters_one_token_filter.result @@ -12,14 +12,19 @@ FULLTEXT INDEX (content) COMMENT 'table "terms"' ) DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") -table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord -column_create terms is_stop_word COLUMN_SCALAR Int8 -column_create terms term COLUMN_SCALAR ShortText - table_create memos TABLE_PAT_KEY Int32 column_create memos content COLUMN_SCALAR LongText column_create memos id COLUMN_SCALAR Int32 +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord +column_create terms is_stop_word COLUMN_SCALAR Int8 +column_create terms term COLUMN_SCALAR ShortText + column_create terms content COLUMN_INDEX|WITH_POSITION memos content DROP TABLE memos; DROP TABLE terms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_no_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_no_table.result new file mode 100644 index 0000000000000000000000000000000000000000..ebc7db1cf37b52d2ce0d988526e7bf359bbbefc5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/drop_database_no_table.result @@ -0,0 +1,20 @@ +SET NAMES UTF8; +DROP DATABASE IF EXISTS another; +CREATE DATABASE another; +USE another; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX (title) +); +DROP TABLE diaries; +USE test; +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT INDEX (title) +); +DROP DATABASE another; +SELECT mroonga_command('object_exist mroonga_operations'); +mroonga_command('object_exist mroonga_operations') +true +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result new file mode 100644 index 0000000000000000000000000000000000000000..bfb263f11b5723d02e8d83eaba69eb9321c2dbdf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL +); +CREATE TABLE articles ( +content text NOT NULL, +comment int unsigned +); +ALTER TABLE articles ADD FOREIGN KEY (comment) REFERENCES comments (comment); +SHOW CREATE TABLE articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +DROP TABLE articles; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result new file mode 100644 index 0000000000000000000000000000000000000000..101a4a3de4b141935850b27d42021719b8eb34e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL +); +CREATE TABLE articles ( +content text NOT NULL, +comment int unsigned, +FOREIGN KEY (comment) REFERENCES comments (comment) +); +ALTER TABLE articles DROP FOREIGN KEY comment; +SHOW CREATE TABLE articles; +Table Create Table +articles CREATE TABLE `articles` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`) +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +DROP TABLE articles; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result index fc550d97f87f0b9f6dc0ca029fb9906e1082ce30..c17780c0441f19971c3bee735c9dfc808ca8f41c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result @@ -1,134 +1,15 @@ -drop table if exists articles2; -drop table if exists articles; -drop table if exists comments2; -drop table if exists comments; -create table comments( -comment int unsigned, -content text not null, -primary key(comment) -); -create table articles( -content text not null, -comment int unsigned, -FOREIGN KEY (comment) REFERENCES comments (comment) -); -insert into comments (comment, content) values -(1, 'aaa bbb'),(2, 'ccc ddd'),(3, 'eee fff'); -insert into articles (content, comment) values -('111aaa', 1),('222bbb', 2),('222ccc', 2); -select comment, content from comments; -comment content -1 aaa bbb -2 ccc ddd -3 eee fff -select content, comment from articles; -content comment -111aaa 1 -222bbb 2 -222ccc 2 -show create table comments; -Table Create Table -comments CREATE TABLE `comments` ( - `comment` int(10) unsigned NOT NULL DEFAULT '0', - `content` text NOT NULL, - PRIMARY KEY (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table articles; -Table Create Table -articles CREATE TABLE `articles` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`), - CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select * from information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments -rename table comments to comments2; -rename table articles to articles2; -create table comments( -comment int unsigned, -content text not null, -primary key(comment) +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL ); -create table articles( -content text not null, +CREATE TABLE articles ( +content text NOT NULL, comment int unsigned, FOREIGN KEY (comment) REFERENCES comments (comment) ); -insert into comments (comment, content) values -(1, 'ab'),(2, 'cd'),(3, 'ef'); -insert into articles (content, comment) values -('1a', 1),('2b', 2),('2c', 2); -select comment, content from comments; -comment content -1 ab -2 cd -3 ef -select content, comment from articles; -content comment -1a 1 -2b 2 -2c 2 -select comment, content from comments2; -comment content -1 aaa bbb -2 ccc ddd -3 eee fff -select content, comment from articles2; -content comment -111aaa 1 -222bbb 2 -222ccc 2 -show create table comments; -Table Create Table -comments CREATE TABLE `comments` ( - `comment` int(10) unsigned NOT NULL DEFAULT '0', - `content` text NOT NULL, - PRIMARY KEY (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table articles; -Table Create Table -articles CREATE TABLE `articles` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`), - CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table comments2; -Table Create Table -comments2 CREATE TABLE `comments2` ( - `comment` int(10) unsigned NOT NULL DEFAULT '0', - `content` text NOT NULL, - PRIMARY KEY (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -show create table articles2; -Table Create Table -articles2 CREATE TABLE `articles2` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`), - CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments2` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select * from information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles2 comments2 -alter table articles drop foreign key comment; -show create table articles; -Table Create Table -articles CREATE TABLE `articles` ( - `content` text NOT NULL, - `comment` int(10) unsigned DEFAULT NULL, - KEY `comment` (`comment`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select content, comment from articles; -content comment -1a 1 -2b 2 -2c 2 -alter table articles add FOREIGN KEY (comment) REFERENCES comments (comment); -show create table articles; +SHOW CREATE TABLE articles; Table Create Table articles CREATE TABLE `articles` ( `content` text NOT NULL, @@ -136,12 +17,6 @@ articles CREATE TABLE `articles` ( KEY `comment` (`comment`), CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE=Mroonga DEFAULT CHARSET=latin1 -select content, comment from articles; -content comment -1a 1 -2b 2 -2c 2 -drop table articles2; -drop table articles; -drop table comments2; -drop table comments; +SELECT * FROM information_schema.referential_constraints; +DROP TABLE articles; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result new file mode 100644 index 0000000000000000000000000000000000000000..e16157b439f8ac23ce89f52025c191d30e7de0e5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_existent.result @@ -0,0 +1,53 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +DELETE FROM comments WHERE id = 100; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (one or more child rows exist in ) +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result new file mode 100644 index 0000000000000000000000000000000000000000..edaba25fad84a07014fb0c5eb4064cb77ad00bda --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_delete_nonexistent.result @@ -0,0 +1,53 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +DELETE FROM comments WHERE id = 200; +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result new file mode 100644 index 0000000000000000000000000000000000000000..ddc54cb3f9e3fda10968fbe7f0900b66210c19c1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_existent.result @@ -0,0 +1,51 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result new file mode 100644 index 0000000000000000000000000000000000000000..c220bb8970ba01dfd1b2abbec95d4853edc5f37a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_insert_nonexistent.result @@ -0,0 +1,37 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 1); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (foreign record doesn't exist: :<1>) +SELECT * FROM entries; +content comment_id +SELECT * FROM comments; +id content +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result new file mode 100644 index 0000000000000000000000000000000000000000..5ea0ae3e3acda72c137e58bcee8c331cefd8fa03 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_rename.result @@ -0,0 +1,28 @@ +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +DROP TABLE IF EXISTS articles2; +DROP TABLE IF EXISTS comments2; +CREATE TABLE comments ( +comment int unsigned PRIMARY KEY, +content text NOT NULL +); +CREATE TABLE articles ( +content text NOT NULL, +comment int unsigned, +FOREIGN KEY (comment) REFERENCES comments (comment) +); +RENAME TABLE comments TO comments2; +RENAME TABLE articles TO articles2; +SHOW CREATE TABLE articles2; +Table Create Table +articles2 CREATE TABLE `articles2` ( + `content` text NOT NULL, + `comment` int(10) unsigned DEFAULT NULL, + KEY `comment` (`comment`), + CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments2` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE=Mroonga DEFAULT CHARSET=latin1 +SELECT * FROM information_schema.referential_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME +def test comment def test PRIMARY NONE RESTRICT RESTRICT articles2 comments2 +DROP TABLE articles2; +DROP TABLE comments2; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result new file mode 100644 index 0000000000000000000000000000000000000000..9db892d5d2d5ffcf13b692144d73f0dfa0f35f28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_existent.result @@ -0,0 +1,55 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; +SELECT * FROM entries; +content comment_id +Hello! 200 +SELECT * FROM comments; +id content +100 Good entry! +200 Very good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100], +[200,"Very good entry!",200] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,200,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result new file mode 100644 index 0000000000000000000000000000000000000000..615c3a0903ad4fe562d4e9ed956f92318344c6e1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_update_nonexistent.result @@ -0,0 +1,53 @@ +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE TABLE comments ( +id int unsigned PRIMARY KEY, +content varchar(140) NOT NULL +); +CREATE TABLE entries ( +content varchar(140) NOT NULL, +comment_id int unsigned, +FOREIGN KEY (comment_id) REFERENCES comments (id) +); +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (foreign record doesn't exist: :<200>) +SELECT * FROM entries; +content comment_id +Hello! 100 +SELECT * FROM comments; +id content +100 Good entry! +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create comments TABLE_PAT_KEY UInt32 +column_create comments content COLUMN_SCALAR ShortText +column_create comments id COLUMN_SCALAR UInt32 + +table_create entries TABLE_NO_KEY +column_create entries content COLUMN_SCALAR ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create entries comment_id COLUMN_SCALAR comments + +load --table comments +[ +["_key","content","id"], +[100,"Good entry!",100] +] + +load --table entries +[ +["_id","comment_id","content"], +[1,100,"Hello!"] +] + +column_create comments entries-comment_id----------------------------------------------- COLUMN_INDEX entries comment_id +DROP TABLE entries; +DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result index a48eb25dece33e36cd88b999c8ac474f7eca7a39..5beda03ceb6958616687ee1cbcbfc39d15003de4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_escape.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET NAMES UTF8; CREATE TABLE memos ( id INT PRIMARY KEY, @@ -15,4 +15,4 @@ id content 1 (groonga) Installed! 3 (groonga) Upgraded! DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result index d0e1a68f76ba1263732ad793c5ee91ca2a710d76..758f969feb8a8027368626c4942efbf5aea2989b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_leading_not.result @@ -6,15 +6,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result new file mode 100644 index 0000000000000000000000000000000000000000..deb4bd85385c191e9cf1216e7665571f24bc1603 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_operator.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES utf8; +CREATE TABLE diaries ( +id INT PRIMARY KEY, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); +INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); +SELECT *, MATCH(title, content) +AGAINST("*SS content @ '天気'" in BOOLEAN MODE) AS score +FROM diaries +WHERE MATCH(title, content) +AGAINST("*SS content @ '天気'" in BOOLEAN MODE); +id title content score +2 天気 明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„㦠1 +3 富士山 今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚ 1 +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result new file mode 100644 index 0000000000000000000000000000000000000000..43b21bc1cd85a66b6fc8190dd93f209b13773f94 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_pragma_syntax_script_selector.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS items; +DROP TABLE IF EXISTS readings; +SET NAMES utf8; +CREATE TABLE readings ( +reading VARCHAR(255) PRIMARY KEY +) DEFAULT CHARSET=utf8 +COLLATE=utf8_bin +COMMENT='default_tokenizer "TokenDelimit"'; +CREATE TABLE items ( +name VARCHAR(255) PRIMARY KEY, +readings TEXT COMMENT 'flags "COLUMN_VECTOR", type "readings"', +FULLTEXT INDEX items_index(readings) COMMENT 'table "readings"' +) DEFAULT CHARSET=utf8; +INSERT INTO items VALUES("日本", "ニホン ニッãƒãƒ³"); +INSERT INTO items VALUES("ローマ字", "ローマジ"); +INSERT INTO items VALUES("漢字", "カンジ"); +SELECT *, MATCH(readings) +AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE) AS score +FROM items +WHERE MATCH(readings) +AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE); +name readings score +日本 ニホン ニッãƒãƒ³ 1 +DROP TABLE items; +DROP TABLE readings; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result index 5746ce89cb75b084f9dd1800973491a054cd14f5..46dd3290565a8088dbe9f636a9324eef966e90cf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); ERROR 42000: failed to parse fulltext search keyword: <(groonga>: > DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result index 1811994b67efe30fafc64a3de20969594e456154..d782357eef44b82bba2e9d30143a33e88d8e4263 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_error_and_log.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR_AND_LOG; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); ERROR 42000: failed to parse fulltext search keyword: <(groonga>: > DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result index 6a4759963a3db7ff0f3eb3f9c71d43e13eec2e36..fd5b8d1e0ea609fbebe522ee12ca3a495c26887a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = "IGNORE"; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); id content DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result index 384d677c4276b37c75065db33445b74c739b4abe..a485e1cad6972ffd1ed9e45a86ce635652125f30 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_boolean_mode_syntax_error_ignore_and_log.result @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS memos; -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = IGNORE_AND_LOG; SET NAMES UTF8; CREATE TABLE memos ( @@ -14,4 +14,4 @@ SELECT * FROM memos WHERE MATCH(content) AGAINST("(groonga" IN BOOLEAN MODE); id content DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result index 31d45181c96026ccf873623a6b89b27324d56b79..136585c38eb024216876dbb2dc0652435c359818 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_charset_utf8mb4.result @@ -6,15 +6,6 @@ title VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_general_ci, content TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci, FULLTEXT INDEX (content) ) DEFAULT CHARSET utf8mb4; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 INSERT INTO diaries VALUES(1, "Alphabet", "ABCDE"); INSERT INTO diaries VALUES(2, "Mathmatics", "ð€ðð‚ðƒð„ | U+1D400-U+1D405"); INSERT INTO diaries VALUES(3, "ã²ã‚‰ãŒãª", "ã‚ã„ã†ãˆãŠ"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result index c107991d151ca3b04f40876e9704dae58cfc647a..25da7011aa458ef53e19a77fac9c158bd8f46ea1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_found_rows.result @@ -10,19 +10,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result index 04996d30f36eebfc07e4ef782a4d3d5cd9845f92..e38913a63c1b042c31e7c80516a1e92f85383a39 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_index_recreate.result @@ -6,15 +6,6 @@ title varchar(255), content text, fulltext index (title) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result index 623c66daaf4cf1647bbbe508ad4bb8488a5b87cf..5c48cadf5684f80404c917e0f1150a4e32c25e91 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_insert_values.result @@ -1,13 +1,5 @@ drop table if exists t1, t2, t3; create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` text, - PRIMARY KEY (`c1`), - FULLTEXT KEY `ft` (`c2`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result index 843c4b958ba0da37aee44ff447562238d24515fc..6475f9ec7e960485c89669b92e21f05c980c12bd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_delete.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result index 3856d7ecc108ce8e887d0fd5530337b42027ee1d..4244af26901c92d7bd9a4edd4b7963bcc10ee0a2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_insert.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result index 59b26574c73dda03af06b231c9b9217a979c748f..8d18efaa57103051b8c17fa7054ecaa3cbad563b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_recreate.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result index d17ff6adf83222ab2e36c7848cc67560329e9c7b..0e85b45ae5931f73cb152b44d45d800e6e58b213 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_column_index_update.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result index 81b40261a4c7f68f0fdf4b70c0db1d78fd817aa2..37d7597b1f3b81143f3de09c85b955dd8f80692c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_multiple_index.result @@ -6,16 +6,6 @@ body text, fulltext index title_index (title), fulltext index body_index (body) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (title, body) values ("survey", "will start groonga!"); insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); insert into diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result index 5f85632575b67b86d29a66ab345b440e1d6a3aed..db4afff0e9115c6b295a983ffe9f6b369bbde4a1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_no_primary_key.result @@ -5,13 +5,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `title` varchar(255) DEFAULT NULL, - `content` text, - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES("Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES("天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES("富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_10_0_no_such_key.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_100_no_such_key.result rename to storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_10_0_no_such_key.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_5_no_such_key.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_55_no_such_key.result rename to storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_5_no_such_key.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_6_no_such_key.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_56_no_such_key.result rename to storage/mroonga/mysql-test/mroonga/storage/r/fulltext_version_5_6_no_such_key.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result new file mode 100644 index 0000000000000000000000000000000000000000..e07eae11ecdf46472467e900ee8da4440494e78f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_auto-escape.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS diaries; +SET NAMES UTF8; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +INSERT INTO diaries VALUES('It is Groonga'); +INSERT INTO diaries VALUES('It is Mroonga'); +SELECT mroonga_command('select', +'table', 'diaries', +'filter', 'title @ "Groonga"'); +mroonga_command('select', +'table', 'diaries', +'filter', 'title @ "Groonga"') +[[[1],[["_id","UInt32"],["title","LongText"]],[1,"It is Groonga"]]] +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result new file mode 100644 index 0000000000000000000000000000000000000000..e588408e9e2ddb54b3ba7c7604ea4245644b70d0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_command_special-database-name.result @@ -0,0 +1,22 @@ +DROP DATABASE IF EXISTS `db-1`; +CREATE DATABASE `db-1`; +USE `db-1`; +SET NAMES UTF8; +CREATE TABLE diaries ( +title TEXT, +FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; +SELECT mroonga_command('dump --dump_plugins no'); +mroonga_command('dump --dump_plugins no') +table_create diaries TABLE_NO_KEY +column_create diaries title COLUMN_SCALAR LongText + +table_create diaries#title TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create diaries#title index COLUMN_INDEX|WITH_POSITION diaries title +DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result index c17624581991dd0a57eb1e0ef6ce8add4a07bb70..bb68bbff1f5193775710e613ef1c14680d79b25a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_error_query_is_not_string.result @@ -1,3 +1,3 @@ SET NAMES UTF8; SELECT mroonga_escape(29) AS escaped_query; -ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 1st argument must be query as string +ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 1st query argument must be string diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_all.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_all.result rename to storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_all.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_custom.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_custom.result rename to storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_custom.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result new file mode 100644 index 0000000000000000000000000000000000000000..ec765b118ef4ba4a5a270381d4744262780abd28 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_join.result @@ -0,0 +1,26 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS users; +DROP TABLE IF EXISTS queries; +CREATE TABLE users ( +id INT +); +CREATE TABLE queries ( +user_id INT, +query TEXT +); +INSERT INTO users VALUES (1); +INSERT INTO users VALUES (2); +INSERT INTO users VALUES (3); +INSERT INTO queries VALUES (1, '(a)'); +INSERT INTO queries VALUES (2, '(b)'); +INSERT INTO queries VALUES (3, '(c)'); +SELECT users.id, mroonga_escape(queries.query) AS escaped_query +FROM queries +LEFT JOIN users ON users.id = queries.user_id +ORDER BY users.id; +id escaped_query +1 \(a\) +2 \(b\) +3 \(c\) +DROP TABLE queries; +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result new file mode 100644 index 0000000000000000000000000000000000000000..8b92ec4137e1ad22303f54bdb95fe070ca06c4f1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_match_against.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET GLOBAL mroonga_default_parser = TokenDelimit; +SET NAMES utf8mb4; +CREATE TABLE memos ( +id INT PRIMARY KEY, +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8mb4; +INSERT INTO memos VALUES(1, "(Groonga) Installed!"); +INSERT INTO memos VALUES(2, "(Mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(Groonga) Upgraded!"); +SELECT * FROM memos +WHERE MATCH(content) AGAINST(mroonga_escape("(groonga)") IN BOOLEAN MODE); +id content +1 (Groonga) Installed! +3 (Groonga) Upgraded! +DROP TABLE memos; +SET GLOBAL mroonga_default_parser = TokenBigram; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result new file mode 100644 index 0000000000000000000000000000000000000000..c6c39fccb10b2ed2c78819fd2263ada4c345e8bf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_named.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape('+-><~*()\"\\:' AS query) AS escaped_query; +escaped_query +\+\-\>\<\~\*\(\)\"\\\: diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_nested.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/function_escape_success_nested.result rename to storage/mroonga/mysql-test/mroonga/storage/r/function_escape_query_nested.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result new file mode 100644 index 0000000000000000000000000000000000000000..246f280005c8bf578863803f9407e8c56870bdaf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_decimal.result @@ -0,0 +1,11 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS data; +CREATE TABLE data ( +value DECIMAL(5, 3) +); +INSERT INTO data VALUES (2.9); +SELECT mroonga_escape(value AS script) +FROM data; +mroonga_escape(value AS script) +2.9 +DROP TABLE data; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result new file mode 100644 index 0000000000000000000000000000000000000000..902bbd31730cba5f244d487a1dc24f65f9a2e012 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_integer.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape(-29 AS script) AS escaped_query; +escaped_query +-29 diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result new file mode 100644 index 0000000000000000000000000000000000000000..178ff312332bde30faef69225cacaa98f40faecc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_real.result @@ -0,0 +1,11 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS data; +CREATE TABLE data ( +value REAL +); +INSERT INTO data VALUES (2.9); +SELECT mroonga_escape(value AS script) +FROM data; +mroonga_escape(value AS script) +2.9 +DROP TABLE data; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result new file mode 100644 index 0000000000000000000000000000000000000000..6f5e9b2a2c42822a89ae257ff9f3988b6bce7a2b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_escape_script_string.result @@ -0,0 +1,4 @@ +SET NAMES UTF8; +SELECT mroonga_escape('a\"\\\'z' AS script) AS escaped_query; +escaped_query +"a\"\\'z" diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result new file mode 100644 index 0000000000000000000000000000000000000000..96df65061d6fc7091736e134a65dc58a9bb14547 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_dynamic_keyword.result @@ -0,0 +1,11 @@ +CREATE TABLE keywords ( +keyword text +); +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', +keyword) AS highlighted +FROM keywords; +highlighted +Mroonga is the Groonga based storage engine. +Mroonga is the Groonga based storage engine. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result new file mode 100644 index 0000000000000000000000000000000000000000..ca7d796845d7a045630e7057e7169a0b8d768c2e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_japanese.result @@ -0,0 +1,13 @@ +SET NAMES utf8; +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック', 'æ›´æ–°') AS highlighted; +highlighted +Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚ diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result new file mode 100644 index 0000000000000000000000000000000000000000..9f4a3dffb5fefcf680749ab27e19b77c7cf2a8e8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_multiple_keywords.result @@ -0,0 +1,4 @@ +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', +'Mroonga', 'Groonga') AS highlighted; +highlighted +Mroonga is the Groonga based storage engine. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result new file mode 100644 index 0000000000000000000000000000000000000000..bf280dba0ace95dc020e19843804ad27e213f091 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_normalizer.result @@ -0,0 +1,4 @@ +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', +'mroonga') AS highlighted; +highlighted +Mroonga is the Groonga based storage engine. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result new file mode 100644 index 0000000000000000000000000000000000000000..b2d0f509f8bc882b71c3be7c70bdf7dec888cfdf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query.result @@ -0,0 +1,13 @@ +SET NAMES utf8; +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) AS highlighted; +highlighted +Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚ diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result new file mode 100644 index 0000000000000000000000000000000000000000..bd11a908bed7f480a572b336bf8b09693a8f1f2f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_query_pragma.result @@ -0,0 +1,13 @@ +SET NAMES utf8; +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) AS highlighted; +highlighted +Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚ diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result new file mode 100644 index 0000000000000000000000000000000000000000..fce13d9cd88b306ec018483dab593b847c5b96b6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_highlight_html_record.result @@ -0,0 +1,32 @@ +CREATE TABLE memos ( +content text +); +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); +SELECT mroonga_highlight_html(content, 'Mroonga') AS highlighted +FROM memos; +highlighted +Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL. +Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL's official binary. So we can use it more easily than Tritonn. +Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga's fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga's read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data. diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result new file mode 100644 index 0000000000000000000000000000000000000000..fe5cc8859227d10dbb0749c5cb3c484efcc16c61 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_default.result @@ -0,0 +1,3 @@ +SELECT mroonga_normalize('aBcAbCã‘'); +mroonga_normalize('aBcAbCã‘') +abcabcリットル diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result new file mode 100644 index 0000000000000000000000000000000000000000..3d675fb0e275f0f16408503ead7335371e831fe4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_normalizer.result @@ -0,0 +1,3 @@ +SELECT mroonga_normalize('aBcAbCã‘', "NormalizerAuto"); +mroonga_normalize('aBcAbCã‘', "NormalizerAuto") +abcabcリットル diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result new file mode 100644 index 0000000000000000000000000000000000000000..7d4192f620b6380806a427a557b1682f0b785d5a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_normalize_record.result @@ -0,0 +1,7 @@ +CREATE TABLE memos ( +content text +); +INSERT INTO memos VALUES ('aBcAbCã‘'); +SELECT mroonga_normalize(content) FROM memos; +mroonga_normalize(content) +abcabcリットル diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result new file mode 100644 index 0000000000000000000000000000000000000000..9160633c8fbe5912d5827b7c032e4aa65c454f49 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_multiple.result @@ -0,0 +1,18 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255), +INDEX (term) +); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +INSERT INTO synonyms VALUES ('Mroonga', 'Mroonga'); +INSERT INTO synonyms VALUES ('Mroonga', 'Groonga MySQL'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'Mroonga Rroonga PGroonga') AS query; +query +((Mroonga) OR (Groonga MySQL)) ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result new file mode 100644 index 0000000000000000000000000000000000000000..6a2b5d7a95affc8b00eca11120038c76aaad7df1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_no_index.result @@ -0,0 +1,15 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255) +); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'Mroonga Rroonga PGroonga') AS query; +query +Mroonga ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result new file mode 100644 index 0000000000000000000000000000000000000000..5f7b0f73c5791db37dd99bf9d1f40aa2b3fd3a17 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_one.result @@ -0,0 +1,16 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255), +INDEX (term) +); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'Mroonga Rroonga PGroonga') AS query; +query +Mroonga ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result new file mode 100644 index 0000000000000000000000000000000000000000..4690cd013a5f8ebc4d4624f00f621474e6e6395c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_query_expand_pragma.result @@ -0,0 +1,17 @@ +SET NAMES UTF8; +DROP TABLE IF EXISTS synonyms; +CREATE TABLE synonyms ( +term varchar(255), +synonym varchar(255), +INDEX (term) +); +INSERT INTO synonyms VALUES ('D+', '[D+]'); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +SELECT mroonga_query_expand('synonyms', +'term', +'synonym', +'*D+ Mroonga Rroonga PGroonga') AS query; +query +*D+ Mroonga ((Rroonga) OR (Groonga Ruby)) PGroonga +DROP TABLE synonyms; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result new file mode 100644 index 0000000000000000000000000000000000000000..24665fbfcfd582e4640930ca36b73188dcd04a4d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_dynamic_keyword.result @@ -0,0 +1,11 @@ +CREATE TABLE keywords ( +keyword text +); +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', +keyword) as snippet +FROM keywords; +snippet +
Mroonga is the Groonga based storage engine.
+
Mroonga is the Groonga based storage engine.
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result new file mode 100644 index 0000000000000000000000000000000000000000..f1efa42ccbde2329161a8a1ad7d6c7648d7b5fe2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_japanese.result @@ -0,0 +1,9 @@ +SET NAMES utf8; +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック', 'æ›´æ–°') as snippet; +snippet +
ãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚
用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒ
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result new file mode 100644 index 0000000000000000000000000000000000000000..013ad5b19969944f3b1f33ac08a886e00cc6de62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_keywords.result @@ -0,0 +1,4 @@ +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', +'Mroonga', 'Groonga') as snippet; +snippet +
Mroonga is the Groonga based storage engine.
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result new file mode 100644 index 0000000000000000000000000000000000000000..d3f790b3cff38fe6e3cd4904183801b906f537e1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_multiple_snippets.result @@ -0,0 +1,10 @@ +SELECT mroonga_snippet_html('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.', +'lock') as snippet; +snippet +
ng. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one
f the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga's read-lock free characteristic. And you might have the performance bottle neck in the storage engine in upda
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result new file mode 100644 index 0000000000000000000000000000000000000000..d05c2323b680e8aceff83f586bef0cd5cca1db37 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query.result @@ -0,0 +1,9 @@ +SET NAMES utf8; +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) as snippet; +snippet +
ãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚
用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒ
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result new file mode 100644 index 0000000000000000000000000000000000000000..02ce9098543d2dc1b3be67cdb2904c1c45f97f84 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_query_pragma.result @@ -0,0 +1,9 @@ +SET NAMES utf8; +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', +'*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) as snippet; +snippet +
ãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚
用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒ
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result new file mode 100644 index 0000000000000000000000000000000000000000..469defbcb71df6f3781b81500fcf9a2420239018 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/function_snippet_html_record.result @@ -0,0 +1,30 @@ +CREATE TABLE memos ( +content text +); +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); +SELECT mroonga_snippet_html(content, 'Mroonga') as snippet +FROM memos; +snippet +
Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily.
So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.
+
onn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can
+
Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result index 29fd989b4f48e3bbd0a9925e6017e16597bdc02d..5095232dfb2820ee77ffd5a4e4cd6d7a3ba82290 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_contains.result @@ -5,15 +5,6 @@ name TEXT, location GEOMETRY NOT NULL, SPATIAL KEY location_index (location) ); -SHOW CREATE TABLE shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 INSERT INTO shops (name, location) VALUES ('nezu-no-taiyaki', ST_GeomFromText('POINT(139.762573 35.720253)')); @@ -167,4 +158,10 @@ id name location_text 14 tetsuji POINT(139.76857 35.680911944444446) 19 daruma POINT(139.7705988888889 35.68146111111111) 26 kazuya POINT(139.760895 35.67350805555556) +EXPLAIN +SELECT id, name, ST_AsText(location) AS location_text FROM shops +WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) +ORDER BY id; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE shops range location_index location_index 34 NULL 36 Using where; Using filesort DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_bulk_insert_null.result similarity index 58% rename from storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result rename to storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_bulk_insert_null.result index 271cf922fd584b9a76ea25cb052c6c049f24687c..73573355c00189c22941f96d1ba8c51c1b498a86 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null_57.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_bulk_insert_null.result @@ -2,13 +2,8 @@ DROP TABLE IF EXISTS shops; CREATE TABLE shops ( location GEOMETRY NOT NULL ); -SET SESSION sql_mode = ''; INSERT INTO shops VALUES (NULL), (NULL); -Warnings: -Warning 1048 Column 'location' cannot be null -SET SESSION sql_mode = default; +ERROR 23000: Column 'location' cannot be null SELECT ST_AsText(location) FROM shops; ST_AsText(location) -POINT(0 0) -POINT(0 0) DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_contains.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_contains.result new file mode 100644 index 0000000000000000000000000000000000000000..2f432fc8e66777c005afd007bb821c61179abacc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_strict_sql_mode_contains.result @@ -0,0 +1,169 @@ +DROP TABLE IF EXISTS shops; +CREATE TABLE shops ( +id INT PRIMARY KEY AUTO_INCREMENT, +name TEXT, +location GEOMETRY NOT NULL, +SPATIAL KEY location_index (location) +); +INSERT INTO shops (name, location) +VALUES ('nezu-no-taiyaki', +ST_GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) +VALUES ('taiyaki-kataoka', +ST_GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) +VALUES ('soba-taiyaki-ku', +ST_GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) +VALUES ('kuruma', +ST_GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) +VALUES ('hirose-ya', +ST_GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) +VALUES ('sazare', +ST_GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) +VALUES ('omede-taiyaki', +ST_GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) +VALUES ('onaga-ya', +ST_GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) +VALUES ('shiro-ya', +ST_GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) +VALUES ('fuji-ya', +ST_GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) +VALUES ('miyoshi', +ST_GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) +VALUES ('juju-ya', +ST_GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) +VALUES ('tatsumi-ya', +ST_GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) +VALUES ('tetsuji', +ST_GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) +VALUES ('gazuma-ya', +ST_GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) +VALUES ('honma-mon', +ST_GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) +VALUES ('naniwa-ya', +ST_GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) +VALUES ('kuro-dai', +ST_GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) +VALUES ('daruma', +ST_GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) +VALUES ('yanagi-ya', +ST_GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) +VALUES ('sharaku', +ST_GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) +VALUES ('takane', +ST_GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) +VALUES ('chiyoda', +ST_GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) +VALUES ('da-ka-po', +ST_GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) +VALUES ('matsushima-ya', +ST_GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) +VALUES ('kazuya', +ST_GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) +VALUES ('furuya-kogane-an', +ST_GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) +VALUES ('hachi-no-ie', +ST_GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) +VALUES ('azuki-chan', +ST_GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) +VALUES ('kuriko-an', +ST_GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) +VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', +ST_GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) +VALUES ('naze-ya', +ST_GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) +VALUES ('sanoki-ya', +ST_GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) +VALUES ('shigeta', +ST_GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) +VALUES ('nishimi-ya', +ST_GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) +VALUES ('hiiragi', +ST_GeomFromText('POINT(139.711517 35.647701)')); +SELECT id, name, ST_AsText(location) AS location_text FROM shops; +id name location_text +1 nezu-no-taiyaki POINT(139.76257305555555 35.72025305555556) +2 taiyaki-kataoka POINT(139.7155911111111 35.712521111111116) +3 soba-taiyaki-ku POINT(139.65908805555557 35.68371194444445) +4 kuruma POINT(139.70620694444446 35.72151611111111) +5 hirose-ya POINT(139.68560805555555 35.71484388888889) +6 sazare POINT(139.68504305555555 35.71465305555556) +7 omede-taiyaki POINT(139.8171538888889 35.70051611111111) +8 onaga-ya POINT(139.81105 35.69825388888889) +9 shiro-ya POINT(139.63861111111112 35.70551694444445) +10 fuji-ya POINT(139.637115 35.703938055555554) +11 miyoshi POINT(139.53732305555556 35.644538888888896) +12 juju-ya POINT(139.69575500000002 35.62892194444445) +13 tatsumi-ya POINT(139.63865694444445 35.66550111111111) +14 tetsuji POINT(139.76857 35.680911944444446) +15 gazuma-ya POINT(139.64759805555553 35.70081694444444) +16 honma-mon POINT(139.65257305555556 35.72273611111111) +17 naniwa-ya POINT(139.79623388888888 35.73006111111111) +18 kuro-dai POINT(139.70483388888888 35.650345) +19 daruma POINT(139.7705988888889 35.68146111111111) +20 yanagi-ya POINT(139.78398111111113 35.685341111111114) +21 sharaku POINT(139.79484611111113 35.71696888888889) +22 takane POINT(139.56091305555555 35.69860111111112) +23 chiyoda POINT(139.65281694444442 35.64260111111111) +24 da-ka-po POINT(139.72735611111113 35.62734611111111) +25 matsushima-ya POINT(139.73738111111112 35.64055611111111) +26 kazuya POINT(139.760895 35.67350805555556) +27 furuya-kogane-an POINT(139.67607111111113 35.68060305555556) +28 hachi-no-ie POINT(139.66810611111111 35.608021111111114) +29 azuki-chan POINT(139.67320305555555 35.641510000000004) +30 kuriko-an POINT(139.79682888888888 35.71201305555556) +31 yume-no-aru-machi-no-taiyaki-ya-san POINT(139.71252388888888 35.61619888888889) +32 naze-ya POINT(139.66583305555557 35.60903888888889) +33 sanoki-ya POINT(139.7707211111111 35.66592) +34 shigeta POINT(139.78027305555557 35.67262611111111) +35 nishimi-ya POINT(139.77462805555555 35.671825) +36 hiiragi POINT(139.71151694444444 35.64770111111111) +SELECT id, name, ST_AsText(location) AS location_text FROM shops +WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) +ORDER BY id; +id name location_text +14 tetsuji POINT(139.76857 35.680911944444446) +19 daruma POINT(139.7705988888889 35.68146111111111) +26 kazuya POINT(139.760895 35.67350805555556) +EXPLAIN +SELECT id, name, ST_AsText(location) AS location_text FROM shops +WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) +ORDER BY id; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE shops NULL range location_index location_index 34 NULL 36 100.00 Using where; Using filesort +Warnings: +Note 1003 /* select#1 */ select `test`.`shops`.`id` AS `id`,`test`.`shops`.`name` AS `name`,st_astext(`test`.`shops`.`location`) AS `location_text` from `test`.`shops` where mbrcontains((st_geometryfromtext('LineString(139.7727 35.6684, 139.7038 35.7121)')),`test`.`shops`.`location`) order by `test`.`shops`.`id` +DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result index 508ee135ef23ded9d1e87a0d5f8757c189152ba3..b0bbaf09e4c434719cde57a65209f88258c2c524 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result @@ -1,28 +1,28 @@ -drop table if exists t1, t2, t3; -create table t1 (_id int, a int, primary key (_id) using hash); -insert into t1 values(null, 100); +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); +INSERT INTO t1 VALUES(null, 100); ERROR 23000: Column '_id' cannot be null -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -insert into t1 values(1,100); +INSERT INTO t1 VALUES(1,100); Warnings: Warning 1265 Data truncated for column '_id' at row 1 -select * from t1; +SELECT * FROM t1; _id a 1 100 2 100 3 100 4 100 -select * from t1 where _id = 2; +SELECT * FROM t1 WHERE _id = 2; _id a 2 100 -select * from t1 where _id = 20; +SELECT * FROM t1 WHERE _id = 20; _id a -drop table t1; +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result new file mode 100644 index 0000000000000000000000000000000000000000..8fb46156fb708e893eabc75292f893d0537e06cf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_strict_sql_mode_id_primary.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); +INSERT INTO t1 VALUES(null, 100); +ERROR 23000: Column '_id' cannot be null +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +INSERT INTO t1 VALUES(1,100); +ERROR 01000: Data truncated for column '_id' at row 1 +SELECT * FROM t1; +_id a +SELECT * FROM t1 WHERE _id = 2; +_id a +SELECT * FROM t1 WHERE _id = 20; +_id a +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result new file mode 100644 index 0000000000000000000000000000000000000000..055ca69f884d92b263f1cb5051cd14f56c8f91b1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_asc_asc.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +score3 INT, +INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `score3` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`score2`,`score3`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); +SELECT * +FROM items +WHERE score1 = 2 +ORDER BY score2 ASC, score3 ASC; +id score1 score2 score3 +3 2 10 100 +7 2 20 -100 +8 2 20 0 +9 2 20 100 +4 2 30 -100 +5 2 30 0 +6 2 30 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result new file mode 100644 index 0000000000000000000000000000000000000000..0d7faddcaa8030ada24081115831fd7b29544205 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_order_by_where_equal_desc_desc.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +score3 INT, +INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `score3` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`score2`,`score3`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); +SELECT * +FROM items +WHERE score1 = 2 +ORDER BY score2 DESC, score3 DESC; +id score1 score2 score3 +6 2 30 100 +5 2 30 0 +4 2 30 -100 +9 2 20 100 +8 2 20 0 +7 2 20 -100 +3 2 10 100 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result new file mode 100644 index 0000000000000000000000000000000000000000..b390ca7a8cfe240138268bc51751e460a3a687e6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_strict_sql_mode_update.result @@ -0,0 +1,26 @@ +DROP TABLE IF EXISTS scores; +SET NAMES utf8; +CREATE TABLE scores ( +name char(30) NOT NULL, +score int NOT NULL, +PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); +SELECT * FROM scores; +name score +Jiro Yamada 27 +Taro Yamada -12 +Taro Yamada 10 +Taro Yamada 29 +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; +ERROR 01000: data truncated for primary key column: +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); +name score +Taro Yamada -12 +Taro Yamada 10 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result index 86b06bc94dd311338d9bf7a4d8dde0ccf96404d1..a58a487a178c62e76441c3942300686ebbd68147 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result @@ -1,32 +1,27 @@ -drop table if exists listing; -set names utf8; -create table scores ( -name char(30) not null, -score int not null, -primary key (name, score) -) default charset utf8; -show create table scores; -Table Create Table -scores CREATE TABLE `scores` ( - `name` char(30) NOT NULL, - `score` int(11) NOT NULL, - PRIMARY KEY (`name`,`score`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -insert into scores (name, score) values("Taro Yamada", 29); -insert into scores (name, score) values("Taro Yamada", -12); -insert into scores (name, score) values("Jiro Yamada", 27); -insert into scores (name, score) values("Taro Yamada", 10); -select * from scores; +DROP TABLE IF EXISTS scores; +SET NAMES utf8; +CREATE TABLE scores ( +name char(30) NOT NULL, +score int NOT NULL, +PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); +SELECT * FROM scores; name score Jiro Yamada 27 Taro Yamada -12 Taro Yamada 10 Taro Yamada 29 -update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; Warnings: Warning 1265 data truncated for primary key column: -select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); +SELECT * FROM scores +WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); name score Taro Yamada -12 Taro Yamada 10 -drop table scores; +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than_or_equal.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_greater_than_or_equal.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than_or_equal.result similarity index 100% rename from storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.result rename to storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_all_used_less_than_or_equal.result diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result new file mode 100644 index 0000000000000000000000000000000000000000..8e5f4329a51f77e831ae700ea5f924104552a443 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than.result @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +8 2 0 2015-07-02 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..1a3021e28151e9a3965b449daea2527d303b69e2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +8 2 0 2015-07-02 00:00:00 +5 2 0 2015-07-01 12:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result new file mode 100644 index 0000000000000000000000000000000000000000..6adaa9870dc21729420fecedcc6cf87efd599ded --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than.result @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +2 2 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..dfc7ef6fe43bd5a233f3d3cf10d47642d04598f2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `score1` (`score1`,`created_at`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE score1 = 2 AND created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +5 2 0 2015-07-01 12:00:00 +2 2 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result new file mode 100644 index 0000000000000000000000000000000000000000..502c0c1044741df27b1a81d13ec6995e620e0be6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +4 2 0 2015-07-02 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..60ffa88b4b558cdbc5d426a5b86d6acedbfbe34a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +4 2 0 2015-07-02 00:00:00 +3 2 0 2015-07-01 12:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result new file mode 100644 index 0000000000000000000000000000000000000000..2cdb3de3fb8e2e622fda162b8ccb68121ac3bac6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +2 2 0 2015-07-01 00:00:00 +1 1 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..3443bbc3ed1888f1716007aff5589efe8fcdf5c9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS items; +CREATE TABLE items ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT, +score2 INT, +created_at DATETIME, +INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; +Table Create Table +items CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `score1` int(11) DEFAULT NULL, + `score2` int(11) DEFAULT NULL, + `created_at` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `created_at` (`created_at`,`score1`,`score2`) +) ENGINE=Mroonga DEFAULT CHARSET=utf8 +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +SELECT * +FROM items +WHERE created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; +id score1 score2 created_at +3 2 0 2015-07-01 12:00:00 +2 2 0 2015-07-01 00:00:00 +1 1 0 2015-07-01 00:00:00 +DROP TABLE items; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result new file mode 100644 index 0000000000000000000000000000000000000000..b60917848054fb6f08ca67fa36d07b8c28dd709e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_max.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS listing; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT NOT NULL, +score2 INT NOT NULL, +INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); +SELECT MAX(score2) FROM scores WHERE score1 = 2; +MAX(score2) +3 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result new file mode 100644 index 0000000000000000000000000000000000000000..0792751ad0260c7755fe1b5ed525375ecc3e6c95 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_select_min.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS listing; +CREATE TABLE scores ( +id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, +score1 INT NOT NULL, +score2 INT NOT NULL, +INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); +SELECT MIN(score2) FROM scores WHERE score1 = 2; +MIN(score2) +-3 +DROP TABLE scores; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result index 869ced05d25ab4515b39d1ab1b1f35285fcea854..21168547286d8925c91837fc42abe54c9791836b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_64bit_equal.result @@ -5,12 +5,12 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT * FROM ranges FORCE INDEX(range_key) -WHERE start = "1000-01-01" AND end = "9999-12-31"; +WHERE start = "1000-01-02" AND end = "9999-12-31"; id start end -2 1000-01-01 9999-12-31 +2 1000-01-02 9999-12-31 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result index 8e480d4844ad285a1ac0aa1174f6b6ba89fc3815..93e34d88c2adedf8cc38700cab714cfba9da2c50 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_index_read.result @@ -5,16 +5,16 @@ start DATE, end DATE, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT start, end FROM ranges FORCE INDEX(range_key) ORDER BY start, end; start end -1000-01-01 2012-10-05 -1000-01-01 9999-12-31 +1000-01-02 2012-10-05 +1000-01-02 9999-12-31 2012-10-25 9999-12-31 -9999-12-31 1000-01-01 +9999-12-31 1000-01-02 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result index 92e7f51ff6e2ba5ab69272663811663926fb62ae..c2a94a848a97d0860f74a5ce3698ac0ec0f0e241 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_asc.result @@ -6,14 +6,14 @@ end DATE, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; id start end -2 1000-01-01 2012-10-05 -4 1000-01-01 9999-12-31 +2 1000-01-02 2012-10-05 +4 1000-01-02 9999-12-31 1 2012-10-25 9999-12-31 -3 9999-12-31 1000-01-01 +3 9999-12-31 1000-01-02 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result index ddd694c38631d116612120b32609314c342dbfad..2d1001560106c8bf37dc8cbf93a3f90851115155 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_date_order_64bit_desc.result @@ -6,14 +6,14 @@ end DATE, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; id start end -3 9999-12-31 1000-01-01 +3 9999-12-31 1000-01-02 1 2012-10-25 9999-12-31 -4 1000-01-01 9999-12-31 -2 1000-01-01 2012-10-05 +4 1000-01-02 9999-12-31 +2 1000-01-02 2012-10-05 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result index 1aa710882cb4da0ae7ec9513b07a2e7cb8b6605d..a8546c4bcbf9c1f1d53250f6400118a970b14e35 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_index_read.result @@ -5,16 +5,16 @@ start datetime, end datetime, UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (1, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); SELECT start, end FROM ranges FORCE INDEX(range_key) ORDER BY start, end; start end -1000-01-01 00:00:00 2012-10-05 16:18:29 -1000-01-01 00:00:00 9999-12-31 23:59:59 +1000-01-02 00:00:00 2012-10-05 16:18:29 +1000-01-02 00:00:00 9999-12-31 23:59:59 2012-10-25 16:18:29 9999-12-31 23:59:59 -9999-12-31 23:59:59 1000-01-01 00:00:00 +9999-12-31 23:59:59 1000-01-02 00:00:00 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result index d18f18589326baa6f9102ded11306021a9ed8ad1..5cffb71d6446ad92d7719c45ad96799e463e45fe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_asc.result @@ -6,14 +6,14 @@ end datetime, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; id start end -2 1000-01-01 00:00:00 2012-10-05 16:18:29 -4 1000-01-01 00:00:00 9999-12-31 23:59:59 +2 1000-01-02 00:00:00 2012-10-05 16:18:29 +4 1000-01-02 00:00:00 9999-12-31 23:59:59 1 2012-10-25 16:18:29 9999-12-31 23:59:59 -3 9999-12-31 23:59:59 1000-01-01 00:00:00 +3 9999-12-31 23:59:59 1000-01-02 00:00:00 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result index c159aeab4ce390973fd9a9912dceb8216d6a11a8..4429f787b76a8670fe4c67abed347c241f8478f3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_order_desc.result @@ -6,14 +6,14 @@ end datetime, UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; id start end -3 9999-12-31 23:59:59 1000-01-01 00:00:00 +3 9999-12-31 23:59:59 1000-01-02 00:00:00 1 2012-10-25 16:18:29 9999-12-31 23:59:59 -4 1000-01-01 00:00:00 9999-12-31 23:59:59 -2 1000-01-01 00:00:00 2012-10-05 16:18:29 +4 1000-01-02 00:00:00 9999-12-31 23:59:59 +2 1000-01-02 00:00:00 2012-10-05 16:18:29 DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result index d833fb44024f81349a42c602297fcaae667dae5d..92e95d9276c4aaf21b1745e851fa3552ee53565e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "1970-01-01 12:00:00", "2012-10-05 16:18:29"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result index 1e4ee102c9ed5963f8eeb97e43f2ae9ca46ac575..35bc4123d65a8a8b7f795022c6cb0f0cf473a23a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result index 23a5522320a3c7e4fec2df91f8a1d573be8ab07d..fbf88cf3d0a3c6941519dc8fbc1b710b738d1165 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result index 3f3277f5e64cc1311d89fe600d3078f4d2101bd0..b799cc278e1ba567f9725ae052613aac55542607 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result @@ -1,8 +1,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, -start timestamp, -end timestamp, +start timestamp DEFAULT '2016-04-21 00:00:00', +end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result index a460c7d99d69f7f36a569ec4af0c8918e6746d7e..b1eafd2d04841d1868da4c2dec7a601d4bb09011 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_date.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` date NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-01-29", "clear day"); INSERT INTO diaries (day, title) VALUES ("2012-01-30", "rainy day"); INSERT INTO diaries (day, title) VALUES ("2012-01-31", "cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result index ffbbfe3f46009541142779d58cd108f06f718b66..0ae41c513dc710e6fa924fe06d8d04796073f5ed 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATETIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` datetime(6) NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); INSERT INTO diaries (day, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result index 76c529f7fbb63c4ce0a5f8714e1bdfd73eb8d135..f5e743dc9e773ead37eff3cd7238dfc2eb7bf15b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_datetime_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATETIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` datetime NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01", "clear day"); INSERT INTO diaries (day, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result index 9b1e8e7d7e888484231831d15e23a07c6af4bdb7..6a529b50692baa9503981ae1b774e4f6d044dc35 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE releases ( version DECIMAL(6, 3) PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; -Table Create Table -releases CREATE TABLE `releases` ( - `version` decimal(6,3) NOT NULL, - `message` text, - PRIMARY KEY (`version`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO releases (version, message) VALUES (10.000, "10th release!"); INSERT INTO releases (version, message) VALUES (10.001, "minor fix."); INSERT INTO releases (version, message) VALUES (999.999, "the last release!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result index 0624ab2f2b21a533b1dba9b44ec90ff871d4e96a..d36688bb13c54a6f2dd0d371a13be395f30e4017 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_decimal_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE releases ( version DECIMAL PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; -Table Create Table -releases CREATE TABLE `releases` ( - `version` decimal(10,0) NOT NULL, - `message` text, - PRIMARY KEY (`version`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO releases (version, message) VALUES (1, "the first release!!!"); INSERT INTO releases (version, message) VALUES (10, "10th release!"); INSERT INTO releases (version, message) VALUES (999, "the last release!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result index 639114875e9b23a388e2b6c840da0e67849676e9..5437c78979144d1a2e811918ba92b196b29bc74e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE running_records ( time TIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `time` time(6) NOT NULL, - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (time, title) VALUES ("01:00:00.000001", "normal condition"); INSERT INTO running_records (time, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result index 6a89cdc33dd7bc663d12af90095f6c1d67062e91..e59dee4c68896128697c75cff10fbf4c440c1e15 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_time_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE running_records ( time TIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; -Table Create Table -running_records CREATE TABLE `running_records` ( - `time` time NOT NULL, - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO running_records (time, title) VALUES ("01:00:00", "normal condition"); INSERT INTO running_records (time, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result index 7040cc22b2e8204036c318fdfbf7824aa497de69..0fba3da7533d1043bc4fd9007a5faa789e6b33da 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_with_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( time TIMESTAMP(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); INSERT INTO diaries (time, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result index 38017f6f8cc8a23393f0b8fcbbe47246a5be30f3..8116bda2d601f8b491fb2a8bc4ee401b195e69bd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_timestamp_without_fractional_seconds.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( time TIMESTAMP PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `title` text, - PRIMARY KEY (`time`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01", "clear day"); INSERT INTO diaries (time, title) VALUES ("2012-01-30 01:23:45", "rainy day"); INSERT INTO diaries (time, title) VALUES ("2012-01-31 08:32:10", "cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result index af9b3a2dbfb9a1970549467cbf6964cdb68f835f..78c56f258f88f98ecc7f05db11f8ce73a1f47b1b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_primary_year.result @@ -3,13 +3,6 @@ CREATE TABLE aniversary_memos ( party_year YEAR PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; -Table Create Table -aniversary_memos CREATE TABLE `aniversary_memos` ( - `party_year` year(4) NOT NULL, - `title` text, - PRIMARY KEY (`party_year`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO aniversary_memos (party_year, title) VALUES ("11", "We need a big cake!"); INSERT INTO aniversary_memos (party_year, title) diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result new file mode 100644 index 0000000000000000000000000000000000000000..f2a0b28b0b637d4357a179426ac67e95fc2de4ce --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_unique_delete_all.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int, +UNIQUE KEY (id) +); +INSERT INTO ids VALUES (1); +DELETE FROM ids; +INSERT INTO ids VALUES (1); +SELECT * FROM ids; +id +1 +INSERT INTO ids VALUES (1); +ERROR 23000: Duplicate entry '1' for key 'id' +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result index d58afb1f6d4c1080bf35b441709c8f983fc6a1f1..3600c92082d22c23014fe9a57b1b647975c009ab 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/information_schema_tables_data_length.result @@ -6,15 +6,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result index 00466f19bb56047431c5959e7867537458451105..f8d41bb784e38f70a526ac26eae555dd59271ac7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_TODO_SPLIT_ME.result @@ -65,18 +65,6 @@ select * from t1; c1 2010-03-26 11:22:33 drop table t1; -create table t1 (c1 int, _id int); -set sql_mode=""; -insert into t1 (c1,_id) values (1,1); -Warnings: -Warning 1265 Data truncated for column '_id' at row 1 -set sql_mode="strict_all_tables"; -insert into t1 (c1,_id) values (4,1); -ERROR 01000: Data truncated for column '_id' at row 1 -select * from t1; -c1 _id -1 1 -drop table t1; create table t1 (c1 int primary key, c2 int); insert into t1 values(1,100); select * from t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result index 12d4b173eaacf0d922dd0288225024ec404264e1..94421a5c200df334500a16448994e7972eb9454c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_primary_key.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `day` date NOT NULL, - `title` text, - PRIMARY KEY (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day") ON DUPLICATE KEY UPDATE title = "clear day (duplicated)"; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result index fbec44527f776c834c5c9a7000cb9842c1810512..1ef6f1f2c37efb26819eeca0e41e5b9ec0971095 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_on_duplicate_key_update_unique_key.result @@ -5,15 +5,6 @@ day DATE, title TEXT, UNIQUE KEY day (day) ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `day` date DEFAULT NULL, - `title` text, - PRIMARY KEY (`id`), - UNIQUE KEY `day` (`day`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day1") ON DUPLICATE KEY UPDATE title = "clear day1 (duplicated)"; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result new file mode 100644 index 0000000000000000000000000000000000000000..624ac00d3fcef1213543c627d516f3526c399da1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/insert_virtual_column.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 int, _id int); +SET sql_mode=""; +INSERT INTO t1 (c1,_id) VALUES (1,1); +Warnings: +Warning 1265 Data truncated for column '_id' at row 1 +SET sql_mode="STRICT_ALL_TABLES"; +INSERT INTO t1 (c1,_id) VALUES (4,1); +ERROR 01000: Data truncated for column '_id' at row 1 +SELECT * FROM t1; +c1 _id +1 1 +DROP TABLE t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result deleted file mode 100644 index b66801094bd0cd7cc55c91f6afa8aa69c0c5011e..0000000000000000000000000000000000000000 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_TODO_SPLIT_ME.result +++ /dev/null @@ -1,106 +0,0 @@ -drop table if exists t1, t2, t3; -flush status; -create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); -insert into t1 values(1,10,"aa ii uu ee oo"); -insert into t1 values(2,20,"ka ki ku ke ko"); -insert into t1 values(3,30,"sa si su se so"); -insert into t1 values(4,40,"ta ti tu te to"); -insert into t1 values(5,50,"aa ii uu ee oo"); -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select * from t1; -c1 c2 c3 -1 10 aa ii uu ee oo -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -5 50 aa ii uu ee oo -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select count(*) from t1; -count(*) -5 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select * from t1 force index(primary) where c1 between 2 and 4; -c1 c2 c3 -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 0 -select count(*) from t1 force index(primary) where c1 between 2 and 4; -count(*) -3 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select c1 from t1 force index(primary) where c1 < 3; -c1 -1 -2 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select count(c1) from t1 force index(primary) where c1 < 3; -count(c1) -2 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select 1 from t1 force index(primary) where c1 > 3; -1 -1 -1 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 1 -select count(1) from t1 force index(primary) where c1 > 3; -count(1) -2 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 2 -select * from t1 where match(c3) against("su"); -c1 c2 c3 -3 30 sa si su se so -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 2 -select count(*) from t1 where match(c3) against("su"); -count(*) -1 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 3 -select * from t1 where match(c3) against("+su" in boolean mode); -c1 c2 c3 -3 30 sa si su se so -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 3 -select count(*) from t1 where match(c3) against("+su" in boolean mode); -count(*) -1 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 4 -select * from t1 force index(idx1) where c2 between 20 and 40; -c1 c2 c3 -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 4 -select count(*) from t1 force index(idx1) where c2 between 20 and 40; -count(*) -3 -show status like 'mroonga_count_skip'; -Variable_name Value -Mroonga_count_skip 5 -drop table t1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result index 9971d21e386e304b56eb570bb4e122f6b1741d06..8d29e0425cf042ae9f3b652b7c6b68bf9317ada3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_disabled.result @@ -7,14 +7,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result new file mode 100644 index 0000000000000000000000000000000000000000..26ca6de7b28fe839f175ce1a7f33df31c43147dc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_and.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT, +age INT, +INDEX (id, age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); +SELECT COUNT(*) FROM users WHERE id = 2 AND age = 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result new file mode 100644 index 0000000000000000000000000000000000000000..9af4a4fedcca9a7d28cd84baf6fd535fb73c423a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_between.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..2bbcfe7549ca79d935bbb1c4791a27fffc4c4dd0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +SELECT COUNT(*) FROM users WHERE age = 29; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result new file mode 100644 index 0000000000000000000000000000000000000000..6ec4d774b2835f896290df6250841d953508c705 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_boolean_mode.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); +SELECT COUNT(*) FROM memos +WHERE MATCH(content) AGAINST('+Groonga' IN BOOLEAN MODE); +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result new file mode 100644 index 0000000000000000000000000000000000000000..36a1958955abac8fead18f6c86ae5f496f6d40e8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_full_text_search_in_natural_language_mode.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +CREATE TABLE memos ( +content TEXT, +FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); +SELECT COUNT(*) FROM memos +WHERE MATCH(content) AGAINST('Groonga'); +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result new file mode 100644 index 0000000000000000000000000000000000000000..d5c033083cc15835d2a8aabaed18dd8ca24d1106 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age > 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..59b812d1484cc8fb207c1cc2338853078aa711a4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_greater_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age >= 29; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result new file mode 100644 index 0000000000000000000000000000000000000000..b5e4fc1c3de6f26eb4ac92f279ae388fb4bf24a8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age < 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..f062fe0092ba8e0304699473d7f1cf63b08053a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_less_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); +SELECT COUNT(*) FROM users WHERE age <= 29; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..a1a123e7d5f0abd2db27a7bbcb27263188920064 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_index_not_equal.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +SELECT COUNT(*) FROM users WHERE age <> 29; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 2 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result new file mode 100644 index 0000000000000000000000000000000000000000..39a0f0bd785fccbe5736382de22cd18257e4c790 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_multiple_conditions.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT, +age INT, +INDEX (age) +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); +SELECT COUNT(*) FROM users WHERE id = 3 AND age = 29; +COUNT(*) +1 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result new file mode 100644 index 0000000000000000000000000000000000000000..68a0575ab97478c411e7e7faf4e48b3a9b516fd7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_between.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..713a19dd184bf1582b0c59cb2c000d123a323d4a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id = 3; +COUNT(*) +1 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result new file mode 100644 index 0000000000000000000000000000000000000000..3ae04a0246f8a1c16599aaf158db08e17c8de429 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id > 3; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..0f0643110f04a3c8abc3c2c4282629dbdd07129e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_greater_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id >= 3; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result new file mode 100644 index 0000000000000000000000000000000000000000..05afd7e8d58c7544537232bef4768f32fb58c994 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id < 3; +COUNT(*) +2 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..200f89d3eb64e0942a58a9cb2cdc6c7eba20b4c8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_less_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id <= 3; +COUNT(*) +3 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 0 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result new file mode 100644 index 0000000000000000000000000000000000000000..64761c9565dc14b48c5951c00298741b4dd9a942 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_count_skip_primary_key_not_equal.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS users; +FLUSH STATUS; +CREATE TABLE users ( +id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); +SELECT COUNT(*) FROM users WHERE id <> 3; +COUNT(*) +4 +SHOW STATUS LIKE 'mroonga_count_skip'; +Variable_name Value +Mroonga_count_skip 1 +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result index da15588ccd567b25ee2c5632bd6006a0237f8383..dcf0f3eec669dbe2b44631a7e97dc4bfb8a6dd6b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_disabled.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result new file mode 100644 index 0000000000000000000000000000000000000000..124a7750f5b7e62d487137da2bac16f49ffe93fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_multiple_match_againsts.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES UTF8; +CREATE TABLE memos ( +id INT UNSIGNED NOT NULL, +title VARCHAR(255), +content TEXT, +FULLTEXT INDEX(title), +FULLTEXT INDEX(content) +) DEFAULT CHARSET UTF8; +INSERT INTO memos VALUES(5, "title 1", "content a"); +INSERT INTO memos VALUES(12, "title 1", "content a"); +INSERT INTO memos VALUES(10, "title 1", "content a"); +INSERT INTO memos VALUES(4, "title 2", "content b"); +INSERT INTO memos VALUES(6, "title 2", "content b"); +INSERT INTO memos VALUES(1, "title 2", "content b"); +INSERT INTO memos VALUES(11, "title 1-a", "content a-1"); +INSERT INTO memos VALUES(3, "title 2-b", "content a-2"); +INSERT INTO memos VALUES(2, "title 2-c", "content a-3"); +INSERT INTO memos VALUES(8, "title 1-a", "content b-1"); +INSERT INTO memos VALUES(9, "title 2-b", "content b-2"); +INSERT INTO memos VALUES(7, "title 2-c", "content b-3"); +SELECT * FROM memos +WHERE MATCH(title) AGAINST("+1" IN BOOLEAN MODE) AND +MATCH(content) AGAINST("+a" IN BOOLEAN MODE) +ORDER BY id +LIMIT 1,3; +id title content +10 title 1 content a +11 title 1-a content a-1 +12 title 1 content a +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 0 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result index 0794b104a62f35ea281b94023c4917607131d801..5a0ea86cc930e0ae908de354a9aa68887fe06284 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_not_optimized_no_limit.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result new file mode 100644 index 0000000000000000000000000000000000000000..d58c3cf223a92f681e89c16a938cf58c37a2ff43 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_cp932.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES CP932; +CREATE TABLE memos ( +ޝ•ÊŽq INT UNSIGNED, +“à—e TEXT, +FULLTEXT INDEX(“à—e), +KEY(ޝ•ÊŽq) +) DEFAULT CHARSET CP932; +INSERT INTO memos VALUES(2, "–¾“ú‚ÍŽR“o‚èB"); +INSERT INTO memos VALUES(3, "¡“ú‚̓Tƒ{ƒeƒ“‚ð‚à‚ç‚Á‚½B"); +INSERT INTO memos VALUES(1, "¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B"); +SELECT * FROM memos +WHERE MATCH(“à—e) AGAINST("¡“ú" IN BOOLEAN MODE) +ORDER BY ޝ•ÊŽq +LIMIT 1; +ޝ•ÊŽq “à—e +1 ¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result index bd34b040ad7962b64053fdf55044574ee8670027..f1cc14b4963634269130fc10c5e570d243897604 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result index f495a3b595668816dd532c4d8d4d50565cb65df1..0374f50030e754a3113bad0e9fb63186ba6504de 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between_over.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result index b5be750690d434761c6d3c2e1e7913adf1320776..4bc3f9d5c738da99a39c416bac6e4a648d41be76 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:34", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:34", "Tomorrow will be fine."); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:34", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result index 6f20f3b8b35c5fa9d302aecdb1d8bd94536c92cf..56629777889d55f9a8149721914373e9326df7b0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result index 5df3c12ccd86c3855e8a1ed16f52317b922971ba..b03fe20f397bbf0869642a18efc9dea5ae98f3ea 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_greater_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result index c12e69bf686f426d19e7a5cdec1d41c5507c9d70..c25f2a56e90535a3463ba6538733392a1de80d79 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result index 6d00bac66eb26ad0447d53a00787741572a413ac..ef93bf8b87937895fc3ac38b408de872eebd3c55 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_less_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `date` datetime DEFAULT NULL, - `content` text, - KEY `date` (`date`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result new file mode 100644 index 0000000000000000000000000000000000000000..f20089f0074c0295e2b7650a1731215b73e3d8c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_name.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES utf8; +CREATE TABLE memos ( +id int PRIMARY KEY, +tag ENUM('Groonga', 'Mroonga'), +content TEXT, +FULLTEXT INDEX(content), +KEY(tag), +KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND +tag = 'Mroonga' + ORDER BY id LIMIT 1; +id tag content +4 Mroonga Mroonga is based on Groonga. +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_value.result new file mode 100644 index 0000000000000000000000000000000000000000..88ec9dd81dbd3a942635a868352acbdae31d2ff8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_enum_value.result @@ -0,0 +1,25 @@ +DROP TABLE IF EXISTS memos; +FLUSH STATUS; +SET NAMES utf8; +CREATE TABLE memos ( +id int PRIMARY KEY, +tag ENUM('Groonga', 'Mroonga'), +content TEXT, +FULLTEXT INDEX(content), +KEY(tag), +KEY(id) +) DEFAULT CHARSET=utf8; +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); +SELECT * FROM memos +WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND +tag = 2 +ORDER BY id LIMIT 1; +id tag content +4 Mroonga Mroonga is based on Groonga. +SHOW STATUS LIKE 'mroonga_fast_order_limit'; +Variable_name Value +Mroonga_fast_order_limit 1 +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result index 529f0d521eeff6e0f8c9807f0576273fe1534f79..5c18e22d1afba586de7b99e19db70f8f121bcd87 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_have_primary_key.result @@ -11,19 +11,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result index 2320b0ffbc4cf5cf9daa59d31856bb244b8441f3..634fe89cdd4bf9c61aa1fefe4a398e9148f5ca53 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_equal.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result index c367aef808ab0836e383f2d93035eb8c214d8548..22305c7045a8b93b64ec3deace3f70781e1d903b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result index b00a4e2a2c32d77f7fbf1540c19c994620dfb6e8..439f453d1849c4271d3ca3e3ab2d071871304cff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_greater_than_or_equal.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result index 5bf6bca4985d996124d3f77c3f56f61e63d9d5d7..51ec2fde5e648a066c8c2eb5d0abcf4968e72eb3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result index 5d6a19a936e393c229583cc5afbc8efcf8f35a55..3c4f3973f84fffa21a86896a085b5ae4f720e676 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_int_less_than_or_equal.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result index 6ee2991e51aea457c60051aa87cc4dccecc470f8..03364eb10174b3125c36a86222249ecf5f9e93b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_no_primary_key.result @@ -11,18 +11,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result index e91e8af539103f42c552d1066140f76df951efe2..a284f4dd28084c72d5f6524663bd1f0c27f5cc1e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_asc.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result index da01145e45a6e01d51320f0bd96798d4b0b78b08..270d263966d3d01102080ec81d9d9124d3579877 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_desc.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result index bb541c014bd819d85cb7323bf39e2bfdf7f809fd..eb19384eb63770b893a6dc906485aa93fcad3f61 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_id.result @@ -13,20 +13,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `_id` int(11) DEFAULT NULL, - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(NULL, 1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(NULL, 2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(NULL, 3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result index fb9393687dcaf9e96b148a135feeebdb390766ff..80bd895a6e449e8b2fad85bf5e673318e294bd50 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_order_by_match_against.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result index 75ad884a2688c1b5eee23c4bd3f880e4395295c7..b3ed4bf6b4d58d44782453ccf56fa85a400c5bd0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_select_match_against.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result index bb4ac9c3b33da616b05509206be2d42238fd2c2e..793423f5bc5fbd32f4609232ef3174163caac561 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result index 1b4d38e01076e19965e30f6f5a79beccc4d4ac44..f50417d1f29c95c778c3e0891f03b0a97e1ee752 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_between_over.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result index 4fff9f9185f1b2ed73e4abaebf9aae25a0cae395..26da350050f32a4023f6d6161c58a2aa04b47065 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:34", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:34", "Tomorrow will be fine."); INSERT INTO memos VALUES(3, "1:23:34", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result index 61119b2b74e4579874ce300f5b0253832a446ae1..342947cc77ec7ac60108082967032d0bead55a29 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result index 9bf8b91ea079bd9b964ec3765a2b923ee55e2d8d..adc4ec6316e297f62bb4d458ba4c53cb5586cd1a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_greater_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result index e4d41f5867e3ba342a7efdc8ab4db56ef9059aa2..2881cc7724aebd7b8e8594d4bc2b3ae11d418d89 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result index 31a497ef8bb7ba770ab9b6b2887dc297dea198f3..d1a9fc2787a7111bfc29fbd2496beafbc8ddedc8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_time_less_than_or_equal.result @@ -8,15 +8,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(10) unsigned NOT NULL, - `writing_time` time DEFAULT NULL, - `content` text, - KEY `writing_time` (`writing_time`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); INSERT INTO memos VALUES(3, "1:23:32", "I will do something today!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result index 46c80ddcce71ac595b2107373a0413b1edfaed52..bff0d993ef8703aa5ed32ac95076d93a3e47b7bb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_with_index.result @@ -13,20 +13,6 @@ KEY(title), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `title` (`title`), - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result index 38263c1083f6c01f7a75a95b8ee8c018571dc08b..cc3173ecff234a43b29974a176b15175342d57cf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_varchar_equal_without_index.result @@ -12,19 +12,6 @@ FULLTEXT INDEX(content), KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - KEY `month` (`month`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result b/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result index 0812fc1089b827c6042856648c125138ac39d148..24d427ed2ab72f5e837f57c7d67ad85d1c0eef9d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/repair_table_no_index_file.result @@ -6,15 +6,6 @@ title TEXT, body TEXT, FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, body) VALUES ("survey", "will start Groonga!"); INSERT INTO diaries (title, body) VALUES ("Groonga (1)", "starting Groonga..."); INSERT INTO diaries (title, body) VALUES ("Groonga (2)", "started Groonga."); @@ -23,7 +14,7 @@ id title body 2 Groonga (1) starting Groonga... FLUSH TABLES; SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE); -ERROR HY000: syscall error 'repair_test.mrn.000010A.c' (No such file or directory) +ERROR HY000: system call error: No such file or directory: failed to open path: REPAIR TABLE diaries; Table Op Msg_type Msg_text repair_test.diaries repair status OK diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result index f2cf9667ac7f10a01856237aa9421d2dea620d90..c70ce337447d6befffeccb4596ae92dd7f3620e2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_text.result @@ -5,14 +5,6 @@ id int primary key, content text, fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result b/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result index 090ea9b84d67c4d8ccd0b0e90fa17bee781a4ad7..fd2cb655eaa9ebe709454b56c44f528dfab89b63 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/replace_varchar.result @@ -5,14 +5,6 @@ id int primary key, content varchar(256), fulltext index (content) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `content` varchar(256) DEFAULT NULL, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result index 400156cec7b1225ea4ebe886956e264164bde402..a111880a90475e595c1b53698a2ad000deb71215 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_with_index.result @@ -8,8 +8,8 @@ KEY (age) INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -SELECT *, COUNT(*) FROM users GROUP BY age; -name age COUNT(*) -Alice 20 2 -Charry 29 1 +SELECT age, COUNT(*) FROM users GROUP BY age; +age COUNT(*) +20 2 +29 1 DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result index 04f63d0e779f5aa5fae249839bb27ff11f993800..93d29c2d439a9444893e6d9031d13a81881de268 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/select_group_by_without_index.result @@ -7,11 +7,8 @@ age int INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE users ALL NULL NULL NULL NULL 3 Using temporary; Using filesort -SELECT *, COUNT(*) FROM users GROUP BY age; -name age COUNT(*) -Alice 20 2 -Charry 29 1 +SELECT age, COUNT(*) FROM users GROUP BY age; +age COUNT(*) +20 2 +29 1 DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result b/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result index 4f24d0d74b0c7bfd36347e7b8f8e08307394d6d9..87c9f4ef2b9e9165f078c0b13d8c737a7e3522ac 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/sub_query_fulltext.result @@ -9,15 +9,6 @@ user_id INT UNSIGNED NOT NULL, title TEXT, FULLTEXT INDEX (title) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL, - `title` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO users (name) VALUES ("alice"); INSERT INTO users (name) VALUES ("bob"); INSERT INTO users (name) VALUES ("carlos"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result b/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result index f6c036bbf9f55e2c32fbb04aefd72e41866a667f..0a18d817312b5ecd64206579f1658dd9620cdd99 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/temporary_table.result @@ -3,13 +3,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TEMPORARY TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); INSERT INTO diaries (title) VALUES ("cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result b/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result index 104d1d5150499f33335f80089782f4e30a7551e6..3525e2354d2b07a0b85a3ece4a6aceadb6d258e7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/truncate.result @@ -10,19 +10,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result new file mode 100644 index 0000000000000000000000000000000000000000..72a913b402e1971a3cf69a0f68d89cb3349593a0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_binlog_row.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS memos; +SET SESSION binlog_format = 'ROW'; +CREATE TABLE memos ( +title varchar(20) PRIMARY KEY, +content varchar(140) NOT NULL +) COLLATE=utf8mb4_general_ci +DEFAULT CHARSET=utf8mb4; +INSERT INTO memos (title, content) VALUES ('Mroonga', 'Mroonga is great!'); +SELECT * FROM memos; +title content +Mroonga Mroonga is great! +UPDATE memos SET content = 'Mroonga is very great!' WHERE title = 'Mroonga'; +SELECT * FROM memos; +title content +Mroonga Mroonga is very great! +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result b/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result index 11e6ee21949b1bde5894bafc2546a33c97f5fca4..e823e128c43891bfd44cd56465ca6c83ad480a17 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/update_virtual_column.result @@ -1,28 +1,29 @@ -drop table if exists t1, t2, t3; -create table t1 (c1 int, _id int); -insert into t1 values(1,null); -insert into t1 values(2,null); -insert into t1 values(3,null); -select * from t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 int, _id int); +INSERT INTO t1 VALUES(1,null); +INSERT INTO t1 VALUES(2,null); +INSERT INTO t1 VALUES(3,null); +SELECT * FROM t1; c1 _id 1 1 2 2 3 3 -set sql_mode=""; -update t1 set _id = 10 where c1 = 1; +SET sql_mode=""; +UPDATE t1 SET _id = 10 WHERE c1 = 1; Warnings: Warning 1265 Data truncated for column '_id' at row 1 -select * from t1; +SELECT * FROM t1; c1 _id 1 1 2 2 3 3 -set sql_mode="strict_all_tables"; -update t1 set _id = 11 where c1 = 1; +SET sql_mode="STRICT_ALL_TABLES"; +UPDATE t1 SET _id = 11 WHERE c1 = 1; ERROR 01000: Data truncated for column '_id' at row 1 -select * from t1; +SELECT * FROM t1; c1 _id 1 1 2 2 3 3 -drop table t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result new file mode 100644 index 0000000000000000000000000000000000000000..1f457eb5e96cd2c5e575bd9429a86c99eec4e4c5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_new_value.result @@ -0,0 +1,6 @@ +SET @mroonga_default_tokenizer_backup = @@mroonga_default_tokenizer; +SET GLOBAL mroonga_default_tokenizer = "TokenBigramSplitAlpha"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; +Variable_name Value +mroonga_default_tokenizer TokenBigramSplitAlpha +SET GLOBAL mroonga_default_tokenizer = @mroonga_default_tokenizer_backup; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result new file mode 100644 index 0000000000000000000000000000000000000000..9ad80e9a85a1af355b54d7b146a86bb5f517b117 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_default_tokenizer_same_value.result @@ -0,0 +1,4 @@ +SET GLOBAL mroonga_default_tokenizer = "TokenBigram"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; +Variable_name Value +mroonga_default_tokenizer TokenBigram diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result index 6e690f45e613b40c0da8291a328614f1ebd31c9b..4238cb6320ed5341e2d319d61270e1001ff5c5ce 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_delete.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start groonga!"); select * from diaries; id body diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result index 8de55efaccc26a4219bc108a52c5e1f39d9a4c9b..429398f6b84ebd9989b4510721d3e58d07e4b14b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_insert.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start groonga!"); select * from diaries; id body diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result index dd3ee5b333cb03819235ad7557185f47659790b4..9cd6f5c9b1db8783f8758eff2f56585df945d473 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_dry_write_update.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 insert into diaries (body) values ("will start groonga!"); set mroonga_dry_write=true; update diaries set body = "starting groonga..." where id = 1; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..5a19ab6fb4432669a475226705582e1a825c63a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS diaries; +CREATE TABLE diaries ( +title TEXT +) DEFAULT CHARSET=utf8; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +mroonga_command('load --table mroonga_operations --values "[{}]"') +1 +SELECT mroonga_command('select mroonga_operations --output_columns _id'); +mroonga_command('select mroonga_operations --output_columns _id') +[[[1],[["_id","UInt32"]],[2]]] +SET GLOBAL mroonga_enable_operations_recording = false; +FLUSH TABLES; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +mroonga_command('load --table mroonga_operations --values "[{}]"') +1 +SELECT mroonga_command('select mroonga_operations --output_columns _id'); +mroonga_command('select mroonga_operations --output_columns _id') +[[[1],[["_id","UInt32"]],[1]]] +DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +SET GLOBAL mroonga_enable_operations_recording = default; +FLUSH TABLES; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result index 04b22c22ea63b4b33bc4eb4713a9a143ab4ccc66..19abff382bfdf85a7b0aca5a35c80c6928922468 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_global.result @@ -4,30 +4,21 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 -INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); -INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +INSERT INTO diaries (title, tags) VALUES ("Hello Groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello Mroonga!", "mroonga install"); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+install" IN BOOLEAN MODE); id title tags -1 Hello groonga! groonga install -2 Hello mroonga! mroonga install -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +1 Hello Groonga! groonga install +2 Hello Mroonga! mroonga install +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); id title tags SET GLOBAL mroonga_match_escalation_threshold = 0; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); id title tags SET mroonga_match_escalation_threshold = 0; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); id title tags -1 Hello groonga! groonga install +1 Hello Groonga! groonga install DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result index 25a1aba61e2777389506244f788de5b78339cede..30e9262b5fc7a75e08f650f2cc191e6e7fb0a1bc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_match_escalation_threshold_session.result @@ -3,17 +3,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result similarity index 65% rename from storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result rename to storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result index 0181fe02d84838d9019fab267c18b429526e84d7..ff574f7bcce841c2c94695f41962852244115b28 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.result @@ -14,7 +14,9 @@ INSERT INTO ids VALUES (9); INSERT INTO ids VALUES (10); SET GLOBAL mroonga_max_n_records_for_estimate = 1; EXPLAIN SELECT * FROM ids WHERE id > 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE ids range PRIMARY PRIMARY 4 NULL 1 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ids NULL range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `test`.`ids`.`id` AS `id` from `test`.`ids` where (`test`.`ids`.`id` > 5) SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT; DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.result new file mode 100644 index 0000000000000000000000000000000000000000..5ecf89694e4f28f61276bcef8a8a41cff2ec8278 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +INDEX (id) +) DEFAULT CHARSET=UTF8; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +DELETE FROM ids WHERE id < 2; +SET mroonga_max_n_records_for_estimate = 1; +EXPLAIN SELECT * FROM ids WHERE id > 0; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ids NULL range id id 5 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `test`.`ids`.`id` AS `id` from `test`.`ids` where (`test`.`ids`.`id` > 0) +SET mroonga_max_n_records_for_estimate = DEFAULT; +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.result new file mode 100644 index 0000000000000000000000000000000000000000..b28eac5a2743e031267bd8697a55a746da738183 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=UTF8; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +INSERT INTO ids VALUES (4); +INSERT INTO ids VALUES (5); +INSERT INTO ids VALUES (6); +INSERT INTO ids VALUES (7); +INSERT INTO ids VALUES (8); +INSERT INTO ids VALUES (9); +INSERT INTO ids VALUES (10); +SET mroonga_max_n_records_for_estimate = 1; +EXPLAIN SELECT * FROM ids WHERE id > 5; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE ids NULL range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `test`.`ids`.`id` AS `id` from `test`.`ids` where (`test`.`ids`.`id` > 5) +SET mroonga_max_n_records_for_estimate = DEFAULT; +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result new file mode 100644 index 0000000000000000000000000000000000000000..e2d8a8de493f7561e41a4a3a01843649591073a8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_max_n_records_for_estimate_not_found_in_limit.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id INT, +INDEX (id) +) DEFAULT CHARSET=UTF8; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +DELETE FROM ids WHERE id < 2; +SET mroonga_max_n_records_for_estimate = 1; +EXPLAIN SELECT * FROM ids WHERE id > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE ids range id id 5 NULL 1 Using where; Using index +SET mroonga_max_n_records_for_estimate = DEFAULT; +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_empty_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_empty_value.result new file mode 100644 index 0000000000000000000000000000000000000000..3d7f36d1846b43f9a724762b5cf955014e00faaa --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_empty_value.result @@ -0,0 +1,9 @@ +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is still disabled +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result new file mode 100644 index 0000000000000000000000000000000000000000..aed9d91a9d5f1fc64110b8cc9c1e146f9edd1a62 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_disabled_null_value.result @@ -0,0 +1,9 @@ +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is still disabled +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result new file mode 100644 index 0000000000000000000000000000000000000000..22ac271e552a0564845d949b1265247b855f0ba8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_empty_value.result @@ -0,0 +1,10 @@ +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is disabled: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result new file mode 100644 index 0000000000000000000000000000000000000000..3921fb1625933ffb36cf3e2e8ccb08b21b35ed25 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_enabled_null_value.result @@ -0,0 +1,10 @@ +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file +log file is changed: -> +query log file is disabled: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result new file mode 100644 index 0000000000000000000000000000000000000000..7b1be1365b7a1863a627a8c3417aeebce8bc8aae --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_new_value.result @@ -0,0 +1,9 @@ +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file groonga-query.log +log file is changed: -> +query log is enabled: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result new file mode 100644 index 0000000000000000000000000000000000000000..adf3d1bfbe8873dd57f8be54c1372aa8661aac46 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_query_log_file_same_value.result @@ -0,0 +1,10 @@ +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +Variable_name Value +mroonga_query_log_file groonga-query.log +log file is changed: -> +query log file isn't changed because the requested path isn't different: +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/suite.pm b/storage/mroonga/mysql-test/mroonga/storage/suite.pm index 7e4f8c1776b96caafbbc3ae9ab6cfdb90c769137..528ccc5d69360dcbb111c50c3efa71e79334a642 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/suite.pm +++ b/storage/mroonga/mysql-test/mroonga/storage/suite.pm @@ -5,7 +5,7 @@ package My::Suite::Mroonga; return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or $::mysqld_variables{'mroonga'} eq "ON"; -sub is_default { not $::opt_embedded_server } +sub is_default { 1 } my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql'; my $groonga_normalizer_mysql_install_dir=$::basedir . '/lib/groonga/plugins'; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test index 38d4f034daa1291d17b2fb7df5735300bef1b47d..4e486b83cc09cdbcb4b8c9a4118f1314fa391da3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_after.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,11 +23,11 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - body TEXT + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries ADD title TEXT AFTER id; +ALTER TABLE diaries ADD title VARCHAR(40) AFTER id; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test index 0e82b3dd4b0a5daaaa366797e25fcc16e2b1c62e..5912ed3fcf04a3b4a11def2767f7fbd198162ffe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_first.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,11 +23,11 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - body TEXT + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries ADD title TEXT FIRST; +ALTER TABLE diaries ADD title VARCHAR(40) FIRST; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test index 1071faf0b812f66b56f9cf1e58ec1d88efabb1de..18fa2f3ef1eec6d57683fcfdb67bbba4ab913162 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test index 70fb61cc044aab1ae813d2f31216e53de6ce78b6..f84c931c0107279386d098607954ca2b7277e8c9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_flags_parameter.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/not_embedded.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test index 8a64fe00af0dff7043299822538e2cf7cb29931a..d49e84cd5fa3e436bb3f3fb037e85f3b880dd4f4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_comment.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test index f34cbcdcbf71d9e62e990ae44dfabcce38cab6ea..cc208a20872f2a76578d0e05bfd0eba475d139cf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_groonga_type_parameter.test @@ -13,10 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test new file mode 100644 index 0000000000000000000000000000000000000000..18836127238a755c52004356dd8571df20dd4622 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_cp932.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + id int PRIMARY KEY +) DEFAULT CHARSET=cp932; +ALTER TABLE users + ADD COLUMN –¼‘O text, + ADD FULLTEXT INDEX (–¼‘O); + +INSERT INTO users VALUES (1, "‚â‚Ü‚¾"); +INSERT INTO users VALUES (2, "‚½‚È‚©"); +INSERT INTO users VALUES (3, "‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test new file mode 100644 index 0000000000000000000000000000000000000000..88ef12498a7314ab6d745a8d916ff7e4cf700d57 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multibyte_utf8.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + id int PRIMARY KEY +) DEFAULT CHARSET=utf8; +ALTER TABLE users + ADD COLUMN åå‰ text, + ADD FULLTEXT INDEX (åå‰); + +INSERT INTO users VALUES (1, "ã‚„ã¾ã "); +INSERT INTO users VALUES (2, "ãŸãªã‹"); +INSERT INTO users VALUES (3, "ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test index 568deea9e29f6169f7d266a9c987c5b7d7e5bf5f..1f4fa4663b15b64a2458bd4a78b7b826daf70542 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_multiple.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT + title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; @@ -31,7 +31,7 @@ INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; ALTER TABLE diaries - ADD COLUMN body TEXT FIRST, + ADD COLUMN body VARCHAR(140) FIRST, ADD COLUMN published BOOLEAN AFTER id, ADD COLUMN created_at DATETIME; UPDATE diaries SET body = "will start groonga!"; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test index 8c4d76a5868e1b13dc9b8a0ff063ee51a43fb4b7..fac1f045db15a7721a5c4b239edaf6338ca5000f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_plain.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,14 +23,14 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT + title VARCHAR(40) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; -ALTER TABLE diaries ADD COLUMN body TEXT; +ALTER TABLE diaries ADD COLUMN body VARCHAR(140); UPDATE diaries SET body = "will start groonga!"; SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test index 037e81c790696c8f9af31e5863cb4f225138a589..c198358146b8ca7d6f38513c2fd75881bb6e4369 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_column_type_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test index 83b8aef1c5aa6d70213da51776ab0b0a166c22d7..1440c0b78aabbc14ea5d8e39b5dad2f5d085fd47 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_token_filters_one_token_filter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test index 4476decec780f272537c73933533954ef29e0633..53d4b21ff5380b43c0ad43854c603f965e708b2e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_duplicated.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test index 424ae89b4a60a471510470c686f5ae4a37a34c28..7bb65327f791e2bfa731f7d2db021638ac645f03 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_index_unique_multiple_column_duplicated.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test index 94db5d40b6037d8918e2161c737c9230e758c3e9..7e584131b3d55e7fbef8367998431aae24b5462f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_key_multiple_column_with_data.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test index 5bc12edadc45d1d85f914e6f57a7a921031688ea..7ae72d672f6a26b0b245af5d3bc7eacf36ac9ebe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_add_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test index 98d26966bd0976613f16569e8ef0c38e6fd123a6..119099c435099556242242b1db0afbc16912dd46 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_comment_not_for_mroonga.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test index 575d65e44a25b9c63baa22fc0a16b55350ede527..c01f7a95754dc021492fe5445d41506b9cd40ea2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_have_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test index 295bb91e0a9125ecd8d643d52796b9f8dd4d2d5a..e680e6e200859ff0dbf36f5ccfea937afaa6111b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_after.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries CHANGE body description TEXT AFTER id; +ALTER TABLE diaries CHANGE body description VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test index 01682688a741febd55cf0b3e3cad77fdcb02c502..20624ad953700eb6ed63cf3e10bab4b2a08b5b34 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_first.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries CHANGE body description TEXT FIRST; +ALTER TABLE diaries CHANGE body description VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test index b732f04588cee922352f166c5bb89a3ffcdeeb7d..7d982ae422e530637d9cffa625a9974127af4097 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; ALTER TABLE diaries - CHANGE body description TEXT FIRST, - CHANGE title subject TEXT AFTER internal_id, - CHANGE id internal_id INT; + CHANGE body description VARCHAR(140) FIRST, + CHANGE title subject VARCHAR(40) AFTER internal_id, + CHANGE id internal_id INT AUTO_INCREMENT; SHOW CREATE TABLE diaries; INSERT INTO diaries (subject, description) diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test index 88a69111f65ac7716a867dd8d6ccbb963f5af014..2394be86333747e53c02831ee033d96098918285 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_no_order.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -ALTER TABLE diaries CHANGE body description TEXT; +ALTER TABLE diaries CHANGE body description VARCHAR(140); SHOW CREATE TABLE diaries; INSERT INTO diaries (title, description) values ("groonga (1)", "starting groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_decimal.test similarity index 84% rename from storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test rename to storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_decimal.test index 71e0fda38252a8d5226a9dd09ce27952d4b26dfb..e8e0bd416f9b7bc5ac6587ff52a69cf8366f367b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_engine_decimal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_decimal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -24,19 +24,18 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, temperature DECIMAL(6, 3) ) ENGINE InnoDB DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); +INSERT INTO diaries (temperature) VALUES (21.281); SELECT * FROM diaries; ALTER TABLE diaries ENGINE = mroonga; SELECT * FROM diaries; -INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); -INSERT INTO diaries (title, temperature) VALUES ("cloudy day", 17.821); +INSERT INTO diaries (temperature) VALUES (14.213); +INSERT INTO diaries (temperature) VALUES (17.821); SELECT * FROM diaries; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_fulltext_index.test similarity index 90% rename from storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test rename to storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_fulltext_index.test index a477d0919464416761bf2848d3776e9e8de9c228..f8c4dfa3400ca4acf8a7f5b0e0b2a4321c230ebc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_engine_fulltext_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,9 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'diaries'; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); @@ -37,7 +39,9 @@ SELECT * FROM diaries MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); ALTER TABLE diaries ENGINE = mroonga; -SHOW CREATE TABLE diaries; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'diaries'; SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test index 92380fdb8ec1c4a9f7d1ad8a94b3470a0b74cb64..c1bf17ba439dcdca6a72e7604850f263a0794b61 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_token_filter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test index 1f6980cc04b32ffaa98c6da966141389eb59b7ff..d1f8308268a719f914229c19d378511073bc0c78 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_create_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test index 5cba17d20722343accb93cc38cf68277422c4652..17b86b47389f6957588fcacf62f9f0ded666d61d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test index d7f7f446459476d82f76e22b25496f58920df1e8..028fb33f1e36f2a6f65b0aa560ac2dfe50c2bf7b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_ujis.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test index 626a1bc80a8be50e8be022dd4061f9df585d0f79..00015dcfacadf03c612da1be5a129e32ad601de4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_utf8.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test index ea424df2e572dc34d6787ccd3c2f0b52dbf0ed07..5760887e7823db9cf214e65c717618495abb48c2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test index 186e1f5095cb948390507beea970acdc9108143c..69dbe23cc24d76a025694cc235b39dc6e8fb8576 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test index 4348efeb0667ae1ddee7dab364fc96e2aa264a3e..dce2ea51397a5536756f091962699e3cb80bf22f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_primary.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test index 49d9f0b8da27391399b9fef5fab58005e12d09c2..00f6d30a5725a8057c7e8516ff34fb67483ae74f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_truncate.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test index 58e53cb06f2eb7035052f775481c49768b4cb20d..020579106e1466b38689223ce360472dc5379476 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_updating.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test index fc3acad9000bb4726c87f44aab7beff7fbf5fb43..32da1b3a547a7f4ce7708ad54f07f87f19da66fc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_multiple.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test index 6b790e5d6217f7dd59d2e1b0b7aa425fc5982aaa..ec5735f06723294c18718b5e7a502f6d5227161d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_column_one.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test index 956f397b9654ad7aa313421723c7f9c6558b7012..eb80d3036d346230494b504e659abfe4ac4a2b30 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_key_multiple_column_with_data.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test index 95f683f1df5d4d96075493c8a32cb434a9848072..da06f680d68ce4c3df4e33198f5b14baee022b7d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_drop_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test index 62bbe4a4dc2a0db150da73b60793e2ea5a06bc0a..08d84f7b552b0d80177890b7684c3ebfbd9799a3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test index d87078e7e9cf07e3411600c83314762ef043a220..3309f60a3d9cbdcd00da9e426a0fc5605c18332e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test index cb6ade7a41854e988573b27d718baecdaf1c5fc0..2f3b61efcf366c9e6f3905c5de200a6ebf61bfa2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_ujis.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test index 62bbe4a4dc2a0db150da73b60793e2ea5a06bc0a..08d84f7b552b0d80177890b7684c3ebfbd9799a3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_utf8.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test index 13afdcfe0e61ba5d8e3325c8b0b3bccb6bf7b101..1d073dc641faed221cf49443a7ece664bf5b34e9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test index bf2cc8bd6e2f69c93e293aa821fb9de095777fd9..870b1bb60981f7aff073e43cfacd8ec26eea8188 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test index 3d9523ab53777bbe3fe4b853059ec6cafa3b62a5..34ee3fcd2757bf9227869094868b51ff01d0c092 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_primary.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test index 193680296dca68eb9dff92fcd2594f643baf3fc8..b349411849fef671c10203047b18b7e5b654619a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_no_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test index bf7e750174198714b17b9683b9a2b801bc4ac5d1..6316eac4fe170b3fdc34e3e4b229e90447049d1a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -31,9 +31,8 @@ INSERT INTO memos (content) values ("Started Groonga."); INSERT INTO memos (content) values ("Starting Mroonga..."); ALTER TABLE memos ADD FULLTEXT INDEX content_index (content); -SHOW CREATE TABLE memos; -SELECT * FROM memos WHERE MATCH(content) AGAINST("groonga"); +SELECT * FROM memos WHERE MATCH(content) AGAINST("+groonga" IN BOOLEAN MODE); DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test index c719318d847d4ae1618e701f23819f9eb55e8ebe..f4facdcb72f8051c6cbadfe5bdf57df99ac68ef4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_add_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test index 11799a51a652e0e85b53f39df56175edb6559efd..165b71a86c9bf67d19b4c31d72c621e7f93068d3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_fulltext_drop_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test index 8bdfd10024eb81d4be88cdcf7b8aa1b4b796a379..ce1e52efa31c3f5a180eaf4f7dad4c23af433667 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_after.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; -ALTER TABLE diaries MODIFY body TEXT AFTER id; +ALTER TABLE diaries MODIFY body VARCHAR(140) AFTER id; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test index a4dd52d9faccf497d4a3f9e6aa02d69ced0b9b51..22c6b59e0220f4c7ab813b968ca5a994e4d426d2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_first.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,15 +23,15 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga."); SELECT * FROM diaries; -ALTER TABLE diaries MODIFY body TEXT FIRST; +ALTER TABLE diaries MODIFY body VARCHAR(140) FIRST; SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test index 45f4748e98d6825ea56a50443b2b1b9aa610bc30..eed22d0669036f0e995ea3a48bd7e16f01ddd278 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_modify_column_no_order.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, - body TEXT + title VARCHAR(40), + body VARCHAR(140) ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test index c44937b3f84599c9b03e42a50c2df21140035532..77d0bc741e2b68b76f228d7d1c0d12d91a94d418 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_recreate_anonymous_index_at_once.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT INDEX (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("survey", "will start mroonga!"); @@ -44,8 +43,6 @@ SELECT * FROM diaries; SELECT * FROM diaries WHERE MATCH (body) AGAINST ("+groonga" IN BOOLEAN MODE); -SHOW CREATE TABLE diaries; - DROP TABLE diaries; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test index 91898b5bb447f9c91c8d0fd4a45d3880807d57ce..6c15161ed2296a177712655a16d44dbb595bc592 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_rename_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,9 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'diaries'; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; @@ -42,7 +44,9 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); -SHOW CREATE TABLE memos; +SELECT table_name, engine + FROM information_schema.tables + WHERE table_name = 'memos'; DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test index e696d12f128a73e7644fc4c4776f730e12bf5134..09e0ea8a11891c7f8b795a269d2eb687e6d0f916 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_spatial.test @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -25,7 +25,7 @@ DROP TABLE IF EXISTS shops; CREATE TABLE shops ( id INT PRIMARY KEY AUTO_INCREMENT, - name TEXT, + name VARCHAR(40), location GEOMETRY NOT NULL ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test index db018023af0c3c9c8099ae89fdff372a6e1ab188..f452e402d817a2e60e9f148d4e552154087332f6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test index 169260cc80812ac607feb118b0010c91a16b159b..2d0840ce990db9bf55891498df60e65f03b91567 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_table_param.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test index ee4db71722cba5dae1efb98c867e5d339fba3652..2d854ec35b4bd5dd336a394b3a0fbfc03505e347 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/auto_increment_text.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test index c67aff06674082fe7aac7a74e100cfb808f51718..eff9259a7bad64114638747c86cc2c7bb6e9db94 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/binlog_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_log_bin.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test new file mode 100644 index 0000000000000000000000000000000000000000..77271b4f16987541ac3624ffe2dc6552a6fc2ccd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_broken.test @@ -0,0 +1,45 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET NAMES UTF8; + +CREATE DATABASE check_test; +USE check_test; + +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX (title) +); + +INSERT INTO diaries VALUES ('Hello'); + +--remove_file $MYSQLD_DATADIR/check_test.mrn.000010C + +FLUSH TABLES; + +CHECK TABLE diaries; + +REPAIR TABLE diaries; +DROP TABLE diaries; + +DROP DATABASE check_test; +USE test; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test new file mode 100644 index 0000000000000000000000000000000000000000..1460732b29a143fc65a65f54e0183aa7af182621 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/check_table_not_broken.test @@ -0,0 +1,38 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + title TEXT +); + +INSERT INTO diaries VALUES ('Hello'); + +CHECK TABLE diaries; + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test index d0df707162bfdc599009a52b9508cf0fe91c59e6..101c16e9675cc2c8c95f6e1224aeab2fccce4d27 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_general_ci_french.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test index f9e9a817a08192b923d2c3a1d3db4fafd9969599..2c28edb332794be27ece0b40afd1a7734c3ccc71 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_french.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test index 4beec67b468f0cf5c7c5ff6e9b8b87d5318b616c..1d9998eeed3a265521819b828669cd5973fa4e2b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_520_ci_japanese.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test index 045c9ef2a4ea90ff432f11b062bdd5225d3158d6..f69e5594ebd6cb1dd8f58a397750dea86d2807ac 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_french.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test index 199e2904d94534346bf7cc1e9f023f9ef446c46d..5d48a1a6201a08b3d32933903791a0af122aabbd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/collation_utf8_unicode_ci_japanese.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test index 4c63dedfc608735bec42556cde89c09abc043b26..42c5e1d22845f29ed54f0c0445eade889f1f0f69 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_index_not_for_mroonga.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test index 0fcc806883d15e471cafccc3973a8ecce509f837..6761869d4ff55b11835f7a711c92540cc070013a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_comment_normal_not_for_mroonga.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test index cc713a80e5ac3529ae25aeb6633dc4c2af9271e3..8645a2d7e5fcf3b09fcedc8afb9b15c28fa45340 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, + title VARCHAR(40), created_at DATE, KEY (created_at) ) DEFAULT CHARSET UTF8; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test index d5587876c3c18dafea15f7c5e8dceea3af4e6dd1..21dcf156e43cced0a792ab6486ccd9e0cb62ce98 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -22,7 +22,7 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, - title TEXT, + title VARCHAR(40), created_at DATE ) DEFAULT CHARSET UTF8; SHOW CREATE TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test index 91a20039780051288aaaf411d195522477672beb..552a2dfb635539139a83f3b9bc83e80850d43981 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test @@ -1,4 +1,5 @@ # Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test index 054ea2282362a459f7733c49b1a01eccb75c2ab3..bf08b878e1e47cc0fe1e6eb8f534343a63119190 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_2038.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2038-01-18 03:14:07', '2038-01-18 03:14:07'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test index 1a1ce992a6f011dec4b486b431298a7d2480683e..71ee07139cab9bae66aeeb113e295652a12172cc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_before_unix_epoch.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test index 3fac76bb69b2653289d82be12a522b38f72b5514..5b25cf38e999e0546930c65a7305f6c237cb0c38 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_max.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test index 1e1d950ea7e5d57afe64114afaa6a754f575ed9a..e93e38cd357d112cd0463fe694fd3ffe113ba94a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_32bit_out_of_range.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test index 3abf611a8390ae689795ed479a066a88bd6aaae8..af04133ef2c124f99d4cff8abb79e811ff4db223 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_2038.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2038-01-19 03:14:07', '2038-01-19 03:14:07'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test index 586367147cc514a146d70f27311d9c9e66d21a7a..a3e355cc1ea2c70958ff03683379a78cfe26022d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test @@ -13,12 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -30,10 +28,9 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) - VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); + VALUES ('1000-01-02 00:00:00', '1000-01-02 00:00:00'); SELECT * FROM diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test index 6599a554efdf4d4eeb169b7d871bed74658eeeae..3f4bb7b1e2398c9e605b103e867f4ec7c1cb9ecb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_max.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('9999-12-31 23:59:59', '9999-12-31 23:59:59'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_strict_sql_mode_out_of_range.test similarity index 86% rename from storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test rename to storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_strict_sql_mode_out_of_range.test index 95fa60e7e598cd8c94bb1875b05a130f44d6c8e9..47266e017d720be8a7ad2c6839edaa8867e124b9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_strict_sql_mode_out_of_range.test @@ -13,12 +13,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/have_64bit.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc +--source ../../include/mroonga/have_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -30,8 +29,8 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +--error ER_TRUNCATED_WRONG_VALUE INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_5_out_of_range.test similarity index 89% rename from storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test rename to storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_5_out_of_range.test index bdc21cccf52102329350cc4272d912c32a88e53a..23ddc373ab2737e4509aacf48648c02365f79857 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_55_out_of_range.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_5_out_of_range.test @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc ---source ../../include/mroonga/have_version_55.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc +--source ../../include/mroonga/have_version_5_5.inc --source ../../include/mroonga/have_mysql.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('2012', '2012'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test new file mode 100644 index 0000000000000000000000000000000000000000..55457c167fa3f1af2c9a9b9715bafc0965fbad21 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_5_6_or_later_out_of_range.test @@ -0,0 +1,41 @@ +# Copyright(C) 2012 Kentoku SHIBA +# Copyright(C) 2014 Kenji Maruyama +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_freebsd.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT, + created_at DATETIME +) DEFAULT CHARSET UTF8; + +INSERT INTO diaries (title, created_at) + VALUES ('2012', '2012'); + +SELECT * FROM diaries; + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test index efa54b1e0941922136d65296769ca05197687173..94eb237f1a2821db1fb5f89e86fb712678cbe75f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( created_at DATETIME(6), KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test index f0f51fba53e054babb93bd9336b82abfb62a7547..5dc033f1c531dfcc8d5c4166923235dc7d73187e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_fractional_seconds_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME(6) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01.111111"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test index e75539d4ae24b346f301d0a3aab636dfd5ca2307..d66ed5617b83eebc0d17a67a28a589617f938a89 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_freebsd_before_unix_epoch.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_freebsd.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('1000-01-01 00:00:00', '1000-01-01 00:00:00'); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date_strict.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_date.test similarity index 88% rename from storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date_strict.test rename to storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_date.test index 808313da9304cc196ad4960c413c9b79d8481200..3382a1c1e68b7388cdef115b6a7c4860fefd7608 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date_strict.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_date.test @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,12 +25,9 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -SET sql_mode='STRICT_TRANS_TABLES'; --error ER_WARN_DATA_OUT_OF_RANGE INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); -SET sql_mode=default; SELECT * FROM timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test new file mode 100644 index 0000000000000000000000000000000000000000..f95b0947fc24edd1d03314d29a70cb591151fd39 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mariadb_10_2_or_later_zero_month_day.test @@ -0,0 +1,39 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test new file mode 100644 index 0000000000000000000000000000000000000000..2b6a05915d744d8ae8a860868960338e2623b959 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_date.test @@ -0,0 +1,39 @@ +# Copyright(C) 2015-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); + +SELECT * FROM timestamps; + +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test new file mode 100644 index 0000000000000000000000000000000000000000..4419231a93ebea4d846cc9dfb5b65198abdb4d5b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_mysql_5_7_or_later_zero_month_day.test @@ -0,0 +1,39 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test index 8c30509037f948e01a58c11760fcbafbd0392d07..fcea5431330fd96cdcc19ddfded86d9166f14dae 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_null.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ('NULL', NULL); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test index b49897800a09bd2db12d7ec3c2aecbac42b2291f..bf415b177f85943b6352cf6fd5d377e7b14ca13e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( created_at DATETIME, KEY (created_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test index b1168f6333033d29b9da857485b047ac08f7486e..c6c9edec5de70989efb3a71fe75284d5552b4a69 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, created_at DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at) VALUES ("clear day", "2012-01-29 21:51:01"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test index 5742de6e3929686b7d87f32b9a4351b8d86503f6..c5107e6c8851528f5002654bfe9c507f4a66923d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,14 +26,16 @@ CREATE TABLE timestamps ( id INT PRIMARY KEY AUTO_INCREMENT, create_dt DATETIME ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE timestamps; -INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); -INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); +SET sql_mode='STRICT_TRANS_TABLES'; +--error ER_WARN_DATA_OUT_OF_RANGE +INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00"); +SET sql_mode=default; SELECT * FROM timestamps; -SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; +INSERT INTO timestamps (create_dt) VALUES ("2015-06-17 00:00:00"); +SELECT * FROM timestamps; DROP TABLE timestamps; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test new file mode 100644 index 0000000000000000000000000000000000000000..12b5862412e5490dfaa34671626f446108ee7b96 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_month_day.test @@ -0,0 +1,39 @@ +# Copyright(C) 2013 Kentoku SHIBA +# Copyright(C) 2016-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS timestamps; +--enable_warnings + +CREATE TABLE timestamps ( + id INT PRIMARY KEY AUTO_INCREMENT, + create_dt DATETIME +) DEFAULT CHARSET UTF8; + +INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00"); +INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00"); + +SELECT * FROM timestamps; + +SELECT * FROM timestamps WHERE create_dt = "2012-01-01 00:00:00"; + +DROP TABLE timestamps; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test index 9213379336fe877400b6b3a147f3e28d0c3ca3b2..03cb6b64d2f60bff58897aa4a55b584d5693698a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( temperature DECIMAL(6, 3), KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test index 91e4b789aeadea3b13d450e23243aab92e0ff3bd..ca59d052e782a0fc1feb39948b1a1fac5d76901f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_fractional_seconds_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, temperature DECIMAL(6, 3) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21.281); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14.213); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test index 46d9ea37470d0f31fc640cb98b11b94d715d0859..14303454af28c65272ee23ba20276ff6bbd480ef 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( temperature DECIMAL, KEY (temperature) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test index acda07ab9541ff06b5dc99682d6e56a41e141ca2..ef8609a78adb51186c577e1b1ebfce6d230f6b67 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_decimal_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( title TEXT, temperature DECIMAL ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, temperature) VALUES ("clear day", 21); INSERT INTO diaries (title, temperature) VALUES ("rainy day", 14); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test index 2b7fd7de81876e621e33a6b79e08ec05931f8e00..6a7a5bcc37ba6afad79fefd6e2195f079f632b83 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_less_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test index f4b3175764c44d45074ee5cebc5fb6f9c51c0659..92eabc11d61db14c4d4eb348c92ba81b4ff3e8de 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_enum_many_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test new file mode 100644 index 0000000000000000000000000000000000000000..8561688db3a37f6e1179183fd77841cea987cd17 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_add_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test new file mode 100644 index 0000000000000000000000000000000000000000..a54ee0e26a92323ce036452dab35bea953733d98 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_delete.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test new file mode 100644 index 0000000000000000000000000000000000000000..0bd963874699df0ebdfefbf83b03dc84188c0382 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_drop_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..841c2f444529814733d9a23492fe9413dbcf87d9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_insert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test new file mode 100644 index 0000000000000000000000000000000000000000..725c32384dfa201267705e1505b75abfa640205a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_reindex.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test new file mode 100644 index 0000000000000000000000000000000000000000..08969fa571678cbd514c912b202b75f022ed2c94 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_stored_update.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test new file mode 100644 index 0000000000000000000000000000000000000000..80437aa0e296c83b9a392ece7f4b4179a1e4eae5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_add_column.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test new file mode 100644 index 0000000000000000000000000000000000000000..c36913cecca08ae132138bb82c07d6f0973f01d4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_delete.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test new file mode 100644 index 0000000000000000000000000000000000000000..0946b1f30ece793625cdd4c35377dbf1af63c717 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_drop_column.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..90cb52476932e8542c26201968ab534d7e5caa6b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_insert.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test new file mode 100644 index 0000000000000000000000000000000000000000..340c5e70fcd33a995ec43af4e2a2cf46b89f2ee0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_add_index.test @@ -0,0 +1,35 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +--error 16509 +ALTER TABLE logs ADD INDEX (message); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test new file mode 100644 index 0000000000000000000000000000000000000000..480cc1f7b94ae1688bef79275a2d9c98f099bbcf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mariadb_10_2_or_later_create_table_with_index.test @@ -0,0 +1,32 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +--error 16509 +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL, + FULLTEXT INDEX (message) +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test new file mode 100644 index 0000000000000000000000000000000000000000..7c953d30d14fcd02d1d2bb2dfacea2e0b19496dc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_mysql_5_7_or_later_add_index.test @@ -0,0 +1,35 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +--error ER_ILLEGAL_HA_CREATE_OPTION +ALTER TABLE logs ADD INDEX (message); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test new file mode 100644 index 0000000000000000000000000000000000000000..68d97f990dc69b94da008ff563678602ec2e706f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_generated_virtual_update.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test index ca4f154d4024da5a72558f193e3e7ae547d829a7..39031cabf1508c564d176fec4eb216e846e0e937 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id__id.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test index c1c16d3affcbbcb9587b07ddd5611195296a8646..6b4c637a3598bf6279fa09131e3c3287d4a9fe7e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga__id_invalid_id.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test index 9c83c94b417f3ef9c375dceae4be89f8190bbb34..4d4a0f5a673289a4cf23bc5ae93df28527c55af1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_other_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test index 5143f06a21a1537dd9118191b2eda3ac8fc28ca9..b96fa9b03b3e556444496b2bf4300322028c9e49 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_fulltext_vector_other_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test index 9be02c2a1a213ed16fdffcdf12a641a764944072..d3caeba70bf49ef4dc9a45849ac70a988c5ff0ff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_index_int_other_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test index b7e85909399990fd799b7f5ee1e3eaa5eaab066d..59471f7e97bec5fad8c7d71de715d034720dc46b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_reference.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test index 432aab8862938e96b9328ca620ba1ceeb2eff4e8..e0ab1ad4c1b3ab4676bd512f5b998273911acb24 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_lz4.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/support_libgroonga_lz4.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test index 0f21e37c2018426463da2bad74f03f779bedfdb4..7d5665b04f5c047ae8e4d29852cb32c376bff4cf 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zlib.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/support_libgroonga_zlib.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test new file mode 100644 index 0000000000000000000000000000000000000000..99ac2cdbb6bb64d17d85fd6ff7b940bd70b9b140 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_support_zstd.test @@ -0,0 +1,37 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/support_libgroonga_zstd.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS entries; +--enable_warnings + +CREATE TABLE entries ( + id INT UNSIGNED PRIMARY KEY, + content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' +) DEFAULT CHARSET=utf8; + +INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); + +SELECT * FROM entries; + +DROP TABLE entries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test index d057e0bcfbdc1a49b8d9fd33bf78fc0680967417..4d0a80ad5d59de8c0520d656454149791aedf408 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_lz4.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/unsupport_libgroonga_lz4.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test index 1066270e48db3222c67a87ddf3a8b21f1dd38569..bbaaa51be406d7d6bb1fd6efb8ae2bf0f7877e5b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zlib.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/unsupport_libgroonga_zlib.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test new file mode 100644 index 0000000000000000000000000000000000000000..6b5eb5cd86f0d3efbc40178f94182ce8ea5e682e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_unsupport_zstd.test @@ -0,0 +1,37 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/unsupport_libgroonga_zstd.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS entries; +--enable_warnings + +CREATE TABLE entries ( + id INT UNSIGNED PRIMARY KEY, + content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' +) DEFAULT CHARSET=utf8; + +INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); + +SELECT * FROM entries; + +DROP TABLE entries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test index b168716ed9428abb9b44745be1eac7703973b413..e18f17b7c9514fab3c5e85edbf164d5997e1b6ce 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_scalar_with_not_for_mroonga_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test index 2098e878ecb33866e79c72b4dba1ff700dc05ecf..3675db38c486e2ffb8ef32006a4e63d15ac112ad 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_order_by_with_function.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test index 995fafefeeb2e482241ae132330c58e6888fde6f..9b6c8d3016f614d096fff4226f465f058c118911 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_groonga_vector_reference.test @@ -1,4 +1,4 @@ -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc @@ -29,8 +29,9 @@ CREATE TABLE tags ( CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, - tags TEXT COMMENT 'flags "COLUMN_VECTOR", type "tags"' + tags VARCHAR(128) DEFAULT '' COMMENT 'flags "COLUMN_VECTOR", type "tags"' ) DEFAULT CHARSET=utf8; +SHOW CREATE TABLE bugs; INSERT INTO bugs (id, tags) VALUES (1, "Linux MySQL groonga"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test index d8d181228bb8907414fb1904d4ac4d14dd2bc00a..038d29c9e66e917524d5665b54b088656786ad89 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_int_with_index_zero_value.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..9bba55b0b92cc02800d31b26288f474371c3ca3b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_json_insert.test @@ -0,0 +1,37 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_0_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4; + +INSERT INTO logs VALUES ('{"message": "start"}'); +INSERT INTO logs VALUES ('{"message": "restart"}'); +INSERT INTO logs VALUES ('{"message": "shutdown"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test new file mode 100644 index 0000000000000000000000000000000000000000..f7eae384dcfde6cf0047a3ac2a21afc5ce343599 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_cp932.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + –¼‘O text, + FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932; + +INSERT INTO users VALUES ("‚â‚Ü‚¾"); +INSERT INTO users VALUES ("‚½‚È‚©"); +INSERT INTO users VALUES ("‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test new file mode 100644 index 0000000000000000000000000000000000000000..6d6c44ceba1c1befbfe25db4ac8b85c54b168414 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_multibyte_utf8.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + åå‰ text, + FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8; + +INSERT INTO users VALUES ("ã‚„ã¾ã "); +INSERT INTO users VALUES ("ãŸãªã‹"); +INSERT INTO users VALUES ("ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test index ede3a07f542860e9fe2bea7f37a6add9c4a866ab..a4e229dd17a53670eafa5400d03c23f10413bc1e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_16_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test index c43f5c70e1341a4a6f3292aa2eeb58c3aeacee32..5d7b8c4dff8f3ccca7358caedf3962b8800348d8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_24_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test index ccddec38fa0186b4241f741c44bbb9d4374c9d35..3391fb7b740b79878680b293a070ed6f2627483a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_32_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test index c041a3f9ea91c68608c6171705bda3837cf4e326..219bb085c84cdbce91e5e8013e32b39347eaa261 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_64_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test index d8a6a0ac36c6d88e041103d149e71a9655b37dea..79d56f4e8e6ce4930dfffeb6b4b7dac60738ddb5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_set_8_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test index 0a2f9d3074901c19a6c4ed7afb28a6a22bfa96c9..a031cab8767a402c9a0fc8ac525e72a6e5a17f2c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_bigint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test index b64d97fd24e47313c7dec97f5721bf761535ea0e..287d0407bdf1b7933b4a8e28b04ac40c1d5afd72 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_int_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test index f2252055c10313f6d218ac2b3bd6bcffc7584478..704cc4d41e3b385253197307127294c6cab33f60 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_mediumint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test index ff2eeef6a7b68d2ad6bc8b824fb1c822a74ef569..2200efc71c49f55be91022b898dc56f9e5f10761 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_smallint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test index 50824bb2cba82d116b85de88cf8a878a13887526..33f07c4747008236b78d193b1282417e31912745 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_signed_tinyint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test index 54d127c734db51bb76aba5fde177704ad1a26949..c8e6dddf4bdc7d9572f4cb203b7d8e7c89eab187 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_fractional_seconds_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_fractional_seconds.inc @@ -28,7 +28,6 @@ CREATE TABLE running_records ( max TIME(6), KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00.000001", "01:05:00.000001"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test index cfa760bcae5978f6665cd94e1c09988859bade20..e950411cba62f3bfdf0aa2ff40ca5322f6688ffe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_time_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE running_records ( max TIME, KEY (average) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (title, average, max) VALUES ("normal condition", "01:00:00", "01:05:00"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test index c2407cb1b0b82e259023170552ad34b672f2fe9c..19dadc2c285df70412b622b07f8b1e82aa46fa98 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( updated_at TIMESTAMP(6), KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test index f398fb9b9e2a60705b8f546af021f34c8fcfd9fd..cc063faa6749843df61496600fe0117f2d472d2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -23,11 +23,10 @@ DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, - created_at TIMESTAMP, - updated_at TIMESTAMP, + created_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', + updated_at TIMESTAMP DEFAULT '2016-04-21 00:00:00', KEY (updated_at) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, created_at, updated_at) VALUES ("clear day", "2012-01-29 21:51:01", "2012-01-29 21:51:02"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test index 9cf9cb631ec951b310cc8e8bc20f7d2fc0c5f2e5..de0cbedf0ab5b59494769d457ea657bcb7497040 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_tinyint_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test index 2da118e27a5601584015a41aaefbdd7712c2c6f8..b7cb86943016ab629fc7b21cee277ec616ca6393 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test index dea569704146eeae78027d237c8eebb6a3ebcc5b..912f86fb71cd0d57aaf17fc4485a11ccf4a60c2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_bigint_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test index a2eb99b1dce9675927bc4ffdf1a0af3202425522..f20348bee6cf8ead20a89f6a5912293fe8aa0e20 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_int_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test index e219fc0757bb73aaafa8ed7c22d591a8ac3ba3bc..44fb656a93b3e15daa04016e8ea4e593cd04c3c9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_mediumint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test index e9dcd7e1e06b2112f4db106a8ecc0a9eb9d3e054..c98569d197402bea5eaaef26c682214f1cd2db52 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_smallint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test index d90c71df98885afb049d459d97aaf7541b54668d..9414eee1f025c02374102a8a0c0811ec0449b9cb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_unsigned_tinyint_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test index e7cb3f696104dd624043ff4fdb1ba90d5f16e919..82004e1971df101049ed3949fe355daae7d9749e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE aniversary_memos ( party_year YEAR, KEY (party_year) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test index 8b798a71837f79f9f494cbc4c9cc57f421d8941c..e7530cec03475330f967cb6f9aa82e74570b75ff 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_year_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE aniversary_memos ( title TEXT, party_year YEAR ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; INSERT INTO aniversary_memos (title, party_year) VALUES ("We need a big cake!", "11"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/count_star.test b/storage/mroonga/mysql-test/mroonga/storage/t/count_star.test new file mode 100644 index 0000000000000000000000000000000000000000..f57d40fd57b3feb73e6d75226b9c3516bc10d037 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/count_star.test @@ -0,0 +1,35 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int PRIMARY KEY +); + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +SELECT COUNT(*) FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test index 28262bb4b7d17e02988c59c7745aa3fad7f74eae..1913469353faa05fe3bae8608c6c67d7e480fd1f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_database_name_slash.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test index f02e4ddcb25d7fd4c8b41745371a3581452c6e99..1f7bbf12bde7407c56823035f0a3af63222b3702 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -64,6 +64,8 @@ create table t1 (c1 time); desc t1; drop table t1; create table t1 (c1 timestamp); +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP desc t1; drop table t1; create table t1 (c1 datetime); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_comment.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test index c01d80a209b11c83c86439ec431baf3688d30c2c..908a2fcbdbb83b3e9bf2a6f6db4ca77732b21673 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test similarity index 97% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_parameter.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test index cb86cddcbe7659f5244f6e0b90750127d27faadd..fc66ae12fa0f8d93adc0f07ec9fc7e4083ba1165 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_flags_parameter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/not_embedded.inc @@ -29,7 +29,6 @@ CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY, tags TEXT FLAGS='COLUMN_VECTOR' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE bugs; SELECT mroonga_command("dump --dump_plugins no"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_comment.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test index d7514512b5ce5856eb8f1a327fd181778c3307f7..b39da499d5e3bdd601beb9feb33cc495ac1a02b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_nonexistent.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_nonexistent.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_nonexistent.test index 10d00bfcbb05200e1379447c52b2b9e7ba1d767f..0350a299b08f611a2d91b258ffc0327e0f579b95 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_nonexistent.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_parameter.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test index 4b820f7b88eb392163a20b88a7e76327b02b0955..d208e62e8395e28d29750b05a9472e06f68ddbb9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_groonga_type_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_groonga_type_parameter.test @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_comment.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test index 18cfbb33da53bdc0bd9f76918a2771891ac6c721..77965a70c9976ad9c26ba40cf9d992f51a1ee5f7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_nonexistent.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_nonexistent.test rename to storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_nonexistent.test index 1c3b89be67f445591384d8fcf3b8f40dfb37b626..46becfdc2cc961faf816a162cab06b948a717353 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_field_type_nonexistent.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_column_type_nonexistent.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test index 18a68fb1f94068b7909189b99c7e789084f7c17e..aecfab1f6c3dddbee589e3b37fe9f54ec8306c59 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_comment_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test index 054d311bd44b79d3da6aa772ed10deb894969f47..c5fa91c5c9c9a4b9beb1fa55a69659415e0905be 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_default_tokenizer.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test index 9a22c1b09ead5696279c417947048ed5af108704..568c9ac78cf2e70fef4cad249bee15a60cb957d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_comment.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test new file mode 100644 index 0000000000000000000000000000000000000000..df509ed0dcd72fee94607422b60b95b5a3e80bef --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_medium.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE memos ( + content VARCHAR(64) NOT NULL, + content_size INT NOT NULL, + KEY (content_size) COMMENT 'flags "INDEX_MEDIUM"' +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); + +DROP TABLE memos; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_small.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_small.test new file mode 100644 index 0000000000000000000000000000000000000000..fc37e28eb7669bc0f9e46125c0861b37fab357e1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_index_small.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE memos ( + content VARCHAR(64) NOT NULL, + is_read BOOL NOT NULL, + KEY (is_read) COMMENT 'flags "INDEX_SMALL"' +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); + +DROP TABLE memos; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test index 470283e94d84b9b550c07912a511cf9d1be95aee..cc54ab34ad7678d32da5878c7b52b0fa8cfd1f2d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_none.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test index 77a7683bc35c3f4425f2da034fa09e7b893a758d..0c87494e3c70f1904a4acba59a152f43758cbaa7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_flags_parameter.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test index e3680ad3471d9da111755ec1aed37c1ac6f1807d..7005643546f4e49b9c95ee2e1569f3d9fce3fde2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_none.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test index 7add6db7831b9ed5ec67ce0da3ecca71dae35167..4700c280d803e22c18c59233d39a2f900003073f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_index_flags_with_position_and_with_weight.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test index 42a91ecfc15ceb0fe22c3f0f7d710d65f4b83f08..5251bf9842a38234c2fc7a4cc2af93c515219932 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test new file mode 100644 index 0000000000000000000000000000000000000000..2815b285096573a0f24ad195ef8d88bab10dbd9a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_fulltext_index_bin.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + content VARCHAR(64) NOT NULL, + FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +INSERT INTO diaries VALUES ("2013-04-23", "ブラックコーヒーを飲んã ã€‚"); + +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ãµã‚‰ã¤ã" IN BOOLEAN MODE); +SELECT * FROM diaries + WHERE MATCH (content) AGAINST ("+ブラック" IN BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test new file mode 100644 index 0000000000000000000000000000000000000000..5270372e33260769d5ba3f4d3249441ca958c70d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_index_bin.test @@ -0,0 +1,37 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE diaries ( + day DATE PRIMARY KEY, + content VARCHAR(64) NOT NULL, + INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + +SELECT mroonga_command("dump --dump_plugins no"); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test index c35c7dc15ce2ccf385a5ec839654678a0a347c82..2d7ff664335f632596c11f343558b2a0e9de232d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_no_utf8_charset_with_utf8_normalizer.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test index fe9037843bf99d93ccd0828dc24d05006cc9b359..15045b5466c4e780643747f533c96e678150ba45 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_none.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test index 5739e118ae3460f19e396ca045ea948c845154ae..16b76e0ec09b371e87e17503f24b55e502847c0e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_normalizer_parameter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test index 7048ab6e76444a8b114e9bc738c04c0f2ccd8792..c712c2ed018e3c001855fffd0da977deccdc5885 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_comment.test @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -26,7 +27,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX body_index (body) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test index e163201e85907babdd02a096e68497dc8cc17bea..e247e3d17f0f832d08e254cc01cc105fc0e2acd6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_default.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test index 69a48eb78517273007d7973e492206c91d0ad6e8..a2484a90a6ebf48f76f22d055a03a423ef89ce45 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_parser_off.test @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -25,7 +26,6 @@ CREATE TABLE variables ( name TEXT, FULLTEXT INDEX (name) COMMENT 'parser "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); INSERT INTO variables (name) VALUES ("mroonga_default_parser"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test index a58a408cf59325bbee2f75348acd41f0fa1d8933..b91819e9940415b73915fe39acc3c8ba51848bda 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_multiple_token_filters.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test index 0d5605821845c5013266e6842fdd36d9804a10b3..4fe85314d1ccbdc8a0ec6379c7381d8ffbffe5b0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_one_token_filter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test index 956044c76180b41b8ad6c9baf6aae9a3cdcffb86..ba5f9a969ef9613e1bf0455fb6f68766609f6452 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_token_filters_parameter.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test index 688783b97430f68edd1f5c5598cbda23dcc45b10..1066ffebbff8fc73e496c2586f7a09d976aa67f2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX body_index (body) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test index c7acf23cb311451cfa56cdd8577f1a673c9e9f27..e7902c7b214fea84d1353d23c51d0816dab71073 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_default.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test index e9c1fdf473c051601346da44f326e7b92dbcb5f9..1fc724f5117cbb5700015388c7ffb60b4239da1e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_off.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE variables ( name TEXT, FULLTEXT INDEX (name) COMMENT 'tokenizer "off"' ) DEFAULT CHARSET=utf8; -SHOW CREATE TABLE variables; INSERT INTO variables (name) VALUES ("mroonga_database_path_prefix"); INSERT INTO variables (name) VALUES ("mroonga_default_tokenizer"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test index 222cc59e4020a123668efbea5a9dfcb42a38dfe1..7ffedeaea5bb9c3c2ff5cdf01d04020061a0d97d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_index_tokenizer_parameter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test index c161c50626ddde5be6c81a12c8392195d8a38554..1eaf8fa615f57be1a3c28d162383aea438d06ca4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_default.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test index 22b3061ced2059cdd51ab7d22aeec4bf1de570c3..626172020aadefbf7ee0c3c543f4002ceac46a57 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_normalizer_hash.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test index 0c0fb1394cc49ae6145c42a2b40098c1d6752d9c..2120efe0f9601045142513a7770658ff83545b02 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_multiple_token_filters.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test index 74d40a1adc3b7326f514d1a785611c78ec10bc3b..317730f205f3124cd9623631d39f1645eda7e418 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_one_token_filter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test index 62cc9ed172f27a22e8a0c73a9cebd65e6dd09c70..2639f32517cbddaa18894c1a785c3a49b55551fd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/create_table_table_token_filters_stop_word.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_groonga_plugin_register.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test index 89e6c347c8cc2c69d094b1d97cc4401ebb7580b6..6c2c628224f5aa45f0bb271b8e151ccfb520a66c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_fulltext_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test index aa38839f9ca7d0abcf2975da411c73ba98db462a..36f9848378942bc7f850cbcaaa025176086009e3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_btree_many_records.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test index 44f6bba6adc7fcc078eb31e37a4c0788a42166b0..00f9336c1601499ff691f21d7e606f9bbad4e48e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_no_unique.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test index 7c562842a953c0b355848f26a68c00e9ef0da188..be309e71b8f684f8ceb2394ff7f5cdcef7a13c4a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_index_hash_id_unique.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test index 513c56f074d3deed841dd25761a4fe25b722e39e..3598a17f72e7a2492c458ed5937836ce6a7d0136 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_normal_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test index 0199dd14a5d76e7f14bfb2c8c0d7ebaabb18e7ad..1bd21b65881842fea68a4170efde695d1d4237d8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/delete_unsigned_bigint.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test index 3d8430703a23374c15cc361c3063cc2b74503bac..383ada185e56b9be87dca80b8600db347de3fd1c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test new file mode 100644 index 0000000000000000000000000000000000000000..764db3d6fe99d0f02776f66824b61d2db920420f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_database_no_table.test @@ -0,0 +1,57 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP DATABASE IF EXISTS another; +--enable_warnings + +CREATE DATABASE another; +USE another; + +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX (title) +); + +DROP TABLE diaries; + + +USE test; + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + title TEXT, + FULLTEXT INDEX (title) +); + + +DROP DATABASE another; + +SELECT mroonga_command('object_exist mroonga_operations'); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test index 39aff4e4b23a9cbe0ac7b47416e9d8f0cf2cea61..b27fda75e95c72708c38de413df69853c970740f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/drop_table_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test b/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test index 887b204c7ae70068afe70d07a41cd4efedc65b41..44d6438bbaf8a05d76e71d4f567719d15e528c00 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/flush_logs.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test new file mode 100644 index 0000000000000000000000000000000000000000..57947bb39b870e415129003ff541636509cf179f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test @@ -0,0 +1,47 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +--enable_warnings + +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL +); + +CREATE TABLE articles ( + content text NOT NULL, + comment int unsigned +); + +ALTER TABLE articles ADD FOREIGN KEY (comment) REFERENCES comments (comment); + +SHOW CREATE TABLE articles; + +SELECT * FROM information_schema.referential_constraints; + +DROP TABLE articles; +DROP TABLE comments; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test new file mode 100644 index 0000000000000000000000000000000000000000..9be7cc7d2ea6abc32cf6da05f626e24f09625e3d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test @@ -0,0 +1,48 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +--enable_warnings + +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL +); + +CREATE TABLE articles ( + content text NOT NULL, + comment int unsigned, + FOREIGN KEY (comment) REFERENCES comments (comment) +); + +ALTER TABLE articles DROP FOREIGN KEY comment; + +SHOW CREATE TABLE articles; + +SELECT * FROM information_schema.referential_constraints; + +DROP TABLE articles; +DROP TABLE comments; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test index 7f02c81dbcd461b79f478712c2fe2c013c530ff1..e8c8540be03f01cd11090e3345bd8786c510004d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test @@ -12,102 +12,35 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mysql_55.inc ---source ../../include/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists articles2; -drop table if exists articles; -drop table if exists comments2; -drop table if exists comments; +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; --enable_warnings -create table comments( - comment int unsigned, - content text not null, - primary key(comment) -); - -create table articles( - content text not null, - comment int unsigned, - FOREIGN KEY (comment) REFERENCES comments (comment) -); - -insert into comments (comment, content) values -(1, 'aaa bbb'),(2, 'ccc ddd'),(3, 'eee fff'); - -insert into articles (content, comment) values -('111aaa', 1),('222bbb', 2),('222ccc', 2); - -select comment, content from comments; - -select content, comment from articles; - -show create table comments; - -show create table articles; - -select * from information_schema.referential_constraints; - -rename table comments to comments2; -rename table articles to articles2; - -create table comments( - comment int unsigned, - content text not null, - primary key(comment) +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL ); -create table articles( - content text not null, +CREATE TABLE articles ( + content text NOT NULL, comment int unsigned, FOREIGN KEY (comment) REFERENCES comments (comment) ); -insert into comments (comment, content) values -(1, 'ab'),(2, 'cd'),(3, 'ef'); - -insert into articles (content, comment) values -('1a', 1),('2b', 2),('2c', 2); - -select comment, content from comments; - -select content, comment from articles; - -select comment, content from comments2; - -select content, comment from articles2; - -show create table comments; - -show create table articles; - -show create table comments2; - -show create table articles2; - -select * from information_schema.referential_constraints; - -alter table articles drop foreign key comment; - -show create table articles; - -select content, comment from articles; - -alter table articles add FOREIGN KEY (comment) REFERENCES comments (comment); - -show create table articles; +SHOW CREATE TABLE articles; -select content, comment from articles; +SELECT * FROM information_schema.referential_constraints; -drop table articles2; -drop table articles; -drop table comments2; -drop table comments; +DROP TABLE articles; +DROP TABLE comments; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test new file mode 100644 index 0000000000000000000000000000000000000000..29453f6916c0b7a7e4eb987eed12971f3fc9a9f6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_existent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM comments WHERE id = 100; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test new file mode 100644 index 0000000000000000000000000000000000000000..e2635efc56c83aee67101290279df1c377fe710a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_delete_nonexistent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +DELETE FROM comments WHERE id = 200; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test new file mode 100644 index 0000000000000000000000000000000000000000..0b859c8342fa88e59bf6645d4f64fc02f24aebb5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_existent.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test new file mode 100644 index 0000000000000000000000000000000000000000..0ed29655d382ac2fdeb6b2d423a2e8dba5485c64 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_insert_nonexistent.test @@ -0,0 +1,51 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +--error ER_NO_REFERENCED_ROW_2 +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 1); + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test new file mode 100644 index 0000000000000000000000000000000000000000..e93958bab83f0f62e2d2f2eb5fc135869585a0f7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test @@ -0,0 +1,51 @@ +# Copyright(C) 2013 Kentoku SHIBA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS articles; +DROP TABLE IF EXISTS comments; +DROP TABLE IF EXISTS articles2; +DROP TABLE IF EXISTS comments2; +--enable_warnings + +CREATE TABLE comments ( + comment int unsigned PRIMARY KEY, + content text NOT NULL +); + +CREATE TABLE articles ( + content text NOT NULL, + comment int unsigned, + FOREIGN KEY (comment) REFERENCES comments (comment) +); + +RENAME TABLE comments TO comments2; +RENAME TABLE articles TO articles2; + +SHOW CREATE TABLE articles2; + +SELECT * FROM information_schema.referential_constraints; + +DROP TABLE articles2; +DROP TABLE comments2; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test new file mode 100644 index 0000000000000000000000000000000000000000..9b5ee9b9e63e6681ff7193ea2ad132bc11b426fc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_existent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO comments (id, content) VALUES (200, 'Very good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test new file mode 100644 index 0000000000000000000000000000000000000000..3e0f074828e035984ea2da22d64b34a0fa5763a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_update_nonexistent.test @@ -0,0 +1,53 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_5.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_warnings + +CREATE TABLE comments ( + id int unsigned PRIMARY KEY, + content varchar(140) NOT NULL +); + +CREATE TABLE entries ( + content varchar(140) NOT NULL, + comment_id int unsigned, + FOREIGN KEY (comment_id) REFERENCES comments (id) +); + +INSERT INTO comments (id, content) VALUES (100, 'Good entry!'); +INSERT INTO entries (content, comment_id) VALUES ('Hello!', 100); +--error ER_NO_REFERENCED_ROW_2 +UPDATE entries SET comment_id = 200 WHERE content = 'Hello!'; + +SELECT * FROM entries; +SELECT * FROM comments; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE entries; +DROP TABLE comments; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test index 6a97baa362e96ef46cd725c6c26edafe3fa35a29..4bd9ff2db9c3d7b4bfd493bbdce2ade3837e0d26 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_empty_query.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test index 6fedec6810c94a1d8b0e5756ef679b9d32cb6a12..89507f0901d26c74c3cb8dfc16e1735b073f5b48 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_escape.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET NAMES UTF8; CREATE TABLE memos ( @@ -38,6 +38,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test index 3e3c517bee604c199f73881af29eaa989a19e43e..a39cfebd285c44dd56e850b59791a7eeb5efc37d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_leading_not.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test index f927b45fbc6e649e951ff4952ad50a058c14f9f2..b8d1c0b9cdb21add4994bbec70a731e73ae84fd1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_all.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test index 1ead74d0354434cfd71dcb194a8736c6dddfd96c..c59bc9d7b1f97c44808f80175b58c7b0c9f3ad02 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test index ba8f1c1eda170cb31d5eef8e31bb9a27a5362a2d..bcbc4963a56efa270b65833c3a0a73b18b3c486a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test index 655bf1e8fa084e5080d0b73c8a022887f68ac8bf..de10774d83d5978d27113f43c4c6e5d0fda619a0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test index 9c4e92ce55d865eddfe7016f03497d8327f96ea3..d99628494deeb07e03cfc78d6347dcff1b73b0fb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test index 5f1efdb796dee1f85c58c58938672e55a720b930..bbebb5b5fe5ddb6ca36567327bf14513dfc80c13 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test index b720dcf6f712e358214a369c736094ae23e83b90..f4d2112b35a63a84abad1d8ede26dda4fcad9b9b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test index 82d0718d1e8e5acce8919716a3919c8e30c90fdd..e6f2a7ce6b626e325183b35f42c081873226e2ee 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test index c2efa7a85750dac6c01d88b3d786743436a1ba03..d2258a399d106ed40dcaaf3e56593cbc21773791 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_astarisk.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test index 29107188c35955fd47abd777dd353cd37e639102..03a2ff8744a5bdde277c0bff5434ba6009f8e29c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test index c5b5f2f795b1d4a2495f9af30f5aae44ad81ab5b..97cc2623ebcbdec5fbcf059118f3518ca103728d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test new file mode 100644 index 0000000000000000000000000000000000000000..00bd029dee3fee56e0519560361dff69a92eb8cd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_operator.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE diaries ( + id INT PRIMARY KEY, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX (title, content) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); +INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); +INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); + +SELECT *, MATCH(title, content) + AGAINST("*SS content @ '天気'" in BOOLEAN MODE) AS score + FROM diaries + WHERE MATCH(title, content) + AGAINST("*SS content @ '天気'" in BOOLEAN MODE); + +DROP TABLE diaries; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test new file mode 100644 index 0000000000000000000000000000000000000000..e6034ac2af5648bea613531f456ae4c7a1caf9e3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_syntax_script_selector.test @@ -0,0 +1,50 @@ +# Copyright(C) 2016 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +DROP TABLE IF EXISTS readings; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE readings ( + reading VARCHAR(255) PRIMARY KEY +) DEFAULT CHARSET=utf8 + COLLATE=utf8_bin + COMMENT='default_tokenizer "TokenDelimit"'; + +CREATE TABLE items ( + name VARCHAR(255) PRIMARY KEY, + readings TEXT COMMENT 'flags "COLUMN_VECTOR", type "readings"', + FULLTEXT INDEX items_index(readings) COMMENT 'table "readings"' +) DEFAULT CHARSET=utf8; + +INSERT INTO items VALUES("日本", "ニホン ニッãƒãƒ³"); +INSERT INTO items VALUES("ローマ字", "ローマジ"); +INSERT INTO items VALUES("漢字", "カンジ"); + +SELECT *, MATCH(readings) + AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE) AS score + FROM items + WHERE MATCH(readings) + AGAINST("*SS sub_filter(readings, 'prefix_rk_search(_key, \"niho\")')" in BOOLEAN MODE); + +DROP TABLE items; +DROP TABLE readings; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test index e8ad55ab4c664de598ea87002cf412c133bbb736..bee227664cb811b24783934cbbf9485d8989ddc8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_full_spec.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test index 5cc8f4154c40ae47bbec6aae51acc9e38dab59ab..b84eb91129c9e8c5f30b9415eace727274aa53a7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_no_weight.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test index b85580dba01b26d2d23ed4ff3f5e20eae87555ff..2edac1599f1792949a31060ae7426ef1ccac2192 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_omit_section.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test index 642b438ebf6f46f824bd652b75ba7bb689d00cfa..583ede590e89f3af8f150df5e53b3c85cc681cb4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_ten_or_more_sections.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test index 5ea8c21797fcbe721f7d3b97d1c3dd7eb44e08b8..8c4cdb79e201bb6fb89d482fe091309dbe7cb09c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_pragma_weight_three_or_more_sections.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test index b9beffa2ef7a34f0f26ccf3e367d7ccf2cfc09c1..a972cc6f4745ff4aa8bd4df1d32e670f11b00ba8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR; SET NAMES UTF8; @@ -40,6 +40,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test index c4195f2a541c4a9ce3e4c640aab44fe4856e2463..4703fa7df10900a6e7268b45d05f9e2b16f25dde 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_error_and_log.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = ERROR_AND_LOG; SET NAMES UTF8; @@ -40,6 +40,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test index 9a45d479d306c864aeb11107c86e9ff06557d070..86803c724510620e0bf6affd09de1e0b33ef10c9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = "IGNORE"; SET NAMES UTF8; @@ -39,6 +39,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test index cf2cd503b28b94f9a33b5a1ae9e2b564f4cc3713..0080632324f434325240c608662763ea7309581e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_boolean_mode_syntax_error_ignore_and_log.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS memos; --enable_warnings -SET GLOBAL mroonga_default_parser = TokenDelimit; +SET GLOBAL mroonga_default_tokenizer = TokenDelimit; SET mroonga_action_on_fulltext_query_error = IGNORE_AND_LOG; SET NAMES UTF8; @@ -39,6 +39,6 @@ SELECT * FROM memos DROP TABLE memos; -SET GLOBAL mroonga_default_parser = TokenBigram; +SET GLOBAL mroonga_default_tokenizer = TokenBigram; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test index 4032ca9e66945e3c00a86fe8118c151860d38bf9..d080d70d4d8e3d493b71fa5ffff0743e7e68fae2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_ascii.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test index b6ac95da2328309556c36cadb7c1304b9a9f62e7..db8fa2b4ccb0cd869e0a50092af96dc4092cdfae 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_cp932.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_cp932.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test index c990b28855204f0d39daf9a5657d023074f69094..39c89dbd7a3a2b0df5a5107e4dba0dcdcf6e236c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_eucjpms.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_eucjpms.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test index 2e457aa768cded750c03e2715017a4310f0491d9..0de940534f18d01041f1a3f78e8fb347405f6d46 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_japanese.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test index 8fc97821563901127ec655bed27c29a15a679b38..503b96106c3dcd32779d0014957d9edd18ee1599 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_charset_utf8mb4.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( content TEXT CHARSET utf8mb4 COLLATE utf8mb4_general_ci, FULLTEXT INDEX (content) ) DEFAULT CHARSET utf8mb4; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Alphabet", "ABCDE"); INSERT INTO diaries VALUES(2, "Mathmatics", "ð€ðð‚ðƒð„ | U+1D400-U+1D405"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test index 619363f0fed17b285734f571d3765f2de30d5d17..d97e75fef512d5edca755040cbb8ae2660b31b7f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_empty_query.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test index 41d1ab9166059610a6720ba08b23964c07e29a47..38fbc8bb302e89008e24c460508b21161a42001d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_found_rows.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test index e346fb1d3bc9b2e3dcfcb5f5d2b8d355e868331c..e1fea8b07e71e91e4756afedfef9a98bf1496b7e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_groonga_varchar_vector.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/load_mroonga_functions.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test index 0ac152703c91807728b4fcfe787cb5dad064cd1b..5aa812fcb0487080e57b0e36aaa18819f732c8d5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_index_recreate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( content text, fulltext index (title) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test index 4f932d5ac2a1e1a122993729f130245a2bf0d4ec..2bad02c0991e29b13f0c6eeddab3db8898f9ab51 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_select.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test index ef610b983df741a9489b20fd93ea1c8f0e69dbad..5c1ec53c5737cf0a5cc74e2e6cefbe69f0eaaf0e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_insert_values.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -21,7 +21,6 @@ drop table if exists t1, t2, t3; --enable_warnings create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)); -show create table t1; insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test index ab9522f6fa2b5c2d669d73428739114bc406df94..718d78732c60765558635fa9b9d4f2c1e4ba3be3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test index 2881d3cf16070ba88d1ed2f78ff348009470a412..7a4bd9b8cb7d259540d3410c282f63bbb83db660 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_insert.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test index 353e19804e56ee836eec8443543bd5e2f8db41db..174374711b9665e68185a0f2cab8191eaf54c67c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_recreate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test index 949cc61a4429cbebcdcd96e4e031dde065e91f40..8ccef3d68e335e6f535381cef0635333b5f1fa80 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_column_index_update.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test index 97319b711768ef5bbd763262e6396d860c91cdb6..72b617812e95aa698c3bf827ff5f384a627f2b39 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_multiple_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( fulltext index title_index (title), fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (title, body) values ("survey", "will start groonga!"); insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test index 419224d4fc036270489afefe22554d50367ee818..3487f704d909ecc4454ffe2acc1e3816f04cec2a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_no_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES("Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES("天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test index 3f7377d9c6e540a2f45374270c9f9e8e731ae043..416b61b7cc97cc86005d12fe1740052621b58192 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_not_match_against.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test index 5c94603c07f4999a3b205519d28c2a0030eb3261..995f92aa4135f762f2d80d591b3fc3da95d69e40 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_or.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test index 06afa3ce9cd4199ed9584afc75a4378c8ccf5bf8..dc5901ef7776b93a629421180d53a97308223740 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test index c90fdf6f88ab5076af05297bc4a2ab3209d1a8f4..73424524fc4adb010b6461161983ac8b26746ba8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_different_match.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test index a230111ba16f6cd12335dc5c76b2b31ac9d84900..0d2963af7fe29f102fabb8e4da3569b532440379 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_no_where.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test index 601ffcb73bb41522aa72401cc067bd6aeb853278..0d13720a54eb357d962bdeec6f5a21f7ed4f927e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_boolean_mode_same_match_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test index 7c0156ffd33723bdd6a92695f0693c2895aec216..aaef394ebdac4490a6dfcac54e2b6cd6e43963b4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test index c422a6a6750ba21dbf0200aafc66d4480cd6cae0..aa1a1a2c160ba263b7c56c41dafd037f939f74dc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test index cdb4b9f27aee36e141cfb689f785faf64452aeed..fd9ea74d86aa1b1f0ac669605b26e80f57c7f0b6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test index 54206e43843b261dee696a8388c09eec748dee9c..c690f92e2ac5e2164b5d845e6b32f5a14945136a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_different_match.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test index 1e84064b122cefc9b2497a25dc21a61b62af8b92..2919ad86288dd0cf9cb48900fa79fb5d53a34092 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_no_where.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test index a5040dd80a63ef6a8aa3a1178ad62cd2e66eac1c..485e2d84cfbe9e7668d33b9e08858717e8979cb3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_order_natural_language_mode_same_match_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test index 17957ab82847995bcd1ce89576dcad27479f98f3..bad8e8bc9c3d4990f140b8d6b97ee61be5e66526 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_two_inner_join.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_10_0_no_such_key.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test rename to storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_10_0_no_such_key.test index 7dbc8fca2b7641e14788c3fc2318939559279243..c1d2c6c4cef3fc174a41079d6a30e9d749572c86 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_56_no_such_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_10_0_no_such_key.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_56.inc +--source ../../include/mroonga/have_version_10_0.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_5_no_such_key.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test rename to storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_5_no_such_key.test index da9de22217ce680263da698ce73604223a392fe5..7c00c29bc47619edf77ce6293cfbe4417301ffec 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_55_no_such_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_5_no_such_key.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_55.inc +--source ../../include/mroonga/have_version_5_5.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_6_no_such_key.test similarity index 95% rename from storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test rename to storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_6_no_such_key.test index cf4c9b60230b4eb312d41dc77f154f30e0670028..a102b4acc721717cd54877c9b7477df480367a95 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_100_no_such_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/fulltext_version_5_6_no_such_key.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_100.inc +--source ../../include/mroonga/have_version_5_6.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test new file mode 100644 index 0000000000000000000000000000000000000000..091abbc911a5c2278c5d9f2a9feb7bdd3f8b5402 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_auto-escape.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +INSERT INTO diaries VALUES('It is Groonga'); +INSERT INTO diaries VALUES('It is Mroonga'); + +SELECT mroonga_command('select', + 'table', 'diaries', + 'filter', 'title @ "Groonga"'); + +DROP TABLE diaries; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test index 892b24c5a7adebbee774903c9d117fd6b8da3213..501c2ac86aba092b843be2e6b1144ae67cdaf593 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_select.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test new file mode 100644 index 0000000000000000000000000000000000000000..a74acf89ed85420fffaa42070ae2a1fe843045f4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_command_special-database-name.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP DATABASE IF EXISTS `db-1`; +CREATE DATABASE `db-1`; +USE `db-1`; +--enable_warnings + +SET NAMES UTF8; +CREATE TABLE diaries ( + title TEXT, + FULLTEXT KEY (title) +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command('dump --dump_plugins no'); + +DROP TABLE diaries; + +--disable_query_log +USE test; +DROP DATABASE `db-1`; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test index 2712aab22189a917fc64697d870ba69d4452a877..7eb3bba1f3f643e1ca24fd26e24063c25c29c996 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_missing.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test index 862e98c5a8cd43e1c30de4ac410de049cf2f3d39..ca18a93e15cada038ad203bed81bbe0a3d241c64 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_query_is_not_string.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test index 39f99a7c2d4e4f2a1d0c95df90ec04341b1ca23d..13adc1956d1836db75a5773a7e8e9691b773f86e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_error_target_characters_is_not_string.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_all.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test rename to storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_all.test index 1dca7076512c0a7c69d00f89b78f1d3255962715..993d0b1a4135a4af53d36321bda2d3304e27e9a7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_all.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_all.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_custom.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test rename to storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_custom.test index e70bb3f367de52dac731fedfade1ca4440e4ac1b..5b99a0ebeb69e6024ca477ded40fef6fb43cc081 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_custom.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_custom.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test new file mode 100644 index 0000000000000000000000000000000000000000..63cb2b320d5a78e6d90bf9fbd8a4b966261755be --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_join.test @@ -0,0 +1,54 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS users; +DROP TABLE IF EXISTS queries; +--enable_warnings + +CREATE TABLE users ( + id INT +); + +CREATE TABLE queries ( + user_id INT, + query TEXT +); + +INSERT INTO users VALUES (1); +INSERT INTO users VALUES (2); +INSERT INTO users VALUES (3); + +INSERT INTO queries VALUES (1, '(a)'); +INSERT INTO queries VALUES (2, '(b)'); +INSERT INTO queries VALUES (3, '(c)'); + +SELECT users.id, mroonga_escape(queries.query) AS escaped_query + FROM queries + LEFT JOIN users ON users.id = queries.user_id + ORDER BY users.id; + +DROP TABLE queries; +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test new file mode 100644 index 0000000000000000000000000000000000000000..3f93ab1828260f17ec64dd7831d32702d957ec37 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_match_against.test @@ -0,0 +1,46 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET GLOBAL mroonga_default_parser = TokenDelimit; + +SET NAMES utf8mb4; +CREATE TABLE memos ( + id INT PRIMARY KEY, + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=utf8mb4; + +INSERT INTO memos VALUES(1, "(Groonga) Installed!"); +INSERT INTO memos VALUES(2, "(Mroonga) Installed!"); +INSERT INTO memos VALUES(3, "(Groonga) Upgraded!"); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST(mroonga_escape("(groonga)") IN BOOLEAN MODE); + +DROP TABLE memos; + +SET GLOBAL mroonga_default_parser = TokenBigram; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test new file mode 100644 index 0000000000000000000000000000000000000000..cdd431cfad0b3dee897a19d0a8065383177987ee --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_named.test @@ -0,0 +1,26 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape('+-><~*()\"\\:' AS query) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_nested.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test rename to storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_nested.test index 503e2000b103173157049d9e8996ad72a10cd994..f98c4303ef650bf0d8c9ef3f757a970d8d91a041 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_success_nested.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_query_nested.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test new file mode 100644 index 0000000000000000000000000000000000000000..10041ef8360a13e0062828aaf5bed79f55b5df29 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_decimal.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS data; +--enable_warnings + +CREATE TABLE data ( + value DECIMAL(5, 3) +); + +INSERT INTO data VALUES (2.9); + +SELECT mroonga_escape(value AS script) + FROM data; + +DROP TABLE data; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test new file mode 100644 index 0000000000000000000000000000000000000000..141def4f8798b1ba5f9f5ae67be3e4198af470d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_integer.test @@ -0,0 +1,26 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape(-29 AS script) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test new file mode 100644 index 0000000000000000000000000000000000000000..663fa69aba9a09f44c8219dbc469255e887e2402 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_real.test @@ -0,0 +1,39 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS data; +--enable_warnings + +CREATE TABLE data ( + value REAL +); + +INSERT INTO data VALUES (2.9); + +SELECT mroonga_escape(value AS script) + FROM data; + +DROP TABLE data; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test new file mode 100644 index 0000000000000000000000000000000000000000..864cef6070396855705bca40b86e4bfbc6e310a2 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_escape_script_string.test @@ -0,0 +1,26 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +SELECT mroonga_escape('a\"\\\'z' AS script) AS escaped_query; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test new file mode 100644 index 0000000000000000000000000000000000000000..09bdde1c382333980f162c6281c13b0359654ff4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_dynamic_keyword.test @@ -0,0 +1,45 @@ +# Copyright(C) 2015-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS keywords; +--enable_query_log +--enable_warnings + +CREATE TABLE keywords ( + keyword text +); + +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); + +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', + keyword) AS highlighted + FROM keywords; + +--disable_query_log +DROP TABLE keywords; +--enable_query_log + + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test new file mode 100644 index 0000000000000000000000000000000000000000..10f44e44618d9e05fe60197cb7bf0ac9f4791acb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_japanese.test @@ -0,0 +1,31 @@ +# Copyright(C) 2015-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック', 'æ›´æ–°') AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test new file mode 100644 index 0000000000000000000000000000000000000000..185842e77e5d5e6e07d53579fd4f94cfc3adeadd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_multiple_keywords.test @@ -0,0 +1,25 @@ +# Copyright(C) 2015-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', + 'Mroonga', 'Groonga') AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test new file mode 100644 index 0000000000000000000000000000000000000000..19c1ae826e7227bba3875030f00d7d8e288487b1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_normalizer.test @@ -0,0 +1,25 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_highlight_html('Mroonga is the Groonga based storage engine.', + 'mroonga') AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test new file mode 100644 index 0000000000000000000000000000000000000000..089a1d4eba9063920c3f4bc697375731f83539ca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query.test @@ -0,0 +1,31 @@ +# Copyright(C) 2016-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test new file mode 100644 index 0000000000000000000000000000000000000000..3ba38c0b8d09b803e7922c34c0fc25e5eb6151a6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_query_pragma.test @@ -0,0 +1,31 @@ +# Copyright(C) 2017-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_highlight_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + '*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) AS highlighted; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test new file mode 100644 index 0000000000000000000000000000000000000000..db5b06ecd85db68f4ee23095e987fb7963454d11 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_highlight_html_record.test @@ -0,0 +1,55 @@ +# Copyright(C) 2015-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS memos; +--enable_query_log +--enable_warnings + +CREATE TABLE memos ( + content text +); + +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); + +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); + +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); + +SELECT mroonga_highlight_html(content, 'Mroonga') AS highlighted + FROM memos; + +--disable_query_log +DROP TABLE memos; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test index 5d80d5230ef2c94d12b656566487c9028eaa5c3b..da116a4a508e2c07d86db96ca853b37c35318083 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_grn_id.test @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test index 98e8d9dab2f7f8a597f15918d973fa0e766d018b..1ba332c4d8628569ca91a881aa9554ff3e653b76 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_reference.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test index 41f9d3684bff489ac52ec5e1dabfa0ebdfc1faf3..1fdd0a605115bfa5eb4514eb8e2d6c9c8d24707d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_last_insert_id_set.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test new file mode 100644 index 0000000000000000000000000000000000000000..d5159b88ce1a9a352fdf8ac27ce066552ca41268 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_default.test @@ -0,0 +1,24 @@ +# Copyright(C) 2015 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_normalize('aBcAbCã‘'); + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test new file mode 100644 index 0000000000000000000000000000000000000000..9631313d79be8902dbb30fbcca725a1ae47b5632 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_normalizer.test @@ -0,0 +1,24 @@ +# Copyright(C) 2015 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_normalize('aBcAbCã‘', "NormalizerAuto"); + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test new file mode 100644 index 0000000000000000000000000000000000000000..88ee40fc6ca88e555ba4158c66436f9a862b9302 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_normalize_record.test @@ -0,0 +1,40 @@ +# Copyright(C) 2015 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS memos; +--enable_query_log +--enable_warnings + +CREATE TABLE memos ( + content text +); + +INSERT INTO memos VALUES ('aBcAbCã‘'); + +SELECT mroonga_normalize(content) FROM memos; + +--disable_query_log +DROP TABLE memos; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test new file mode 100644 index 0000000000000000000000000000000000000000..ee80cd8b914878d4e8c4549fed595831ffffecb0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_multiple.test @@ -0,0 +1,46 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255), + INDEX (term) +); + +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); +INSERT INTO synonyms VALUES ('Mroonga', 'Mroonga'); +INSERT INTO synonyms VALUES ('Mroonga', 'Groonga MySQL'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + 'Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test new file mode 100644 index 0000000000000000000000000000000000000000..1a2c9d84404f1c640281158a56cb48388c36424e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_no_index.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255) +); + +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + 'Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test new file mode 100644 index 0000000000000000000000000000000000000000..50e4fc558bc42cb9f6bd6f894870094c0bd909d4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_one.test @@ -0,0 +1,44 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255), + INDEX (term) +); + +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + 'Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test new file mode 100644 index 0000000000000000000000000000000000000000..2a8aad83d29c5760f947d5ce1ed0285f16e00609 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_query_expand_pragma.test @@ -0,0 +1,45 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +--disable_warnings +DROP TABLE IF EXISTS synonyms; +--enable_warnings + +CREATE TABLE synonyms ( + term varchar(255), + synonym varchar(255), + INDEX (term) +); + +INSERT INTO synonyms VALUES ('D+', '[D+]'); +INSERT INTO synonyms VALUES ('Rroonga', 'Rroonga'); +INSERT INTO synonyms VALUES ('Rroonga', 'Groonga Ruby'); + +SELECT mroonga_query_expand('synonyms', + 'term', + 'synonym', + '*D+ Mroonga Rroonga PGroonga') AS query; + +DROP TABLE synonyms; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test index 0cb551dbc691032cda027d75587cb2fe06dcb506..028bdb750ea407f97d4c9879faeb3850daa747b8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_ascii.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test index 338417021c8cf68c570f1a4d59593bf8af25e29b..2d85633ab947de716d4579ad8a07eed2128e5df0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_cp932.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source include/have_cp932.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test index fa8dbb20e9398b9bf6351edbdbe58943d44ada2f..525c14a30043e01a9ab3fdd3fe503c3f042415ce 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_eucjpms.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source include/have_eucjpms.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test new file mode 100644 index 0000000000000000000000000000000000000000..5faed5188916758c1177d242a3608fe25df629e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_dynamic_keyword.test @@ -0,0 +1,45 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS keywords; +--enable_query_log +--enable_warnings + +CREATE TABLE keywords ( + keyword text +); + +INSERT INTO keywords VALUES ('Mroonga'); +INSERT INTO keywords VALUES ('Groonga'); + +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', + keyword) as snippet + FROM keywords; + +--disable_query_log +DROP TABLE keywords; +--enable_query_log + + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test new file mode 100644 index 0000000000000000000000000000000000000000..c01d298853f225680eb4da69e2b2de7f5398c0a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_japanese.test @@ -0,0 +1,31 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック', 'æ›´æ–°') as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test new file mode 100644 index 0000000000000000000000000000000000000000..60d206d2b40d496f5c75bb325005aea565713715 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_keywords.test @@ -0,0 +1,25 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_snippet_html('Mroonga is the Groonga based storage engine.', + 'Mroonga', 'Groonga') as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test new file mode 100644 index 0000000000000000000000000000000000000000..b4dfd0c5f5f7cf0f610d485b951f523ba358884a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_multiple_snippets.test @@ -0,0 +1,29 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SELECT mroonga_snippet_html('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.', + 'lock') as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test new file mode 100644 index 0000000000000000000000000000000000000000..998a080c7f81404588109d34f297cdd22312d77b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query.test @@ -0,0 +1,31 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + 'ロック æ›´æ–° -ボトルãƒãƒƒã‚¯' AS query) as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test new file mode 100644 index 0000000000000000000000000000000000000000..b01dcbcd54c0f3232bde8737258745fa55f90644 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_query_pragma.test @@ -0,0 +1,31 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +SET NAMES utf8; + +SELECT mroonga_snippet_html('Mroongaã«ã¯2ã¤ã®å‹•作モードãŒã‚りã¾ã™ã€‚ + +1ã¤ãŒã€Œã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ã€ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚‚検索機能もã™ã¹ã¦Groongaを使ã†ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“れãŒãƒ‡ãƒ•ォルトã®ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚上述ã®å‚照ロックフリーãªGroongaã®æ€§èƒ½ç‰¹æ€§ã‚’ãƒ•ãƒ«ã«æ´»ã‹ã—ãŸé«˜é€Ÿãªãƒ‡ãƒ¼ã‚¿æ›´æ–°ãƒ»å…¨æ–‡æ¤œç´¢ãƒ»ä½ç½®æƒ…報検索ãŒç‰¹é•·ã§ã™ã€‚一方ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®æ©Ÿèƒ½ã¯æä¾›ã•れã¾ã›ã‚“。 + +ã‚‚ã†1ã¤ãŒã€Œãƒ©ãƒƒãƒ‘ーモードã€ã§ã€MyISAMã‚„InnoDBã¨ã„ã£ãŸä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ã« 全文検索機能ã ã‘ を追加ã™ã‚‹ãƒ¢ãƒ¼ãƒ‰ã§ã™ã€‚ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る機能ã«åŠ ãˆã¦Groongaã®é«˜é€Ÿãªå…¨æ–‡æ¤œç´¢æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚一方ã€Groongaã®å‚照ロックフリーãªç‰¹æ€§ã¯æ´»ã‹ã™ã“ã¨ãŒã§ãã¾ã›ã‚“。ã¾ãŸã€æ›´æ–°å‡¦ç†ã¯ä»–ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ã‚¸ãƒ³ãŒãƒœãƒˆãƒ«ãƒãƒƒã‚¯ã«ãªã‚‹ã“ã¨ãŒå¤šã„ã§ã—ょã†ã€‚', + '*D- +ロック +æ›´æ–° ボトルãƒãƒƒã‚¯' AS query) as snippet; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test new file mode 100644 index 0000000000000000000000000000000000000000..59163fe45979a71b482067c17ff4aa717def8800 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_html_record.test @@ -0,0 +1,55 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +--disable_query_log +DROP TABLE IF EXISTS memos; +--enable_query_log +--enable_warnings + +CREATE TABLE memos ( + content text +); + +INSERT INTO memos VALUES ('Mroonga is a MySQL storage engine based on Groonga, the full text search engine. + +In MySQL 5.1 or later, Pluggable Storage Engine interface is introduced, and we can use custom storage engines easily. So we implement Mroonga, so that we can use Groonga through MySQL. + +By using Mroonga, you can use Groonga with SQL.'); + +INSERT INTO memos VALUES ('Since Tritonn was the modified version of MySQL, we need to build it by ourselves or use binary files provided by Tritonn project, thus we cannot use the official binary files provided by MySQL. + +On the other hand, Mroonga is an independent program (shared library) using Pluggable Storage Engine interface, and we can dynamically load it on MySQL''s official binary. So we can use it more easily than Tritonn.'); + +INSERT INTO memos VALUES ('Mroonga has two running modes. + +One is "storage mode", that is the default mode, and we use Groonga for both storing data and searching. With this mode, you can have full benefits of Groonga described above, like fast data update, lock-free full text search and geolocation search. But it does not support transactions. + +Another one is "wrapper mode", that adds full text search function on other storage engines like MyISAM or InnoDB. With this mode, you can use Groonga''s fast full text search with having the benefits of the storage engine, ex. transaction in InnoDB. But you cannot have benefits from Groonga''s read-lock free characteristic. And you might have the performance bottle neck in the storage engine in updating data.'); + +SELECT mroonga_snippet_html(content, 'Mroonga') as snippet + FROM memos; + +--disable_query_log +DROP TABLE memos; +--enable_query_log + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test index a4e24ce030ee852d101255f26787bd982c5161c7..2547000aa95fb6c05982098a9a19e4961f5054ac 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_nonexistent_charset.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test index 4df02c14e7b7b9c12bd191b559b421128408377a..e8805b492d6b91c3ba47e58f258cc2c8085c9c71 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_invalid_unsupported_charset.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test index 3d41de6a93e1e23f4d8b8c1f053e4445ffd5e5cf..1678a3ed29d25bbfbd2c30632658bbd4a59855b8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/function_snippet_japanese.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test index 2397bdd9c8f961d3436550f40f37ef7605a745d1..887d8fb51accda012204df7bc7a4821b1a7fef3a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc ---source ../../include/mroonga/skip_mysql_57.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test index 4aed7b2472935862722c3b387826143b3c62b588..94d8024071f87ac56e4a98d7f690ff5e826e96c4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_contains.test @@ -1,4 +1,4 @@ -# Copyright(C) 2011-2012 Kouhei Sutou +# Copyright(C) 2011-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -28,7 +29,6 @@ CREATE TABLE shops ( location GEOMETRY NOT NULL, SPATIAL KEY location_index (location) ); -SHOW CREATE TABLE shops; INSERT INTO shops (name, location) VALUES ('nezu-no-taiyaki', @@ -144,6 +144,11 @@ SELECT id, name, ST_AsText(location) AS location_text FROM shops WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) ORDER BY id; +EXPLAIN +SELECT id, name, ST_AsText(location) AS location_text FROM shops + WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) + ORDER BY id; + DROP TABLE shops; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_bulk_insert_null.test similarity index 86% rename from storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test rename to storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_bulk_insert_null.test index 00efe1e4ac73a48d0dcaac1296b2168abe8395fb..2fd4fad68e795ab2637d9725b359639db72b4b6e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null_57.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_bulk_insert_null.test @@ -1,5 +1,5 @@ # Copyright(C) 2014 Kenji Maruyama -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,10 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_57.inc +--source ../../include/mroonga/have_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -27,9 +27,8 @@ CREATE TABLE shops ( location GEOMETRY NOT NULL ); -SET SESSION sql_mode = ''; +--error ER_BAD_NULL_ERROR INSERT INTO shops VALUES (NULL), (NULL); -SET SESSION sql_mode = default; SELECT ST_AsText(location) FROM shops; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test new file mode 100644 index 0000000000000000000000000000000000000000..605e03833da88878e956e77a0c24b95dba5a0a66 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_strict_sql_mode_contains.test @@ -0,0 +1,152 @@ +# Copyright(C) 2011-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS shops; +--enable_warnings + +CREATE TABLE shops ( + id INT PRIMARY KEY AUTO_INCREMENT, + name TEXT, + location GEOMETRY NOT NULL, + SPATIAL KEY location_index (location) +); + +INSERT INTO shops (name, location) + VALUES ('nezu-no-taiyaki', + ST_GeomFromText('POINT(139.762573 35.720253)')); +INSERT INTO shops (name, location) + VALUES ('taiyaki-kataoka', + ST_GeomFromText('POINT(139.715591 35.712521)')); +INSERT INTO shops (name, location) + VALUES ('soba-taiyaki-ku', + ST_GeomFromText('POINT(139.659088 35.683712)')); +INSERT INTO shops (name, location) + VALUES ('kuruma', + ST_GeomFromText('POINT(139.706207 35.721516)')); +INSERT INTO shops (name, location) + VALUES ('hirose-ya', + ST_GeomFromText('POINT(139.685608 35.714844)')); +INSERT INTO shops (name, location) + VALUES ('sazare', + ST_GeomFromText('POINT(139.685043 35.714653)')); +INSERT INTO shops (name, location) + VALUES ('omede-taiyaki', + ST_GeomFromText('POINT(139.817154 35.700516)')); +INSERT INTO shops (name, location) + VALUES ('onaga-ya', + ST_GeomFromText('POINT(139.81105 35.698254)')); +INSERT INTO shops (name, location) + VALUES ('shiro-ya', + ST_GeomFromText('POINT(139.638611 35.705517)')); +INSERT INTO shops (name, location) + VALUES ('fuji-ya', + ST_GeomFromText('POINT(139.637115 35.703938)')); +INSERT INTO shops (name, location) + VALUES ('miyoshi', + ST_GeomFromText('POINT(139.537323 35.644539)')); +INSERT INTO shops (name, location) + VALUES ('juju-ya', + ST_GeomFromText('POINT(139.695755 35.628922)')); +INSERT INTO shops (name, location) + VALUES ('tatsumi-ya', + ST_GeomFromText('POINT(139.638657 35.665501)')); +INSERT INTO shops (name, location) + VALUES ('tetsuji', + ST_GeomFromText('POINT(139.76857 35.680912)')); +INSERT INTO shops (name, location) + VALUES ('gazuma-ya', + ST_GeomFromText('POINT(139.647598 35.700817)')); +INSERT INTO shops (name, location) + VALUES ('honma-mon', + ST_GeomFromText('POINT(139.652573 35.722736)')); +INSERT INTO shops (name, location) + VALUES ('naniwa-ya', + ST_GeomFromText('POINT(139.796234 35.730061)')); +INSERT INTO shops (name, location) + VALUES ('kuro-dai', + ST_GeomFromText('POINT(139.704834 35.650345)')); +INSERT INTO shops (name, location) + VALUES ('daruma', + ST_GeomFromText('POINT(139.770599 35.681461)')); +INSERT INTO shops (name, location) + VALUES ('yanagi-ya', + ST_GeomFromText('POINT(139.783981 35.685341)')); +INSERT INTO shops (name, location) + VALUES ('sharaku', + ST_GeomFromText('POINT(139.794846 35.716969)')); +INSERT INTO shops (name, location) + VALUES ('takane', + ST_GeomFromText('POINT(139.560913 35.698601)')); +INSERT INTO shops (name, location) + VALUES ('chiyoda', + ST_GeomFromText('POINT(139.652817 35.642601)')); +INSERT INTO shops (name, location) + VALUES ('da-ka-po', + ST_GeomFromText('POINT(139.727356 35.627346)')); +INSERT INTO shops (name, location) + VALUES ('matsushima-ya', + ST_GeomFromText('POINT(139.737381 35.640556)')); +INSERT INTO shops (name, location) + VALUES ('kazuya', + ST_GeomFromText('POINT(139.760895 35.673508)')); +INSERT INTO shops (name, location) + VALUES ('furuya-kogane-an', + ST_GeomFromText('POINT(139.676071 35.680603)')); +INSERT INTO shops (name, location) + VALUES ('hachi-no-ie', + ST_GeomFromText('POINT(139.668106 35.608021)')); +INSERT INTO shops (name, location) + VALUES ('azuki-chan', + ST_GeomFromText('POINT(139.673203 35.64151)')); +INSERT INTO shops (name, location) + VALUES ('kuriko-an', + ST_GeomFromText('POINT(139.796829 35.712013)')); +INSERT INTO shops (name, location) + VALUES ('yume-no-aru-machi-no-taiyaki-ya-san', + ST_GeomFromText('POINT(139.712524 35.616199)')); +INSERT INTO shops (name, location) + VALUES ('naze-ya', + ST_GeomFromText('POINT(139.665833 35.609039)')); +INSERT INTO shops (name, location) + VALUES ('sanoki-ya', + ST_GeomFromText('POINT(139.770721 35.66592)')); +INSERT INTO shops (name, location) + VALUES ('shigeta', + ST_GeomFromText('POINT(139.780273 35.672626)')); +INSERT INTO shops (name, location) + VALUES ('nishimi-ya', + ST_GeomFromText('POINT(139.774628 35.671825)')); +INSERT INTO shops (name, location) + VALUES ('hiiragi', + ST_GeomFromText('POINT(139.711517 35.647701)')); + +SELECT id, name, ST_AsText(location) AS location_text FROM shops; +SELECT id, name, ST_AsText(location) AS location_text FROM shops + WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) + ORDER BY id; + +EXPLAIN +SELECT id, name, ST_AsText(location) AS location_text FROM shops + WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location) + ORDER BY id; + +DROP TABLE shops; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test index 0354e9b7e4b0c5d2da16e4f262fb286527b554d7..ccc51b79e684ccf5909efa3d6b61813dbd4f8e2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_datetime.test @@ -14,11 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test index a1429859a337e6e994182d912c61e18aaa66c78e..478ae97ba9fdc1c5a70eabbc11b2085dce07ffc2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_time.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test index 0f63eed4b52b6c4c672c3dda8fd4f60f30dc3f4c..a1c43cc417e391947e81f17f7feb52aaa7a99f11 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_equal_timestamp.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test index dcf029593fdfcb94b959fc73ecb738f1916cf89a..f342c049fd59ef332113bcdcead475d3bdb65855 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_btree_normal_column_insert.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test index a28a912e23da0e4eab978c2e2982260fcfa50eb6..bfb3f45636033e204ee9a143fdd0507d2e3c8493 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test index dd0b6ba440e77fb698b68625af605e41392b30af..7925f4ffc167953c276594ffc7e89c1da194a0dc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test @@ -1,4 +1,5 @@ # Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2016-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,24 +13,28 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists t1, t2, t3; +DROP TABLE IF EXISTS t1; --enable_warnings -create table t1 (_id int, a int, primary key (_id) using hash); +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); + --error ER_BAD_NULL_ERROR -insert into t1 values(null, 100); -insert into t1 values(1,100); -insert into t1 values(1,100); -insert into t1 values(1,100); -insert into t1 values(1,100); -select * from t1; -select * from t1 where _id = 2; -select * from t1 where _id = 20; -drop table t1; +INSERT INTO t1 VALUES(null, 100); +INSERT INTO t1 VALUES(1,100); +INSERT INTO t1 VALUES(1,100); +INSERT INTO t1 VALUES(1,100); +INSERT INTO t1 VALUES(1,100); + +SELECT * FROM t1; +SELECT * FROM t1 WHERE _id = 2; +SELECT * FROM t1 WHERE _id = 20; + +DROP TABLE t1; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test index 8f1e6b889bb475624239c75705b258d23d9004c3..bf665e83bc56771f542a43b632cebfe849bbccd8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_unique.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test index acb298ef81283ee2dba881cb1f3d96db072beea1..e9f20387651f6a5cd0f9e8dbd58a0da3770e697e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_normal_column_insert.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test new file mode 100644 index 0000000000000000000000000000000000000000..b2629c80675b724b88c1c5d2a2116fc4e1c673b1 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_strict_sql_mode_id_primary.test @@ -0,0 +1,44 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2016-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (_id int, a int, PRIMARY KEY (_id) USING HASH); + +--error ER_BAD_NULL_ERROR +INSERT INTO t1 VALUES(null, 100); +--error 1265 +INSERT INTO t1 VALUES(1,100); +--error 1265 +INSERT INTO t1 VALUES(1,100); +--error 1265 +INSERT INTO t1 VALUES(1,100); +--error 1265 +INSERT INTO t1 VALUES(1,100); + +SELECT * FROM t1; +SELECT * FROM t1 WHERE _id = 2; +SELECT * FROM t1 WHERE _id = 20; + +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test index ebf331d2f1525cb46da4552e1d32b4f4e8932dee..5cb0eed102f119f734276ca407116b3c96e9eb2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test index 5afdd36b5b8f67b6cffa713e431051ac62e62464..c5d97a29785806a36e380e5a72df473e944789f8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_smallint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test index 314dbd85d952d02e2fca4735dcef4459d05cb7af..be7b7eefd0f7c0ab3d1ea1e958f004ce0594d94d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_bigint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test index 82372d63527ce52d62e9323636f8f34839a77411..23e75a58073c11c0254749fdad2cb967a7e0c821 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_int.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test index a221c40dcc1d5d94f15912b415bed46d32a31502..eef9de2d0954df9309cbf7c8007df3a4bcea14a8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_unsigned_smallint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test index b765bab6769a1cc28d54b0262892fd9661d3a1a3..8d2d6c92adebdd13da9ac013a361ed0900c28546 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_nullable_varchar.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.test new file mode 100644 index 0000000000000000000000000000000000000000..521061cdf610b077812f633a654413f9ca150ae4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_asc_asc.test @@ -0,0 +1,49 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + score3 INT, + INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); + +SELECT * + FROM items + WHERE score1 = 2 + ORDER BY score2 ASC, score3 ASC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.test new file mode 100644 index 0000000000000000000000000000000000000000..d48c0e56b17ec3706b4fb0798316e31d298a9574 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_order_by_where_equal_desc_desc.test @@ -0,0 +1,49 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + score3 INT, + INDEX (score1, score2, score3) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, score3) VALUES(1, 10, -100); +INSERT INTO items (score1, score2, score3) VALUES(1, 10, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 10, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 30, 100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, -100); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 0); +INSERT INTO items (score1, score2, score3) VALUES(2, 20, 100); + +SELECT * + FROM items + WHERE score1 = 2 + ORDER BY score2 DESC, score3 DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test index 40b39fe85383405243308192d91b635151d2d7f8..92a830880864c3a486adeb529f806baa05edbb9d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test index 52cee4c7b33c913b47d9d0a11f5571f9a91bc9c0..8978ee2af49dc0933d60f9f2df8bd53b663dc100 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_select_int.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test new file mode 100644 index 0000000000000000000000000000000000000000..6abe39795fd8ae718464164c1a9dcb04f95e1354 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_strict_sql_mode_update.test @@ -0,0 +1,47 @@ +# Copyright(C) 2011-2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_strict_sql_mode.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS scores; +--enable_warnings + +SET NAMES utf8; +CREATE TABLE scores ( + name char(30) NOT NULL, + score int NOT NULL, + PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; + +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); + +SELECT * FROM scores; + +--error 1265 +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; + +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test index 0568da4508cccb15c50cfb1a7b2963f415be92c3..64292cf18d1828f2e13bb75c211e750fbbcdb70b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test @@ -1,4 +1,4 @@ -# Copyright(C) 2011 Kouhei Sutou +# Copyright(C) 2011-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,28 +12,35 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists listing; +DROP TABLE IF EXISTS scores; --enable_warnings -set names utf8; -create table scores ( - name char(30) not null, - score int not null, - primary key (name, score) -) default charset utf8; -show create table scores; -insert into scores (name, score) values("Taro Yamada", 29); -insert into scores (name, score) values("Taro Yamada", -12); -insert into scores (name, score) values("Jiro Yamada", 27); -insert into scores (name, score) values("Taro Yamada", 10); -select * from scores; -update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27; -select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29); -drop table scores; +SET NAMES utf8; +CREATE TABLE scores ( + name char(30) NOT NULL, + score int NOT NULL, + PRIMARY KEY (name, score) +) DEFAULT CHARSET=utf8; + +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12); +INSERT INTO scores (name, score) VALUES ("Jiro Yamada", 27); +INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10); + +SELECT * FROM scores; + +UPDATE scores SET name = "Taro Yamada" + WHERE name = "Jiro Yamada" AND score = 27; + +SELECT * FROM scores + WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29); + +DROP TABLE scores; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than.test index 431f123497bbcacd0704476f0eb5b7f1b174247d..0cfbea67080904b26d24a40f4cd9bae60b216164 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than_or_equal.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than_or_equal.test index bc739fdfb527909539a845648d2689379e2597cb..e5543a66b453d8a6c11ad726bb45221f04df603d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than.test index a3c3b7663409b1fba5aaaf250353ce3549aca6e7..e326aca2678db9b59701243e32a771339d1ec748 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than_or_equal.test similarity index 98% rename from storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test rename to storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than_or_equal.test index 3cbac1c1ff9c94779a0ae1fe216905e670e603ae..d2e09033f03667e82b4fd5524cc0bdb093f34952 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_not_used_in_order_by_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_all_used_less_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test new file mode 100644 index 0000000000000000000000000000000000000000..49d0d7798d6c1d74fd69f557f6f205746693d6b4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..d8e90a15df9ca8420508a9fc8658906844400e1b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_greater_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test new file mode 100644 index 0000000000000000000000000000000000000000..317517f4ca9b6f3705328d220ba1d0c563bf6911 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..310cc4764191e5bdc8d45ce7297605e7340bf9fe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_have_prefix_less_than_or_equal.test @@ -0,0 +1,50 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (score1, created_at, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(3, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE score1 = 2 AND created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test new file mode 100644 index 0000000000000000000000000000000000000000..7449e21ef3cc899b135be239427ed2415c0502b7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at > "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..3ea5db1493a7c65043c2b31716ea7f968ac410fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_greater_than_or_equal.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at >= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test new file mode 100644 index 0000000000000000000000000000000000000000..50e9ca0d76f0d40b80b91a5db664c3d0bedd2755 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at < "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..125143d71bae8c61eee48edeb66067001267aba9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_range_partially_used_no_prefix_less_than_or_equal.test @@ -0,0 +1,45 @@ +# Copyright(C) 2015 Masafumi Yokoyama +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS items; +--enable_warnings + +CREATE TABLE items ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT, + score2 INT, + created_at DATETIME, + INDEX (created_at, score1, score2) +) DEFAULT CHARSET=UTF8; +SHOW CREATE TABLE items; + +INSERT INTO items (score1, score2, created_at) VALUES(1, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 00:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-01 12:00:00"); +INSERT INTO items (score1, score2, created_at) VALUES(2, 0, "2015-07-02 00:00:00"); + +SELECT * + FROM items + WHERE created_at <= "2015-07-01 12:00:00" + ORDER BY created_at DESC; + +DROP TABLE items; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test index 430b3bb94a2371a73ce9ae6e07b8f2f206761f47..c674388e18197a096ad5bde36ff3d2708b6f2d0d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_recreate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test index 18db29cc85fbc215ce3fdb63e79b14a39e657927..4bffa8c396a5537ff64a29901903dbc234f19409 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_replace.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test index 07ab3d38028d01e6c867c6175162b09bd0497753..01139dc631d725d2fb2702269f561cdfec53d199 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_double.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test index 567d32e0ffd56bb60b9f2da9090d3b5ff4fadbb7..902750ba265b952d3f31d1bc6afb00e1702ddae9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_float.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test index 0658bbcedf327ea5190c1360f699727418dc5eec..4172666fafd6046bc9defa2ee57d7f1012392be7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_int.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test new file mode 100644 index 0000000000000000000000000000000000000000..2077b914428276c9179b56781e4389187b490922 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_max.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS listing; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT NOT NULL, + score2 INT NOT NULL, + INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; + +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); + +SELECT MAX(score2) FROM scores WHERE score1 = 2; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test new file mode 100644 index 0000000000000000000000000000000000000000..8541aaddae0b04e608c52743f4e0a02aaf6ae991 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_min.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS listing; +--enable_warnings + +CREATE TABLE scores ( + id INT PRIMARY KEY AUTO_INCREMENT NOT NULL, + score1 INT NOT NULL, + score2 INT NOT NULL, + INDEX (score1, score2) +) DEFAULT CHARSET=UTF8; + +INSERT INTO scores (score1, score2) VALUES(1, 1); +INSERT INTO scores (score1, score2) VALUES(1, 2); +INSERT INTO scores (score1, score2) VALUES(2, 3); +INSERT INTO scores (score1, score2) VALUES(2, 2); +INSERT INTO scores (score1, score2) VALUES(2, 1); +INSERT INTO scores (score1, score2) VALUES(2, 0); +INSERT INTO scores (score1, score2) VALUES(2, -1); +INSERT INTO scores (score1, score2) VALUES(2, -2); +INSERT INTO scores (score1, score2) VALUES(2, -3); + +SELECT MIN(score2) FROM scores WHERE score1 = 2; + +DROP TABLE scores; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test index a79567bde7ff644a3e9f1f30ef20cec6460deb14..936a57bc2d81f097108db2a2594334ec60b0c4c4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_string.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test index 7c9af9aa998d3355679223ab18a5cd8277e1d5e1..4778da9afa030e4bcb4ae5888c95380b295bc685 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_select_varchar.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test index adc1c88236c75449afa33d781a7c06496fe3aa62..1f6151508e4ce29b4a54afd2581f5228abc9a879 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_32bit_equal.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test index c842ff428c3bf12d83997c4fe8a9f9e89da0a691..1323b4ce4a86065e761fbaeab99d9e155626b8df 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test @@ -14,12 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -33,13 +31,13 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT * FROM ranges FORCE INDEX(range_key) - WHERE start = "1000-01-01" AND end = "9999-12-31"; + WHERE start = "1000-01-02" AND end = "9999-12-31"; DROP TABLE ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test index 708ba0b44dccc9ecdbcee0709c4a398c7de61eb6..666b9566efa2e36553149b9e8a6574c4e135766a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_index_read.test @@ -14,11 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -32,10 +31,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (2, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (1, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (2, "1000-01-02", "9999-12-31"); INSERT INTO ranges VALUES (3, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-01"); +INSERT INTO ranges VALUES (4, "9999-12-31", "1000-01-02"); SELECT start, end FROM ranges FORCE INDEX(range_key) diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test index 94a73a3633fca476b76a491b8cde06c2eef3af51..0f4306b3e086f5488df0e7db782a3fad7827fe2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_asc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test index 6dc1ef84501822d2add0283bbc98dd0279acb846..939d885a617fdc68940f77e0a6a9156e26cefe84 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_32bit_desc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test index 92bd9915a22169a74bd07fb9831fa3184e95a507..89108b7270d34b2c9772471b946346fa580cccbe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test @@ -14,12 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test index a25cd4d87c3627c30a9a7653fe782500bed2928a..3cb5bcae3bf1fdd474115596d4b67c0281280cad 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test @@ -14,12 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25", "9999-12-31"); -INSERT INTO ranges VALUES (2, "1000-01-01", "2012-10-05"); -INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-01"); -INSERT INTO ranges VALUES (4, "1000-01-01", "9999-12-31"); +INSERT INTO ranges VALUES (2, "1000-01-02", "2012-10-05"); +INSERT INTO ranges VALUES (3, "9999-12-31", "1000-01-02"); +INSERT INTO ranges VALUES (4, "1000-01-02", "9999-12-31"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test index 6a04c4a9df54a9ed043f31dfcee0694f0e3b234b..182f185a0d67a8eefbad2504c4cc02afd22a6abe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_reinsert.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test index 0807e78c0aaf7656cbea558b60a24affaf98f2e6..d33d2c1f84eb7f1b04a1bf312d12193045e99879 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test @@ -14,12 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -33,10 +31,10 @@ CREATE TABLE ranges ( UNIQUE KEY range_key(start, end) ); -INSERT INTO ranges VALUES (1, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (1, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); +INSERT INTO ranges VALUES (4, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); SELECT start, end FROM ranges FORCE INDEX(range_key) diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test index f20c2fd132cf3229a50e3b05b1258e46f8cc1b7e..fb647f5c6e705083f7eaccc4d2b02c6bf4559b56 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_strict_sql_mode.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test index 3fcc92f7acfb1d1944b1733ea7a3b23d5299fccd..b4b5f500c56d6d38330a41dbbe912838f24f7fdd 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test @@ -14,12 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start, end; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test index 4d25f29cfdcbee4a390fd93d2e2dd08f367d4c07..a2c4564253ae81fc738483ce4428c653791e7eb8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test @@ -14,12 +14,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_freebsd.inc ---source ../../include/mroonga/skip_osx.inc ---source ../../include/mroonga/skip_solaris10.inc ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -34,9 +32,9 @@ CREATE TABLE ranges ( ); INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "9999-12-31 23:59:59"); -INSERT INTO ranges VALUES (2, "1000-01-01 00:00:00", "2012-10-05 16:18:29"); -INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-01 00:00:00"); -INSERT INTO ranges VALUES (4, "1000-01-01 00:00:00", "9999-12-31 23:59:59"); +INSERT INTO ranges VALUES (2, "1000-01-02 00:00:00", "2012-10-05 16:18:29"); +INSERT INTO ranges VALUES (3, "9999-12-31 23:59:59", "1000-01-02 00:00:00"); +INSERT INTO ranges VALUES (4, "1000-01-02 00:00:00", "9999-12-31 23:59:59"); SELECT * FROM ranges FORCE INDEX(range_key) ORDER BY start DESC, end DESC; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test index eb6df3af8ad07789e427385f64cdd0b185f1c483..bd360544ee1c1590a0df154dedfff06c24c76dd2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_reinsert.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test index faf590d84b60fad0b65e7dbd2709b7703c3516a0..38265a6ed99eaadcf1f4b5b1396edc65030e4049 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_decimal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test index 52e4113dc09da3b87af6ccb1dfe0ce0e61967dbd..fa4780d541bffc64e3e8eb9115343d0229c5840c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_index_read.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test index a8e36f2ff265f91fd970668752271aed482564b9..af3394b1f6140c432cdf2aac5f7c2ab70b08733d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_asc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test index c13ed51cf7f5fc62d0e2b55979a29ac1f2e9f169..bc8a7e723a04bd6722073dcc5135c7ea788223f6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_order_desc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test index 497010df03242c41389d1131cd6915017e7ea157..63f708afbb2db2f04b5df9a37bdcbab993272de2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_time_reinsert.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test index 2ee8ae466ac7e32a9ab7d0d5391744c1d10585ab..7e7357108a57928a74dfcc005f420263f07500eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test @@ -1,5 +1,5 @@ # Copyright(C) 2012 Kentoku SHIBA -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test index efb7ab70ae2c12a3137fe98a5e0fa3b50aa2b4a6..3f337d05523da388970a33a08829dcecc6875ab2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,8 +24,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test index 1b1e62951e448338d8dc79e7530f8354913fa8d9..6dbc49388742c2e2aecc925b115f9b6a0e6a20eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test @@ -1,5 +1,5 @@ # Copyright(C) 2012 Kentoku SHIBA -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -24,8 +24,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test index 74bd0eb133a4164641e10068df00fc4168c34e61..7a1bd6bc74fe8c35c6a9dff0f00a521257c2979c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test @@ -1,5 +1,5 @@ # Copyright(C) 2012 Kentoku SHIBA -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -23,8 +23,8 @@ DROP TABLE IF EXISTS ranges; CREATE TABLE ranges ( id int PRIMARY KEY, - start timestamp, - end timestamp, + start timestamp DEFAULT '2016-04-21 00:00:00', + end timestamp DEFAULT '2016-04-22 00:00:00', UNIQUE KEY range_key(start, end) ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test index e116e7a251e46903b290aea944e7a5c9e043050c..67ae21224d13aafd1179d057e337be9fea13e89f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_varchar.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test index 45be9e2b9eff8bb8befe38ffd3a6835cc090c960..a0277c18cc0d8f994049580c317d291c3ccb3fb7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_32bit_equal.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test index 2505b47b1bcc4a738d654c1c6024d269072ca29d..21a3b936afe34a921fbb2aaf34440593e5f4b4a2 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_64bit_equal.test @@ -13,11 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test index b475b857fd4271b5135de86b9f70f0a89afdf918..fa91ca3177d3f84ebf83c3a48bc637e6420d2a74 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_index_read.test @@ -13,11 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test index 47e4d7c24cdb45a23f75382653bbd663d35acebd..1539d9a77416f5285de7da9923c04a6970857b0f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_asc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test index 88a09a18a5c63849b5117bdc3bb28f224f046434..92492d599e79f48e9416f97f8679aad3206cdde7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_32bit_desc.test @@ -13,9 +13,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_32bit.inc +--source ../../include/mroonga/skip_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test index 5a4525fe7a562dea66d00dd8e95751686a1294d6..226a51b43332b6896f5633b74a898111d470a4e8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_asc.test @@ -13,11 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test index 8865c3610ff3725c9ca2098d1344204d675c0e3d..0f1830ff6d6229466b3db228ae1df31b184d63f7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_order_64bit_desc.test @@ -13,11 +13,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_64bit.inc +--source ../../include/mroonga/have_signed_64bit_time_t.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/skip_osx.inc --disable_warnings DROP TABLE IF EXISTS ranges; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test index e7ac3a8a941fe7a219e8109525a8da412eadc3e8..b80986c3938669036018b2227e95a7b09910643f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_year_reinsert.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test index d1c23dfbc73126c830111185ef247e91d93f968a..0d303496afbdb38512bccb28022bb735f47972ab 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_int.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test index 19fc2c36dfb232272b25d1843a83c65a43ed927d..e250885d058fe127397e957da3bb36e0d648987c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_update_string.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test index 37cd919eb77dd5252f79621c42e0f537e2e36fb4..a954ffd4ee39eca600c7058862c546e22b29d3bc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_exact_length.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test index 9cdee6b1efbf60b29120cd65f48434ecb34e87ab..19cedaffcd4485cea07d1444ec3632414b7d7387 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_null_character.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test index 1e1029d0d86cde0f17297038e35ccc77f1ec7fb9..9228b1ffb919270b0581b367c688554fb37f4007 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_char_short.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test index 9b94d315836fcd51816caaf085b5ee440c6eef49..dc9db9652f617b82a2f775e2418c267fbd45fac0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_date.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-01-29", "clear day"); INSERT INTO diaries (day, title) VALUES ("2012-01-30", "rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test index 44a9fcaca692a41d50de16bf5de4c1aca83370c3..7ddd48617084d0806feeebeff1082d1c3128a4a6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_with_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ CREATE TABLE diaries ( day DATETIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test index 82b6632672c23ef587f5b63bb007153a4a0374b2..aba0d8755f0e908f6358e3f4b2888e6ef545a205 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_datetime_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( day DATETIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-01-29 21:51:01", "clear day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test index c9134275c451366f3840ec68ccffba11ab91d1fe..4e2bd44d2d1e60c92f546d1c49a3f4c63a01e69b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_with_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE releases ( version DECIMAL(6, 3) PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; INSERT INTO releases (version, message) VALUES (10.000, "10th release!"); INSERT INTO releases (version, message) VALUES (10.001, "minor fix."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test index f9cdd093ff40ed2eb83ac50b865ba49783743eb0..a5073a6334a879f04a11f02d2b9a8fa00f8250aa 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_decimal_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE releases ( version DECIMAL PRIMARY KEY, message TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE releases; INSERT INTO releases (version, message) VALUES (1, "the first release!!!"); INSERT INTO releases (version, message) VALUES (10, "10th release!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test index 7b8f48e185a9ceec1856b84273f5d6f343ae6dfe..bf61a4fbd0f3fe5d4dfd859f1a1e5304db5bc0f4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_with_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_fractional_seconds.inc @@ -25,7 +25,6 @@ CREATE TABLE running_records ( time TIME(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (time, title) VALUES ("01:00:00.000001", "normal condition"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test index d71dd6485d2ad39dc8be86d10f94377bbe8ee5df..6e5c369ffa0f0a32da8833ea72ef9160d50ccdb4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_time_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE running_records ( time TIME PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE running_records; INSERT INTO running_records (time, title) VALUES ("01:00:00", "normal condition"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test index f59ee6273010b28c55b69fb3954d3641794ba8de..1eb103b76c7efbfdf1c8e8d3d172bbc85d0607cb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_with_fractional_seconds.test @@ -12,9 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_55.inc +--source ../../include/mroonga/skip_mariadb_5_5.inc --source ../../include/mroonga/have_fractional_seconds.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( time TIMESTAMP(6) PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01.111111", "clear day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test index 7d8c1778331bfd0150848309ee320cbe61eec017..341dfd21c097c1571971775bdb33d33ae1e49d9f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_timestamp_without_fractional_seconds.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( time TIMESTAMP PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (time, title) VALUES ("2012-01-29 21:51:01", "clear day"); INSERT INTO diaries (time, title) VALUES ("2012-01-30 01:23:45", "rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test index 9c8e4e46c280e27af97926df425568c9315a1cd8..a610944d835cf0a433586f707e4a8c17a073be92 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_varchar_null_character.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test index 6236b2d961d6743d53724a0995b6f5a93e4931a9..a390eba41f7a585c59cd727573ae04b05c2f591d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_primary_year.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE aniversary_memos ( party_year YEAR PRIMARY KEY, title TEXT ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE aniversary_memos; INSERT INTO aniversary_memos (party_year, title) VALUES ("11", "We need a big cake!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test index 9358c7c0e47aaf553f5afa597f613ae942837dfd..97e8efc73cbed4411b5521acc5651157be322052 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test index 9fe769897450932f5d79040394d48157f6ee4ebd..a3e040b554bc19d3f346cc3ad651b06688c5aa9a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test index 24967c9d14bc1930f73b583e408c44c47a778fc8..454326ea21282f5e60f8f8616cdfbff0e621d3d4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test index 7f4bc666fe198fe18278701122e16cc2e66bb7a9..1a9a06f8b40d866332bb078eb64e92ffab617b21 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_greater_than_or_equal_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test index 58604aa347d8d2db60cfb98356d26034cb2c6ecc..d19cfcb22627113dea8638217f8558a5e72b4d91 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test index df89318fbe444e9d7da059eaa3c5fa903360828b..aa0761aa871cf4f6f71e935340f905b516fb6e2f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test index 97dc161f191a83d16fb428ffc78ba3e212b0a9f9..068f53fea69d1ab09b00de8e5af566801c9a3117 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test index 2e4451b9fb76558b5fcd6dfb288f78db4cb7376f..b903332396221ae8f25d89a9e39a8b76bb9596a4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_normal_less_than_or_equal_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test index 76729da279ec2294b94192123d3632e1942ce23d..5b1e16538ad4f1bee8db829b063fd14a8b3e7145 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test index 692953f9332bec2b4cd5f349e61097dfec6bf18b..10446b115b57f6ad6cc0e35de1a96fbcaf431db5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test index d5c73ac3d81ebffc2ab328d0a58e4056c40ff79c..66d29dfb8f1128e8951309b3e32683c49a0c045a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test index b8d2dac9cacc5d0946abe2b21e6ecfe5cc8020b0..7dcbb6e9023446b15f1194a926f8aa9e9c24c7a5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_greater_than_or_equal_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test index 8f262237cde6c0734369c41a92b5d6f1a9a065cb..8537caed403cb76d1af8d8082c9eccc5d7277b30 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test index 994eff8b69a04b399872fa6a7af68bd4f63b7538..d7d48ea72becb3569e2a81f202039d4920740bcc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test index 9e58d3cd8e48360bfa4138f3ae5d1dc9e967a83d..216c5f4ef99265e1b4186d1ab25831c6eea79878 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test index 14c97749c37f824f866e209caef32696d4875911..90f241ad285e07d733475a1b14bece6929e5d88b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_range_primary_less_than_or_equal_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test index 318ccbfb820164ac0cdc49aef777450c4a973a06..58e58f4dbdd140a5088fcfac13bbca3d537ffa29 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test index ef89fbdd128bbb779b373aa0c569ced3a61343fc..2b81524aef25daf1a77835b5c878966ab4c5469d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_bigint_unsigned.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test index e35baa1303791cb55409dd904e948679c8b38eec..7ad385098ead280aae569336827da97aaf592717 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_double.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test index aca93729e3b6b9c701a8d691db89275298873c2f..0baa5d4b311ba47f30f9dc888536b7a746fd6b2e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_float.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test index f9563018beacae7f28ca9e4b451e79358f8d4058..15e539b552441358ee7aac62252941deccb8a121 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test index b95dca5fe079371f4a3b776f028f20164fc470d2..a3e1d35647baeb4d6770556f9cf4798b0f919d48 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_int_unsigned.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test index a817dfc285ce6d161a7a4a9ba48e181d21f88f4a..c63a8a867a8f9778dec47c522b1a2694e9b38303 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test index f9f42e48ac59c245ff175b5a5c8669a24dbe6abe..81d6df92ffabf957a78b04a81941a46532477797 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_mediumint_unsigned.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test index 977629729129c690a4e9cacb0dfd74ad7da1c762..c64bd185b21bd03ed4746c5233f62cf2f1c4d99e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test index bba35ebbdeb4999e43f9aca80aabcf1ea2fa9167..82ea8949d869e4d841a3ba9890f0bcc3dd892be5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_smallint_unsigned.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test index 04344db0034d1f8adf0c9d897afcedbe083a7518..685570228569ae554e9f141910edfb43b03329a3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test index 27ef9af3a80302e402c2dab9f1d911f29e803f54..c513983d886af4524204cd64e1c1f554d1abe5de 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_tinyint_unsigned.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test index 518eabe1cb023fbc8fd4928b7ec15e6fd74f0c83..51ed0a3bb8bdf9ea4b4e254479d2ee92a98533d7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test index 08b9c5b56481c32449e0094f134d411a684c325c..9d9d02c4b023ad2cd0c175af01cacaab54125f41 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_multiple_varchar_collation.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test index 84f2adce7c8cff75da9c646f883e1e7ed6e34641..04584d2f71f5516ab4bbabaf2a731b16cbd09fb0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_int.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test index 995dd9d77a628f44772d13709204fed7d1bbdb3b..7b8a6fecbab0f27ce4f944f94d7aadf49e37a56f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_normal_varchar.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test index 106a5bdd9f2bb55d849e068eb3e5967bd691f5a3..c2307642392b8c737a5c3c7e08a1954bd765f268 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_int.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test index 4a0b2ff34929da4671acef78a8c21d954df679b3..c4004e4207ad0351ec5d3e9a3a2329ab95eaf7e1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_read_primary_varchar.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test new file mode 100644 index 0000000000000000000000000000000000000000..f4d468b71b3946be550049d0df4f1bbb88cee906 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_all.test @@ -0,0 +1,39 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int, + UNIQUE KEY (id) +); + +INSERT INTO ids VALUES (1); +DELETE FROM ids; +INSERT INTO ids VALUES (1); + +SELECT * FROM ids; + +-- error ER_DUP_ENTRY +INSERT INTO ids VALUES (1); + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test index 27c094acec9ad105326d4b13cc2df50f789b37fe..3b3743b8b37f54f7a3cc8090d81a691de1926211 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_delete_by_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test index 4acdfc0f1bfd93f8c70c42e9b51dc0e90909acfd..70c6ec8576fcbd8128ca8520bb09944cb3259590 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_insert_after_error.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test index 7642ee733f398188b566e2ab7943baba5404f02e..27fb6eea8343862886e6277371cf1831dcebd893 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_search_after_duplicated.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test index 8bcdb56ccfd64ec11e8f384066c74e759e55885a..fe222c377ec7401e6781fd482faf25fe959e9b17 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_unique_varchar.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test index fbf776d9e39b3afdb76962ce9a43e5aff151493a..b1a37b5acc9bde972f47fed5c80562b7119997eb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_multiple_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test index 557ce195ae31043a188babca4bd7f6ee2a32515a..3d47500544f2e2cd3b5b0d5e34a6e2a0aa10a130 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_update_single_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test index 43988b71a9a6d82ac8785e66e301731df01f41a9..fb462fd76851b894cf8a124293e7edeee5bb58fc 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_plugins.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test index f6d2d8fb5dbc707abb69d29b34cf3a6822015b7b..2dcf6716e2e6c9c0e02a170a2c2137d6465bbae9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_none.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test index 3135ad9fa34d4539074a662f56129cb73fb9cae1..f1aac9c1c33e6bda17168d462939f7154875aa87 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_auto_increment_use.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test index 7b54e8d3ac59951e76a5a04761070bf101b0cc3c..445bcfabe39dc57f11f1e3766594977a0600eb60 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/information_schema_tables_data_length.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test index 6e3ce140eba5f3b23c9b1d401edc4f9a644f6fdf..95c21513d5709376ded7f5972e7f0eab957e897f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc @@ -77,22 +77,6 @@ insert into t1 values("2010/03/26 11:22:33"); select * from t1; drop table t1; - -# for virtual columns -create table t1 (c1 int, _id int); -set sql_mode=""; -# warning WARN_DATA_TRUNCATED -insert into t1 (c1,_id) values (1,1); -set sql_mode="strict_all_tables"; -# We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported -# MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. -# We share this test with all MySQL servers. So we use number here. ---error 1265 -insert into t1 (c1,_id) values (4,1); -select * from t1; -drop table t1; - - # duplicated key error create table t1 (c1 int primary key, c2 int); insert into t1 values(1,100); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test index d58d432674257ac4b34967b4b2f1d4ea6be0d6b3..e52d11c5582e594a004964b1bfc20daea852c468 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_delayed.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,9 +12,12 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +skip "This test is too fragile."; --source include/not_embedded.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test index a53e672cbe4cd7f1228f6f8a2eacc98c9e12373c..e6c0cae164f5646525fdcc3484d0bdb521235aea 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_no_primary_key_and_unique_key_twice.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test index c25e4606359482763740e154725f05babbe98c54..1b07775d681943facc93732091024aad3bea881e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,7 +24,6 @@ CREATE TABLE diaries ( day DATE PRIMARY KEY, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day") diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test index 5542b0ece3b24a4ce8f1d42ed2d1035707836fe3..f5b6db7bab62d45c0f3e237353067f08c562a7f5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_on_duplicate_key_update_unique_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( title TEXT, UNIQUE KEY day (day) ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (day, title) VALUES ("2012-02-14", "clear day1") diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test new file mode 100644 index 0000000000000000000000000000000000000000..3f3fd208aeff9198f21e076f919f7e038b3023d6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/insert_virtual_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (c1 int, _id int); +--disable_warnings +SET sql_mode=""; +--enable_warnings +# warning WARN_DATA_TRUNCATED +INSERT INTO t1 (c1,_id) VALUES (1,1); +--disable_warnings +SET sql_mode="STRICT_ALL_TABLES"; +--enable_warnings +# We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported +# MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. +# We share this test with all MySQL servers. So we use number here. +--error 1265 +INSERT INTO t1 (c1,_id) VALUES (4,1); +SELECT * FROM t1; +DROP TABLE t1; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test b/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test index 48d50135b08d6ad0e1af9acc17ff8b4924d3948a..1f9c5fd3849d349612e18aa4c0dab554790f4895 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/like_unicode_ci.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test index eeda3dac4a910a039ae3c93f41270b8e16e08bc1..6c7627e7967aeae7fd24e1cd5a74786a9bf98f61 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/lock_tables_read.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test deleted file mode 100644 index 2355e5d4af49a5b0cb8a19b333faa6cceda296d1..0000000000000000000000000000000000000000 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_TODO_SPLIT_ME.test +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright(C) 2010 Kentoku SHIBA -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - ---source ../../include/mroonga/have_mroonga.inc - ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings - -flush status; -create table t1 (c1 int primary key, c2 int, c3 text, key idx1(c2), fulltext index ft(c3)); -insert into t1 values(1,10,"aa ii uu ee oo"); -insert into t1 values(2,20,"ka ki ku ke ko"); -insert into t1 values(3,30,"sa si su se so"); -insert into t1 values(4,40,"ta ti tu te to"); -insert into t1 values(5,50,"aa ii uu ee oo"); -show status like 'mroonga_count_skip'; -select * from t1; -show status like 'mroonga_count_skip'; -select count(*) from t1; -show status like 'mroonga_count_skip'; -select * from t1 force index(primary) where c1 between 2 and 4; -show status like 'mroonga_count_skip'; -select count(*) from t1 force index(primary) where c1 between 2 and 4; -show status like 'mroonga_count_skip'; -select c1 from t1 force index(primary) where c1 < 3; -show status like 'mroonga_count_skip'; -select count(c1) from t1 force index(primary) where c1 < 3; -show status like 'mroonga_count_skip'; -select 1 from t1 force index(primary) where c1 > 3; -show status like 'mroonga_count_skip'; -select count(1) from t1 force index(primary) where c1 > 3; -show status like 'mroonga_count_skip'; -select * from t1 where match(c3) against("su"); -show status like 'mroonga_count_skip'; -select count(*) from t1 where match(c3) against("su"); -show status like 'mroonga_count_skip'; -select * from t1 where match(c3) against("+su" in boolean mode); -show status like 'mroonga_count_skip'; -select count(*) from t1 where match(c3) against("+su" in boolean mode); -show status like 'mroonga_count_skip'; -select * from t1 force index(idx1) where c2 between 20 and 40; -show status like 'mroonga_count_skip'; -select count(*) from t1 force index(idx1) where c2 between 20 and 40; -show status like 'mroonga_count_skip'; -drop table t1; - ---source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test index 6d07ab7b6067c11db2230da3f4ddc8ad0aea101e..69713752f4f2ab39fce43f392da01efa0ca49f27 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_multithread.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,11 +30,17 @@ CREATE TABLE diaries ( INSERT INTO diaries VALUES("Hello mroonga!"); INSERT INTO diaries VALUES("It's funny."); +disable_query_log; CONNECT (thread2, localhost, root, ,); CONNECTION thread2; +enable_query_log; + INSERT INTO diaries VALUES("Happy birthday!"); + +disable_query_log; DISCONNECT thread2; CONNECTION default; +enable_query_log; SHOW STATUS LIKE 'mroonga_count_skip'; SELECT COUNT(*) FROM diaries WHERE MATCH(title) AGAINST("mroonga" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test index 26930d47502638aba5e867faa0a40ef9a0c4d9f2..07bbc773973da8413986fc813a334bccb78391f5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_after_insert_single_thread.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test index fedf31810c7e4936d4bf1eb6633bd88dc5b522a8..2014a8fa476bdaa84461897bfc79e0b81f590ff4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_disabled.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test new file mode 100644 index 0000000000000000000000000000000000000000..3c63ecc9c1279e52b8984e2a735039e79357ff95 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_and.test @@ -0,0 +1,44 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT, + age INT, + INDEX (id, age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 28); +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); + +SELECT COUNT(*) FROM users WHERE id = 2 AND age = 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test new file mode 100644 index 0000000000000000000000000000000000000000..cccb0d3f48ff86c7f53957ab5291fc40abed0487 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_between.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age BETWEEN 28 AND 30; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..f8ebad5d7bbf5ff2e60efc009b4edf744857693b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); + +SELECT COUNT(*) FROM users WHERE age = 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test new file mode 100644 index 0000000000000000000000000000000000000000..9e3c6fd8a32c5089ca1bbb11f5af2728384908e9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_boolean_mode.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); + +SELECT COUNT(*) FROM memos + WHERE MATCH(content) AGAINST('+Groonga' IN BOOLEAN MODE); + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test new file mode 100644 index 0000000000000000000000000000000000000000..634428c5c95945d6344f76884356fc038f0d3894 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_full_text_search_in_natural_language_mode.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE memos ( + content TEXT, + FULLTEXT INDEX (content) +) DEFAULT CHARSET=UTF8; + +INSERT INTO memos (content) VALUES ('Groonga is good.'); +INSERT INTO memos (content) VALUES ('Groonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga is good.'); +INSERT INTO memos (content) VALUES ('Mroonga is very good.'); +INSERT INTO memos (content) VALUES ('Mroonga uses Groonga.'); + +SELECT COUNT(*) FROM memos + WHERE MATCH(content) AGAINST('Groonga'); + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test new file mode 100644 index 0000000000000000000000000000000000000000..0feababfbf233ba925a86a5c841aab46c505b0d9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age > 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..5e69f1684ec5ac4492628c40191804b864a67e42 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_greater_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age >= 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test new file mode 100644 index 0000000000000000000000000000000000000000..8aa1ba17621ae6a8115fee2fb7774460a5c5dddf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age < 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..a6e0f3a51ed9c9b683b153a8ffc3e00d0c13425d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_less_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (27); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (30); +INSERT INTO users (age) VALUES (31); + +SELECT COUNT(*) FROM users WHERE age <= 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..f07d1b9beae85757ebdd40759fe7feca1d9b7144 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_not_equal.test @@ -0,0 +1,42 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (28); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); +INSERT INTO users (age) VALUES (29); + +SELECT COUNT(*) FROM users WHERE age <> 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test index 378f4424da117b38377b95b8c754bbd7b029b5fb..cc3de7c3ce693442bb6bd7568fba5c214900646e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_index_view.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test new file mode 100644 index 0000000000000000000000000000000000000000..1f49597bb27456e3f315e90718d8f95ef06620b6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_multiple_conditions.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT, + age INT, + INDEX (age) +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id, age) VALUES (1, 29); +INSERT INTO users (id, age) VALUES (2, 29); +INSERT INTO users (id, age) VALUES (3, 29); + +SELECT COUNT(*) FROM users WHERE id = 3 AND age = 29; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test new file mode 100644 index 0000000000000000000000000000000000000000..1c9e7354c357b80abb20cb42c79b14ff2bf10864 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_between.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id BETWEEN 2 AND 4; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..23fb2152f94302fdd7b0883624754e64f267be43 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id = 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test new file mode 100644 index 0000000000000000000000000000000000000000..9020dd11efa19b0caec8377cc00583d519b029a9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id > 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..f4c1e0687c5678a6fed6ac8fa6e409e4ec1577ed --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_greater_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id >= 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test new file mode 100644 index 0000000000000000000000000000000000000000..bcf5afa52de5912344e8429f93ec577d93535066 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id < 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..ddfad77ceff0013bd68ab828584c779340293929 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_less_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id <= 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test new file mode 100644 index 0000000000000000000000000000000000000000..c49385ed849b1df739720f5dcb19ad2565521f25 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_count_skip_primary_key_not_equal.test @@ -0,0 +1,41 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +FLUSH STATUS; + +CREATE TABLE users ( + id INT PRIMARY KEY +) DEFAULT CHARSET=UTF8; + +INSERT INTO users (id) VALUES (1); +INSERT INTO users (id) VALUES (2); +INSERT INTO users (id) VALUES (3); +INSERT INTO users (id) VALUES (4); +INSERT INTO users (id) VALUES (5); + +SELECT COUNT(*) FROM users WHERE id <> 3; + +SHOW STATUS LIKE 'mroonga_count_skip'; + +DROP TABLE users; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test index 20b89f724638181e8f0db759cbac274f554985ea..e65e44d1f6091361398e127c54cbc95f3823e4a0 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_disabled.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test new file mode 100644 index 0000000000000000000000000000000000000000..14f548db12499e9f3b8ce67e19db9cb39b74295f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_multiple_match_againsts.test @@ -0,0 +1,57 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES UTF8; +CREATE TABLE memos ( + id INT UNSIGNED NOT NULL, + title VARCHAR(255), + content TEXT, + FULLTEXT INDEX(title), + FULLTEXT INDEX(content) +) DEFAULT CHARSET UTF8; + +INSERT INTO memos VALUES(5, "title 1", "content a"); +INSERT INTO memos VALUES(12, "title 1", "content a"); +INSERT INTO memos VALUES(10, "title 1", "content a"); +INSERT INTO memos VALUES(4, "title 2", "content b"); +INSERT INTO memos VALUES(6, "title 2", "content b"); +INSERT INTO memos VALUES(1, "title 2", "content b"); +INSERT INTO memos VALUES(11, "title 1-a", "content a-1"); +INSERT INTO memos VALUES(3, "title 2-b", "content a-2"); +INSERT INTO memos VALUES(2, "title 2-c", "content a-3"); +INSERT INTO memos VALUES(8, "title 1-a", "content b-1"); +INSERT INTO memos VALUES(9, "title 2-b", "content b-2"); +INSERT INTO memos VALUES(7, "title 2-c", "content b-3"); + +SELECT * FROM memos + WHERE MATCH(title) AGAINST("+1" IN BOOLEAN MODE) AND + MATCH(content) AGAINST("+a" IN BOOLEAN MODE) + ORDER BY id + LIMIT 1,3; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test index b1246ddfbdc2727639c853dd8f8e11cd0e636051..eb9e7ef55bcbf467bd3d7c6698818ca21e453d90 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_not_optimized_no_limit.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test new file mode 100644 index 0000000000000000000000000000000000000000..c14ee787f1abfa7fa7887626e4955f59d57ee48f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_cp932.test @@ -0,0 +1,46 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES CP932; +CREATE TABLE memos ( + ޝ•ÊŽq INT UNSIGNED, + “à—e TEXT, + FULLTEXT INDEX(“à—e), + KEY(ޝ•ÊŽq) +) DEFAULT CHARSET CP932; + +INSERT INTO memos VALUES(2, "–¾“ú‚ÍŽR“o‚èB"); +INSERT INTO memos VALUES(3, "¡“ú‚̓Tƒ{ƒeƒ“‚ð‚à‚ç‚Á‚½B"); +INSERT INTO memos VALUES(1, "¡“ú‚Í“V‹C‚ª‚æ‚­‚Ă悩‚Á‚½B"); + +SELECT * FROM memos + WHERE MATCH(“à—e) AGAINST("¡“ú" IN BOOLEAN MODE) + ORDER BY ޝ•ÊŽq + LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test index 41d5facf6443c6d1dfd01c87eb63d0eb7613005a..04cd30ab337e337b12300e66c33df02bf5e89860 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test index f6440777ab516d65409b3475910a90dc80186790..cdc7b4335328883f6febe5f3d36231f81d40f10f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_between_over.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test index 5b57d2980c63c463d32c3ba99df07925dfabb269..c7a5244042c58f15939bbcca7b86d0a1de09cb0c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:34", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:34", "Tomorrow will be fine."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test index 4f878af84cc661c1de2fb5d6cb729a2a9c11c0e0..0f87b70186c6a4255bc712180c75893ebcbebb97 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test index e8735fda41ccbd5647f9cdafc67a30b70fc3b166..922e72e2bbb9b12fbb7e2cf1897121079e5fe220 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test index 4a748bc130bd800d34ffe57f5fe2cddba3162558..78f8f19a14d1acf2e73fffad784c4126bd1d9e41 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test index 80fe51e1e80495962f3cbe3bef890d1e5abdcbb4..2b12fa6ccc141c085a016765d8ae222d23225d8a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_datetime_less_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(date) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine."); INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test index b36a13f3727b7d0e36b9c23c745f95ef033fdc70..1908ce34d8a66853cc1c99e9c0081888c4e38c08 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_duplicated_order_by_columns.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test new file mode 100644 index 0000000000000000000000000000000000000000..834a39fe75c8b5f03bfa7f31c1ea9d07e520d4ed --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_name.test @@ -0,0 +1,49 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES utf8; +CREATE TABLE memos ( + id int PRIMARY KEY, + tag ENUM('Groonga', 'Mroonga'), + content TEXT, + FULLTEXT INDEX(content), + KEY(tag), + KEY(id) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND + tag = 'Mroonga' + ORDER BY id LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test new file mode 100644 index 0000000000000000000000000000000000000000..703d79dc8e174013b14c3241a2c16a02783924cc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_enum_value.test @@ -0,0 +1,49 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +FLUSH STATUS; + +SET NAMES utf8; +CREATE TABLE memos ( + id int PRIMARY KEY, + tag ENUM('Groonga', 'Mroonga'), + content TEXT, + FULLTEXT INDEX(content), + KEY(tag), + KEY(id) +) DEFAULT CHARSET=utf8; + +INSERT INTO memos VALUES(1, 'Groonga', 'Groonga is great!'); +INSERT INTO memos VALUES(2, 'Mroonga', 'Mroonga is great!'); +INSERT INTO memos VALUES(3, 'Mroonga', 'Mroonga is a MySQL storage engine.'); +INSERT INTO memos VALUES(4, 'Mroonga', 'Mroonga is based on Groonga.'); + +SELECT * FROM memos + WHERE MATCH(content) AGAINST("+Groonga" IN BOOLEAN MODE) AND + tag = 2 + ORDER BY id LIMIT 1; + +SHOW STATUS LIKE 'mroonga_fast_order_limit'; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test index bcc678360e26471039b6d2de1d95cab0bed36c49..9c44110bfd51d694afce78f86f635b33c67742b4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_have_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -33,7 +33,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test index e0a2df2e5873f02552923a26a4dec1132d2e5d53..32345f661391815ba5cb35e75421e975ed521528 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test index c8f698cdbccca2f133e0eb72544a73ce5d75fe7f..508f85f3a738998e8da7b389d86beb4440fe829b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_between_over.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test index ee510ab7527514742f95f0579a0f1d8a91466f6e..a2024e8dda52c9e239a89602a598c2aa4a682758 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test index 76f2de8146b3537a70fcd00ba8c7ca997a326dda..4924cb374e992eed0cd0b98bb65a743b2f6673e7 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test index caca6b56b898388120ab18876547180b06b9e916..b81247ed2f93bf04b9354769ac9d340c82799d84 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test index 1c26bef936f15eab81f0b4c8af1de090dc651298..d32d9f1128c9bf8459072029a0f9ba071396b27c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test index 4df32d8a590fbbe3d14f9758bfe406b046069fa9..9289bee30688ffa173bf1e2a043431dfe855a618 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_int_less_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test index 07907f1dfb7a24cef75045c703b4255579b41040..23adb84f91c45cda6df81921ebaf356edc1dbb82 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -33,7 +33,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test index 0e0b3f8e1ea1479c4d7474af0d171e408e61f294..1031427f9cea37694abcf62f99da2e871d8c4b67 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_no_where_clause.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test index 213605adca1bc9cbc379be4bb3017b42d241a766..78b42e5d8d7b028717b73d13f9a812a244d98b6a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_asc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test index 58505edf7a76e336a13f2f02c732da297c58e50c..f09a2a0e3b46a6855f5e00d18bd5d3757b02d260 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_desc.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test index 92178a451585445288e0e788455c4f2988e90397..9a7585609136d6057e6751ff5c7a0ed0d2153f11 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_id.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -35,7 +35,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(NULL, 1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(NULL, 2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test index 4ec5a8b15966b80725901ef44b02c76c1e5ccc00..e49a79a7db25f452bd22df77b3336c852c4a4b01 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_order_by_match_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test index eaedbbdc7dc0f7e9756882675516c569942c76bd..b563028c81db3c8ca6283607fb8a120a84a3a3d6 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_select_match_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test index 72d2890a1237277b24660d638e21d2f9f36abf06..c11603c94f8beb4b18d3aa4cc70fe0fe2935a078 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test index eeb2e36ae29fc41228c12f40d63fca4e2efe82fc..71f93c6ee1b142a7cd8fb87f2d770bcad3ed4019 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_between_over.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test index 666887d3347967aa14a81b5a388bfc7a00d09677..883f676e45e8e9cf2bacbc13963b1ffe0de9459e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:34", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:34", "Tomorrow will be fine."); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test index feeae64b8d12c984d8460be41ca9aaa3ba6a71f9..a8af0bbb78185c593dc27c2cb7957b8ac22c2fe5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test index 4744add7881dd14e44178e9e837ce57e388068b0..a0795f8eba6d1e6743d5237a51de55fc2f951969 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!" ); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test index cb407d354503f147e3fb90b5b6353a9be4e95056..4087207c2a874cb97f2e6c24fc3a4e9da4c56b74 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test index b9327e4251dd3b27a35679dbafe43729d361afc3..e423a4b937b852955ff7e44b5d6b0d67dabf0279 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_time_less_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ CREATE TABLE memos ( FULLTEXT INDEX(content), KEY(writing_time) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE memos; INSERT INTO memos VALUES(1, "1:23:30", "Today is fine."); INSERT INTO memos VALUES(2, "1:23:31", "Today's lucky item is flower!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test index 7c460d1086a5c6898b1b05f84eb70c47db029676..60565dd7bab16c3ea961418c561e93faad77eb06 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_with_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -35,7 +35,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test index ffebd0a4bad14765aa40f78e999158b0e6b7cb56..dcde9373317b8ed5f64f603cac5b61920fab4195 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_varchar_equal_without_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -34,7 +34,6 @@ CREATE TABLE diaries ( KEY(month), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test index c4e86ac1039001155d7e5775b938078a1f7be77a..4e7c117d65404d1196949f76d6d804831f26e1e8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test index 57b512ed88d585b28e333afc0029d5d4f1f9b590..d6e7b345c0583a7cbe43dd5d355c6474ce8eea79 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_between_over.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test index 729d8b03770bc71963d6588b055c91df755b3984..bac10448269e59ec1f19decdcb15813876c6701c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test index 6bd955cc956ec556c0ce5594a4a1d87483ae8209..9ffae4a65281ae3a69c9fce6ab2caac0a7663e4c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test index 3e40e88585991601b841de20717ae4d0d07a1910..09015f9c2c380f7db073265cd2d5f015a0572128 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_greater_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test index 44fb928774f1b13637b104a49289f7c8478c507e..35adc29839f7deca80d7761312191270a498a372 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test index f7d0865f303211dc38d5092fd5dfd5fb9606508f..831ef4c3e6a189a18d30bcaebd03707153f37097 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/optimization_order_limit_optimized_year_less_than_or_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test index 25270f14def79b1f53aa800e74292a83f9defd74..4e59a2ca3abfafc14cba223dbb20a4aded05b92d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/partition_insert.test @@ -12,9 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_100_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_0_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source include/have_partition.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test index d601b4d4fe93c007589dd1aeeef86a14aa4278aa..eaf3304dac59059ce56f73660af8d50394ab192e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/partition_update.test @@ -12,9 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/skip_mariadb_100_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_0_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source include/have_partition.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test b/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test index 65989b60e8a0974a4deb6734e49b7dac03becb56..22fade591b6d3b5d2b72c1f639e84982300c8ca3 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/repair_table_no_index_file.test @@ -12,9 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc +--source ../../include/mroonga/skip_solaris.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_mroonga_helper.inc @@ -27,7 +28,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start Groonga!"); INSERT INTO diaries (title, body) VALUES ("Groonga (1)", "starting Groonga..."); @@ -35,11 +35,11 @@ INSERT INTO diaries (title, body) VALUES ("Groonga (2)", "started Groonga."); SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE); ---remove_file $MYSQLD_DATADIR/repair_test.mrn.000010A.c +--remove_file $MYSQLD_DATADIR/repair_test.mrn.000010E.c FLUSH TABLES; -# Error ER_CANT_OPEN_FILE syscall error 'repair_test.mrn.000010A.c' (No such file or directory) +# Error ER_CANT_OPEN_FILE system call error: No such file or directory: failed to open path: --error ER_CANT_OPEN_FILE SELECT * FROM diaries WHERE MATCH(body) AGAINST("+starting" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test index 81dcbe318b36ebd8e6b751610ff14b401f6a9197..e9ba60c2c28821161ed1a287c6a105f2b52c4d9f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_geometry.test @@ -12,10 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test index 0f8e90c0c0334bd23e3a766fe33bf881473ad34d..3ff23185741f559bc7053b57efd80b3f3ddb391e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_select_varchar.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # Based on #910. diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test index bb134cd04e48ff92e6d0044cc0a373ccf2d8c92d..4aba5eda256214915630595f843b22bd075a3970 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_text.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( content text, fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test index 231e8b09762232a9e85170685f99006da6f86397..da3faa03053bc81fe9ade2196f8d95367a5f8801 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_varchar.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( content varchar(256), fulltext index (content) ) default charset utf8; -show create table diaries; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test index 2e06bf7e5f87168200d4344ab0d66bd5f3b29105..22cbf13889b434c25634f54a496f4cf4f3ad418f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_vector.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test index fb8a6750fb99d7c48bce70549ffc8466cc475254..db5b90ab0b1664263dbd731995ded02831aa84be 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/replace_without_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test index c3973cb916478066e60f5a7e70dc1cba25781733..b607c314a8478aaba0931de7e2e5b89b66e7482f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_all.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test index c624f8e0c36d9ba36c4966b534f835c0eabe2e6a..52630fec0f077fe06f68fac17fcb3124516a686a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test index 59c358cc1b831fb3b3cbe6a4a0063f95b142a2b6..75d00e7a737896cc05eb1961a6a91addc956062a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_empty_key_where_not_equal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test index 4424cf283daa21545b939051362cf07d3cf3283e..ad71ac7119b392f375b81fc4638917e882b601f1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_with_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,7 @@ INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -SELECT *, COUNT(*) FROM users GROUP BY age; +SELECT age, COUNT(*) FROM users GROUP BY age; DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test index 46c0e5aa70e65618c3a6645eb38cd8bf11015165..710bea0dd5a0ea85bc5583c59c1fca870a00b20a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_group_by_without_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -30,9 +30,7 @@ INSERT INTO users VALUES ("Alice", 20); INSERT INTO users VALUES ("Bob", 20); INSERT INTO users VALUES ("Charry", 29); -EXPLAIN SELECT *, COUNT(*) FROM users GROUP BY age; - -SELECT *, COUNT(*) FROM users GROUP BY age; +SELECT age, COUNT(*) FROM users GROUP BY age; DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test index a0afe1198efe58c8d43c328270b646c91914b5a0..0bce1387b3f5550c27bd442fc16053c8bcb28ba1 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_pkey.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test b/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test index 231e7c2703795fd37c2eb5209745766c5d158653..32bb5758a10a88d21884324c07925ab2061f1a90 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/select_secondary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test index 3f00049092cb34611fcd2ef1e5c0ce0728a842b2..95007d8032fee2bf1bad33d63081f6180c1ec2fb 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/show_create_table_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test index c2df2522b9cd3565371387ce6fabb8e812e6b353..a7460343c266cabc836fd832753574fce4fd2bbe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/sub_query_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,6 @@ CREATE TABLE diaries ( title TEXT, FULLTEXT INDEX (title) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO users (name) VALUES ("alice"); INSERT INTO users (name) VALUES ("bob"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test b/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test index e71a2322bb23c808366d7bd5e3876fb8e94f5b18..ef26b467dbc891004b91fc715d2c14c980f26c09 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/temporary_table.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/skip_osx.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test b/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test index 7e5bc2d010c5096cc1736e438674dda67a4b3f4d..840ff375489efeab65aeae6c0ddb38770800531b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/truncate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -31,7 +31,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test new file mode 100644 index 0000000000000000000000000000000000000000..c90a8cbf1cb35eb42a6be28005ea6e13ff9ddebe --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_binlog_row.test @@ -0,0 +1,38 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET SESSION binlog_format = 'ROW'; + +CREATE TABLE memos ( + title varchar(20) PRIMARY KEY, + content varchar(140) NOT NULL +) COLLATE=utf8mb4_general_ci + DEFAULT CHARSET=utf8mb4; + +INSERT INTO memos (title, content) VALUES ('Mroonga', 'Mroonga is great!'); +SELECT * FROM memos; +UPDATE memos SET content = 'Mroonga is very great!' WHERE title = 'Mroonga'; +SELECT * FROM memos; + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test index 33ccec429896aeeee8c8b0d1c66397fb1e4120b3..dbcfd66546481ff5f15a923001525d8a7ab5b239 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test index 5b5a47ad447aa6b20797126c2aa468f4206c0100..526d6f18c2055c7496637ec528f512886e4e4ae4 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_hash_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test index f1c91bfd8d3007169515461a6db255f51bbceaac..0f9ecdbf337972f07ae5ec6f9f257718eecbcbbe 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_id_unique_hash_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test index 7f40ba09b2e5418e3a270f14e4936b55c706feff..eb4af2c117ecc26bd2787fad9d8fc1d86bc525ad 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_int.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test index 65f0ce3b2535e064f73f982adbefac28d6121e60..872f1673569b72b8c426d0e0b80ee5da8026f52d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_last_insert_grn_id.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test index a50bfd6929e7a56997f8ed3e674623a2055a5a5b..e0cb953d51dc9ba088968820553c95a85e766e7d 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/update_virtual_column.test @@ -12,32 +12,38 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings -drop table if exists t1, t2, t3; +DROP TABLE IF EXISTS t1; --enable_warnings # for virtual columns -create table t1 (c1 int, _id int); -insert into t1 values(1,null); -insert into t1 values(2,null); -insert into t1 values(3,null); -select * from t1; -set sql_mode=""; +CREATE TABLE t1 (c1 int, _id int); +INSERT INTO t1 VALUES(1,null); +INSERT INTO t1 VALUES(2,null); +INSERT INTO t1 VALUES(3,null); +SELECT * FROM t1; +--disable_warnings +SET sql_mode=""; +--enable_warnings # warning WARN_DATA_TRUNCATED -update t1 set _id = 10 where c1 = 1; -select * from t1; -set sql_mode="strict_all_tables"; +UPDATE t1 SET _id = 10 WHERE c1 = 1; +SELECT * FROM t1; +--disable_warnings +SET sql_mode="STRICT_ALL_TABLES"; +--enable_warnings # We can't use WARN_DATA_TRUNCATED here because "WXXX" isn't supported # MySQL 5.5, 5.6 and MariaDB 5.6. MariaDB 10.0 only supports it. # We share this test with all MySQL servers. So we use number here. --error 1265 -update t1 set _id = 11 where c1 = 1; -select * from t1; -drop table t1; +UPDATE t1 SET _id = 11 WHERE c1 = 1; +SELECT * FROM t1; +DROP TABLE t1; + +SET sql_mode=DEFAULT; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test index 2cba585bc2a21a030be194d835aec774500cd57c..83dc25e498914d4188462d8fd735d38c082eb7c5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test index bdd4f915bbff812fad5eb1ce18ad2a65d0c1b6bb..21879480c7d63535e35f92d20422fe6eca964969 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_leading_not.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test index c7f54925382b84cb81a54e5260cd0e8dce2ade13..77c4c1db2b14d66f2bc2d2df11bdf22cfabade3b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_allow_update.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test index b3265d9645b1b9c863844438d5e6b4d31e95bbbd..b312b31ad393c812799728a997b134b664a5c218 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_query.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test index 61613ef2906683b725d5a860daba2268dcc3c950..6509eeee2bf247b98d095d4f4b9879a4a2294340 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_boolean_mode_syntax_flags_syntax_script.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # TODO: Remove the check after MariaDB 5.5.42 and MariaDB 10.0.17 are released. --source ../../include/mroonga/have_mysql.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test index ad934696171a62d4ccd58ff27df14dffa5964697..b7a4b80b6f198b7f2541ed9d3ff9c22e69c058c8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_database_path_prefix.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test index e71dcfe0dda1dfc867edf80d6126ac14ee16bfb4..83138aee0ec308b03765413508049f23e617e33c 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_new_value.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test index 4cfbe489b901297170e1e99c42c51544851ac547..41aac1a146fe83c8a32983b1f646c5cbe534b140 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_parser_same_value.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test new file mode 100644 index 0000000000000000000000000000000000000000..4c518b28e9f9fa801146b1abd540d9f785a4dc1d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_new_value.test @@ -0,0 +1,25 @@ +# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014 Kentoku SHIBA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +SET @mroonga_default_tokenizer_backup = @@mroonga_default_tokenizer; +SET GLOBAL mroonga_default_tokenizer = "TokenBigramSplitAlpha"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; +SET GLOBAL mroonga_default_tokenizer = @mroonga_default_tokenizer_backup; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test new file mode 100644 index 0000000000000000000000000000000000000000..ebd08460b3c1776780d963ea14fc77c5a0c61dc0 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_default_tokenizer_same_value.test @@ -0,0 +1,22 @@ +# Copyright(C) 2014 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mroonga.inc + +SET GLOBAL mroonga_default_tokenizer = "TokenBigram"; +SHOW GLOBAL VARIABLES LIKE 'mroonga_default_tokenizer'; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test index de97096e5a490ed21325ccaa6f83ac636e9813c1..767ce3f9286528b3582e7b27009ce5341bd93f02 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start groonga!"); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test index b52385793d282702c9ae51febc0918aa738aac5c..4ad242dd59df84a8407f7c52f65b88d3f612e3d9 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_insert.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start groonga!"); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test index 47c24421586160efb97e86c3c138f50f8e695479..66f82a5c05290e7878cf0c425b197ea867393f6e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_dry_write_update.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -25,7 +25,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8; -show create table diaries; insert into diaries (body) values ("will start groonga!"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..ad2b8167d814fbe6f73f4f2dc0ca79b6697f486c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test @@ -0,0 +1,50 @@ +# Copyright(C) 2017 Naoya Murakami +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings + +CREATE TABLE diaries ( + title TEXT +) DEFAULT CHARSET=utf8; + +SELECT mroonga_command('truncate mroonga_operations'); +INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +SELECT mroonga_command('select mroonga_operations --output_columns _id'); + +SET GLOBAL mroonga_enable_operations_recording = false; +FLUSH TABLES; + +SELECT mroonga_command('truncate mroonga_operations'); +INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +SELECT mroonga_command('select mroonga_operations --output_columns _id'); + +DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); + +SET GLOBAL mroonga_enable_operations_recording = default; +FLUSH TABLES; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test index 3e2c5bfe7bf11199e9abc09668446ab3f7b2f80d..a3720f2ef5b355028f17b86017a0cc22dffd6fed 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_disable.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,17 +12,17 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_100_or_later.inc +--source ../../include/mroonga/have_version_10_0_or_later.inc --source ../../include/mroonga/have_mroonga.inc SET GLOBAL mroonga_lock_timeout = -1; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test index 7358389bb5d2b98f9682c5292cfccca68f51b2d6..54c834d7e4c7647cd82b3bb2dd7d19b89e430aac 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_invalid.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,17 +12,17 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ---source ../../include/mroonga/have_version_100_or_later.inc +--source ../../include/mroonga/have_version_10_0_or_later.inc --source ../../include/mroonga/have_mroonga.inc SET GLOBAL mroonga_lock_timeout = -2; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test index c25d1747b1de824eb737937b28e37f920356d48d..60e468bf0a6eb818876f4f08ca5bd617c91aa46e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_no_retry.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,8 +20,8 @@ SET GLOBAL mroonga_lock_timeout = 0; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test index 523baa1b3e932a8b23e1411c7f1b23310ce4a1c7..4b490b8a74da87b02b8d5b21551aac8b6b5ac39e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_lock_timeout_valid.test @@ -1,4 +1,4 @@ -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,8 +20,8 @@ SET GLOBAL mroonga_lock_timeout = 1000; SHOW GLOBAL VARIABLES LIKE "mroonga_lock_timeout"; -disable_query_log; -SET GLOBAL mroonga_lock_timeout = 10000000; -enable_query_log; +--disable_query_log +SET GLOBAL mroonga_lock_timeout = DEFAULT; +--enable_query_log --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test index c96b021be7652077e6d2adae927f5374277ffa7d..07a4afbe76e8a066fa7d853fc3663ac1e6c84668 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_new_value.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test index d05cbd2349a5bac873d3ce2a8e117dabed151094..13c544b95a57752f8edbe94e06f0902b700a2c3e 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_nonexistent_path.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test index ead099e0cc16e301448a98a824f30fbb56113159..e2cda37b79b391cbc1fd168917b32964d55d2c1a 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_file_same_value.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test index 1f73f4f447f9d64f1a158ea34f89397acb279375..2cf196f49ca03344d80d8de8674c4e1cf39d6462 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_log_level_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test index 8585c1c2f117758fe2ab5c177b322e10aff42ae9..fda1f8768f61f7898b75a6c120d024eec6d886e8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_global.test @@ -1,4 +1,4 @@ -# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -20,7 +20,7 @@ DROP TABLE IF EXISTS diaries; --enable_warnings -# MySQL <= 5.5 reports wrong a warning. :< +# MySQL <= 5.5 reports a wrong warning. :< # It has been fixed in MySQL >= 5.6 and MariaDB >= 5.3. --disable_warnings SET GLOBAL mroonga_match_escalation_threshold = -1; @@ -30,24 +30,31 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); -INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello Groonga!", "groonga install"); +INSERT INTO diaries (title, tags) VALUES ("Hello Mroonga!", "mroonga install"); +disable_query_log; +CONNECT (new_connection, localhost, root, ,); +CONNECTION new_connection; +enable_query_log; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+install" IN BOOLEAN MODE); -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); SET GLOBAL mroonga_match_escalation_threshold = 0; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); SET mroonga_match_escalation_threshold = 0; -SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); +SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("+gr" IN BOOLEAN MODE); +disable_query_log; +CONNECTION default; +DISCONNECT new_connection; +enable_query_log; DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test index 8743c3faadb9072b97be1527d6f466bd63ae3716..0a7d192f76f1811d7562d14ba3fbd1d19e76c68f 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_match_escalation_threshold_session.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -24,9 +24,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test index 043d8d3340bedfe2b4372114e00147a043b6398d..9ce8cf8bae79f82932704a3dd6fad32aa09bb735 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_global.test @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -38,13 +39,17 @@ INSERT INTO ids VALUES (10); SET GLOBAL mroonga_max_n_records_for_estimate = 1; +disable_query_log; CONNECT (new_connection, localhost, root, ,); CONNECTION new_connection; +enable_query_log; EXPLAIN SELECT * FROM ids WHERE id > 5; +disable_query_log; CONNECTION default; DISCONNECT new_connection; +enable_query_log; SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test new file mode 100644 index 0000000000000000000000000000000000000000..757a7f9590dbdd8439e53a8caf196708464cff90 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_global.test @@ -0,0 +1,60 @@ +# Copyright(C) 2015-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=UTF8; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +INSERT INTO ids VALUES (4); +INSERT INTO ids VALUES (5); +INSERT INTO ids VALUES (6); +INSERT INTO ids VALUES (7); +INSERT INTO ids VALUES (8); +INSERT INTO ids VALUES (9); +INSERT INTO ids VALUES (10); + + +SET GLOBAL mroonga_max_n_records_for_estimate = 1; + +disable_query_log; +CONNECT (new_connection, localhost, root, ,); +CONNECTION new_connection; +enable_query_log; + +EXPLAIN SELECT * FROM ids WHERE id > 5; + +disable_query_log; +CONNECTION default; +DISCONNECT new_connection; +enable_query_log; + +SET GLOBAL mroonga_max_n_records_for_estimate = DEFAULT; + + +DROP TABLE ids; + + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.test new file mode 100644 index 0000000000000000000000000000000000000000..df9f498632e9c1dd0f7f6fa76fe8d8da5b2698a3 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_not_found_in_limit.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + INDEX (id) +) DEFAULT CHARSET=UTF8; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +DELETE FROM ids WHERE id < 2; + +SET mroonga_max_n_records_for_estimate = 1; + +EXPLAIN SELECT * FROM ids WHERE id > 0; + +SET mroonga_max_n_records_for_estimate = DEFAULT; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test new file mode 100644 index 0000000000000000000000000000000000000000..19b4b2836b16588c505bbc1a7cbee6859190189f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_mysql_5_7_or_later_session.test @@ -0,0 +1,47 @@ +# Copyright(C) 2015-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=UTF8; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +INSERT INTO ids VALUES (4); +INSERT INTO ids VALUES (5); +INSERT INTO ids VALUES (6); +INSERT INTO ids VALUES (7); +INSERT INTO ids VALUES (8); +INSERT INTO ids VALUES (9); +INSERT INTO ids VALUES (10); + +SET mroonga_max_n_records_for_estimate = 1; + +EXPLAIN SELECT * FROM ids WHERE id > 5; + +SET mroonga_max_n_records_for_estimate = DEFAULT; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test new file mode 100644 index 0000000000000000000000000000000000000000..0b9357e06c052956d47f49d63a50ac1b0390dcdc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_not_found_in_limit.test @@ -0,0 +1,43 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id INT, + INDEX (id) +) DEFAULT CHARSET=UTF8; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +DELETE FROM ids WHERE id < 2; + +SET mroonga_max_n_records_for_estimate = 1; + +EXPLAIN SELECT * FROM ids WHERE id > 0; + +SET mroonga_max_n_records_for_estimate = DEFAULT; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test index 894e14f48023586a5526dd7c7c618bbcad54c82e..5e31c8b0d63b8be230b2891ce917f2c1c4ef5b01 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_max_n_records_for_estimate_session.test @@ -1,4 +1,4 @@ -# Copyright(C) 2015 Kouhei Sutou +# Copyright(C) 2015-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test new file mode 100644 index 0000000000000000000000000000000000000000..912c2e2bf7d35c6cd95ff5c0f7fd2c3a3f8101bf --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test @@ -0,0 +1,32 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test new file mode 100644 index 0000000000000000000000000000000000000000..a63f4f75a74d67033c735b6f0ad8457f1ac6a4f6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test @@ -0,0 +1,32 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test new file mode 100644 index 0000000000000000000000000000000000000000..e37b163b5c51019bb46458d2b67401d6b2d7e015 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test @@ -0,0 +1,34 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = ""; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test new file mode 100644 index 0000000000000000000000000000000000000000..2df00d6a46c03c24ac23e26c28bedbe7411e0b4a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test @@ -0,0 +1,34 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = NULL; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test new file mode 100644 index 0000000000000000000000000000000000000000..a3a7dc9b086480789959bb5586b0c2baae6605e5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test @@ -0,0 +1,34 @@ +# Copyright(C) 2012 Kouhei Sutou +# Copyright(C) 2014 Kentoku SHIBA +# Copyright(C) 2017 Kentaro Hayashi +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test new file mode 100644 index 0000000000000000000000000000000000000000..66024f5cf0078186b2aaa69bc055cb0f86042471 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test @@ -0,0 +1,35 @@ +# Copyright(C) 2014-2017 Kouhei Sutou +# Copyright(C) 2017 Kentaro Hayashi +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/have_mroonga_helper.inc + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; + +SET GLOBAL mroonga_log_file = "groonga-query-log.log"; + +SET GLOBAL mroonga_query_log_file = "groonga-query.log"; +SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file"; +--exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log + +SET GLOBAL mroonga_query_log_file = DEFAULT; +SET GLOBAL mroonga_log_file = DEFAULT; + +--remove_file $MYSQLD_DATADIR/groonga-query-log.log + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test index d2ae3fd87180706e6800ed148f87d9d93b42e377..f1fe11864d91cb10c11270b83d503a9903466089 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_vector_column_delimiter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test index 6c21f8d50d778ce2476265618aeb91aefbdf8547..2bd4496a2de22c92d6a4510961a243709a945bae 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_version.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result index 22dbbff96ac195088f27b6beee177ca10539d516..2be9834c61778d2c6279ce3f07aa590280b95afb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column.result @@ -3,13 +3,6 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; id title @@ -26,12 +19,4 @@ id title body 1 survey will start groonga! 2 groonga (1) starting groonga... 3 groonga (2) started groonga. -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result new file mode 100644 index 0000000000000000000000000000000000000000..9628df686b307a7faf54a66694c9b4d90dbf3dc7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_cp932.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; +ALTER TABLE users +ADD COLUMN –¼‘O text, +ADD FULLTEXT INDEX (–¼‘O); +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); +SELECT * FROM users; +id –¼‘O +1 ‚â‚Ü‚¾ +2 ‚½‚È‚© +3 ‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +id –¼‘O +2 ‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result new file mode 100644 index 0000000000000000000000000000000000000000..abd2271f05124ca7f66fe3f50ad3324e59d16a85 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_add_column_multibyte_utf8.result @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; +ALTER TABLE users +ADD COLUMN åå‰ text, +ADD FULLTEXT INDEX (åå‰); +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); +SELECT * FROM users; +id åå‰ +1 ã‚„ã¾ã  +2 ãŸãªã‹ +3 ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +id åå‰ +2 ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result index e5ce4692aa3ff2b1ab2f507fbb00fdd4775b77c7..7197d3a9dc051d5c9af6256cb99991e94ce0ea2d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_change_engine.result @@ -6,16 +6,11 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SELECT table_name, engine, table_comment +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine table_comment +diaries MyISAM INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); SELECT * FROM diaries @@ -24,16 +19,11 @@ MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); id title body 1 survey will start groonga! ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' +SELECT table_name, engine, table_comment +FROM information_schema.tables +WHERE table_name = 'diaries'; +table_name engine table_comment +diaries Mroonga ENGINE "InnoDB" SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result index 1106fcffca2ebc371cfbfb0b8399d5e3df2fc41a..05bd0e4e1e0a1e26c7287c5eea241c1f8ad6afde 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_comment_change_engine.result @@ -6,28 +6,15 @@ title VARCHAR(64), content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(64) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"' INSERT INTO memos (title, content) VALUES ("Hello", "I start to write memos!"); INSERT INTO memos (title, content) VALUES ("groonga", "I start to use groonga!"); INSERT INTO memos (title, content) VALUES ("mroonga", "I use mroonga too!"); ALTER TABLE memos COMMENT='engine "MyISAM"'; -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(64) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='engine "MyISAM"' +SELECT table_name, table_comment +FROM information_schema.tables +WHERE table_name = 'memos'; +table_name table_comment +memos engine "MyISAM" SELECT * FROM memos; id title content 1 Hello I start to write memos! diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result index 07c149a8fa8fff8c5a440d1c40bb72b139cf31d1..25cb53ded0bfb9a9bfa10b6f0f48ae0c6eea7fa4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_drop_column.result @@ -4,26 +4,11 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, body TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; id title body 1 survey will start groonga! ALTER TABLE diaries DROP COLUMN body; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' SELECT * FROM diaries; id title 1 survey diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result index cc64daac30a4723f70da8c016e624a0248128ae3..37f03b40616327d7dc5e940b6a97bb13b4f28467 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_fulltext.result @@ -4,14 +4,6 @@ id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, FULLTEXT INDEX title_index (title) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; id title @@ -39,14 +31,4 @@ WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); id title body 2 groonga (1) starting groonga... -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' DROP TABLE diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result index 08e526baa508a2bbc7257d6418ec65617601694d..bfbe96d14d71e600e4a1626e479c690d8530e1c4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_rename_table.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; id title body @@ -32,14 +22,4 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); id title body -SHOW CREATE TABLE memos; -Table Create Table -memos CREATE TABLE `memos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result index 0e2f4c3bcca25a3d10f89507d4a254f1909f4a99..fa42d4a1fd39fcb18c5d3070756d80f58b22285e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/alter_table_spatial.result @@ -119,13 +119,4 @@ id name location_text 14 tetsuji POINT(139.76857 35.680912) 19 daruma POINT(139.770599 35.681461) 26 kazuya POINT(139.760895 35.673508) -SHOW CREATE TABLE shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 COMMENT='ENGINE "InnoDB"' DROP TABLE shops; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result new file mode 100644 index 0000000000000000000000000000000000000000..61122f7842fe4c04c6ea0f45120411e190b706d7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/check_table_for_upgrade.result @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id int NOT NULL PRIMARY KEY, +content text, +FULLTEXT INDEX (content) +) COMMENT='engine "InnoDB"'; +INSERT INTO memos VALUES (1, 'Hello MySQL'); +INSERT INTO memos VALUES (2, 'Hello Mroonga'); +CHECK TABLE memos FOR UPGRADE; +Table Op Msg_type Msg_text +test.memos check status OK +FLUSH TABLES; +SELECT * FROM memos +WHERE MATCH(content) AGAINST('+mroonga' IN BOOLEAN MODE); +id content +2 Hello Mroonga +DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result new file mode 100644 index 0000000000000000000000000000000000000000..5b379d08e3aeee177fd528868cfeceffd45bbdbb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result new file mode 100644 index 0000000000000000000000000000000000000000..24c9275b5e70d88402a633d246607d0868cfe4da --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result new file mode 100644 index 0000000000000000000000000000000000000000..65a55204a32e6a44020f8c0a6ff73f4b385b20f7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_drop_column.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..febfd34345be75e5c6f203b2e2371fd86fb0eb46 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result new file mode 100644 index 0000000000000000000000000000000000000000..c0d9452f15e2c504de58ec43c459daa5b39b92f5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_reindex.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result new file mode 100644 index 0000000000000000000000000000000000000000..ae9c244d8807f10d7f72e4f7b2278b39306e07bd --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_stored_update.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, +FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "shutdown"} "shutdown" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result new file mode 100644 index 0000000000000000000000000000000000000000..6daeb5e2f318080cd7c9e5e672725620da41fb20 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_column.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result new file mode 100644 index 0000000000000000000000000000000000000000..82a46e3fcfc6319fe0e39bc4c921c64381d1710c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_fulltext_index.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) +VALUES (1, '{"level": "info", "message": "start server"}'); +ALTER TABLE logs ADD FULLTEXT INDEX (message); +INSERT INTO logs(id, record) +VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) +VALUES (3, '{"level": "warn", "message": "abort server"}'); +SELECT * FROM logs WHERE MATCH(message) AGAINST('+start' IN BOOLEAN MODE); +id record message +2 {"level": "info", "message": "start server"} "start server" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result new file mode 100644 index 0000000000000000000000000000000000000000..09cd18915f8ef4660e4b41754ab35120a6b88e53 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_add_index.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +level VARCHAR(255) GENERATED ALWAYS AS +(json_unquote(json_extract(`record`, '$.level'))) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) +VALUES (1, '{"level": "info", "message": "start server"}'); +ALTER TABLE logs ADD INDEX (level); +INSERT INTO logs(id, record) +VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) +VALUES (3, '{"level": "warn", "message": "abort server"}'); +SELECT * FROM logs WHERE level = 'info'; +id record level +1 {"level": "info", "message": "start server"} info +2 {"level": "info", "message": "start server"} info +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result new file mode 100644 index 0000000000000000000000000000000000000000..8c1ceaf13dd123bd9cbac245305992e9c5486f7d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_delete.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +DELETE FROM logs WHERE id = 1; +SELECT * FROM logs; +id record message +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result new file mode 100644 index 0000000000000000000000000000000000000000..7d3226175ea3fdb2430ba00645b3debdcdd17170 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_drop_column.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +ALTER TABLE logs DROP COLUMN message; +SELECT * FROM logs; +id record +1 {"level": "info", "message": "start"} +2 {"level": "info", "message": "restart"} +3 {"level": "warn", "message": "abort"} +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result new file mode 100644 index 0000000000000000000000000000000000000000..5a0e63ed7c490dd3b37f68f73b0cf67f4d4414a7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_insert.result @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "restart"} "restart" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result new file mode 100644 index 0000000000000000000000000000000000000000..2411f7a725ce5909c95761aff9f753dbe457adeb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_generated_virtual_update.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS logs; +CREATE TABLE logs ( +id INT PRIMARY KEY, +record JSON, +message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; +SELECT * FROM logs; +id record message +1 {"level": "info", "message": "start"} "start" +2 {"level": "info", "message": "shutdown"} "shutdown" +3 {"level": "warn", "message": "abort"} "abort" +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result new file mode 100644 index 0000000000000000000000000000000000000000..38185f5ec97ee5effed55fe8b40390a844e065bc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_cp932.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES cp932; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT, +–¼‘O text, +FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); +SELECT * FROM users; +id –¼‘O +1 ‚â‚Ü‚¾ +2 ‚½‚È‚© +3 ‚·‚¸‚« +SELECT * FROM users +WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); +id –¼‘O +2 ‚½‚È‚© +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result new file mode 100644 index 0000000000000000000000000000000000000000..2d31307392f322d082f63a81c4a1bfcedf78d54b --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/column_multibyte_utf8.result @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS users; +SET NAMES utf8; +CREATE TABLE users ( +id int unsigned PRIMARY KEY AUTO_INCREMENT, +åå‰ text, +FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); +SELECT * FROM users; +id åå‰ +1 ã‚„ã¾ã  +2 ãŸãªã‹ +3 ã™ãšã +SELECT * FROM users +WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); +id åå‰ +2 ãŸãªã‹ +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); +mroonga_command("dump --dump_plugins no --dump_records no") +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +table_create users TABLE_HASH_KEY ShortText + +table_create users#@540d@524d TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI + +column_create users#@540d@524d index COLUMN_INDEX|WITH_POSITION users +DROP TABLE users; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result new file mode 100644 index 0000000000000000000000000000000000000000..7822d118733a41a4f20b2c89d1c213b55e09b770 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS ids; +CREATE TABLE ids ( +id int PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); +SELECT COUNT(*) FROM ids; +COUNT(*) +3 +DROP TABLE ids; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result new file mode 100644 index 0000000000000000000000000000000000000000..141117f608a42f81813567aff0823cc52cb0114f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_mysql_5_7_or_later_with_index.result @@ -0,0 +1,30 @@ +CREATE TABLE diaries_innodb ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT, +flag TINYINT(2), +INDEX (flag) +) ENGINE = InnoDB DEFAULT CHARSET UTF8; +CREATE TABLE diaries_mroonga ( +id INT PRIMARY KEY AUTO_INCREMENT, +body TEXT, +flag TINYINT(2), +INDEX (flag) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; +INSERT INTO diaries_innodb (body) VALUES ("will start groonga!"); +INSERT INTO diaries_innodb (body) VALUES ("starting groonga..."); +INSERT INTO diaries_innodb (body) VALUES ("started groonga."); +INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); +INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); +INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); +EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE diaries_innodb NULL index NULL flag 2 NULL 3 100.00 Using index +Warnings: +Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`diaries_innodb` +EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE diaries_mroonga NULL index NULL flag 2 NULL 3 100.00 Using index +Warnings: +Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`diaries_mroonga` +DROP TABLE diaries_innodb; +DROP TABLE diaries_mroonga; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result index a6d2f7862af643116b6f073a86ae45adefc9982c..1ebd0ba870ea5b99550e1bfd66d093c5e72b0369 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/count_star_with_index.result @@ -18,9 +18,9 @@ INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); EXPLAIN SELECT COUNT(*) FROM diaries_innodb; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE diaries_innodb index NULL flag 2 NULL 3 Using index +1 SIMPLE diaries_innodb index NULL flag 2 NULL # Using index EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE diaries_mroonga index NULL flag 2 NULL 3 Using index +1 SIMPLE diaries_mroonga index NULL flag 2 NULL # Using index DROP TABLE diaries_innodb; DROP TABLE diaries_mroonga; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result index ce1b5470231f7d9ce280080891a3d31386a1e88b..3610ab6f556597d22d34b8985229abc7131fcee1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_comment_combined.result @@ -3,10 +3,12 @@ CREATE TABLE bugs ( id INT UNSIGNED PRIMARY KEY ) DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"'; -SHOW CREATE TABLE bugs; -Table Create Table -bugs CREATE TABLE `bugs` ( - `id` int(10) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"' +SELECT mroonga_command("dump --dump_plugins no"); +mroonga_command("dump --dump_plugins no") +table_create bugs TABLE_HASH_KEY ShortText + +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result index fb03bfe8d8d266e89a28e83522d88aea6408fd88..6ff4c105384e47bc4b1695a4f582b38f57a2c818 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_comment.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'flags "WITH_POSITION|WITH_WEIGHT"' ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos +column_create memos#content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result index 4a7107146cec1377aefde88d3980409cd8e06e67..9048b677a2fdb3eeeb10068b35993fdbd89cd02f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_none.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'flags "NONE"' ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX memos +column_create memos#content index COLUMN_INDEX memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result index 6e00526c7364d5e7d10bf18cd0c2c0bb3d32c438..1c701d0eb8f7ac611c9ce15a77760ee945cb7753 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_flags_parameter.result @@ -12,5 +12,5 @@ memos CREATE TABLE `memos` ( ) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos +column_create memos#content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result index 08bdd72ee039c5a78212a21cb226c6234ae12c52..e378ba3b7ba97378112cd0a62ea361bf7ecc8dcb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_none.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"' ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX memos +column_create memos#content index COLUMN_INDEX memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result index a5ac716d38e974048372c797aeda402a9eb4230b..1367a3adbb903a6b1f73d58e4de30f507ad82b88 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_index_flags_with_position_and_with_weight.result @@ -5,5 +5,5 @@ FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"' ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; SELECT mroonga_command("dump --dump_plugins no --dump_schema no"); mroonga_command("dump --dump_plugins no --dump_schema no") -column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos +column_create memos#content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index_bin.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index_bin.result new file mode 100644 index 0000000000000000000000000000000000000000..5230963af7927d32aa70be7d99329a4022200cca --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_normalizer_fulltext_index_bin.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS memos; +SET NAMES utf8; +CREATE TABLE memos ( +id INT NOT NULL PRIMARY KEY, +content TEXT NOT NULL, +FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +SHOW CREATE TABLE memos; +Table Create Table +memos CREATE TABLE `memos` ( + `id` int(11) NOT NULL, + `content` text COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`), + FULLTEXT KEY `content` (`content`) COMMENT 'normalizer "NormalizerAuto"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='ENGINE "InnoDB"' +INSERT INTO memos VALUES (1, "1æ—¥ã®æ¶ˆè²»ãŒã¯ç´„2000㌔ãŒ"); +SELECT * FROM memos +WHERE MATCH (content) AGAINST ("+カロリー" IN BOOLEAN MODE); +id content +1 1æ—¥ã®æ¶ˆè²»ãŒã¯ç´„2000㌔㌠+DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result index 7ee07329f218b1ed0889ddc06a2ecbacc12d3097..4d9d20dc8abcde6c04cc6d32891a7986c3d1b690 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_parser_comment.result @@ -5,15 +5,11 @@ body text, fulltext index body_index (body) comment 'parser "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'parser "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead insert into diaries (body) values ("will start Groonga!"); +Warnings: +Warning 1287 'parser' is deprecated and will be removed in a future release. Please use tokenizer instead insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result index e1e32dccc37de934c505057d653d94a91eb4e193..7f4885fb0dafbd5394d8809841661c463955884e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_multiple_token_filters.result @@ -11,7 +11,12 @@ SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") table_create memos TABLE_HASH_KEY ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result index 11ee04e299828adc6d17b547f18de228deb28002..2d7c67489e65a25b948cfd68a762d11f4ddbe34d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_one_token_filter.result @@ -11,7 +11,12 @@ SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") table_create memos TABLE_HASH_KEY ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result index f6d6be1b643c0906578932046fec57d85e14473c..4626d1443f82c56d82f5ccaeb902172b0138835f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_token_filters_index_parameter.result @@ -19,7 +19,12 @@ SELECT mroonga_command("dump --dump_plugins no"); mroonga_command("dump --dump_plugins no") table_create memos TABLE_HASH_KEY ShortText -table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord +table_create memos#content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI --token_filters TokenFilterStopWord,TokenFilterStopWord -column_create memos-content index COLUMN_INDEX|WITH_POSITION memos +table_create mroonga_operations TABLE_NO_KEY +column_create mroonga_operations record COLUMN_SCALAR UInt32 +column_create mroonga_operations table COLUMN_SCALAR ShortText +column_create mroonga_operations type COLUMN_SCALAR ShortText + +column_create memos#content index COLUMN_INDEX|WITH_POSITION memos DROP TABLE memos; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result index f6e15804f42868b8ae8edad4a4f165be0243c55f..34e3f88dbadfbb96b2c425bfb8dc8dbccf22b7ca 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_comment.result @@ -5,14 +5,6 @@ body text, fulltext index body_index (body) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) COMMENT 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result index ddec8fdadbe9bb6b4cdf184d717f3ac276339781..219d8e08deb3a06ce879f8ea29710f99e07232f4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/create_table_tokenizer_parameter.result @@ -4,14 +4,6 @@ id int PRIMARY KEY AUTO_INCREMENT, body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) `TOKENIZER`='TokenBigramSplitSymbolAlphaDigit' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); INSERT INTO diaries (body) VALUES ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result new file mode 100644 index 0000000000000000000000000000000000000000..f7d5b439b6936c6093d3d1891da3abd25fed1e2c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/drop_table_new_connection.result @@ -0,0 +1,13 @@ +CREATE TABLE logs ( +id INT PRIMARY KEY AUTO_INCREMENT, +message TEXT, +FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +USE test; +DROP TABLE logs; +CREATE TABLE logs ( +id INT PRIMARY KEY AUTO_INCREMENT, +message TEXT, +FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; +DROP TABLE logs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result index 08c37695f5a23ad0deebea8c4ab64de57116cbd4..8614eaa73f83be3d10223c57770f69251fdfbcbb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_leading_not.result @@ -6,15 +6,6 @@ title VARCHAR(255), content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result index b0bff284532c95d2acab89af9026061494f374f1..1ecf18cb13160cafbea46969189debb9e6933c51 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_boolean_mode_multiple_match_against.result @@ -7,16 +7,6 @@ content TEXT, FULLTEXT INDEX (title), FULLTEXT INDEX (content) ) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries VALUES(1, "富士山", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気 1月1日", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, "天気 4月4日", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result index fd07ea679646bacb6c809d867fd89df15b55cdaf..d3bdfca0def3558dc0e8f66e7811146662f3bb21 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_index_recreate.result @@ -6,15 +6,6 @@ title varchar(255), content text, FULLTEXT INDEX (title) ) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries VALUES (1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES (2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES (3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result index 7391ee4ba8dd25e6958b05b71750d0bff781dfcf..c25b47c6bde3a7c8491ea29e16df376ba305b90d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_select.result @@ -6,7 +6,11 @@ insert into t1 values (2, "ka ki ku ke ko"); insert into t1 values (3, "aa ii ii ii oo"); insert into t1 values (4, "sa si su se so"); insert into t1 values (5, "ta ti ii ii to"); -insert into t2 (c1,c2) select c1,c2 from t1; +insert into t2 values (1, "aa ii uu ee oo"); +insert into t2 values (2, "ka ki ku ke ko"); +insert into t2 values (3, "aa ii ii ii oo"); +insert into t2 values (4, "sa si su se so"); +insert into t2 values (5, "ta ti ii ii to"); select * from t1; c1 c2 1 aa ii uu ee oo diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result index 8e1b0845e850601ceea0424bda41f8c079e8dcd2..f4719cbdd95f8f93dc25fdbe4c22649438c0302b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_insert_values.result @@ -1,13 +1,5 @@ drop table if exists t1, t2, t3; create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "innodb"'; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` text, - PRIMARY KEY (`c1`), - FULLTEXT KEY `ft` (`c2`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result index 03cf96b55f845387fbd3961332a4c21f85de3ec4..9d1e838b8933ac0c0213886d781c983c0c6977f1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_many_records.result @@ -5,14 +5,6 @@ id int primary key, title varchar(255), fulltext index (title) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' set autocommit=0; insert into diaries values(0, "2011-07-14"); insert into diaries values(1, "2011-07-15"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result index 81ce556e74574c28270ebce4f604eb44bd2e0dc2..39ab80edf3bfeafcb39d7dbc8a8afdc30da95402 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_matched_and_not_matched_have_where_no_order.result @@ -10,15 +10,18 @@ FULLTEXT KEY (not_matched) INSERT INTO texts VALUES (1, 'Hello1', 'World1'); INSERT INTO texts VALUES (2, 'Hello2', 'World2'); INSERT INTO texts VALUES (3, 'Hello3', 'World3'); -SELECT id, +SELECT * +FROM (SELECT id, matched, not_matched, MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE), MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) FROM texts -WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE); +WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE)) +AS searched_texts +ORDER BY id; id matched not_matched MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE) MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) 1 Hello1 World1 1 0 -3 Hello3 World3 1 0 2 Hello2 World2 1 0 +3 Hello3 World3 1 0 DROP TABLE texts; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result index 64acf4aaeae8e37777686af0b37d8f43abeac890..fbdf241b81e757125da88879a875924a57afd64f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_delete.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result index c1661d7fcbfb840df4e0877009b29c6b61066277..074d1991505634e76ac115ea259b08c97bd62e9d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_insert.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result index 604aca172a574f5065f7a8d2f4bcee1570e102ea..756a702171a79fccdf992eac5b655063b21ab84b 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_recreate.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result index 6f489bf37cc501f37d7f96bc410e9d3b3417402f..db869eaa697b8547f8a2950b011fb67bd2dc4377 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_column_index_update.result @@ -8,17 +8,6 @@ fulltext index (title, content), fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title` (`title`,`content`), - FULLTEXT KEY `title_2` (`title`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result index d9448ee82bafea04eb56205a5bc97d67a9d8eb56..7121e5109d39acb0cb494554ca07acfe61d23abf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_multiple_index.result @@ -6,16 +6,6 @@ body text, fulltext index title_index (title), fulltext index body_index (body) ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (title, body) values ("survey", "will start groonga!"); insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); insert into diaries (title, body) values ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result index 860c8e548a8abbf210f6795bbd2fda3278652f0c..90376bdf156adcb3e1952ca7070e7b612b0680aa 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_myisam.result @@ -1,13 +1,5 @@ drop table if exists t1, t2, t3; create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "myisam"'; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` text, - PRIMARY KEY (`c1`), - FULLTEXT KEY `ft` (`c2`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "myisam"' insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result index 74d7426ebc15ca91367b0461156771d38ac495bc..f79798cec6de0add04c9c88c2f7b73551af92dd1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_TODO_SPLIT_ME.result @@ -1,23 +1,13 @@ DROP TABLE IF EXISTS diaries; SET NAMES UTF8; CREATE TABLE ft( -a INT, +a INT DEFAULT 0, b TEXT, c TEXT, PRIMARY KEY(a), FULLTEXT KEY ftx1(b), FULLTEXT KEY ftx2(c) )ENGINE=Mroonga DEFAULT CHARSET=UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE ft; -Table Create Table -ft CREATE TABLE `ft` ( - `a` int(11) NOT NULL, - `b` text, - `c` text, - PRIMARY KEY (`a`), - FULLTEXT KEY `ftx1` (`b`), - FULLTEXT KEY `ftx2` (`c`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' INSERT INTO ft VALUES(1,'aaaaa','abcde'); INSERT INTO ft VALUES(2,'bbbbb','bcdef'); INSERT INTO ft VALUES(3,'ccccc','cdefg'); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result index 3da64b2de1f730e3b489a8b39491532249fb4b54..3ee15c63bfd70b0503c22cb0c8c3e5ed32336985 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/fulltext_order_transaction.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' START TRANSACTION; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result index b3f5bee27d77a5800ea73ac47cb939f8ac0c60d6..550554eac8ca3447f504444a05336d121d069048 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_contains.result @@ -5,15 +5,6 @@ name text, location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into shops (name, location) values ('nezu-no-taiyaki', ST_GeomFromText('POINT(139.762573 35.720253)')); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result index 28b981f9c7b13a2cda8b41d76471aae787200bce..615d185f79f0edb15fdf65b2643ae5cc7537a8f4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_delete.result @@ -5,15 +5,6 @@ name text, location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into shops (name, location) values ('sazare', ST_GeomFromText('POINT(139.685043 35.714653)')); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result index 20de4a32cfaf219eff68e4546617588658ff8756..adfb53e10a202ea8065e6162066269e12b0ab97d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/geometry_update.result @@ -5,15 +5,6 @@ name text, location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; -Table Create Table -shops CREATE TABLE `shops` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` text, - `location` geometry NOT NULL, - PRIMARY KEY (`id`), - SPATIAL KEY `location_index` (`location`) -) ENGINE=Mroonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' insert into shops (name, location) values ('sazare', ST_GeomFromText('POINT(139.685043 35.714653)')); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result index be61419477f18969779115ecaf149ab952b3aca2..552cf58682b2080ef9234f401dfe33e6d50406a5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/insert_bulk.result @@ -5,14 +5,6 @@ id int primary key, content text, fulltext index (content) ) default charset utf8 comment = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL, - `content` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' LOCK TABLE diaries WRITE; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result new file mode 100644 index 0000000000000000000000000000000000000000..bf1e67b9378d3d2a110e05aa666e6fef7039896c --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/multi_range_read_mysql_5_7_or_later_disk_sweep.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS integers; +SET optimizer_switch='mrr_cost_based=off'; +CREATE TABLE integers ( +id INT PRIMARY KEY AUTO_INCREMENT, +value INT, +KEY (value) +) COMMENT='engine "InnoDB"'; +INSERT INTO integers (value) VALUES (0), (1), (2), (3); +EXPLAIN SELECT * FROM integers +WHERE value IN (0, 2); +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE integers NULL range value value 5 NULL 2 100.00 Using where; Using MRR +Warnings: +Note 1003 /* select#1 */ select `test`.`integers`.`id` AS `id`,`test`.`integers`.`value` AS `value` from `test`.`integers` where (`test`.`integers`.`value` in (0,2)) +SELECT * FROM integers +WHERE value IN (0, 2); +id value +1 0 +3 2 +DROP TABLE integers; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result index e330fa18c894af6ee0427f8ede0ab9e755eb954b..8258a03bf42c19a3353436f55fd27949c1ff0fa2 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_files.result @@ -6,15 +6,6 @@ title TEXT, body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result index a5012384889c9e032fbbd258a9f01c0ddfd0cd1e..cca7aee95de8a9da1ff0b1c73c20914f1bbf971c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/repair_table_no_index_file.result @@ -6,15 +6,6 @@ title TEXT, body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); @@ -23,7 +14,7 @@ id title body 2 groonga (1) starting groonga... FLUSH TABLES; SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); -ERROR HY000: syscall error 'repair_test.mrn.0000106' (No such file or directory) +ERROR HY000: system call error: No such file or directory: failed to open path: REPAIR TABLE diaries; Table Op Msg_type Msg_text repair_test.diaries repair status OK diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result index b01e85aa483f9db25d16cd93ef3fd22976ad31ea..d66b463d7ed3767cd4b36c0f2a3aa76007b18aac 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/temporary_table.result @@ -3,13 +3,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TEMPORARY TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - PRIMARY KEY (`id`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); INSERT INTO diaries (title) VALUES ("cloudy day"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result index 11cc1874257ad9d96d8c04170b06d9cb30e8de98..9082032ff6e9e51902dae8a0b58692120189353d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_delete.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result index 7dde8518db00816ec0067e15a8c6dbbfec209aca..0a424e77806d5762abacc6451bc2ca546210bad3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/transaction_rollback_delete_update.result @@ -6,16 +6,6 @@ body TEXT, FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `title_index` (`title`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result index d41231ddd3329afe6172ee4860a63039452d0cb3..296f87ade66cb29df41691de988009984287f553 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/truncate.result @@ -10,19 +10,6 @@ content TEXT, FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `year` int(10) unsigned DEFAULT NULL, - `month` int(10) unsigned DEFAULT NULL, - `day` int(10) unsigned DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `content` text, - PRIMARY KEY (`id`), - KEY `day` (`day`), - FULLTEXT KEY `content` (`content`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); INSERT INTO diaries VALUES(3, 2011, 11, 11, "富士山", "今日も天気ãŒã‚ˆãã¦ãれã„ã«è¦‹ãˆã‚‹ã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result index e451b2b99fe42b0f1db7070300ab1818e4a240ab..ccc28a0f4c715994215e68829abed7d3657da2b3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_delete.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start groonga!"); insert into diaries (body) values ("starting groonga..."); insert into diaries (body) values ("started groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result index f11398f3710d93380b209c9b2291fc67f6f0cdc6..a9bdd38fa222a5bdb8b9b25632d04400275ec556 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_insert.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start groonga!"); select * from diaries; id body diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result index 47a844c8e6867575837c514b48c249963fa481af..b2fe4607f8f90d541eeb8684db65f47014f85293 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_dry_write_update.result @@ -4,14 +4,6 @@ id int primary key auto_increment, body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `body` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `body_index` (`body`) -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='engine "innodb"' insert into diaries (body) values ("will start groonga!"); set mroonga_dry_write=true; update diaries set body = "starting groonga..." where id = 1; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result index c98847cb50a8c31f4c90f7dd4273b937204b836e..9405879f4f54a8ea19edc80a9d41ed8844c4813c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_global.result @@ -3,17 +3,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result index 3d94ebc93ad2d11ef65bf7c82aa9c50b39115bcb..fa2da48cc713e4cf0a06a4bd563495bb1bb448d5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result +++ b/storage/mroonga/mysql-test/mroonga/wrapper/r/variable_match_escalation_threshold_session.result @@ -3,17 +3,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, -FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' +FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; -Table Create Table -diaries CREATE TABLE `diaries` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` text, - `tags` text, - PRIMARY KEY (`id`), - FULLTEXT KEY `tags_index` (`tags`) COMMENT 'parser "TokenDelimit"' -) ENGINE=Mroonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"' INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("install" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm index 7e4f8c1776b96caafbbc3ae9ab6cfdb90c769137..528ccc5d69360dcbb111c50c3efa71e79334a642 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm +++ b/storage/mroonga/mysql-test/mroonga/wrapper/suite.pm @@ -5,7 +5,7 @@ package My::Suite::Mroonga; return "No Mroonga engine" unless $ENV{HA_MROONGA_SO} or $::mysqld_variables{'mroonga'} eq "ON"; -sub is_default { not $::opt_embedded_server } +sub is_default { 1 } my $groonga_normalizer_mysql_dir=$::basedir . '/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql'; my $groonga_normalizer_mysql_install_dir=$::basedir . '/lib/groonga/plugins'; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test index bb4d53899090175e37f0006c370872088f231418..a6d25d3f438262e7603f92cd0e8a9efd32e46760 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -26,7 +26,6 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; @@ -39,8 +38,6 @@ INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga..."); INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga."); SELECT * FROM diaries; -SHOW CREATE TABLE diaries; - DROP TABLE diaries; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test new file mode 100644 index 0000000000000000000000000000000000000000..49f65449a4d7f7e5c2c3a34ec5b52e57a1907261 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_cp932.test @@ -0,0 +1,54 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; +ALTER TABLE users + ADD COLUMN –¼‘O text, + ADD FULLTEXT INDEX (–¼‘O); + +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test new file mode 100644 index 0000000000000000000000000000000000000000..bd5c7389bedf034fb3b1b7a9829a7499c6e8b5c9 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_add_column_multibyte_utf8.test @@ -0,0 +1,54 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; +ALTER TABLE users + ADD COLUMN åå‰ text, + ADD FULLTEXT INDEX (åå‰); + +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test index a1d5c28baf1df358cdc95dd2489c48c18f3a1084..dc98dc9c531dcdea2d2e5696db550e430c8a99cd 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_column_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test index e1b657b7ee817c32620d2d64592fac08f602c44f..d466b4466f1cbec9fdc659e6463e98124bd6f679 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_change_engine.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -29,7 +29,9 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) ENGINE MyISAM DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; +SELECT table_name, engine, table_comment + FROM information_schema.tables + WHERE table_name = 'diaries'; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); @@ -38,7 +40,9 @@ SELECT * FROM diaries MATCH(body) AGAINST("groonga" IN BOOLEAN MODE); ALTER TABLE diaries ENGINE = mroonga COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; +SELECT table_name, engine, table_comment + FROM information_schema.tables + WHERE table_name = 'diaries'; SELECT * FROM diaries WHERE MATCH(title) AGAINST("survey" IN BOOLEAN MODE) AND diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test index 645d3dad7b3c823e46545d1668e1689ad4872f5d..ff2b6b47ef1bf5f9eedfa1e08a779f191bfd6e64 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_comment_change_engine.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,14 +28,15 @@ CREATE TABLE memos ( content TEXT, FULLTEXT INDEX(content) ) DEFAULT CHARSET=utf8 COMMENT='engine "InnoDB"'; -SHOW CREATE TABLE memos; INSERT INTO memos (title, content) VALUES ("Hello", "I start to write memos!"); INSERT INTO memos (title, content) VALUES ("groonga", "I start to use groonga!"); INSERT INTO memos (title, content) VALUES ("mroonga", "I use mroonga too!"); ALTER TABLE memos COMMENT='engine "MyISAM"'; -SHOW CREATE TABLE memos; +SELECT table_name, table_comment + FROM information_schema.tables + WHERE table_name = 'memos'; SELECT * FROM memos; SELECT * FROM memos WHERE MATCH(content) AGAINST("start" IN BOOLEAN MODE); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test index 68bf5c9bbe9cb0199723f3030e3383a6b66fd4bf..13344843ebeeafae84fd8a865b9c7b362d74f7c8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_create_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test index 0cd02e1812ab5bd19e4bb904476d7334ddf867b3..7bfd5fe5070913d927eb4695675b704f2605fbca 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test index 217df7a1edb8eac3b691eaf46f808a352e020fab..f05945e1b761c3eb70efa7d47d9f273d3d9533d4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test index ea3ef4f14842e28e9ae35929037c3d44c645b014..f272698c1a836f2123d3e1eb12ea875a426b936c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test index 107f4a9a7553d3d871b2cce5ec9f0e7539495f8e..e1de36d25d1f7b7102a4678f4b28f776d9ffd81e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_primary.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test index 3c63d4a1496836fb47d806fc5fc6425569cf9469..2c994bdcc769923260df9b894fd16f4b0b919697 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test index cc4b79ebf39221c61b9e5e5f5cd7b06ecbd6dae6..01fce22c3f0cf31e9a662fd6bc833c0bda3c1066 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_drop_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -27,13 +27,11 @@ CREATE TABLE diaries ( title TEXT, body TEXT ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; ALTER TABLE diaries DROP COLUMN body; -SHOW CREATE TABLE diaries; SELECT * FROM diaries; INSERT INTO diaries (title) values ("groonga (1)"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test index e92a2e5c7f72deeb1edab18ea60d1df914c294be..bc451c354b1991a7841094140c6ee8683ad1e0e3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test index f5f7e307d5dd3d9422b31b7a1a339c3f5e6c6967..66ee293bff11fdc061ebd3f86eb76a3a820d7dbf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_lock_tables.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test index 587102c3db4ff9f8730185b1d9b3e417c931f189..f364ba3d706931ab66b0ed3a04ffdfc69b2a0e0a 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_multiple_column.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test index 2f28eef1574d6811c48da69ef6f833f87cfb7ade..7b72b113c790fe2409262cac23d3c3e7195fe13d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_normal.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test index aaff5f90b7400039fa8b729f7ebb4e293498f7c6..25cdc13ac3599109c44c9f1e73d6da8140f3db9a 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_enable_keys_primary.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test index 62e56899aad838da5dd2c8cf7d07c6bdb7c45037..671b96172319442d6e54c416a2cde197e1269b78 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_fulltext.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( title TEXT, FULLTEXT INDEX title_index (title) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("survey"); SELECT * FROM diaries; @@ -50,8 +49,6 @@ SELECT * FROM diaries WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); -SHOW CREATE TABLE diaries; - DROP TABLE diaries; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test index c84e86594ca0a714bd5745ee3900c644f7ec4081..288e5cdc0de610a512b42aad3ac80b9b840cf917 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_rename_table.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) DEFAULT CHARSET UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); SELECT * FROM diaries; @@ -43,8 +42,6 @@ SELECT * FROM memos WHERE MATCH(title) AGAINST("groonga") AND MATCH(body) AGAINST("starting"); -SHOW CREATE TABLE memos; - DROP TABLE memos; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test index 34c8bc02a1d4e42dbf424719cc85ce0a0b64eb01..bcc043485a0239b3f2a1972aba351cacb2a88869 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_spatial.test @@ -12,12 +12,12 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -144,8 +144,6 @@ ALTER TABLE shops ADD SPATIAL KEY location_index (location); SELECT id, name, ST_AsText(location) AS location_text FROM shops WHERE MBRContains(ST_GeomFromText('LineString(139.7727 35.6684, 139.7038 35.7121)'), location); -SHOW CREATE TABLE shops; - DROP TABLE shops; --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test index b4ebd69a5e9efbd25c7c66366e4aada548aa42c8..57af6f121cc860b16fc40b7b12b13ad0cf781d1d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/auto_increment_text.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test index 224bdfa07c6f3fe9f27c1b3b17cb87099306bb79..1c120f364577fafd6dd308c48509ef632bc72f0f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/binlog_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_log_bin.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test new file mode 100644 index 0000000000000000000000000000000000000000..c6d4a92469164f7929096e90a34d94ce4989944d --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/check_table_for_upgrade.test @@ -0,0 +1,44 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE memos ( + id int NOT NULL PRIMARY KEY, + content text, + FULLTEXT INDEX (content) +) COMMENT='engine "InnoDB"'; + +INSERT INTO memos VALUES (1, 'Hello MySQL'); +INSERT INTO memos VALUES (2, 'Hello Mroonga'); + +CHECK TABLE memos FOR UPGRADE; + +FLUSH TABLES; + +SELECT * FROM memos + WHERE MATCH(content) AGAINST('+mroonga' IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test index 2adbae8afd85e90c2210b5840cc681602b8770fc..de195a5b9817b612ea41e7fef34060709f013c56 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_comment_index_not_for_mroonga.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test new file mode 100644 index 0000000000000000000000000000000000000000..e10ecfe9b56ae082345752745232b1e73a1e135a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_add_column.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED; +ALTER TABLE logs ADD FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"'; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test new file mode 100644 index 0000000000000000000000000000000000000000..784f419e24c82fe40a35b3a9b27ad025e2341a99 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_delete.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test new file mode 100644 index 0000000000000000000000000000000000000000..de2e40680df42548a963eefba1137fa6a70e08c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_drop_column.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..a8fcf191e081850245fbaccb428538c394929316 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_insert.test @@ -0,0 +1,41 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test new file mode 100644 index 0000000000000000000000000000000000000000..db4f0ed44603e4c3ca805cca6d4fe97ef881725a --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_reindex.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DISABLE KEYS; +ALTER TABLE logs ENABLE KEYS; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("ar" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test new file mode 100644 index 0000000000000000000000000000000000000000..a59e5b6c4f10401f2910e98a35f3b4c5ce6468d8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_stored_update.test @@ -0,0 +1,43 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) STORED, + FULLTEXT INDEX(message) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs WHERE MATCH(message) AGAINST("hut" IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test new file mode 100644 index 0000000000000000000000000000000000000000..502fb1502ff6e0a37478eaa0bf481aca4b7baa53 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); + +ALTER TABLE logs ADD COLUMN message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL; + +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test new file mode 100644 index 0000000000000000000000000000000000000000..5103a91e909cc08ed74dfe978594ff935553b6c6 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_fulltext_index.test @@ -0,0 +1,46 @@ +# Copyright(C) 2017 Naoya Murakami +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mariadb_10_2_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) + VALUES (1, '{"level": "info", "message": "start server"}'); + +ALTER TABLE logs ADD FULLTEXT INDEX (message); + +INSERT INTO logs(id, record) + VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) + VALUES (3, '{"level": "warn", "message": "abort server"}'); + +SELECT * FROM logs WHERE MATCH(message) AGAINST('+start' IN BOOLEAN MODE); + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test new file mode 100644 index 0000000000000000000000000000000000000000..3b3b67c9747bffa11393ce2d24e3dda1999a1504 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_add_index.test @@ -0,0 +1,47 @@ +# Copyright(C) 2017 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + level VARCHAR(255) GENERATED ALWAYS AS + (json_unquote(json_extract(`record`, '$.level'))) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) + VALUES (1, '{"level": "info", "message": "start server"}'); + +ALTER TABLE logs ADD INDEX (level); + +INSERT INTO logs(id, record) + VALUES (2, '{"level": "info", "message": "start server"}'); +INSERT INTO logs(id, record) + VALUES (3, '{"level": "warn", "message": "abort server"}'); + +SELECT * FROM logs WHERE level = 'info'; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test new file mode 100644 index 0000000000000000000000000000000000000000..73848a3f2cb42841981b2561fbe7c7fb345e2599 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_delete.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +DELETE FROM logs WHERE id = 1; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test new file mode 100644 index 0000000000000000000000000000000000000000..cd5a9cb404b76b1ff2488e3b58fa12d7ff07a577 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_drop_column.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +ALTER TABLE logs DROP COLUMN message; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test new file mode 100644 index 0000000000000000000000000000000000000000..a5180a973d51af20c7ae56a8a66d9ef7098558c8 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_insert.test @@ -0,0 +1,40 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test new file mode 100644 index 0000000000000000000000000000000000000000..c266ffe6ec5acd9ff2c3a5876752c41313e04768 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_generated_virtual_update.test @@ -0,0 +1,42 @@ +# Copyright(C) 2017 Naoya Murakami +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_version_5_7_or_later.inc +--source ../../include/mroonga/skip_mariadb_10_1_or_earlier.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS logs; +--enable_warnings + +CREATE TABLE logs ( + id INT PRIMARY KEY, + record JSON, + message VARCHAR(255) GENERATED ALWAYS AS (json_extract(`record`, '$.message')) VIRTUAL +) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COMMENT = 'ENGINE "InnoDB"'; + +INSERT INTO logs(id, record) VALUES (1, '{"level": "info", "message": "start"}'); +INSERT INTO logs(id, record) VALUES (2, '{"level": "info", "message": "restart"}'); +INSERT INTO logs(id, record) VALUES (3, '{"level": "warn", "message": "abort"}'); + +UPDATE logs SET record = '{"level": "info", "message": "shutdown"}' WHERE id = 2; + +SELECT * FROM logs; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test new file mode 100644 index 0000000000000000000000000000000000000000..cea67376fa6d419179ee3c0116b9fd0b9d9b96a5 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_cp932.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES cp932; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT, + –¼‘O text, + FULLTEXT INDEX (–¼‘O) +) DEFAULT CHARSET=cp932 COMMENT='Engine "InnoDB"'; + +INSERT INTO users (–¼‘O) VALUES ("‚â‚Ü‚¾"); +INSERT INTO users (–¼‘O) VALUES ("‚½‚È‚©"); +INSERT INTO users (–¼‘O) VALUES ("‚·‚¸‚«"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (–¼‘O) AGAINST ('+‚½‚È‚©' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test new file mode 100644 index 0000000000000000000000000000000000000000..f1e0f39411fe5b412afcf022bb419c65cc490bcc --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_multibyte_utf8.test @@ -0,0 +1,53 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc +--source ../../include/mroonga/load_mroonga_functions.inc + +--disable_warnings +DROP TABLE IF EXISTS users; +--enable_warnings + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +SET NAMES utf8; + +CREATE TABLE users ( + id int unsigned PRIMARY KEY AUTO_INCREMENT, + åå‰ text, + FULLTEXT INDEX (åå‰) +) DEFAULT CHARSET=utf8 COMMENT='Engine "InnoDB"'; + +INSERT INTO users (åå‰) VALUES ("ã‚„ã¾ã "); +INSERT INTO users (åå‰) VALUES ("ãŸãªã‹"); +INSERT INTO users (åå‰) VALUES ("ã™ãšã"); + +SELECT * FROM users; + +SELECT * FROM users + WHERE MATCH (åå‰) AGAINST ('+ãŸãªã‹' IN BOOLEAN MODE); + +SELECT mroonga_command("dump --dump_plugins no --dump_records no"); + +DROP TABLE users; + +--source ../../include/mroonga/unload_mroonga_functions.inc +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test index 2e9674c860e69cc0e0e1a0e2316f6a7eca75f0bc..ba5786d05ab2ec03f2b2acbda52ea64ed8abe7c2 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/column_normal_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test new file mode 100644 index 0000000000000000000000000000000000000000..b557a96518aa7baac445983a710b4df35af1b08f --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star.test @@ -0,0 +1,36 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS ids; +--enable_warnings + +CREATE TABLE ids ( + id int PRIMARY KEY +) COMMENT='ENGINE "InnoDB"'; + +INSERT INTO ids VALUES (1); +INSERT INTO ids VALUES (2); +INSERT INTO ids VALUES (3); + +SELECT COUNT(*) FROM ids; + +DROP TABLE ids; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test new file mode 100644 index 0000000000000000000000000000000000000000..b329d9a5ff61f96514795b1eda291341546b0f88 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_mysql_5_7_or_later_with_index.test @@ -0,0 +1,55 @@ +# Copyright(C) 2011-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_query_log +DROP DATABASE test; +CREATE DATABASE test; +USE test; +--enable_query_log + +CREATE TABLE diaries_innodb ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT, + flag TINYINT(2), + INDEX (flag) +) ENGINE = InnoDB DEFAULT CHARSET UTF8; + +CREATE TABLE diaries_mroonga ( + id INT PRIMARY KEY AUTO_INCREMENT, + body TEXT, + flag TINYINT(2), + INDEX (flag) +) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; + +INSERT INTO diaries_innodb (body) VALUES ("will start groonga!"); +INSERT INTO diaries_innodb (body) VALUES ("starting groonga..."); +INSERT INTO diaries_innodb (body) VALUES ("started groonga."); + +INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); +INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); +INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); + +EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; + +DROP TABLE diaries_innodb; +DROP TABLE diaries_mroonga; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test index 6fd0ff1971c3a308d1cd8e97d078c963e7ae38fe..0a3a5c818650c8b581c312dfbc82a6c0a6ac173e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/count_star_with_index.test @@ -1,4 +1,4 @@ -# Copyright(C) 2011-2015 Kouhei Sutou +# Copyright(C) 2011-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -12,9 +12,10 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_query_log @@ -45,7 +46,9 @@ INSERT INTO diaries_mroonga (body) VALUES ("will start groonga!"); INSERT INTO diaries_mroonga (body) VALUES ("starting groonga..."); INSERT INTO diaries_mroonga (body) VALUES ("started groonga."); +-- replace_column 9 # EXPLAIN SELECT COUNT(*) FROM diaries_innodb; +-- replace_column 9 # EXPLAIN SELECT COUNT(*) FROM diaries_mroonga; DROP TABLE diaries_innodb; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test index 4eab593cfe77d1f39ce3bf2d627d8955c07a882c..1c0d445013c281e1230a1eb83d56a17dfec19e13 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -65,6 +65,8 @@ create table t1 (c1 time primary key) COMMENT = 'engine "innodb"'; desc t1; drop table t1; create table t1 (c1 timestamp primary key) COMMENT = 'engine "innodb"'; +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP desc t1; drop table t1; create table t1 (c1 datetime primary key) COMMENT = 'engine "innodb"'; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test index f2d4cf80e3ab56246c9813a062295977bdc96ea7..eaad5ed47cfc73e112d61fedbbdd7f048ed66d77 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_comment_combined.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,7 @@ CREATE TABLE bugs ( ) DEFAULT CHARSET=utf8 COMMENT='Free style normal comment, engine "InnoDB"'; -SHOW CREATE TABLE bugs; +SELECT mroonga_command("dump --dump_plugins no"); DROP TABLE bugs; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test index aa6b1f01f1042727b8769d7ea5a790ed2fa03615..6daa5acfd0f657d7934d0e80d459202389ef1fbf 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_comment.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test index d116aa6cd34cc52b634a37e3c01836074f4cb63f..22d28e941fd459210c8fc87dea6fd9d7ac3039c5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_none.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test index 3c6bb52d143ce08891618e966d8437de834be04d..c3b689580f6d80ae7733ff7345d82a6eb224b5a2 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_flags_parameter.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test index b433e54e8859c9ce37259db9578a5b893e5f0fc0..06cb7658c21c8ced59d18be44e5cb49adbcfe7d1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_none.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test index 47cededee5529cbbb0ff2d9a8a2cad048a21f88e..84dc9d8526a76428a42ad49b043f3e24500a419d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_index_flags_with_position_and_with_weight.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test index 0d26c751c22780f32402f2c18a725326cb91a374..8846821cfc18c8776fb6a3708ddd679d75792b5a 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test new file mode 100644 index 0000000000000000000000000000000000000000..5454b176313492ccf1e67f02d33e8e5351c7e0fb --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_fulltext_index_bin.test @@ -0,0 +1,40 @@ +# Copyright(C) 2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS memos; +--enable_warnings + +SET NAMES utf8; + +CREATE TABLE memos ( + id INT NOT NULL PRIMARY KEY, + content TEXT NOT NULL, + FULLTEXT INDEX (content) COMMENT 'normalizer "NormalizerAuto"' +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +SHOW CREATE TABLE memos; + +INSERT INTO memos VALUES (1, "1æ—¥ã®æ¶ˆè²»ãŒã¯ç´„2000㌔ãŒ"); + +SELECT * FROM memos + WHERE MATCH (content) AGAINST ("+カロリー" IN BOOLEAN MODE); + +DROP TABLE memos; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test index 141d15c3c459a6b5e75927ab63ad8d63dc630c29..287d594b7f54c6d7c83508875017cb5e3dc56faa 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_normalizer_parameter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test index 151d15a9870b231ca8a23e086e9f0d395a519851..54d63fbe49c9abfbb7643221cd10eca8b11cc92c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_parser_comment.test @@ -12,8 +12,9 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +--source include/not_embedded.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +28,6 @@ create table diaries ( fulltext index body_index (body) comment 'parser "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test index d5487a3b828685086235a194487ba3cb267f4039..c79744993e9bfd6585f81de37b6d9eed3c1f2f65 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_multiple_token_filters.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test index 0d863c9f99f90bdddc56b212a43a9329473abd30..80bb5cf8701f2bfea262991ad92bfcb6fe095da6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_one_token_filter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test index 0532c19dbde759112a86b01f7aa62d5df4a9ddec..99343ec60cffd9aaf073d4801003b5a196ff2021 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_token_filters_index_parameter.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test index 0a55dd6ae6976d2fccb15c2fb054f38ab9b915f1..e3e6d671ac6d7ae41120f6311d9aca09dfdaa1f0 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_comment.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( fulltext index body_index (body) comment 'tokenizer "TokenBigramSplitSymbolAlphaDigit"' ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; insert into diaries (body) values ("will start Groonga!"); insert into diaries (body) values ("starting Groonga..."); insert into diaries (body) values ("started Groonga."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test index a2087ca8a9f6490883528ef550ee031e0ae734be..3eadb51a73ad30a6688aa5083af57f5384b5f9dd 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/create_table_tokenizer_parameter.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mariadb.inc --source include/have_innodb.inc @@ -27,7 +27,6 @@ CREATE TABLE diaries ( body text, FULLTEXT INDEX body_index (body) TOKENIZER='TokenBigramSplitSymbolAlphaDigit' ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET utf8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (body) VALUES ("will start Groonga!"); INSERT INTO diaries (body) VALUES ("starting Groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test index dae9bf033ca8d91627fa50a81a2e783290885cb5..b06a60671440c2d639b61d6d40089195f1c639e3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test index b25fc596813fc1cf81b98e36631dde33a56542fb..ca33da8c30972780c2b2162b873763b7f4371793 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/delete_all.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.test new file mode 100644 index 0000000000000000000000000000000000000000..c0f492d1920ad0ad8d0032ef9f3e6287a6e378a4 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/drop_table_new_connection.test @@ -0,0 +1,46 @@ +# Copyright(C) 2015 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source include/not_embedded.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +CREATE TABLE logs ( + id INT PRIMARY KEY AUTO_INCREMENT, + message TEXT, + FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +disable_query_log; +CONNECT(drop_connection, localhost, root); +enable_query_log; + +USE test; +DROP TABLE logs; + +disable_query_log; +CONNECTION default; +enable_query_log; + +CREATE TABLE logs ( + id INT PRIMARY KEY AUTO_INCREMENT, + message TEXT, + FULLTEXT INDEX (message) +) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8; + +DROP TABLE logs; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test index d835a20746c61fe33ae96d987b60b65936bbcd1d..0234f831fb13b7ac3f4cb0d8420d8c3c3291eed2 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_leading_not.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( content TEXT, FULLTEXT INDEX (content) ) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test index 9882883e597d8415ed447cfbf8fa37e197153bd8..73de4d5e70e3807f97db6f5862f18dc823a2c8c2 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_multiple_match_against.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX (title), FULLTEXT INDEX (content) ) DEFAULT CHARSET = UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, "富士山", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, "天気 1月1日", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test index 1e57b56d6b00e1255db0c4541b2929642d211ee0..14fba8d22754c46497e696ec051ebbe63090f640 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_no_operator.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test index 3fdad5365fee2a73782060432bc4dc57f6ebeaca..9cfd841b753bdfa8c70fd0b27dcaed4310201c0c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_or.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test index 53251eb2af70ed2303d83256b1433270c4313d7b..b28caa87e2fd1ecd731579d1ee09578cd22c5238 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_minus_with_plus.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test index f46f732203be469d7e88e2aca88e28f58fcf3468..1dfdc49695b11c3c855ec4872bfaa8d31316b28d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_no_operator.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test index 8f8130b7b45f2fa60c34c7418f024ab796b705e2..66f7aaf880e4bc83aa1542ff90a40c86b9e661c2 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_minus.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test index 6fa65d395eeb57d6bb852693b3766c890d45cb54..54278e9768142d6df6f21d3a356dd1893089bfa6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_or_with_plus.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test index 9d7f887c98deef1e1332ba6f08fe1ef7b38546b2..459fd91355289c1fdf82840df35b0478751d00ea 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_no_operator.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test index 7feca394fa5bc37bb14a4a1c6835cdae96663f52..3245501d6b7313d1fb273911bfa2569b39d3d1fc 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_minus.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test index ade88c9c60deea7c379d1fac7dc6c1dc4b3e7bfb..0e69941134e4f85824563dbfb48cee5f64315181 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_default_operator_plus_with_or.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test index ecc1e0d0bad5b8c1b0c68508e6e5362425797815..3191ff6c44c7f534dec7f5049e6c46110e907b55 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_full_spec.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test index 384b951f5628a1a2098428bebfb1f07f560ed057..90216c0a438e32ceade9a2e7942c490223b66701 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_no_weight.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test index f259fc853880384ebbed0d03fcd1bf7ff0cb1e43..4a5512791a13f0699bcdf2388aacba9f47865b2a 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_boolean_mode_pragma_weight_omit_section.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test index 4cec44d01a24b92e17d4cd38ec72f342d2fb32ce..27af7f5d8801b030dde2279ac07c7a949ee225e3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_ascii.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test index 169069fb67d075a039f05e6e6b8f9359abf82b7a..912b3c9eec1775682d9796a93d45f02c2e945f6d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_cp932.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_cp932.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test index cda39ce2ad63f08cebe40742de2b09ed216c87d0..56309998b426fb13deb4c110261f7484213e6b6e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_eucjpms.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_eucjpms.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test index 93e78d6b46d8683abc505635e749632d900db324..589b4d79dcf7687065961e27f7c4584cb1a9f6e3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_charset_japanese.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test index 27af190ed7a20fd35ef8797e1310dc5a18dfc9ee..6b07647625d5ffb316b2f860802e545f600e412e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_index_recreate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( content text, FULLTEXT INDEX (title) ) DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES (1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES (2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test index 083384b04d17b89b32a848ebbe7f50aed688b7b8..d4364af2da780171d8b7a6edaf923b547d453fce 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_select.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -29,7 +29,11 @@ insert into t1 values (2, "ka ki ku ke ko"); insert into t1 values (3, "aa ii ii ii oo"); insert into t1 values (4, "sa si su se so"); insert into t1 values (5, "ta ti ii ii to"); -insert into t2 (c1,c2) select c1,c2 from t1; +insert into t2 values (1, "aa ii uu ee oo"); +insert into t2 values (2, "ka ki ku ke ko"); +insert into t2 values (3, "aa ii ii ii oo"); +insert into t2 values (4, "sa si su se so"); +insert into t2 values (5, "ta ti ii ii to"); select * from t1; select * from t2; select * from t1 where c1=3; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test index f4b76888b76a2decd6998449902f915eefbd6029..ea76dd055dbac3b14c59b81a994db71a851b6bc1 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_insert_values.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,7 +23,6 @@ drop table if exists t1, t2, t3; --enable_warnings create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "innodb"'; -show create table t1; insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test index 0775041634217e17d6e92a0b7fb377238fc41587..38e17700269520ddbc4db36fd75e5c214a5b7b23 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_many_records.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( title varchar(255), fulltext index (title) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; set autocommit=0; insert into diaries values(0, "2011-07-14"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test index 52700ad01fe1c050a5d1594e3e831182204c6c8b..61ef72370f04604beb342fc04d2bdd7d343d8927 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_matched_order.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test index b362acd4565fd70165bd391eec78ff2db1417295..1cc2f6c297af3c662ebac33cee36c37abcacbf05 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_have_where_no_order.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -35,13 +35,16 @@ INSERT INTO texts VALUES (1, 'Hello1', 'World1'); INSERT INTO texts VALUES (2, 'Hello2', 'World2'); INSERT INTO texts VALUES (3, 'Hello3', 'World3'); -SELECT id, - matched, - not_matched, - MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE), - MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) - FROM texts - WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE); +SELECT * + FROM (SELECT id, + matched, + not_matched, + MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE), + MATCH(not_matched) AGAINST('+Hello' IN BOOLEAN MODE) + FROM texts + WHERE MATCH(matched) AGAINST('+Hello' IN BOOLEAN MODE)) + AS searched_texts + ORDER BY id; DROP TABLE texts; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test index fa8fb79634d79183d5d76f24e8147e549387098f..673ed5619d9b33ea215b2d0ee05371bf2c055cc5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_matched_and_not_matched_no_where_both_order.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test index d6defc1fca2f0f09b8b49ae4a4a3289b980593d6..2d2ffe7b014841723c9f86399c2ec66922e75fe3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test index ebf5c37ad941284781e3a43bcb386b2c68afb2ae..81047e78302c2d127fdb91f0b3df7195a6320437 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_insert.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test index 8ae0dd8892ba3c04511058d3aca0e158e61d01bd..037784e42511e535f5af2b978506259360bf65b9 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_recreate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test index a6c12aa1714fa94a14c57c5316b79e14f4f91c41..72662d7809398ed03946f2f655f424469f45fc75 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_column_index_update.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -30,7 +30,6 @@ create table diaries ( fulltext index (title), fulltext index (content) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries values(1, "Hello", "ã¯ã˜ã‚ã¾ã—ãŸã€‚"); insert into diaries values(2, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); insert into diaries values(3, "富士山", "今日もãれã„。"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test index 58c0ea3faf70d29681ecaca3909a3e2586fd0266..8ecb8eeec65cf883dea614cc5c44af97e346a4fc 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_multiple_index.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ create table diaries ( fulltext index title_index (title), fulltext index body_index (body) ) comment = 'engine "innodb"' default charset utf8; -show create table diaries; insert into diaries (title, body) values ("survey", "will start groonga!"); insert into diaries (title, body) values ("groonga (1)", "starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test index 305f51d4a02474333b947181766a046f6e048681..818624392a4e9dba7ccd9c36c372b94e708b89fd 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_myisam.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -22,7 +22,6 @@ drop table if exists t1, t2, t3; --enable_warnings create table t1 (c1 int primary key, c2 text, fulltext index ft (c2)) COMMENT = 'engine "myisam"'; -show create table t1; insert into t1 values (1, "hoge hoge"); insert into t1 values (2, "fuga fuga"); insert into t1 values (3, "moge moge"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test index 7fcffefd23440c9ab1a0881c78aa5830d9c6e30e..d65fdefd647fc4cc83eb9cfffee9c1777d3a14a4 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_not_match_against.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test index cba565b02539b8df081a59f1ba7676d49735f8e8..55813bd3fdcc5f4fcada3f903c06aeaa0eb18e67 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_TODO_SPLIT_ME.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -23,14 +23,13 @@ DROP TABLE IF EXISTS diaries; SET NAMES UTF8; CREATE TABLE ft( - a INT, + a INT DEFAULT 0, b TEXT, c TEXT, PRIMARY KEY(a), FULLTEXT KEY ftx1(b), FULLTEXT KEY ftx2(c) )ENGINE=Mroonga DEFAULT CHARSET=UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE ft; INSERT INTO ft VALUES(1,'aaaaa','abcde'); INSERT INTO ft VALUES(2,'bbbbb','bcdef'); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test index 825cf361546725cc0efbcb3ab2700323671a329e..bcab5307e18b702de2e3f241a2d994d14f0711d6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/fulltext_order_transaction.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET=UTF8; -SHOW CREATE TABLE diaries; START TRANSACTION; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); @@ -39,22 +38,32 @@ SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; +disable_query_log; CONNECT(search_connection, localhost, root); +enable_query_log; USE test; SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; +disable_query_log; CONNECTION default; +enable_query_log; COMMIT; +disable_query_log; CONNECTION search_connection; +enable_query_log; SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; +disable_query_log; DISCONNECT search_connection; +enable_query_log; +disable_query_log; CONNECTION default; +enable_query_log; SELECT * FROM diaries WHERE MATCH(body) AGAINST("groonga") ORDER BY id; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test index 2cfd00b2172eed2b33d4c8730e66c895d641c2bf..f08337af9d1b6a2af1d4823a57c8749865cdd54c 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_reference.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test index b5f7dd80c31b73fc0d75b7de2918f822e20230e1..d1be7ae64da19fb746f54419a19c23d251f5e6b6 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/function_last_insert_id_set.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test index 88fa88427cf7e5af4355c0f18319ef61c801dea3..8c669052d2ecd5179e05d708d6184c95afc985db 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_contains.test @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -29,7 +29,6 @@ create table shops ( location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; insert into shops (name, location) values ('nezu-no-taiyaki', ST_GeomFromText('POINT(139.762573 35.720253)')); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test index 655a8416725f20b1fc359dc8ec954266afda768d..3a4d399beec21de74d58f1011f07961d6da7de7f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_delete.test @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -29,7 +29,6 @@ create table shops ( location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; insert into shops (name, location) values ('sazare', diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test index 6a73495815895b62e397b1e53b4dbc948984470b..db7aa344e0af394429275c1e1940dc662cc91264 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/geometry_update.test @@ -12,11 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/have_geometry.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc --source ../../include/mroonga/have_mroonga.inc --disable_warnings @@ -29,7 +29,6 @@ create table shops ( location geometry NOT NULL, spatial key location_index (location) ) comment = 'engine "innodb"'; -show create table shops; insert into shops (name, location) values ('sazare', diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test index b7a4dd4c36bbcd89a35fc1b60cd2dad3dfe20a46..1c73f30b60c472a71f01e34bdce6572dffa4ca46 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/index_force_index_not_used.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test index 87947f1ea6c716e2e5cc8e030b72b62d50bbd0f8..021d3f8e95d5e2a2e31e1685ceceb7293a4eced7 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test index a5edb8bae4a9b1e608f96bc9b515cfa8640fac5e..b21dcc5b8938854b3695feed22d4038b6da37a27 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_bulk.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -27,7 +27,6 @@ create table diaries ( content text, fulltext index (content) ) default charset utf8 comment = 'engine "innodb"'; -show create table diaries; LOCK TABLE diaries WRITE; insert into diaries values(1, "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test index d16527644e3cdf345d88fae35f2243aacd17326f..3006bac6d21b561c534966a3d8508786e59f1ff8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_primary_key_myisam.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -26,6 +26,8 @@ CREATE TABLE diaries ( content TEXT NOT NULL, PRIMARY KEY (date, title) ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP SHOW CREATE TABLE diaries; INSERT INTO diaries (date, title, content) diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test index d97823f77a2b99af7bb5f32baeef381441ef6902..ae993b76b09d56b56ef62ec708751cd7cd142861 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/insert_on_duplicate_key_update_multiple_column_unique_index_myisam.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mroonga.inc @@ -27,6 +27,8 @@ CREATE TABLE diaries ( content TEXT NOT NULL, UNIQUE INDEX (date, title) ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "MyISAM"'; +# For MariaDB 10.2.3 +-- replace_result current_timestamp() CURRENT_TIMESTAMP SHOW CREATE TABLE diaries; INSERT INTO diaries (date, title, content) diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test index dbe11f03bec298aa604838b317c6d1e7cb53af22..ce9cf85e7dc13fbf03be3d5b0caa76ba90a454b8 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_disk_sweep.test @@ -1,5 +1,5 @@ # Copyright(C) 2013 Kenji Maruyama -# Copyright(C) 2013 Kouhei Sutou +# Copyright(C) 2013-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -13,10 +13,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source ../../include/mroonga/have_mysql.inc ---source ../../include/mroonga/have_version_56_or_later.inc +--source ../../include/mroonga/have_version_5_6_or_later.inc +--source ../../include/mroonga/skip_mysql_5_7_or_later.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test new file mode 100644 index 0000000000000000000000000000000000000000..fb6529ef782cdb649eb7b52d8ce6f1a4b653dc7e --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/multi_range_read_mysql_5_7_or_later_disk_sweep.test @@ -0,0 +1,44 @@ +# Copyright(C) 2013 Kenji Maruyama +# Copyright(C) 2013-2016 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/have_mysql_5_7_or_later.inc +--source include/have_innodb.inc +--source ../../include/mroonga/have_mroonga.inc + +--disable_warnings +DROP TABLE IF EXISTS integers; +--enable_warnings + +SET optimizer_switch='mrr_cost_based=off'; + +CREATE TABLE integers ( + id INT PRIMARY KEY AUTO_INCREMENT, + value INT, + KEY (value) +) COMMENT='engine "InnoDB"'; + +INSERT INTO integers (value) VALUES (0), (1), (2), (3); + +EXPLAIN SELECT * FROM integers + WHERE value IN (0, 2); + +SELECT * FROM integers + WHERE value IN (0, 2); + +DROP TABLE integers; + +--source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test index 078e0b6e28ef39e5f3f52641a4b644078fd2d309..9aeeef0e8421b48aa266dc5c295c937c7a5eb91f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_TODO_SPLIT_ME.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test index 07a497d78713fa2677a1c013ddcc5d7515792915..4a2338714e4139112d8388974bef9d47d86fa8d5 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_direction.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test index a74db4417b2c16a10a6e364ebeb8e2028df2fb87..8b8e4754dc29f138f9f732a290ac15f7fb0764f3 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_no_where_clause.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test index 25a02398a669e4ebbf0be89d76a5f65034b83360..f1b6ad62c88a63838634555cbcd0b23a78dc0e2e 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/optimization_order_limit_order_by_primary_key.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test index 7d663bef626f800f7734932979c195b3aabd9e72..5ea33c4e150ce65aa48fb85131ad899c2969e354 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/performance_schema.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test index d11a3efe90060475becbc92088c31d10b5544123..31b4371226136f03bc09fd541f41ddf87d37608d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_files.test @@ -12,10 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc +--source ../../include/mroonga/skip_solaris.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_mroonga_helper.inc @@ -28,7 +29,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); @@ -36,13 +36,7 @@ INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); ---remove_file $MYSQLD_DATADIR/repair_test.mrn ---remove_file $MYSQLD_DATADIR/repair_test.mrn.001 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000000 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000105 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000106 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000107 ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000107.c +--remove_files_wildcard $MYSQLD_DATADIR repair_test.mrn* FLUSH TABLES; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test index 6d09479e554401ec3bab39312de9e360cd909b51..f2b1f63a8e03495e97e14dfd8f1c0eeebc2ae0df 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/repair_table_no_index_file.test @@ -12,10 +12,11 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source include/not_embedded.inc +--source ../../include/mroonga/skip_solaris.inc --source ../../include/mroonga/have_mroonga.inc --source ../../include/mroonga/have_mroonga_helper.inc @@ -28,7 +29,6 @@ CREATE TABLE diaries ( body TEXT, FULLTEXT INDEX body_index (body) ) COMMENT = 'engine "innodb"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); @@ -36,14 +36,11 @@ INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga."); SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); ---remove_file $MYSQLD_DATADIR/repair_test.mrn.0000106 +--remove_file $MYSQLD_DATADIR/repair_test.mrn.000010A FLUSH TABLES; -# Error ER_CANT_OPEN_FILE syscall error 'repair_test.mrn.0000104' (No such file or directory) -# The (Error 0)[0]" replaces is for Solaris -# ---replace_result "(Error 0)[0]" "(No such file or directory)" +# Error ER_CANT_OPEN_FILE system call error: No such file or directory: failed to open path: --error ER_CANT_OPEN_FILE SELECT * FROM diaries WHERE MATCH(body) AGAINST("starting"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test index 7d98ca0bfa753b4e1f67ffdc1092f8b6ad7fc776..143270dcf202f4e34fe2d668ce552b4ef64ede3d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/temporary_table.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/skip_osx.inc @@ -27,7 +27,6 @@ CREATE TEMPORARY TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT ) DEFAULT CHARSET=UTF8 COMMENT = 'ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title) VALUES ("clear day"); INSERT INTO diaries (title) VALUES ("rainy day"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test index 9055715486b0ab70501ba5eaf4207327895ef07a..7c848641626d564043f6ea9e937a95bfd44c2f02 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_query_cache.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -31,22 +31,32 @@ SHOW CREATE TABLE simple_table; INSERT INTO simple_table (id) VALUES (1),(2); +disable_query_log; CONNECT(second_connection, localhost, root); +enable_query_log; USE test; START TRANSACTION; INSERT INTO simple_table (id) VALUES (3); +disable_query_log; CONNECTION default; +enable_query_log; SELECT * FROM simple_table; +disable_query_log; CONNECTION second_connection; +enable_query_log; COMMIT; +disable_query_log; CONNECTION default; +enable_query_log; SELECT * FROM simple_table; DROP TABLE simple_table; +disable_query_log; DISCONNECT second_connection; +enable_query_log; SET GLOBAL query_cache_size = @tmp_query_cache_size; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test index dd08d93cd47e2371c5221676b60bfc8f8dd48f90..f11ca4a98393d5ab46af99fb57d780af4e192a66 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test index ae9099a7ab9c27f10fd194c01e10908f516819e8..36bc09be73bfd0b4e6e6444de82d84f6b5ea6422 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/transaction_rollback_delete_update.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -28,7 +28,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX title_index (title), FULLTEXT INDEX body_index (body) ) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!"); INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test index 1920237fdadc6d5e3b33731342a8587a3f774b11..b021b26b5e375d41357c0df1b6ed7b7d2d72a249 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/truncate.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -32,7 +32,6 @@ CREATE TABLE diaries ( FULLTEXT INDEX(content), KEY(day) ) DEFAULT CHARSET UTF8 COMMENT = 'engine "innodb"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries VALUES(1, 2011, 11, 9, "Hello", "今日ã‹ã‚‰ã¯ã˜ã‚ã¾ã—ãŸã€‚"); INSERT INTO diaries VALUES(2, 2011, 11, 10, "天気", "明日ã®å¯Œå£«å±±ã®å¤©æ°—ã«ã¤ã„ã¦"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test index 7afeee05ffdee3912c9a568a2c3f9f65c9a8903e..9052c434c317c137f81286c86d085bc645b20c27 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_fulltext.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test index db1e2da9a181d910595e73ecd9f2ea6c06f5b39e..ffa26994efea1098418c05fcb3dcd628f533a96d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/update_int.test @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test index 2757c94b4c5edb6fa4f39c0fccaab3d8fe8831c7..c6f2a2a14da5c68a697cbb935ffb0238216e287d 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_delete.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries (body) values ("will start groonga!"); insert into diaries (body) values ("starting groonga..."); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test index 5e9585282758e341eda4f8309c4c49a95a2ddc84..b80f60fcba553cc96ad3f6fa2abb1840861feddb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_insert.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries (body) values ("will start groonga!"); select * from diaries; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test index 8e9a9e3308ada129f6af269461a9e07f6021c3ec..ab75babfbac946e9b925dbffc090e5576b8222eb 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_dry_write_update.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -26,7 +26,6 @@ create table diaries ( body text, fulltext index body_index (body) ) default charset utf8 COMMENT = 'engine "innodb"'; -show create table diaries; insert into diaries (body) values ("will start groonga!"); diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test index ead26bca2c14ecbd02ad4f153e859150ce6fde29..71d44ab57043f275397cfc9b1869b85fc28a1901 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_global.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -25,9 +25,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); @@ -41,11 +40,17 @@ SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); SET GLOBAL mroonga_match_escalation_threshold = -1; --enable_warnings +disable_query_log; CONNECT(search_connection, localhost, root); +enable_query_log; USE test; + SELECT * FROM diaries WHERE MATCH (tags) AGAINST ("gr" IN BOOLEAN MODE); + +disable_query_log; DISCONNECT search_connection; CONNECTION default; +enable_query_log; SET GLOBAL mroonga_match_escalation_threshold = DEFAULT; diff --git a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test index 5f5ae169890a28a768d67098a0c76e5f85956d46..91196faf6121ada7a80e6cf9cff95e837457818f 100644 --- a/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test +++ b/storage/mroonga/mysql-test/mroonga/wrapper/t/variable_match_escalation_threshold_session.test @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc @@ -25,9 +25,8 @@ CREATE TABLE diaries ( id INT PRIMARY KEY AUTO_INCREMENT, title TEXT, tags TEXT, - FULLTEXT INDEX tags_index (tags) COMMENT 'parser "TokenDelimit"' + FULLTEXT INDEX tags_index (tags) COMMENT 'tokenizer "TokenDelimit"' ) DEFAULT CHARSET=UTF8 COMMENT='ENGINE "InnoDB"'; -SHOW CREATE TABLE diaries; INSERT INTO diaries (title, tags) VALUES ("Hello groonga!", "groonga install"); INSERT INTO diaries (title, tags) VALUES ("Hello mroonga!", "mroonga install"); diff --git a/storage/mroonga/packages/apt/Makefile.am b/storage/mroonga/packages/apt/Makefile.am index ca0e1dcb19d5342e45ed9c01034f20e8a0105a1d..0ebc7f67d04d82f58d00804ea0e1a40379a7b7a4 100644 --- a/storage/mroonga/packages/apt/Makefile.am +++ b/storage/mroonga/packages/apt/Makefile.am @@ -1,11 +1,12 @@ REPOSITORIES_PATH = repositories DISTRIBUTIONS = debian ARCHITECTURES = i386 amd64 -CODE_NAMES = wheezy jessie +CODE_NAMES = jessie stretch +MYSQL_VARIANTS = 5.5 mariadb-10.0 all: -release: build sign-packages update-repository sign-repository upload +release: download build sign-packages update-repository sign-repository upload remove-existing-packages: for distribution in $(DISTRIBUTIONS); do \ @@ -45,21 +46,44 @@ upload: ensure-rsync-path build: build-package-deb -build-package-deb: prepare-build-package-deb +build-package-deb: source env.sh vagrant destroy --force - for architecture in $(ARCHITECTURES); do \ - for code_name in $(CODE_NAMES); do \ - id=debian-$$code_name-$$architecture; \ - vagrant up $$id || exit 1; \ - vagrant destroy --force $$id; \ + for variant in $(MYSQL_VARIANTS); do \ + cp env.sh tmp/; \ + echo "MYSQL_VARIANT=$${variant}" >> tmp/env.sh; \ + for architecture in $(ARCHITECTURES); do \ + for code_name in $(CODE_NAMES); do \ + rm -rf tmp/debian; \ + if [ $${variant} = "5.5" -a $${code_name} = "stretch" ]; then \ + continue; \ + fi; \ + if [ $${code_name} = "stretch" ]; then \ + cp -rp $(srcdir)/../debian-mariadb-10.0 tmp/debian; \ + for f in `find tmp/debian -maxdepth 2 -type f`; do \ + RENAMED=`echo $$f | sed 's/10.0/10.1/'`; \ + sed -i'' 's/10.0/10.1/g' $${f}; \ + if [ $${f} = $$RENAMED ]; then \ + continue; \ + fi; \ + mv $${f} $$RENAMED; \ + done; \ + if [ $${architecture} = "amd64" ]; then \ + sed -i'' 's,lib/mysql/,lib/x86_64-linux-gnu/mariadb18/,' \ + tmp/debian/mariadb-server-10.1-mroonga.install; \ + elif [ $${architecture} = "i386" ]; then \ + sed -i'' 's,lib/mysql/,lib/i386-linux-gnu/mariadb18/,' \ + tmp/debian/mariadb-server-10.1-mroonga.install; \ + fi; \ + else \ + cp -rp $(srcdir)/../debian-$${variant} tmp/debian; \ + fi; \ + id=debian-$$code_name-$$architecture; \ + vagrant up $$id || exit 1; \ + vagrant destroy --force $$id; \ + done; \ done; \ done -prepare-build-package-deb: source env.sh - cp env.sh tmp/ - rm -rf tmp/debian - cp -rp $(srcdir)/../debian tmp/ - source: tmp/$(PACKAGE)-$(VERSION).tar.gz tmp/$(PACKAGE)-$(VERSION).tar.gz: $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz diff --git a/storage/mroonga/packages/apt/Vagrantfile b/storage/mroonga/packages/apt/Vagrantfile index 2829da879dd14697de5a4e6dade0c0272ae07b9a..ee4a6aebc232a5b290fe4b0a64549b1f6813f493 100644 --- a/storage/mroonga/packages/apt/Vagrantfile +++ b/storage/mroonga/packages/apt/Vagrantfile @@ -7,30 +7,43 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vms = [ { - :id => "debian-wheezy-i386", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8-i386_chef-provisionerless.box", + :id => "debian-jessie-i386", + :box => "bento/debian-8.9-i386", }, { - :id => "debian-wheezy-amd64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box", + :id => "debian-jessie-amd64", + :box => "bento/debian-8.9", }, { - :id => "debian-jessie-i386", - :box_url => "http://packages.groonga.org/tmp/opscode_debian-8.0-i386_chef-provisionerless.box", + :id => "debian-stretch-i386", + :box => "bento/debian-9.1-i386", }, { - :id => "debian-jessie-amd64", - :box_url => "http://packages.groonga.org/tmp/opscode_debian-8.0_chef-provisionerless.box", + :id => "debian-stretch-amd64", + :box => "bento/debian-9.1", }, ] vms.each do |vm| config.vm.define(vm[:id]) do |node| - node.vm.box = vm[:id] - node.vm.box_url = vm[:box_url] + # Use official box + node.vm.box = vm[:box] if vm[:box] + # Use box and box_url until official box is released + node.vm.box = vm[:id] if vm[:box_url] + node.vm.box_url = vm[:box_url] if vm[:box_url] node.vm.provision(:shell, :path => "build-deb.sh") node.vm.provider("virtualbox") do |virtual_box| - virtual_box.memory = 768 + system_n_cpus = 1 + if File.exist?("/proc/cpuinfo") + system_n_cpus = File.readlines("/proc/cpuinfo").grep(/^processor/).size + end + if system_n_cpus > 1 + vm_n_cpus = system_n_cpus / 2 + else + vm_n_cpus = 1 + end + virtual_box.cpus = (ENV["VM_CPUS"] || vm_n_cpus).to_i + virtual_box.memory = (ENV["VM_MEMORY"] || 768).to_i end end end diff --git a/storage/mroonga/packages/apt/build-deb.sh b/storage/mroonga/packages/apt/build-deb.sh index 510886cb24fabd365ffe890b65f5b0679965e197..e0e03d8ec1541c671e743871d21c0d3c0ee6d00d 100755 --- a/storage/mroonga/packages/apt/build-deb.sh +++ b/storage/mroonga/packages/apt/build-deb.sh @@ -2,8 +2,6 @@ LANG=C -mysql_server_package=mysql-server - run() { "$@" @@ -15,14 +13,37 @@ run() . /vagrant/tmp/env.sh +code_name=$(lsb_release --codename --short) +case "${MYSQL_VARIANT}" in + mariadb-*) + case "${code_name}" in + stretch) + mysql_server_package=mariadb-server-10.1 + MYSQL_VARIANT=mariadb-10.1 + ;; + *) + mysql_server_package=mariadb-server-${MYSQL_VARIANT##mariadb-} + ;; + esac + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmariadb-client-lgpl-dev" + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmariadbd-dev" + ;; + *) + mysql_server_package=mysql-server-${MYSQL_VARIANT} + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmysqlclient-dev" + DEPENDED_PACKAGES="${DEPENDED_PACKAGES} libmysqld-dev" + ;; +esac + grep '^deb ' /etc/apt/sources.list | \ sed -e 's/^deb /deb-src /' > /etc/apt/sources.list.d/base-source.list +run sudo sed -i'' -e 's/httpredir/ftp.jp/g' /etc/apt/sources.list + run apt-get update run apt-get install -y lsb-release distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') -code_name=$(lsb_release --codename --short) case "${distribution}" in debian) component=main @@ -59,16 +80,23 @@ run apt-get install -V -y build-essential devscripts ${DEPENDED_PACKAGES} run apt-get build-dep -y ${mysql_server_package} run mkdir -p build -run cp /vagrant/tmp/${PACKAGE}-${VERSION}.tar.gz \ - build/${PACKAGE}_${VERSION}.orig.tar.gz run cd build -run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz -run cd ${PACKAGE}-${VERSION}/ +run tar xfz /vagrant/tmp/${PACKAGE}-${VERSION}.tar.gz +run mv ${PACKAGE}-${VERSION} ${PACKAGE}-${MYSQL_VARIANT}-${VERSION} +run tar cfz ${PACKAGE}-${MYSQL_VARIANT}_${VERSION}.orig.tar.gz \ + ${PACKAGE}-${MYSQL_VARIANT}-${VERSION} +run cd ${PACKAGE}-${MYSQL_VARIANT}-${VERSION}/ run cp -rp /vagrant/tmp/debian debian # export DEB_BUILD_OPTIONS=noopt -MYSQL_PACKAGE_INFO=$(apt-cache show mysql-server | grep Version | sort | tail -1) +MYSQL_PACKAGE_INFO=$(apt-cache show ${mysql_server_package} | + grep Version | + sort | + tail -1) MYSQL_PACKAGE_VERSION=${MYSQL_PACKAGE_INFO##Version: } -sed -i "s/MYSQL_VERSION/$MYSQL_PACKAGE_VERSION/" debian/control +sed -i'' \ + -e "s/MYSQL_VERSION/$MYSQL_PACKAGE_VERSION/g" \ + -e "s/MARIADB_VERSION/$MYSQL_PACKAGE_VERSION/g" \ + debian/control run debuild -us -uc run cd - diff --git a/storage/mroonga/packages/apt/env.sh.in b/storage/mroonga/packages/apt/env.sh.in index a44d6b36871cf7337ea226b44e40ca03494674b2..51109aee4f7285422ee63d2449af5b1e32b43bf7 100644 --- a/storage/mroonga/packages/apt/env.sh.in +++ b/storage/mroonga/packages/apt/env.sh.in @@ -7,8 +7,9 @@ libgroonga-dev pkg-config libmecab-dev mecab-utils -libmysqlclient-dev -libmysqld-dev +gdb +libxml2-dev +unixodbc-dev libssl-dev groonga-normalizer-mysql wget diff --git a/storage/mroonga/packages/apt/sign-packages.sh b/storage/mroonga/packages/apt/sign-packages.sh index 11a4aea26dbf433dcd2c0f90dbdfb40f353c5280..57c985f38f60a06b6093359cdf3b091a8fa7d47d 100755 --- a/storage/mroonga/packages/apt/sign-packages.sh +++ b/storage/mroonga/packages/apt/sign-packages.sh @@ -23,7 +23,7 @@ run() for code_name in ${CODES}; do case ${code_name} in - squeeze|wheezy|jessie|unstable) + jessie|stretch|unstable) distribution=debian ;; *) diff --git a/storage/mroonga/packages/apt/sign-repository.sh b/storage/mroonga/packages/apt/sign-repository.sh index fb0de850d6fd2db0da3fd170fd7752d0872d0b69..e0d963ffb5fcbeb44a27da6239f70d29c9333ce0 100755 --- a/storage/mroonga/packages/apt/sign-repository.sh +++ b/storage/mroonga/packages/apt/sign-repository.sh @@ -23,7 +23,7 @@ run() for code_name in ${CODES}; do case ${code_name} in - squeeze|wheezy|jessie|unstable) + jessie|stretch|unstable) distribution=debian ;; *) diff --git a/storage/mroonga/packages/apt/update-repository.sh b/storage/mroonga/packages/apt/update-repository.sh index da1f8cd121caf46fb3322db0be3f1cc5effd76ae..a95ad117ccc348dd6227ce547ca652b80dd147be 100755 --- a/storage/mroonga/packages/apt/update-repository.sh +++ b/storage/mroonga/packages/apt/update-repository.sh @@ -109,7 +109,7 @@ EOF for code_name in ${CODES}; do case ${code_name} in - squeeze|wheezy|jessie|unstable) + jessie|stretch|unstable) distribution=debian component=main ;; diff --git a/storage/mroonga/packages/check-utility.sh b/storage/mroonga/packages/check-utility.sh deleted file mode 100755 index 211e231a473ab683720356865c5f597a8581e365..0000000000000000000000000000000000000000 --- a/storage/mroonga/packages/check-utility.sh +++ /dev/null @@ -1,665 +0,0 @@ -#!/bin/sh - -# Usage: check-utility.sh [--install-groonga] -# [--check-install] -# [--check-address] -# [--enable-repository] -# -# CODES="squeeze wheezy unstable lucid natty oneiric precise" -# DISTRIBUTIONS="centos fedora" - -CHROOT_ROOT=/var/lib/chroot -CHECK_ADDRESS=0 -CHECK_INSTALL=0 -CHECK_INSTALL_PACKAGE=mysql-server-mroonga -CHECK_BUILD=0 -CHECK_DEPENDS=0 -CHECK_PROVIDES=0 -ENABLE_REPOSITORY=0 -DISABLE_REPOSITORY=0 -INSTALL_SCRIPT=0 -INSTALL_MROONGA=0 -UNINSTALL_MROONGA=0 - -common_deb_procedure () -{ - for code in $CODES; do - for arch in $DEB_ARCHITECTURES; do - root_dir=$CHROOT_ROOT/$code-$arch - eval $1 $code $arch $root_dir - done - done -} - -common_rpm_procedure () -{ - for dist in $DISTRIBUTIONS; do - case $dist in - "fedora") - DISTRIBUTIONS_VERSION="19" - ;; - "centos") - DISTRIBUTIONS_VERSION="5 6" - ;; - esac - for ver in $DISTRIBUTIONS_VERSION; do - for arch in $RPM_ARCHITECTURES; do - root_dir=$CHROOT_ROOT/$dist-$ver-$arch - eval $1 $dist $arch $ver $root_dir - done - done - done -} - -echo_packages_repository_address () -{ - root_dir=$1 - code=$2 - arch=$3 - address=`grep "packages.groonga.org" $root_dir/etc/hosts | grep -v "#"` - if [ -z "$address" ]; then - echo "$code-$arch: default" - else - echo "$code-$arch: $address" - fi -} - -setup_distributions () -{ - if [ -z "$DISTRIBUTIONS" ]; then - DISTRIBUTIONS="centos fedora" - fi -} - -setup_rpm_architectures () -{ - if [ -z "$RPM_ARCHITECTURES" ]; then - RPM_ARCHITECTURES="i386 x86_64" - fi -} - -setup_codes () -{ - if [ -z "$CODES" ]; then - CODES="squeeze wheezy jessie unstable lucid precise quantal raring" - fi -} -setup_deb_architectures () -{ - if [ -z "$DEB_ARCHITECTURES" ]; then - DEB_ARCHITECTURES="i386 amd64" - fi -} - -check_packages_repository_address () -{ - common_deb_procedure "check_packages_deb_repository_address" - common_rpm_procedure "check_packages_rpm_repository_address" -} - -check_packages_deb_repository_address () -{ - code=$1 - arch=$2 - root_dir=$4 - echo_packages_repository_address "$root_dir" "$code" "$arch" -} - -check_packages_rpm_repository_address () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - echo_packages_repository_address "$root_dir" "$dist-$ver" "$arch" -} - -host_address () -{ - ifconfig_result=`LANG=C /sbin/ifconfig wlan0` - inet_addr=`echo "$ifconfig_result" | grep "inet addr:192"` - address=`echo $inet_addr | ruby -ne '/inet addr:(.+?)\s/ =~ $_ && puts($1)'` - HOST_ADDRESS=$address -} - -check_build_packages () -{ - common_deb_procedure "check_build_deb_packages" - common_rpm_procedure "check_build_rpm_packages" -} - -check_build_deb_packages () -{ - code=$1 - arch=$2 - BASE_VERSION=`cat ../version` - RESULT_SET=`find apt/repositories -name "*$BASE_VERSION*" | grep $code | grep $arch` - if [ -z "$RESULT_SET" ]; then - printf "%8s %5s %s => 0 deb\n" $code $arch $BASE_VERSION - else - PACKAGE_COUNT=`find apt/repositories -name "*$BASE_VERSION*" | grep $code | grep $arch | wc | awk '{print \$1}'` - printf "%8s %5s %s => %2d debs\n" $code $arch $BASE_VERSION $PACKAGE_COUNT - fi -} - -check_build_rpm_packages () -{ - dist=$1 - arch=$2 - ver=$3 - BASE_VERSION=`cat ../version` - FIND_PATH=yum/repositories/$dist/$ver/$arch - RESULT_SET=`find $FIND_PATH -name "*$BASE_VERSION*"` - if [ -z "$RESULT_SET" ]; then - printf "%8s %6s %s => 0 rpm\n" $dist$ver $arch $BASE_VERSION - else - PACKAGE_COUNT=`find $FIND_PATH -name "*$BASE_VERSION*" | wc -l` - printf "%8s %6s %s => %2d rpms\n" $dist$ver $arch $BASE_VERSION $PACKAGE_COUNT - fi -} - -check_depends_packages () -{ - common_deb_procedure "check_depends_deb_packages" - common_rpm_procedure "check_depends_rpm_packages" -} - -check_depends_deb_packages () -{ - code=$1 - arch=$2 - BASE_VERSION=`cat ../version` - FIND_PATH=apt/repositories/*/pool/$code - RESULT_SET=`find $FIND_PATH -name "*$BASE_VERSION*.deb"` - if [ -z "$RESULT_SET" ]; then - printf "%8s %5s %s => 404 deb\n" $code $arch $BASE_VERSION - else - for pkg in $RESULT_SET; do - DEB_NAME=`basename $pkg` - DEPENDS=`dpkg -I $pkg | grep "Depends"` - printf "%8s %5s %s => %s\n" $code $arch $DEB_NAME "$DEPENDS" - done - fi -} - -check_depends_rpm_packages () -{ - dist=$1 - arch=$2 - ver=$3 - BASE_VERSION=`cat ../version` - FIND_PATH=yum/repositories/$dist/$ver/$arch - RESULT_SET=`find $FIND_PATH -name "*$BASE_VERSION*"` - if [ -z "$RESULT_SET" ]; then - printf "%8s %6s %s => 404 rpm\n" $dist$ver $arch $BASE_VERSION - else - for pkg in $RESULT_SET; do - RPM_NAME=`basename $pkg` - DEPENDS=`rpm -qp --requires $pkg | grep -i "mysql" | tr -t '\n' ' '` - printf "%9s %6s %s => %s\n" $dist$ver $arch $RPM_NAME "$DEPENDS" - done - fi -} - -check_provided_mysql_packages () -{ - common_deb_procedure "check_provided_mysql_deb_packages" - common_rpm_procedure "check_provided_mysql_rpm_packages" - for code in $CODES; do - echo $code - cat tmp/$code-amd64-mysql-server.txt - done - for dist in $DISTRIBUTIONS; do - echo $dist - cat tmp/$dist-x86_64-mysql-server.txt - done -} - -check_provided_mysql_deb_packages () -{ - code=$1 - arch=$2 - root_dir=$3 - cat > tmp/check-provided-mysql.sh < /dev/null -apt-cache show mysql-server | grep "Version" | head -1 > /tmp/$code-$arch-mysql-server.txt -EOF - if [ -d $root_dir ]; then - CHECK_SCRIPT=check-provided-mysql.sh - echo "copy check script $CHECK_SCRIPT to $root_dir/tmp" - sudo rm -f $root_dir/tmp/$CHECK_SCRIPT - cp tmp/$CHECK_SCRIPT $root_dir/tmp - sudo chmod 755 $root_dir/tmp/$CHECK_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$CHECK_SCRIPT - cp $root_dir/tmp/$code-$arch-mysql-server.txt tmp - fi -} - -check_provided_mysql_rpm_packages () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - cat > tmp/check-provided-mysql.sh < /dev/null -yum info mysql-server | grep "Version" > /tmp/$code-$arch-mysql-server.txt -EOF - if [ -d $root_dir ]; then - CHECK_SCRIPT=check-provided-mysql.sh - echo "copy check script $CHECK_SCRIPT to $root_dir/tmp" - sudo rm -f $root_dir/tmp/$CHECK_SCRIPT - cp tmp/$CHECK_SCRIPT $root_dir/tmp - sudo chmod 755 $root_dir/tmp/$CHECK_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$CHECK_SCRIPT - cp $root_dir/tmp/$code-$arch-mysql-server.txt tmp - fi -} - -check_installed_mroonga_packages () -{ - common_deb_procedure "check_installed_mroonga_deb_packages" - common_rpm_procedure "check_installed_mroonga_rpm_packages" -} - -check_installed_mroonga_deb_packages () -{ - code=$1 - arch=$2 - root_dir=$3 - cat > tmp/check-deb-mroonga.sh < tmp/check-rpm-mroonga.sh < tmp/install-aptitude-mroonga.sh < tmp/install-aptget-mroonga.sh < tmp/install-centos5-mroonga.sh < tmp/install-centos6-mroonga.sh < tmp/install-fedora-mroonga.sh < $UNINSTALL_SCRIPT < tmp/$UNINSTALL_SCRIPT < tmp/enable-repository.sh < /tmp/hosts -echo "$HOST_ADDRESS packages.groonga.org" >> /tmp/hosts -cp -f /tmp/hosts /etc/hosts -EOF - common_deb_procedure "enable_temporaly_mroonga_deb_repository" - common_rpm_procedure "enable_temporaly_mroonga_rpm_repository" - check_packages_repository_address -} - -enable_temporaly_mroonga_deb_repository () -{ - code=$1 - arch=$2 - root_dir=$4 - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - sudo cp tmp/enable-repository.sh $root_dir/tmp - sudo chname $code-$arch chroot $root_dir /tmp/enable-repository.sh - fi -} - -enable_temporaly_mroonga_rpm_repository () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - sudo cp tmp/enable-repository.sh $root_dir/tmp - sudo chname $code-$arch chroot $root_dir /tmp/enable-repository.sh - fi -} - -disable_temporaly_mroonga_repository () -{ - cat > tmp/disable-repository.sh < /tmp/hosts -cp -f /tmp/hosts /etc/hosts -EOF - common_deb_procedure "disable_temporaly_mroonga_deb_repository" - common_rpm_procedure "disable_temporaly_mroonga_rpm_repository" - check_packages_repository_address -} - -disable_temporaly_mroonga_deb_repository () -{ - code=$1 - arch=$2 - root_dir=$4 - DISABLE_SCRIPT=disable-repository.sh - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - cp tmp/$DISABLE_SCRIPT $root_dir/tmp - chmod 755 $root_dir/tmp/$DISABLE_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$DISABLE_SCRIPT - fi - -} - -disable_temporaly_mroonga_rpm_repository () -{ - dist=$1 - arch=$2 - ver=$3 - root_dir=$4 - DISABLE_SCRIPT=disable-repository.sh - today=`date '+%Y%m%d.%s'` - if [ -d $root_dir ]; then - sudo cp $root_dir/etc/hosts $root_dir/etc/hosts.$today - cp tmp/$DISABLE_SCRIPT $root_dir/tmp - chmod 755 $root_dir/tmp/$DISABLE_SCRIPT - sudo chname $code-$arch chroot $root_dir /tmp/$DISABLE_SCRIPT - fi -} - -host_address -echo $HOST_ADDRESS - -while [ $# -ne 0 ]; do - case $1 in - --check-install) - CHECK_INSTALL=1 - shift - if [ ! -z "$1" ]; then - case $1 in - groonga|mroonga|roonga|mecab|mysql) - CHECK_INSTALL_PACKAGE=$1 - ;; - *) - ;; - esac - fi - ;; - --check-address) - CHECK_ADDRESS=1 - shift - ;; - --check-depends) - CHECK_DEPENDS=1 - shift - ;; - --check-provides) - CHECK_PROVIDES=1 - shift - ;; - --check-build) - CHECK_BUILD=1 - shift - ;; - --enable-repository) - ENABLE_REPOSITORY=1 - shift - ;; - --disable-repository) - DISABLE_REPOSITORY=1 - shift - ;; - --install-mroonga) - INSTALL_MROONGA=1 - shift - ;; - --uninstall-mroonga) - UNINSTALL_MROONGA=1 - shift - ;; - --code) - shift - if [ "$1" = "all" ]; then - setup_codes - else - CODES=$1 - fi - shift - ;; - --code-arch) - shift - if [ "$1" = "all" ]; then - setup_deb_architectures - else - DEB_ARCHITECTURES=$1 - fi - shift - ;; - --dist) - shift - if [ "$1" = "all" ]; then - setup_distributions - else - DISTRIBUTIONS=$1 - fi - shift - ;; - --dist-arch) - shift - if [ "$1" = "all" ]; then - setup_rpm_architectures - else - RPM_ARCHITECTURES=$1 - fi - shift - ;; - *) - shift - ;; - esac -done - -mkdir -p tmp -setup_deb_architectures -setup_rpm_architectures - -if [ $CHECK_INSTALL -ne 0 ]; then - check_installed_mroonga_packages -fi -if [ $CHECK_ADDRESS -ne 0 ]; then - check_packages_repository_address -fi -if [ $CHECK_BUILD -ne 0 ]; then - check_build_packages -fi -if [ $CHECK_DEPENDS -ne 0 ]; then - check_depends_packages -fi -if [ $CHECK_PROVIDES -ne 0 ]; then - check_provided_mysql_packages -fi -if [ $ENABLE_REPOSITORY -ne 0 ]; then - enable_temporaly_mroonga_repository -fi -if [ $DISABLE_REPOSITORY -ne 0 ]; then - disable_temporaly_mroonga_repository -fi -if [ $INSTALL_MROONGA -ne 0 ]; then - install_mroonga_packages -fi -if [ $UNINSTALL_MROONGA -ne 0 ]; then - uninstall_mroonga_packages -fi - diff --git a/storage/mroonga/packages/rpm/centos/Makefile.am b/storage/mroonga/packages/rpm/centos/Makefile.am index e7b22cfa0250232793be7521d5c896afb37962ae..72d860a90f2c925b6806ecbc1b00e737cd15341d 100644 --- a/storage/mroonga/packages/rpm/centos/Makefile.am +++ b/storage/mroonga/packages/rpm/centos/Makefile.am @@ -1,9 +1,19 @@ EXTRA_DIST = \ mysql55-mroonga.spec.in \ mysql56-community-mroonga.spec.in \ - mariadb-mroonga.spec.in + mysql57-community-mroonga.spec.in \ + mariadb-mroonga.spec.in \ + mariadb-10.1-mroonga.spec.in \ + mariadb-10.2-mroonga.spec.in \ + percona-server-56-mroonga.spec.in \ + percona-server-57-mroonga.spec.in noinst_DATA = \ mysql55-mroonga.spec \ mysql56-community-mroonga.spec \ - mariadb-mroonga.spec + mysql57-community-mroonga.spec \ + mariadb-mroonga.spec \ + mariadb-10.1-mroonga.spec \ + mariadb-10.2-mroonga.spec \ + percona-server-56-mroonga.spec \ + percona-server-57-mroonga.spec diff --git a/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in index 04d1c41f2cc62fac268a3d95058b5e3f917e1bf0..d23c499fd4491d4be07d7f0df63c9ebee699eed7 100644 --- a/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in @@ -1,18 +1,18 @@ %define mariadb_epoch_default 1 -%define mariadb_version_default 5.5.41 +%define mariadb_version_default 5.5.56 %define mariadb_release_default 2 -%define mariadb_dist_default .el7_0 -%define mariadb_download_base_url_default http://vault.centos.org/7.1.1503/os/Source/SPackages +%define mariadb_dist_default .el7 +%define mariadb_download_base_url_default http://vault.centos.org/7.4.1708/os/Source/SPackages/ %define mariadb_spec_file_default mariadb.spec -%{!?mariadb_epoch:%define mariadb_epoch %{mariadb_epoch_default}} -%{!?mariadb_version:%define mariadb_version %{mariadb_version_default}} -%{!?mariadb_release:%define mariadb_release %{mariadb_release_default}} -%{!?mariadb_dist:%define mariadb_dist %{mariadb_dist_default}} -%{!?mariadb_download_base_url:%define mariadb_download_base_url %{mariadb_download_base_url_default}} -%{!?mariadb_spec_file:%define mariadb_spec_file %{mariadb_spec_file_default}} +%define _mariadb_epoch %{?mariadb_epoch:%{mariadb_epoch}}%{!?mariadb_epoch:%{mariadb_epoch_default}} +%define _mariadb_version %{?mariadb_version:%{mariadb_version}}%{!?mariadb_version:%{mariadb_version_default}} +%define _mariadb_release %{?mariadb_release:%{mariadb_release}}%{!?mariadb_release:%{mariadb_release_default}} +%define _mariadb_dist %{?mariadb_dist:%{mariadb_dist}}%{!?mariadb_dist:%{mariadb_dist_default}} +%define _mariadb_download_base_url %{?mariadb_download_base_url:%{mariadb_download_base_url}}%{!?mariadb_download_base_url:%{mariadb_download_base_url_default}} +%define _mariadb_spec_file %{?mariadb_spec_file:%{mariadb_spec_file}}%{!?mariadb_spec_file:%{mariadb_spec_file_default}} -%define mariadb_package_version %{mariadb_epoch}:%{mariadb_version}-%{mariadb_release}%{mariadb_dist} +%define _mariadb_package_version %{_mariadb_epoch}:%{_mariadb_version}-%{_mariadb_release}%{_mariadb_dist} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -30,9 +30,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: groonga-devel >= %{groonga_required_version} BuildRequires: groonga-normalizer-mysql-devel BuildRequires: wget -BuildRequires: mariadb-devel = %{mariadb_package_version} -Requires: mariadb-server = %{mariadb_package_version} -Requires: mariadb = %{mariadb_package_version} +BuildRequires: mariadb-devel = %{_mariadb_package_version} +Requires: mariadb-server = %{_mariadb_package_version} +Requires: mariadb = %{_mariadb_package_version} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql @@ -53,21 +53,21 @@ Documentation for Mroonga %prep %setup -q -n mroonga-%{version} -mariadb_full_version=%{mariadb_version}-%{mariadb_release}%{mariadb_dist} +mariadb_full_version=%{_mariadb_version}-%{_mariadb_release}%{_mariadb_dist} srpm=mariadb-${mariadb_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mariadb_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mariadb_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm rm ../../SRPMS/$srpm fi %build -mariadb_source=../mariadb-%{mariadb_version} +mariadb_source=../mariadb-%{_mariadb_version} if [ ! -d ${mariadb_source} ]; then rpmbuild -bc \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mariadb_spec_file} + ../../SPECS/%{_mariadb_spec_file} fi %configure \ --disable-static \ @@ -86,7 +86,7 @@ mv $RPM_BUILD_ROOT%{_datadir}/doc/mroonga/ mysql-mroonga-doc/ rm -rf $RPM_BUILD_ROOT %post -if /usr/bin/mysql -u root -e "quit"; then +if /usr/bin/mysql -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -128,7 +128,7 @@ eval $command || \ %preun uninstall_sql=%{_datadir}/mroonga/uninstall.sql -if mysql -u root -e "quit"; then +if mysql -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -154,6 +154,84 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Fri Sep 15 2017 Kouhei Sutou - 7.06-2 +- rebuild against the latest MariaDB. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Tue Dec 29 2015 Kouhei Sutou - 5.11-1 +- new upstream release. + +* Wed Dec 16 2015 Kouhei Sutou - 5.10-2 +- rebuild against MariaDB on CentOS 7.2. Reported by Larry Kim. Thanks!!! + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + +* Wed Jul 29 2015 Masafumi Yokoyama - 5.05-1 +- new upstream release. + * Mon Jun 29 2015 Masafumi Yokoyama - 5.04-1 - new upstream release. diff --git a/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in index e20e1b321627fd40960873b8515638597926141e..8bd2ba540d3939434c2974be856baa11ae4ae47c 100644 --- a/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in @@ -1,26 +1,26 @@ %{?scl:%scl_package mroonga} %{!?scl:%global pkg_name %{name}} -%{!?centos_ver:%define centos_ver 5} +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:5} -%if %{centos_ver} == 6 -%define mysql_version_default 5.5.41 -%define mysql_release_default 2 -%define mysql_dist_default el6.centos.alt -%define mysql_download_base_url_default http://vault.centos.org/6.6/SCL/Source/SPackages +%if %{_centos_ver} == 6 +%define mysql_version_default 5.5.52 +%define mysql_release_default 1 +%define mysql_dist_default el6 +%define mysql_download_base_url_default http://vault.centos.org/6.8/sclo/Source/rh/mysql55/ %define mysql_spec_file_default mysql.spec %else -%define mysql_version_default 5.5.40 -%define mysql_release_default 2 +%define mysql_version_default 5.5.45 +%define mysql_release_default 1 %define mysql_dist_default el5 %define mysql_download_base_url_default http://vault.centos.org/5.11/updates/SRPMS %define mysql_spec_file_default mysql.spec %endif -%{!?mysql_version:%define mysql_version %{mysql_version_default}} -%{!?mysql_release:%define mysql_release %{mysql_release_default}} -%{!?mysql_dist:%define mysql_dist %{mysql_dist_default}} -%{!?mysql_download_base_url:%define mysql_download_base_url %{mysql_download_base_url_default}} -%{!?mysql_spec_file:%define mysql_spec_file %{mysql_spec_file_default}} +%define _mysql_version %{?mysql_version:%{mysql_version}}%{!?mysql_version:%{mysql_version_default}} +%define _mysql_release %{?mysql_release:%{mysql_release}}%{!?mysql_release:%{mysql_release_default}} +%define _mysql_dist %{?mysql_dist:%{mysql_dist}}%{!?mysql_dist:%{mysql_dist_default}} +%define _mysql_download_base_url %{?mysql_download_base_url:%{mysql_download_base_url}}%{!?mysql_download_base_url:%{mysql_download_base_url_default}} +%define _mysql_spec_file %{?mysql_spec_file:%{mysql_spec_file}}%{!?mysql_spec_file:%{mysql_spec_file_default}} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -39,10 +39,10 @@ BuildRequires: groonga-devel >= %{groonga_required_version} BuildRequires: groonga-normalizer-mysql-devel BuildRequires: wget BuildRequires: which -BuildRequires: mysql55-mysql-devel = %{mysql_version}-%{mysql_release}.%{mysql_dist} +BuildRequires: mysql55-mysql-devel = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} BuildRequires: mysql55-build -Requires: mysql55-mysql-server = %{mysql_version}-%{mysql_release}.%{mysql_dist} -Requires: mysql55-mysql = %{mysql_version}-%{mysql_release}.%{mysql_dist} +Requires: mysql55-mysql-server = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} +Requires: mysql55-mysql = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql %{?scl:Requires: %scl_runtime} @@ -64,21 +64,21 @@ Documentation for Mroonga %prep %setup -q -n %{pkg_name}-%{version} -mysql_full_version=%{mysql_version}-%{mysql_release}.%{mysql_dist} +mysql_full_version=%{_mysql_version}-%{_mysql_release}.%{_mysql_dist} srpm=mysql55-mysql-${mysql_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mysql_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mysql_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm fi %build -mysql_source=../mysql-%{mysql_version} +mysql_source=../mysql-%{_mysql_version} if [ ! -d ${mysql_source} ]; then specs_dir= MYSQL_RPMBUILD_TEST=no rpmbuild -bp \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mysql_spec_file} + ../../SPECS/%{_mysql_spec_file} fi %configure --disable-static --with-mysql-source=${mysql_source} \ --disable-fast-mutexes \ @@ -97,10 +97,10 @@ rm -rf $RPM_BUILD_ROOT %post mysql_command=`scl enable mysql55 'which mysql'` -password_option="" -$mysql_command -u root -e "quit" -if [ $? -ne 0 ]; then - password_option="-p" +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then + password_option="" +else + password_option="-p" fi current_version=0 version=`echo %{groonga_required_version} | sed -e 's/\.//g'` @@ -137,7 +137,7 @@ eval $command || \ %preun uninstall_sql=%{_datadir}/mroonga/uninstall.sql mysql_command=`scl enable mysql55 'which mysql'` -if $mysql_command -u root -e "quit"; then +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -163,6 +163,87 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Fri Jan 13 2017 Kouhei Sutou - 6.13-1 +- new upstream release. + +* Thu Dec 29 2016 Kentaro Hayashi - 6.12-1 +- new upstream release. + +* Tue Nov 29 2016 Kentaro Hayashi - 6.11-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Fri Jan 29 2016 Kouhei Sutou - 5.12-1 +- new upstream release. + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + +* Wed Jul 29 2015 Masafumi Yokoyama - 5.05-1 +- new upstream release. + * Mon Jun 29 2015 Masafumi Yokoyama - 5.04-1 - new upstream release. diff --git a/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in index f3233d17afe5ab8efeded82b58bf17e51de48c42..dea7cebc7d95c7bea22226a6bd98c556a37872e7 100644 --- a/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in @@ -1,24 +1,24 @@ -%{!?centos_ver:%define centos_ver 6} +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:5} -%if %{centos_ver} == 7 -%define mysql_version_default 5.6.25 +%if %{_centos_ver} == 7 +%define mysql_version_default 5.6.37 %define mysql_release_default 2 %define mysql_dist_default el7 %define mysql_download_base_url_default http://repo.mysql.com/yum/mysql-5.6-community/el/7/SRPMS %define mysql_spec_file_default mysql.spec %else -%define mysql_version_default 5.6.25 +%define mysql_version_default 5.6.37 %define mysql_release_default 2 %define mysql_dist_default el6 %define mysql_download_base_url_default http://repo.mysql.com/yum/mysql-5.6-community/el/6/SRPMS %define mysql_spec_file_default mysql.spec %endif -%{!?mysql_version:%define mysql_version %{mysql_version_default}} -%{!?mysql_release:%define mysql_release %{mysql_release_default}} -%{!?mysql_dist:%define mysql_dist %{mysql_dist_default}} -%{!?mysql_download_base_url:%define mysql_download_base_url %{mysql_download_base_url_default}} -%{!?mysql_spec_file:%define mysql_spec_file %{mysql_spec_file_default}} +%define _mysql_version %{?mysql_version:%{mysql_version}}%{!?mysql_version:%{mysql_version_default}} +%define _mysql_release %{?mysql_release:%{mysql_release}}%{!?mysql_release:%{mysql_release_default}} +%define _mysql_dist %{?mysql_dist:%{mysql_dist}}%{!?mysql_dist:%{mysql_dist_default}} +%define _mysql_download_base_url %{?mysql_download_base_url:%{mysql_download_base_url}}%{!?mysql_download_base_url:%{mysql_download_base_url_default}} +%define _mysql_spec_file %{?mysql_spec_file:%{mysql_spec_file}}%{!?mysql_spec_file:%{mysql_spec_file_default}} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -38,9 +38,10 @@ BuildRequires: groonga-normalizer-mysql-devel BuildRequires: wget BuildRequires: which BuildRequires: gcc, gcc-c++ -BuildRequires: mysql-community-devel = %{mysql_version}-%{mysql_release}.%{mysql_dist} -Requires: mysql-community-server = %{mysql_version}-%{mysql_release}.%{mysql_dist} -Requires: mysql-community-client = %{mysql_version}-%{mysql_release}.%{mysql_dist} +BuildRequires: numactl-devel +BuildRequires: mysql-community-devel = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} +Requires: mysql-community-server = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} +Requires: mysql-community-client = %{_mysql_version}-%{_mysql_release}.%{_mysql_dist} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql @@ -61,21 +62,21 @@ Documentation for Mroonga %prep %setup -q -n mroonga-%{version} -mysql_full_version=%{mysql_version}-%{mysql_release}.%{mysql_dist} +mysql_full_version=%{_mysql_version}-%{_mysql_release}.%{_mysql_dist} srpm=mysql-community-${mysql_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mysql_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mysql_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm fi %build -mysql_source=../mysql-%{mysql_version}/mysql-%{mysql_version} +mysql_source=../mysql-%{_mysql_version}/mysql-%{_mysql_version} if [ ! -d ${mysql_source} ]; then specs_dir= MYSQL_RPMBUILD_TEST=no rpmbuild -bp \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mysql_spec_file} + ../../SPECS/%{_mysql_spec_file} fi %configure \ --disable-static \ @@ -102,10 +103,10 @@ else fi mysql_command=`which mysql` -password_option="" -$mysql_command -u root -e "quit" -if [ $? -ne 0 ]; then - password_option="-p" +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then + password_option="" +else + password_option="-p" fi current_version=0 version=`echo %{groonga_required_version} | sed -e 's/\.//g'` @@ -153,7 +154,7 @@ fi uninstall_sql=%{_datadir}/mroonga/uninstall.sql mysql_command=`which mysql` -if $mysql_command -u root -e "quit"; then +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -183,10 +184,118 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Wed Aug 23 2017 Kentaro Hayashi - 7.05-2 +- build against MySQL 5.6.37 on CentOS 7. Reported by Hiroshi Kagami. Thanks!!! + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Fri Jul 21 2017 Kentaro Hayashi - 7.04-2 +- build against MySQL 5.6.37 on CentOS 6. Reported by Hiroshi Kagami. Thanks!!! + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Apr 12 2017 Kentaro Hayashi - 7.01-2 +- build against MySQL 5.6.36 Reported by @tigersun2000. Thanks!!! + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Fri Jan 13 2017 Kouhei Sutou - 6.13-1 +- new upstream release. + +* Thu Dec 29 2016 Kentaro Hayashi - 6.12-1 +- new upstream release. + +* Tue Nov 29 2016 Kentaro Hayashi - 6.11-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Mon Oct 24 2016 Kouhei Sutou - 6.09-2 +- build against MySQL 5.6.34. Reported by Hiroshi Kagami. Thanks!!! + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Wed Sep 14 2016 Kentaro Hayashi - 6.08-2 +- build against MySQL 5.6.33. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Mon Jun 06 2016 Kouhei Sutou - 6.03-2 +- build against MySQL 5.6.30. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Fri Jan 29 2016 Kouhei Sutou - 5.12-1 +- new upstream release. + +* Tue Dec 29 2015 Kouhei Sutou - 5.11-1 +- new upstream release. + +* Wed Dec 09 2015 Kouhei Sutou - 5.10-2 +- build against MySQL 5.6.28. Reported by @stealthinu. Thanks!!! + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Sat Oct 03 2015 Kouhei Sutou - 5.08-2 +- build against MySQL 5.6.27. Reported by @star_orihime. Thanks!!! + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + +* Wed Jul 29 2015 Masafumi Yokoyama - 5.05-1 +- new upstream release. + * Mon Jun 29 2015 Masafumi Yokoyama - 5.04-1 - new upstream release. -* Thu Jun 02 2015 Masafumi Yokoyama - 5.03-2 +* Tue Jun 02 2015 Masafumi Yokoyama - 5.03-2 - build against MySQL 5.6.25. * Fri May 29 2015 HAYASHI Kentaro - 5.03-1 diff --git a/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in index cf1947e26764315d67886347b160b0a87e2643a9..abf3bfdee9eaa4f88e0665caefefc5cb95aad74f 100644 --- a/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in @@ -1,16 +1,16 @@ -%{!?centos_ver:%define centos_ver 6} +%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:5} -%define mysql_version_default 5.6.24 -%define mysql_release_default rel72.2 +%define mysql_version_default 5.6.37 +%define mysql_release_default rel82.2 %define mysql_dist_default %{?dist} -%define mysql_download_base_url_default http://repo.percona.com/centos/%{centos_ver}/SRPMS +%define mysql_download_base_url_default http://repo.percona.com/centos/%{_centos_ver}/SRPMS %define mysql_spec_file_default percona-server.spec -%{!?mysql_version:%define mysql_version %{mysql_version_default}} -%{!?mysql_release:%define mysql_release %{mysql_release_default}} -%{!?mysql_dist:%define mysql_dist %{mysql_dist_default}} -%{!?mysql_download_base_url:%define mysql_download_base_url %{mysql_download_base_url_default}} -%{!?mysql_spec_file:%define mysql_spec_file %{mysql_spec_file_default}} +%define _mysql_version %{?mysql_version:%{mysql_version}}%{!?mysql_version:%{mysql_version_default}} +%define _mysql_release %{?mysql_release:%{mysql_release}}%{!?mysql_release:%{mysql_release_default}} +%define _mysql_dist %{?mysql_dist:%{mysql_dist}}%{!?mysql_dist:%{mysql_dist_default}} +%define _mysql_download_base_url %{?mysql_download_base_url:%{mysql_download_base_url}}%{!?mysql_download_base_url:%{mysql_download_base_url_default}} +%define _mysql_spec_file %{?mysql_spec_file:%{mysql_spec_file}}%{!?mysql_spec_file:%{mysql_spec_file_default}} %define groonga_required_version @REQUIRED_GROONGA_VERSION@ @@ -31,10 +31,10 @@ BuildRequires: wget BuildRequires: which BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: Percona-Server-devel-56 = %{mysql_version}-%{mysql_release}%{mysql_dist} +BuildRequires: Percona-Server-devel-56 = %{_mysql_version}-%{_mysql_release}%{_mysql_dist} BuildRequires: selinux-policy-devel -Requires: Percona-Server-server-56 = %{mysql_version}-%{mysql_release}%{mysql_dist} -Requires: Percona-Server-client-56 = %{mysql_version}-%{mysql_release}%{mysql_dist} +Requires: Percona-Server-server-56 = %{_mysql_version}-%{_mysql_release}%{_mysql_dist} +Requires: Percona-Server-client-56 = %{_mysql_version}-%{_mysql_release}%{_mysql_dist} Requires: groonga-libs >= %{groonga_required_version} Requires: groonga-normalizer-mysql @@ -55,23 +55,26 @@ Documentation for Mroonga %prep %setup -q -n mroonga-%{version} -mysql_full_version=%{mysql_version}-%{mysql_release}.generic +mysql_full_version=%{_mysql_version}-%{_mysql_release}.generic srpm=Percona-Server-56-${mysql_full_version}.src.rpm if [ ! -f ../../SRPMS/$srpm ]; then - wget --continue -O ../../SRPMS/$srpm %{mysql_download_base_url}/$srpm + wget --continue -O ../../SRPMS/$srpm %{_mysql_download_base_url}/$srpm rpm -Uvh ../../SRPMS/$srpm fi %build -mysql_source=../percona-server-%{mysql_version}-$(echo %{mysql_release} | sed -e 's/rel//') +mysql_source=../percona-server-%{_mysql_version}-$(echo %{_mysql_release} | sed -e 's/rel//') if [ ! -d ${mysql_source} ]; then specs_dir= rpmbuild -bp \ --define 'runselftest 0' \ --define 'optflags -O0' \ - ../../SPECS/%{mysql_spec_file} + ../../SPECS/%{_mysql_spec_file} fi -%configure --disable-static --with-mysql-source=${mysql_source} \ +%configure \ + --disable-static \ + --with-mysql-source=${mysql_source} \ + --enable-fast-mutexes \ %{?mroonga_configure_options} make %{?_smp_mflags} @@ -94,9 +97,11 @@ fi mysql_command=`which mysql` password_option="" -$mysql_command -u root -e "quit" -if [ $? -ne 0 ]; then - password_option="-p" + +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then + password_option="" +else + password_option="-p" fi current_version=0 version=`echo %{groonga_required_version} | sed -e 's/\.//g'` @@ -144,7 +149,7 @@ fi uninstall_sql=%{_datadir}/mroonga/uninstall.sql mysql_command=`which mysql` -if $mysql_command -u root -e "quit"; then +if $mysql_command -u root -e "quit" > /dev/null 2>&1; then password_option="" else password_option="-p" @@ -174,5 +179,95 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi - 7.07-1 +- new upstream release. + +* Tue Aug 29 2017 Kentaro Hayashi - 7.06-1 +- new upstream release. + +* Mon Aug 14 2017 Kentaro Hayashi - 7.05-2 +- build against Percona Server 5.6.36rel82.1 Reported by @tigersun2000_twitter. Thanks!!! + +* Sat Jul 29 2017 Kentaro Hayashi - 7.05-1 +- new upstream release. + +* Thu Jun 29 2017 Kentaro Hayashi - 7.04-1 +- new upstream release. + +* Mon May 29 2017 Kentaro Hayashi - 7.03-1 +- new upstream release. + +* Thu May 17 2017 Kentaro Hayashi - 7.02-2 +- build against Percona Server 5.6.36. Reported by @pinpikokun. Thanks!!! + +* Sat Apr 29 2017 Kentaro Hayashi - 7.02-1 +- new upstream release. + +* Wed Mar 29 2017 Kentaro Hayashi - 7.01-1 +- new upstream release. + +* Thu Feb 09 2017 Kentaro Hayashi - 7.00-1 +- new upstream release. + +* Fri Jan 13 2017 Kouhei Sutou - 6.13-1 +- new upstream release. + +* Thu Dec 29 2016 Kentaro Hayashi - 6.12-1 +- new upstream release. + +* Tue Nov 29 2016 Kentaro Hayashi - 6.11-1 +- new upstream release. + +* Sat Oct 29 2016 Kentaro Hayashi - 6.10-1 +- new upstream release. + +* Mon Oct 24 2016 Kouhei Sutou - 6.09-2 +- build against Percona Server 5.6.33. Reported by Hiroshi Kagami. Thanks!!! + +* Thu Sep 29 2016 Kentaro Hayashi - 6.09-1 +- new upstream release. + +* Mon Aug 29 2016 Kentaro Hayashi - 6.08-1 +- new upstream release. + +* Fri Jul 29 2016 Kentaro Hayashi - 6.07-1 +- new upstream release. + +* Thu Jun 30 2016 Masafumi Yokoyama - 6.06-1 +- new upstream release. + +* Wed Jun 29 2016 Kentaro Hayashi - 6.05-1 +- new upstream release. + +* Sun May 29 2016 Kentaro Hayashi - 6.03-1 +- new upstream release. + +* Fri Apr 29 2016 HAYASHI Kentaro - 6.02-1 +- new upstream release. + +* Tue Mar 29 2016 Masafumi Yokoyama - 6.01-1 +- new upstream release. + +* Mon Feb 29 2016 Kouhei Sutou - 6.00-1 +- new upstream release. + +* Fri Jan 29 2016 Kouhei Sutou - 5.12-1 +- new upstream release. + +* Tue Dec 29 2015 Kouhei Sutou - 5.11-1 +- new upstream release. + +* Sun Nov 29 2015 Kouhei Sutou - 5.10-1 +- new upstream release. + +* Thu Oct 29 2015 Kouhei Sutou - 5.09-1 +- new upstream release. + +* Tue Sep 29 2015 Kouhei Sutou - 5.08-1 +- new upstream release. + +* Mon Aug 31 2015 Kouhei Sutou - 5.06-1 +- new upstream release. + * Tue Mar 17 2015 Kouhei Sutou - 5.00-1 - initial release. diff --git a/storage/mroonga/packages/source/Makefile.am b/storage/mroonga/packages/source/Makefile.am index 143f5d0387e52e2571a721d51513d06b220496e5..efd09777addbc2477e4f365bf55b13d058299532 100644 --- a/storage/mroonga/packages/source/Makefile.am +++ b/storage/mroonga/packages/source/Makefile.am @@ -1,17 +1,17 @@ MROONGA_BASE = $(PACKAGE)-$(VERSION) MROONGA_TAR_GZ = $(MROONGA_BASE).tar.gz -GROONGA_VERSION = 5.0.5 +GROONGA_VERSION = 7.0.7 GROONGA_BASE = groonga-$(GROONGA_VERSION) GROONGA_TAR_GZ = $(GROONGA_BASE).tar.gz -GROONGA_NORMALIZER_MYSQL_VERSION = 1.1.0 +GROONGA_NORMALIZER_MYSQL_VERSION = 1.1.1 GROONGA_NORMALIZER_MYSQL_BASE = \ groonga-normalizer-mysql-$(GROONGA_NORMALIZER_MYSQL_VERSION) GROONGA_NORMALIZER_MYSQL_TAR_GZ = \ $(GROONGA_NORMALIZER_MYSQL_BASE).tar.gz -MARIADB_VERSION = 10.0.20 +MARIADB_VERSION = 10.1.28 MARIADB_BASE = mariadb-$(MARIADB_VERSION) MARIADB_TAR_GZ = $(MARIADB_BASE).tar.gz @@ -29,7 +29,7 @@ CURL = curl --fail --silent --show-error all: -release: archive upload +release: download archive upload ensure-rsync-path: @if test -z "$(RSYNC_PATH)"; then \ @@ -88,6 +88,8 @@ tmp/$(MARIADB_WITH_MROONGA_BASE).stamp: $(MARIADB_WITH_MROONGA_ARCHIVES) mkdir -p $$(dirname $(BUNDLED_GROONGA_PATH)) tar xf tmp/$(GROONGA_TAR_GZ) rm -rf $(GROONGA_BASE)/test + cd $(GROONGA_BASE)/vendor && ruby download_mecab.rb + cd $(GROONGA_BASE)/vendor && ruby download_lz4.rb mv $(GROONGA_BASE) $(BUNDLED_GROONGA_PATH) tar xf tmp/$(GROONGA_NORMALIZER_MYSQL_TAR_GZ) @@ -103,7 +105,7 @@ files/$(MARIADB_WITH_MROONGA_BASE).tar.gz: tmp/$(MARIADB_WITH_MROONGA_BASE).stam mkdir -p files/ (cd tmp && tar czf ../$@ $(MARIADB_WITH_MROONGA_BASE)) -PATCHES = \ +PATCHES = \ patches/mariadb-10.0.3-windows-build.diff tmp/$(MARIADB_WITH_MROONGA_FOR_WINDOWS_BASE).stamp: tmp/$(MARIADB_WITH_MROONGA_BASE).stamp $(PATCHES) diff --git a/storage/mroonga/packages/ubuntu/Makefile.am b/storage/mroonga/packages/ubuntu/Makefile.am index 2297a50bfc9321d8d648648aea439bc5f5225ac1..7241391bcbf1c010362cc43e32971967cd83fb52 100644 --- a/storage/mroonga/packages/ubuntu/Makefile.am +++ b/storage/mroonga/packages/ubuntu/Makefile.am @@ -1,5 +1,13 @@ -CODE_NAMES = precise,trusty,utopic,vivid +CODE_NAMES = trusty,xenial,zesty SOURCE = ../$(PACKAGE)-$(VERSION).tar.gz +SOURCE_55_BASE = $(PACKAGE)-5.5 +SOURCE_55 = $(SOURCE_55_BASE)_$(VERSION).orig.tar.gz +SOURCE_56_BASE = $(PACKAGE)-5.6 +SOURCE_56 = $(SOURCE_56_BASE)_$(VERSION).orig.tar.gz +SOURCE_57_BASE = $(PACKAGE)-5.7 +SOURCE_57 = $(SOURCE_57_BASE)_$(VERSION).orig.tar.gz +SOURCE_MARIADB_10_0_BASE = $(PACKAGE)-mariadb-10.0 +SOURCE_MARIADB_10_0 = $(SOURCE_MARIADB_10_0_BASE)_$(VERSION).orig.tar.gz all: @@ -13,12 +21,37 @@ upload: source ensure-launchpad-configuration ./upload.rb \ --package '$(PACKAGE)' \ --version '$(VERSION)' \ - --source-archive '$(SOURCE)' \ + --source-archive-directory '$(builddir)/' \ --code-names '$(CODE_NAMES)' \ - --debian-directory '$(srcdir)/../debian/' \ + --debian-base-directory '$(srcdir)/../' \ + --ppa '$(LAUNCHPAD_PPA)' \ --pgp-sign-key '$(LAUNCHPAD_UPLOADER_PGP_KEY)' -source: $(SOURCE) +source: $(SOURCE_55) $(SOURCE_56) $(SOURCE_57) $(SOURCE_MARIADB_10_0) $(SOURCE): ln -s $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz $(SOURCE) + +$(SOURCE_55): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_55_BASE)-$(VERSION) + tar cfz $(SOURCE_55) $(SOURCE_55_BASE)-$(VERSION) + rm -r $(SOURCE_55_BASE)-$(VERSION) + +$(SOURCE_56): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_56_BASE)-$(VERSION) + tar cfz $(SOURCE_56) $(SOURCE_56_BASE)-$(VERSION) + rm -r $(SOURCE_56_BASE)-$(VERSION) + +$(SOURCE_57): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_57_BASE)-$(VERSION) + tar cfz $(SOURCE_57) $(SOURCE_57_BASE)-$(VERSION) + rm -r $(SOURCE_57_BASE)-$(VERSION) + +$(SOURCE_MARIADB_10_0): $(SOURCE) + tar xf $(SOURCE) + mv $(PACKAGE)-$(VERSION) $(SOURCE_MARIADB_10_0_BASE)-$(VERSION) + tar cfz $(SOURCE_MARIADB_10_0) $(SOURCE_MARIADB_10_0_BASE)-$(VERSION) + rm -r $(SOURCE_MARIADB_10_0_BASE)-$(VERSION) diff --git a/storage/mroonga/packages/ubuntu/upload.rb b/storage/mroonga/packages/ubuntu/upload.rb index 8743520b5ac7ffd8a1e9d086e2f3834ac623f314..1fedb2ecbe644ce50f5fbecad894bc94882b9c0c 100755 --- a/storage/mroonga/packages/ubuntu/upload.rb +++ b/storage/mroonga/packages/ubuntu/upload.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # -# Copyright(C) 2014 Kouhei Sutou +# Copyright(C) 2014-2016 Kouhei Sutou # Copyright(C) 2014 HAYASHI Kentaro # # This library is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ require "open-uri" class Uploader def initialize @dput_configuration_name = "groonga-ppa" + @use_pbuilder = false end def run @@ -36,7 +37,22 @@ class Uploader @required_groonga_version = required_groonga_version @code_names.each do |code_name| - upload(code_name) + mysql55_version = @mysql55_versions[code_name] + mysql56_version = @mysql56_versions[code_name] + mysql57_version = @mysql57_versions[code_name] + mariadb10_0_version = @mariadb10_0_versions[code_name] + if mysql55_version + upload(code_name, "5.5", mysql55_version) + end + if mysql56_version + upload(code_name, "5.6", mysql56_version) + end + if mysql57_version + upload(code_name, "5.7", mysql57_version) + end + if mariadb10_0_version + upload(code_name, "mariadb-10.0", mariadb10_0_version) + end end end @@ -66,18 +82,37 @@ allow_unsigned_uploads = 0 end def ensure_mysql_version - @mysql_version = {} + @mysql_versions = {} + @mysql55_versions = {} + @mysql56_versions = {} + @mysql57_versions = {} + @mariadb10_0_versions = {} @code_names.each do |code_name| - open("http://packages.ubuntu.com/#{code_name}/allpackages?format=txt.gz") do |file| - file.each_line do |line| - @mysql_version[code_name] = $1 if line =~ /\Amysql-server \((.+?)\).+/ + source_names = [code_name, "#{code_name}-updates"] + source_names.each do |source_name| + allpackages_url = + "http://packages.ubuntu.com/#{source_name}/allpackages?format=txt.gz" + open(allpackages_url) do |file| + file.each_line do |line| + case line + when /\Amysql-server \((.+?)[\s)]/ + @mysql_versions[code_name] = $1 + when /\Amysql-server-5\.5 \((.+?)[\s)]/ + @mysql55_versions[code_name] = $1 + when /\Amysql-server-5\.6 \((.+?)[\s)]/ + @mysql56_versions[code_name] = $1 + when /\Amysql-server-5\.7 \((.+?)[\s)]/ + @mysql57_versions[code_name] = $1 + when /\Amariadb-server-10\.0 \((.+?)[\s)]/ + @mariadb10_0_versions[code_name] = $1 + end + end end end end end def parse_command_line! - parser = OptionParser.new parser.on("--package=NAME", "The package name") do |name| @@ -87,59 +122,97 @@ allow_unsigned_uploads = 0 "The version") do |version| @version = version end - parser.on("--source-archive=ARCHIVE", - "The source archive") do |source_archive| - @source_archive = Pathname.new(source_archive).expand_path + parser.on("--source-archive-directory=DIRECTORY", + "The directory that has source archives") do |directory| + @source_archive_directory = Pathname.new(directory).expand_path end parser.on("--code-names=CODE_NAME1,CODE_NAME2,CODE_NAME3,...", Array, "The target code names") do |code_names| @code_names = code_names end - parser.on("--debian-directory=DIRECTORY", - "The debian/ directory") do |debian_directory| - @debian_directory = Pathname.new(debian_directory).expand_path + parser.on("--debian-base-directory=DIRECTORY", + "The directory that has debianXX/ directory") do |directory| + @debian_base_directory = Pathname.new(directory).expand_path + end + parser.on("--ppa=PPA", + "The personal package archive name (groonga-ppa or groonga-nightly") do |ppa| + @dput_configuration_name = ppa end parser.on("--pgp-sign-key=KEY", "The PGP key to sign .changes and .dsc") do |pgp_sign_key| @pgp_sign_key = pgp_sign_key end - parser.on("--pbuilder", - "Use pbuilder for build check") do |pbuilder| - @use_pbuilder = pbuilder + parser.on("--[no-]pbuilder", + "Use pbuilder for build check") do |use_pbuilder| + @use_pbuilder = use_pbuilder end parser.parse! end - def upload(code_name) + def upload(code_name, mysql_short_version, mysql_version) + default_mysql_version = (@mysql_versions[code_name] == mysql_version) + deb_package_name = "#{@package}-#{mysql_short_version}" in_temporary_directory do - FileUtils.cp(@source_archive.to_s, - "#{@package}_#{@version}.orig.tar.gz") - run_command("tar", "xf", @source_archive.to_s) - directory_name = "#{@package}-#{@version}" + source_archive = + @source_archive_directory + "#{deb_package_name}_#{@version}.orig.tar.gz" + run_command("tar", "xf", source_archive.to_s) + directory_name = "#{deb_package_name}-#{@version}" Dir.chdir(directory_name) do - FileUtils.cp_r(@debian_directory.to_s, "debian") + debian_directory = + @debian_base_directory + "debian-#{mysql_short_version}" + FileUtils.cp_r(debian_directory.to_s, "debian") deb_version = "#{current_deb_version.succ}~#{code_name}1" run_command("dch", "--distribution", code_name, "--newversion", deb_version, "Build for #{code_name}.") - case code_name - when "vivid" - run_command("sed", - "-i", "-e", "s,5\\.5,5.6,g", - "debian/rules") + remove_versionless_mroonga = true + if default_mysql_version or mysql_short_version.start_with?("mariadb-") + remove_versionless_mroonga = false + end + if remove_versionless_mroonga + control_content = File.read("debian/control") + File.open("debian/control", "w") do |control| + in_mysql_server_mroonga = false + control_content.each_line do |line| + case line.chomp + when "" + if in_mysql_server_mroonga + in_mysql_server_mroonga = false + else + control.print(line) + end + when "Package: mysql-server-mroonga" + in_mysql_server_mroonga = true + else + next if in_mysql_server_mroonga + control.print(line) + end + end + end end run_command("sed", - "-i", "-e", "s,MYSQL_VERSION,#{@mysql_version[code_name]},", + "-i", "-e", + "s,MYSQL_VERSION\\|MARIADB_VERSION,#{mysql_version},", "debian/control") - run_command("debuild", "-S", "-sa", "-pgpg2", "-k#{@pgp_sign_key}") + run_command("debuild", + "--no-lintian", + # Workaround for Launchpad. Launchpad doesn't accept + # .buildinfo yet. + # See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853795 + "--buildinfo-option=-O", + "-d", + "-S", + "-sa", + "-pgpg2", + "-k#{@pgp_sign_key}") if @use_pbuilder run_command("pbuilder-dist", code_name, "build", - "../#{@package}_#{deb_version}.dsc") + "../#{deb_package_name}_#{deb_version}.dsc") else run_command("dput", @dput_configuration_name, - "../#{@package}_#{deb_version}_source.changes") + "../#{deb_package_name}_#{deb_version}_source.changes") end end end diff --git a/storage/mroonga/packages/windows/Makefile.am b/storage/mroonga/packages/windows/Makefile.am index 192709fac6d7276a80fa3df1ac13ffd326c44fe3..240c3873a89280aeaa2e8e8d2b86b27e67882a6c 100644 --- a/storage/mroonga/packages/windows/Makefile.am +++ b/storage/mroonga/packages/windows/Makefile.am @@ -1,12 +1,12 @@ EXTRA_DIST = \ README.md \ - build-vc2013.bat \ - build-vc2013-zip-32.bat \ - build-vc2013-zip-64.bat \ - build-vc2013-msi-32.bat \ - build-vc2013-msi-64.bat \ build-vc2015.bat \ build-vc2015-zip-32.bat \ build-vc2015-zip-64.bat \ build-vc2015-msi-32.bat \ - build-vc2015-msi-64.bat + build-vc2015-msi-64.bat \ + build-vc2017.bat \ + build-vc2017-zip-32.bat \ + build-vc2017-zip-64.bat \ + build-vc2017-msi-32.bat \ + build-vc2017-msi-64.bat diff --git a/storage/mroonga/packages/windows/README.md b/storage/mroonga/packages/windows/README.md index f220634b1e7a8ab1f80e4860efe8ad3f9943b80a..8737f26232acf128a1b55ab4477e5abd805db070 100644 --- a/storage/mroonga/packages/windows/README.md +++ b/storage/mroonga/packages/windows/README.md @@ -6,16 +6,16 @@ TODO... ## Build with Visual C++ Express -You need to use Visual C++ 2013 or later to build Mroonga with Express -edition. `build-vc2013.bat` is a build batch script to build with -Visual C++ Express 2013. +You need to use Visual Studio 2015 for Windows Desktop or later to build Mroonga with express +edition. `build-vc2015.bat` is a build batch script to build with +Visual Studio 2015 for Windows Desktop. Note that you can't build MSI file with Express edition. You need to use Professional edition or upper editions to build MSI file. -## Build with Visual C++ Professional +## Build with Visual Studio Community You can build both zip file MSI file with Professional edition. But now, this feature is temporary disabled. -If you want to create MSI package, please uncomment in `build-vc2013.bat`. -And then, you can build MSI package with Visual Studio 2013 Professional. +If you want to create MSI package, please uncomment in `build-vc2015.bat`. +And then, you can build MSI package with Visual Studio 2015 Community. diff --git a/storage/mroonga/packages/windows/build-vc2013-msi-32.bat b/storage/mroonga/packages/windows/build-vc2013-msi-32.bat deleted file mode 100644 index 22b29972885b44bf8c30f2a13580e885c2604e28..0000000000000000000000000000000000000000 --- a/storage/mroonga/packages/windows/build-vc2013-msi-32.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-msi-32 -mkdir build-vc2013-msi-32 -cd build-vc2013-msi-32 -cmake ..\source -G "Visual Studio 12" > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target msi > msi.log -move *.msi ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013-msi-64.bat b/storage/mroonga/packages/windows/build-vc2013-msi-64.bat deleted file mode 100644 index c83a376cdb93edd59fe9c862de9c93a6ceeaca91..0000000000000000000000000000000000000000 --- a/storage/mroonga/packages/windows/build-vc2013-msi-64.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-msi-64 -mkdir build-vc2013-msi-64 -cd build-vc2013-msi-64 -cmake ..\source -G "Visual Studio 12 Win64" > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target msi > msi.log -move *.msi ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013-zip-32.bat b/storage/mroonga/packages/windows/build-vc2013-zip-32.bat deleted file mode 100644 index d3e0e4f8b8ef63250b337e86480af6fb2a0fb221..0000000000000000000000000000000000000000 --- a/storage/mroonga/packages/windows/build-vc2013-zip-32.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-zip-32 -mkdir build-vc2013-zip-32 -cd build-vc2013-zip-32 -cmake ..\source -G "Visual Studio 12" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target package > zip.log -move *.zip ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013-zip-64.bat b/storage/mroonga/packages/windows/build-vc2013-zip-64.bat deleted file mode 100644 index 6ca288b6a8b423e721424062fbbd6adca54f702b..0000000000000000000000000000000000000000 --- a/storage/mroonga/packages/windows/build-vc2013-zip-64.bat +++ /dev/null @@ -1,8 +0,0 @@ -rmdir /S /Q build-vc2013-zip-64 -mkdir build-vc2013-zip-64 -cd build-vc2013-zip-64 -cmake ..\source -G "Visual Studio 12 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log -cmake --build . --config RelWithDebInfo > build.log -cmake --build . --config RelWithDebInfo --target package > zip.log -move *.zip ..\ -cd .. diff --git a/storage/mroonga/packages/windows/build-vc2013.bat b/storage/mroonga/packages/windows/build-vc2013.bat deleted file mode 100644 index 99d7e4042c5bbfef2a8eb13300b8cf6fb11a7d56..0000000000000000000000000000000000000000 --- a/storage/mroonga/packages/windows/build-vc2013.bat +++ /dev/null @@ -1,4 +0,0 @@ -build-vc2013-zip-32.bat -build-vc2013-zip-64.bat -REM build-vc2013-msi-32.bat -REM build-vc2013-msi-64.bat diff --git a/storage/mroonga/packages/windows/build-vc2015-msi-32.bat b/storage/mroonga/packages/windows/build-vc2015-msi-32.bat index 4c92b5c02cc58cdcee3d75ecc564601a451f1bbe..69d803e84febdc21c2a364d6ce8d590773c4d9a1 100644 --- a/storage/mroonga/packages/windows/build-vc2015-msi-32.bat +++ b/storage/mroonga/packages/windows/build-vc2015-msi-32.bat @@ -1,7 +1,7 @@ rmdir /S /Q build-vc2015-msi-32 mkdir build-vc2015-msi-32 cd build-vc2015-msi-32 -cmake ..\source -G "Visual Studio 14" > config.log +cmake ..\source -G "Visual Studio 14 2015" > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target msi > msi.log move *.msi ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015-msi-64.bat b/storage/mroonga/packages/windows/build-vc2015-msi-64.bat index 82bc2a148ec64cc6f33686f62ed07c2d4e0709da..a3d6681bf3b4360c288b9395066d74a172fdfd1d 100644 --- a/storage/mroonga/packages/windows/build-vc2015-msi-64.bat +++ b/storage/mroonga/packages/windows/build-vc2015-msi-64.bat @@ -1,7 +1,7 @@ rmdir /S /Q build-vc2015-msi-64 mkdir build-vc2015-msi-64 cd build-vc2015-msi-64 -cmake ..\source -G "Visual Studio 14 Win64" > config.log +cmake ..\source -G "Visual Studio 14 2015 Win64" > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target msi > msi.log move *.msi ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015-zip-32.bat b/storage/mroonga/packages/windows/build-vc2015-zip-32.bat index 5cef259afe5c91312d52c9a23697c48155835ffe..8247fd542f3ab93c21c1db3a34d93dffad836f98 100644 --- a/storage/mroonga/packages/windows/build-vc2015-zip-32.bat +++ b/storage/mroonga/packages/windows/build-vc2015-zip-32.bat @@ -1,7 +1,12 @@ rmdir /S /Q build-vc2015-zip-32 mkdir build-vc2015-zip-32 cd build-vc2015-zip-32 -cmake ..\source -G "Visual Studio 14" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log +cmake ..\source -G "Visual Studio 14 2015" ^ + -DMRN_GROONGA_EMBED=OFF ^ + -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF ^ + -DGRN_WITH_BUNDLED_LZ4=ON ^ + -DGRN_WITH_BUNDLED_MECAB=ON ^ + > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target package > zip.log move *.zip ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015-zip-64.bat b/storage/mroonga/packages/windows/build-vc2015-zip-64.bat index caabca179e75b3ba206a294f3aff5cd64bd5604e..b56d80eb151594411fd326d937b3842f358d9b00 100644 --- a/storage/mroonga/packages/windows/build-vc2015-zip-64.bat +++ b/storage/mroonga/packages/windows/build-vc2015-zip-64.bat @@ -1,7 +1,12 @@ rmdir /S /Q build-vc2015-zip-64 mkdir build-vc2015-zip-64 cd build-vc2015-zip-64 -cmake ..\source -G "Visual Studio 14 Win64" -DMRN_GROONGA_EMBED=OFF -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF > config.log +cmake ..\source -G "Visual Studio 14 2015 Win64" ^ + -DMRN_GROONGA_EMBED=OFF ^ + -DMRN_GROONGA_NORMALIZER_MYSQL_EMBED=OFF ^ + -DGRN_WITH_BUNDLED_LZ4=ON ^ + -DGRN_WITH_BUNDLED_MECAB=ON ^ + > config.log cmake --build . --config RelWithDebInfo > build.log cmake --build . --config RelWithDebInfo --target package > zip.log move *.zip ..\ diff --git a/storage/mroonga/packages/windows/build-vc2015.bat b/storage/mroonga/packages/windows/build-vc2015.bat index f9ac1765792225ed7520c79d50e44322f434259b..729f181dbe38ff8d612376b51da3828ca108afcc 100644 --- a/storage/mroonga/packages/windows/build-vc2015.bat +++ b/storage/mroonga/packages/windows/build-vc2015.bat @@ -1,4 +1,4 @@ -build-vc2015-zip-32.bat -build-vc2015-zip-64.bat +call build-vc2015-zip-32.bat +call build-vc2015-zip-64.bat REM build-vc2015-msi-32.bat REM build-vc2015--msi-64.bat diff --git a/storage/mroonga/packages/yum/Makefile.am b/storage/mroonga/packages/yum/Makefile.am index 8321619868faebc00b39c68ff61a85f070e8c8f4..9d1bd6061c67ec916d08afa27f865d92171eebb1 100644 --- a/storage/mroonga/packages/yum/Makefile.am +++ b/storage/mroonga/packages/yum/Makefile.am @@ -1,7 +1,16 @@ REPOSITORIES_PATH = repositories DISTRIBUTIONS = centos ARCHITECTURES = i386 x86_64 -MYSQL_VARIANTS = mysql55 mysql56-community mariadb percona-server-56 +MYSQL_VARIANTS = \ + mysql55 \ + mysql56-community \ + mysql57-community \ + mariadb \ + mariadb-10.1 \ + mariadb-10.2 \ + percona-server-56 \ + percona-server-57 +CENTOS_VERSIONS = 6 7 SPEC_DIR = $(builddir)/../rpm/centos all: @@ -47,7 +56,8 @@ build-in-vm: source specs env.sh "$(PACKAGE)" \ "$(SPEC_DIR)" \ "$(MYSQL_VARIANTS)" \ - "$(ARCHITECTURES)" + "$(ARCHITECTURES)" \ + "$(CENTOS_VERSIONS)" source: tmp/$(PACKAGE)-$(VERSION).tar.gz @@ -61,4 +71,7 @@ $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz: specs: $(SPEC_DIR)/mysql55-$(PACKAGE).spec specs: $(SPEC_DIR)/mysql56-community-$(PACKAGE).spec specs: $(SPEC_DIR)/mariadb-$(PACKAGE).spec +specs: $(SPEC_DIR)/mariadb-10.1-$(PACKAGE).spec +specs: $(SPEC_DIR)/mariadb-10.2-$(PACKAGE).spec specs: $(SPEC_DIR)/percona-server-56-$(PACKAGE).spec +specs: $(SPEC_DIR)/percona-server-57-$(PACKAGE).spec diff --git a/storage/mroonga/packages/yum/Vagrantfile b/storage/mroonga/packages/yum/Vagrantfile index da41350eed31e639ee21781095e123c77072eeb4..af14bc9a76b08e1c81b80935a745e76763a8b13c 100644 --- a/storage/mroonga/packages/yum/Vagrantfile +++ b/storage/mroonga/packages/yum/Vagrantfile @@ -6,32 +6,23 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vms = [ - { - :id => "centos-5-i386", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.11-i386_chef-provisionerless.box", - }, - { - :id => "centos-5-x86_64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-5.11_chef-provisionerless.box", - }, { :id => "centos-6-i386", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6-i386_chef-provisionerless.box", + :box => "bento/centos-6.9-i386", }, { :id => "centos-6-x86_64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.6_chef-provisionerless.box", + :box => "bento/centos-6.9", }, { :id => "centos-7-x86_64", - :box_url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.1_chef-provisionerless.box", + :box => "bento/centos-7.4", }, ] vms.each do |vm| config.vm.define(vm[:id]) do |node| - node.vm.box = vm[:id] - node.vm.box_url = vm[:box_url] + node.vm.box = vm[:box] node.vm.provision(:shell, :path => "build-rpm.sh") node.vm.provider("virtualbox") do |virtual_box| system_n_cpus = 1 @@ -44,6 +35,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vm_n_cpus = 1 end virtual_box.cpus = vm_n_cpus + virtual_box.memory = (ENV["VM_MEMORY"] || 1024).to_i end end end diff --git a/storage/mroonga/packages/yum/build-in-vm.sh b/storage/mroonga/packages/yum/build-in-vm.sh index cf9ef581fd0e4ea79193041a08d5663be39a428f..fc84e45024c71aeac915d53d430a215ea794d93e 100755 --- a/storage/mroonga/packages/yum/build-in-vm.sh +++ b/storage/mroonga/packages/yum/build-in-vm.sh @@ -1,8 +1,8 @@ #!/bin/sh -if [ $# != 4 ]; then +if [ $# != 5 ]; then echo "Usage: $0 PACKAGE SPEC_DIR MYSQL_VARIANTS ARCHITECTURES" - echo " e.g.: $0 mroonga ../rpm/centos 'mysql55 mariadb' 'i386 x86_64'" + echo " e.g.: $0 mroonga ../rpm/centos 'mysql55 mariadb' 'i386 x86_64' '6 7'" exit 1 fi @@ -10,6 +10,7 @@ PACKAGE="$1" SPEC_DIR="$2" MYSQL_VARIANTS="$3" ARCHITECTURES="$4" +CENTOS_VERSIONS="$5" run() { @@ -30,21 +31,42 @@ for mysql_variant in ${MYSQL_VARIANTS}; do architectures="${ARCHITECTURES}" case ${mysql_variant} in mysql55) - centos_versions="5 6" + centos_versions="6" ;; mysql56-community) centos_versions="6 7" ;; + mysql57-community) + centos_versions="6 7" + ;; mariadb) centos_versions="7" ;; + mariadb-10.1) + centos_versions="6 7" + ;; + mariadb-10.2) + centos_versions="6 7" + ;; percona-server-56) centos_versions="6 7" ;; + percona-server-57) + centos_versions="6 7" + ;; esac for architecture in ${architectures}; do for centos_version in ${centos_versions}; do + skip=1 + for given_version in ${CENTOS_VERSIONS}; do + if [ ${given_version} = ${centos_version} ]; then + skip=0 + fi + done + if [ $skip -eq 1 ]; then + continue + fi if [ ${mysql_variant} = mysql55 -a ${centos_version} = 6 -a ${architecture} = i386 ]; then continue fi diff --git a/storage/mroonga/packages/yum/build-rpm.sh b/storage/mroonga/packages/yum/build-rpm.sh index 8661e659390bbe8426c105eb5c5a915fbf711060..6ba943ae74d32e21111e3ed80b9412a1c838ed1b 100755 --- a/storage/mroonga/packages/yum/build-rpm.sh +++ b/storage/mroonga/packages/yum/build-rpm.sh @@ -70,36 +70,94 @@ case ${distribution} in run yum install -y mariadb-devel ;; centos) + release_rpm=groonga-release-1.3.0-1.noarch.rpm + if [ ${distribution_version} = 5 ]; then + wget http://packages.groonga.org/${distribution}/${release_rpm} + run yum install -y --nogpgcheck ${release_rpm} + rm -f ${release_rpm} + else + run yum install -y \ + http://packages.groonga.org/${distribution}/${release_rpm} + fi + run yum makecache + case ${package_name} in mysql55-${PACKAGE}) USE_MYSQLSERVICES_COMPAT=yes run yum install -y scl-utils-build if [ ${distribution_version} = 6 ]; then - run yum install -y centos-release-SCL + run yum install -y centos-release-scl fi run yum install -y mysql55-mysql-devel mysql55-build ;; - mysql56-community-${PACKAGE}) - release_rpm=mysql-community-release-el${distribution_version}-5.noarch.rpm + mysql5?-community-${PACKAGE}) + release_rpm=mysql-community-release-el${distribution_version}-7.noarch.rpm run yum -y install http://repo.mysql.com/${release_rpm} - run yum -y install mysql-community-devel + if [ "${package_name}" = "mysql57-community-${PACKAGE}" ]; then + run yum install -y yum-utils + run yum-config-manager --disable mysql56-community + run yum-config-manager --enable mysql57-community + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi + fi + run yum install -y mysql-community-devel ;; mariadb-${PACKAGE}) - run yum -y install mariadb-devel - ;; + run yum install -y mariadb-devel + ;; + mariadb-10.1-${PACKAGE}) + if [ "${architecture}" = "x86_64" ]; then + mariadb_architecture="amd64" + else + mariadb_architecture="x86" + fi + cat < /etc/yum.repos.d/MariaDB.repo +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.1/${distribution}${distribution_version}-${mariadb_architecture} +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 +REPO + run yum install -y MariaDB-devel + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi + ;; + mariadb-10.2-${PACKAGE}) + if [ "${architecture}" = "x86_64" ]; then + mariadb_architecture="amd64" + else + mariadb_architecture="x86" + fi + cat < /etc/yum.repos.d/MariaDB.repo +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.2/${distribution}${distribution_version}-${mariadb_architecture} +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 +REPO + run yum install -y MariaDB-devel + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi + ;; percona-server-56-${PACKAGE}) - release_rpm_version=0.1-3 + release_rpm_version=0.1-4 + release_rpm=percona-release-${release_rpm_version}.noarch.rpm + run yum install -y http://www.percona.com/downloads/percona-release/redhat/${release_rpm_version}/${release_rpm} + run yum install -y Percona-Server-devel-56 + ;; + percona-server-57-${PACKAGE}) + release_rpm_version=0.1-4 release_rpm=percona-release-${release_rpm_version}.noarch.rpm - run yum -y install http://www.percona.com/downloads/percona-release/redhat/${release_rpm_version}/${release_rpm} - run yum -y install Percona-Server-devel-56 + run yum install -y http://www.percona.com/downloads/percona-release/redhat/${release_rpm_version}/${release_rpm} + run yum install -y Percona-Server-devel-57 + if [ ${distribution_version} = 6 ]; then + run yum install -y cmake28 + fi ;; esac - - release_rpm=groonga-release-1.1.0-1.noarch.rpm - wget http://packages.groonga.org/${distribution}/${release_rpm} - run rpm -U ${release_rpm} - rm -f ${release_rpm} - run yum makecache ;; esac run yum install -y ${DEPENDED_PACKAGES} @@ -109,6 +167,11 @@ if [ "${package_name}" = "percona-server-56-${PACKAGE}" ]; then rpmbuild_options="$rpmbuild_options --define 'dist .el7'" fi fi +if [ "${package_name}" = "percona-server-57-${PACKAGE}" ]; then + if [ "${distribution_version}" = "7" ]; then + rpmbuild_options="$rpmbuild_options --define 'dist .el7'" + fi +fi if [ "${USE_MYSQLSERVICES_COMPAT}" = "yes" ]; then rpmbuild_options="$rpmbuild_options --define 'mroonga_configure_options --with-libmysqlservices-compat'" fi diff --git a/storage/mroonga/packages/yum/env.sh.in b/storage/mroonga/packages/yum/env.sh.in index 8c6d05baf5c163d84396b9f7979c2d854de64cb5..3d327a17efb8144e5bd5938cd2b505a5fcd3098d 100644 --- a/storage/mroonga/packages/yum/env.sh.in +++ b/storage/mroonga/packages/yum/env.sh.in @@ -9,6 +9,7 @@ make gperf readline-devel openssl-devel +zlib-devel time wget ncurses-devel @@ -23,6 +24,9 @@ perl-Env perl-Test-Simple pam-devel selinux-policy-devel +numactl-devel groonga-devel groonga-normalizer-mysql-devel +cyrus-sasl-devel +openldap-devel " diff --git a/storage/mroonga/packages/yum/update-repository.sh b/storage/mroonga/packages/yum/update-repository.sh index 630b6c87422d396351bba886c4d497b9d5a6b277..59eeafa55aa07cbeb41181592476fd78565ee6b5 100755 --- a/storage/mroonga/packages/yum/update-repository.sh +++ b/storage/mroonga/packages/yum/update-repository.sh @@ -22,8 +22,6 @@ run() for distribution in ${DISTRIBUTIONS}; do for dir in ${DESTINATION}${distribution}/*/*; do - # "--checksum sha" is for CentOS 5. If we drop CentOS 5 support, - # we can remove the option. - test -d $dir && run createrepo --checksum sha $dir + test -d $dir && run createrepo $dir done; done diff --git a/storage/mroonga/plugin_version b/storage/mroonga/plugin_version index 48c32b26a12f0ae8d13b5a7dd4bc326546f2a80d..120096f1f8f0a7e7e21d740bb0bbf808dabb950c 100644 --- a/storage/mroonga/plugin_version +++ b/storage/mroonga/plugin_version @@ -1 +1 @@ -5.4 \ No newline at end of file +7.7 \ No newline at end of file diff --git a/storage/mroonga/required_groonga_version b/storage/mroonga/required_groonga_version index a1ef0cae1833461faa044dad33ce6f3a7acba402..024b4b9b53abac1fe245bcd979d771af05c6075d 100644 --- a/storage/mroonga/required_groonga_version +++ b/storage/mroonga/required_groonga_version @@ -1 +1 @@ -5.0.2 +7.0.6 diff --git a/storage/mroonga/test/run-sql-test.sh b/storage/mroonga/test/run-sql-test.sh index f1679dc70fa2e889600ad14654d8eb32921078c8..d3aaf6aecf709e0cde497b10f851e5cf980f3432 100755 --- a/storage/mroonga/test/run-sql-test.sh +++ b/storage/mroonga/test/run-sql-test.sh @@ -1,7 +1,7 @@ #!/bin/sh # # Copyright(C) 2010 Tetsuro IKEDA -# Copyright(C) 2010-2013 Kouhei Sutou +# Copyright(C) 2010-2017 Kouhei Sutou # Copyright(C) 2011 Kazuhiko # # This library is free software; you can redistribute it and/or @@ -16,7 +16,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA export BASE_DIR="$(cd $(dirname $0); pwd)" top_dir="$BASE_DIR/.." @@ -24,31 +24,44 @@ mroonga_test_dir="${top_dir}/mysql-test/mroonga" n_processors=1 case `uname` in - Linux) - n_processors="$(grep '^processor' /proc/cpuinfo | wc -l)" - ;; - Darwin) - n_processors="$(/usr/sbin/sysctl -n hw.ncpu)" - ;; - *) - : - ;; + Linux) + n_processors="$(grep '^processor' /proc/cpuinfo | wc -l)" + ;; + Darwin) + n_processors="$(/usr/sbin/sysctl -n hw.ncpu)" + ;; + *) + : + ;; esac if [ "$NO_MAKE" != "yes" ]; then - MAKE_ARGS= - if [ -n "$n_processors" ]; then - MAKE_ARGS="-j${n_processors}" - fi - make $MAKE_ARGS -C $top_dir > /dev/null || exit 1 + MAKE_ARGS= + if [ -n "$n_processors" ]; then + MAKE_ARGS="-j${n_processors}" + fi + make $MAKE_ARGS -C $top_dir > /dev/null || exit 1 fi . "${top_dir}/config.sh" bundled_groonga_normalizer_mysql_dir="${top_dir}/vendor/groonga/vendor/plugins/groonga-normalizer-mysql" if [ -d "${bundled_groonga_normalizer_mysql_dir}" ]; then - GRN_PLUGINS_DIR="${bundled_groonga_normalizer_mysql_dir}" - export GRN_PLUGINS_DIR + GRN_PLUGINS_DIR="${bundled_groonga_normalizer_mysql_dir}" + export GRN_PLUGINS_DIR +fi + +maria_storage_dir="${MYSQL_SOURCE_DIR}/storage/maria" +if [ -d "${maria_storage_dir}" ]; then + mariadb="yes" +else + mariadb="no" +fi +percona_udf_dir="${MYSQL_SOURCE_DIR}/plugin/percona-udf" +if [ -d "${percona_udf_dir}" ]; then + percona="yes" +else + percona="no" fi source_mysql_test_dir="${MYSQL_SOURCE_DIR}/mysql-test" @@ -58,51 +71,47 @@ source_test_include_dir="${source_mysql_test_dir}/include" build_test_suites_dir="${build_mysql_test_dir}/suite" build_test_include_dir="${build_mysql_test_dir}/include" case "${MYSQL_VERSION}" in - 5.1.*) - plugins_dir="${MYSQL_BUILD_DIR}/lib/mysql/plugin" - if [ ! -d "${build_test_suites_dir}" ]; then - mkdir -p "${build_test_suites_dir}" - fi - ;; - *) - if [ ! -d "${build_test_suites_dir}" ]; then - ln -s "${source_test_suites_dir}" "${build_test_suites_dir}" - fi - maria_storage_dir="${MYSQL_SOURCE_DIR}/storage/maria" - if [ -d "${maria_storage_dir}" ]; then - mariadb="yes" - else - mariadb="no" - fi - if [ "${mariadb}" = "yes" ]; then - if [ "${MRN_BUNDLED}" != "TRUE" ]; then - mariadb_mroonga_plugin_dir="${MYSQL_BUILD_DIR}/plugin/mroonga" - if [ ! -e "${mariadb_mroonga_plugin_dir}" ]; then - ln -s "${top_dir}" "${mariadb_mroonga_plugin_dir}" - fi - fi - plugins_dir= - else - plugins_dir="${MYSQL_SOURCE_DIR}/lib/plugin" + 5.1.*) + plugins_dir="${MYSQL_BUILD_DIR}/lib/mysql/plugin" + if [ ! -d "${build_test_suites_dir}" ]; then + mkdir -p "${build_test_suites_dir}" + fi + ;; + *) + if [ ! -d "${build_test_suites_dir}" ]; then + ln -s "${source_test_suites_dir}" "${build_test_suites_dir}" + fi + if [ "${mariadb}" = "yes" ]; then + if [ "${MRN_BUNDLED}" != "TRUE" ]; then + mariadb_mroonga_plugin_dir="${MYSQL_BUILD_DIR}/plugin/mroonga" + if [ ! -e "${mariadb_mroonga_plugin_dir}" ]; then + ln -s "${top_dir}" "${mariadb_mroonga_plugin_dir}" fi - ;; + fi + plugins_dir= + elif [ "${percona}" = "yes" ]; then + plugins_dir="${MYSQL_SOURCE_DIR}/lib/mysql/plugin" + else + plugins_dir="${MYSQL_SOURCE_DIR}/lib/plugin" + fi + ;; esac same_link_p() { - src=$1 - dest=$2 - if [ -L "$dest" -a "$(readlink "$dest")" = "$src" ]; then - return 0 - else - return 1 - fi + src=$1 + dest=$2 + if [ -L "$dest" -a "$(readlink "$dest")" = "$src" ]; then + return 0 + else + return 1 + fi } mroonga_mysql_test_suite_dir="${build_test_suites_dir}/mroonga" if ! same_link_p "${mroonga_test_dir}" "${mroonga_mysql_test_suite_dir}"; then - rm -rf "${mroonga_mysql_test_suite_dir}" - ln -s "${mroonga_test_dir}" "${mroonga_mysql_test_suite_dir}" + rm -rf "${mroonga_mysql_test_suite_dir}" + ln -s "${mroonga_test_dir}" "${mroonga_mysql_test_suite_dir}" fi innodb_test_suite_dir="${build_test_suites_dir}/innodb" @@ -110,27 +119,27 @@ mroonga_wrapper_innodb_test_suite_name="mroonga_wrapper_innodb" mroonga_wrapper_innodb_test_suite_dir="${build_test_suites_dir}/${mroonga_wrapper_innodb_test_suite_name}" mroonga_wrapper_innodb_include_dir="${mroonga_wrapper_innodb_test_suite_dir}/include/" if [ "$0" -nt "$(dirname "${mroonga_wrapper_innodb_test_suite_dir}")" ]; then - rm -rf "${mroonga_wrapper_innodb_test_suite_dir}" + rm -rf "${mroonga_wrapper_innodb_test_suite_dir}" fi if [ ! -d "${mroonga_wrapper_innodb_test_suite_dir}" ]; then - cp -rp "${innodb_test_suite_dir}" "${mroonga_wrapper_innodb_test_suite_dir}" - mkdir -p "${mroonga_wrapper_innodb_include_dir}" - cp -rp "${source_test_include_dir}"/innodb[-_]*.inc \ - "${mroonga_wrapper_innodb_include_dir}" - ruby -i'' \ - -pe "\$_.gsub!(/\\bengine\\s*=\\s*innodb\\b([^;\\n]*)/i, + cp -rp "${innodb_test_suite_dir}" "${mroonga_wrapper_innodb_test_suite_dir}" + mkdir -p "${mroonga_wrapper_innodb_include_dir}" + cp -rp "${source_test_include_dir}"/innodb[-_]*.inc \ + "${mroonga_wrapper_innodb_include_dir}" + ruby -i'' \ + -pe "\$_.gsub!(/\\bengine\\s*=\\s*innodb\\b([^;\\n]*)/i, \"ENGINE=mroonga\\\1 COMMENT='ENGINE \\\"InnoDB\\\"'\") \$_.gsub!(/\\b(storage_engine\\s*=\\s*)innodb\\b([^;\\n]*)/i, \"\\\1mroonga\") \$_.gsub!(/^(--\\s*source\\s+)(include\\/innodb)/i, \"\\\1suite/mroonga_wrapper_innodb/\\\2\") " \ - ${mroonga_wrapper_innodb_test_suite_dir}/r/*.result \ - ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test \ - ${mroonga_wrapper_innodb_test_suite_dir}/include/*.inc - sed -i'' \ - -e '1 i --source ../mroonga/include/mroonga/have_mroonga.inc' \ - ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test + ${mroonga_wrapper_innodb_test_suite_dir}/r/*.result \ + ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test \ + ${mroonga_wrapper_innodb_test_suite_dir}/include/*.inc + sed -i'' \ + -e '1 i --source ../mroonga/include/mroonga/have_mroonga.inc' \ + ${mroonga_wrapper_innodb_test_suite_dir}/t/*.test fi all_test_suite_names="" @@ -138,84 +147,87 @@ suite_dir="${mroonga_test_dir}/.." cd "${suite_dir}" suite_dir="$(pwd)" for test_suite_name in \ - $(find mroonga -type d -name 'include' '!' -prune -o \ - -type d '!' -name 'mroonga' \ - '!' -name 'include' \ - '!' -name '[tr]'); do - if [ -n "${all_test_suite_names}" ]; then - all_test_suite_names="${all_test_suite_names}," - fi - all_test_suite_names="${all_test_suite_names}${test_suite_name}" + $(find mroonga -type d -name 'include' '!' -prune -o \ + -type d '!' -name 'mroonga' \ + '!' -name 'include' \ + '!' -name '[tr]'); do + if [ -n "${all_test_suite_names}" ]; then + all_test_suite_names="${all_test_suite_names}," + fi + all_test_suite_names="${all_test_suite_names}${test_suite_name}" done cd - if [ -n "${plugins_dir}" ]; then - if [ -d "${top_dir}/.libs" ]; then - make -C ${top_dir} \ - install-pluginLTLIBRARIES \ - plugindir=${plugins_dir} > /dev/null || \ - exit 1 - else - mkdir -p "${plugins_dir}" - cp "${top_dir}/ha_mroonga.so" "${plugins_dir}" || exit 1 - fi + if [ -d "${top_dir}/.libs" ]; then + make -C ${top_dir} \ + install-pluginLTLIBRARIES \ + plugindir=${plugins_dir} > /dev/null || \ + exit 1 + else + mkdir -p "${plugins_dir}" + cp "${top_dir}/ha_mroonga.so" "${plugins_dir}" || exit 1 + fi fi +mysql_test_run_options="" test_suite_names="" test_names="" while [ $# -gt 0 ]; do - case "$1" in - --manual-gdb|--debug) - n_processors=1 - break - ;; - --*) - break - ;; + arg="$1" + shift + case "$arg" in + --manual-gdb|--gdb|--client-gdb|--boot-gdb|--debug|--valgrind) + n_processors=1 + mysql_test_run_options="${mysql_test_run_options} ${arg}" + ;; + --*) + mysql_test_run_options="${mysql_test_run_options} ${arg}" + ;; + *) + case "$arg" in + */t/*.test) + test_suite_name=$(echo "$arg" | sed -e 's,/t/.*\.test,,g') + test_suite_name=$(cd "$test_suite_name" && pwd) + test_name=$(echo "$arg" | sed -e 's,.*/t/\(.*\)\.test,\1,g') + ;; *) - case "$1" in - */t/*.test) - test_suite_name=$(echo "$1" | sed -e 's,/t/.*\.test,,g') - test_suite_name=$(cd "$test_suite_name" && pwd) - test_name=$(echo "$1" | sed -e 's,.*/t/\(.*\)\.test,\1,g') - ;; - *) - if [ -d "$1" ]; then - test_suite_name=$(cd "$1" && pwd) - else - test_suite_name="$1" - fi - test_name="" - ;; - esac - shift - - if [ -n "${test_name}" ]; then - if [ -n "${test_names}" ]; then - test_names="${test_names}|" - fi - test_names="${test_names}.*${test_name}" - fi - - test_suite_name=$(echo "$test_suite_name" | sed -e "s,^${suite_dir}/,,") - if echo "${test_suite_names}" | grep --quiet "${test_suite_name}"; then - continue - fi - if [ -n "${test_suite_names}" ]; then - test_suite_names="${test_suite_names}," - fi - test_suite_names="${test_suite_names}${test_suite_name}" - ;; - esac + if [ -d "$arg" ]; then + test_suite_name=$(cd "$arg" && pwd) + else + test_suite_name="$arg" + fi + test_name="" + ;; + esac + + if [ -n "${test_name}" ]; then + if [ -n "${test_names}" ]; then + test_names="${test_names}|" + fi + test_names="${test_names}${test_name}" + fi + + test_suite_name=$(echo "$test_suite_name" | sed -e "s,^${suite_dir}/,,") + if echo "${test_suite_names}" | grep --quiet "${test_suite_name}"; then + continue + fi + if [ -n "${test_suite_names}" ]; then + test_suite_names="${test_suite_names}," + fi + test_suite_names="${test_suite_names}${test_suite_name}" + ;; + esac done if [ -z "$test_suite_names" ]; then - test_suite_names="${all_test_suite_names}" + test_suite_names="${all_test_suite_names}" fi mysql_test_run_args="" -mysql_test_run_args="${mysql_test_run_args} --mem" -mysql_test_run_args="${mysql_test_run_args} --no-check-testcases" +if [ "${percona}" != "yes" ]; then + mysql_test_run_args="${mysql_test_run_args} --mem" +fi mysql_test_run_args="${mysql_test_run_args} --parallel=${n_processors}" mysql_test_run_args="${mysql_test_run_args} --retry=1" mysql_test_run_args="${mysql_test_run_args} --suite=${test_suite_names}" @@ -223,10 +235,10 @@ mysql_test_run_args="${mysql_test_run_args} --force" mysql_test_run_args="${mysql_test_run_args} --mysqld=--loose-plugin-load-add=ha_mroonga.so" mysql_test_run_args="${mysql_test_run_args} --mysqld=--loose-plugin-mroonga=ON" if [ -n "$test_names" ]; then - mysql_test_run_args="${mysql_test_run_args} --do-test=${test_names}" + mysql_test_run_args="${mysql_test_run_args} --do-test=${test_names}" fi (cd "$build_mysql_test_dir" && \ - ./mysql-test-run.pl \ - ${mysql_test_run_args} \ - "$@") + perl -I . ./mysql-test-run.pl \ + ${mysql_test_run_args} \ + ${mysql_test_run_options}) diff --git a/storage/mroonga/test/unit/test_mrn_path_mapper.cpp b/storage/mroonga/test/unit/test_mrn_path_mapper.cpp index a5d0d81c3404c924a1f57d48bcd85d3b4bca14a3..54a9f35b03f5325a86cad01c2022e29eafd41ae8 100644 --- a/storage/mroonga/test/unit/test_mrn_path_mapper.cpp +++ b/storage/mroonga/test/unit/test_mrn_path_mapper.cpp @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/storage/mroonga/tools/prepare-sphinx-html.rb b/storage/mroonga/tools/prepare-sphinx-html.rb index 76eed24a04242e6c59482541c3e3268d8449ee24..71e12f0e3cab5744a62b5f8badcba0d08e6ff8e1 100755 --- a/storage/mroonga/tools/prepare-sphinx-html.rb +++ b/storage/mroonga/tools/prepare-sphinx-html.rb @@ -48,13 +48,6 @@ def fix_html_link(html, language) end end -def add_language_annotation_to_source_label(html) - html.gsub(/>(ソースコードを表示)#{label}(英語)<" - end -end - def fix_js_link(js, language) fix_link_path(js) end @@ -156,7 +149,6 @@ language_dirs.each do |language_dir| content = fix_link(content, extension, language) if extension == "html" content = insert_facebook_html(content, language) - content = add_language_annotation_to_source_label(content) end dest_path.open("wb") do |dest| dest.print(content.strip) diff --git a/storage/mroonga/tools/travis/before_script.sh b/storage/mroonga/tools/travis/before_script.sh index 2b4591a60a44bc2424d573a4632cb25dd391a5da..e3e22c8768aeab72094eb34794a5a496edc8d7a7 100755 --- a/storage/mroonga/tools/travis/before_script.sh +++ b/storage/mroonga/tools/travis/before_script.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # set -x set -e @@ -40,6 +40,7 @@ if [ "${MROONGA_BUNDLED}" = "yes" ]; then cmake_args=("${cmake_args[@]}" -DWITHOUT_TOKUDB=TRUE) if [ "${MROONGA_TEST_EMBEDDED}" = "yes" ]; then cmake_args=("${cmake_args[@]}" -DWITH_EMBEDDED_SERVER=TRUE) + cmake_args=("${cmake_args[@]}" -DMRN_BUILD_FOR_EMBEDDED_SERVER=TRUE) fi cmake . "${cmake_args[@]}" else @@ -49,9 +50,48 @@ else PATH=$(echo /opt/mysql/server-*/bin/):$PATH fi configure_args=("--with-mysql-source=$PWD/vendor/mysql") - if [ "${MYSQL_VERSION}" = "mysql-5.6.25" ]; then - configure_args=("${configure_args[@]}" --enable-fast-mutexes) - fi + case "${MYSQL_VERSION}" in + mysql-5.6) + configure_args=("${configure_args[@]}" --enable-fast-mutexes) + ;; + mysql-5.7) + boost_archive=boost_1_59_0.tar.gz + curl -L -O http://downloads.sourceforge.net/project/boost/boost/1.59.0/${boost_archive} + sudo mkdir -p /usr/global/share + sudo mv ${boost_archive} /usr/global/share/ + (cd vendor/mysql && sudo debian/rules override_dh_auto_configure) + ;; + mariadb-5.5) + (cd vendor/mysql && sudo debian/rules configure) + configure_args=("${configure_args[@]}" + "--with-mysql-build=$PWD/vendor/mysql/builddir") + ;; + percona-server-5.6) + (cd vendor/mysql && \ + sudo debian/rules configure SKIP_DEBUG_BINARY=yes && \ + cd builddir/libservices && \ + sudo make > /dev/null && \ + cd ../extra && \ + sudo make > /dev/null) + configure_args=("${configure_args[@]}" + "--enable-fast-mutexes" + "--with-mysql-build=$PWD/vendor/mysql/builddir" + "--with-mysql-config=$PWD/vendor/mysql/builddir/scripts/mysql_config") + ;; + percona-server-5.7) + (cd vendor/mysql && \ + sudo debian/rules override_dh_auto_configure SKIP_DEBUG_BINARY=yes && \ + cd builddir/libservices && \ + sudo make > /dev/null && \ + cd ../extra && \ + sudo make > /dev/null) + configure_args=("${configure_args[@]}" + "--with-mysql-build=$PWD/vendor/mysql/builddir" + "--with-mysql-config=$PWD/vendor/mysql/builddir/scripts/mysql_config") + ;; + *) + : + ;; + esac ./configure "${configure_args[@]}" - cat "$(mysql_config --include | sed -e 's/-I//g')/my_config.h" fi diff --git a/storage/mroonga/tools/travis/install.sh b/storage/mroonga/tools/travis/install.sh index c723eb69f3573da2ceba0be1db54659027a43a84..7596c1ccc323007fec7d0a9b98eabddaabb08c35 100755 --- a/storage/mroonga/tools/travis/install.sh +++ b/storage/mroonga/tools/travis/install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright(C) 2012-2015 Kouhei Sutou +# Copyright(C) 2012-2017 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -14,21 +14,50 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# set -x +set -x set -e -mariadb_download_base=http://mirror.jmu.edu/pub/mariadb +# export GROONGA_MASTER=yes +# export GROONGA_NORMALIZER_MYSQL_MASTER=yes -export GROONGA_MASTER=yes -export GROONGA_NORMALIZER_MYSQL_MASTER=yes +#mariadb_download_base=http://mirror.jmu.edu/pub/mariadb +mariadb_download_base=http://ftp.osuosl.org/pub/mariadb + +version=$(echo "$MYSQL_VERSION" | sed -r -e 's/^(mysql|mariadb|percona-server)-//') +series=$(echo "$version" | sed -r -e 's/^([0-9]+\.[0-9]+).*$/\1/g') + +setup_mariadb_apt() +{ + distribution=$(lsb_release --short --id | tr 'A-Z' 'a-z') + code_name=$(lsb_release --short --codename) + component=main + apt_url_base="${mariadb_download_base}/repo/${series}" + cat < +# Copyright(C) 2012-2016 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # set -x set -e @@ -43,11 +43,7 @@ fi build() { - if [ "${MROONGA_BUNDLED}" = "yes" ]; then - make -j${n_processors} > /dev/null - else - make -j${n_processors} > /dev/null - fi + make -j${n_processors} > /dev/null } run_unit_test() @@ -62,8 +58,12 @@ prepare_mysql_test_dir() mysql_test_dir=/usr/mysql-test if [ -d /usr/lib/mysql-testsuite/ ]; then sudo cp -a /usr/lib/mysql-testsuite/ ${mysql_test_dir}/ + elif [ -d /usr/lib/mysql-test/ ]; then + sudo cp -a /usr/lib/mysql-test/ ${mysql_test_dir}/ elif [ -d /usr/share/mysql/mysql-test/ ]; then sudo cp -a /usr/share/mysql/mysql-test/ ${mysql_test_dir}/ + elif [ -d /usr/share/mysql-test/ ]; then + sudo cp -a /usr/share/mysql-test/ ${mysql_test_dir}/ elif [ -d /opt/mysql/ ]; then mysql_test_dir=$(echo /opt/mysql/server-*/mysql-test) else @@ -100,6 +100,9 @@ run_sql_test() if [ "${MROONGA_TEST_EMBEDDED}" = "yes" ]; then test_args=("${test_args[@]}" "--embedded-server") fi + if [ "${MROONGA_TEST_PS_PROTOCOL}" = "yes" ]; then + test_args=("${test_args[@]}" "--ps-protocol") + fi if [ "${MROONGA_BUNDLED}" = "yes" ]; then # Plugins aren't supported. @@ -112,16 +115,17 @@ run_sql_test() ${mroonga_dir}/test/run-sql-test.sh \ "${test_args[@]}" \ - --parallel="${n_processors}" + --parallel="${n_processors}" \ + --retry=3 else prepare_sql_test cd ${mysql_test_dir}/ - ./mysql-test-run.pl \ + perl ./mysql-test-run.pl \ "${test_args[@]}" \ --no-check-testcases \ --parallel="${n_processors}" \ - --retry=1 \ + --retry=3 \ --suite="${test_suite_names}" \ --force fi diff --git a/storage/mroonga/udf/mrn_udf_command.cpp b/storage/mroonga/udf/mrn_udf_command.cpp index d14f3ffd49dce1cbb0893ce08fe8dcf3d7004a09..b4d0f8b20a3a43cb60ce396dc96fa1e11c1e9311 100644 --- a/storage/mroonga/udf/mrn_udf_command.cpp +++ b/storage/mroonga/udf/mrn_udf_command.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2013 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -25,39 +25,93 @@ #include #include #include +#include #include +#include + +#include MRN_BEGIN_DECLS extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; struct CommandInfo { - grn_ctx ctx; + grn_ctx *ctx; grn_obj *db; bool use_shared_db; + grn_obj command; String result; }; -MRN_API my_bool mroonga_command_init(UDF_INIT *initid, UDF_ARGS *args, +MRN_API my_bool mroonga_command_init(UDF_INIT *init, UDF_ARGS *args, char *message) { CommandInfo *info = NULL; - initid->ptr = NULL; - if (args->arg_count != 1) { - sprintf(message, - "mroonga_command(): Incorrect number of arguments: %u for 1", - args->arg_count); + init->ptr = NULL; + if (args->arg_count == 0) { + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Wrong number of arguments: %u for 1..", + args->arg_count); goto error; } - if (args->arg_type[0] != STRING_RESULT) { - strcpy(message, - "mroonga_command(): The 1st argument must be command as string"); + + if ((args->arg_count % 2) == 0) { + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): The number of arguments must be odd: %u", + args->arg_count); goto error; } - initid->maybe_null = 1; - initid->const_item = 1; + + for (unsigned int i = 0; i < args->arg_count; ++i) { + switch (args->arg_type[i]) { + case STRING_RESULT: + // OK + break; + case REAL_RESULT: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%g>", + *reinterpret_cast(args->args[i])); + goto error; + break; + case INT_RESULT: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%lld>", + *reinterpret_cast(args->args[i])); + goto error; + break; + case DECIMAL_RESULT: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%.*s>", + static_cast(args->lengths[i]), + args->args[i]); + goto error; + break; + default: + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Argument must be string: <%d>(%u)", + args->arg_type[i], + i); + goto error; + break; + } + } + init->maybe_null = 1; + init->const_item = 0; info = (CommandInfo *)mrn_my_malloc(sizeof(CommandInfo), MYF(MY_WME | MY_ZEROFILL)); @@ -66,53 +120,100 @@ MRN_API my_bool mroonga_command_init(UDF_INIT *initid, UDF_ARGS *args, goto error; } - grn_ctx_init(&(info->ctx), 0); + info->ctx = mrn_context_pool->pull(); { const char *current_db_path = MRN_THD_DB_PATH(current_thd); const char *action; if (current_db_path) { action = "open database"; - int error = mrn_db_manager->open(current_db_path, &(info->db)); + char encoded_db_path[FN_REFLEN + 1]; + uint encoded_db_path_length = + tablename_to_filename(current_db_path, + encoded_db_path, + sizeof(encoded_db_path)); + encoded_db_path[encoded_db_path_length] = '\0'; + mrn::Database *db; + int error = mrn_db_manager->open(encoded_db_path, &db); if (error == 0) { - grn_ctx_use(&(info->ctx), info->db); + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); info->use_shared_db = true; } } else { action = "create anonymous database"; - info->db = grn_db_create(&(info->ctx), NULL, NULL); + info->db = grn_db_create(info->ctx, NULL, NULL); info->use_shared_db = false; } if (!info->db) { - sprintf(message, - "mroonga_command(): failed to %s: %s", - action, - info->ctx.errbuf); + grn_snprintf(message, + MYSQL_ERRMSG_SIZE, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): failed to %s: %s", + action, + info->ctx->errbuf); goto error; } } + GRN_TEXT_INIT(&(info->command), 0); - initid->ptr = (char *)info; + init->ptr = (char *)info; return FALSE; error: if (info) { if (!info->use_shared_db) { - grn_obj_close(&(info->ctx), info->db); + grn_obj_close(info->ctx, info->db); } - grn_ctx_fin(&(info->ctx)); + mrn_context_pool->release(info->ctx); my_free(info); } return TRUE; } -MRN_API char *mroonga_command(UDF_INIT *initid, UDF_ARGS *args, char *result, +static void mroonga_command_escape_value(grn_ctx *ctx, + grn_obj *command, + const char *value, + unsigned long value_length) +{ + GRN_TEXT_PUTC(ctx, command, '"'); + + const char *value_current = value; + const char *value_end = value_current + value_length; + while (value_current < value_end) { + int char_length = grn_charlen(ctx, value_current, value_end); + + if (char_length == 0) { + break; + } else if (char_length == 1) { + switch (*value_current) { + case '\\': + case '"': + GRN_TEXT_PUTC(ctx, command, '\\'); + GRN_TEXT_PUTC(ctx, command, *value_current); + break; + case '\n': + GRN_TEXT_PUTS(ctx, command, "\\n"); + break; + default: + GRN_TEXT_PUTC(ctx, command, *value_current); + break; + } + } else { + GRN_TEXT_PUT(ctx, command, value_current, char_length); + } + + value_current += char_length; + } + + GRN_TEXT_PUTC(ctx, command, '"'); +} + +MRN_API char *mroonga_command(UDF_INIT *init, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error) { - CommandInfo *info = (CommandInfo *)initid->ptr; - grn_ctx *ctx = &(info->ctx); - char *command; - unsigned int command_length; + CommandInfo *info = (CommandInfo *)init->ptr; + grn_ctx *ctx = info->ctx; int flags = 0; if (!args->args[0]) { @@ -120,11 +221,31 @@ MRN_API char *mroonga_command(UDF_INIT *initid, UDF_ARGS *args, char *result, return NULL; } + GRN_BULK_REWIND(&(info->command)); + GRN_TEXT_PUT(ctx, &(info->command), args->args[0], args->lengths[0]); + for (unsigned int i = 1; i < args->arg_count; i += 2) { + if (!args->args[i] || !args->args[i + 1]) { + *is_null = 1; + return NULL; + } + + const char *name = args->args[i]; + unsigned long name_length = args->lengths[i]; + GRN_TEXT_PUTS(ctx, &(info->command), " --"); + GRN_TEXT_PUT(ctx, &(info->command), name, name_length); + + const char *value = args->args[i + 1]; + unsigned long value_length = args->lengths[i + 1]; + GRN_TEXT_PUTS(ctx, &(info->command), " "); + mroonga_command_escape_value(ctx, &(info->command), value, value_length); + } + *is_null = 0; - command = args->args[0]; - command_length = args->lengths[0]; - grn_ctx_send(ctx, command, command_length, 0); + grn_ctx_send(ctx, + GRN_TEXT_VALUE(&(info->command)), + GRN_TEXT_LEN(&(info->command)), + 0); if (ctx->rc) { my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); goto error; @@ -156,14 +277,15 @@ MRN_API char *mroonga_command(UDF_INIT *initid, UDF_ARGS *args, char *result, return NULL; } -MRN_API void mroonga_command_deinit(UDF_INIT *initid) +MRN_API void mroonga_command_deinit(UDF_INIT *init) { - CommandInfo *info = (CommandInfo *)initid->ptr; + CommandInfo *info = (CommandInfo *)init->ptr; if (info) { + GRN_OBJ_FIN(info->ctx, &(info->command)); if (!info->use_shared_db) { - grn_obj_close(&(info->ctx), info->db); + grn_obj_close(info->ctx, info->db); } - grn_ctx_fin(&(info->ctx)); + mrn_context_pool->release(info->ctx); MRN_STRING_FREE(info->result); my_free(info); } diff --git a/storage/mroonga/udf/mrn_udf_escape.cpp b/storage/mroonga/udf/mrn_udf_escape.cpp index 89b08a1c6d52091222faeefc1640103f614c313e..b97327fb1d0cec0d8d7b97afc9a9c1349e0770a7 100644 --- a/storage/mroonga/udf/mrn_udf_escape.cpp +++ b/storage/mroonga/udf/mrn_udf_escape.cpp @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* - Copyright(C) 2013-2015 Kouhei Sutou + Copyright(C) 2013-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -23,33 +23,56 @@ #include #include #include +#include MRN_BEGIN_DECLS +extern mrn::ContextPool *mrn_context_pool; + struct EscapeInfo { - grn_ctx ctx; + grn_ctx *ctx; + bool script_mode; grn_obj target_characters; - grn_obj escaped_query; - bool processed; + grn_obj escaped_value; }; -MRN_API my_bool mroonga_escape_init(UDF_INIT *initid, UDF_ARGS *args, +MRN_API my_bool mroonga_escape_init(UDF_INIT *init, UDF_ARGS *args, char *message) { EscapeInfo *info = NULL; + bool script_mode = false; - initid->ptr = NULL; + init->ptr = NULL; if (!(1 <= args->arg_count && args->arg_count <= 2)) { - sprintf(message, - "mroonga_escape(): Incorrect number of arguments: %u for 1..2", - args->arg_count); + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_escape(): Incorrect number of arguments: %u for 1..2", + args->arg_count); goto error; } - if (args->arg_type[0] != STRING_RESULT) { - strcpy(message, - "mroonga_escape(): The 1st argument must be query as string"); - goto error; + + if (args->attribute_lengths[0] == strlen("script") && + strncmp(args->attributes[0], "script", strlen("script")) == 0) { + switch (args->arg_type[0]) { + case ROW_RESULT: + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_escape(): " + "The 1st script argument must be " + "string, integer or floating point: "); + goto error; + break; + default: + break; + } + script_mode = true; + } else { + if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, + "mroonga_escape(): The 1st query argument must be string"); + goto error; + } } if (args->arg_count == 2) { if (args->arg_type[1] != STRING_RESULT) { @@ -60,28 +83,27 @@ MRN_API my_bool mroonga_escape_init(UDF_INIT *initid, UDF_ARGS *args, } } - initid->maybe_null = 1; - initid->const_item = 1; + init->maybe_null = 1; - info = (EscapeInfo *)mrn_my_malloc(sizeof(EscapeInfo), - MYF(MY_WME | MY_ZEROFILL)); + info = static_cast(mrn_my_malloc(sizeof(EscapeInfo), + MYF(MY_WME | MY_ZEROFILL))); if (!info) { strcpy(message, "mroonga_escape(): out of memory"); goto error; } - grn_ctx_init(&(info->ctx), 0); + info->ctx = mrn_context_pool->pull(); + info->script_mode = script_mode; GRN_TEXT_INIT(&(info->target_characters), 0); - GRN_TEXT_INIT(&(info->escaped_query), 0); - info->processed = false; + GRN_TEXT_INIT(&(info->escaped_value), 0); - initid->ptr = (char *)info; + init->ptr = reinterpret_cast(info); return FALSE; error: if (info) { - grn_ctx_fin(&(info->ctx)); + mrn_context_pool->release(info->ctx); my_free(info); } return TRUE; @@ -89,32 +111,103 @@ MRN_API my_bool mroonga_escape_init(UDF_INIT *initid, UDF_ARGS *args, static void escape(EscapeInfo *info, UDF_ARGS *args) { - grn_ctx *ctx = &(info->ctx); - char *query = args->args[0]; - unsigned int query_length = args->lengths[0]; - - if (args->arg_count == 2) { - char *target_characters = args->args[1]; - unsigned int target_characters_length = args->lengths[1]; - GRN_TEXT_PUT(ctx, &(info->target_characters), - target_characters, - target_characters_length); - GRN_TEXT_PUTC(ctx, &(info->target_characters), '\0'); - grn_expr_syntax_escape(ctx, query, query_length, - GRN_TEXT_VALUE(&(info->target_characters)), - GRN_QUERY_ESCAPE, - &(info->escaped_query)); + grn_ctx *ctx = info->ctx; + + GRN_BULK_REWIND(&(info->escaped_value)); + if (info->script_mode) { + switch (args->arg_type[0]) { + case STRING_RESULT: + { + char *value = args->args[0]; + unsigned long value_length = args->lengths[0]; + GRN_TEXT_PUTC(ctx, &(info->escaped_value), '"'); + if (args->arg_count == 2) { + grn_obj special_characters; + GRN_TEXT_INIT(&special_characters, 0); + GRN_TEXT_PUT(ctx, + &special_characters, + args->args[1], + args->lengths[1]); + GRN_TEXT_PUTC(ctx, &special_characters, '\0'); + grn_expr_syntax_escape(ctx, + value, + value_length, + GRN_TEXT_VALUE(&special_characters), + '\\', + &(info->escaped_value)); + GRN_OBJ_FIN(ctx, &special_characters); + } else { + const char *special_characters = "\"\\"; + grn_expr_syntax_escape(ctx, + value, + value_length, + special_characters, + '\\', + &(info->escaped_value)); + } + GRN_TEXT_PUTC(ctx, &(info->escaped_value), '"'); + } + break; + case REAL_RESULT: + { + double value = *reinterpret_cast(args->args[0]); + grn_text_ftoa(ctx, &(info->escaped_value), value); + } + break; + case INT_RESULT: + { + longlong value = *reinterpret_cast(args->args[0]); + grn_text_lltoa(ctx, &(info->escaped_value), value); + } + break; + case DECIMAL_RESULT: + { + grn_obj value_raw; + GRN_TEXT_INIT(&value_raw, GRN_OBJ_DO_SHALLOW_COPY); + GRN_TEXT_SET(ctx, &value_raw, args->args[0], args->lengths[0]); + grn_obj value; + GRN_FLOAT_INIT(&value, 0); + if (grn_obj_cast(ctx, &value_raw, &value, GRN_FALSE) == GRN_SUCCESS) { + grn_text_ftoa(ctx, &(info->escaped_value), GRN_FLOAT_VALUE(&value)); + } else { + GRN_TEXT_PUT(ctx, + &(info->escaped_value), + args->args[0], + args->lengths[0]); + } + GRN_OBJ_FIN(ctx, &value); + GRN_OBJ_FIN(ctx, &value_raw); + } + break; + default: + break; + } } else { - grn_expr_syntax_escape_query(ctx, query, query_length, - &(info->escaped_query)); + char *query = args->args[0]; + unsigned long query_length = args->lengths[0]; + if (args->arg_count == 2) { + char *target_characters = args->args[1]; + unsigned long target_characters_length = args->lengths[1]; + GRN_TEXT_PUT(ctx, &(info->target_characters), + target_characters, + target_characters_length); + GRN_TEXT_PUTC(ctx, &(info->target_characters), '\0'); + grn_expr_syntax_escape(ctx, query, query_length, + GRN_TEXT_VALUE(&(info->target_characters)), + GRN_QUERY_ESCAPE, + &(info->escaped_value)); + } else { + grn_expr_syntax_escape_query(ctx, query, query_length, + &(info->escaped_value)); + } } } -MRN_API char *mroonga_escape(UDF_INIT *initid, UDF_ARGS *args, char *result, +MRN_API char *mroonga_escape(UDF_INIT *init, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error) { - EscapeInfo *info = (EscapeInfo *)initid->ptr; - grn_ctx *ctx = &(info->ctx); + EscapeInfo *info = reinterpret_cast(init->ptr); + grn_ctx *ctx = info->ctx; if (!args->args[0]) { *is_null = 1; @@ -123,31 +216,28 @@ MRN_API char *mroonga_escape(UDF_INIT *initid, UDF_ARGS *args, char *result, *is_null = 0; - if (!info->processed) { - escape(info, args); - info->processed = true; - } + escape(info, args); if (ctx->rc) { my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); goto error; } - *length = GRN_TEXT_LEN(&(info->escaped_query)); - return (char *)(GRN_TEXT_VALUE(&(info->escaped_query))); + *length = GRN_TEXT_LEN(&(info->escaped_value)); + return GRN_TEXT_VALUE(&(info->escaped_value)); error: *error = 1; return NULL; } -MRN_API void mroonga_escape_deinit(UDF_INIT *initid) +MRN_API void mroonga_escape_deinit(UDF_INIT *init) { - EscapeInfo *info = (EscapeInfo *)initid->ptr; + EscapeInfo *info = reinterpret_cast(init->ptr); if (info) { - grn_obj_unlink(&(info->ctx), &(info->target_characters)); - grn_obj_unlink(&(info->ctx), &(info->escaped_query)); - grn_ctx_fin(&(info->ctx)); + grn_obj_unlink(info->ctx, &(info->target_characters)); + grn_obj_unlink(info->ctx, &(info->escaped_value)); + mrn_context_pool->release(info->ctx); my_free(info); } } diff --git a/storage/mroonga/udf/mrn_udf_highlight_html.cpp b/storage/mroonga/udf/mrn_udf_highlight_html.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dc46ef5f2055c5dd50ffd13cb1115a440ce931be --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_highlight_html.cpp @@ -0,0 +1,494 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +typedef struct st_mrn_highlight_html_info +{ + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; + grn_obj *keywords; + String result_str; + struct { + bool used; + grn_obj *table; + grn_obj *default_column; + } query_mode; +} mrn_highlight_html_info; + +static my_bool mrn_highlight_html_prepare(mrn_highlight_html_info *info, + UDF_ARGS *args, + char *message, + grn_obj **keywords) +{ + MRN_DBUG_ENTER_FUNCTION(); + + grn_ctx *ctx = info->ctx; + const char *normalizer_name = "NormalizerAuto"; + grn_obj *expr = NULL; + String *result_str = &(info->result_str); + + *keywords = NULL; + + mrn::encoding::set_raw(ctx, system_charset_info); + if (system_charset_info->state & (MY_CS_BINSORT | MY_CS_CSSORT)) { + normalizer_name = NULL; + } + + *keywords = grn_table_create(ctx, NULL, 0, NULL, + GRN_OBJ_TABLE_PAT_KEY, + grn_ctx_at(ctx, GRN_DB_SHORT_TEXT), + NULL); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to create grn_pat for keywords: <%s>", + ctx->errbuf); + } + goto error; + } + if (normalizer_name) { + grn_obj_set_info(ctx, + *keywords, + GRN_INFO_NORMALIZER, + grn_ctx_get(ctx, normalizer_name, -1)); + } + + if (info->query_mode.used) { + if (!info->query_mode.table) { + grn_obj *short_text; + short_text = grn_ctx_at(info->ctx, GRN_DB_SHORT_TEXT); + info->query_mode.table = grn_table_create(info->ctx, + NULL, 0, NULL, + GRN_TABLE_HASH_KEY, + short_text, + NULL); + } + if (!info->query_mode.default_column) { + info->query_mode.default_column = + grn_obj_column(info->ctx, + info->query_mode.table, + GRN_COLUMN_NAME_KEY, + GRN_COLUMN_NAME_KEY_LEN); + } + + grn_obj *record = NULL; + GRN_EXPR_CREATE_FOR_QUERY(info->ctx, info->query_mode.table, expr, record); + if (!expr) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to create expression: <%s>", + ctx->errbuf); + } + goto error; + } + + mrn::QueryParser query_parser(info->ctx, + current_thd, + expr, + info->query_mode.default_column, + 0, + NULL); + grn_rc rc = query_parser.parse(args->args[1], args->lengths[1]); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to parse query: <%s>", + ctx->errbuf); + } + goto error; + } + + { + grn_obj extracted_keywords; + GRN_PTR_INIT(&extracted_keywords, GRN_OBJ_VECTOR, GRN_ID_NIL); + grn_expr_get_keywords(ctx, expr, &extracted_keywords); + + size_t n_keywords = + GRN_BULK_VSIZE(&extracted_keywords) / sizeof(grn_obj *); + for (size_t i = 0; i < n_keywords; ++i) { + grn_obj *extracted_keyword = GRN_PTR_VALUE_AT(&extracted_keywords, i); + grn_table_add(ctx, + *keywords, + GRN_TEXT_VALUE(extracted_keyword), + GRN_TEXT_LEN(extracted_keyword), + NULL); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to add a keyword: <%.*s>: <%s>", + static_cast(GRN_TEXT_LEN(extracted_keyword)), + GRN_TEXT_VALUE(extracted_keyword), + ctx->errbuf); + GRN_OBJ_FIN(ctx, &extracted_keywords); + } + goto error; + } + } + GRN_OBJ_FIN(ctx, &extracted_keywords); + } + } else { + for (unsigned int i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + continue; + } + grn_table_add(ctx, + *keywords, + args->args[i], + args->lengths[i], + NULL); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): " + "failed to add a keyword: <%.*s>: <%s>", + static_cast(args->lengths[i]), + args->args[i], + ctx->errbuf); + } + goto error; + } + } + } + + result_str->set_charset(system_charset_info); + DBUG_RETURN(FALSE); + +error: + if (expr) { + grn_obj_close(ctx, expr); + } + if (*keywords) { + grn_obj_close(ctx, *keywords); + } + DBUG_RETURN(TRUE); +} + +MRN_API my_bool mroonga_highlight_html_init(UDF_INIT *init, + UDF_ARGS *args, + char *message) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_highlight_html_info *info = NULL; + + init->ptr = NULL; + + if (args->arg_count < 1) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): wrong number of arguments: %u for 1+", + args->arg_count); + goto error; + } + + + for (unsigned int i = 0; i < args->arg_count; ++i) { + switch (args->arg_type[i]) { + case STRING_RESULT: + /* OK */ + break; + case REAL_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): all arguments must be string: " + "<%u>=<%g>", + i, *((double *)(args->args[i]))); + goto error; + break; + case INT_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): all arguments must be string: " + "<%u>=<%lld>", + i, *((longlong *)(args->args[i]))); + goto error; + break; + default: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): all arguments must be string: <%u>", + i); + goto error; + break; + } + } + + init->maybe_null = 0; + + info = + reinterpret_cast( + mrn_my_malloc(sizeof(mrn_highlight_html_info), + MYF(MY_WME | MY_ZEROFILL))); + if (!info) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): failed to allocate memory"); + goto error; + } + + info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); + info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + info->db = grn_db_create(info->ctx, NULL, NULL); + info->use_shared_db = false; + } + if (!info->db) { + sprintf(message, + "mroonga_highlight_html(): failed to %s: %s", + action, + info->ctx->errbuf); + goto error; + } + } + + info->query_mode.used = FALSE; + + if (args->arg_count == 2 && + args->attribute_lengths[1] == strlen("query") && + strncmp(args->attributes[1], "query", strlen("query")) == 0) { + info->query_mode.used = TRUE; + info->query_mode.table = NULL; + info->query_mode.default_column = NULL; + } + + { + bool all_keywords_are_constant = TRUE; + for (unsigned int i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + all_keywords_are_constant = FALSE; + break; + } + } + + if (all_keywords_are_constant) { + if (mrn_highlight_html_prepare(info, args, message, &(info->keywords))) { + goto error; + } + } else { + info->keywords = NULL; + } + } + + init->ptr = (char *)info; + + DBUG_RETURN(FALSE); + +error: + if (info) { + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } + DBUG_RETURN(TRUE); +} + +static bool highlight_html(grn_ctx *ctx, + grn_pat *keywords, + const char *target, + size_t target_length, + String *output) +{ + MRN_DBUG_ENTER_FUNCTION(); + + grn_obj buffer; + + GRN_TEXT_INIT(&buffer, 0); + + { + const char *open_tag = ""; + size_t open_tag_length = strlen(open_tag); + const char *close_tag = ""; + size_t close_tag_length = strlen(close_tag); + + while (target_length > 0) { +#define MAX_N_HITS 16 + grn_pat_scan_hit hits[MAX_N_HITS]; + const char *rest; + size_t previous = 0; + size_t chunk_length; + + int n_hits = grn_pat_scan(ctx, + keywords, + target, + target_length, + hits, MAX_N_HITS, &rest); + for (int i = 0; i < n_hits; i++) { + if ((hits[i].offset - previous) > 0) { + grn_text_escape_xml(ctx, + &buffer, + target + previous, + hits[i].offset - previous); + } + GRN_TEXT_PUT(ctx, &buffer, open_tag, open_tag_length); + grn_text_escape_xml(ctx, + &buffer, + target + hits[i].offset, + hits[i].length); + GRN_TEXT_PUT(ctx, &buffer, close_tag, close_tag_length); + previous = hits[i].offset + hits[i].length; + } + + chunk_length = rest - target; + if ((chunk_length - previous) > 0) { + grn_text_escape_xml(ctx, + &buffer, + target + previous, + target_length - previous); + } + target_length -= chunk_length; + target = rest; +#undef MAX_N_HITS + } + } + + if (output->reserve(GRN_TEXT_LEN(&buffer))) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); + GRN_OBJ_FIN(ctx, &buffer); + DBUG_RETURN(false); + } + + output->q_append(GRN_TEXT_VALUE(&buffer), GRN_TEXT_LEN(&buffer)); + GRN_OBJ_FIN(ctx, &buffer); + DBUG_RETURN(true); +} + +MRN_API char *mroonga_highlight_html(UDF_INIT *init, + UDF_ARGS *args, + char *result, + unsigned long *length, + char *is_null, + char *error) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_highlight_html_info *info = + reinterpret_cast(init->ptr); + + grn_ctx *ctx = info->ctx; + grn_obj *keywords = info->keywords; + String *result_str = &(info->result_str); + + if (!args->args[0]) { + *is_null = 1; + DBUG_RETURN(NULL); + } + + if (!keywords) { + if (mrn_highlight_html_prepare(info, args, NULL, &keywords)) { + goto error; + } + } + + *is_null = 0; + result_str->length(0); + + if (!highlight_html(ctx, + reinterpret_cast(keywords), + args->args[0], + args->lengths[0], + result_str)) { + goto error; + } + + if (!info->keywords) { + grn_rc rc = grn_obj_close(ctx, keywords); + if (rc != GRN_SUCCESS) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + } + + *length = result_str->length(); + DBUG_RETURN((char *)result_str->ptr()); + +error: + if (!info->keywords && keywords) { + grn_obj_close(ctx, keywords); + } + + *is_null = 1; + *error = 1; + + DBUG_RETURN(NULL); +} + +MRN_API void mroonga_highlight_html_deinit(UDF_INIT *init) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_highlight_html_info *info = + reinterpret_cast(init->ptr); + if (!info) { + DBUG_VOID_RETURN; + } + + if (info->keywords) { + grn_obj_close(info->ctx, info->keywords); + } + if (info->query_mode.used) { + if (info->query_mode.default_column) { + grn_obj_close(info->ctx, info->query_mode.default_column); + } + if (info->query_mode.table) { + grn_obj_close(info->ctx, info->query_mode.table); + } + } + MRN_STRING_FREE(info->result_str); + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + + DBUG_VOID_RETURN; +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp index b54f5c53206408cea5f2d367d41516d95dcab13a..fb4b5440ef10f0aa2e3a34a5bee63ecbfc823b15 100644 --- a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp +++ b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2013 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -23,20 +23,21 @@ #include #include #include +#include MRN_BEGIN_DECLS -MRN_API my_bool last_insert_grn_id_init(UDF_INIT *initid, UDF_ARGS *args, char *message) +MRN_API my_bool last_insert_grn_id_init(UDF_INIT *init, UDF_ARGS *args, char *message) { if (args->arg_count != 0) { strcpy(message, "last_insert_grn_id must not have arguments"); return 1; } - initid->maybe_null = 0; + init->maybe_null = 0; return 0; } -MRN_API longlong last_insert_grn_id(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) +MRN_API longlong last_insert_grn_id(UDF_INIT *init, UDF_ARGS *args, char *is_null, char *error) { THD *thd = current_thd; st_mrn_slot_data *slot_data = mrn_get_slot_data(thd, false); @@ -47,7 +48,7 @@ MRN_API longlong last_insert_grn_id(UDF_INIT *initid, UDF_ARGS *args, char *is_n return last_insert_record_id; } -MRN_API void last_insert_grn_id_deinit(UDF_INIT *initid) +MRN_API void last_insert_grn_id_deinit(UDF_INIT *init) { } diff --git a/storage/mroonga/udf/mrn_udf_normalize.cpp b/storage/mroonga/udf/mrn_udf_normalize.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dd597946ea8ff2688cace9d6487e1bdf82b529b8 --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_normalize.cpp @@ -0,0 +1,212 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2015 Naoya Murakami + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +#define DEFAULT_NORMALIZER_NAME "NormalizerAuto" + +struct st_mrn_normalize_info +{ + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; + grn_obj *normalizer; + int flags; + String result_str; +}; + +MRN_API my_bool mroonga_normalize_init(UDF_INIT *init, UDF_ARGS *args, + char *message) +{ + st_mrn_normalize_info *info = NULL; + String *result_str = NULL; + + init->ptr = NULL; + if (!(1 <= args->arg_count && args->arg_count <= 2)) { + sprintf(message, + "mroonga_normalize(): Incorrect number of arguments: %u for 1..2", + args->arg_count); + goto error; + } + if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, + "mroonga_normalize(): The 1st argument must be query as string"); + goto error; + } + if (args->arg_count == 2) { + if (args->arg_type[1] != STRING_RESULT) { + strcpy(message, + "mroonga_normalize(): " + "The 2st argument must be normalizer name as string"); + goto error; + } + } + + init->maybe_null = 1; + + info = (st_mrn_normalize_info *)mrn_my_malloc(sizeof(st_mrn_normalize_info), + MYF(MY_WME | MY_ZEROFILL)); + if (!info) { + strcpy(message, "mroonga_normalize(): out of memory"); + goto error; + } + + info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); + info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + info->db = grn_db_create(info->ctx, NULL, NULL); + info->use_shared_db = false; + } + if (!info->db) { + sprintf(message, + "mroonga_normalize(): failed to %s: %s", + action, + info->ctx->errbuf); + goto error; + } + } + + if (args->arg_count == 1) { + info->normalizer = grn_ctx_get(info->ctx, DEFAULT_NORMALIZER_NAME, -1); + } else { + info->normalizer = grn_ctx_get(info->ctx, args->args[1], args->lengths[1]); + } + if (!info->normalizer) { + sprintf(message, "mroonga_normalize(): nonexistent normalizer %.*s", + (int)args->lengths[1], args->args[1]); + goto error; + } + info->flags = 0; + + result_str = &(info->result_str); + mrn::encoding::set_raw(info->ctx, system_charset_info); + result_str->set_charset(system_charset_info); + + init->ptr = (char *)info; + + return FALSE; + +error: + if (info) { + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } + return TRUE; +} + +MRN_API char *mroonga_normalize(UDF_INIT *init, UDF_ARGS *args, char *result, + unsigned long *length, char *is_null, char *error) +{ + st_mrn_normalize_info *info = (st_mrn_normalize_info *)init->ptr; + grn_ctx *ctx = info->ctx; + String *result_str = &(info->result_str); + + if (!args->args[0]) { + *is_null = 1; + return NULL; + } + + result_str->length(0); + { + char *target = args->args[0]; + unsigned int target_length = args->lengths[0]; + grn_obj *grn_string; + const char *normalized; + unsigned int normalized_length_in_bytes; + unsigned int normalized_n_characters; + + grn_string = grn_string_open(ctx, + target, target_length, + info->normalizer, info->flags); + grn_string_get_normalized(ctx, grn_string, + &normalized, + &normalized_length_in_bytes, + &normalized_n_characters); + if (result_str->reserve(normalized_length_in_bytes)) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); + goto error; + } + result_str->q_append(normalized, normalized_length_in_bytes); + result_str->length(normalized_length_in_bytes); + grn_obj_unlink(ctx, grn_string); + } + *is_null = 0; + + if (ctx->rc) { + my_message(ER_ERROR_ON_WRITE, ctx->errbuf, MYF(0)); + goto error; + } + + *length = result_str->length(); + return (char *)result_str->ptr(); + +error: + *is_null = 1; + *error = 1; + return NULL; +} + +MRN_API void mroonga_normalize_deinit(UDF_INIT *init) +{ + st_mrn_normalize_info *info = (st_mrn_normalize_info *)init->ptr; + + if (info) { + MRN_STRING_FREE(info->result_str); + if (info->normalizer) { + grn_obj_unlink(info->ctx, info->normalizer); + } + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/mrn_udf_query_expand.cpp b/storage/mroonga/udf/mrn_udf_query_expand.cpp new file mode 100644 index 0000000000000000000000000000000000000000..562499242fc085ceda73407acebe87cbef870a8d --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_query_expand.cpp @@ -0,0 +1,282 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +namespace mrn { + struct QueryExpandInfo { + grn_ctx *ctx; + grn_obj expanded_query; + grn_obj *term_column; + grn_obj *expanded_term_column; + }; +} + +static void mrn_query_expand_info_free(mrn::QueryExpandInfo *info) +{ + MRN_DBUG_ENTER_FUNCTION(); + + if (!info) { + DBUG_VOID_RETURN; + } + + if (info->ctx) { + GRN_OBJ_FIN(info->ctx, &(info->expanded_query)); + if (grn_obj_is_accessor(info->ctx, info->expanded_term_column)) { + grn_obj_unlink(info->ctx, info->expanded_term_column); + } + if (grn_obj_is_accessor(info->ctx, info->term_column)) { + grn_obj_unlink(info->ctx, info->term_column); + } + mrn_context_pool->release(info->ctx); + } + my_free(info); + + DBUG_VOID_RETURN; +} + +MRN_API my_bool mroonga_query_expand_init(UDF_INIT *init, + UDF_ARGS *args, + char *message) +{ + mrn::QueryExpandInfo *info = NULL; + + MRN_DBUG_ENTER_FUNCTION(); + + init->ptr = NULL; + if (args->arg_count != 4) { + sprintf(message, + "mroonga_query_expand(): wrong number of arguments: %u for 4", + args->arg_count); + goto error; + } + if (args->arg_type[0] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 1st argument must be table name as string"); + goto error; + } + if (args->arg_type[1] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 2nd argument must be term column name as string"); + goto error; + } + if (args->arg_type[2] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 3nd argument must be expanded term column name as string"); + goto error; + } + if (args->arg_type[3] != STRING_RESULT) { + strcpy(message, + "mroonga_query_expand(): " + "the 4th argument must be query as string"); + goto error; + } + + init->maybe_null = 1; + + info = static_cast( + mrn_my_malloc(sizeof(mrn::QueryExpandInfo), + MYF(MY_WME | MY_ZEROFILL))); + if (!info) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): failed to allocate memory"); + goto error; + } + + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + if (!current_db_path) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): no current database"); + goto error; + } + + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error != 0) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): failed to open database: %s", + mrn_db_manager->error_message()); + goto error; + } + info->ctx = mrn_context_pool->pull(); + grn_ctx_use(info->ctx, db->get()); + } + + GRN_TEXT_INIT(&(info->expanded_query), 0); + + { + const char *table_name = args->args[0]; + unsigned int table_name_length = args->lengths[0]; + grn_obj *table = grn_ctx_get(info->ctx, + table_name, + table_name_length); + if (!table) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): table doesn't exist: <%.*s>", + static_cast(table_name_length), + table_name); + goto error; + } + + const char *term_column_name = args->args[1]; + unsigned int term_column_name_length = args->lengths[1]; + info->term_column = grn_obj_column(info->ctx, + table, + term_column_name, + term_column_name_length); + if (!info->term_column) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): term column doesn't exist: <%.*s.%.*s>", + static_cast(table_name_length), + table_name, + static_cast(term_column_name_length), + term_column_name); + goto error; + } + + const char *expanded_term_column_name = args->args[2]; + unsigned int expanded_term_column_name_length = args->lengths[2]; + info->expanded_term_column = grn_obj_column(info->ctx, + table, + expanded_term_column_name, + expanded_term_column_name_length); + if (!info->expanded_term_column) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): " + "expanded term column doesn't exist: <%.*s.%.*s>", + static_cast(table_name_length), + table_name, + static_cast(expanded_term_column_name_length), + expanded_term_column_name); + goto error; + } + } + + init->ptr = reinterpret_cast(info); + + DBUG_RETURN(FALSE); + +error: + mrn_query_expand_info_free(info); + DBUG_RETURN(TRUE); +} + +static void query_expand(mrn::QueryExpandInfo *info, UDF_ARGS *args) +{ + grn_ctx *ctx = info->ctx; + const char *query = args->args[3]; + unsigned int query_length = args->lengths[3]; + + mrn::QueryParser query_parser(info->ctx, + current_thd, + NULL, + NULL, + 0, + NULL); + const char *raw_query; + size_t raw_query_length; + grn_operator default_operator; + grn_expr_flags flags; + query_parser.parse_pragma(query, + query_length, + &raw_query, + &raw_query_length, + &default_operator, + &flags); + GRN_TEXT_SET(info->ctx, + &(info->expanded_query), + query, + raw_query - query); + grn_expr_syntax_expand_query_by_table(ctx, + raw_query, + raw_query_length, + flags, + info->term_column, + info->expanded_term_column, + &(info->expanded_query)); +} + +MRN_API char *mroonga_query_expand(UDF_INIT *init, + UDF_ARGS *args, + char *result, + unsigned long *length, + char *is_null, + char *error) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn::QueryExpandInfo *info = + reinterpret_cast(init->ptr); + grn_ctx *ctx = info->ctx; + + if (!args->args[3]) { + *is_null = 1; + DBUG_RETURN(NULL); + } + + *is_null = 0; + + query_expand(info, args); + + if (ctx->rc) { + char message[MYSQL_ERRMSG_SIZE]; + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): " + "failed to expand: %s", + ctx->errbuf); + my_message(ER_ERROR_ON_WRITE, message, MYF(0)); + goto error; + } + + *length = GRN_TEXT_LEN(&(info->expanded_query)); + DBUG_RETURN(GRN_TEXT_VALUE(&(info->expanded_query))); + +error: + *error = 1; + DBUG_RETURN(NULL); +} + +MRN_API void mroonga_query_expand_deinit(UDF_INIT *init) +{ + MRN_DBUG_ENTER_FUNCTION(); + mrn::QueryExpandInfo *info = + reinterpret_cast(init->ptr); + mrn_query_expand_info_free(info); + DBUG_VOID_RETURN; +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/mrn_udf_snippet.cpp b/storage/mroonga/udf/mrn_udf_snippet.cpp index 22ec0884014ac5f5d71c7a1396a40382de19a36e..7a35225545d4097b98a95fccc23c61a755321158 100644 --- a/storage/mroonga/udf/mrn_udf_snippet.cpp +++ b/storage/mroonga/udf/mrn_udf_snippet.cpp @@ -2,7 +2,7 @@ /* Copyright(C) 2010 Tetsuro IKEDA Copyright(C) 2010-2013 Kentoku SHIBA - Copyright(C) 2011-2014 Kouhei Sutou + Copyright(C) 2011-2017 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -26,13 +26,21 @@ #include #include #include +#include +#include #include +#include MRN_BEGIN_DECLS +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + struct st_mrn_snip_info { - grn_ctx ctx; + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; grn_obj *snippet; String result_str; }; @@ -42,7 +50,7 @@ static my_bool mrn_snippet_prepare(st_mrn_snip_info *snip_info, UDF_ARGS *args, { unsigned int i; CHARSET_INFO *cs; - grn_ctx *ctx = &snip_info->ctx; + grn_ctx *ctx = snip_info->ctx; long long snip_max_len; long long snip_max_num; long long skip_leading_spaces; @@ -121,12 +129,12 @@ static my_bool mrn_snippet_prepare(st_mrn_snip_info *snip_info, UDF_ARGS *args, return TRUE; } -MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *message) +MRN_API my_bool mroonga_snippet_init(UDF_INIT *init, UDF_ARGS *args, char *message) { uint i; st_mrn_snip_info *snip_info = NULL; bool can_open_snippet = TRUE; - initid->ptr = NULL; + init->ptr = NULL; if (args->arg_count < 11 || (args->arg_count - 11) % 3) { sprintf(message, "Incorrect number of arguments for mroonga_snippet(): %u", @@ -168,8 +176,7 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes goto error; } } - initid->maybe_null = 1; - initid->const_item = 1; + init->maybe_null = 1; if (!(snip_info = (st_mrn_snip_info *) mrn_my_malloc(sizeof(st_mrn_snip_info), MYF(MY_WME | MY_ZEROFILL)))) @@ -177,8 +184,32 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes strcpy(message, "mroonga_snippet() out of memory"); goto error; } - grn_ctx_init(&snip_info->ctx, 0); - grn_db_create(&snip_info->ctx, NULL, 0); + snip_info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + snip_info->db = db->get(); + grn_ctx_use(snip_info->ctx, snip_info->db); + snip_info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + snip_info->db = grn_db_create(snip_info->ctx, NULL, NULL); + snip_info->use_shared_db = false; + } + if (!snip_info->db) { + sprintf(message, + "mroonga_snippet(): failed to %s: %s", + action, + snip_info->ctx->errbuf); + goto error; + } + } for (i = 1; i < args->arg_count; i++) { if (!args->args[i]) { @@ -191,24 +222,26 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *initid, UDF_ARGS *args, char *mes goto error; } } - initid->ptr = (char *) snip_info; + init->ptr = (char *) snip_info; return FALSE; error: if (snip_info) { - grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); - grn_ctx_fin(&snip_info->ctx); + if (!snip_info->use_shared_db) { + grn_obj_close(snip_info->ctx, snip_info->db); + } + mrn_context_pool->release(snip_info->ctx); my_free(snip_info); } return TRUE; } -MRN_API char *mroonga_snippet(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *length, char *is_null, char *error) +MRN_API char *mroonga_snippet(UDF_INIT *init, UDF_ARGS *args, char *result, + unsigned long *length, char *is_null, char *error) { - st_mrn_snip_info *snip_info = (st_mrn_snip_info *) initid->ptr; - grn_ctx *ctx = &snip_info->ctx; + st_mrn_snip_info *snip_info = (st_mrn_snip_info *) init->ptr; + grn_ctx *ctx = snip_info->ctx; String *result_str = &snip_info->result_str; char *target; unsigned int target_length; @@ -286,16 +319,18 @@ MRN_API char *mroonga_snippet(UDF_INIT *initid, UDF_ARGS *args, char *result, return NULL; } -MRN_API void mroonga_snippet_deinit(UDF_INIT *initid) +MRN_API void mroonga_snippet_deinit(UDF_INIT *init) { - st_mrn_snip_info *snip_info = (st_mrn_snip_info *) initid->ptr; + st_mrn_snip_info *snip_info = (st_mrn_snip_info *) init->ptr; if (snip_info) { if (snip_info->snippet) { - grn_obj_close(&snip_info->ctx, snip_info->snippet); + grn_obj_close(snip_info->ctx, snip_info->snippet); } MRN_STRING_FREE(snip_info->result_str); - grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); - grn_ctx_fin(&snip_info->ctx); + if (!snip_info->use_shared_db) { + grn_obj_close(snip_info->ctx, snip_info->db); + } + mrn_context_pool->release(snip_info->ctx); my_free(snip_info); } } diff --git a/storage/mroonga/udf/mrn_udf_snippet_html.cpp b/storage/mroonga/udf/mrn_udf_snippet_html.cpp new file mode 100644 index 0000000000000000000000000000000000000000..99c9edfbba84f5427addf5cdeb29539cc3a8b1c9 --- /dev/null +++ b/storage/mroonga/udf/mrn_udf_snippet_html.cpp @@ -0,0 +1,444 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + Copyright(C) 2015-2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRN_BEGIN_DECLS + +extern mrn::DatabaseManager *mrn_db_manager; +extern mrn::ContextPool *mrn_context_pool; + +typedef struct st_mrn_snippet_html_info +{ + grn_ctx *ctx; + grn_obj *db; + bool use_shared_db; + grn_obj *snippet; + String result_str; + struct { + bool used; + grn_obj *table; + grn_obj *default_column; + } query_mode; +} mrn_snippet_html_info; + +static my_bool mrn_snippet_html_prepare(mrn_snippet_html_info *info, + UDF_ARGS *args, + char *message, + grn_obj **snippet) +{ + MRN_DBUG_ENTER_FUNCTION(); + + grn_ctx *ctx = info->ctx; + int flags = GRN_SNIP_SKIP_LEADING_SPACES; + unsigned int width = 200; + unsigned int max_n_results = 3; + const char *open_tag = ""; + const char *close_tag = ""; + grn_snip_mapping *mapping = GRN_SNIP_MAPPING_HTML_ESCAPE; + grn_obj *expr = NULL; + String *result_str = &(info->result_str); + + *snippet = NULL; + + mrn::encoding::set_raw(ctx, system_charset_info); + if (!(system_charset_info->state & (MY_CS_BINSORT | MY_CS_CSSORT))) { + flags |= GRN_SNIP_NORMALIZE; + } + + *snippet = grn_snip_open(ctx, flags, + width, max_n_results, + open_tag, strlen(open_tag), + close_tag, strlen(close_tag), + mapping); + if (ctx->rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): failed to open grn_snip: <%s>", + ctx->errbuf); + } + goto error; + } + + if (info->query_mode.used) { + if (!info->query_mode.table) { + grn_obj *short_text; + short_text = grn_ctx_at(info->ctx, GRN_DB_SHORT_TEXT); + info->query_mode.table = grn_table_create(info->ctx, + NULL, 0, NULL, + GRN_TABLE_HASH_KEY, + short_text, + NULL); + } + if (!info->query_mode.default_column) { + info->query_mode.default_column = + grn_obj_column(info->ctx, + info->query_mode.table, + GRN_COLUMN_NAME_KEY, + GRN_COLUMN_NAME_KEY_LEN); + } + + grn_obj *record = NULL; + GRN_EXPR_CREATE_FOR_QUERY(info->ctx, info->query_mode.table, expr, record); + if (!expr) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to create expression: <%s>", + ctx->errbuf); + } + goto error; + } + + mrn::QueryParser query_parser(info->ctx, + current_thd, + expr, + info->query_mode.default_column, + 0, + NULL); + grn_rc rc = query_parser.parse(args->args[1], args->lengths[1]); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to parse query: <%s>", + ctx->errbuf); + } + goto error; + } + + rc = grn_expr_snip_add_conditions(info->ctx, + expr, + *snippet, + 0, + NULL, NULL, + NULL, NULL); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to add conditions: <%s>", + ctx->errbuf); + } + goto error; + } + } else { + unsigned int i; + for (i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + continue; + } + grn_rc rc = grn_snip_add_cond(ctx, *snippet, + args->args[i], args->lengths[i], + NULL, 0, + NULL, 0); + if (rc != GRN_SUCCESS) { + if (message) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): " + "failed to add a condition to grn_snip: <%s>", + ctx->errbuf); + } + goto error; + } + } + } + + result_str->set_charset(system_charset_info); + DBUG_RETURN(FALSE); + +error: + if (expr) { + grn_obj_close(ctx, expr); + } + if (*snippet) { + grn_obj_close(ctx, *snippet); + } + DBUG_RETURN(TRUE); +} + +MRN_API my_bool mroonga_snippet_html_init(UDF_INIT *init, + UDF_ARGS *args, + char *message) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_snippet_html_info *info = NULL; + + init->ptr = NULL; + + if (args->arg_count < 1) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): wrong number of arguments: %u for 1+", + args->arg_count); + goto error; + } + + + for (unsigned int i = 0; i < args->arg_count; ++i) { + switch (args->arg_type[i]) { + case STRING_RESULT: + /* OK */ + break; + case REAL_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): all arguments must be string: " + "<%u>=<%g>", + i, *((double *)(args->args[i]))); + goto error; + break; + case INT_RESULT: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): all arguments must be string: " + "<%u>=<%lld>", + i, *((longlong *)(args->args[i]))); + goto error; + break; + default: + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): all arguments must be string: <%u>", + i); + goto error; + break; + } + } + + init->maybe_null = 1; + + info = (mrn_snippet_html_info *)mrn_my_malloc(sizeof(mrn_snippet_html_info), + MYF(MY_WME | MY_ZEROFILL)); + if (!info) { + snprintf(message, MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): failed to allocate memory"); + goto error; + } + + info->ctx = mrn_context_pool->pull(); + { + const char *current_db_path = MRN_THD_DB_PATH(current_thd); + const char *action; + if (current_db_path) { + action = "open database"; + mrn::Database *db; + int error = mrn_db_manager->open(current_db_path, &db); + if (error == 0) { + info->db = db->get(); + grn_ctx_use(info->ctx, info->db); + info->use_shared_db = true; + } + } else { + action = "create anonymous database"; + info->db = grn_db_create(info->ctx, NULL, NULL); + info->use_shared_db = false; + } + if (!info->db) { + sprintf(message, + "mroonga_snippet_html(): failed to %s: %s", + action, + info->ctx->errbuf); + goto error; + } + } + + info->query_mode.used = FALSE; + + if (args->arg_count == 2 && + args->attribute_lengths[1] == strlen("query") && + strncmp(args->attributes[1], "query", strlen("query")) == 0) { + info->query_mode.used = TRUE; + info->query_mode.table = NULL; + info->query_mode.default_column = NULL; + } + + { + bool all_keywords_are_constant = TRUE; + for (unsigned int i = 1; i < args->arg_count; ++i) { + if (!args->args[i]) { + all_keywords_are_constant = FALSE; + break; + } + } + + if (all_keywords_are_constant) { + if (mrn_snippet_html_prepare(info, args, message, &(info->snippet))) { + goto error; + } + } else { + info->snippet = NULL; + } + } + + init->ptr = (char *)info; + + DBUG_RETURN(FALSE); + +error: + if (info) { + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + } + DBUG_RETURN(TRUE); +} + +MRN_API char *mroonga_snippet_html(UDF_INIT *init, + UDF_ARGS *args, + char *result, + unsigned long *length, + char *is_null, + char *error) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_snippet_html_info *info = + reinterpret_cast(init->ptr); + + grn_ctx *ctx = info->ctx; + grn_obj *snippet = info->snippet; + String *result_str = &(info->result_str); + + if (!args->args[0]) { + *is_null = 1; + DBUG_RETURN(NULL); + } + + if (!snippet) { + if (mrn_snippet_html_prepare(info, args, NULL, &snippet)) { + goto error; + } + } + + { + char *target = args->args[0]; + unsigned int target_length = args->lengths[0]; + + unsigned int n_results, max_tagged_length; + { + grn_rc rc = grn_snip_exec(ctx, snippet, target, target_length, + &n_results, &max_tagged_length); + if (rc != GRN_SUCCESS) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + } + + *is_null = 0; + result_str->length(0); + + { + const char *start_tag = "
"; + const char *end_tag = "
"; + size_t start_tag_length = strlen(start_tag); + size_t end_tag_length = strlen(end_tag); + unsigned int max_length_per_snippet = + start_tag_length + end_tag_length + max_tagged_length; + if (result_str->reserve(max_length_per_snippet * n_results)) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); + goto error; + } + + for (unsigned int i = 0; i < n_results; ++i) { + result_str->q_append(start_tag, start_tag_length); + + unsigned int result_length; + grn_rc rc = + grn_snip_get_result(ctx, snippet, i, + (char *)result_str->ptr() + result_str->length(), + &result_length); + if (rc) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + result_str->length(result_str->length() + result_length); + + result_str->q_append(end_tag, end_tag_length); + } + } + + if (!info->snippet) { + grn_rc rc = grn_obj_close(ctx, snippet); + if (rc != GRN_SUCCESS) { + my_printf_error(ER_MRN_ERROR_FROM_GROONGA_NUM, + ER_MRN_ERROR_FROM_GROONGA_STR, MYF(0), ctx->errbuf); + goto error; + } + } + } + + *length = result_str->length(); + DBUG_RETURN((char *)result_str->ptr()); + +error: + if (!info->snippet && snippet) { + grn_obj_close(ctx, snippet); + } + + *is_null = 1; + *error = 1; + + DBUG_RETURN(NULL); +} + +MRN_API void mroonga_snippet_html_deinit(UDF_INIT *init) +{ + MRN_DBUG_ENTER_FUNCTION(); + + mrn_snippet_html_info *info = + reinterpret_cast(init->ptr); + if (!info) { + DBUG_VOID_RETURN; + } + + if (info->snippet) { + grn_obj_close(info->ctx, info->snippet); + } + if (info->query_mode.used) { + if (info->query_mode.default_column) { + grn_obj_close(info->ctx, info->query_mode.default_column); + } + if (info->query_mode.table) { + grn_obj_close(info->ctx, info->query_mode.table); + } + } + MRN_STRING_FREE(info->result_str); + if (!info->use_shared_db) { + grn_obj_close(info->ctx, info->db); + } + mrn_context_pool->release(info->ctx); + my_free(info); + + DBUG_VOID_RETURN; +} + +MRN_END_DECLS diff --git a/storage/mroonga/udf/sources.am b/storage/mroonga/udf/sources.am index 380ab4b60cf45af5e639fa71bc8753d1144284fa..ac2f098e31027808bf971ef4f196bb5fb141a256 100644 --- a/storage/mroonga/udf/sources.am +++ b/storage/mroonga/udf/sources.am @@ -1,5 +1,9 @@ libmrn_udf_la_SOURCES = \ mrn_udf_last_insert_grn_id.cpp \ mrn_udf_snippet.cpp \ + mrn_udf_snippet_html.cpp \ mrn_udf_command.cpp \ - mrn_udf_escape.cpp + mrn_udf_escape.cpp \ + mrn_udf_normalize.cpp \ + mrn_udf_highlight_html.cpp \ + mrn_udf_query_expand.cpp diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt index 2d8a59fa66462c74e8920bdf923ce0273dbdbd7f..e27070f9e0c3120c6b31e1093cc564be3ab51be7 100644 --- a/storage/mroonga/vendor/groonga/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright(C) 2012-2015 Brazil +# Copyright(C) 2012-2016 Brazil # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 2.6.2) # cmake_minimum_required(VERSION 2.6.4) # CentOS 5 set(GRN_PROJECT_NAME "groonga") +set(GRN_PROJECT_LABEL "Groonga") project("${GRN_PROJECT_NAME}") if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") @@ -39,7 +40,7 @@ if(MSVC) endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") - set(CMAKE_COMPILER_IS_CLANGC ON) + set(CMAKE_COMPILER_IS_CLANGCC ON) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_COMPILER_IS_CLANGCXX ON) @@ -59,6 +60,8 @@ else() endif() endif() string(REGEX REPLACE "(^.*=|\n)" "" GRN_VERSION "${GRN_VERSION}") +string(REGEX REPLACE "\\." "," GRN_VERSION_RC "${GRN_VERSION}") +string(REGEX REPLACE "-.*$" "" GRN_VERSION_RC "${GRN_VERSION_RC}") include(CheckIncludeFile) include(CheckFunctionExists) @@ -97,25 +100,25 @@ set(GRN_DEFAULT_ENCODING CACHE STRING "Groonga's default encoding") set(GRN_DEFAULT_MATCH_ESCALATION_THRESHOLD 0 - CACHE STRING "groonga default match escalation threshold") + CACHE STRING "Groonga's default match escalation threshold") set(GRN_DEFAULT_DOCUMENT_ROOT_BASE "html/admin" - CACHE PATH "groonga default document root base path") + CACHE PATH "Groonga's default document root base path") set(GRN_DEFAULT_RELATIVE_DOCUMENT_ROOT "share/${GRN_PROJECT_NAME}/${GRN_DEFAULT_DOCUMENT_ROOT_BASE}" - CACHE PATH "groonga default relative document root") + CACHE PATH "Groonga's default relative document root") set(GRN_DEFAULT_DOCUMENT_ROOT "${CMAKE_INSTALL_PREFIX}/${GRN_DATA_DIR}/${GRN_DEFAULT_DOCUMENT_ROOT_BASE}" - CACHE PATH "groonga default document root") + CACHE PATH "Groonga's default document root") set(GRN_DEFAULT_DB_KEY "auto" CACHE STRING "Groonga's default DB key management algorithm") set(GRN_STACK_SIZE 1024 CACHE STRING - "DANGER!!! groonga stack size. Normarlly, you should not change this variable.") + "DANGER!!! Groonga's stack size. Normarlly, you should not change this variable.") set(GRN_LOCK_TIMEOUT - 10000000 + 900000 CACHE STRING "timeout to acquire a lock.") set(GRN_LOCK_WAIT_TIME_NANOSECOND @@ -129,42 +132,43 @@ set(GRN_PLUGINS_DIR set(GRN_PLUGIN_SUFFIX "${CMAKE_SHARED_MODULE_SUFFIX}") set(GRN_DLL_FILENAME "${CMAKE_SHARED_LIBRARY_PREFIX}groonga${CMAKE_SHARED_LIBRARY_SUFFIX}") -set(GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE "synonyms.tsv") +set(GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE + "${GRN_CONFIG_DIR}/synonyms.tsv") set(GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE - "${CMAKE_INSTALL_PREFIX}/${GRN_DATA_DIR}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE}") + "${CMAKE_INSTALL_PREFIX}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE}") set(GRN_RELATIVE_RUBY_SCRIPTS_DIR "${LIB_DIR}/${GRN_PROJECT_NAME}/scripts/ruby") set(GRN_RUBY_SCRIPTS_DIR "${CMAKE_INSTALL_PREFIX}/${GRN_RELATIVE_RUBY_SCRIPTS_DIR}") -if(CMAKE_COMPILER_IS_GNUCC) +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(GRN_C_COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS} -std=gnu99") endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX) MY_CHECK_AND_SET_COMPILER_FLAG("-Wall") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wextra") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-but-set-variable") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-sign-compare") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-pointer-sign") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-missing-field-initializers") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wformat=2") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wformat") MY_CHECK_AND_SET_COMPILER_FLAG("-Wstrict-aliasing=2") MY_CHECK_AND_SET_COMPILER_FLAG("-fno-strict-aliasing") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wdisabled-optimization") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-disabled-optimization") MY_CHECK_AND_SET_COMPILER_FLAG("-Wfloat-equal") MY_CHECK_AND_SET_COMPILER_FLAG("-Wpointer-arith") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wdeclaration-after-statement") MY_CHECK_AND_SET_COMPILER_FLAG("-Wbad-function-cast") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wcast-align") - #MY_CHECK_AND_SET_COMPILER_FLAG("-Wredundant-decls") + if(NOT CMAKE_COMPILER_IS_CLANGCXX) + MY_CHECK_AND_SET_COMPILER_FLAG("-Wcast-align") + endif() + # MY_CHECK_AND_SET_COMPILER_FLAG("-Wredundant-decls") MY_CHECK_AND_SET_COMPILER_FLAG("-Wwrite-strings") MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions") MY_CHECK_AND_SET_COMPILER_FLAG("-fimplicit-templates") - MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-clobbered") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-sign-compare") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-missing-field-initializers") + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough") endif() if(NOT DEFINED CMAKE_C_COMPILE_OPTIONS_PIC) @@ -303,7 +307,7 @@ else() endif() if(NOT USE_KQUEUE) - ac_check_headers(sys/poll.h) + ac_check_headers(poll.h) if(${HAVE_SYS_POLL_H}) ac_check_funcs(poll) if(${HAVE_POLL}) @@ -338,54 +342,92 @@ if(NOT ${GRN_WITH_ZLIB} STREQUAL "no") endif() endif() +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_lz4_version" + GRN_BUNDLED_LZ4_VERSION) +string(STRIP + "${GRN_BUNDLED_LZ4_VERSION}" + GRN_BUNDLED_LZ4_VERSION) +option(GRN_WITH_BUNDLED_LZ4 "use bundled LZ4" OFF) + set(GRN_WITH_LZ4 "auto" CACHE STRING "Support data compression by LZ4.") if(NOT ${GRN_WITH_LZ4} STREQUAL "no") - if(NOT DEFINED LIBLZ4_FOUND) - pkg_check_modules(LIBLZ4 liblz4) - endif() - if(LIBLZ4_FOUND) - set(GRN_WITH_LZ4 TRUE) + if(GRN_WITH_BUNDLED_LZ4) + set(LIBLZ4_INCLUDE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/vendor/lz4-${GRN_BUNDLED_LZ4_VERSION}/lib") + set(LZ4_LIBS liblz4) else() - if(${GRN_WITH_LZ4} STREQUAL "yes") - message(FATAL_ERROR "No LZ4 found") + if(NOT DEFINED LIBLZ4_FOUND) + pkg_check_modules(LIBLZ4 liblz4) + endif() + if(LIBLZ4_FOUND) + find_library(LZ4_LIBS + NAMES ${LIBLZ4_LIBRARIES} + PATHS ${LIBLZ4_LIBRARY_DIRS} + NO_DEFAULT_PATH) + set(GRN_WITH_LZ4 TRUE) + else() + if(${GRN_WITH_LZ4} STREQUAL "yes") + message(FATAL_ERROR "No LZ4 found") + endif() + set(GRN_WITH_LZ4 FALSE) endif() - set(GRN_WITH_LZ4 FALSE) endif() endif() + +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_mecab_version" + GRN_BUNDLED_MECAB_VERSION) +string(STRIP + "${GRN_BUNDLED_MECAB_VERSION}" + GRN_BUNDLED_MECAB_VERSION) +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_mecab_naist_jdic_version" + GRN_BUNDLED_MECAB_NAIST_JDIC_VERSION) +string(STRIP + "${GRN_BUNDLED_MECAB_NAIST_JDIC_VERSION}" + GRN_BUNDLED_MECAB_NAIST_JDIC_VERSION) +option(GRN_WITH_BUNDLED_MECAB "use bundled MeCab" OFF) + set(GRN_WITH_MECAB "auto" CACHE STRING "use MeCab for morphological analysis") if(NOT ${GRN_WITH_MECAB} STREQUAL "no") - set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path") - if(NOT CMAKE_CROSSCOMPILING) - find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}") - endif() - if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}") - execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --inc-dir - OUTPUT_VARIABLE MECAB_INCLUDE_DIRS - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --libs-only-L - OUTPUT_VARIABLE MECAB_LIBRARY_DIRS - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(MECAB_LIBRARIES "mecab") - ac_check_lib(${MECAB_LIBRARIES} mecab_new) - if(HAVE_LIBMECAB) - set(GRN_WITH_MECAB TRUE) + if(GRN_WITH_BUNDLED_MECAB) + set(MECAB_INCLUDE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/vendor/mecab-${GRN_BUNDLED_MECAB_VERSION}/src") + set(MECAB_LIBRARY_DIRS + "${CMAKE_CURRENT_BUILD_DIR}/vendor/mecab") + set(MECAB_LIBRARIES libmecab) + else() + set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path") + if(NOT CMAKE_CROSSCOMPILING) + find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}") + endif() + if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}") + execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --inc-dir + OUTPUT_VARIABLE MECAB_INCLUDE_DIRS + OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}" --libs-only-L + OUTPUT_VARIABLE MECAB_LIBRARY_DIRS + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(MECAB_LIBRARIES "mecab") + ac_check_lib(${MECAB_LIBRARIES} mecab_new) + if(HAVE_LIBMECAB) + set(GRN_WITH_MECAB TRUE) + else() + if(${GRN_WITH_MECAB} STREQUAL "yes") + message(FATAL_ERROR + "No MeCab library found: " + "include directories: <${MECAB_INCLUDE_DIRS}>, " + "library directories: <${MECAB_LIBRARY_DIRS}>") + endif() + set(GRN_WITH_MECAB FALSE) + endif() else() if(${GRN_WITH_MECAB} STREQUAL "yes") - message(FATAL_ERROR - "No MeCab library found: " - "include directories: <${MECAB_INCLUDE_DIRS}>, " - "library directories: <${MECAB_LIBRARY_DIRS}>") + message(FATAL_ERROR "No mecab-config found: <${GRN_MECAB_CONFIG}>") endif() set(GRN_WITH_MECAB FALSE) endif() - else() - if(${GRN_WITH_MECAB} STREQUAL "yes") - message(FATAL_ERROR "No mecab-config found: <${GRN_MECAB_CONFIG}>") - endif() - set(GRN_WITH_MECAB FALSE) endif() else() set(GRN_WITH_MECAB FALSE) @@ -486,41 +528,65 @@ else() set(GRN_WITH_LIBEVENT FALSE) endif() +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/bundled_message_pack_version" + GRN_BUNDLED_MESSAGE_PACK_VERSION) +string(STRIP + "${GRN_BUNDLED_MESSAGE_PACK_VERSION}" + GRN_BUNDLED_MESSAGE_PACK_VERSION) +option(GRN_WITH_BUNDLED_MESSAGE_PACK "use bundled MessagePack" OFF) + set(GRN_WITH_MESSAGE_PACK "auto" CACHE STRING "use MessagePack for suggestion") if(NOT ${GRN_WITH_MESSAGE_PACK} STREQUAL "no") - if(NOT DEFINED MESSAGE_PACK_FOUND) - pkg_check_modules(MESSAGE_PACK msgpack) - endif() - if(MESSAGE_PACK_FOUND) - set(GRN_WITH_MESSAGE_PACK TRUE) + if(GRN_WITH_BUNDLED_MESSAGE_PACK) + set(MESSAGE_PACK_INCLUDE_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/vendor/msgpack-${GRN_BUNDLED_MESSAGE_PACK_VERSION}/include") + set(MESSAGE_PACK_LIBS msgpackc) else() - if("${GRN_WITH_MESSAGE_PACK}" STREQUAL "yes" OR - "${GRN_WITH_MESSAGE_PACK}" STREQUAL "auto") - set(MESSAGE_PACK_INCLUDE_DIRS "") - set(MESSAGE_PACK_LIBRARY_DIRS "") - else() - set(MESSAGE_PACK_INCLUDE_DIRS "${GRN_WITH_MESSAGE_PACK}/include") - set(MESSAGE_PACK_LIBRARY_DIRS "${GRN_WITH_MESSAGE_PACK}/lib") + if(NOT DEFINED MESSAGE_PACK_FOUND) + pkg_check_modules(MESSAGE_PACK msgpack) endif() - set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) - ac_check_lib(msgpack msgpack_version "${MESSAGE_PACK_LIBRARY_DIRS}") - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) - if(HAVE_LIBMSGPACK) - set(MESSAGE_PACK_LIBRARIES "msgpack") + if(MESSAGE_PACK_FOUND) + find_library(MESSAGE_PACK_LIBS + NAMES ${MESSAGE_PACK_LIBRARIES} + PATHS ${MESSAGE_PACK_LIBRARY_DIRS} + NO_DEFAULT_PATH) set(GRN_WITH_MESSAGE_PACK TRUE) else() - if(${GRN_WITH_MESSAGE_PACK} STREQUAL "yes") - message(FATAL_ERROR "No MessagePack found") + if("${GRN_WITH_MESSAGE_PACK}" STREQUAL "yes" OR + "${GRN_WITH_MESSAGE_PACK}" STREQUAL "auto") + set(MESSAGE_PACK_INCLUDE_DIRS "") + set(MESSAGE_PACK_LIBRARY_DIRS "") + else() + set(MESSAGE_PACK_INCLUDE_DIRS "${GRN_WITH_MESSAGE_PACK}/include") + set(MESSAGE_PACK_LIBRARY_DIRS "${GRN_WITH_MESSAGE_PACK}/lib") + endif() + set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) + ac_check_lib(msgpack msgpack_version "${MESSAGE_PACK_LIBRARY_DIRS}") + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) + if(HAVE_LIBMSGPACK) + find_library(MESSAGE_PACK_LIBS + NAMES "msgpack" + PATHS ${MESSAGE_PACK_LIBRARY_DIRS} + NO_DEFAULT_PATH) + set(GRN_WITH_MESSAGE_PACK TRUE) + else() + if(${GRN_WITH_MESSAGE_PACK} STREQUAL "yes") + message(FATAL_ERROR "No MessagePack found") + endif() + set(GRN_WITH_MESSAGE_PACK FALSE) endif() - set(GRN_WITH_MESSAGE_PACK FALSE) endif() endif() else() set(GRN_WITH_MESSAGE_PACK FALSE) endif() -find_program(RUBY NAMES "ruby2.1" "ruby21" "ruby") +find_program(RUBY NAMES + "ruby2.3" "ruby23" + "ruby2.2" "ruby22" + "ruby2.1" "ruby21" + "ruby") option(GRN_WITH_MRUBY "use mruby" OFF) if(GRN_WITH_MRUBY) @@ -531,6 +597,7 @@ else() set(MRUBY_INCLUDE_DIRS "") set(MRUBY_LIBS "") endif() +set(MRUBY_DEFINITIONS "MRB_INT64" "HAVE_ONIGMO_H") # TODO: Support using system Onigmo instead of bundled Onigmo. # set(GRN_WITH_ONIGMO ON) @@ -580,4 +647,9 @@ if(NOT GRN_EMBED) DESTINATION "${LIB_DIR}/pkgconfig/") endif() +install(FILES + "COPYING" + "README.md" + DESTINATION "${GRN_DATA_DIR}") + add_subdirectory(vendor/plugins) diff --git a/storage/mroonga/vendor/groonga/Makefile.am b/storage/mroonga/vendor/groonga/Makefile.am index 6f760a52b30105bfe6a01d4980e506a736b5b335..1fc7028ff7e90e1d70b9b5c0d53bfda712fe88bf 100644 --- a/storage/mroonga/vendor/groonga/Makefile.am +++ b/storage/mroonga/vendor/groonga/Makefile.am @@ -2,7 +2,7 @@ LOCALES = ja -ACLOCAL_AMFLAGS = ${ACLOCAL_ARGS} -I . +ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = 1.9.6 SUBDIRS = \ build \ @@ -20,16 +20,23 @@ SUBDIRS = \ doc #dist_data_DATA = EXTRA_DIST = \ + CMakeLists.txt \ README.md \ - bindings \ - version-gen.sh \ base_version \ + bindings \ + bundled_lz4_version \ + bundled_mecab_naist_jdic_version \ + bundled_mecab_version \ + config.h.cmake \ gpg_uid \ - CMakeLists.txt \ - config.h.cmake + nginx_version \ + version-gen.sh pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = groonga.pc +if GRN_WITH_ARROW +pkgconfig_DATA += groonga-arrow.pc +endif .PHONY: FORCE @@ -42,6 +49,7 @@ include $(srcdir)/version.sh dist-hook: echo "$(GRN_VERSION)" > $(distdir)/version + cd $(distdir) && autoreconf --install --force && find . -name autom4te.cache | xargs rm -fr benchmark: cd test/benchmark && $(MAKE) benchmark @@ -74,8 +82,7 @@ update-latest-release: misc doc/source/install.rst \ doc/source/install/*.rst \ doc/locale/*/LC_MESSAGES/install.po \ - $(GROONGA_ORG_PATH)/index.html \ - $(GROONGA_ORG_PATH)/ja/index.html + $(GROONGA_ORG_PATH)/_config.yml update-po: @for lang in $(LOCALES); do \ diff --git a/storage/mroonga/vendor/groonga/README.md b/storage/mroonga/vendor/groonga/README.md index 09e5764a02402d3e7f1d28c71c2cba339df31cbe..af0b5a7dbb5033fd3e5989ff85c8a804565dcb3b 100644 --- a/storage/mroonga/vendor/groonga/README.md +++ b/storage/mroonga/vendor/groonga/README.md @@ -6,6 +6,19 @@ Groonga is an open-source fulltext search engine and column store. See doc/source/ directory or http://groonga.org/docs/. +Here are shortcut links: + + * How to install: http://groonga.org/docs/install.html + * Tutorial: http://groonga.org/docs/tutorial.html + * How to build as a developer: http://groonga.org/docs/contribution/development/build.html + +## Community + + * [@groonga on Twitter](https://twitter.com/groonga/) + * [Groonga page on Facebook](https://www.facebook.com/groonga) + * [Mailing list on SourceForge.net](http://lists.sourceforge.net/mailman/listinfo/groonga-talk) + * [Chat room on Gitter](https://gitter.im/groonga/public) + ## Bundled software ### mruby diff --git a/storage/mroonga/vendor/groonga/appveyor.yml b/storage/mroonga/vendor/groonga/appveyor.yml index d755e6b49fdf9c4a23335bdcb10407a94eaa8d5d..fca8c229a55f474fe8576ae459bc11df89d46898 100644 --- a/storage/mroonga/vendor/groonga/appveyor.yml +++ b/storage/mroonga/vendor/groonga/appveyor.yml @@ -1,19 +1,72 @@ version: "{build}" clone_depth: 10 -build_script: - - git submodule update --init - - cmake . -G "Visual Studio 12 2013 Win64" - - cmake --build . --config Debug + +environment: + matrix: + - VS_VERSION: 12 + ARCH: x86 + - VS_VERSION: 12 + ARCH: amd64 + - VS_VERSION: 14 + ARCH: x86 + - VS_VERSION: 14 + ARCH: amd64 notifications: - provider: Email to: - - kou@clear-code.com - - groonga-commit@lists.sourceforge.jp + - groonga-commit@lists.osdn.me on_build_status_changed: true -test: off -# before_test: -# - gem install grntest -# test_script: -# - grntest --groonga src\groonga.exe --base-directory test\command test\command\suite +init: + - set PATH=C:\Ruby22\bin;%PATH% + - set PATH=C:\msys64\usr\bin;%PATH% + - call + "C:\Program Files (x86)\Microsoft Visual Studio %VS_VERSION%.0\VC\vcvarsall.bat" + %ARCH% +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + +install: + - tzutil /s "Tokyo Standard Time" + # - choco install -y imdisk-toolkit + # - mkdir tmp + # - imdisk -a -t file -m tmp -o awe -s 1G -p "/fs:ntfs /q /y" + +build_script: + - git submodule update --init + - cd vendor + - ruby download_mecab.rb + - ruby download_message_pack.rb + - ruby download_lz4.rb + - cd .. + - set CMAKE_GENERATOR_NAME=Visual Studio %VS_VERSION% + - if "%VS_VERSION%" == "12" + set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2013 + - if "%VS_VERSION%" == "14" + set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% 2015 + - if "%ARCH%" == "amd64" + set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 + - cmake . -G "%CMAKE_GENERATOR_NAME%" + -DCMAKE_INSTALL_PREFIX=c:\groonga + -DGRN_WITH_MRUBY=yes + -DGRN_WITH_BUNDLED_MECAB=yes + -DGRN_WITH_BUNDLED_MESSAGE_PACK=yes + -DGRN_WITH_BUNDLED_LZ4=yes + - cmake --build . --config Debug + - cmake --build . --config Debug --target Install + +before_test: + - git clone --depth 1 + https://github.com/groonga/grntest.git + test\command\grntest + - cd test\command\grntest + - bundle install --binstubs=..\bin + - cd ..\..\.. +test_script: + - ruby test\command\bin\grntest + --groonga c:\groonga\bin\groonga.exe + --base-directory test\command + --reporter mark + --n-workers 1 + --timeout 60 + test\command\suite diff --git a/storage/mroonga/vendor/groonga/autogen.sh b/storage/mroonga/vendor/groonga/autogen.sh index 66184bf13be10592918a81aaada7f17cde577e2d..98dcc83a79ef663b29b6230cf328f8fa38af8a38 100755 --- a/storage/mroonga/vendor/groonga/autogen.sh +++ b/storage/mroonga/vendor/groonga/autogen.sh @@ -6,15 +6,20 @@ case `uname -s` in Darwin) homebrew_aclocal=/usr/local/share/aclocal if [ -d $homebrew_aclocal ]; then - ACLOCAL_ARGS="$ACLOCAL_ARGS -I $homebrew_aclocal" + ACLOCAL_PATH="$ACLOCAL_PATH $homebrew_aclocal" fi - gettext_aclocal="$(echo /usr/local/Cellar/gettext/*/share/aclocal)" - if [ -d $gettext_aclocal ]; then - ACLOCAL_ARGS="$ACLOCAL_ARGS -I $gettext_aclocal" + gettext_prefix=/usr/local/Cellar/gettext + if [ -d $gettext_prefix ]; then + gettext_aclocal=$(ls $gettext_prefix/*/share/aclocal | \ + gsort --version-sort | \ + tail -n 1) + if [ -d $gettext_aclocal ]; then + ACLOCAL_PATH="$ACLOCAL_PATH $gettext_aclocal" + fi fi ;; FreeBSD) - ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal/" + ACLOCAL_PATH="$ACLOCAL_PATH /usr/local/share/aclocal/" ;; esac @@ -23,4 +28,6 @@ if [ ! -e vendor/mruby-source/.git ]; then fi git submodule update --init -${AUTORECONF:-autoreconf} --force --install +mkdir -p m4 + +${AUTORECONF:-autoreconf} --force --install "$@" diff --git a/storage/mroonga/vendor/groonga/base_version b/storage/mroonga/vendor/groonga/base_version index 25b08bbc78f002c11c581c24441a9be639de31f8..bf993904af82d952411f79329b1164a2a1840d9e 100644 --- a/storage/mroonga/vendor/groonga/base_version +++ b/storage/mroonga/vendor/groonga/base_version @@ -1 +1 @@ -5.0.5 \ No newline at end of file +7.0.7 \ No newline at end of file diff --git a/storage/mroonga/vendor/groonga/benchmark/Makefile.am b/storage/mroonga/vendor/groonga/benchmark/Makefile.am index 310fb4585a3799641f519d0d3ba752d3c38e9be7..a2a8b29ab79dcbe0e3e2b7951de1e5d56a5ec8cb 100644 --- a/storage/mroonga/vendor/groonga/benchmark/Makefile.am +++ b/storage/mroonga/vendor/groonga/benchmark/Makefile.am @@ -5,17 +5,23 @@ SUBDIRS = \ NONEXISTENT_CXX_SOURCE = nonexistent.cpp if WITH_BENCHMARK -noinst_PROGRAMS = \ - bench-table-factory \ - bench-geo-distance \ - bench-geo-select \ - bench-ctx-create \ - bench-query-optimizer \ - bench-range-select +noinst_PROGRAMS = \ + bench-table-factory \ + bench-geo-distance \ + bench-geo-select \ + bench-ctx-create \ + bench-query-optimizer \ + bench-range-select \ + bench-result-set \ + bench-between-sequential \ + bench-nfkc \ + bench-cache endif EXTRA_DIST = \ - bench-query-optimizer-ddl.grn + bench-geo-select.sh \ + bench-query-optimizer-ddl.grn \ + geo-select-generate-grn.rb AM_CPPFLAGS = \ -I$(srcdir) \ @@ -50,33 +56,56 @@ nodist_EXTRA_bench_query_optimizer_SOURCES = $(NONEXISTENT_CXX_SOURCE) bench_range_select_SOURCES = bench-range-select.c nodist_EXTRA_bench_range_select_SOURCES = $(NONEXISTENT_CXX_SOURCE) +bench_result_set_SOURCES = bench-result-set.c +nodist_EXTRA_bench_result_set_SOURCES = $(NONEXISTENT_CXX_SOURCE) + +bench_between_sequential_SOURCES = bench-between-sequential.c +nodist_EXTRA_bench_between_sequential_SOURCES = $(NONEXISTENT_CXX_SOURCE) + +bench_nfkc_SOURCES = bench-nfkc.c +nodist_EXTRA_bench_nfkc_SOURCES = $(NONEXISTENT_CXX_SOURCE) + +bench_cache_SOURCES = bench-cache.c +nodist_EXTRA_bench_cache_SOURCES = $(NONEXISTENT_CXX_SOURCE) + benchmarks = \ run-bench-table-factory \ run-bench-geo-distance \ run-bench-geo-select \ run-bench-ctx-create \ run-bench-query-optimizer \ - run-bench-range-select + run-bench-range-select \ + run-bench-result-set \ + run-bench-between-sequential \ + run-bench-nfkc \ + run-bench-cache run-bench-table-factory: bench-table-factory @echo $@: - ./bench-table-factory + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-table-factory run-bench-geo-distance: bench-geo-distance @echo $@: - ./bench-geo-distance + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-geo-distance run-bench-geo-select: bench-geo-select @echo $@: - env \ - RUBY="$(RUBY)" \ - GROONGA="$(GROONGA)" \ - srcdir="$(srcdir)" \ + env \ + RUBY="$(RUBY)" \ + GROONGA="$(GROONGA)" \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + srcdir="$(srcdir)" \ $(srcdir)/bench-geo-select.sh run-bench-ctx-create: bench-ctx-create @echo $@: - ./bench-ctx-create + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-ctx-create run-bench-query-optimizer: bench-query-optimizer @echo $@: @@ -99,4 +128,26 @@ run-bench-range-select: bench-range-select GRN_RUBY_SCRIPTS_DIR=$(top_srcdir)/lib/mrb/scripts \ ./bench-range-select +run-bench-result-set: bench-result-set + @echo $@: + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-result-set + +run-bench-between-sequential: bench-between-sequential + @echo $@: + @[ ! -e tmp ] && ln -s /dev/shm tmp || : + @mkdir -p tmp/between-sequential + env \ + GRN_RUBY_SCRIPTS_DIR="$(top_srcdir)/lib/mrb/scripts" \ + ./bench-between-sequential + +run-bench-nfkc: bench-nfkc + @echo $@: + ./bench-nfkc + +run-bench-cache: bench-cache + @echo $@: + ./bench-cache + benchmark: $(benchmarks) diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c b/storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c new file mode 100644 index 0000000000000000000000000000000000000000..53bc3af53885575d2940265c9712daed9345861f --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-between-sequential.c @@ -0,0 +1,276 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2016 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz + + CFLAGS: -O2 -g + + Groonga: e2971d9a555a90724b76964cc8c8805373500b4a + % make --quiet -C benchmark run-bench-between-sequential + run-bench-between-sequential: + Process 10 times in each pattern + (total) (average) (median) + ( 500, 600] ( 1000): between: (0.0528s) (0.0053s) (0.0043s) + ( 500, 600] ( 1000): range: (0.0120s) (0.0012s) (0.2500ms) + ( 5000, 5100] ( 10000): between: (0.4052s) (0.0405s) (0.0395s) + ( 5000, 5100] ( 10000): range: (0.0197s) (0.0020s) (0.0010s) + ( 50000, 50100] ( 100000): between: (3.9343s) (0.3934s) (0.3900s) + ( 50000, 50100] ( 100000): range: (0.0969s) (0.0097s) (0.0088s) + (500000, 500100] (1000000): between: (38.2969s) (3.8297s) (3.7983s) + (500000, 500100] (1000000): range: (0.9158s) (0.0916s) (0.0900s) + + Groonga: 35e4e431bb7660b3170e98c329f7219bd6723f05 + % make --quiet -C benchmark run-bench-between-sequential + run-bench-between-sequential: + Process 10 times in each pattern + (total) (average) (median) + ( 500, 600] ( 1000): between: (0.0130s) (0.0013s) (0.2590ms) + ( 500, 600] ( 1000): range: (0.0124s) (0.0012s) (0.2530ms) + ( 5000, 5100] ( 10000): between: (0.0163s) (0.0016s) (0.6440ms) + ( 5000, 5100] ( 10000): range: (0.0205s) (0.0021s) (0.0011s) + ( 50000, 50100] ( 100000): between: (0.0611s) (0.0061s) (0.0051s) + ( 50000, 50100] ( 100000): range: (0.1004s) (0.0100s) (0.0091s) + (500000, 500100] (1000000): between: (0.4518s) (0.0452s) (0.0442s) + (500000, 500100] (1000000): range: (0.8866s) (0.0887s) (0.0878s) +*/ + +#include +#include + +#include +#include + +#include "lib/benchmark.h" + +#define GET(context, name) (grn_ctx_get(context, name, strlen(name))) + +typedef struct _BenchmarkData +{ + grn_ctx context; + grn_obj *database; + guint n_records; + const gchar *command; +} BenchmarkData; + +static void +run_command(grn_ctx *context, const gchar *command) +{ + gchar *response; + unsigned int response_length; + int flags; + + grn_ctx_send(context, command, strlen(command), 0); + grn_ctx_recv(context, &response, &response_length, &flags); +} + +static void +bench(gpointer user_data) +{ + BenchmarkData *data = user_data; + grn_ctx *context = &(data->context); + + run_command(context, data->command); +} + +static gchar * +get_tmp_dir(void) +{ + gchar *current_dir; + gchar *tmp_dir; + + current_dir = g_get_current_dir(); + tmp_dir = g_build_filename(current_dir, "tmp", NULL); + g_free(current_dir); + + return tmp_dir; +} + +static void +setup_database(BenchmarkData *data) +{ + grn_ctx *context = &(data->context); + gchar *tmp_dir; + gchar *database_last_component_name; + gchar *database_path; + guint i; + + tmp_dir = get_tmp_dir(); + database_last_component_name = g_strdup_printf("db-%d", data->n_records); + database_path = g_build_filename(tmp_dir, + "between-sequential", + database_last_component_name, + NULL); + g_free(database_last_component_name); + + if (g_file_test(database_path, G_FILE_TEST_EXISTS)) { + data->database = grn_db_open(context, database_path); + run_command(context, "dump"); + } else { + data->database = grn_db_create(context, database_path, NULL); + + run_command(context, "table_create Entries TABLE_NO_KEY"); + run_command(context, "column_create Entries rank COLUMN_SCALAR Int32"); + + run_command(context, "load --table Entries"); + run_command(context, "["); + for (i = 0; i < data->n_records; i++) { +#define BUFFER_SIZE 4096 + gchar buffer[BUFFER_SIZE]; + const gchar *separator; + if (i == (data->n_records - 1)) { + separator = ""; + } else { + separator = ","; + } + snprintf(buffer, BUFFER_SIZE, "{\"rank\": %u}%s", i, separator); + run_command(context, buffer); +#undef BUFFER_SIZE + } + run_command(context, "]"); + } + + g_free(database_path); +} + +static void +bench_startup(BenchmarkData *data) +{ + grn_ctx_init(&(data->context), 0); + setup_database(data); +} + +static void +bench_shutdown(BenchmarkData *data) +{ + grn_ctx *context = &(data->context); + + grn_obj_close(context, data->database); + grn_ctx_fin(context); +} + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchReporter *reporter; + gint n = 10; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + + g_print("Process %d times in each pattern\n", n); + + bench_init(&argc, &argv); + reporter = bench_reporter_new(); + + { + BenchmarkData data_small_between; + BenchmarkData data_small_range; + BenchmarkData data_medium_between; + BenchmarkData data_medium_range; + BenchmarkData data_large_between; + BenchmarkData data_large_range; + BenchmarkData data_very_large_between; + BenchmarkData data_very_large_range; + +#define REGISTER(data, n_records_, min, max, is_between) \ + do { \ + gchar *label; \ + label = \ + g_strdup_printf("(%6d, %6d] (%7d): %7s", \ + min, max, n_records_, \ + is_between ? "between" : "range"); \ + data.n_records = n_records_; \ + if (is_between) { \ + data.command = \ + "select Entries --cache no " \ + "--filter " \ + "'between(rank, " #min ", \"exclude\"," \ + " " #max ", \"include\")'"; \ + } else { \ + data.command = \ + "select Entries --cache no " \ + "--filter 'rank > " #min " && rank <= " #max "'"; \ + } \ + bench_startup(&data); \ + bench_reporter_register(reporter, label, \ + n, \ + NULL, \ + bench, \ + NULL, \ + &data); \ + g_free(label); \ + } while(FALSE) + + REGISTER(data_small_between, + 1000, + 500, 600, + TRUE); + REGISTER(data_small_range, + 1000, + 500, 600, + FALSE); + REGISTER(data_medium_between, + 10000, + 5000, 5100, + TRUE); + REGISTER(data_medium_range, + 10000, + 5000, 5100, + FALSE); + REGISTER(data_large_between, + 100000, + 50000, 50100, + TRUE); + REGISTER(data_large_range, + 100000, + 50000, 50100, + FALSE); + REGISTER(data_very_large_between, + 1000000, + 500000, 500100, + TRUE); + REGISTER(data_very_large_range, + 1000000, + 500000, 500100, + FALSE); + +#undef REGISTER + + bench_reporter_run(reporter); + + bench_shutdown(&data_small_between); + bench_shutdown(&data_small_range); + bench_shutdown(&data_medium_between); + bench_shutdown(&data_medium_range); + bench_shutdown(&data_large_between); + bench_shutdown(&data_large_range); + bench_shutdown(&data_very_large_between); + bench_shutdown(&data_very_large_range); + } + g_object_unref(reporter); + + grn_fin(); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-cache.c b/storage/mroonga/vendor/groonga/benchmark/bench-cache.c new file mode 100644 index 0000000000000000000000000000000000000000..ee54209c7ab1123f1a3793b949e9af00ac86e31b --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-cache.c @@ -0,0 +1,155 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2017 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + Groonga: eb65125330b3a8f920693ef3ad53011c7412f2c9 + CFLAGS: -O2 -g3 + CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz + + % make --silent -C benchmark run-bench-cache + run-bench-cache: + (total) (average) (median) + 1000: (0.0458s) (0.4576ms) (0.4170ms) + 10000: (0.3464s) (0.0035s) (0.0034s) + % GRN_CACHE_TYPE=persistent make --silent -C benchmark run-bench-cache + run-bench-cache: + (total) (average) (median) + 1000: (0.0480s) (0.4801ms) (0.4700ms) + 10000: (0.4033s) (0.0040s) (0.0040s) + */ + +#include +#include +#include + +#include + +#include "lib/benchmark.h" + +typedef struct _BenchmarkData +{ + grn_ctx *context; + grn_cache *cache; + grn_obj value; +} BenchmarkData; + +static void +bench_n(BenchmarkData *data, gint64 n) +{ + gint64 i; + grn_ctx *ctx; + grn_cache *cache; + grn_obj *value; + grn_obj fetch_buffer; + + ctx = data->context; + cache = data->cache; + value = &(data->value); + GRN_TEXT_INIT(&fetch_buffer, 0); + for (i = 0; i < n; i++) { + char key[GRN_TABLE_MAX_KEY_SIZE]; + grn_snprintf(key, + GRN_TABLE_MAX_KEY_SIZE, + GRN_TABLE_MAX_KEY_SIZE, + "key:%" GRN_FMT_INT64D, + i); + GRN_BULK_REWIND(&fetch_buffer); + grn_cache_fetch(ctx, cache, key, strlen(key), &fetch_buffer); + grn_cache_update(ctx, cache, key, strlen(key), value); + } + GRN_OBJ_FIN(ctx, &fetch_buffer); +} + +static void +bench_1000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 1000); +} + +static void +bench_10000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 10000); +} + +static void +bench_setup(gpointer user_data) +{ + BenchmarkData *data = user_data; + + data->cache = grn_cache_open(data->context); + GRN_TEXT_INIT(&(data->value), 0); + while (GRN_TEXT_LEN(&(data->value)) < 1024) { + GRN_TEXT_PUTS(data->context, &(data->value), "XXXXXXXXXXX"); + } +} + +static void +bench_teardown(gpointer user_data) +{ + BenchmarkData *data = user_data; + + grn_obj_close(data->context, &(data->value)); + grn_cache_close(data->context, data->cache); +} + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchmarkData data; + BenchReporter *reporter; + gchar *base_dir; + grn_ctx ctx; + gint n = 100; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + bench_init(&argc, &argv); + + grn_ctx_init(&ctx, 0); + + data.context = &ctx; + + base_dir = g_build_filename(g_get_tmp_dir(), "groonga-bench", NULL); + bench_utils_remove_path_recursive_force(base_dir); + g_mkdir_with_parents(base_dir, 0755); + + reporter = bench_reporter_new(); + bench_reporter_register(reporter, "1000", n, + bench_setup, bench_1000, bench_teardown, &data); + bench_reporter_register(reporter, "10000", n, + bench_setup, bench_10000, bench_teardown, &data); + bench_reporter_run(reporter); + g_object_unref(reporter); + + grn_ctx_fin(&ctx); + + bench_utils_remove_path_recursive_force(base_dir); + + bench_quit(); + grn_fin(); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c b/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c index 3e43519071d7f587befce241b2391ed9b6bd263c..cd6a99a401f56ad067b49df3511ed71ea38d469b 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-ctx-create.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2013-2014 Kouhei Sutou + Copyright (C) 2013-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -153,12 +153,18 @@ teardown_database(grn_ctx *context, grn_obj *database) int main(int argc, gchar **argv) { + grn_rc rc; grn_ctx context; BenchmarkData data; BenchReporter *reporter; gint n = 1; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); grn_ctx_init(&context, 0); @@ -188,5 +194,5 @@ main(int argc, gchar **argv) grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c b/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c index 72d1d79b73f6d88874c35c916df0cc2edaee07ea..f77cfb1d3e757689c3cb33d0afe26771cfecca42 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2009 Kouhei Sutou + Copyright (C) 2009-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -48,6 +48,7 @@ */ #include +#include #include #include @@ -421,11 +422,17 @@ bench_teardown(gpointer user_data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 1000; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.report_result = g_getenv("GROONGA_BENCH_REPORT_RESULT") != NULL; @@ -495,5 +502,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c b/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c index 7b57eaaffdcc5ca08f7d442532e27c36f3067707..31be2c7ad17a9df6d5de49fcaeb623c80e9b4871 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-geo-select.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2011 Kouhei Sutou + Copyright (C) 2011-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -56,6 +56,7 @@ 2nd: select_in_rectangle (all): (4.61558) */ +#include #include #include @@ -212,11 +213,17 @@ teardown_database(BenchmarkData *data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.report_result = g_getenv("GROONGA_BENCH_REPORT_RESULT") != NULL; @@ -265,5 +272,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c b/storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c new file mode 100644 index 0000000000000000000000000000000000000000..96b1c9bc6e27ef5ceb91348f7905acf0bf5d005c --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-nfkc.c @@ -0,0 +1,275 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2015-2016 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + Groonga: ed300a833d44eaefa978b5ecf46a96ef91ae0891 + + CFLAGS: -O2 -g + % make --quiet -C benchmark run-bench-nfkc + run-bench-nfkc: + (total) (average) (median) + map1 - switch : (0.0060ms) (0.00060000ms) (0.00000000ms) + map1 - table : (0.00000000ms) (0.00000000ms) (0.00000000ms) + map2 - switch - no change: (0.0010ms) (0.00010000ms) (0.00000000ms) + map2 - table - no change: (0.00000000ms) (0.00000000ms) (0.00000000ms) + map2 - switch - change: (0.0010ms) (0.00010000ms) (0.00000000ms) + map2 - table - change: (0.0010ms) (0.00010000ms) (0.00000000ms) +*/ + +#include +#include + +#include + +#include + +#include "lib/benchmark.h" + +#include "../lib/nfkc50.c" + +#define MAX_UNICODE 0x110000 +#define BUFFER_SIZE 0x100 + +static inline int +ucs2utf8(unsigned int i, unsigned char *buf) +{ + unsigned char *p = buf; + if (i < 0x80) { + *p++ = i; + } else { + if (i < 0x800) { + *p++ = (i >> 6) | 0xc0; + } else { + if (i < 0x00010000) { + *p++ = (i >> 12) | 0xe0; + } else { + if (i < 0x00200000) { + *p++ = (i >> 18) | 0xf0; + } else { + if (i < 0x04000000) { + *p++ = (i >> 24) | 0xf8; + } else if (i < 0x80000000) { + *p++ = (i >> 30) | 0xfc; + *p++ = ((i >> 24) & 0x3f) | 0x80; + } + *p++ = ((i >> 18) & 0x3f) | 0x80; + } + *p++ = ((i >> 12) & 0x3f) | 0x80; + } + *p++ = ((i >> 6) & 0x3f) | 0x80; + } + *p++ = (0x3f & i) | 0x80; + } + *p = '\0'; + return (p - buf); +} + +static void +bench_char_type(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + ucs2utf8(code_point, (unsigned char *)utf8); + grn_nfkc50_char_type(utf8); + } +} + +static void +bench_decompose(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + ucs2utf8(code_point, (unsigned char *)utf8); + grn_nfkc50_decompose(utf8); + } +} + +static void +bench_compose_no_change(gpointer user_data) +{ + uint64_t prefix_code_point; + uint64_t suffix_code_point = 0x61; /* a */ + char prefix_utf8[7]; + char suffix_utf8[7]; + + ucs2utf8(suffix_code_point, (unsigned char *)suffix_utf8); + for (prefix_code_point = 1; + prefix_code_point < MAX_UNICODE; + prefix_code_point++) { + ucs2utf8(prefix_code_point, (unsigned char *)prefix_utf8); + grn_nfkc50_compose(prefix_utf8, suffix_utf8); + } +} + +static void +bench_compose_change(gpointer user_data) +{ + uint64_t prefix_code_point; + uint64_t suffix_code_point = 0x11ba; + char prefix_utf8[7]; + char suffix_utf8[7]; + + ucs2utf8(suffix_code_point, (unsigned char *)suffix_utf8); + for (prefix_code_point = 1; + prefix_code_point < MAX_UNICODE; + prefix_code_point++) { + ucs2utf8(prefix_code_point, (unsigned char *)prefix_utf8); + grn_nfkc50_compose(prefix_utf8, suffix_utf8); + } +} + +/* +static void +check_char_type(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + grn_char_type a; + grn_char_type b; + + ucs2utf8(code_point, (unsigned char *)utf8); + a = grn_nfkc_char_type(utf8); + b = grn_nfkc50_char_type(utf8); + if (a == b) { + continue; + } + printf("%lx: %s: %d != %d\n", code_point, utf8, a, b); + } +} + +static void +check_decompose(gpointer user_data) +{ + uint64_t code_point; + char utf8[7]; + + for (code_point = 1; code_point < MAX_UNICODE; code_point++) { + const char *a; + const char *b; + + ucs2utf8(code_point, (unsigned char *)utf8); + a = grn_nfkc_decompose(utf8); + b = grn_nfkc50_decompose(utf8); + if (a == b) { + continue; + } + if (!a || !b) { + printf("%lx: %s: %s != %s\n", code_point, utf8, a, b); + continue; + } + if (strcmp(a, b) != 0) { + printf("%lx: %s: %s != %s\n", code_point, utf8, a, b); + } + } +} + +static void +check_compose(gpointer user_data) +{ + uint64_t prefix_code_point; + uint64_t suffix_code_point; + char prefix_utf8[7]; + char suffix_utf8[7]; + + for (prefix_code_point = 1; + prefix_code_point < MAX_UNICODE; + prefix_code_point++) { + ucs2utf8(prefix_code_point, (unsigned char *)prefix_utf8); + for (suffix_code_point = 1; + suffix_code_point < MAX_UNICODE; + suffix_code_point++) { + const char *a; + const char *b; + + ucs2utf8(suffix_code_point, (unsigned char *)suffix_utf8); + a = grn_nfkc_compose(prefix_utf8, suffix_utf8); + b = grn_nfkc50_compose(prefix_utf8, suffix_utf8); + if (a == b) { + continue; + } + if (!a || !b) { + printf("%lx-%lx: %s-%s: %s != %s\n", + prefix_code_point, suffix_code_point, + prefix_utf8, suffix_utf8, + a, b); + continue; + } + if (strcmp(a, b) != 0) { + printf("%lx-%lx: %s-%s: %s != %s\n", + prefix_code_point, suffix_code_point, + prefix_utf8, suffix_utf8, + a, b); + } + } + if ((prefix_code_point % 10000) == 0) { + printf("%" G_GUINT64_FORMAT "\n", prefix_code_point); + } + } +} +*/ + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchReporter *reporter; + gint n = 10; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + bench_init(&argc, &argv); + + reporter = bench_reporter_new(); + + if (g_getenv("N")) { + n = atoi(g_getenv("N")); + } + +#define REGISTER(label, bench_function) \ + bench_reporter_register(reporter, label, n, \ + NULL, \ + bench_function, \ + NULL, \ + NULL) + REGISTER("char_type ", bench_char_type); + REGISTER("decompose ", bench_decompose); + REGISTER("compose - no change", bench_compose_no_change); + REGISTER("compose - change", bench_compose_change); + + /* + REGISTER("check - char_type", check_char_type); + REGISTER("check - decompose", check_decompose); + REGISTER("check - compose ", check_compose); + */ +#undef REGISTER + + bench_reporter_run(reporter); + g_object_unref(reporter); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c b/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c index d7ed91d0c565fd7116068febdfd6ad43ce2498c1..4ce55c55b6ab2b4b8da9e3ad7ab56ab6fb8aa30f 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2014 Kouhei Sutou + Copyright (C) 2014-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -135,12 +135,18 @@ teardown_database(grn_ctx *context, grn_obj *database) int main(int argc, gchar **argv) { + grn_rc rc; grn_ctx context; grn_obj *database; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); grn_ctx_init(&context, 0); @@ -204,5 +210,5 @@ main(int argc, gchar **argv) grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c b/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c index d45d453cba642330a99e51487011a34e6e82dfcc..a0664d582706e21a93ecf272d0aa93c3ba0a96b5 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-range-select.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2014 Kouhei Sutou + Copyright (C) 2014-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -179,10 +179,16 @@ bench_shutdown(BenchmarkData *data) int main(int argc, gchar **argv) { + grn_rc rc; BenchReporter *reporter; gint n = 10; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } g_print("Process %d times in each pattern\n", n); @@ -270,5 +276,5 @@ main(int argc, gchar **argv) grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-result-set.c b/storage/mroonga/vendor/groonga/benchmark/bench-result-set.c new file mode 100644 index 0000000000000000000000000000000000000000..cd4866e5033c95e8eea91a4ed6e054dfdfa5c9b5 --- /dev/null +++ b/storage/mroonga/vendor/groonga/benchmark/bench-result-set.c @@ -0,0 +1,151 @@ +/* -*- c-basic-offset: 2; coding: utf-8 -*- */ +/* + Copyright (C) 2015-2016 Kouhei Sutou + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include + +#include + +#include "lib/benchmark.h" + +typedef struct _BenchmarkData +{ + gchar *base_dir; + grn_ctx *context; + grn_obj *source_table; + grn_obj *result_set; +} BenchmarkData; + +static void +bench_n(BenchmarkData *data, gint64 n) +{ + gint64 i; + grn_ctx *ctx; + grn_hash *result_set; + + ctx = data->context; + result_set = (grn_hash *)data->result_set; + for (i = 0; i < n; i++) { + grn_id id = i; + grn_hash_add(ctx, result_set, &id, sizeof(grn_id), NULL, NULL); + } +} + +static void +bench_1000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 1000); +} + +static void +bench_10000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 10000); +} + +static void +bench_100000(gpointer user_data) +{ + BenchmarkData *data = user_data; + bench_n(data, 100000); +} + +static void +bench_setup(gpointer user_data) +{ + BenchmarkData *data = user_data; + + data->result_set = grn_table_create(data->context, + NULL, 0, NULL, + GRN_TABLE_HASH_KEY | GRN_OBJ_WITH_SUBREC, + data->source_table, + NULL); + +} + +static void +bench_teardown(gpointer user_data) +{ + BenchmarkData *data = user_data; + + grn_obj_close(data->context, data->result_set); +} + +int +main(int argc, gchar **argv) +{ + grn_rc rc; + BenchmarkData data; + BenchReporter *reporter; + gchar *base_dir; + grn_ctx ctx; + gint n = 100; + + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } + bench_init(&argc, &argv); + + data.context = &ctx; + + base_dir = g_build_filename(g_get_tmp_dir(), "groonga-bench", NULL); + bench_utils_remove_path_recursive_force(base_dir); + g_mkdir_with_parents(base_dir, 0755); + + { + gchar *database_path; + const gchar *source_table_name = "Sources"; + + grn_ctx_init(&ctx, 0); + database_path = g_build_filename(base_dir, "db", NULL); + grn_db_create(&ctx, database_path, NULL); + g_free(database_path); + + data.source_table = grn_table_create(&ctx, + source_table_name, + strlen(source_table_name), + NULL, + GRN_TABLE_PAT_KEY | GRN_OBJ_PERSISTENT, + grn_ctx_at(&ctx, GRN_DB_SHORT_TEXT), + NULL); + } + + reporter = bench_reporter_new(); + bench_reporter_register(reporter, "1000", n, + bench_setup, bench_1000, bench_teardown, &data); + bench_reporter_register(reporter, "10000", n, + bench_setup, bench_10000, bench_teardown, &data); + bench_reporter_register(reporter, "100000", n, + bench_setup, bench_100000, bench_teardown, &data); + bench_reporter_run(reporter); + g_object_unref(reporter); + + grn_ctx_fin(&ctx); + + bench_utils_remove_path_recursive_force(data.base_dir); + + bench_quit(); + grn_fin(); + + return EXIT_SUCCESS; +} diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c index 7e06874dffd128ccffa356ae5e273468dce2204c..9e378f5530b88dfa1e8eabb4e8ee09f841acc851 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2008 Kouhei Sutou + Copyright (C) 2008-2016 Kouhei Sutou This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,6 +17,7 @@ */ #include +#include #include @@ -226,11 +227,17 @@ bench_teardown(gpointer user_data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.context = g_new(grn_ctx, 1); @@ -266,5 +273,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } diff --git a/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am b/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am index 55d113f92e947d31ae5f7cd708c7b167b1651ded..2031b9aad8c70275f85ce2b8de6289e858b46206 100644 --- a/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am +++ b/storage/mroonga/vendor/groonga/benchmark/lib/Makefile.am @@ -9,6 +9,9 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ $(GLIB_CFLAGS) +CFLAGS += \ + $(NO_BAD_FUNCTION_CAST_CFLAGS) + LIBS = \ $(GLIB_LIBS) diff --git a/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 b/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 index 02eb52f30a6dd97b62093913cf0baa5a52230040..a0b424b3111c0c0e5a770466798408c6f18a050b 100644 --- a/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 +++ b/storage/mroonga/vendor/groonga/build/ac_macros/check_functions.m4 @@ -2,8 +2,6 @@ AC_CHECK_FUNCS(_gmtime64_s) AC_CHECK_FUNCS(_localtime64_s) -AC_CHECK_FUNCS(_stricmp) -AC_CHECK_FUNCS(_strnicmp) AC_CHECK_FUNCS(_strtoui64) AC_CHECK_FUNCS(gmtime_r) AC_CHECK_FUNCS(localtime_r) diff --git a/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 b/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 index 9a30ca8fc9c17218f9417a5dc449368a50127ca6..fca8465123cced8972ca4e5e30a1adb6f3e17f0e 100644 --- a/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 +++ b/storage/mroonga/vendor/groonga/build/ac_macros/check_headers.m4 @@ -7,10 +7,6 @@ AC_CHECK_HEADERS(execinfo.h) AC_CHECK_HEADERS(inttypes.h) AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(signal.h) -AC_CHECK_HEADERS(stdarg.h) -AC_CHECK_HEADERS(stdint.h) -AC_CHECK_HEADERS(string.h) -AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/mman.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/resource.h) diff --git a/storage/mroonga/vendor/groonga/build/makefiles/gettext.am b/storage/mroonga/vendor/groonga/build/makefiles/gettext.am index 9cea8ce63c12aa586702b33c3921236c1b0ee6c2..c6e57c7b47ba5cfeb738d9b7d17dfc4877addebf 100644 --- a/storage/mroonga/vendor/groonga/build/makefiles/gettext.am +++ b/storage/mroonga/vendor/groonga/build/makefiles/gettext.am @@ -59,8 +59,6 @@ build: endif html: build -man: build -pdf: build gettext: rm *.pot || true diff --git a/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am b/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am index e237377ba8033469522997ff27016e102c7bd093..047823b6ed7e8f5367998ac5821f2afd3738baa1 100644 --- a/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am +++ b/storage/mroonga/vendor/groonga/build/makefiles/sphinx-build.am @@ -2,18 +2,13 @@ DOCTREES_BASE = doctrees SPHINXOPTS = -PAPER = # Internal variables. SOURCE_DIR = $(abs_top_srcdir)/doc/source -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) -E $(SPHINXOPTS) $(SOURCE_DIR) +ALLSPHINXOPTS = -E $(SPHINXOPTS) $(SOURCE_DIR) -SPHINX_DIR = $(abs_top_builddir)/doc/sphinx -SPHINX_BUILD_COMMAND = \ - DOCUMENT_VERSION="$(DOCUMENT_VERSION)" \ +SPHINX_BUILD_COMMAND = \ + DOCUMENT_VERSION="$(DOCUMENT_VERSION)" \ DOCUMENT_VERSION_FULL="$(DOCUMENT_VERSION_FULL)" \ - LOCALE="$(LOCALE)" \ - PYTHONPATH="$(SPHINX_DIR):$$PYTHONPATH" \ + LOCALE="$(LOCALE)" \ $(SPHINX_BUILD) diff --git a/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am b/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am index c68f62e26ec4328eeeb679623e3737c3c61df699..161abe06757e2a60bc886f3f0059bb1df53a59b1 100644 --- a/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am +++ b/storage/mroonga/vendor/groonga/build/makefiles/sphinx.am @@ -3,7 +3,6 @@ include $(top_srcdir)/build/makefiles/sphinx-build.am $(html_files): html-build-stamp $(html_files_relative_from_locale_dir): html-build-stamp -$(man_files): man-build-stamp am__nobase_dist_doc_locale_DATA_DIST = if DOCUMENT_AVAILABLE @@ -22,41 +21,16 @@ document_source_files = \ required_build_stamps = \ html-build-stamp \ - man-build-stamp \ mo-build-stamp if DOCUMENT_BUILDABLE EXTRA_DIST += $(required_build_stamps) endif -man_files = \ - man/$(PACKAGE_NAME).1 - generated_files = \ $(DOCTREES_BASE) \ - man \ - man-build-stamp \ html \ - html-build-stamp \ - pdf \ - pdf-build-stamp \ - dirhtml \ - dirhtml-build-stamp \ - pickle \ - pikcle-build-stamp \ - json \ - json-build-stamp \ - htmlhelp \ - htmlhelp-build-stamp \ - qthelp \ - qthelp-build-stamp \ - latex \ - latex-build-stamp \ - changes \ - changes-build-stamp \ - linkcheck \ - linkcheck-build-stamp \ - doctest + html-build-stamp $(mo_files_relative_from_locale_dir): mo-build-stamp @@ -75,83 +49,24 @@ maintainer-clean-local: endif .PHONY: help -.PHONY: man clean-man .PHONY: html clean-html -.PHONY: pdf -.PHONY: dirhtml -.PHONY: pickle -.PHONY: json -.PHONY: htmlhelp -.PHONY: qthelp -.PHONY: latex -.PHONY: changes -.PHONY: linkcheck -.PHONY: doctest if DOCUMENT_BUILDABLE help: @echo "Please use \`make ' where is one of" - @echo " man to make man files" @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " rdoc to make RDoc files" - @echo " textile to make Textile files" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -man: man-build-stamp + html: html-recursive html-build-stamp -dirhtml: dirhtml-build-stamp -pickle: pickle-build-stamp -json: json-build-stamp -htmlhelp: htmlhelp-build-stamp -qthelp: qthelp-build-stamp -latex: latex-build-stamp -rdoc: rdoc-build-stamp -textile: textile-build-stamp -changes: changes-build-stamp -linkcheck: linkcheck-build-stamp -doctest: doctest-build-stamp clean_targets = \ - clean-man \ - clean-html \ - clean-dirhtml \ - clean-pickle \ - clean-json \ - clean-htmlhelp \ - clean-qthelp \ - clean-latex \ - clean-rdoc \ - clean-textile \ - clean-changes \ - clean-linkcheck \ - clean-doctest + clean-html $(clean_targets): target=`echo $@ | sed -e 's/^clean-//'`; \ rm -rf $${target}-build-stamp $${target} build_stamps = \ - man-build-stamp \ - html-build-stamp \ - dirhtml-build-stamp \ - pickle-build-stamp \ - json-build-stamp \ - htmlhelp-build-stamp \ - qthelp-build-stamp \ - latex-build-stamp \ - rdoc-build-stamp \ - textile-build-stamp \ - changes-build-stamp \ - linkcheck-build-stamp \ - doctest-build-stamp + html-build-stamp $(build_stamps): $(document_source_files) target=`echo $@ | sed -e 's/-build-stamp$$//'`; \ @@ -162,18 +77,4 @@ $(build_stamps): $(document_source_files) $(ALLSPHINXOPTS) \ $${target} @touch $@ - -qthelp: qthelp-message -qthelp-message: qthelp-build-stamp - @echo "Build finished; now you can run 'qcollectiongenerator' with the" \ - ".qhcp project file in qthelp/*, like this:" - @echo "# qcollectiongenerator qthelp/groonga.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile qthelp/groonga.qhc" - -latex: latex-message -latex-message: latex-build-stamp - @echo "Build finished; the LaTeX files are in latex/*." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." endif diff --git a/storage/mroonga/vendor/groonga/bundled_lz4_version b/storage/mroonga/vendor/groonga/bundled_lz4_version new file mode 100644 index 0000000000000000000000000000000000000000..6a126f402d53dac9643510c2d007c3d9f15413ca --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_lz4_version @@ -0,0 +1 @@ +1.7.5 diff --git a/storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version b/storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version new file mode 100644 index 0000000000000000000000000000000000000000..495c21efd6d17d10d7fd08f260a2bc52abfba0da --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_mecab_naist_jdic_version @@ -0,0 +1 @@ +0.6.3b-20111013 diff --git a/storage/mroonga/vendor/groonga/bundled_mecab_version b/storage/mroonga/vendor/groonga/bundled_mecab_version new file mode 100644 index 0000000000000000000000000000000000000000..00445f812df9a6e5a5ff6f6d834646af93decafd --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_mecab_version @@ -0,0 +1 @@ +0.996 diff --git a/storage/mroonga/vendor/groonga/bundled_message_pack_version b/storage/mroonga/vendor/groonga/bundled_message_pack_version new file mode 100644 index 0000000000000000000000000000000000000000..3e3c2f1e5edb083aab93646ac7b076daa38516dd --- /dev/null +++ b/storage/mroonga/vendor/groonga/bundled_message_pack_version @@ -0,0 +1 @@ +2.1.1 diff --git a/storage/mroonga/vendor/groonga/config.h.cmake b/storage/mroonga/vendor/groonga/config.h.cmake index 8e3bdaf216baacab21c5ef66fbd0b1ba443be892..bfd0cbdc0120744c576afc9e2b607581d800f219 100644 --- a/storage/mroonga/vendor/groonga/config.h.cmake +++ b/storage/mroonga/vendor/groonga/config.h.cmake @@ -3,12 +3,13 @@ /* general constants */ #define CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS}" -#define HOST_CPU "${CMAKE_HOST_SYSTEM_PROCESSOR}" -#define HOST_OS "${CMAKE_HOST_SYSTEM_NAME}" +#define HOST_CPU "${CMAKE_SYSTEM_PROCESSOR}" +#define HOST_OS "${CMAKE_SYSTEM_NAME}" #define VERSION "${VERSION}" #define PACKAGE "${PROJECT_NAME}" #define PACKAGE_NAME "${PROJECT_NAME}" +#define PACKAGE_LABEL "${GRN_PROJECT_LABEL}" #define PACKAGE_STRING "${PROJECT_NAME} ${VERSION}" #define PACKAGE_TARNAME "${PROJECT_NAME}" #define PACKAGE_URL "${PACKAGE_URL}" @@ -84,6 +85,7 @@ #cmakedefine GRN_WITH_CUTTER #cmakedefine GRN_WITH_KYTEA #cmakedefine GRN_WITH_LZ4 +#cmakedefine GRN_WITH_ZSTD #cmakedefine GRN_WITH_MECAB #cmakedefine GRN_WITH_MESSAGE_PACK #cmakedefine GRN_WITH_MRUBY @@ -103,10 +105,6 @@ #cmakedefine HAVE_NETDB_H #cmakedefine HAVE_PTHREAD_H #cmakedefine HAVE_SIGNAL_H -#cmakedefine HAVE_STDARG_H -#cmakedefine HAVE_STDINT_H -#cmakedefine HAVE_STRINGS_H -#cmakedefine HAVE_STRING_H #cmakedefine HAVE_SYS_MMAN_H #cmakedefine HAVE_SYS_PARAM_H #cmakedefine HAVE_SYS_RESOURCE_H @@ -133,8 +131,6 @@ /* functions */ #cmakedefine HAVE__GMTIME64_S #cmakedefine HAVE__LOCALTIME64_S -#cmakedefine HAVE__STRICMP -#cmakedefine HAVE__STRNICMP #cmakedefine HAVE__STRTOUI64 #cmakedefine HAVE_BACKTRACE #cmakedefine HAVE_CLOCK diff --git a/storage/mroonga/vendor/groonga/configure.ac b/storage/mroonga/vendor/groonga/configure.ac index dad29c78f4c1caca87f1774dbed13ec9e5029f71..414876c6a266b1b4c8215af310a8b64637942682 100644 --- a/storage/mroonga/vendor/groonga/configure.ac +++ b/storage/mroonga/vendor/groonga/configure.ac @@ -1,13 +1,18 @@ AC_PREREQ(2.59) m4_define([groonga_version], m4_include(base_version)) AC_INIT([groonga], groonga_version, [groonga@razil.jp]) +AC_CONFIG_MACRO_DIR([m4]) AM_CONFIG_HEADER(config.h) +GRN_VERSION_RC=`echo groonga_version | sed -e 's/\./,/g'` +AC_SUBST(GRN_VERSION_RC) + AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -PACKAGE_TITLE=Groonga -AC_SUBST(PACKAGE_TITLE) +PACKAGE_LABEL=Groonga +AC_SUBST(PACKAGE_LABEL) +AC_DEFINE_UNQUOTED(PACKAGE_LABEL, ["$PACKAGE_LABEL"], [Label of package]) # for Autoconf 2.60 or earlier. if test -z "${datarootdir}"; then @@ -74,6 +79,8 @@ AC_MSG_RESULT([$solaris]) AC_C_BIGENDIAN AC_PROG_CXX +m4_ifdef([AX_CXX_COMPILE_STDCXX_11], + [AX_CXX_COMPILE_STDCXX_11([ext], [optional])]) AC_PROG_CC m4_ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99]) @@ -142,19 +149,17 @@ TEST_CFLAGS="" TEST_CXXFLAGS="" NO_STRICT_ALIASING_CFLAGS="" NO_FLOAT_EQUAL_CFLAGS="" +NO_BAD_FUNCTION_CAST_CFLAGS="" if test "$GCC" = "yes"; then CHECK_BUILD_FLAG([-Wall]) - CHECK_BUILD_FLAG([-Wextra]) if test "x$check_cflag" = "xno"; then CHECK_BUILD_FLAG([-W]) fi CHECK_BUILD_FLAG([-Wno-unused-but-set-variable]) # FIXME: enable it. - CHECK_BUILD_FLAG([-Wno-unused-parameter]) - CHECK_BUILD_FLAG([-Wno-sign-compare]) CHECK_CFLAG([-Wno-pointer-sign]) - CHECK_BUILD_FLAG([-Wno-missing-field-initializers]) + CHECK_CFLAG([-Wno-declaration-after-statement]) - CHECK_BUILD_FLAG([-Wformat=2]) + CHECK_BUILD_FLAG([-Wformat]) CHECK_BUILD_FLAG([-Wstrict-aliasing=2]) if test "x$check_cflag" = "xyes"; then NO_STRICT_ALIASING_CFLAGS="-fno-strict-aliasing" @@ -166,6 +171,9 @@ if test "$GCC" = "yes"; then fi CHECK_BUILD_FLAG([-Wpointer-arith]) CHECK_CFLAG([-Wbad-function-cast]) + if test "x$check_cflag" = "xyes"; then + NO_BAD_FUNCTION_CAST_CFLAGS="-Wno-bad-function-cast" + fi if test "$CLANG" = "no"; then CHECK_BUILD_FLAG([-Wcast-align]) fi @@ -180,27 +188,16 @@ if test "$GCC" = "yes"; then CHECK_CXXFLAG([-fexceptions]) CHECK_CXXFLAG([-fimplicit-templates]) - - CFLAGS_for_source="$CFLAGS" - CXXFLAGS_for_source="$CXXFLAGS" - CHECK_BUILD_FLAG([-Wno-clobbered]) - if test "x$check_cflag" = "xyes"; then - TEST_CFLAGS="-Wno-clobbered" - fi - if test "x$check_cxxflag" = "xyes"; then - TEST_CXXFLAGS="-Wno-clobbered" - fi - CFLAGS="$CFLAGS_for_source" - CXXFLAGS="$CXXFLAGS_for_source" fi AC_SUBST(TEST_CFLAGS) AC_SUBST(TEST_CXXFLAGS) AC_SUBST(NO_STRICT_ALIASING_CFLAGS) AC_SUBST(NO_FLOAT_EQUAL_CFLAGS) +AC_SUBST(NO_BAD_FUNCTION_CAST_CFLAGS) -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL -m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) +LT_INIT([dlopen win32-dll]) +LT_LANG([Windows Resource]) +LT_OUTPUT LT_CURRENT=0 LT_REVISION=0 @@ -233,19 +230,23 @@ AC_CONFIG_FILES([ lib/mrb/scripts/Makefile lib/mrb/scripts/command_line/Makefile lib/mrb/scripts/context/Makefile + lib/mrb/scripts/expression_tree/Makefile lib/mrb/scripts/initialize/Makefile lib/mrb/scripts/logger/Makefile + lib/mrb/scripts/query_logger/Makefile + lib/proc/Makefile + lib/ts/Makefile include/Makefile include/groonga/Makefile plugins/Makefile plugins/tokenizers/Makefile plugins/suggest/Makefile - plugins/table/Makefile plugins/query_expanders/Makefile plugins/ruby/Makefile plugins/token_filters/Makefile plugins/sharding/Makefile plugins/functions/Makefile + plugins/expression_rewriters/Makefile examples/Makefile examples/dictionary/Makefile examples/dictionary/edict/Makefile @@ -264,19 +265,18 @@ AC_CONFIG_FILES([ packages/windows/language-files/Makefile packages/windows/setup-x64.nsi data/Makefile - data/images/Makefile - data/images/logo/Makefile data/html/Makefile data/munin/Makefile data/init.d/Makefile - data/init.d/redhat/Makefile - data/init.d/redhat/sysconfig/Makefile + data/init.d/centos/Makefile + data/init.d/centos/sysconfig/Makefile data/logrotate.d/Makefile - data/logrotate.d/redhat/Makefile + data/logrotate.d/centos/Makefile data/systemd/Makefile - data/systemd/fedora/Makefile - data/systemd/fedora/sysconfig/Makefile + data/systemd/centos/Makefile + data/systemd/centos/sysconfig/Makefile data/scripts/Makefile + data/tmpfiles.d/Makefile tools/Makefile doc/Makefile doc/locale/Makefile @@ -304,7 +304,10 @@ AC_CONFIG_FILES([ benchmark/fixtures/geo-select/Makefile benchmark/lib/Makefile vendor/Makefile + vendor/lz4/Makefile vendor/onigmo/Makefile + vendor/mecab/Makefile + vendor/message_pack/Makefile vendor/mruby/Makefile ]) @@ -355,14 +358,14 @@ AC_LINK_IFELSE( [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [#define _ISOC99_SOURCE + [#define _ISOC99_SOURCE #include ], - [if (fpclassify(0.0)) {return 0;}] + [if (fpclassify(0.0)) {return 0;}] )], [ AC_DEFINE(_ISOC99_SOURCE, [1], [Define to 1 for fpclassify]) - AC_DEFINE(HAVE_FPCLASSIFY, [1], [use fpclassify with _ISOC99_SOURCE]) - AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FPCLASSIFY, [1], [use fpclassify with _ISOC99_SOURCE]) + AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) @@ -454,7 +457,7 @@ AC_ARG_WITH(stack_size, AC_DEFINE_UNQUOTED(GRN_STACK_SIZE, [$GRN_STACK_SIZE], [stack size]) # lock timeout -GRN_LOCK_TIMEOUT=10000000 +GRN_LOCK_TIMEOUT=900000 AC_ARG_WITH(lock_timeout, [AS_HELP_STRING([--with-lock-timeout=N], [This option specifies how many times Groonga tries to acquire a lock. @@ -609,7 +612,7 @@ if test "x$have_epoll" != "xyes"; then ]) ]) if test "x$have_kqueue" != "xyes"; then - AC_CHECK_HEADER(sys/poll.h, [ + AC_CHECK_HEADER(poll.h, [ AC_CHECK_FUNC(poll, [ have_poll="yes" AC_DEFINE(USE_POLL, [1], [use poll]) @@ -617,7 +620,7 @@ if test "x$have_epoll" != "xyes"; then ]) if test "x$have_poll" != "xyes"; then if test "$os_win32" = "yes"; then - AC_CHECK_HEADER(winsock2.h, [have_select="yes"]) + AC_CHECK_HEADER(winsock2.h, [have_select="yes"]) else AC_CHECK_FUNC(select, [ have_select="yes" @@ -750,18 +753,23 @@ if test "x$RUBY" = "xno"; then else if test "x$RUBY" = "xyes"; then AC_PATH_PROGS(RUBY, - [ruby2.1 ruby21 ruby2.0 ruby20 ruby1.9 ruby19 ruby1.9.1 ruby], + [ dnl + ruby2.3 ruby23 dnl + ruby2.2 ruby22 dnl + ruby2.1 ruby21 dnl + ruby dnl + ], ruby-not-found) if test "$RUBY" != "ruby-not-found"; then ruby_version="`$RUBY --version`" - if echo "$ruby_version" | grep -q -- 'ruby \(1\.9\|2\.\)'; then + if echo "$ruby_version" | grep -q -- 'ruby \(2\.\)'; then ac_cv_ruby_available="yes" else - AC_MSG_WARN([$RUBY isn't Ruby 1.9 or later ($ruby_version)]) + AC_MSG_WARN([$RUBY isn't Ruby 2.0 or later ($ruby_version)]) fi fi else - ruby_not_found_warning_message="$RUBY is not found. Disable HTTP test." + ruby_not_found_warning_message="$RUBY is not found." case "$RUBY" in /*) AC_CHECK_FILE([$RUBY], @@ -791,39 +799,13 @@ AM_CONDITIONAL([WITH_UNIT_TEST], AM_CONDITIONAL([WITH_COMMAND_TEST], [test "$ac_cv_ruby_available" = "yes"]) -# check Inkscape for generating PNG images -inkscape_available="no" -AC_ARG_WITH([inkscape], - AS_HELP_STRING([--with-inkscape=PATH], - [Inkscape path (default: auto)]), - [INKSCAPE="$withval"], - [INKSCAPE="yes"]) - -if test "x$INKSCAPE" = "xno"; then - INKSCAPE= -else - if test "x$INKSCAPE" = "xyes"; then - AC_PATH_PROGS(INKSCAPE, [inkscape], none) - if test "$INKSCAPE" != "none"; then - inkscape_available="yes" - fi - else - AC_CHECK_FILE([$INKSCAPE], - [inkscape_available="yes"], - [AC_MSG_WARN([$INKSCAPE is not found. - Disable PNG image generation.])]) - fi -fi -AC_SUBST(INKSCAPE) -AM_CONDITIONAL([WITH_INKSCAPE], [test "$inkscape_available" = "yes"]) - # check Lemon for generating .c and .h files from .y file lemon_available="no" AC_ARG_WITH([lemon], AS_HELP_STRING([--with-lemon=PATH], [Lemon path (default: auto)]), [LEMON="$withval"], - [: ${LEMON:=auto}]) + [: ${LEMON:=auto}]) if test "$LEMON" = "no"; then LEMON= @@ -842,8 +824,8 @@ else fi else AC_CHECK_FILE([$LEMON], - [lemon_available="yes"], - [AC_MSG_WARN([$LEMON is not found. Disable .y compilation.])]) + [lemon_available="yes"], + [AC_MSG_WARN([$LEMON is not found. Disable .y compilation.])]) fi fi AC_SUBST(LEMON) @@ -925,6 +907,30 @@ if test "x$with_lz4" != "xno"; then fi fi +# Zstandard +AC_ARG_WITH(zstd, + [AS_HELP_STRING([--with-zstd], + [Support data compression by Zstandard. [default=auto]])], + [with_zstd="$withval"], + [with_zstd="auto"]) +if test "x$with_zstd" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([LIBZSTD], + [libzstd], + [GRN_WITH_ZSTD=yes], + [GRN_WITH_ZSTD=no]) + ], + [GRN_WITH_ZSTD=no]) + if test "$GRN_WITH_ZSTD" = "yes"; then + AC_DEFINE(GRN_WITH_ZSTD, [1], + [Support data compression by Zstandard.]) + else + if test "x$with_zstd" != "xauto"; then + AC_MSG_ERROR("No libzstd found") + fi + fi +fi + # jemalloc AC_ARG_WITH(jemalloc, [AS_HELP_STRING([--with-jemalloc], @@ -941,8 +947,38 @@ if test "x$with_jemalloc" != "xno"; then [AC_MSG_ERROR("No libjemalloc found")]) fi +# Apache Arrow +AC_ARG_ENABLE(arrow, + [AS_HELP_STRING([--disable-arrow], + [enable Apache Arrow support. [default=auto-detect]])], + [enable_arrow="$enableval"], + [enable_arrow="auto"]) +if test "x$enable_arrow" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([ARROW], + [arrow >= 0.5.0], + [arrow_available=yes], + [arrow_available=no]) + ], + [arrow_available=no]) + if test "x$arrow_available" = "xyes"; then + AC_DEFINE(GRN_WITH_ARROW, [1], [Enable Apache Arrow support.]) + else + if test "x$enable_arrow" = "xyes"; then + AC_MSG_ERROR("No Apache Arrow found") + fi + fi +fi +AM_CONDITIONAL([GRN_WITH_ARROW], [test "$arrow_available" = "yes"]) + # MeCab # NOTE: MUST be checked last + +BUNDLED_MECAB_VERSION=m4_include([bundled_mecab_version]) +AC_SUBST(BUNDLED_MECAB_VERSION) +BUNDLED_MECAB_NAIST_JDIC_VERSION=m4_include([bundled_mecab_naist_jdic_version]) +AC_SUBST(BUNDLED_MECAB_NAIST_JDIC_VERSION) + AC_ARG_WITH(mecab, [AS_HELP_STRING([--with-mecab], [use MeCab for morphological analysis. [default=yes]])], @@ -1170,6 +1206,9 @@ AC_SUBST(LIBEVENT_CFLAGS) AC_SUBST(LIBEVENT_LIBS) # MessagePack +BUNDLED_MESSAGE_PACK_VERSION=m4_include([bundled_message_pack_version]) +AC_SUBST(BUNDLED_MESSAGE_PACK_VERSION) + AC_ARG_ENABLE(message-pack, [AS_HELP_STRING([--disable-message-pack], [Disable MessagePack support. [default=auto-detect]])], @@ -1203,7 +1242,7 @@ if test "x$enable_message_pack" != "xno"; then if test "x$message_pack_available" = "xyes"; then MESSAGE_PACK_CFLAGS="-I$with_message_pack/include" - MESSAGE_PACK_LIBS="-L$with_message_pack/lib -lmsgpack" + MESSAGE_PACK_LIBS="-L$with_message_pack/lib -lmsgpackc" fi fi @@ -1224,6 +1263,17 @@ AM_CONDITIONAL([ENABLE_SUGGEST_LEARNER], "$libevent_available" = "yes" -a \ "$message_pack_available" = "yes"]) +# Check built-in atomic +case "$host" in + i*86*|x86_64*) + ;; + *) + AC_MSG_CHECKING([for platform which requires libatomic]) + AC_CHECK_LIB(atomic, __atomic_store_8, [ATOMIC_LIBS="-latomic"]) + AC_SUBST(ATOMIC_LIBS) + ;; +esac + # Document AC_MSG_CHECKING([whether enable document]) AC_ARG_ENABLE(document, @@ -1246,10 +1296,10 @@ if test x"$enable_document" != x"no"; then AC_PATH_PROG(SPHINX_BUILD, sphinx-build, []) if test -n "$SPHINX_BUILD"; then sphinx_build_version=`"$SPHINX_BUILD" --version` - if ! echo "$sphinx_build_version" | grep -q ' 1\.[[23]]'; then - AC_MSG_ERROR([ + if ! echo "$sphinx_build_version" | grep -q ' 1\.[[3-6]]'; then + AC_MSG_ERROR([ sphinx-build is old: $sphinx_build_version -Sphinx 1.2 or later is required.]) +Sphinx 1.3 or later is required.]) fi document_available=yes document_buildable=yes @@ -1281,8 +1331,8 @@ fi AC_ARG_WITH([cutter-source-path], AS_HELP_STRING([--with-cutter-source-path=PATH], [Specify Cutter source path for - groonga's release manager.]), - [CUTTER_SOURCE_PATH="$withval"]) + groonga's release manager.]), + [CUTTER_SOURCE_PATH="$withval"]) case "$CUTTER_SOURCE_PATH" in ""|/*) : # do nothing @@ -1330,15 +1380,29 @@ AC_MSG_CHECKING([whether package platform]) AC_ARG_WITH(package-platform, [AS_HELP_STRING([--with-package-platform=PLATFORM], [install package platform related files. [default=no] - (supported package platforms: redhat, fedora)])], + (supported package platforms: centos, centos5, centos6, centos7, fedora)])], [package_platform="$withval"], [package_platform="no"]) +if test "$package_platform" = "centos"; then + distribution=$(cut -d " " -f 1 /etc/redhat-release | tr "A-Z" "a-z") + if grep -q Linux /etc/redhat-release; then + distribution_version=$(cut -d " " -f 4 /etc/redhat-release) + else + distribution_version=$(cut -d " " -f 3 /etc/redhat-release) + fi + distribution_version=$(echo ${distribution_version} | sed -e 's/\..*$//g') + package_platform="${package_platform}${distribution_version}" +fi AC_MSG_RESULT($package_platform) -AM_CONDITIONAL([REDHAT_PLATFORM], - [test "${package_platform}" = "redhat"]) -AM_CONDITIONAL([FEDORA_PLATFORM], - [test "${package_platform}" = "fedora"]) +AM_CONDITIONAL([CENTOS_PLATFORM], + [test "${package_platform}" != "no"]) +AM_CONDITIONAL([CENTOS_INIT_PLATFORM], + [test "${package_platform}" = "centos5" || + test "${package_platform}" = "centos6"]) +AM_CONDITIONAL([CENTOS_SYSTEMD_PLATFORM], + [test "${package_platform}" = "centos7" || + test "${package_platform}" = "fedora"]) # plugins check relative_pluginsdir_base="\$(PACKAGE)/plugins" @@ -1354,18 +1418,15 @@ AC_SUBST(pluginsdir) expanded_pluginsdir="\${libdir}/${expanded_relative_pluginsdir_base}" AC_SUBST(expanded_pluginsdir) -tokenizers_pluginsdir="\${pluginsdir}/tokenizers" -AC_SUBST(tokenizers_pluginsdir) +tokenizer_pluginsdir="\${pluginsdir}/tokenizers" +AC_SUBST(tokenizer_pluginsdir) -query_expanders_pluginsdir="\${pluginsdir}/query_expanders" -AC_SUBST(query_expanders_pluginsdir) +query_expander_pluginsdir="\${pluginsdir}/query_expanders" +AC_SUBST(query_expander_pluginsdir) suggest_pluginsdir="\${pluginsdir}/suggest" AC_SUBST(suggest_pluginsdir) -table_pluginsdir="\${pluginsdir}/table" -AC_SUBST(table_pluginsdir) - ruby_pluginsdir="\${pluginsdir}/ruby" AC_SUBST(ruby_pluginsdir) @@ -1378,6 +1439,9 @@ AC_SUBST(sharding_pluginsdir) function_pluginsdir="\${pluginsdir}/functions" AC_SUBST(function_pluginsdir) +expression_rewriter_pluginsdir="\${pluginsdir}/expression_rewriters" +AC_SUBST(expression_rewriter_pluginsdir) + AC_MSG_CHECKING(for the suffix of plugin shared libraries) shrext_cmds=$(./libtool --config | grep '^shrext_cmds=') eval $shrext_cmds @@ -1389,12 +1453,13 @@ fi AC_DEFINE_UNQUOTED(GRN_PLUGIN_SUFFIX, ["$suffix"], "plugin suffix") # for query expanders -GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE="synonyms.tsv" +GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE_BASE="synonyms.tsv" +GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE="etc/${PACKAGE}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE_BASE}" AC_DEFINE_UNQUOTED(GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE, ["$GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE"], "The relative synonyms file for TSV query expander") GRN_QUERY_EXPANDER_TSV_SYNONYMS_PATH="` - eval echo ${sysconfdir}/${PACKAGE}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE} + eval echo ${sysconfdir}/${PACKAGE}/${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE_BASE} `" AC_DEFINE_UNQUOTED(GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE, ["$GRN_QUERY_EXPANDER_TSV_SYNONYMS_PATH"], @@ -1451,8 +1516,7 @@ AC_ARG_WITH(groonga-org-path, AC_SUBST(GROONGA_ORG_PATH) # groonga-httpd -m4_define([nginx_version], m4_include(nginx_version)) -NGINX_VERSION=nginx_version +NGINX_VERSION=m4_include([nginx_version]) AC_SUBST(NGINX_VERSION) # groonga-httpd binary path @@ -1472,6 +1536,12 @@ else fi AM_CONDITIONAL(WITH_GROONGA_HTTPD, test "$enable_groonga_httpd" = "yes") +GROONGA_HTTPD_PID_PATH="` + test \"$prefix\" = NONE && prefix=/usr/local + eval echo ${localstatedir}/run/groonga/groonga-httpd.pid +`" +AC_SUBST(GROONGA_HTTPD_PID_PATH) + # mruby AC_ARG_ENABLE(mruby, [AS_HELP_STRING([--enable-mruby], @@ -1492,12 +1562,17 @@ if test "$enable_mruby" = "yes"; then fi AC_DEFINE(GRN_WITH_MRUBY, [1], [Define to 1 if mruby is enabled.]) MRUBY_CFLAGS="-I\$(top_srcdir)/vendor/mruby-source/include" + GRN_WITH_MRUBY="yes" else MRUBY_CFLAGS="" fi +AC_SUBST(GRN_WITH_MRUBY) AC_SUBST(MRUBY_CFLAGS) AM_CONDITIONAL(WITH_MRUBY, test "$enable_mruby" = "yes") +MRUBY_CPPFLAGS="-DMRB_INT64" +AC_SUBST(MRUBY_CPPFLAGS) + # This option is used in vendor/onigmo/configure AC_ARG_ENABLE(shared-onigmo, [AS_HELP_STRING([--enable-shared-onigmo], @@ -1506,16 +1581,37 @@ AC_ARG_ENABLE(shared-onigmo, [enable_shared_onigmo="no"]) AM_CONDITIONAL(WITH_SHARED_ONIGMO, test "$enable_shared_onigmo" = "yes") -# TODO: Support using system Onigmo instead of bundled Onigmo. -AC_DEFINE(GRN_WITH_ONIGMO, [1], [Use Onigmo.]) -GRN_WITH_ONIGMO="yes" +AC_ARG_WITH(onigmo, + [AS_HELP_STRING([--without-onigmo], + [Don't Use Onigmo. [default=bundled]])], + [with_onigmo="$withval"], + [with_onigmo="bundled"]) +if test "x$with_onigmo" != "xno"; then + GRN_WITH_ONIGMO="yes" + if test "x$with_onigmo" != "xbundled"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([ONIGMO], [onigmo], + [have_onigmo=yes], + [have_onigmo=no]) + ], + [have_onigmo=no]) + fi + if test "x$with_onigmo" = "xsystem" -a "$have_onigmo" = "no"; then + AC_MSG_ERROR("No Onigmo found") + fi + if test "x$with_onigmo" = "xbundled" -o "$have_onigmo" = "no"; then + AC_CONFIG_SUBDIRS([vendor/onigmo]) + ONIGMO_CFLAGS="-I\$(top_srcdir)/vendor/onigmo-source" + ONIGMO_LIBS="\$(top_builddir)/vendor/onigmo-source/libonigmo.la" + fi + AC_DEFINE(GRN_WITH_ONIGMO, [1], [Use Onigmo.]) +else + GRN_WITH_ONIGMO="no" +fi AC_SUBST(GRN_WITH_ONIGMO) -AC_CONFIG_SUBDIRS([vendor/onigmo]) - -ONIGMO_CFLAGS="-I\$(top_srcdir)/vendor/onigmo-source" -ONIGMO_LIBS="\$(top_builddir)/vendor/onigmo-source/libonig.la" AC_SUBST(ONIGMO_CFLAGS) AC_SUBST(ONIGMO_LIBS) +AM_CONDITIONAL(WITH_BUNDLED_ONIGMO, test "$with_onigmo" != "no" -a "x$have_onigmo" != "xyes") # PCRE GRN_WITH_PCRE=no @@ -1541,6 +1637,30 @@ AC_SUBST(GRN_WITH_PCRE) AC_SUBST(PCRE_CFLAGS) AC_SUBST(PCRE_LIBS_ONLY_L) +# SSL +GRN_WITH_SSL=no +AC_ARG_WITH(ssl, + [AS_HELP_STRING([--without-ssl], + [Don't use SSL module for groonga-httpd. [default=auto-detect]])], + [with_ssl="$withval"], + [with_ssl="auto"]) +if test "x$with_ssl" != "xno"; then + m4_ifdef([PKG_CHECK_MODULES], [ + PKG_CHECK_MODULES([SSL], [libssl], + [_PKG_CONFIG(SSL_LIBS_ONLY_L, [libs-only-L], [libssl]) + SSL_LIBS_ONLY_L="$pkg_cv_SSL_LIBS_ONLY_L" + GRN_WITH_SSL=yes], + [GRN_WITH_SSL=no]) + ], + [GRN_WITH_SSL=no]) + if test "x$with_ssl" = "xyes" -a "$GRN_WITH_SSL" != "yes"; then + AC_MSG_ERROR("No SSL found") + fi +fi +AC_SUBST(GRN_WITH_SSL) +AC_SUBST(SSL_CFLAGS) +AC_SUBST(SSL_LIBS_ONLY_L) + # For package AC_ARG_WITH(rsync-path, [AS_HELP_STRING([--with-rsync-path=PATH], @@ -1549,6 +1669,13 @@ AC_ARG_WITH(rsync-path, [RSYNC_PATH="packages@packages.groonga.org:public"]) AC_SUBST(RSYNC_PATH) +AC_ARG_WITH(launchpad-ppa, + [AS_HELP_STRING([--with-launchpad-ppa=PPA], + [specify Launchpad Personal Package Archive. [default=groonga-ppa]])], + [LAUNCHPAD_PPA="$withval"], + [LAUNCHPAD_PPA="groonga-ppa"]) +AC_SUBST(LAUNCHPAD_PPA) + AC_ARG_WITH(launchpad-uploader-pgp-key, [AS_HELP_STRING([--with-launchpad-uploader-pgp-key=KEY], [specify PGP key UID to upload Groonga packages to Launchpad.])], @@ -1582,15 +1709,19 @@ GROONGA_HTTPD_DEFAULT_DATABASE_PATH="` AC_SUBST(GROONGA_HTTPD_DEFAULT_DATABASE_PATH) AC_OUTPUT([ + lib/metadata.rc packages/rpm/centos/groonga.spec packages/apt/debian/groonga-keyring.postrm packages/apt/env.sh packages/yum/env.sh groonga.pc + groonga-arrow.pc config.sh groonga-httpd-conf.sh data/groonga-httpd.conf + data/logrotate.d/centos/groonga-httpd data/scripts/groonga-httpd-restart + data/systemd/centos/groonga-httpd.service ]) echo "$PACKAGE_NAME $PACKAGE_VERSION configuration:" @@ -1657,11 +1788,16 @@ echo "groonga-httpd:" echo " enable: $enable_groonga_httpd" if test "$enable_groonga_httpd" = "yes"; then echo " default database path: $GROONGA_HTTPD_DEFAULT_DATABASE_PATH" - echo " PCRE: $WITH_PCRE" - if test "$WITH_PCRE" = "yes"; then + echo " PCRE: $GRN_WITH_PCRE" + if test "$GRN_WITH_PCRE" = "yes"; then echo " CFLAGS: $PCRE_CFLAGS" echo " LIBS only -L: $PCRE_LIBS_ONLY_L" fi + echo " SSL: $GRN_WITH_SSL" + if test "$GRN_WITH_SSL" = "yes"; then + echo " CFLAGS: $SSL_CFLAGS" + echo " LIBS only -L: $SSL_LIBS_ONLY_L" + fi fi echo diff --git a/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh b/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh index b98397be05aeca6eba9f5633551ac8bf8bbc0a39..e48700af07be02b2a76efe3caa4dfc2ff31d9c28 100755 --- a/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh +++ b/storage/mroonga/vendor/groonga/examples/dictionary/edict/edict-import.sh @@ -16,6 +16,12 @@ else edict_gz=$2 fi -if zcat $edict_gz | ${base_dir}/edict2grn.rb | groonga $1 > /dev/null; then +if type gzcat > /dev/null 2>&1; then + zcat="gzcat" +else + zcat="zcat" +fi + +if $zcat $edict_gz | ${base_dir}/edict2grn.rb | groonga $1 > /dev/null; then echo "edict data loaded." fi diff --git a/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html b/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html index aaad128a290b554b25ba47a64040297b9b3ee88d..47e81754094c9d086bd14a2e82a8ca69664758bd 100644 --- a/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html +++ b/storage/mroonga/vendor/groonga/examples/dictionary/html/index.html @@ -16,7 +16,7 @@ - +