diff -Nru mariadb-5.5-5.5.44/client/CMakeLists.txt mariadb-5.5-5.5.46/client/CMakeLists.txt --- mariadb-5.5-5.5.44/client/CMakeLists.txt 2015-06-09 20:25:55.000000000 +0000 +++ mariadb-5.5-5.5.46/client/CMakeLists.txt 2015-10-09 16:50:17.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,6 +47,7 @@ TARGET_LINK_LIBRARIES(mysqldump mysqlclient) MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c) +SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS") TARGET_LINK_LIBRARIES(mysqlimport mysqlclient) MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server) diff -Nru mariadb-5.5-5.5.44/client/mysqlbinlog.cc mariadb-5.5-5.5.46/client/mysqlbinlog.cc --- mariadb-5.5-5.5.44/client/mysqlbinlog.cc 2015-06-09 20:25:55.000000000 +0000 +++ mariadb-5.5-5.5.46/client/mysqlbinlog.cc 2015-10-09 16:50:17.000000000 +0000 @@ -66,6 +66,7 @@ ulong bytes_sent = 0L, bytes_received = 0L; ulong mysqld_net_retry_count = 10L; ulong open_files_limit; +ulong opt_binlog_rows_event_max_size; uint test_flags = 0; static uint opt_protocol= 0; static FILE *result_file; @@ -1432,6 +1433,12 @@ "Used to reserve file descriptors for use by this program.", &open_files_limit, &open_files_limit, 0, GET_ULONG, REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0}, + {"binlog-row-event-max-size", 0, + "The maximum size of a row-based binary log event in bytes. Rows will be " + "grouped into events smaller than this size if possible. " + "This value must be a multiple of 256.", + &opt_binlog_rows_event_max_size, &opt_binlog_rows_event_max_size, 0, + GET_ULONG, REQUIRED_ARG, UINT_MAX, 256, ULONG_MAX, 0, 256, 0}, {"verify-binlog-checksum", 'c', "Verify checksum binlog events.", (uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, diff -Nru mariadb-5.5-5.5.44/client/mysqlimport.c mariadb-5.5-5.5.46/client/mysqlimport.c --- mariadb-5.5-5.5.44/client/mysqlimport.c 2015-06-09 20:25:55.000000000 +0000 +++ mariadb-5.5-5.5.46/client/mysqlimport.c 2015-10-09 16:50:17.000000000 +0000 @@ -1,5 +1,6 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2011, 2015, 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 @@ -30,19 +31,14 @@ #include "client_priv.h" #include "mysql_version.h" -#ifdef HAVE_LIBPTHREAD -#include -#endif #include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ /* Global Thread counter */ -uint counter; -#ifdef HAVE_LIBPTHREAD +uint counter= 0; pthread_mutex_t counter_mutex; pthread_cond_t count_threshhold; -#endif static void db_error_with_table(MYSQL *mysql, char *table); static void db_error(MYSQL *mysql); @@ -486,6 +482,11 @@ { if (error && ignore_errors) return; + + /* in multi-threaded mode protect from concurrent safe_exit's */ + if (counter) + pthread_mutex_lock(&counter_mutex); + if (mysql) mysql_close(mysql); @@ -568,7 +569,6 @@ int exitcode= 0; -#ifdef HAVE_LIBPTHREAD pthread_handler_t worker_thread(void *arg) { int error; @@ -608,7 +608,6 @@ return 0; } -#endif int main(int argc, char **argv) @@ -628,7 +627,6 @@ } sf_leaking_memory=0; /* from now on we cleanup properly */ -#ifdef HAVE_LIBPTHREAD if (opt_use_threads && !lock_tables) { pthread_t mainthread; /* Thread descriptor */ @@ -682,7 +680,6 @@ pthread_attr_destroy(&attr); } else -#endif { MYSQL *mysql= 0; if (!(mysql= db_connect(current_host,current_db,current_user,opt_password))) diff -Nru mariadb-5.5-5.5.44/client/mysqlslap.c mariadb-5.5-5.5.46/client/mysqlslap.c --- mariadb-5.5-5.5.44/client/mysqlslap.c 2015-06-09 20:25:55.000000000 +0000 +++ mariadb-5.5-5.5.46/client/mysqlslap.c 2015-10-09 16:50:17.000000000 +0000 @@ -1,5 +1,6 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. + Copyright (c) 2005, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, 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 @@ -244,7 +245,7 @@ void generate_stats(conclusions *con, option_string *eng, stats *sptr); uint parse_comma(const char *string, uint **range); uint parse_delimiter(const char *script, statement **stmt, char delm); -uint parse_option(const char *origin, option_string **stmt, char delm); +int parse_option(const char *origin, option_string **stmt, char delm); static int drop_schema(MYSQL *mysql, const char *db); uint get_random_string(char *buf); static statement *build_table_string(void); @@ -1259,7 +1260,13 @@ if (num_int_cols_opt) { option_string *str; - parse_option(num_int_cols_opt, &str, ','); + if(parse_option(num_int_cols_opt, &str, ',') == -1) + { + fprintf(stderr, "Invalid value specified for the option " + "'number-int-cols'\n"); + option_cleanup(str); + return 1; + } num_int_cols= atoi(str->string); if (str->option) num_int_cols_index= atoi(str->option); @@ -1270,7 +1277,13 @@ if (num_char_cols_opt) { option_string *str; - parse_option(num_char_cols_opt, &str, ','); + if(parse_option(num_char_cols_opt, &str, ',') == -1) + { + fprintf(stderr, "Invalid value specified for the option " + "'number-char-cols'\n"); + option_cleanup(str); + return 1; + } num_char_cols= atoi(str->string); if (str->option) num_char_cols_index= atoi(str->option); @@ -1507,7 +1520,13 @@ printf("Parsing engines to use.\n"); if (default_engine) - parse_option(default_engine, &engine_options, ','); + { + if(parse_option(default_engine, &engine_options, ',') == -1) + { + fprintf(stderr, "Invalid value specified for the option 'engine'\n"); + return 1; + } + } if (tty_password) opt_password= get_tty_password(NullS); @@ -1984,7 +2003,7 @@ DBUG_RETURN(0); } -uint +int parse_option(const char *origin, option_string **stmt, char delm) { char *retstr; @@ -2009,6 +2028,13 @@ char buffer[HUGE_STRING_LENGTH]= ""; char *buffer_ptr; + /* + Return an error if the length of the any of the comma seprated value + exceeds HUGE_STRING_LENGTH. + */ + if ((size_t)(retstr - ptr) > HUGE_STRING_LENGTH) + return -1; + count++; strncpy(buffer, ptr, (size_t)(retstr - ptr)); /* @@ -2048,6 +2074,13 @@ { char *origin_ptr; + /* + Return an error if the length of the any of the comma seprated value + exceeds HUGE_STRING_LENGTH. + */ + if (strlen(ptr) > HUGE_STRING_LENGTH) + return -1; + if ((origin_ptr= strchr(ptr, ':'))) { char *option_ptr; @@ -2058,13 +2091,13 @@ option_ptr= (char *)ptr + 1 + tmp->length; /* Move past the : and the first string */ - tmp->option_length= (size_t)((ptr + length) - option_ptr); + tmp->option_length= strlen(option_ptr); tmp->option= my_strndup(option_ptr, tmp->option_length, MYF(MY_FAE)); } else { - tmp->length= (size_t)((ptr + length) - ptr); + tmp->length= strlen(ptr); tmp->string= my_strndup(ptr, tmp->length, MYF(MY_FAE)); } diff -Nru mariadb-5.5-5.5.44/client/mysql_upgrade.c mariadb-5.5-5.5.46/client/mysql_upgrade.c --- mariadb-5.5-5.5.44/client/mysql_upgrade.c 2015-06-09 20:25:55.000000000 +0000 +++ mariadb-5.5-5.5.46/client/mysql_upgrade.c 2015-10-09 16:50:17.000000000 +0000 @@ -1061,7 +1061,7 @@ printf("This installation of MySQL is already upgraded to %s, " "use --force if you still need to run mysql_upgrade\n", MYSQL_SERVER_VERSION); - die(NULL); + goto end; } if (opt_version_check && check_version_match()) @@ -1084,6 +1084,7 @@ /* Create a file indicating upgrade has been performed */ create_mysql_upgrade_info_file(); +end: free_used_memory(); my_end(my_end_arg); exit(0); diff -Nru mariadb-5.5-5.5.44/cmake/os/Windows.cmake mariadb-5.5-5.5.46/cmake/os/Windows.cmake --- mariadb-5.5-5.5.44/cmake/os/Windows.cmake 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/cmake/os/Windows.cmake 2015-10-09 16:50:17.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -50,10 +50,12 @@ SET(MSVC TRUE) ENDIF() -ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE") -ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501") +ADD_DEFINITIONS(-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE) +ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) +# We do not want the windows.h macros min/max +ADD_DEFINITIONS(-DNOMINMAX) # Speed up build process excluding unused header files -ADD_DEFINITIONS("-DWIN32_LEAN_AND_MEAN") +ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) # Adjust compiler and linker flags IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4) diff -Nru mariadb-5.5-5.5.44/debian/additions/innotop/changelog.innotop mariadb-5.5-5.5.46/debian/additions/innotop/changelog.innotop --- mariadb-5.5-5.5.44/debian/additions/innotop/changelog.innotop 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/additions/innotop/changelog.innotop 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,357 @@ +Changelog for innotop: + +2009-03-09: version 1.7.1 + + Changes: + * Don't display the CXN column if only one connection is active in + the current view + + Bugs fixed: + * fixed bug where trying to aggregate the time column would result + in a crash if the time column had an undef value in it, which is + the case when a thread is in the 'Connect' state + * updated innotop.spec file to reflect current version + +2009-02-23: version 1.7.0 + + Changes: + * supports a central config (/etc/innotop/innotop.conf) + * changed the default home directory config to ~/.innotop/innotop.conf + (away from .ini) + * embedded InnoDBParser.pm into innotop so it can be run with no + installation + * no longer writes a new config file by default + * added --skipcentral (skip reading central config) and --write (write + a config if none were loaded at start-up) + * if no config file is loaded, connect to a MySQL database on + localhost using mysql_read_default_group=client + * embedded maatkit's DSNParser.pm and added support for --user, + --password, --host, --port + * changed default mode from T (InnoDB Transactions) to Q (Query List) + * in addition to connected threads, now displays running and cached + threads in statusbar + * don't load connections from a config file if any DSN information or + a username or password is specified on the command-line + + Bugs fixed: + * fixed bug preventing utilization of command-line options that + override default config settings if no config file was loaded + * fixed a bug where migrating from an old version of the config will + delete ~/innotop.ini, if it exists. Now uses File::Temp::tempfile(). + +2007-11-09: version 1.6.0 + + * S mode crashed on non-numeric values. + * New user-defined columns crashed upon restart. + * Added --color option to control terminal coloring. + +2007-09-18: version 1.5.2 + + * Added the ability to monitor InnoDB status from a file. + * Changed W mode to L mode; it monitors all locks, not just lock waits. + +2007-09-16: version 1.5.1 + + * Added C (Command Summary) mode. + * Fixed a bug in the 'avg' aggregate function. + +2007-09-10: version 1.5.0 + + Changes: + * Added plugin functionality. + * Added group-by functionality. + * Moved the configuration file to a directory. + * Enhanced filtering and sorting on pivoted tables. + * Many small bug fixes. + +2007-07-16: version 1.4.3 + + Changes: + * Added standard --version command-line option + * Changed colors to cyan instead of blue; more visible on dark terminals. + * Added information to the filter-choosing dialog. + * Added column auto-completion when entering a filter expression. + * Changed Term::ReadKey from optional to mandatory. + * Clarified username in password prompting. + * Ten thousand words of documentation! + + Bugs fixed: + * innotop crashed in W mode when InnoDB status data was truncated. + * innotop didn't display errors in tables if debug was enabled. + * The colored() subroutine wasn't being created in non-interactive mode. + * Don't prompt to save password except the first time. + +2007-05-03: version 1.4.2 + + This version contains all changes to the trunk until revision 239; some + changes in revisions 240:250 are included. + + MAJOR CHANGES: + + * Quick-filters to easily filter any column in any display + * Compatibility with MySQL 3.23 through 6.0 + * Improved error handling when a server is down, permissions denied, etc + * Use additional SHOW INNODB STATUS information in 5.1.x + * Make all modes use tables consistently, so they can all be edited, + filtered, colored and sorted consistently + * Combine V, G and S modes into S mode, with v, g, and s hot-keys + * Let DBD driver read MySQL option files; permit connections without + user/pass/etc + * Compile SQL-like expressions into Perl subroutines; eliminate need to + know Perl + * Do not save all config data to config file, only save user's customizations + * Rewritten and improved command-line option handling + * Added --count, --delay, and other command-line options to support + run-and-exit operation + * Improve built-in variable sets + * Improve help screen with three-part balanced-column layout + * Simplify table-editor and improve hotkey support + * Require Perl to have high-resolution time support (Time::HiRes) + * Help the user choose a query to analyze or kill + * Enable EXPLAIN, show-full-query in T mode just like Q mode + * Let data-extraction access current, previous and incremental data sets + all at once + + MINOR CHANGES: + + * Column stabilizing for Q mode + * New color rules for T, Q, W modes + * Apply slave I/O filter to Q mode + * Improve detection of server version and other meta-data + * Make connection timeout a config variable + * Improve cross-version-compatible SQL syntax + * Get some information from the DBD driver instead of asking MySQL for it + * Improved error messages + * Improve server group creation/editing + * Improve connection/thread killing + * Fix broken key bindings and restore previously mapped hot-keys for + choosing columns + * Some documentation updates (but not nearly enough) + * Allow the user to specify graphing char in S mode (formerly G mode) + * Allow easy switching between variable sets in S mode + * Bind 'n' key globally to choose the 'next' server connection + * Bind '%' key globally to filter displayed tables + * Allow aligning columns on the decimal place for easy readability + * Add hide_hdr config variable to hide column headers in tables + * Add a feature to smartly run PURGE MASTER LOGS in Replication mode + * Enable debug mode as a globally configurable variable + * Improve error messages when an expression or filter doesn't compile or has + a run-time error; die on error when debug is enabled + * Allow user-configurable delays after executing SQL (to let the server + settle down before taking another measurement) + * Add an expression to show how long until a transaction is finished + * Add skip_innodb as a global config variable + * Add '%' after percentages to help disambiguate (user-configurable) + * Add column to M mode to help see how fast slave is catching up to master + + BUG FIXES: + + * T and W modes had wrong value for wait_status column + * Error tracking on connections didn't reset when the connection recovered + * wait_timeout on connections couldn't be set before MySQL 4.0.3 + * There was a crash on 3.23 when wiping deadlocks + * Lettercase changes in some result sets (SHOW MASTER/SLAVE STATUS) between + MySQL versions crashed innotop + * Inactive connections crashed innotop upon access to DBD driver + * set_precision did not respect user defaults for number of digits + * --inc command-line option could not be negated + * InnoDB status parsing was not always parsing all needed information + * S mode (formerly G mode) could crash trying to divide non-numeric data + * M table didn't show Slave_open_temp_tables variable; incorrect lettercase + * DBD drivers with broken AutoCommit would crash innotop + * Some key bindings had incorrect labels + * Some config-file loading routines could load data for things that didn't + exist + * Headers printed too often in S mode + * High-resolution time was not used even when the user had it + * Non-interactive mode printed blank lines sometimes + * Q-mode header and statusbar showed different QPS numbers + * Formulas for key-cache and query-cache hit ratios were wrong + * Mac OS "Darwin" machines were mis-identified as Microsoft Windows + * Some multiplications crashed when given undefined input + * The commify transformation did not check its input and could crash + * Specifying an invalid mode on the command line or config file could crash + innotop + +2007-03-29: version 1.4.1 + + * More tweaks to display of connection errors. + * Fixed a problem with skip-innodb in MySQL 5.1. + * Fix a bug with dead connections in single-connection mode. + * Fix a regex to allow parsing more data from truncated deadlocks. + * Don't load active cxns from the config file if the cxn isn't defined. + +2007-03-03: version 1.4.0 + + * Further tweak error handling and display of connection errors + * More centralization of querying + * Fix forking so it doesn't kill all database connections + * Allow user to run innotop without permissions for GLOBAL variables and status + +2007-02-11: version 1.3.6 + + * Handle some connection failures so innotop doesn't crash because of one server. + * Enable incremental display in more modes. + * Tweaks to colorizing, color editor, and default color rules. + * Tweaks to default sorting rules. + * Use prepared statements for efficiency. + * Bug fixes and code cleanups. + * Data storage is keyed on clock ticks now. + +2007-02-03: version 1.3.5 + + * Bug fixes. + * More tools for editing configuration from within innotop. + * Filters and transformations are constrained to valid values. + * Support for colorizing rows. + * Sorting by multiple columns. + * Compress headers when display is very wide. + * Stabilize and limit column widths. + * Check config file formats when upgrading so upgrades go smoothly. + * Make D mode handle many connections at once. + * Extract simple expressions from data sets in column src property. + This makes innotop more awk-ish. + +2007-01-16: version 1.3 + + * Readline support. + * Can be used unattended, or in a pipe-and-filter mode + where it outputs tab-separated data to standard output. + * You can specify a config file on the command line. + Config files can be marked read-only. + * Monitor multiple servers simultaneously. + * Server groups to help manage many servers conveniently. + * Monitor master/slave status, and control slaves. + * Columns can have user-defined expressions as their data sources. + * Better configuration tools. + * InnoDB status information is merged into SHOW VARIABLES and + SHOW STATUS information, so you can access it all together. + * High-precision time support in more places. + * Lots of tweaks to make things display more readably and compactly. + * Column transformations and filters. + +2007-01-16: version 1.0.1 + * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. + The new project homepage is http://sourceforge.net/projects/innotop/ + * Tweak default T/Q mode sort columns to match what people expect. + * Fix broken InnoDBParser.pm documentation (and hence man page). + +2007-01-06: version 1.0 + * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. + The new project homepage is http://sourceforge.net/projects/innotop/ + * Prevent control characters from freaking terminal out. + * Set timeout to keep busy servers from closing connection. + * There is only one InnoDB insert buffer. + * Make licenses clear and consistent. + +2006-11-14: innotop 0.1.160, InnoDBParser version 1.69 + * Support for ANSI color on Microsoft Windows (more readable, compact + display; thanks Gisbert W. Selke). + * Better handling of $ENV{HOME} on Windows. + * Added a LICENSE file to the package as per Gentoo bug: + http://bugs.gentoo.org/show_bug.cgi?id=147600 + +2006-11-11: innotop 0.1.157, InnoDBParser version 1.69 + * Add Microsoft Windows support. + +2006-10-19: innotop 0.1.154, InnoDBParser version 1.69 + * Add O (Open Tables) mode + * Add some more checks to handle incomplete InnoDB status information + +2006-09-30: innotop 0.1.152, InnoDBParser version 1.69 + * Figured out what was wrong with package $VERSION variable: it wasn't + after the package declaration! + +2006-09-28: innotop 0.1.152, InnoDBParser version 1.67 + * Make more efforts towards crash-resistance and tolerance of completely + messed-up inputs. If innotop itself is broken, it is now much harder to + tell, because it just keeps on running without complaining. + * Fix a small bug parsing out some information and displaying it. + +2006-09-05: innotop 0.1.149, InnoDBParser version 1.64 + * Try to find and eliminate any parsing code that assumes pattern matches + will succeed. + +2006-09-05: innotop 0.1.149, InnoDBParser version 1.62 + * Make innotop crash-resistant, so I can declare it STABLE finally. + * Instead of using SQL conditional comments, detect MySQL version. + +2006-08-22: innotop 0.1.147, InnoDBParser version 1.60 + * Fix some innotop bugs with undefined values, bad formatting etc. + +2006-08-19: innotop 0.1.146, InnoDBParser version 1.60 + * Make innotop handle some unexpected NULL values in Q mode. + * Add OS wait information to W mode, so it is now "everything that waits." + * Center section captions better. + * Make R mode more readable and compact. + * Make InnoDBParser parse lock waits even when they've been waiting 0 secs. + +2006-08-12: innotop 0.1.139, InnoDBParser version 1.59 + * Add more documentation + * Tweak V mode to show more info in less space. + * Fix a bug in G mode. + +2006-08-10: innotop 0.1.132, InnoDBParser version 1.58 + * Handle yet more types of FK error... it will never end! + * Handle some special cases when DEADLOCK info truncated + * Add a bit more FK info to F mode in innotop + * More tests added to the test suite + +2006-08-07: innotop 0.1.131, InnoDBParser version 1.55 + * Fix another issue with configuration + * Handle another type of FK error + +2006-08-03: innotop 0.1.130, InnoDBParser version 1.54 + * Fix an issue loading config file + * Add heap_no to 'D' (InnoDB Deadlock) mode to ease deadlock debugging. + +2006-08-02: innotop 0.1.128, InnoDBParser version 1.54 + * Parse lock wait information from the TRANSACTION section. + * Even more OS-specific parsing... pain in the butt... + * Add 'W' (InnoDB Lock Wait) mode. + * Fix some minor display issues with statusbar. + +2006-08-02: innotop 0.1.125, InnoDBParser version 1.50 + * Don't try to get references to Perl built-in functions like time() + * Handle more OS-specific variations of InnoDB status text + * Add some more information to various places in innotop + +2006-08-01: innotop 0.1.123, InnoDBParser version 1.47 + + * Enhance S and G modes: clear screen and re-print headers + * Don't crash when deadlock data is truncated + * Make Analyze mode say how to get back to whatever you came from + * Display 'nothing to display' when there is nothing + * Add ability to read InnoDB status text from a file (mostly helps test) + * Add table of Wait Array Information in Row Op/Semaphore mode + * Add table of lock information in InnoDB deadlock mode + * Ensure new features in upgrades don't get masked by existing config files + * Tweak default column choices for T mode + * Enhance foreign key parsing + * Enhance physical record and data tuple parsing + * Enhance lock parsing (handle old-style and new-style formats) + +2006-07-24: innotop 0.1.112, InnoDBParser version 1.36 + + * InnoDBParser enhancements for FK error messages. + * A fix to innotop to prevent it from crashing while trying to display a FK + error message. + * Some minor cosmetic changes to number formatting in innotop. + +2006-07-22: innotop 0.1.106, InnoDBParser version 1.35 + + * InnoDBParser is much more complete and accurate. + * Tons of bug fixes. + * Add partitions to EXPLAIN mode. + * Enhance Q mode header, add T mode header. + * Share some configuration variables across modes. + * Add formatted time columns to Q, T modes. + * Add command-line argument parsing. + * Turn off echo when asking for password. + * Add option to specify port when connecting. + * Let display-optimized-query display multiple notes. + * Lots of small improvements, such as showing more info in statusbar. + +2006-07-02: innotop 0.1.74, InnoDBParser version 1.24 + + * Initial release for public consumption. diff -Nru mariadb-5.5-5.5.44/debian/additions/my.cnf mariadb-5.5-5.5.46/debian/additions/my.cnf --- mariadb-5.5-5.5.44/debian/additions/my.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/additions/my.cnf 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,171 @@ +# MariaDB database server configuration file. +# +# You can copy this file to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# * Basic Settings +# +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc_messages_dir = /usr/share/mysql +lc_messages = en_US +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +bind-address = 127.0.0.1 +# +# * Fine Tuning +# +max_connections = 100 +connect_timeout = 5 +wait_timeout = 600 +max_allowed_packet = 16M +thread_cache_size = 128 +sort_buffer_size = 4M +bulk_insert_buffer_size = 16M +tmp_table_size = 32M +max_heap_table_size = 32M +# +# * MyISAM +# +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched. On error, make copy and try a repair. +myisam_recover = BACKUP +key_buffer_size = 128M +#open-files-limit = 2000 +table_open_cache = 400 +myisam_sort_buffer_size = 512M +concurrent_insert = 2 +read_buffer_size = 2M +read_rnd_buffer_size = 1M +# +# * Query Cache Configuration +# +# Cache only tiny result sets, so we can fit more in the query cache. +query_cache_limit = 128K +query_cache_size = 64M +# for more write intensive setups, set to DEMAND or OFF +#query_cache_type = DEMAND +# +# * Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 +# +# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. +# +# we do want to know about network errors and such +log_warnings = 2 +# +# Enable the slow query log to see queries with especially long duration +#slow_query_log[={0|1}] +slow_query_log_file = /var/log/mysql/mariadb-slow.log +long_query_time = 10 +#log_slow_rate_limit = 1000 +log_slow_verbosity = query_plan + +#log-queries-not-using-indexes +#log_slow_admin_statements +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#report_host = master1 +#auto_increment_increment = 2 +#auto_increment_offset = 1 +log_bin = /var/log/mysql/mariadb-bin +log_bin_index = /var/log/mysql/mariadb-bin.index +# not fab for performance, but safer +#sync_binlog = 1 +expire_logs_days = 10 +max_binlog_size = 100M +# slaves +#relay_log = /var/log/mysql/relay-bin +#relay_log_index = /var/log/mysql/relay-bin.index +#relay_log_info_file = /var/log/mysql/relay-bin.info +#log_slave_updates +#read_only +# +# If applications support it, this stricter sql_mode prevents some +# mistakes like inserting invalid dates etc. +#sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +default_storage_engine = InnoDB +# you can't just change log file size, requires special procedure +#innodb_log_file_size = 50M +innodb_buffer_pool_size = 256M +innodb_log_buffer_size = 8M +innodb_file_per_table = 1 +innodb_open_files = 400 +innodb_io_capacity = 400 +innodb_flush_method = O_DIRECT +# +# * Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completition + +[isamchk] +key_buffer = 16M + +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff -Nru mariadb-5.5-5.5.44/debian/changelog mariadb-5.5-5.5.46/debian/changelog --- mariadb-5.5-5.5.44/debian/changelog 2015-06-16 05:31:55.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/changelog 2015-11-04 19:48:00.000000000 +0000 @@ -1,7 +1,36 @@ +mariadb-5.5 (5.5.46-1ubuntu0.14.04.2) trusty-security; urgency=low + + * SECURITY UPDATE: Update to 5.5.46 to fix security issues (LP: #1512241): + - CVE-2015-4913 + - CVE-2015-4870 + - CVE-2015-4861 + - CVE-2015-4858 + - CVE-2015-4836 + - CVE-2015-4830 + - CVE-2015-4826 + - CVE-2015-4815 + - CVE-2015-4807 + - CVE-2015-4802 + - CVE-2015-4792 + * Upstream release 5.5.45 fixes for the following security vulnerabilities: + - CVE-2015-4816 + - CVE-2015-4819 + - CVE-2015-4879 + * Update new Oracle CVE identifiers to old MariaDB changelog entries + * New patch: Extend date in test suite so that main.events_1 will pass + + -- Otto Kekäläinen Tue, 03 Nov 2015 11:41:30 +0200 + mariadb-5.5 (5.5.44-1ubuntu0.14.04.1) trusty-security; urgency=low * SECURITY UPDATE: Update to 5.5.44 to fix security issues (LP: #1464895): - CVE-2015-3152 + - CVE-2015-2648 + - CVE-2015-2582 + - CVE-2015-4752 + - CVE-2015-2643 + - CVE-2015-4864 + - CVE-2015-2620 * Upstream also includes lots of line ending changes (from CRLF -> LF) * Removed hotfix patch now included in upstream release (MDEV-8115) @@ -14,6 +43,7 @@ - CVE-2015-2571 - CVE-2015-0505 - CVE-2015-0499 + - CVE-2015-4757 * Hotfix patch to fix the server crash caused by mysql_upgrade (MDEV-8115) -- Otto Kekäläinen Tue, 05 May 2015 09:17:31 +0300 diff -Nru mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.dirs mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.dirs --- mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.dirs 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.dirs 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,10 @@ +etc/init.d +etc/logrotate.d +etc/mysql/conf.d +usr/bin +usr/sbin +usr/share/man/man8 +usr/share/mysql +usr/share/doc/mariadb-server-5.5 +var/run/mysqld +var/lib/mysql-upgrade diff -Nru mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.files.in mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.files.in --- mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.files.in 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.files.in 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,75 @@ +usr/lib/mysql/plugin/ha_innodb.so +usr/lib/mysql/plugin/sphinx.so +usr/lib/mysql/plugin/auth_socket.so +usr/lib/mysql/plugin/auth_pam.so +usr/lib/mysql/plugin/semisync_master.so +usr/lib/mysql/plugin/semisync_slave.so +usr/lib/mysql/plugin/handlersocket.so +usr/lib/mysql/plugin/sql_errlog.so +usr/lib/mysql/plugin/server_audit.so +usr/lib/libhsclient.so.* +etc/mysql/debian-start +etc/mysql/conf.d/mysqld_safe_syslog.cnf +usr/bin/msql2mysql +usr/bin/my_print_defaults +usr/bin/myisamchk +usr/bin/myisam_ftdump +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/aria_pack +usr/bin/aria_read_log +usr/bin/aria_ftdump +usr/bin/aria_chk +usr/bin/aria_dump_log +usr/bin/mysql_convert_table_format +usr/bin/mysql_install_db +usr/bin/mysql_plugin +usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_upgrade +usr/bin/mysql_zap +usr/bin/mysqlbinlog +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/mysqlhotcopy +usr/bin/perror +usr/bin/replace +usr/bin/resolve_stack_dump +usr/bin/resolveip +usr/share/doc/mariadb-server-5.5/mysqld.sym.gz +usr/share/doc/mariadb-server-5.5/INFO_SRC +usr/share/doc/mariadb-server-5.5/INFO_BIN +usr/share/lintian/overrides/mariadb-server-5.5 +usr/share/man/man1/msql2mysql.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisam_ftdump.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/mysql_convert_table_format.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 +usr/share/man/man1/mysqlhotcopy.1 +usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql_setpermission.1 +usr/share/man/man1/mysql_upgrade.1 +usr/share/man/man1/mysql_zap.1 +usr/share/man/man1/perror.1 +usr/share/man/man1/replace.1 +usr/share/man/man1/resolveip.1 +usr/share/man/man1/resolve_stack_dump.1 +usr/share/man/man1/innochecksum.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/mysql/debian-start.inc.sh +usr/share/mysql/echo_stderr +usr/share/mysql/errmsg-utf8.txt +usr/share/mysql/fill_help_tables.sql +usr/share/mysql/mysql_system_tables_data.sql +usr/share/mysql/mysql_system_tables.sql +usr/share/mysql/mysql_performance_tables.sql +usr/share/mysql/mysql_test_data_timezone.sql +@TOKUDB_DEB_FILES@ +@OQGRAPH_DEB_FILES@ diff -Nru mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.postinst mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.postinst --- mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.postinst 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.postinst 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,268 @@ +#!/bin/bash -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + +# This command can be used as pipe to syslog. With "-s" it also logs to stderr. +ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i" +# This will make an error in a logged command immediately apparent by aborting +# the install, rather than failing silently and leaving a broken install. +set -o pipefail + +invoke() { + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam" + +test_mysql_access() { + mysql --no-defaults -u root -h localhost /dev/null 2>&1 +} + +# call with $1 = "online" to connect to the server, otherwise it bootstraps +set_mysql_rootpw() { + # forget we ever saw the password. don't use reset to keep the seen status + db_set mysql-server/root_password "" + + tfile=`mktemp` + if [ ! -f "$tfile" ]; then + return 1 + fi + + # this avoids us having to call "test" or "[" on $rootpw + cat << EOF > $tfile +USE mysql; +UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root'; +FLUSH PRIVILEGES; +EOF + if grep -q 'PASSWORD("")' $tfile; then + retval=0 + elif [ "$1" = "online" ]; then + mysql --no-defaults -u root -h localhost <$tfile >/dev/null + retval=$? + else + $MYSQL_BOOTSTRAP <$tfile + retval=$? + fi + rm -f $tfile + return $retval +} + +# This is necessary because mysql_install_db removes the pid file in /var/run +# and because changed configuration options should take effect immediately. +# In case the server wasn't running at all it should be ok if the stop +# script fails. I can't tell at this point because of the cleaned /var/run. +set +e; invoke stop; set -e + +case "$1" in + configure) + mysql_datadir=/usr/share/mysql + mysql_statedir=/var/lib/mysql + mysql_rundir=/var/run/mysqld + mysql_logdir=/var/log + mysql_cfgdir=/etc/mysql + mysql_newlogdir=/var/log/mysql + mysql_upgradedir=/var/lib/mysql-upgrade + + # first things first, if the following symlink exists, it is a preserved + # copy the old data dir from a mysql upgrade that would have otherwise + # been replaced by an empty mysql dir. this should restore it. + for dir in DATADIR LOGDIR; do + if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi + savelink="$mysql_upgradedir/$dir.link" + if [ -L "$savelink" ]; then + # If the targetdir was a symlink before we upgraded it is supposed + # to be either still be present or not existing anymore now. + if [ -L "$targetdir" ]; then + rm "$savelink" + elif [ ! -d "$targetdir" ]; then + mv "$savelink" "$targetdir" + else + # this should never even happen, but just in case... + mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX` + echo "this is very strange! see $mysql_tmp/README..." >&2 + mv "$targetdir" "$mysql_tmp" + cat << EOF > "$mysql_tmp/README" + +if you're reading this, it's most likely because you had replaced /var/lib/mysql +with a symlink, then upgraded to a new version of mysql, and then dpkg +removed your symlink (see #182747 and others). the mysql packages noticed +that this happened, and as a workaround have restored it. however, because +/var/lib/mysql seems to have been re-created in the meantime, and because +we don't want to rm -rf something we don't know as much about, we're going +to leave this unexpected directory here. if your database looks normal, +and this is not a symlink to your database, you should be able to blow +this all away. + +EOF + fi + fi + rmdir $mysql_upgradedir 2>/dev/null || true + done + + # Ensure the existence and right permissions for the database and + # log files. + if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi + if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi + if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi + # When creating an ext3 jounal on an already mounted filesystem like e.g. + # /var/lib/mysql, you get a .journal file that is not modifyable by chown. + # The mysql_datadir must not be writable by the mysql user under any + # circumstances as it contains scripts that are executed by root. + set +e + chown -R 0:0 $mysql_datadir + chown -R mysql $mysql_statedir + chown -R mysql $mysql_rundir + chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir; + for i in log err; do + touch $mysql_logdir/mysql.$i + chown mysql:adm $mysql_logdir/mysql.$i + chmod 0640 $mysql_logdir/mysql.$i + done + set -e + + # This is important to avoid dataloss when there is a removed + # mysql-server version from Woody lying around which used the same + # data directory and then somewhen gets purged by the admin. + db_set mysql-server/postrm_remove_database false || true + + # To avoid downgrades. + touch $mysql_statedir/debian-5.5.flag + + # initiate databases. Output is not allowed by debconf :-( + # This will fail if we are upgrading an existing database; in this case + # mysql_upgrade, called from the /etc/init.d/mysql start script, will + # handle things. + # Debian: beware of the bashisms... + # Debian: can safely run on upgrades with existing databases + set +e + /bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER + set -e + + ## On every reconfiguration the maintenance user is recreated. + # + # - It is easier to regenerate the password every time but as people + # use fancy rsync scripts and file alteration monitors, the existing + # password is used and existing files not touched. + # - The mysqld statement is like that in mysql_install_db because the + # server is not already running. This has some implications: + # - The amount of newlines and semicolons in the query is important! + # - GRANT is not possible with --skip-grant-tables and "INSERT + # (user,host..) VALUES" is not --ansi compliant + # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. + # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv + # may not be present as old Woody 3.23 databases did not have it and the + # admin might not already have run mysql_upgrade which adds them. + # As the binlog cron scripts to need at least the Super_priv, I do first + # the old query which always succeeds and then the new which may or may not. + + # recreate the credentials file if not present or without mysql_upgrade stanza + dc=$mysql_cfgdir/debian.cnf; + if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then + pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" + else + pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; + if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi + cat /dev/null > $dc + echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc + echo "[client]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "[mysql_upgrade]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "basedir = /usr" >>$dc + fi + # If this dir chmod go+w then the admin did it. But this file should not. + chown 0:0 $dc + chmod 0600 $dc + + # update privilege tables + password_column_fix_query=`/bin/echo -e \ + "USE mysql\n" \ + "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL"`; + replace_query=`/bin/echo -e \ + "USE mysql\n" \ + "SET sql_mode='';\n" \ + "REPLACE INTO user SET " \ + " host='localhost', user='debian-sys-maint', password=password('$pass'), " \ + " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ + " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ + " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ + " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ + " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ + " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ + " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ + " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\ + " ssl_cipher='', x509_issuer='', x509_subject='';"`; + # Engines supported by etch should be installed per default. The query sequence is supposed + # to be aborted if the CREATE TABLE fails due to an already existent table in which case the + # admin might already have chosen to remove one or more plugins. Newlines are necessary. + install_plugins=`/bin/echo -e \ + "USE mysql;\n" \ + "CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" ` + + # Upgrade password column format before the root password gets set. + echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + + db_get mysql-server/root_password && rootpw="$RET" + if ! set_mysql_rootpw; then + password_error="yes" + fi + + set +e + echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + echo "$install_plugins" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + set -e + ;; + + abort-upgrade|abort-remove|abort-configure) + ;; + + *) + echo "postinst called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# here we check to see if we can connect as root without a password +# this should catch upgrades from previous versions where the root +# password wasn't set. if there is a password, or if the connection +# fails for any other reason, nothing happens. +if [ "$1" = "configure" ]; then + if test_mysql_access; then + db_input medium mysql-server/root_password || true + db_go + db_get mysql-server/root_password && rootpw="$RET" + + if ! set_mysql_rootpw "online"; then + password_error="yes" + fi + fi + + if [ "$password_error" = "yes" ]; then + db_input high mysql-server/error_setting_password || true + db_go + fi + +fi + +db_stop # in case invoke failes + +#DEBHELPER# + +exit 0 diff -Nru mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.postrm mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.postrm --- mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.postrm 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.postrm 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,83 @@ +#!/bin/bash -e + +# It is possible that Debconf has already been removed, too. +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! +stop_server() { + set +e + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql stop + else + /etc/init.d/mysql stop + fi + errno=$? + set -e + + if [ "$?" != 0 ]; then + echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + exit 1 + fi +} + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then + stop_server + sleep 2 + fi + ;; + *) + echo "postrm called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# +# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) +# - Remove the mysql user only after all his owned files are purged. +# +if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then + # we remove the mysql user only after all his owned files are purged + rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} + rm -rf /var/log/mysql + + db_input high mysql-server-5.1/postrm_remove_databases || true + db_go || true + db_get mysql-server-5.1/postrm_remove_databases || true + if [ "$RET" = "true" ]; then + # never remove the debian.cnf when the databases are still existing + # else we ran into big trouble on the next install! + rm -f /etc/mysql/debian.cnf + rm -rf /var/lib/mysql + rm -rf /var/run/mysqld + userdel mysql || true + fi + + # (normally) Automatically added by dh_installinit + if [ "$1" = "purge" ] ; then + update-rc.d mysql remove >/dev/null || exit 0 + fi + # (normally) End automatically added section +fi + +# (normally) Automatically added by dh_installdebconf +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +# (normally) End automatically added section + +# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-5.1 is installed + +exit 0 diff -Nru mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.README.Debian mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.README.Debian --- mariadb-5.5-5.5.44/debian/dist/Debian/mariadb-server-5.5.README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Debian/mariadb-server-5.5.README.Debian 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,109 @@ +* MYSQL WON'T START OR STOP?: +============================= +You may never ever delete the special mysql user "debian-sys-maint". This +user together with the credentials in /etc/mysql/debian.cnf are used by the +init scripts to stop the server as they would require knowledge of the mysql +root users password else. +So in most of the times you can fix the situation by making sure that the +debian.cnf file contains the right password, e.g. by setting a new one +(remember to do a "flush privileges" then). + +* WHAT TO DO AFTER UPGRADES: +============================ +The privilege tables are automatically updated so all there is left is read +the changelogs on dev.mysql.com to see if any changes affect custom apps. + +* WHAT TO DO AFTER INSTALLATION: +================================ +The MySQL manual describes certain steps to do at this stage in a separate +chapter. They are not necessary as the Debian packages does them +automatically. + +The only thing that is left over for the admin is + - setting the passwords + - creating new users and databases + - read the rest of this text + +* DOWNGRADING TO 4.0 or 4.1: +============================ +Unsupported. Period. +But if you do and get problems or make interesting experiences, mail me, it +might help others. +Ok, if you really want, I would recommend to "mysqldump --opt" all tables, +then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be +carefully, though, with the "mysql" table, you might not simply overwrite that +one as the password for the mysql "debian-sys-maint" user is stored in +/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if +it's alive. + +* SOME APPLICATION CAN NO LONGER CONNECT: +========================================= +This application is probably linked against libmysqlclient12 or below and +somebody has created a mysql user with new-style passwords. +The old_passwords=1 option in /etc/mysql/my.cnf might help. If not the +application that inserted the user has to be changed or the application that +tries to connect updated to libmysqlclient14 or -15. + +* NETWORKING: +============= +For security reasons, the Debian package has enabled networking only on the +loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with +"netstat -tlnp" where it is listening. If your connection is aborted +immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read +hosts_access(5). + +* WHERE IS THE DOCUMENTATION?: +============================== +Unfortunately due to licensing restrictions, debian currently not able +to provide the mysql-doc package in any format. For the most up to date +documentation, please go to http://dev.mysql.com/doc. + +* PASSWORDS: +============ +It is strongly recommended to set a password for the mysql root user (which + /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'" + /usr/bin/mysql -u root -e "flush privileges" +If you already had a password set add "-p" before "-u" to the lines above. + + +If you are tired to type the password in every time or want to automate your +scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600 +(-rw------- username username .my.cnf) to ensure that nobody else can read +it. Every other configuration parameter can be stored there, too. You will +find an example below and more information in the MySQL manual in +/usr/share/doc/mariadb-doc or www.mysql.com. + +ATTENTION: It is necessary, that a .my.cnf from root always contains a "user" +line wherever there is a "password" line, else, the Debian maintenance +scripts, that use /etc/mysql/debian.cnf, will use the username +"debian-sys-maint" but the password that is in root's .my.cnf. Also note, +that every change you make in the /root/.my.cnf will affect the mysql cron +script, too. + + # an example of $HOME/.my.cnf + [client] + user = your-mysql-username + password = enter-your-good-new-password-here + +* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE: +========================================= +If you ever run out of rows in a table there is the possibility of building +the package with "-DBIG_ROWS" which, according to a MySQL employee on +packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32 +rows) but also to an approx. 5% performance loss. + +* BerkeleyDB Storage Engine +=========================== +Support for BerkeleyDB has been removed in 5.1, and consequently both the +have-bdb and skip-bdb configuration options will cause the server to fail. +Removing the options from /etc/mysql/my.cnf will fix this problem. + +* FURTHER NOTES ON REPLICATION +=============================== +If the MySQL server is acting as a replication slave, you should not +set --tmpdir to point to a directory on a memory-based filesystem or to +a directory that is cleared when the server host restarts. A replication +slave needs some of its temporary files to survive a machine restart so +that it can replicate temporary tables or LOAD DATA INFILE operations. If +files in the temporary file directory are lost when the server restarts, +replication fails. diff -Nru mariadb-5.5-5.5.44/debian/dist/Debian/rules mariadb-5.5-5.5.46/debian/dist/Debian/rules --- mariadb-5.5-5.5.44/debian/dist/Debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Debian/rules 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,290 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export DEB_BUILD_HARDENING=1 + +PACKAGE=mariadb-5.5 + +include /usr/share/dpatch/dpatch.make + +TMP=$(CURDIR)/debian/tmp/ + +ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' ) + +DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) +DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-) +DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') +DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p') + +DISTRIBUTION = $(shell lsb_release -i -s) +RELEASE = $(shell lsb_release -r -s | sed 's/\..*//' ) + +MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi) +ifeq (${MAKE_J}, -j0) + MAKE_J = -j1 +endif + +MAKE_TEST_TARGET=test-force +ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),) +# make test-bt is the testsuite run by the MySQL build team +# before a release, but it is long + MAKE_TEST_TARGET=test-bt +endif + +USE_ASSEMBLER=--enable-assembler + +ifneq (,$(filter $(ARCH), amd64 i386 ia64 s390)) + TESTSUITE_FAIL_CMD=exit 1 +else + TESTSUITE_FAIL_CMD=true +endif + +BUILDDIR = builddir +builddir = $(BUILDDIR) + +# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf +# so it is disabled by default although, according to MySQL, it brings >10% +# performance gain if enabled. See #299382. +ifeq ($(STATIC_MYSQLD), 1) + USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static +endif + +configure: patch configure-stamp +configure-stamp: + @echo "RULES.$@" + dh_testdir + +ifneq ($(ARCH_OS),hurd) + if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi +endif + + ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ + sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \ + CC=$${MYSQL_BUILD_CC:-gcc} \ + CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized $$(case `lsb_release -sc` in (lenny) echo -DWORKAROUND_GCC_4_3_2_BUG ;; esac)"} \ + CXX=$${MYSQL_BUILD_CXX:-g++} \ + CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ + cmake .. \ + -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ + -DBUILD_CONFIG=mysql_release \ + -DCOMPILATION_COMMENT="mariadb.org binary distribution" \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DDEB=debian' + + touch $@ + +build: build-stamp + +build-stamp: configure + @echo "RULES.$@" + dh_testdir + + cd $(builddir) && $(MAKE) $(MAKE_J) $(AM_EXTRA_MAKEFLAGS) + +ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),) + # Don't know why the following is necessary... + cp unittest/unit.pl $(builddir)/unittest/ + cp -r mysql-test/* $(builddir)/mysql-test/ + cp -r sql/share/* $(builddir)/sql/share/ + cp -r scripts/*sql $(builddir)/scripts/ + if [ ! -f testsuite-stamp ] ; then \ + cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \ + fi +endif + + touch testsuite-stamp + + touch build-stamp + +clean: clean-patched unpatch + rm -rf debian/patched +clean-patched: + @echo "RULES.clean-patched" + dh_testdir + dh_testroot + rm -f configure-stamp* + rm -f build-stamp* + rm -f testsuite-stamp + # + [ ! -f Makefile ] || $(MAKE) clean + [ ! -d mysql-test/var ] || rm -rf mysql-test/var + # + rm -rf $(BUILDDIR) + + debconf-updatepo + dh_clean -v + + +install: build + @echo "RULES.$@" + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # some self written manpages which hopefully + # gets overwritten sooner or later with upstreams + mkdir -p $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/usr/share/man/man8/ + cp debian/additions/*.1 $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/etc/mysql/conf.d/ + cp debian/additions/mysqld_safe_syslog.cnf $(TMP)/etc/mysql/conf.d/ + + # make install (trailing slash needed for innobase) + cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/ + # + # After installing, remove rpath to make lintian happy. + set +e; \ + find ./debian/tmp/ -type f -print0 \ + | xargs -0 --no-run-if-empty chrpath -k 2>/dev/null \ + | fgrep RPATH= \ + | cut -d: -f 1 \ + | xargs --no-run-if-empty chrpath -d; \ + set -e + + # libmysqlclient-dev: forgotten header file since 3.23.25? + cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ + cp include/my_dir.h $(TMP)/usr/include/mysql/ + + # mysql-common: We provide our own version of this package for + # completeness, but we can use an existing version; mariadb-specic + # stuff is in mariadb-common + install -d $(TMP)/etc/mysql + install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf + + # mariadb-common: MariaDB-specific config stuff. + install -d $(TMP)/etc/mysql/conf.d + install -m 0644 debian/additions/mariadb.cnf $(TMP)/etc/mysql/conf.d/mariadb.cnf + + # mariadb-client + install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/ + install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/ + install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/ + + # mariadb-server + install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe + mkdir -p $(TMP)/usr/share/doc/mariadb-server-5.5/examples + # We have a sane my.cnf, cruft not needed (remove my-*.cnf and config-*.cnf) + # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-server-5.5/examples/ + rm -vf $(TMP)/usr/share/mysql/my-*.cnf \ + $(TMP)/usr/share/mysql/config-*.cnf \ + $(TMP)/usr/share/mysql/mi_test_all* \ + $(TMP)/usr/share/mysql/mysql-log-rotate \ + $(TMP)/usr/share/mysql/mysql.server \ + $(TMP)/usr/share/mysql/binary-configure + nm -n $(BUILDDIR)/sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mariadb-server-5.5/mysqld.sym.gz + install -m 0755 debian/additions/echo_stderr $(TMP)/usr/share/mysql/ + install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/ + install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/ + + install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-server-5.5/INFO_SRC + install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-5.5/INFO_BIN + + # mariadb-test + mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql + + # lintian overrides + mkdir -p $(TMP)/usr/share/lintian/overrides/ + cp debian/mysql-common.lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-common + cp debian/mariadb-server-5.5.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-server-5.5 + cp debian/mariadb-client-5.5.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-client-5.5 + + # For 5.0 -> 5.5 transition + d=$(TMP)/usr/share/mysql-common/internal-use-only/; \ + mkdir -p $$d; \ + cp debian/mariadb-server-5.5.mysql.init $$d/_etc_init.d_mysql; \ + cp debian/mariadb-server-5.5.mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \ + cp debian/additions/debian-start $$d/_etc_mysql_debian-start; + + autorm=debian/autorm-file; \ + rm -f $$autorm; \ + ignore=''; \ + for p in $$MARIADB_OPTIONAL_DEBS; do \ + p=mariadb-$$p-5.5; \ + dh_movefiles --package=$$p || echo "../$$p*.deb" >> $$autorm; \ + ignore="$$ignore --no-package=$$p"; \ + done; \ + sh -c "dh_movefiles $$ignore" + +# Build architecture-independent files here. +binary-indep: build install + @echo "RULES.binary-indep" + dh_testdir -i + dh_testroot -i + dh_installdebconf -i + dh_installdocs -i + dh_installexamples -i + dh_installmenu -i + dh_installlogrotate -i + dh_installinit -i + dh_installcron -i + dh_installman -i + dh_installinfo -i + dh_installlogcheck -i + dh_installchangelogs -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_perl -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + @echo "RULES.binary-arch" + dh_testdir + dh_testroot + + dh_installdebconf -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_installlogrotate -a --name mysql-server + # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets + # started which might depend on a running database server. + dh_installinit -a --name=mysql -- defaults 19 21 + dh_installcron -a --name mysql-server + dh_installman -a + dh_installinfo -a + dh_installlogcheck -a + dh_installchangelogs -a + dh_strip -a + dh_link -a # .so muss nach .so.1.2.3 installier werden! + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a + dh_makeshlibs -plibmariadbclient18 -V'libmariadbclient18 (>= 5.5.1-1)' + dh_installdeb -a + dh_perl -a + dh_shlibdeps -a -l debian/libmariadbclient18/usr/lib -L libmariadbclient18 + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch + +get-orig-source: + @wget -nv -T10 -t3 \ + -O /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz \ + http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-$(DEB_UPSTREAM_VERSION_MAJOR_MINOR)/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @tar xfz /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz -C /tmp + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/Docs + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/debian + @mv /tmp/mysql-$(DEB_UPSTREAM_VERSION) /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @cd /tmp ; tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @rm -f /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @rm -rf /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + +.PHONY: clean clean-patched configure build binary binary-indep binary-arch install patch unpatch + +# vim: ts=8 diff -Nru mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.dirs mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.dirs --- mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.dirs 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.dirs 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,10 @@ +etc/init.d +etc/logrotate.d +etc/mysql/conf.d +usr/bin +usr/sbin +usr/share/man/man8 +usr/share/mysql +usr/share/doc/mariadb-server-5.5 +var/run/mysqld +var/lib/mysql-upgrade diff -Nru mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.postinst mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.postinst --- mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.postinst 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.postinst 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,284 @@ +#!/bin/bash -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + +# This command can be used as pipe to syslog. With "-s" it also logs to stderr. +ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i" +# This will make an error in a logged command immediately apparent by aborting +# the install, rather than failing silently and leaving a broken install. +set -o pipefail + +invoke() { + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam" + +test_mysql_access() { + mysql --no-defaults -u root -h localhost /dev/null 2>&1 +} + +# call with $1 = "online" to connect to the server, otherwise it bootstraps +set_mysql_rootpw() { + # forget we ever saw the password. don't use reset to keep the seen status + db_set mysql-server/root_password "" + db_set mysql-server/root_password_again "" + + tfile=`mktemp` + if [ ! -f "$tfile" ]; then + return 1 + fi + + # this avoids us having to call "test" or "[" on $rootpw + cat << EOF > $tfile +USE mysql; +UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root'; +FLUSH PRIVILEGES; +EOF + if grep -q 'PASSWORD("")' $tfile; then + retval=0 + elif [ "$1" = "online" ]; then + mysql --no-defaults -u root -h localhost <$tfile >/dev/null + retval=$? + else + $MYSQL_BOOTSTRAP <$tfile + retval=$? + fi + rm -f $tfile + return $retval +} + +# This is necessary because mysql_install_db removes the pid file in /var/run +# and because changed configuration options should take effect immediately. +# In case the server wasn't running at all it should be ok if the stop +# script fails. I can't tell at this point because of the cleaned /var/run. +set +e; invoke stop; set -e + +case "$1" in + configure) + mysql_datadir=/usr/share/mysql + mysql_statedir=/var/lib/mysql + mysql_rundir=/var/run/mysqld + mysql_logdir=/var/log + mysql_cfgdir=/etc/mysql + mysql_newlogdir=/var/log/mysql + mysql_upgradedir=/var/lib/mysql-upgrade + + # first things first, if the following symlink exists, it is a preserved + # copy the old data dir from a mysql upgrade that would have otherwise + # been replaced by an empty mysql dir. this should restore it. + for dir in DATADIR LOGDIR; do + if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi + savelink="$mysql_upgradedir/$dir.link" + if [ -L "$savelink" ]; then + # If the targetdir was a symlink before we upgraded it is supposed + # to be either still be present or not existing anymore now. + if [ -L "$targetdir" ]; then + rm "$savelink" + elif [ ! -d "$targetdir" ]; then + mv "$savelink" "$targetdir" + else + # this should never even happen, but just in case... + mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX` + echo "this is very strange! see $mysql_tmp/README..." >&2 + mv "$targetdir" "$mysql_tmp" + cat << EOF > "$mysql_tmp/README" + +if you're reading this, it's most likely because you had replaced /var/lib/mysql +with a symlink, then upgraded to a new version of mysql, and then dpkg +removed your symlink (see #182747 and others). the mysql packages noticed +that this happened, and as a workaround have restored it. however, because +/var/lib/mysql seems to have been re-created in the meantime, and because +we don't want to rm -rf something we don't know as much about, we're going +to leave this unexpected directory here. if your database looks normal, +and this is not a symlink to your database, you should be able to blow +this all away. + +EOF + fi + fi + rmdir $mysql_upgradedir 2>/dev/null || true + done + + # Ensure the existence and right permissions for the database and + # log files. + if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi + if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi + if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi + # When creating an ext3 jounal on an already mounted filesystem like e.g. + # /var/lib/mysql, you get a .journal file that is not modifyable by chown. + # The mysql_datadir must not be writable by the mysql user under any + # circumstances as it contains scripts that are executed by root. + set +e + chown -R 0:0 $mysql_datadir + chown -R mysql $mysql_statedir + chown -R mysql $mysql_rundir + chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir; + for i in log err; do + touch $mysql_logdir/mysql.$i + chown mysql:adm $mysql_logdir/mysql.$i + chmod 0640 $mysql_logdir/mysql.$i + done + set -e + + # This is important to avoid dataloss when there is a removed + # mysql-server version from Woody lying around which used the same + # data directory and then somewhen gets purged by the admin. + db_set mysql-server/postrm_remove_database false || true + + # To avoid downgrades. + touch $mysql_statedir/debian-5.5.flag + + # initiate databases. Output is not allowed by debconf :-( + # This will fail if we are upgrading an existing database; in this case + # mysql_upgrade, called from the /etc/init.d/mysql start script, will + # handle things. + # Debian: beware of the bashisms... + # Debian: can safely run on upgrades with existing databases + set +e + /bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER + set -e + + ## On every reconfiguration the maintenance user is recreated. + # + # - It is easier to regenerate the password every time but as people + # use fancy rsync scripts and file alteration monitors, the existing + # password is used and existing files not touched. + # - The mysqld statement is like that in mysql_install_db because the + # server is not already running. This has some implications: + # - The amount of newlines and semicolons in the query is important! + # - GRANT is not possible with --skip-grant-tables and "INSERT + # (user,host..) VALUES" is not --ansi compliant + # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. + # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv + # may not be present as old Woody 3.23 databases did not have it and the + # admin might not already have run mysql_upgrade which adds them. + # As the binlog cron scripts to need at least the Super_priv, I do first + # the old query which always succeeds and then the new which may or may not. + + # recreate the credentials file if not present or without mysql_upgrade stanza + dc=$mysql_cfgdir/debian.cnf; + if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then + pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" + else + pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; + if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi + cat /dev/null > $dc + echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc + echo "[client]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "[mysql_upgrade]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "basedir = /usr" >>$dc + fi + # If this dir chmod go+w then the admin did it. But this file should not. + chown 0:0 $dc + chmod 0600 $dc + + # update privilege tables + password_column_fix_query=`/bin/echo -e \ + "USE mysql\n" \ + "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL"`; + replace_query=`/bin/echo -e \ + "USE mysql\n" \ + "SET sql_mode='';\n" \ + "REPLACE INTO user SET " \ + " host='localhost', user='debian-sys-maint', password=password('$pass'), " \ + " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ + " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ + " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ + " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ + " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ + " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ + " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ + " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\ + " ssl_cipher='', x509_issuer='', x509_subject='';"`; + # Engines supported by etch should be installed per default. The query sequence is supposed + # to be aborted if the CREATE TABLE fails due to an already existent table in which case the + # admin might already have chosen to remove one or more plugins. Newlines are necessary. + install_plugins=`/bin/echo -e \ + "USE mysql;\n" \ + "CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" ` + + # Upgrade password column format before the root password gets set. + echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + + db_get mysql-server/root_password && rootpw="$RET" + if ! set_mysql_rootpw; then + password_error="yes" + fi + + set +e + echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + echo "$install_plugins" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + set -e + + # If there is a real AppArmor profile, we reload it. + # If the default empty profile is installed, then we remove any old + # profile that may be loaded. + # This allows upgrade from old versions (that have an apparmor profile + # on by default) to work both to disable a default profile, and to keep + # any profile installed and maintained by users themselves. + profile="/etc/apparmor.d/usr.sbin.mysqld" + if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then + if grep -q /usr/sbin/mysqld "$profile" 2>/dev/null ; then + apparmor_parser -r "$profile" || true + else + echo "/usr/sbin/mysqld { }" | apparmor_parser --remove 2>/dev/null || true + fi + fi + ;; + + abort-upgrade|abort-remove|abort-configure) + ;; + + *) + echo "postinst called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# here we check to see if we can connect as root without a password +# this should catch upgrades from previous versions where the root +# password wasn't set. if there is a password, or if the connection +# fails for any other reason, nothing happens. +if [ "$1" = "configure" ]; then + if test_mysql_access; then + db_input medium mysql-server/root_password || true + db_go + db_get mysql-server/root_password && rootpw="$RET" + + if ! set_mysql_rootpw "online"; then + password_error="yes" + fi + fi + + if [ "$password_error" = "yes" ]; then + db_input high mysql-server/error_setting_password || true + db_go + fi + +fi + +db_stop # in case invoke failes + +#DEBHELPER# + +exit 0 diff -Nru mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.postrm mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.postrm --- mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.postrm 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.postrm 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,86 @@ +#!/bin/bash -e + +# It is possible that Debconf has already been removed, too. +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! +stop_server() { + set +e + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql stop + else + /etc/init.d/mysql stop + fi + errno=$? + set -e + + if [ "$?" != 0 ]; then + echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + exit 1 + fi +} + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then + stop_server + sleep 2 + fi + ;; + *) + echo "postrm called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# +# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) +# - Remove the mysql user only after all his owned files are purged. +# +if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then + # we remove the mysql user only after all his owned files are purged + rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} + rm -rf /var/log/mysql + + db_input high mysql-server-5.1/postrm_remove_databases || true + db_go || true + db_get mysql-server-5.1/postrm_remove_databases || true + if [ "$RET" = "true" ]; then + # never remove the debian.cnf when the databases are still existing + # else we ran into big trouble on the next install! + rm -f /etc/mysql/debian.cnf + rm -rf /var/lib/mysql + rm -rf /var/run/mysqld + userdel mysql || true + fi + + # (normally) Automatically added by dh_installinit + if [ "$1" = "purge" ] ; then + update-rc.d mysql remove >/dev/null || exit 0 + fi + # (normally) End automatically added section +fi + +# (normally) Automatically added by dh_installdebconf +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +# (normally) End automatically added section + +if [ "$1" = "purge" ] ; then + rm -f /etc/apparmor.d/force-complain/usr.sbin.mysqld >/dev/null 2>&1 || true +fi +# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-5.1 is installed + +exit 0 diff -Nru mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian --- mariadb-5.5-5.5.44/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Ubuntu/mariadb-server-5.5.README.Debian 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,109 @@ +* MYSQL WON'T START OR STOP?: +============================= +You may never ever delete the special mysql user "debian-sys-maint". This +user together with the credentials in /etc/mysql/debian.cnf are used by the +init scripts to stop the server as they would require knowledge of the mysql +root users password else. +So in most of the times you can fix the situation by making sure that the +debian.cnf file contains the right password, e.g. by setting a new one +(remember to do a "flush privileges" then). + +* WHAT TO DO AFTER UPGRADES: +============================ +The privilege tables are automatically updated so all there is left is read +the changelogs on dev.mysql.com to see if any changes affect custom apps. + +* WHAT TO DO AFTER INSTALLATION: +================================ +The MySQL manual describes certain steps to do at this stage in a separate +chapter. They are not necessary as the Debian packages does them +automatically. + +The only thing that is left over for the admin is + - setting the passwords + - creating new users and databases + - read the rest of this text + +* DOWNGRADING TO 4.0 or 4.1: +============================ +Unsupported. Period. +But if you do and get problems or make interesting experiences, mail me, it +might help others. +Ok, if you really want, I would recommend to "mysqldump --opt" all tables, +then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be +carefully, though, with the "mysql" table, you might not simply overwrite that +one as the password for the mysql "debian-sys-maint" user is stored in +/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if +it's alive. + +* SOME APPLICATION CAN NO LONGER CONNECT: +========================================= +This application is probably linked against libmysqlclient12 or below and +somebody has created a mysql user with new-style passwords. +The old_passwords=1 option in /etc/mysql/my.cnf might help. If not the +application that inserted the user has to be changed or the application that +tries to connect updated to libmysqlclient14 or -15. + +* NETWORKING: +============= +For security reasons, the Debian package has enabled networking only on the +loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with +"netstat -tlnp" where it is listening. If your connection is aborted +immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read +hosts_access(5). + +* WHERE IS THE DOCUMENTATION?: +============================== +Unfortunately due to licensing restrictions, debian currently not able +to provide the mysql-doc package in any format. For the most up to date +documentation, please go to http://dev.mysql.com/doc. + +* PASSWORDS: +============ +It is strongly recommended to set a password for the mysql root user (which + /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'" + /usr/bin/mysql -u root -e "flush privileges" +If you already had a password set add "-p" before "-u" to the lines above. + + +If you are tired to type the password in every time or want to automate your +scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600 +(-rw------- username username .my.cnf) to ensure that nobody else can read +it. Every other configuration parameter can be stored there, too. You will +find an example below and more information in the MySQL manual in +/usr/share/doc/mysql-doc or www.mysql.com. + +ATTENTION: It is necessary, that a .my.cnf from root always contains a "user" +line wherever there is a "password" line, else, the Debian maintenance +scripts, that use /etc/mysql/debian.cnf, will use the username +"debian-sys-maint" but the password that is in root's .my.cnf. Also note, +that every change you make in the /root/.my.cnf will affect the mysql cron +script, too. + + # an example of $HOME/.my.cnf + [client] + user = your-mysql-username + password = enter-your-good-new-password-here + +* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE: +========================================= +If you ever run out of rows in a table there is the possibility of building +the package with "-DBIG_ROWS" which, according to a MySQL employee on +packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32 +rows) but also to an approx. 5% performance loss. + +* BerkeleyDB Storage Engine +=========================== +Support for BerkeleyDB has been removed in 5.1, and consequently both the +have-bdb and skip-bdb configuration options will cause the server to fail. +Removing the options from /etc/mysql/my.cnf will fix this problem. + +* FURTHER NOTES ON REPLICATION +=============================== +If the MySQL server is acting as a replication slave, you should not +set --tmpdir to point to a directory on a memory-based filesystem or to +a directory that is cleared when the server host restarts. A replication +slave needs some of its temporary files to survive a machine restart so +that it can replicate temporary tables or LOAD DATA INFILE operations. If +files in the temporary file directory are lost when the server restarts, +replication fails. diff -Nru mariadb-5.5-5.5.44/debian/dist/Ubuntu/rules mariadb-5.5-5.5.46/debian/dist/Ubuntu/rules --- mariadb-5.5-5.5.44/debian/dist/Ubuntu/rules 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/dist/Ubuntu/rules 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,295 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export DEB_BUILD_HARDENING=1 + +PACKAGE=mariadb-5.5 + +include /usr/share/dpatch/dpatch.make + +TMP=$(CURDIR)/debian/tmp/ + +ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' ) + +DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) +DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-) +DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') +DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p') + +DISTRIBUTION = $(shell lsb_release -i -s) +RELEASE = $(shell lsb_release -r -s) + +MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi) +ifeq (${MAKE_J}, -j0) + MAKE_J = -j1 +endif + +MAKE_TEST_TARGET=test-force +ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),) +# make test-bt is the testsuite run by the MySQL build team +# before a release, but it is long + MAKE_TEST_TARGET=test-bt +endif + +USE_ASSEMBLER=--enable-assembler + +ifneq (,$(filter $(ARCH), amd64 i386 ia64 s390)) + TESTSUITE_FAIL_CMD=exit 1 +else + TESTSUITE_FAIL_CMD=true +endif + +BUILDDIR = builddir +builddir = $(BUILDDIR) + +# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf +# so it is disabled by default although, according to MySQL, it brings >10% +# performance gain if enabled. See #299382. +ifeq ($(STATIC_MYSQLD), 1) + USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static +endif + +configure: patch configure-stamp +configure-stamp: + @echo "RULES.$@" + dh_testdir + +ifneq ($(ARCH_OS),hurd) + if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi +endif + + ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ + sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \ + CC=$${MYSQL_BUILD_CC:-gcc} \ + CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ + CXX=$${MYSQL_BUILD_CXX:-g++} \ + CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wno-uninitialized"} \ + cmake .. \ + -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ + -DBUILD_CONFIG=mysql_release \ + -DCOMPILATION_COMMENT="mariadb.org binary distribution" \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DDEB=ubuntu' + + touch $@ + +build: build-stamp + +build-stamp: configure + @echo "RULES.$@" + dh_testdir + + cd $(builddir) && $(MAKE) $(MAKE_J) $(AM_EXTRA_MAKEFLAGS) + +ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),) + # Don't know why the following is necessary... + cp unittest/unit.pl $(builddir)/unittest/ + cp -r mysql-test/* $(builddir)/mysql-test/ + cp -r sql/share/* $(builddir)/sql/share/ + cp -r scripts/*sql $(builddir)/scripts/ + if [ ! -f testsuite-stamp ] ; then \ + cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \ + fi +endif + + touch testsuite-stamp + + touch build-stamp + +clean: clean-patched unpatch + rm -rf debian/patched +clean-patched: + @echo "RULES.clean-patched" + dh_testdir + dh_testroot + rm -f configure-stamp* + rm -f build-stamp* + rm -f testsuite-stamp + # + [ ! -f Makefile ] || $(MAKE) clean + [ ! -d mysql-test/var ] || rm -rf mysql-test/var + # + rm -rf $(BUILDDIR) + + debconf-updatepo + dh_clean -v + + +install: build + @echo "RULES.$@" + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # some self written manpages which hopefully + # gets overwritten sooner or later with upstreams + mkdir -p $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/usr/share/man/man8/ + cp debian/additions/*.1 $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/etc/mysql/conf.d/ + cp debian/additions/mysqld_safe_syslog.cnf $(TMP)/etc/mysql/conf.d/ + + # make install (trailing slash needed for innobase) + cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/ + # + # After installing, remove rpath to make lintian happy. + set +e; \ + find ./debian/tmp/ -type f -print0 \ + | xargs -0 --no-run-if-empty chrpath -k 2>/dev/null \ + | fgrep RPATH= \ + | cut -d: -f 1 \ + | xargs --no-run-if-empty chrpath -d; \ + set -e + + # libmysqlclient-dev: forgotten header file since 3.23.25? + cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ + cp include/my_dir.h $(TMP)/usr/include/mysql/ + + # mysql-common: We provide our own version of this package for + # completeness, but we can use an existing version; mariadb-specic + # stuff is in mariadb-common + install -d $(TMP)/etc/mysql + install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf + + # mariadb-common: MariaDB-specific config stuff. + install -d $(TMP)/etc/mysql/conf.d + install -m 0644 debian/additions/mariadb.cnf $(TMP)/etc/mysql/conf.d/mariadb.cnf + + # mariadb-client + install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/ + install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/ + install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/ + + # mariadb-server + install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe + mkdir -p $(TMP)/usr/share/doc/mariadb-server-5.5/examples + # We have a sane my.cnf, cruft not needed (remove my-*.cnf and config-*.cnf) + # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-server-5.5/examples/ + rm -vf $(TMP)/usr/share/mysql/my-*.cnf \ + $(TMP)/usr/share/mysql/config-*.cnf \ + $(TMP)/usr/share/mysql/mi_test_all* \ + $(TMP)/usr/share/mysql/mysql-log-rotate \ + $(TMP)/usr/share/mysql/mysql.server \ + $(TMP)/usr/share/mysql/binary-configure + nm -n $(BUILDDIR)/sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mariadb-server-5.5/mysqld.sym.gz + install -m 0755 debian/additions/echo_stderr $(TMP)/usr/share/mysql/ + install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/ + install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/ + + install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-server-5.5/INFO_SRC + install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-5.5/INFO_BIN + + # mariadb-test + mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql + + # lintian overrides + mkdir -p $(TMP)/usr/share/lintian/overrides/ + cp debian/mysql-common.lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-common + cp debian/mariadb-server-5.5.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-server-5.5 + cp debian/mariadb-client-5.5.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-client-5.5 + + # For 5.0 -> 5.5 transition + d=$(TMP)/usr/share/mysql-common/internal-use-only/; \ + mkdir -p $$d; \ + cp debian/mariadb-server-5.5.mysql.init $$d/_etc_init.d_mysql; \ + cp debian/mariadb-server-5.5.mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \ + cp debian/additions/debian-start $$d/_etc_mysql_debian-start; + + # install AppArmor profile + install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld + # install Apport hook + install -D -m 644 debian/mariadb-server-5.5.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-5.5.py + + autorm=debian/autorm-file; \ + rm -f $$autorm; \ + ignore=''; \ + for p in $$MARIADB_OPTIONAL_DEBS; do \ + p=mariadb-$$p-5.5; \ + dh_movefiles --package=$$p || echo "../$$p*.deb" >> $$autorm; \ + ignore="$$ignore --no-package=$$p"; \ + done; \ + sh -c "dh_movefiles $$ignore" + +# Build architecture-independent files here. +binary-indep: build install + @echo "RULES.binary-indep" + dh_testdir -i + dh_testroot -i + dh_installdebconf -i + dh_installdocs -i + dh_installexamples -i + dh_installmenu -i + dh_installlogrotate -i + dh_installinit -i + dh_installcron -i + dh_installman -i + dh_installinfo -i + dh_installlogcheck -i + dh_installchangelogs -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_perl -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + @echo "RULES.binary-arch" + dh_testdir + dh_testroot + + dh_installdebconf -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_installlogrotate -a --name mysql-server + # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets + # started which might depend on a running database server. + dh_installinit -a --name=mysql -- defaults 19 21 + dh_installcron -a --name mysql-server + dh_installman -a + dh_installinfo -a + dh_installlogcheck -a + dh_installchangelogs -a + dh_strip -a + dh_link -a # .so muss nach .so.1.2.3 installier werden! + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a + dh_makeshlibs -plibmariadbclient18 -V'libmariadbclient18 (>= 5.5.1-1)' + dh_installdeb -a + dh_perl -a + dh_shlibdeps -a -l debian/libmariadbclient18/usr/lib -L libmariadbclient18 + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch + +get-orig-source: + @wget -nv -T10 -t3 \ + -O /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz \ + http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-$(DEB_UPSTREAM_VERSION_MAJOR_MINOR)/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @tar xfz /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz -C /tmp + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/Docs + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/debian + @mv /tmp/mysql-$(DEB_UPSTREAM_VERSION) /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @cd /tmp ; tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @rm -f /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @rm -rf /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + +.PHONY: clean clean-patched configure build binary binary-indep binary-arch install patch unpatch + +# vim: ts=8 diff -Nru mariadb-5.5-5.5.44/debian/libmariadbclient18.files mariadb-5.5-5.5.46/debian/libmariadbclient18.files --- mariadb-5.5-5.5.44/debian/libmariadbclient18.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/libmariadbclient18.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,3 @@ +usr/lib/libmysqlclient*.so.* +usr/lib/mysql/plugin/mysql_clear_password.so +usr/lib/mysql/plugin/dialog.so diff -Nru mariadb-5.5-5.5.44/debian/libmariadbclient-dev.files mariadb-5.5-5.5.46/debian/libmariadbclient-dev.files --- mariadb-5.5-5.5.44/debian/libmariadbclient-dev.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/libmariadbclient-dev.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,7 @@ +usr/bin/mysql_config +usr/include/mysql +usr/lib/libmysqlclient.a +usr/lib/libmysqlclient_r.a +usr/lib/libmysqlservices.a +usr/share/aclocal/mysql.m4 +usr/share/man/man1/mysql_config.1 diff -Nru mariadb-5.5-5.5.44/debian/libmariadbd-dev.files mariadb-5.5-5.5.46/debian/libmariadbd-dev.files --- mariadb-5.5-5.5.44/debian/libmariadbd-dev.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/libmariadbd-dev.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,2 @@ +usr/lib/mysql/*.a +usr/lib/mysql/*.la diff -Nru mariadb-5.5-5.5.44/debian/mariadb-client-5.5.files mariadb-5.5-5.5.46/debian/mariadb-client-5.5.files --- mariadb-5.5-5.5.44/debian/mariadb-client-5.5.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-client-5.5.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,28 @@ +usr/bin/innochecksum +usr/bin/innotop +usr/bin/mysqlaccess +usr/bin/mysqladmin +usr/bin/mysqlbug +usr/bin/mysqldump +usr/bin/mysqldumpslow +usr/bin/mysql_find_rows +usr/bin/mysql_fix_extensions +usr/bin/mysqlimport +usr/bin/mysqlreport +usr/bin/mysqlshow +usr/bin/mysqlslap +usr/bin/mysql_waitpid +usr/share/lintian/overrides/mariadb-client-5.5 +usr/share/man/man1/innotop.1 +usr/share/man/man1/mysqlaccess.1 +usr/share/man/man1/mysqladmin.1 +usr/share/man/man1/mysqlbug.1 +usr/share/man/man1/mysqldump.1 +usr/share/man/man1/mysqldumpslow.1 +usr/share/man/man1/mysql_find_rows.1 +usr/share/man/man1/mysql_fix_extensions.1 +usr/share/man/man1/mysqlimport.1 +usr/share/man/man1/mysqlreport.1 +usr/share/man/man1/mysqlshow.1 +usr/share/man/man1/mysqlslap.1 +usr/share/man/man1/mysql_waitpid.1 diff -Nru mariadb-5.5-5.5.44/debian/mariadb-client-core-5.5.files mariadb-5.5-5.5.46/debian/mariadb-client-core-5.5.files --- mariadb-5.5-5.5.44/debian/mariadb-client-core-5.5.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-client-core-5.5.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,4 @@ +usr/bin/mysql +usr/bin/mysqlcheck +usr/share/man/man1/mysql.1 +usr/share/man/man1/mysqlcheck.1 diff -Nru mariadb-5.5-5.5.44/debian/mariadb-common.files mariadb-5.5-5.5.46/debian/mariadb-common.files --- mariadb-5.5-5.5.44/debian/mariadb-common.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-common.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1 @@ +etc/mysql/conf.d/mariadb.cnf diff -Nru mariadb-5.5-5.5.44/debian/mariadb-common.postrm mariadb-5.5-5.5.46/debian/mariadb-common.postrm --- mariadb-5.5-5.5.44/debian/mariadb-common.postrm 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-common.postrm 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,8 @@ +#!/bin/bash -e + +if [ "$1" = "purge" ]; then + rmdir /etc/mysql/conf.d 2>/dev/null || true + rmdir /etc/mysql 2>/dev/null || true +fi + +#DEBHELPER# diff -Nru mariadb-5.5-5.5.44/debian/mariadb-server-5.5.NEWS mariadb-5.5-5.5.46/debian/mariadb-server-5.5.NEWS --- mariadb-5.5-5.5.44/debian/mariadb-server-5.5.NEWS 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-server-5.5.NEWS 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,34 @@ +mysql-dfsg-5.1 (5.1.38-1) unstable; urgency=low + + * Please read http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-5-0.html + * Make sure to do a REPAIR TABLE on all tables that use UTF-8 and have a + FULLTEXT index. + + -- Christian Hammers Sat, 4 Jul 2009 02:31:21 +0200 + +mysql-dfsg-5.0 (5.1.14beta-2) unstable; urgency=low + + * The BerkeleyDB Storage Engine is no longer supported. If the options + have-bdb or skip-bdb are found, MySQL will not start. If you have BDB + tables, you should change them to use another storage engine before + upgrading to 5.1. + + -- Monty Taylor Thu, 18 Jan 2007 12:28:21 -0800 + +mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low + + * Binary logging is now disabled by default. If you really need it (e.g. on + a replication master), remove the comment from the log_bin line in my.cnf. + + -- Norbert Tretkowski Sat, 10 Nov 2007 16:26:35 +0100 + +mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=low + + * Rotation of the binary logs is now configured in /etc/mysql/my.cnf with + "expire-logs-days" which defaults to 20 days. The old file + /etc/mysql/debian-log-rotate.conf should be removed together with + /etc/cron.daily/mysql-server after this value has been adjusted. Note that + the old variable defined the number of files whereas the new one defines + a time span in days. + + -- Christian Hammers Tue, 24 Jan 2006 22:18:21 +0100 diff -Nru mariadb-5.5-5.5.44/debian/mariadb-server-core-5.5.files mariadb-5.5-5.5.46/debian/mariadb-server-core-5.5.files --- mariadb-5.5-5.5.44/debian/mariadb-server-core-5.5.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-server-core-5.5.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,26 @@ +usr/sbin/mysqld +usr/share/man/man8/mysqld.8 +usr/share/mysql/charsets +usr/share/mysql/czech +usr/share/mysql/danish +usr/share/mysql/dutch +usr/share/mysql/english +usr/share/mysql/estonian +usr/share/mysql/french +usr/share/mysql/german +usr/share/mysql/greek +usr/share/mysql/hungarian +usr/share/mysql/italian +usr/share/mysql/japanese +usr/share/mysql/korean +usr/share/mysql/norwegian +usr/share/mysql/norwegian-ny +usr/share/mysql/polish +usr/share/mysql/portuguese +usr/share/mysql/romanian +usr/share/mysql/russian +usr/share/mysql/serbian +usr/share/mysql/slovak +usr/share/mysql/spanish +usr/share/mysql/swedish +usr/share/mysql/ukrainian diff -Nru mariadb-5.5-5.5.44/debian/mariadb-test-5.5.files mariadb-5.5-5.5.46/debian/mariadb-test-5.5.files --- mariadb-5.5-5.5.44/debian/mariadb-test-5.5.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mariadb-test-5.5.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,19 @@ +usr/lib/mysql/plugin/dialog_examples.so +usr/lib/mysql/plugin/auth_test_plugin.so +usr/lib/mysql/plugin/qa_auth_interface.so +usr/lib/mysql/plugin/qa_auth_server.so +usr/lib/mysql/plugin/qa_auth_client.so +usr/lib/mysql/plugin/auth_0x0100.so +usr/lib/mysql/plugin/mypluglib.so +usr/lib/mysql/plugin/daemon_example.ini +usr/lib/mysql/plugin/libdaemon_example.so +usr/lib/mysql/plugin/adt_null.so +usr/bin/mysql_client_test +usr/bin/mysql_client_test_embedded +usr/bin/mysqltest_embedded +usr/share/man/man1/mysql_client_test.1 +usr/share/man/man1/mysql_client_test_embedded.1 +usr/bin/mysqltest +usr/share/man/man1/mysqltest.1 +usr/share/man/man1/mysqltest_embedded.1 +usr/share/mysql/mysql-test diff -Nru mariadb-5.5-5.5.44/debian/mysql-common.dirs mariadb-5.5-5.5.46/debian/mysql-common.dirs --- mariadb-5.5-5.5.44/debian/mysql-common.dirs 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mysql-common.dirs 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1 @@ +etc/mysql/conf.d/ diff -Nru mariadb-5.5-5.5.44/debian/mysql-common.files mariadb-5.5-5.5.46/debian/mysql-common.files --- mariadb-5.5-5.5.44/debian/mysql-common.files 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mysql-common.files 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,3 @@ +etc/mysql/my.cnf +usr/share/mysql-common/internal-use-only +usr/share/lintian/overrides/mysql-common diff -Nru mariadb-5.5-5.5.44/debian/mysql-common.lintian-overrides mariadb-5.5-5.5.46/debian/mysql-common.lintian-overrides --- mariadb-5.5-5.5.44/debian/mysql-common.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mysql-common.lintian-overrides 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,2 @@ +script-not-executable ./usr/share/mysql-common/internal-use-only/_etc_init.d_mysql +script-not-executable ./usr/share/mysql-common/internal-use-only/_etc_mysql_debian-start diff -Nru mariadb-5.5-5.5.44/debian/mysql-common.postrm mariadb-5.5-5.5.46/debian/mysql-common.postrm --- mariadb-5.5-5.5.44/debian/mysql-common.postrm 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/mysql-common.postrm 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,7 @@ +#!/bin/bash -e + +if [ "$1" = "purge" ]; then + rmdir /etc/mysql 2>/dev/null || true +fi + +#DEBHELPER# diff -Nru mariadb-5.5-5.5.44/debian/patches/00list mariadb-5.5-5.5.46/debian/patches/00list --- mariadb-5.5-5.5.44/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/00list 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,11 @@ +# 01_MAKEFILES__Docs_Images_Makefile.in.dpatch +# 01_MAKEFILES__Docs_Makefile.in.dpatch +# 02_no_builtin_ndbcluster_plugin.dpatch +# 21_init__openquery_configtest.dpatch +33_scripts__mysql_create_system_tables__no_test.dpatch +38_scripts__mysqld_safe.sh__signals.dpatch +41_scripts__mysql_install_db.sh__no_test.dpatch +44_scripts__mysql_config__libs.dpatch +50_mysql-test__db_test.dpatch +# 60_zlib_innodb_workaround.dpatch +61_replace_dash_with_bash_mbug675185.dpatch diff -Nru mariadb-5.5-5.5.44/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch mariadb-5.5-5.5.46/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch --- mariadb-5.5-5.5.44/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,776 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_MAKEFILES__Docs_Makefile.in.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Creates Docs/Makefile.in + +@DPATCH@ + +--- old/Docs/Images/Makefile.in 2005-03-01 02:08:01.877429040 +0100 ++++ new/Docs/Images/Makefile.in 2005-02-28 21:21:24.000000000 +0100 +@@ -0,0 +1,765 @@ ++# Makefile.in generated by automake 1.7.9 from Makefile.am. ++# @configure_input@ ++ ++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ++# Free Software Foundation, Inc. ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++@SET_MAKE@ ++ ++# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++# Process this file with automake to create Makefile.in ++ ++srcdir = @srcdir@ ++top_srcdir = @top_srcdir@ ++VPATH = @srcdir@ ++pkgdatadir = $(datadir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ ++top_builddir = . ++ ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++INSTALL = @INSTALL@ ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++build_triplet = @build@ ++host_triplet = @host@ ++target_triplet = @target@ ++ACLOCAL = @ACLOCAL@ ++ALLOCA = @ALLOCA@ ++AMDEP_FALSE = @AMDEP_FALSE@ ++AMDEP_TRUE = @AMDEP_TRUE@ ++AMTAR = @AMTAR@ ++AR = @AR@ ++AS = @AS@ ++ASSEMBLER_FALSE = @ASSEMBLER_FALSE@ ++ASSEMBLER_TRUE = @ASSEMBLER_TRUE@ ++ASSEMBLER_sparc32_FALSE = @ASSEMBLER_sparc32_FALSE@ ++ASSEMBLER_sparc32_TRUE = @ASSEMBLER_sparc32_TRUE@ ++ASSEMBLER_sparc64_FALSE = @ASSEMBLER_sparc64_FALSE@ ++ASSEMBLER_sparc64_TRUE = @ASSEMBLER_sparc64_TRUE@ ++ASSEMBLER_x86_FALSE = @ASSEMBLER_x86_FALSE@ ++ASSEMBLER_x86_TRUE = @ASSEMBLER_x86_TRUE@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AVAILABLE_LANGUAGES = @AVAILABLE_LANGUAGES@ ++AVAILABLE_LANGUAGES_ERRORS = @AVAILABLE_LANGUAGES_ERRORS@ ++AWK = @AWK@ ++CC = @CC@ ++CCAS = @CCAS@ ++CCASFLAGS = @CCASFLAGS@ ++CCDEPMODE = @CCDEPMODE@ ++CC_VERSION = @CC_VERSION@ ++CFLAGS = @CFLAGS@ ++CHARSETS_NEED_SOURCE = @CHARSETS_NEED_SOURCE@ ++CHARSET_OBJS = @CHARSET_OBJS@ ++CHARSET_SRCS = @CHARSET_SRCS@ ++CHECK_PID = @CHECK_PID@ ++CHMOD = @CHMOD@ ++CLIENT_EXTRA_LDFLAGS = @CLIENT_EXTRA_LDFLAGS@ ++CLIENT_LIBS = @CLIENT_LIBS@ ++CMP = @CMP@ ++COMPILATION_COMMENT = @COMPILATION_COMMENT@ ++COMPILE_PSTACK_FALSE = @COMPILE_PSTACK_FALSE@ ++COMPILE_PSTACK_TRUE = @COMPILE_PSTACK_TRUE@ ++CONF_COMMAND = @CONF_COMMAND@ ++CP = @CP@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CXX = @CXX@ ++CXXCPP = @CXXCPP@ ++CXXDEPMODE = @CXXDEPMODE@ ++CXXFLAGS = @CXXFLAGS@ ++CXXLDFLAGS = @CXXLDFLAGS@ ++CXX_VERSION = @CXX_VERSION@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++DOT_FRM_VERSION = @DOT_FRM_VERSION@ ++DVIS = @DVIS@ ++ECHO = @ECHO@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++F77 = @F77@ ++FFLAGS = @FFLAGS@ ++FIND_PROC = @FIND_PROC@ ++GETCONF = @GETCONF@ ++GXX = @GXX@ ++HAVE_NETWARE_FALSE = @HAVE_NETWARE_FALSE@ ++HAVE_NETWARE_TRUE = @HAVE_NETWARE_TRUE@ ++HOSTNAME = @HOSTNAME@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++IS_LINUX = @IS_LINUX@ ++KILL = @KILL@ ++LD = @LD@ ++LDFLAGS = @LDFLAGS@ ++LIBDL = @LIBDL@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LIBTOOL = @LIBTOOL@ ++LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@ ++LM_CFLAGS = @LM_CFLAGS@ ++LN = @LN@ ++LN_CP_F = @LN_CP_F@ ++LN_S = @LN_S@ ++LOCAL_FALSE = @LOCAL_FALSE@ ++LOCAL_TRUE = @LOCAL_TRUE@ ++LTLIBOBJS = @LTLIBOBJS@ ++MACHINE_TYPE = @MACHINE_TYPE@ ++MAINT = @MAINT@ ++MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ++MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ ++MAKEINFO = @MAKEINFO@ ++MAKE_BINARY_DISTRIBUTION_OPTIONS = @MAKE_BINARY_DISTRIBUTION_OPTIONS@ ++MAKE_SHELL = @MAKE_SHELL@ ++MT_INCLUDES = @MT_INCLUDES@ ++MT_LD_ADD = @MT_LD_ADD@ ++MV = @MV@ ++MYSQLD_DEFAULT_SWITCHES = @MYSQLD_DEFAULT_SWITCHES@ ++MYSQLD_EXTRA_LDFLAGS = @MYSQLD_EXTRA_LDFLAGS@ ++MYSQLD_USER = @MYSQLD_USER@ ++MYSQL_BASE_VERSION = @MYSQL_BASE_VERSION@ ++MYSQL_NO_DASH_VERSION = @MYSQL_NO_DASH_VERSION@ ++MYSQL_SERVER_SUFFIX = @MYSQL_SERVER_SUFFIX@ ++MYSQL_TCP_PORT = @MYSQL_TCP_PORT@ ++MYSQL_TCP_PORT_DEFAULT = @MYSQL_TCP_PORT_DEFAULT@ ++MYSQL_UNIX_ADDR = @MYSQL_UNIX_ADDR@ ++MYSQL_VERSION_ID = @MYSQL_VERSION_ID@ ++NOINST_LDFLAGS = @NOINST_LDFLAGS@ ++OBJEXT = @OBJEXT@ ++PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++PDFMANUAL = @PDFMANUAL@ ++PERL = @PERL@ ++PERL5 = @PERL5@ ++PROTOCOL_VERSION = @PROTOCOL_VERSION@ ++PS = @PS@ ++RANLIB = @RANLIB@ ++RM = @RM@ ++SAVE_ASFLAGS = @SAVE_ASFLAGS@ ++SAVE_CFLAGS = @SAVE_CFLAGS@ ++SAVE_CXXFLAGS = @SAVE_CXXFLAGS@ ++SAVE_CXXLDFLAGS = @SAVE_CXXLDFLAGS@ ++SAVE_LDFLAGS = @SAVE_LDFLAGS@ ++SED = @SED@ ++SET_MAKE = @SET_MAKE@ ++SHARED_LIB_VERSION = @SHARED_LIB_VERSION@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ ++SYSTEM_TYPE = @SYSTEM_TYPE@ ++TAR = @TAR@ ++TERMCAP_LIB = @TERMCAP_LIB@ ++THREAD_LOBJECTS = @THREAD_LOBJECTS@ ++THREAD_LPROGRAMS = @THREAD_LPROGRAMS@ ++VERSION = @VERSION@ ++WRAPLIBS = @WRAPLIBS@ ++YACC = @YACC@ ++ac_ct_AR = @ac_ct_AR@ ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_CXX = @ac_ct_CXX@ ++ac_ct_F77 = @ac_ct_F77@ ++ac_ct_GETCONF = @ac_ct_GETCONF@ ++ac_ct_RANLIB = @ac_ct_RANLIB@ ++ac_ct_STRIP = @ac_ct_STRIP@ ++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ++am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ ++am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++bdb_includes = @bdb_includes@ ++bdb_libs = @bdb_libs@ ++bdb_libs_with_path = @bdb_libs_with_path@ ++bench_dirs = @bench_dirs@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++datadir = @datadir@ ++default_charset = @default_charset@ ++docs_dirs = @docs_dirs@ ++exec_prefix = @exec_prefix@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++includedir = @includedir@ ++infodir = @infodir@ ++innodb_includes = @innodb_includes@ ++innodb_libs = @innodb_libs@ ++innodb_system_libs = @innodb_system_libs@ ++install_sh = @install_sh@ ++isam_libs = @isam_libs@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++libmysqld_dirs = @libmysqld_dirs@ ++linked_client_targets = @linked_client_targets@ ++linked_netware_sources = @linked_netware_sources@ ++localstatedir = @localstatedir@ ++man_dirs = @man_dirs@ ++mandir = @mandir@ ++netware_dir = @netware_dir@ ++oldincludedir = @oldincludedir@ ++openssl_includes = @openssl_includes@ ++openssl_libs = @openssl_libs@ ++orbit_idl = @orbit_idl@ ++orbit_includes = @orbit_includes@ ++orbit_libs = @orbit_libs@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++pstack_dirs = @pstack_dirs@ ++pstack_libs = @pstack_libs@ ++readline_dir = @readline_dir@ ++readline_link = @readline_link@ ++sbindir = @sbindir@ ++server_scripts = @server_scripts@ ++sharedstatedir = @sharedstatedir@ ++sql_client_dirs = @sql_client_dirs@ ++sql_server_dirs = @sql_server_dirs@ ++sysconfdir = @sysconfdir@ ++target = @target@ ++target_alias = @target_alias@ ++target_cpu = @target_cpu@ ++target_os = @target_os@ ++target_vendor = @target_vendor@ ++thread_dirs = @thread_dirs@ ++tools_dirs = @tools_dirs@ ++uname_prog = @uname_prog@ ++vio_dir = @vio_dir@ ++vio_libs = @vio_libs@ ++ ++AUTOMAKE_OPTIONS = foreign ++ ++# These are built from source in the Docs directory ++EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT ++SUBDIRS = . include @docs_dirs@ @readline_dir@ \ ++ @thread_dirs@ pstack @sql_client_dirs@ \ ++ @sql_server_dirs@ scripts @man_dirs@ tests \ ++ BUILD netware os2 @libmysqld_dirs@ \ ++ @bench_dirs@ support-files @tools_dirs@ ++ ++ ++# Relink after clean ++linked_sources = linked_client_sources linked_server_sources \ ++ linked_libmysql_sources linked_libmysql_r_sources \ ++ linked_libmysqld_sources linked_libmysqldex_sources \ ++ linked_include_sources @linked_netware_sources@ ++ ++ ++CLEANFILES = $(linked_sources) ++subdir = . ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ++CONFIG_HEADER = config.h ++CONFIG_CLEAN_FILES = bdb/Makefile ++DIST_SOURCES = ++ ++RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ++ ps-recursive install-info-recursive uninstall-info-recursive \ ++ all-recursive install-data-recursive install-exec-recursive \ ++ installdirs-recursive install-recursive uninstall-recursive \ ++ check-recursive installcheck-recursive ++DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure COPYING \ ++ ChangeLog Makefile.am acconfig.h acinclude.m4 aclocal.m4 \ ++ config.guess config.h.in config.sub configure configure.in \ ++ depcomp install-sh ltconfig ltmain.sh missing mkinstalldirs ++DIST_SUBDIRS = $(SUBDIRS) ++all: config.h ++ $(MAKE) $(AM_MAKEFLAGS) all-recursive ++ ++.SUFFIXES: ++ ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && \ ++ $(AUTOMAKE) --foreign Makefile ++Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) ++ ++$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ $(SHELL) ./config.status --recheck ++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++ cd $(srcdir) && $(AUTOCONF) ++ ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ++ ++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status ++ @rm -f stamp-h1 ++ cd $(top_builddir) && $(SHELL) ./config.status config.h ++ ++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h ++ cd $(top_srcdir) && $(AUTOHEADER) ++ touch $(srcdir)/config.h.in ++ ++distclean-hdr: ++ -rm -f config.h stamp-h1 ++bdb/Makefile: $(top_builddir)/config.status $(top_srcdir)/bdb/Makefile.in ++ cd $(top_builddir) && $(SHELL) ./config.status $@ ++ ++mostlyclean-libtool: ++ -rm -f *.lo ++ ++clean-libtool: ++ -rm -rf .libs _libs ++ ++distclean-libtool: ++ -rm -f libtool ++uninstall-info-am: ++ ++# This directory's subdirectories are mostly independent; you can cd ++# into them and run `make' without going through this Makefile. ++# To change the values of `make' variables: instead of editing Makefiles, ++# (1) if the variable is set in `config.status', edit `config.status' ++# (which will cause the Makefiles to be regenerated when you run `make'); ++# (2) otherwise, pass the desired values on the `make' command line. ++$(RECURSIVE_TARGETS): ++ @set fnord $$MAKEFLAGS; amf=$$2; \ ++ dot_seen=no; \ ++ target=`echo $@ | sed s/-recursive//`; \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ echo "Making $$target in $$subdir"; \ ++ if test "$$subdir" = "."; then \ ++ dot_seen=yes; \ ++ local_target="$$target-am"; \ ++ else \ ++ local_target="$$target"; \ ++ fi; \ ++ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ++ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ done; \ ++ if test "$$dot_seen" = "no"; then \ ++ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ ++ fi; test -z "$$fail" ++ ++mostlyclean-recursive clean-recursive distclean-recursive \ ++maintainer-clean-recursive: ++ @set fnord $$MAKEFLAGS; amf=$$2; \ ++ dot_seen=no; \ ++ case "$@" in \ ++ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ ++ *) list='$(SUBDIRS)' ;; \ ++ esac; \ ++ rev=''; for subdir in $$list; do \ ++ if test "$$subdir" = "."; then :; else \ ++ rev="$$subdir $$rev"; \ ++ fi; \ ++ done; \ ++ rev="$$rev ."; \ ++ target=`echo $@ | sed s/-recursive//`; \ ++ for subdir in $$rev; do \ ++ echo "Making $$target in $$subdir"; \ ++ if test "$$subdir" = "."; then \ ++ local_target="$$target-am"; \ ++ else \ ++ local_target="$$target"; \ ++ fi; \ ++ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ++ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ done && test -z "$$fail" ++tags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ ++ done ++ctags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ ++ done ++ ++ETAGS = etags ++ETAGSFLAGS = ++ ++CTAGS = ctags ++CTAGSFLAGS = ++ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ mkid -fID $$unique ++ ++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ if (etags --etags-include --version) >/dev/null 2>&1; then \ ++ include_option=--etags-include; \ ++ else \ ++ include_option=--include; \ ++ fi; \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ if test "$$subdir" = .; then :; else \ ++ test -f $$subdir/TAGS && \ ++ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ ++ fi; \ ++ done; \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(ETAGS_ARGS)$$tags$$unique" \ ++ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique ++ ++ctags: CTAGS ++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$tags $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && cd $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) $$here ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++ ++top_distdir = . ++distdir = $(PACKAGE)-$(VERSION) ++ ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++ ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print ++ ++distdir: $(DISTFILES) ++ $(am__remove_distdir) ++ mkdir $(distdir) ++ $(mkinstalldirs) $(distdir)/bdb $(distdir)/include ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkinstalldirs) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ ++ if test -d $$d/$$file; then \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ++ else \ ++ test -f $(distdir)/$$file \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ ++ fi; \ ++ done ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ if test "$$subdir" = .; then :; else \ ++ test -d $(distdir)/$$subdir \ ++ || mkdir $(distdir)/$$subdir \ ++ || exit 1; \ ++ (cd $$subdir && \ ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="$(top_distdir)" \ ++ distdir=../$(distdir)/$$subdir \ ++ distdir) \ ++ || exit 1; \ ++ fi; \ ++ done ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="$(top_distdir)" distdir="$(distdir)" \ ++ dist-hook ++ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ++ || chmod -R a+r $(distdir) ++dist-gzip: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++dist dist-all: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++# This target untars the dist file and tries a VPATH configuration. Then ++# it guarantees that the distribution is self-contained by making another ++# tarfile. ++distcheck: dist ++ $(am__remove_distdir) ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ++ chmod -R a-w $(distdir); chmod a+w $(distdir) ++ mkdir $(distdir)/_build ++ mkdir $(distdir)/_inst ++ chmod a-w $(distdir) ++ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ++ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ++ && cd $(distdir)/_build \ ++ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ $(DISTCHECK_CONFIGURE_FLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \ ++ && $(MAKE) $(AM_MAKEFLAGS) check \ ++ && $(MAKE) $(AM_MAKEFLAGS) install \ ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ++ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ++ distuninstallcheck \ ++ && chmod -R a-w "$$dc_install_base" \ ++ && ({ \ ++ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ++ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ++ } || { rm -rf "$$dc_destdir"; exit 1; }) \ ++ && rm -rf "$$dc_destdir" \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ ++ && rm -f $(distdir).tar.gz \ ++ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ++ $(am__remove_distdir) ++ @echo "$(distdir).tar.gz is ready for distribution" | \ ++ sed 'h;s/./=/g;p;x;p;x' ++distuninstallcheck: ++ @cd $(distuninstallcheck_dir) \ ++ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ++ || { echo "ERROR: files left after uninstall:" ; \ ++ if test -n "$(DESTDIR)"; then \ ++ echo " (check DESTDIR support)"; \ ++ fi ; \ ++ $(distuninstallcheck_listfiles) ; \ ++ exit 1; } >&2 ++distcleancheck: distclean ++ @if test '$(srcdir)' = . ; then \ ++ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ++ exit 1 ; \ ++ fi ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ || { echo "ERROR: files left in build directory after distclean:" ; \ ++ $(distcleancheck_listfiles) ; \ ++ exit 1; } >&2 ++check-am: all-am ++check: check-recursive ++all-am: Makefile config.h ++installdirs: installdirs-recursive ++installdirs-am: ++ ++install: install-recursive ++install-exec: install-exec-recursive ++install-data: install-data-recursive ++uninstall: uninstall-recursive ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-recursive ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++mostlyclean-generic: ++ ++clean-generic: ++ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) ++ ++distclean-generic: ++ -rm -f $(CONFIG_CLEAN_FILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-recursive ++ ++clean-am: clean-generic clean-libtool mostlyclean-am ++ ++distclean: distclean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -f Makefile ++distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \ ++ distclean-tags ++ ++dvi: dvi-recursive ++ ++dvi-am: ++ ++info: info-recursive ++ ++info-am: ++ ++install-data-am: ++ ++install-exec-am: ++ ++install-info: install-info-recursive ++ ++install-man: ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-recursive ++ ++mostlyclean-am: mostlyclean-generic mostlyclean-libtool ++ ++pdf: pdf-recursive ++ ++pdf-am: ++ ++ps: ps-recursive ++ ++ps-am: ++ ++uninstall-am: uninstall-info-am ++ ++uninstall-info: uninstall-info-recursive ++ ++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ ++ clean-generic clean-libtool clean-recursive ctags \ ++ ctags-recursive dist dist-all dist-gzip distcheck distclean \ ++ distclean-generic distclean-hdr distclean-libtool \ ++ distclean-recursive distclean-tags distcleancheck distdir \ ++ distuninstallcheck dvi dvi-am dvi-recursive info info-am \ ++ info-recursive install install-am install-data install-data-am \ ++ install-data-recursive install-exec install-exec-am \ ++ install-exec-recursive install-info install-info-am \ ++ install-info-recursive install-man install-recursive \ ++ install-strip installcheck installcheck-am installdirs \ ++ installdirs-am installdirs-recursive maintainer-clean \ ++ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ ++ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ ++ pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ ++ tags-recursive uninstall uninstall-am uninstall-info-am \ ++ uninstall-info-recursive uninstall-recursive ++ ++ ++# This is just so that the linking is done early. ++config.h: $(linked_sources) ++ ++linked_include_sources: ++ cd include; $(MAKE) link_sources ++ echo timestamp > linked_include_sources ++ ++linked_client_sources: @linked_client_targets@ ++ cd client; $(MAKE) link_sources ++ echo timestamp > linked_client_sources ++ ++linked_libmysql_sources: ++ cd libmysql; $(MAKE) link_sources ++ echo timestamp > linked_libmysql_sources ++ ++linked_libmysql_r_sources: linked_libmysql_sources ++ cd libmysql_r; $(MAKE) link_sources ++ echo timestamp > linked_libmysql_r_sources ++ ++linked_libmysqld_sources: ++ cd libmysqld; $(MAKE) link_sources ++ echo timestamp > linked_libmysqld_sources ++ ++linked_libmysqldex_sources: ++ cd libmysqld/examples; $(MAKE) link_sources ++ echo timestamp > linked_libmysqldex_sources ++ ++linked_netware_sources: ++ cd @netware_dir@; $(MAKE) link_sources ++ echo timestamp > linked_netware_sources ++ ++#avoid recursive make calls in sql directory ++linked_server_sources: ++ cd sql; rm -f mini_client_errors.c;@LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c ++ echo timestamp > linked_server_sources ++ ++# Create permission databases ++init-db: all ++ $(top_builddir)/scripts/mysql_install_db ++ ++bin-dist: all ++ $(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@ ++ ++# Remove BK's "SCCS" subdirectories from source distribution ++dist-hook: ++ rm -rf `find $(distdir) -type d -name SCCS` ++ ++tags: ++ support-files/build-tags ++.PHONY: init-db bin-dist ++ ++# Test installation ++ ++test: ++ cd mysql-test ; ./mysql-test-run ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: diff -Nru mariadb-5.5-5.5.44/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch mariadb-5.5-5.5.46/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch --- mariadb-5.5-5.5.44/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,776 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_MAKEFILES__Docs_Makefile.in.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Creates Docs/Makefile.in + +@DPATCH@ + +--- old/Docs/Makefile.in 2005-03-01 02:08:01.877429040 +0100 ++++ new/Docs/Makefile.in 2005-02-28 21:21:24.000000000 +0100 +@@ -0,0 +1,765 @@ ++# Makefile.in generated by automake 1.7.9 from Makefile.am. ++# @configure_input@ ++ ++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ++# Free Software Foundation, Inc. ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++@SET_MAKE@ ++ ++# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++# Process this file with automake to create Makefile.in ++ ++srcdir = @srcdir@ ++top_srcdir = @top_srcdir@ ++VPATH = @srcdir@ ++pkgdatadir = $(datadir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ ++top_builddir = . ++ ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++INSTALL = @INSTALL@ ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++build_triplet = @build@ ++host_triplet = @host@ ++target_triplet = @target@ ++ACLOCAL = @ACLOCAL@ ++ALLOCA = @ALLOCA@ ++AMDEP_FALSE = @AMDEP_FALSE@ ++AMDEP_TRUE = @AMDEP_TRUE@ ++AMTAR = @AMTAR@ ++AR = @AR@ ++AS = @AS@ ++ASSEMBLER_FALSE = @ASSEMBLER_FALSE@ ++ASSEMBLER_TRUE = @ASSEMBLER_TRUE@ ++ASSEMBLER_sparc32_FALSE = @ASSEMBLER_sparc32_FALSE@ ++ASSEMBLER_sparc32_TRUE = @ASSEMBLER_sparc32_TRUE@ ++ASSEMBLER_sparc64_FALSE = @ASSEMBLER_sparc64_FALSE@ ++ASSEMBLER_sparc64_TRUE = @ASSEMBLER_sparc64_TRUE@ ++ASSEMBLER_x86_FALSE = @ASSEMBLER_x86_FALSE@ ++ASSEMBLER_x86_TRUE = @ASSEMBLER_x86_TRUE@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AVAILABLE_LANGUAGES = @AVAILABLE_LANGUAGES@ ++AVAILABLE_LANGUAGES_ERRORS = @AVAILABLE_LANGUAGES_ERRORS@ ++AWK = @AWK@ ++CC = @CC@ ++CCAS = @CCAS@ ++CCASFLAGS = @CCASFLAGS@ ++CCDEPMODE = @CCDEPMODE@ ++CC_VERSION = @CC_VERSION@ ++CFLAGS = @CFLAGS@ ++CHARSETS_NEED_SOURCE = @CHARSETS_NEED_SOURCE@ ++CHARSET_OBJS = @CHARSET_OBJS@ ++CHARSET_SRCS = @CHARSET_SRCS@ ++CHECK_PID = @CHECK_PID@ ++CHMOD = @CHMOD@ ++CLIENT_EXTRA_LDFLAGS = @CLIENT_EXTRA_LDFLAGS@ ++CLIENT_LIBS = @CLIENT_LIBS@ ++CMP = @CMP@ ++COMPILATION_COMMENT = @COMPILATION_COMMENT@ ++COMPILE_PSTACK_FALSE = @COMPILE_PSTACK_FALSE@ ++COMPILE_PSTACK_TRUE = @COMPILE_PSTACK_TRUE@ ++CONF_COMMAND = @CONF_COMMAND@ ++CP = @CP@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CXX = @CXX@ ++CXXCPP = @CXXCPP@ ++CXXDEPMODE = @CXXDEPMODE@ ++CXXFLAGS = @CXXFLAGS@ ++CXXLDFLAGS = @CXXLDFLAGS@ ++CXX_VERSION = @CXX_VERSION@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++DOT_FRM_VERSION = @DOT_FRM_VERSION@ ++DVIS = @DVIS@ ++ECHO = @ECHO@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++F77 = @F77@ ++FFLAGS = @FFLAGS@ ++FIND_PROC = @FIND_PROC@ ++GETCONF = @GETCONF@ ++GXX = @GXX@ ++HAVE_NETWARE_FALSE = @HAVE_NETWARE_FALSE@ ++HAVE_NETWARE_TRUE = @HAVE_NETWARE_TRUE@ ++HOSTNAME = @HOSTNAME@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++IS_LINUX = @IS_LINUX@ ++KILL = @KILL@ ++LD = @LD@ ++LDFLAGS = @LDFLAGS@ ++LIBDL = @LIBDL@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LIBTOOL = @LIBTOOL@ ++LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@ ++LM_CFLAGS = @LM_CFLAGS@ ++LN = @LN@ ++LN_CP_F = @LN_CP_F@ ++LN_S = @LN_S@ ++LOCAL_FALSE = @LOCAL_FALSE@ ++LOCAL_TRUE = @LOCAL_TRUE@ ++LTLIBOBJS = @LTLIBOBJS@ ++MACHINE_TYPE = @MACHINE_TYPE@ ++MAINT = @MAINT@ ++MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ ++MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ ++MAKEINFO = @MAKEINFO@ ++MAKE_BINARY_DISTRIBUTION_OPTIONS = @MAKE_BINARY_DISTRIBUTION_OPTIONS@ ++MAKE_SHELL = @MAKE_SHELL@ ++MT_INCLUDES = @MT_INCLUDES@ ++MT_LD_ADD = @MT_LD_ADD@ ++MV = @MV@ ++MYSQLD_DEFAULT_SWITCHES = @MYSQLD_DEFAULT_SWITCHES@ ++MYSQLD_EXTRA_LDFLAGS = @MYSQLD_EXTRA_LDFLAGS@ ++MYSQLD_USER = @MYSQLD_USER@ ++MYSQL_BASE_VERSION = @MYSQL_BASE_VERSION@ ++MYSQL_NO_DASH_VERSION = @MYSQL_NO_DASH_VERSION@ ++MYSQL_SERVER_SUFFIX = @MYSQL_SERVER_SUFFIX@ ++MYSQL_TCP_PORT = @MYSQL_TCP_PORT@ ++MYSQL_TCP_PORT_DEFAULT = @MYSQL_TCP_PORT_DEFAULT@ ++MYSQL_UNIX_ADDR = @MYSQL_UNIX_ADDR@ ++MYSQL_VERSION_ID = @MYSQL_VERSION_ID@ ++NOINST_LDFLAGS = @NOINST_LDFLAGS@ ++OBJEXT = @OBJEXT@ ++PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++PDFMANUAL = @PDFMANUAL@ ++PERL = @PERL@ ++PERL5 = @PERL5@ ++PROTOCOL_VERSION = @PROTOCOL_VERSION@ ++PS = @PS@ ++RANLIB = @RANLIB@ ++RM = @RM@ ++SAVE_ASFLAGS = @SAVE_ASFLAGS@ ++SAVE_CFLAGS = @SAVE_CFLAGS@ ++SAVE_CXXFLAGS = @SAVE_CXXFLAGS@ ++SAVE_CXXLDFLAGS = @SAVE_CXXLDFLAGS@ ++SAVE_LDFLAGS = @SAVE_LDFLAGS@ ++SED = @SED@ ++SET_MAKE = @SET_MAKE@ ++SHARED_LIB_VERSION = @SHARED_LIB_VERSION@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ ++SYSTEM_TYPE = @SYSTEM_TYPE@ ++TAR = @TAR@ ++TERMCAP_LIB = @TERMCAP_LIB@ ++THREAD_LOBJECTS = @THREAD_LOBJECTS@ ++THREAD_LPROGRAMS = @THREAD_LPROGRAMS@ ++VERSION = @VERSION@ ++WRAPLIBS = @WRAPLIBS@ ++YACC = @YACC@ ++ac_ct_AR = @ac_ct_AR@ ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_CXX = @ac_ct_CXX@ ++ac_ct_F77 = @ac_ct_F77@ ++ac_ct_GETCONF = @ac_ct_GETCONF@ ++ac_ct_RANLIB = @ac_ct_RANLIB@ ++ac_ct_STRIP = @ac_ct_STRIP@ ++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ++am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ ++am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++bdb_includes = @bdb_includes@ ++bdb_libs = @bdb_libs@ ++bdb_libs_with_path = @bdb_libs_with_path@ ++bench_dirs = @bench_dirs@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++datadir = @datadir@ ++default_charset = @default_charset@ ++docs_dirs = @docs_dirs@ ++exec_prefix = @exec_prefix@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++includedir = @includedir@ ++infodir = @infodir@ ++innodb_includes = @innodb_includes@ ++innodb_libs = @innodb_libs@ ++innodb_system_libs = @innodb_system_libs@ ++install_sh = @install_sh@ ++isam_libs = @isam_libs@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++libmysqld_dirs = @libmysqld_dirs@ ++linked_client_targets = @linked_client_targets@ ++linked_netware_sources = @linked_netware_sources@ ++localstatedir = @localstatedir@ ++man_dirs = @man_dirs@ ++mandir = @mandir@ ++netware_dir = @netware_dir@ ++oldincludedir = @oldincludedir@ ++openssl_includes = @openssl_includes@ ++openssl_libs = @openssl_libs@ ++orbit_idl = @orbit_idl@ ++orbit_includes = @orbit_includes@ ++orbit_libs = @orbit_libs@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++pstack_dirs = @pstack_dirs@ ++pstack_libs = @pstack_libs@ ++readline_dir = @readline_dir@ ++readline_link = @readline_link@ ++sbindir = @sbindir@ ++server_scripts = @server_scripts@ ++sharedstatedir = @sharedstatedir@ ++sql_client_dirs = @sql_client_dirs@ ++sql_server_dirs = @sql_server_dirs@ ++sysconfdir = @sysconfdir@ ++target = @target@ ++target_alias = @target_alias@ ++target_cpu = @target_cpu@ ++target_os = @target_os@ ++target_vendor = @target_vendor@ ++thread_dirs = @thread_dirs@ ++tools_dirs = @tools_dirs@ ++uname_prog = @uname_prog@ ++vio_dir = @vio_dir@ ++vio_libs = @vio_libs@ ++ ++AUTOMAKE_OPTIONS = foreign ++ ++# These are built from source in the Docs directory ++EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT ++SUBDIRS = . include @docs_dirs@ @readline_dir@ \ ++ @thread_dirs@ pstack @sql_client_dirs@ \ ++ @sql_server_dirs@ scripts @man_dirs@ tests \ ++ BUILD netware os2 @libmysqld_dirs@ \ ++ @bench_dirs@ support-files @tools_dirs@ ++ ++ ++# Relink after clean ++linked_sources = linked_client_sources linked_server_sources \ ++ linked_libmysql_sources linked_libmysql_r_sources \ ++ linked_libmysqld_sources linked_libmysqldex_sources \ ++ linked_include_sources @linked_netware_sources@ ++ ++ ++CLEANFILES = $(linked_sources) ++subdir = . ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ++CONFIG_HEADER = config.h ++CONFIG_CLEAN_FILES = bdb/Makefile ++DIST_SOURCES = ++ ++RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ++ ps-recursive install-info-recursive uninstall-info-recursive \ ++ all-recursive install-data-recursive install-exec-recursive \ ++ installdirs-recursive install-recursive uninstall-recursive \ ++ check-recursive installcheck-recursive ++DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure COPYING \ ++ ChangeLog Makefile.am acconfig.h acinclude.m4 aclocal.m4 \ ++ config.guess config.h.in config.sub configure configure.in \ ++ depcomp install-sh ltconfig ltmain.sh missing mkinstalldirs ++DIST_SUBDIRS = $(SUBDIRS) ++all: config.h ++ $(MAKE) $(AM_MAKEFLAGS) all-recursive ++ ++.SUFFIXES: ++ ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++ cd $(top_srcdir) && \ ++ $(AUTOMAKE) --foreign Makefile ++Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) ++ ++$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ $(SHELL) ./config.status --recheck ++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++ cd $(srcdir) && $(AUTOCONF) ++ ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ++ ++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status ++ @rm -f stamp-h1 ++ cd $(top_builddir) && $(SHELL) ./config.status config.h ++ ++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h ++ cd $(top_srcdir) && $(AUTOHEADER) ++ touch $(srcdir)/config.h.in ++ ++distclean-hdr: ++ -rm -f config.h stamp-h1 ++bdb/Makefile: $(top_builddir)/config.status $(top_srcdir)/bdb/Makefile.in ++ cd $(top_builddir) && $(SHELL) ./config.status $@ ++ ++mostlyclean-libtool: ++ -rm -f *.lo ++ ++clean-libtool: ++ -rm -rf .libs _libs ++ ++distclean-libtool: ++ -rm -f libtool ++uninstall-info-am: ++ ++# This directory's subdirectories are mostly independent; you can cd ++# into them and run `make' without going through this Makefile. ++# To change the values of `make' variables: instead of editing Makefiles, ++# (1) if the variable is set in `config.status', edit `config.status' ++# (which will cause the Makefiles to be regenerated when you run `make'); ++# (2) otherwise, pass the desired values on the `make' command line. ++$(RECURSIVE_TARGETS): ++ @set fnord $$MAKEFLAGS; amf=$$2; \ ++ dot_seen=no; \ ++ target=`echo $@ | sed s/-recursive//`; \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ echo "Making $$target in $$subdir"; \ ++ if test "$$subdir" = "."; then \ ++ dot_seen=yes; \ ++ local_target="$$target-am"; \ ++ else \ ++ local_target="$$target"; \ ++ fi; \ ++ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ++ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ done; \ ++ if test "$$dot_seen" = "no"; then \ ++ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ ++ fi; test -z "$$fail" ++ ++mostlyclean-recursive clean-recursive distclean-recursive \ ++maintainer-clean-recursive: ++ @set fnord $$MAKEFLAGS; amf=$$2; \ ++ dot_seen=no; \ ++ case "$@" in \ ++ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ ++ *) list='$(SUBDIRS)' ;; \ ++ esac; \ ++ rev=''; for subdir in $$list; do \ ++ if test "$$subdir" = "."; then :; else \ ++ rev="$$subdir $$rev"; \ ++ fi; \ ++ done; \ ++ rev="$$rev ."; \ ++ target=`echo $@ | sed s/-recursive//`; \ ++ for subdir in $$rev; do \ ++ echo "Making $$target in $$subdir"; \ ++ if test "$$subdir" = "."; then \ ++ local_target="$$target-am"; \ ++ else \ ++ local_target="$$target"; \ ++ fi; \ ++ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ++ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ done && test -z "$$fail" ++tags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ ++ done ++ctags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ ++ done ++ ++ETAGS = etags ++ETAGSFLAGS = ++ ++CTAGS = ctags ++CTAGSFLAGS = ++ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ mkid -fID $$unique ++ ++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ if (etags --etags-include --version) >/dev/null 2>&1; then \ ++ include_option=--etags-include; \ ++ else \ ++ include_option=--include; \ ++ fi; \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ if test "$$subdir" = .; then :; else \ ++ test -f $$subdir/TAGS && \ ++ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ ++ fi; \ ++ done; \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(ETAGS_ARGS)$$tags$$unique" \ ++ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique ++ ++ctags: CTAGS ++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$tags $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && cd $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) $$here ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++ ++top_distdir = . ++distdir = $(PACKAGE)-$(VERSION) ++ ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++ ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print ++ ++distdir: $(DISTFILES) ++ $(am__remove_distdir) ++ mkdir $(distdir) ++ $(mkinstalldirs) $(distdir)/bdb $(distdir)/include ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkinstalldirs) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ ++ if test -d $$d/$$file; then \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ++ else \ ++ test -f $(distdir)/$$file \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ ++ fi; \ ++ done ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ if test "$$subdir" = .; then :; else \ ++ test -d $(distdir)/$$subdir \ ++ || mkdir $(distdir)/$$subdir \ ++ || exit 1; \ ++ (cd $$subdir && \ ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="$(top_distdir)" \ ++ distdir=../$(distdir)/$$subdir \ ++ distdir) \ ++ || exit 1; \ ++ fi; \ ++ done ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="$(top_distdir)" distdir="$(distdir)" \ ++ dist-hook ++ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ++ || chmod -R a+r $(distdir) ++dist-gzip: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++dist dist-all: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++# This target untars the dist file and tries a VPATH configuration. Then ++# it guarantees that the distribution is self-contained by making another ++# tarfile. ++distcheck: dist ++ $(am__remove_distdir) ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ++ chmod -R a-w $(distdir); chmod a+w $(distdir) ++ mkdir $(distdir)/_build ++ mkdir $(distdir)/_inst ++ chmod a-w $(distdir) ++ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ++ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ++ && cd $(distdir)/_build \ ++ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ $(DISTCHECK_CONFIGURE_FLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \ ++ && $(MAKE) $(AM_MAKEFLAGS) check \ ++ && $(MAKE) $(AM_MAKEFLAGS) install \ ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ++ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ++ distuninstallcheck \ ++ && chmod -R a-w "$$dc_install_base" \ ++ && ({ \ ++ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ++ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ++ } || { rm -rf "$$dc_destdir"; exit 1; }) \ ++ && rm -rf "$$dc_destdir" \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ ++ && rm -f $(distdir).tar.gz \ ++ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ++ $(am__remove_distdir) ++ @echo "$(distdir).tar.gz is ready for distribution" | \ ++ sed 'h;s/./=/g;p;x;p;x' ++distuninstallcheck: ++ @cd $(distuninstallcheck_dir) \ ++ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ++ || { echo "ERROR: files left after uninstall:" ; \ ++ if test -n "$(DESTDIR)"; then \ ++ echo " (check DESTDIR support)"; \ ++ fi ; \ ++ $(distuninstallcheck_listfiles) ; \ ++ exit 1; } >&2 ++distcleancheck: distclean ++ @if test '$(srcdir)' = . ; then \ ++ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ++ exit 1 ; \ ++ fi ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ || { echo "ERROR: files left in build directory after distclean:" ; \ ++ $(distcleancheck_listfiles) ; \ ++ exit 1; } >&2 ++check-am: all-am ++check: check-recursive ++all-am: Makefile config.h ++installdirs: installdirs-recursive ++installdirs-am: ++ ++install: install-recursive ++install-exec: install-exec-recursive ++install-data: install-data-recursive ++uninstall: uninstall-recursive ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-recursive ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++mostlyclean-generic: ++ ++clean-generic: ++ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) ++ ++distclean-generic: ++ -rm -f $(CONFIG_CLEAN_FILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-recursive ++ ++clean-am: clean-generic clean-libtool mostlyclean-am ++ ++distclean: distclean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -f Makefile ++distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \ ++ distclean-tags ++ ++dvi: dvi-recursive ++ ++dvi-am: ++ ++info: info-recursive ++ ++info-am: ++ ++install-data-am: ++ ++install-exec-am: ++ ++install-info: install-info-recursive ++ ++install-man: ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-recursive ++ ++mostlyclean-am: mostlyclean-generic mostlyclean-libtool ++ ++pdf: pdf-recursive ++ ++pdf-am: ++ ++ps: ps-recursive ++ ++ps-am: ++ ++uninstall-am: uninstall-info-am ++ ++uninstall-info: uninstall-info-recursive ++ ++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ ++ clean-generic clean-libtool clean-recursive ctags \ ++ ctags-recursive dist dist-all dist-gzip distcheck distclean \ ++ distclean-generic distclean-hdr distclean-libtool \ ++ distclean-recursive distclean-tags distcleancheck distdir \ ++ distuninstallcheck dvi dvi-am dvi-recursive info info-am \ ++ info-recursive install install-am install-data install-data-am \ ++ install-data-recursive install-exec install-exec-am \ ++ install-exec-recursive install-info install-info-am \ ++ install-info-recursive install-man install-recursive \ ++ install-strip installcheck installcheck-am installdirs \ ++ installdirs-am installdirs-recursive maintainer-clean \ ++ maintainer-clean-generic maintainer-clean-recursive mostlyclean \ ++ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ ++ pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ ++ tags-recursive uninstall uninstall-am uninstall-info-am \ ++ uninstall-info-recursive uninstall-recursive ++ ++ ++# This is just so that the linking is done early. ++config.h: $(linked_sources) ++ ++linked_include_sources: ++ cd include; $(MAKE) link_sources ++ echo timestamp > linked_include_sources ++ ++linked_client_sources: @linked_client_targets@ ++ cd client; $(MAKE) link_sources ++ echo timestamp > linked_client_sources ++ ++linked_libmysql_sources: ++ cd libmysql; $(MAKE) link_sources ++ echo timestamp > linked_libmysql_sources ++ ++linked_libmysql_r_sources: linked_libmysql_sources ++ cd libmysql_r; $(MAKE) link_sources ++ echo timestamp > linked_libmysql_r_sources ++ ++linked_libmysqld_sources: ++ cd libmysqld; $(MAKE) link_sources ++ echo timestamp > linked_libmysqld_sources ++ ++linked_libmysqldex_sources: ++ cd libmysqld/examples; $(MAKE) link_sources ++ echo timestamp > linked_libmysqldex_sources ++ ++linked_netware_sources: ++ cd @netware_dir@; $(MAKE) link_sources ++ echo timestamp > linked_netware_sources ++ ++#avoid recursive make calls in sql directory ++linked_server_sources: ++ cd sql; rm -f mini_client_errors.c;@LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c ++ echo timestamp > linked_server_sources ++ ++# Create permission databases ++init-db: all ++ $(top_builddir)/scripts/mysql_install_db ++ ++bin-dist: all ++ $(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@ ++ ++# Remove BK's "SCCS" subdirectories from source distribution ++dist-hook: ++ rm -rf `find $(distdir) -type d -name SCCS` ++ ++tags: ++ support-files/build-tags ++.PHONY: init-db bin-dist ++ ++# Test installation ++ ++test: ++ cd mysql-test ; ./mysql-test-run ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: diff -Nru mariadb-5.5-5.5.44/debian/patches/02_no_builtin_ndbcluster_plugin.dpatch mariadb-5.5-5.5.46/debian/patches/02_no_builtin_ndbcluster_plugin.dpatch --- mariadb-5.5-5.5.44/debian/patches/02_no_builtin_ndbcluster_plugin.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/02_no_builtin_ndbcluster_plugin.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_no_builtin_ndbcluster_plugin.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: As we completely disabled ndbcluster + +@DPATCH@ + +--- old/sql/sql_builtin.cc ++++ new/sql/sql_builtin.cc +@@ -22,6 +22,6 @@ + + struct st_mysql_plugin *mysqld_builtins[]= + { +- builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, builtin_ndbcluster_plugin,(struct st_mysql_plugin *)0 ++ builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, (struct st_mysql_plugin *)0 + }; + diff -Nru mariadb-5.5-5.5.44/debian/patches/21_init__openquery_configtest.dpatch mariadb-5.5-5.5.46/debian/patches/21_init__openquery_configtest.dpatch --- mariadb-5.5-5.5.44/debian/patches/21_init__openquery_configtest.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/21_init__openquery_configtest.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 35_init__openquery_configtest.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: init__openquery_configtest.dpatch + +@DPATCH@ + +--- old/debian/mysql-server-5.0.mysql.init.orig 2008-12-19 12:03:30.379898336 +1100 ++++ new/debian/mysql-server-5.0.mysql.init 2008-12-19 12:04:46.660451093 +1100 +@@ -182,8 +182,21 @@ + fi + ;; + ++ 'configtest') ++ log_daemon_msg "Testing MySQL configuration" "syntax" ++ set +e ++ help_out=`/usr/sbin/mysqld --help 2>&1`; r=$? ++ set -e ++ if [ "$r" -ne 0 ]; then ++ log_failure_msg "$help_out" ++ log_failure_msg "There are syntax errors in the server configuration. Please fix them!" ++ fi ++ log_end_msg $r ++ exit $r ++ ;; ++ + *) +- echo "Usage: $SELF start|stop|restart|reload|force-reload|status" ++ echo "Usage: $SELF start|stop|restart|reload|force-reload|status|configtest" + exit 1 + ;; + esac diff -Nru mariadb-5.5-5.5.44/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch mariadb-5.5-5.5.46/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch --- mariadb-5.5-5.5.44/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 33_scripts__mysql_create_system_tables__no_test.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: scripts__mysql_create_system_tables__no_test +## DP: A user with no password prevents a normal user from login under certain +## DP: circumstances as it is checked first. See #301741. +## DP: http://bugs.mysql.com/bug.php?id=6901 + +@DPATCH@ +--- old/scripts/mysql_system_tables_data.sql 2008-12-04 22:59:44.000000000 +0100 ++++ new/scripts/mysql_system_tables_data.sql 2008-12-04 23:00:07.000000000 +0100 +@@ -30,8 +30,6 @@ SELECT LOWER( REPLACE((SELECT REPLACE(@@ + -- Fill "db" table with default grants for anyone to + -- access database 'test' and 'test_%' if "db" table didn't exist + CREATE TEMPORARY TABLE tmp_db LIKE db; +-INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); +-INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); + INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; + DROP TABLE tmp_db; + +@@ -43,8 +41,6 @@ INSERT INTO tmp_user VALUES ('localhost' + REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','' FROM dual WHERE @current_hostname != 'localhost'; + REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); + REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); +-INSERT INTO tmp_user (host,user) VALUES ('localhost',''); +-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; + INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; + DROP TABLE tmp_user; + diff -Nru mariadb-5.5-5.5.44/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch mariadb-5.5-5.5.46/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch --- mariadb-5.5-5.5.44/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 38_scripts__mysqld_safe.sh__signals.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Executes /etc/init.d/mysql on signals +## DP: Reported as http://bugs.mysql.com/bug.php?id=31361 + +@DPATCH@ + +--- a/scripts/mysqld_safe.sh 2013-01-11 16:02:41 +0000 ++++ b/scripts/mysqld_safe.sh 2013-01-11 16:03:14 +0000 +@@ -32,7 +32,6 @@ err_log= + syslog_tag_mysqld=mysqld + syslog_tag_mysqld_safe=mysqld_safe + +-trap '' 1 2 3 15 # we shouldn't let anyone kill us + + # MySQL-specific environment variable. First off, it's not really a umask, + # it's the desired mode. Second, it follows umask(2), not umask(3) in that +@@ -163,7 +162,7 @@ eval_log_error () { + # sed buffers output (only GNU sed supports a -u (unbuffered) option) + # which means that messages may not get sent to syslog until the + # mysqld process quits. +- cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error" ++ cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error & wait" + ;; + *) + echo "Internal program error (non-fatal):" \ +@@ -805,6 +804,13 @@ then + fi + + # ++# From now on, we catch signals to do a proper shutdown of mysqld ++# when signalled to do so. ++# ++trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf refresh & wait' 1 # HUP ++trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf shutdown' 2 3 15 # INT QUIT and TERM ++ ++# + # Uncomment the following lines if you want all tables to be automatically + # checked and repaired during startup. You should add sensible key_buffer + # and sort_buffer values to my.cnf to improve check performance or require + diff -Nru mariadb-5.5-5.5.44/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch mariadb-5.5-5.5.46/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch --- mariadb-5.5-5.5.44/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 41_scripts__mysql_install_db.sh__no_test.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: scripts__mysql_install_db.sh__no_test +## DP: http://bugs.mysql.com/bug.php?id=6901 + +@DPATCH@ + +--- mysql-dfsg-5.1-5.1.23rc.orig/scripts/mysql_install_db.sh 2008-01-29 22:41:20.000000000 +0100 ++++ mysql-dfsg-5.1-5.1.23rc/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100 +@@ -372,7 +372,7 @@ then + fi + + # Create database directories +-for dir in "$ldata" "$ldata/mysql" "$ldata/test" ++for dir in "$ldata" "$ldata/mysql" + do + if test ! -d "$dir" + then diff -Nru mariadb-5.5-5.5.44/debian/patches/44_scripts__mysql_config__libs.dpatch mariadb-5.5-5.5.46/debian/patches/44_scripts__mysql_config__libs.dpatch --- mariadb-5.5-5.5.44/debian/patches/44_scripts__mysql_config__libs.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/44_scripts__mysql_config__libs.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,24 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 99-unnamed.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Removes unnecessary library dependencies. See #390692 + +@DPATCH@ +diff -Nur mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh +--- mysql-dfsg-5.1-5.1.31.orig/scripts/mysql_config.sh 2009-01-19 17:30:55.000000000 +0100 ++++ mysql-dfsg-5.1-5.1.31/scripts/mysql_config.sh 2009-02-08 17:17:48.000000000 +0100 +@@ -106,10 +106,10 @@ + + # Create options + # We intentionally add a space to the beginning and end of lib strings, simplifies replace later +-libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@" ++libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient" + libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ " +-libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ " +-embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ " ++libs_r=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqlclient_r @CLIENT_LIBS@ @openssl_libs@ " ++embedded_libs=" $ldflags -L$pkglibdir @RPATH_OPTION@ -lmysqld @LIBDL@ @WRAPLIBS@ @openssl_libs@ " + + if [ -r "$pkglibdir/libmygcc.a" ]; then + # When linking against the static library with a different version of GCC diff -Nru mariadb-5.5-5.5.44/debian/patches/50_mysql-test__db_test.dpatch mariadb-5.5-5.5.46/debian/patches/50_mysql-test__db_test.dpatch --- mariadb-5.5-5.5.44/debian/patches/50_mysql-test__db_test.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/50_mysql-test__db_test.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,24 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 50_mysql-test__db_test.dpatch by Christian Hammers +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Patch 33_scripts__mysql_create_system_tables__no_test removes the +## DP: rights for anybody to connect to the test database but the test +## DP: suite depends on them. + +@DPATCH@ + +--- old/mysql-test/mysql-test-run.pl 2009-06-16 14:24:09.000000000 +0200 ++++ new/mysql-test/mysql-test-run.pl 2009-07-04 00:03:34.000000000 +0200 +@@ -3578,6 +3578,11 @@ sub mysql_install_db { + mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql", + $bootstrap_sql_file); + ++ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n"); ++ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n"); ++ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n"); ++ ++ + # Add test data for timezone - this is just a subset, on a real + # system these tables will be populated either by mysql_tzinfo_to_sql + # or by downloading the timezone table package from our website diff -Nru mariadb-5.5-5.5.44/debian/patches/60_zlib_innodb_workaround.dpatch mariadb-5.5-5.5.46/debian/patches/60_zlib_innodb_workaround.dpatch --- mariadb-5.5-5.5.44/debian/patches/60_zlib_innodb_workaround.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/60_zlib_innodb_workaround.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,31 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 60_zlib_innodb_workaround.dpatch by Norbert Tretkowski +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: http://bugs.mysql.com/bug.php?id=47495 + +@DPATCH@ +diff -Nur mysql-dfsg-5.1-5.1.39.orig/mysql-test/suite/innodb/r/innodb-zip.result mysql-dfsg-5.1-5.1.39/mysql-test/suite/innodb/r/innodb-zip.result +--- mysql-dfsg-5.1-5.1.39.orig/mysql-test/suite/innodb/r/innodb-zip.result 2009-09-04 19:04:38.000000000 +0200 ++++ mysql-dfsg-5.1-5.1.39/mysql-test/suite/innodb/r/innodb-zip.result 2009-09-28 16:01:33.000000000 +0200 +@@ -141,7 +141,7 @@ + CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs +-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(439))) ++CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); + DROP TABLE t1; +diff -Nur mysql-dfsg-5.1-5.1.39.orig/mysql-test/suite/innodb/t/innodb-zip.test mysql-dfsg-5.1-5.1.39/mysql-test/suite/innodb/t/innodb-zip.test +--- mysql-dfsg-5.1-5.1.39.orig/mysql-test/suite/innodb/t/innodb-zip.test 2009-09-04 19:04:37.000000000 +0200 ++++ mysql-dfsg-5.1-5.1.39/mysql-test/suite/innodb/t/innodb-zip.test 2009-09-28 16:01:22.000000000 +0200 +@@ -106,7 +106,7 @@ + --error ER_TOO_BIG_ROWSIZE + CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(439))) ++CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); + DROP TABLE t1; diff -Nru mariadb-5.5-5.5.44/debian/patches/61_replace_dash_with_bash_mbug675185.dpatch mariadb-5.5-5.5.46/debian/patches/61_replace_dash_with_bash_mbug675185.dpatch --- mariadb-5.5-5.5.44/debian/patches/61_replace_dash_with_bash_mbug675185.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/61_replace_dash_with_bash_mbug675185.dpatch 2015-10-09 16:50:17.000000000 +0000 @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 61_replace_dash_with_bash_mbug675185.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: 61_replace_dash_with_bash_mbug675185 +## DP: A race in dash causes mysqld_safe to occasionally loop infinitely. +## DP: Fix by using bash instead. +## DP: https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/675185 + +@DPATCH@ +=== modified file 'scripts/mysqld_safe.sh' +--- old/scripts/mysqld_safe.sh 2010-04-09 11:47:18 +0000 ++++ new/scripts/mysqld_safe.sh 2010-11-21 09:40:50 +0000 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB + # This file is public domain and comes with NO WARRANTY of any kind + # + diff -Nru mariadb-5.5-5.5.44/debian/patches/80_fix-events-test-to-year2020.diff mariadb-5.5-5.5.46/debian/patches/80_fix-events-test-to-year2020.diff --- mariadb-5.5-5.5.44/debian/patches/80_fix-events-test-to-year2020.diff 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/80_fix-events-test-to-year2020.diff 2015-11-04 19:48:00.000000000 +0000 @@ -0,0 +1,27 @@ +Author: Otto Kekäläinen +Description: Extend date in test suite so that main.events_1 will pass + +--- a/mysql-test/r/events_1.result ++++ b/mysql-test/r/events_1.result +@@ -114,7 +114,7 @@ create table t_event3 (a int, b float); + drop event if exists event3; + Warnings: + Note 1305 Event event3 does not exist +-create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20151010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); ++create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20201010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); + select count(*) from t_event3; + count(*) + 0 +diff --git a/mysql-test/t/events_1.test b/mysql-test/t/events_1.test +index 7f31e3f..c20f178 100644 +--- a/mysql-test/t/events_1.test ++++ b/mysql-test/t/events_1.test +@@ -125,7 +125,7 @@ drop event existant; + + create table t_event3 (a int, b float); + drop event if exists event3; +-create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20151010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); ++create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20201010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); + let $wait_condition=SELECT count(*)=0 from t_event3; + --source include/wait_condition.inc + select count(*) from t_event3; diff -Nru mariadb-5.5-5.5.44/debian/patches/series mariadb-5.5-5.5.46/debian/patches/series --- mariadb-5.5-5.5.44/debian/patches/series 2015-06-16 02:04:44.000000000 +0000 +++ mariadb-5.5-5.5.46/debian/patches/series 2015-11-04 19:48:00.000000000 +0000 @@ -5,5 +5,6 @@ 50_mysql-test__db_test.diff 61_replace_dash_with_bash_mbug675185.diff 75_man_syntax_fixes.diff +80_fix-events-test-to-year2020.diff 82_extend_default_test_timeout_for_tokudb.diff 99_remove_rename_mariadb-server_files_in.diff diff -Nru mariadb-5.5-5.5.44/Docs/INFO_SRC mariadb-5.5-5.5.46/Docs/INFO_SRC --- mariadb-5.5-5.5.44/Docs/INFO_SRC 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/Docs/INFO_SRC 2015-10-09 16:51:17.000000000 +0000 @@ -1,8 +1,8 @@ -commit: 5a44e1a4024f1760021e5c6fd65773584d60513a -date: 2015-06-09 22:16:26 +0200 -build-date: 2015-06-09 22:25:59 +0200 -short: 5a44e1a +commit: 16c4b3c68b06653592a9500050ad977a38f4ebae +date: 2015-10-09 16:43:59 +0200 +build-date: 2015-10-09 18:51:17 +0200 +short: 16c4b3c branch: HEAD -MySQL source 5.5.44 +MySQL source 5.5.46 diff -Nru mariadb-5.5-5.5.44/extra/yassl/include/openssl/ssl.h mariadb-5.5-5.5.46/extra/yassl/include/openssl/ssl.h --- mariadb-5.5-5.5.44/extra/yassl/include/openssl/ssl.h 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/include/openssl/ssl.h 2015-10-09 16:50:17.000000000 +0000 @@ -35,7 +35,7 @@ #include "rsa.h" -#define YASSL_VERSION "2.3.7" +#define YASSL_VERSION "2.3.8" #if defined(__cplusplus) diff -Nru mariadb-5.5-5.5.44/extra/yassl/include/yassl_error.hpp mariadb-5.5-5.5.46/extra/yassl/include/yassl_error.hpp --- mariadb-5.5-5.5.44/extra/yassl/include/yassl_error.hpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/include/yassl_error.hpp 2015-10-09 16:50:17.000000000 +0000 @@ -53,7 +53,8 @@ compress_error = 118, decompress_error = 119, pms_version_error = 120, - sanityCipher_error = 121 + sanityCipher_error = 121, + rsaSignFault_error = 122 // !!!! add error message to .cpp !!!! diff -Nru mariadb-5.5-5.5.44/extra/yassl/README mariadb-5.5-5.5.46/extra/yassl/README --- mariadb-5.5-5.5.44/extra/yassl/README 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/README 2015-10-09 16:50:17.000000000 +0000 @@ -12,6 +12,35 @@ *** end Note *** +yaSSL Release notes, version 2.3.8 (9/17/2015) + This release of yaSSL fixes a high security vulnerability. All users + SHOULD update. If using yaSSL for TLS on the server side with private + RSA keys allowing ephemeral key exchange you MUST update and regenerate + the RSA private keys. This report is detailed in: + https://people.redhat.com/~fweimer/rsa-crt-leaks.pdf + yaSSL now detects RSA signature faults and returns an error. + +yaSSL Patch notes, version 2.3.7e (6/26/2015) + This release of yaSSL includes a fix for Date less than comparison. + Previously yaSSL would return true on less than comparisons if the Dates + were equal. Reported by Oracle. No security problem, but if a cert was + generated right now, a server started using it in the same second, and a + client tried to verify it in the same second it would report not yet valid. + +yaSSL Patch notes, version 2.3.7d (6/22/2015) + This release of yaSSL includes a fix for input_buffer set_current with + index 0. SSL_peek() at front of waiting data could trigger. Robert + Golebiowski of Oracle identified and suggested a fix, thanks! + +yaSSL Patch notes, version 2.3.7c (6/12/2015) + This release of yaSSL does certificate DATE comparisons to the second + instead of to the minute, helpful when using freshly generated certs. + Though keep in mind that time sync differences could still show up. + +yaSSL Patch notes, version 2.3.7b (3/18/2015) + This release of yaSSL fixes a potential crash with corrupted private keys. + Also detects bad keys earlier for user. + yaSSL Release notes, version 2.3.7 (12/10/2014) This release of yaSSL fixes the potential to process duplicate handshake messages by explicitly marking/checking received handshake messages. diff -Nru mariadb-5.5-5.5.44/extra/yassl/src/buffer.cpp mariadb-5.5-5.5.46/extra/yassl/src/buffer.cpp --- mariadb-5.5-5.5.44/extra/yassl/src/buffer.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/src/buffer.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -165,7 +165,7 @@ void input_buffer::set_current(uint i) { - if (error_ == 0 && (i == 0 || check(i - 1, size_) == 0)) + if (error_ == 0 && check(i ? i - 1 : 0, size_) == 0) current_ = i; else error_ = -1; diff -Nru mariadb-5.5-5.5.44/extra/yassl/src/handshake.cpp mariadb-5.5-5.5.46/extra/yassl/src/handshake.cpp --- mariadb-5.5-5.5.44/extra/yassl/src/handshake.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/src/handshake.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -1172,6 +1172,8 @@ CertificateVerify verify; verify.Build(ssl); + if (ssl.GetError()) return; + RecordLayerHeader rlHeader; HandShakeHeader hsHeader; mySTL::auto_ptr out(NEW_YS output_buffer); diff -Nru mariadb-5.5-5.5.44/extra/yassl/src/ssl.cpp mariadb-5.5-5.5.46/extra/yassl/src/ssl.cpp --- mariadb-5.5-5.5.44/extra/yassl/src/ssl.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/src/ssl.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -37,6 +37,8 @@ #include "file.hpp" // for TaoCrypt Source #include "coding.hpp" // HexDecoder #include "helpers.hpp" // for placement new hack +#include "rsa.hpp" // for TaoCrypt RSA key decode +#include "dsa.hpp" // for TaoCrypt DSA key decode #include #ifdef _WIN32 @@ -54,6 +56,8 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type) { + int ret = SSL_SUCCESS; + if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM) return SSL_BAD_FILETYPE; @@ -141,8 +145,31 @@ } } } + + if (type == PrivateKey && ctx->privateKey_) { + // see if key is valid early + TaoCrypt::Source rsaSource(ctx->privateKey_->get_buffer(), + ctx->privateKey_->get_length()); + TaoCrypt::RSA_PrivateKey rsaKey; + rsaKey.Initialize(rsaSource); + + if (rsaSource.GetError().What()) { + // rsa failed see if DSA works + + TaoCrypt::Source dsaSource(ctx->privateKey_->get_buffer(), + ctx->privateKey_->get_length()); + TaoCrypt::DSA_PrivateKey dsaKey; + dsaKey.Initialize(dsaSource); + + if (rsaSource.GetError().What()) { + // neither worked + ret = SSL_FAILURE; + } + } + } + fclose(input); - return SSL_SUCCESS; + return ret; } diff -Nru mariadb-5.5-5.5.44/extra/yassl/src/yassl_error.cpp mariadb-5.5-5.5.46/extra/yassl/src/yassl_error.cpp --- mariadb-5.5-5.5.44/extra/yassl/src/yassl_error.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/src/yassl_error.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -148,6 +148,10 @@ strncpy(buffer, "sanity check on cipher text size error", max); break; + case rsaSignFault_error: + strncpy(buffer, "rsa signature fault error", max); + break; + // openssl errors case SSL_ERROR_WANT_READ : strncpy(buffer, "the read operation would block", max); diff -Nru mariadb-5.5-5.5.44/extra/yassl/src/yassl_imp.cpp mariadb-5.5-5.5.46/extra/yassl/src/yassl_imp.cpp --- mariadb-5.5-5.5.44/extra/yassl/src/yassl_imp.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/src/yassl_imp.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -196,9 +196,16 @@ sha.update(tmp.get_buffer(), tmp.get_size()); sha.get_digest(&hash[MD5_LEN]); - if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) + if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) { auth->sign(signature_, hash, sizeof(hash), ssl.getCrypto().get_random()); + // check for rsa signautre fault + if (!auth->verify(hash, sizeof(hash), signature_, + auth->get_signatureLength())) { + ssl.SetError(rsaSignFault_error); + return; + } + } else { auth->sign(signature_, &hash[MD5_LEN], SHA_LEN, ssl.getCrypto().get_random()); @@ -2159,6 +2166,12 @@ memcpy(sig.get(), len, VERIFY_HEADER); rsa.sign(sig.get() + VERIFY_HEADER, hashes_.md5_, sizeof(Hashes), ssl.getCrypto().get_random()); + // check for rsa signautre fault + if (!rsa.verify(hashes_.md5_, sizeof(Hashes), sig.get() + VERIFY_HEADER, + rsa.get_cipherLength())) { + ssl.SetError(rsaSignFault_error); + return; + } } else { // DSA DSS dss(cert.get_privateKey(), cert.get_privateKeyLength(), false); diff -Nru mariadb-5.5-5.5.44/extra/yassl/taocrypt/src/asn.cpp mariadb-5.5-5.5.46/extra/yassl/taocrypt/src/asn.cpp --- mariadb-5.5-5.5.44/extra/yassl/taocrypt/src/asn.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/taocrypt/src/asn.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -39,7 +39,7 @@ namespace { // locals -// to the minute +// to the second bool operator>(tm& a, tm& b) { if (a.tm_year > b.tm_year) @@ -60,13 +60,18 @@ a.tm_min > b.tm_min) return true; + if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon && + a.tm_mday == b.tm_mday && a.tm_hour == b.tm_hour && + a.tm_min == b.tm_min && a.tm_sec > b.tm_sec) + return true; + return false; } bool operator<(tm& a, tm&b) { - return !(a>b); + return (b>a); } diff -Nru mariadb-5.5-5.5.44/extra/yassl/taocrypt/src/rsa.cpp mariadb-5.5-5.5.46/extra/yassl/taocrypt/src/rsa.cpp --- mariadb-5.5-5.5.44/extra/yassl/taocrypt/src/rsa.cpp 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/taocrypt/src/rsa.cpp 2015-10-09 16:50:17.000000000 +0000 @@ -140,6 +140,10 @@ void RSA_BlockType1::Pad(const byte* input, word32 inputLen, byte* pkcsBlock, word32 pkcsBlockLen, RandomNumberGenerator&) const { + // sanity checks + if (input == NULL || pkcsBlock == NULL) + return; + // convert from bit length to byte length if (pkcsBlockLen % 8 != 0) { diff -Nru mariadb-5.5-5.5.44/extra/yassl/testsuite/cipher-test.sh mariadb-5.5-5.5.46/extra/yassl/testsuite/cipher-test.sh --- mariadb-5.5-5.5.44/extra/yassl/testsuite/cipher-test.sh 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/extra/yassl/testsuite/cipher-test.sh 2015-10-09 16:50:17.000000000 +0000 @@ -4,6 +4,7 @@ # +no_pid=-1 server_pid=$no_pid diff -Nru mariadb-5.5-5.5.44/mysql-test/disabled.def mariadb-5.5-5.5.46/mysql-test/disabled.def --- mariadb-5.5-5.5.44/mysql-test/disabled.def 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/disabled.def 2015-10-09 16:50:17.000000000 +0000 @@ -11,9 +11,8 @@ ############################################################################## tablespace : disabled in MariaDB (no TABLESPACE table attribute) events_time_zone : Test is not predictable as it depends on precise timing. -lowercase_table3 : Bug#11762269 2010-06-30 alik main.lowercase_table3 on Mac OSX read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists -archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836 file_contents : MDEV-6526 these files are not installed anymore +lowercase_fs_on : lower_case_table_names=0 is not an error until 10.1 diff -Nru mariadb-5.5-5.5.44/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test mariadb-5.5-5.5.46/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test --- mariadb-5.5-5.5.44/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2015-10-09 16:50:17.000000000 +0000 @@ -228,7 +228,7 @@ create table t0 (n int); insert t0 select * from t1; set autocommit=1; -insert into t0 select GET_LOCK("lock1",null); +insert into t0 select GET_LOCK("lock1",0); set autocommit=0; create table t2 (n int) engine=innodb; insert into t2 values (3); diff -Nru mariadb-5.5-5.5.44/mysql-test/include/restart_mysqld.inc mariadb-5.5-5.5.46/mysql-test/include/restart_mysqld.inc --- mariadb-5.5-5.5.44/mysql-test/include/restart_mysqld.inc 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/include/restart_mysqld.inc 2015-10-09 16:50:17.000000000 +0000 @@ -1,3 +1,8 @@ +# ==== Usage ==== +# +# [--let $shutdown_timeout= 30] +# [--let $allow_rpl_inited= 1] +# --source include/restart_mysqld.inc if ($rpl_inited) { @@ -7,6 +12,16 @@ } } +--let $server_shutdown_timeout= 10 +if ($shutdown_timeout) +{ + --let $server_shutdown_timeout= $shutdown_timeout +} +if ($shutdown_timeout == 0) +{ + --let $server_shutdown_timeout= 0 +} + # Write file to make mysql-test-run.pl expect the "crash", but don't start # it until it's told to --let $_server_id= `SELECT @@server_id` @@ -15,7 +30,7 @@ # Send shutdown to the connected server and give # it 10 seconds to die before zapping it -shutdown_server 10; +shutdown_server $server_shutdown_timeout; # Write file to make mysql-test-run.pl start up the server again --exec echo "restart" > $_expect_file_name diff -Nru mariadb-5.5-5.5.44/mysql-test/mysql-test-run.pl mariadb-5.5-5.5.46/mysql-test/mysql-test-run.pl --- mariadb-5.5-5.5.44/mysql-test/mysql-test-run.pl 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/mysql-test-run.pl 2015-10-09 16:50:17.000000000 +0000 @@ -4806,6 +4806,7 @@ qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|, qr|Failed to setup SSL|, qr|SSL error: Failed to set ciphers to use|, + qr/Plugin 'InnoDB' will be forced to shutdown/, ); my $matched_lines= []; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/func_gconcat.result mariadb-5.5-5.5.46/mysql-test/r/func_gconcat.result --- mariadb-5.5-5.5.44/mysql-test/r/func_gconcat.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/func_gconcat.result 2015-10-09 16:50:18.000000000 +0000 @@ -1103,3 +1103,19 @@ field c,c drop table t3, t2, t1; +# +# MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd +# execution of PS +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(2); +PREPARE stmt FROM "SELECT GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0) FROM t1 AS t1a, t1 AS t1b GROUP BY t1a.a"; +EXECUTE stmt; +GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0) +1,1 +2,2 +EXECUTE stmt; +GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0) +1,1 +2,2 +DROP TABLE t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/func_if.result mariadb-5.5-5.5.46/mysql-test/r/func_if.result --- mariadb-5.5-5.5.44/mysql-test/r/func_if.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/func_if.result 2015-10-09 16:50:18.000000000 +0000 @@ -234,3 +234,20 @@ if(1, NULL, (SELECT min('hello'))) NULL End of 5.2 tests +# +# MDEV-8663: IF Statement returns multiple values erroneously +# (or Assertion `!null_value' failed in Item::send(Protocol*, String*) +# +CREATE TABLE `t1` ( +`datas` VARCHAR(25) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +Warnings: +Warning 1286 Unknown storage engine 'InnoDB' +Warning 1266 Using storage engine MyISAM for table 't1' +INSERT INTO `t1` VALUES ('1,2'), ('2,3'), ('3,4'); +SELECT IF(FIND_IN_SET('1', `datas`), 1.5, IF(FIND_IN_SET('2', `datas`), 2, NULL)) AS `First`, '1' AS `Second`, '2' AS `Third` FROM `t1`; +First Second Third +1.5 1 2 +2.0 1 2 +NULL 1 2 +drop table t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/func_misc.result mariadb-5.5-5.5.46/mysql-test/r/func_misc.result --- mariadb-5.5-5.5.44/mysql-test/r/func_misc.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/func_misc.result 2015-10-09 16:50:18.000000000 +0000 @@ -361,5 +361,216 @@ drop view v_merge, vm; drop table t1,tv; # +# MDEV-4017 - GET_LOCK() with negative timeouts has strange behavior +# +SELECT GET_LOCK('ul1', NULL); +GET_LOCK('ul1', NULL) +NULL +Warnings: +Warning 1411 Incorrect timeout value: 'NULL' for function get_lock +SELECT GET_LOCK('ul1', -1); +GET_LOCK('ul1', -1) +NULL +Warnings: +Warning 1411 Incorrect timeout value: '-1' for function get_lock +# +# MDEV-8624 MariaDB hangs on query with many logical condition +# +CREATE TABLE `t1` ( +`id` int(11) NOT NULL AUTO_INCREMENT, +`submitdate` datetime DEFAULT NULL, +`lastpage` int(11) DEFAULT NULL, +`startlanguage` varchar(20) COLLATE utf8_unicode_ci NOT NULL, +`token` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL, +`datestamp` datetime NOT NULL, +`startdate` datetime NOT NULL, +`ipaddr` text COLLATE utf8_unicode_ci, +`refurl` text COLLATE utf8_unicode_ci, +`57813X540X1723` text COLLATE utf8_unicode_ci, +`57813X540X1724` text COLLATE utf8_unicode_ci, +`57813X540X1725` text COLLATE utf8_unicode_ci, +`57813X540X1726` double DEFAULT NULL, +`57813X540X1909` double DEFAULT NULL, +`57813X541X17271` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X541X17272` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X541X17273` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X541X17274` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X541X17275` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X541X17276` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X541X17281` text COLLATE utf8_unicode_ci, +`57813X541X17282` text COLLATE utf8_unicode_ci, +`57813X541X17283` text COLLATE utf8_unicode_ci, +`57813X541X17284` text COLLATE utf8_unicode_ci, +`57813X541X17285` text COLLATE utf8_unicode_ci, +`57813X541X17286` text COLLATE utf8_unicode_ci, +`57813X542X18131` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18132` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18133` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18134` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18135` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18136` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18137` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18138` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18139` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X542X18141` text COLLATE utf8_unicode_ci, +`57813X542X18142` text COLLATE utf8_unicode_ci, +`57813X542X18143` text COLLATE utf8_unicode_ci, +`57813X542X18144` text COLLATE utf8_unicode_ci, +`57813X542X18145` text COLLATE utf8_unicode_ci, +`57813X542X18146` text COLLATE utf8_unicode_ci, +`57813X542X18147` text COLLATE utf8_unicode_ci, +`57813X542X18148` text COLLATE utf8_unicode_ci, +`57813X542X18149` text COLLATE utf8_unicode_ci, +`57813X543X18451` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X543X18452` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X543X18453` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X543X18454` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X543X18455` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X543X18456` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X543X18461` text COLLATE utf8_unicode_ci, +`57813X543X18462` text COLLATE utf8_unicode_ci, +`57813X543X18463` text COLLATE utf8_unicode_ci, +`57813X543X18464` text COLLATE utf8_unicode_ci, +`57813X543X18465` text COLLATE utf8_unicode_ci, +`57813X543X18466` text COLLATE utf8_unicode_ci, +`57813X544X18711` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18712` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18713` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18714` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18715` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18716` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18717` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18718` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X544X18721` text COLLATE utf8_unicode_ci, +`57813X544X18722` text COLLATE utf8_unicode_ci, +`57813X544X18723` text COLLATE utf8_unicode_ci, +`57813X544X18724` text COLLATE utf8_unicode_ci, +`57813X544X18725` text COLLATE utf8_unicode_ci, +`57813X544X18726` text COLLATE utf8_unicode_ci, +`57813X544X18727` text COLLATE utf8_unicode_ci, +`57813X544X18728` text COLLATE utf8_unicode_ci, +`57813X546X1902` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X546X1903` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X546X1904` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, +`57813X545X1901` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, +PRIMARY KEY (`id`), +KEY `lime_survey_57813_idx` (`token`), +KEY `57813X540X1723` (`57813X540X1723`(100)), +KEY `57813X540X1724` (`57813X540X1724`(100)), +KEY `57813X540X1726` (`57813X540X1726`), +KEY `57813X540X1725` (`57813X540X1725`(100)), +KEY `57813X546X1902` (`57813X546X1902`), +KEY `57813X546X1903` (`57813X546X1903`), +KEY `57813X546X1904` (`57813X546X1904`) +); +SELECT +COUNT(*) as `N`, +ROUND( +( +SUM( +( +( +IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 57813X541X17271, 0 ) + +IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 57813X541X17272, 0 ) + +IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 57813X541X17273, 0 ) + +IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 57813X541X17274, 0 ) + +IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 57813X541X17275, 0 ) + +IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 57813X541X17276, 0 ) + +IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 57813X542X18131, 0 ) + +IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 57813X542X18132, 0 ) + +IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 57813X542X18133, 0 ) + +IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 57813X542X18134, 0 ) + +IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 57813X542X18135, 0 ) + +IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 57813X542X18136, 0 ) + +IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 57813X542X18137, 0 ) + +IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 57813X542X18138, 0 ) + +IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 57813X542X18139, 0 ) + +IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 57813X543X18451, 0 ) + +IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 57813X543X18452, 0 ) + +IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 57813X543X18453, 0 ) + +IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 57813X543X18454, 0 ) + +IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 57813X543X18455, 0 ) + +IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 57813X543X18456, 0 ) + +IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 57813X544X18711, 0 ) + +IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 57813X544X18712, 0 ) + +IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 57813X544X18713, 0 ) + +IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 57813X544X18714, 0 ) + +IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 57813X544X18715, 0 ) + +IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 57813X544X18716, 0 ) + +IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 57813X544X18717, 0 ) + +IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 57813X544X18718, 0 ) +) +/ +( +IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 1, 0 ) + +IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 1, 0 ) + +IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 1, 0 ) + +IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 1, 0 ) + +IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 1, 0 ) + +IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 1, 0 ) + +IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 1, 0 ) + +IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 1, 0 ) + +IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 1, 0 ) + +IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 1, 0 ) + +IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 1, 0 ) + +IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 1, 0 ) + +IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 1, 0 ) + +IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 1, 0 ) + +IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 1, 0 ) + +IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 1, 0 ) + +IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 1, 0 ) + +IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 1, 0 ) + +IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 1, 0 ) + +IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 1, 0 ) + +IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 1, 0 ) + +IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 1, 0 ) + +IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 1, 0 ) + +IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 1, 0 ) + +IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 1, 0 ) + +IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 1, 0 ) + +IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 1, 0 ) + +IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 1, 0 ) + +IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 1, 0 ) +) +) +) +/ COUNT(*) ), 4) as `AVG` +FROM `t1` +WHERE `submitdate` IS NOT NULL +AND ( +( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99' ) OR +( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99' ) OR +( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99' ) OR +( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99' ) OR +( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99' ) OR +( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99' ) OR +( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99' ) OR +( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99' ) OR +( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99' ) OR +( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99' ) OR +( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99' ) OR +( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99' ) OR +( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99' ) OR +( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99' ) OR +( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99' ) OR +( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99' ) OR +( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99' ) OR +( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99' ) OR +( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99' ) OR +( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99' ) OR +( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99' ) OR +( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99' ) OR +( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99' ) OR +( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99' ) OR +( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99' ) OR +( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99' ) OR +( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99' ) OR +( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99' ) OR +( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99' ) ) +AND 57813X540X1723 = 'Test'; +N AVG +0 NULL +drop table t1; +# # End of 5.5 tests # diff -Nru mariadb-5.5-5.5.44/mysql-test/r/information_schema2.result mariadb-5.5-5.5.46/mysql-test/r/information_schema2.result --- mariadb-5.5-5.5.44/mysql-test/r/information_schema2.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/information_schema2.result 2015-10-09 16:50:18.000000000 +0000 @@ -6,15 +6,15 @@ (select variable_name from information_schema.session_variables where variable_name = 'basedir'); variable_name BASEDIR -create table t1 (a char); -insert t1 values ('a'),('t'),('z'); -flush status; -select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1; -a exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) -a 0 -t 1 -z 0 -show status like 'created_tmp_tables'; -Variable_name Value -Created_tmp_tables 38 -drop table t1; +create table t1 (x int); +create table t2 (x int); +create table t3 (x int); +create table t4 AS select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE' ; +delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE'); +select * from t4; +table_name +t1 +t2 +t3 +t4 +drop table t1, t2, t3, t4; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/innodb_load_xa.result mariadb-5.5-5.5.46/mysql-test/r/innodb_load_xa.result --- mariadb-5.5-5.5.44/mysql-test/r/innodb_load_xa.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/innodb_load_xa.result 2015-10-09 16:50:18.000000000 +0000 @@ -18,3 +18,5 @@ mysqld-bin.000001 # Query # # COMMIT drop table t1; uninstall plugin innodb; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown diff -Nru mariadb-5.5-5.5.44/mysql-test/r/loadxml.result mariadb-5.5-5.5.46/mysql-test/r/loadxml.result --- mariadb-5.5-5.5.44/mysql-test/r/loadxml.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/loadxml.result 2015-10-09 16:50:18.000000000 +0000 @@ -93,3 +93,30 @@ 216 !&bb b; 3 !b3 DROP TABLE t1; +# +# Bug#16171518 LOAD XML DOES NOT HANDLE EMPTY ELEMENTS +# +CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 VARCHAR(3), col4 VARCHAR(4)); +LOAD XML INFILE '../../std_data/bug16171518_1.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY col1, col2, col3, col4; +col1 col2 col3 col4 +0bc def ghi jkl +1no NULL pqr stu +2BC DEF GHI JKL +3NO NULL PQR STU +4bc def ghi jkl +5no pqr stu vwx +6BC DEF NULL JKL +7NO PQR STU VWX +8bc def ghi NULL +9kl NULL mno pqr +ABC DEF NULL JKL +MNO NULL STU VWX +DROP TABLE t1; +CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 INTEGER); +LOAD XML INFILE '../../std_data/bug16171518_2.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY col1, col2, col3; +col1 col2 col3 +ABC DEF NULL +GHI NULL 123 +DROP TABLE t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/lowercase_fs_on.result mariadb-5.5-5.5.46/mysql-test/r/lowercase_fs_on.result --- mariadb-5.5-5.5.44/mysql-test/r/lowercase_fs_on.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/lowercase_fs_on.result 2015-10-09 16:50:18.000000000 +0000 @@ -0,0 +1,3 @@ +# +# Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO PROBLEMS +# diff -Nru mariadb-5.5-5.5.44/mysql-test/r/lowercase_table3.result mariadb-5.5-5.5.46/mysql-test/r/lowercase_table3.result --- mariadb-5.5-5.5.44/mysql-test/r/lowercase_table3.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/lowercase_table3.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -call mtr.add_suppression("Cannot find or open table test/BUG29839 from"); -DROP TABLE IF EXISTS t1,T1; -CREATE TABLE t1 (a INT); -SELECT * FROM T1; -a -FLUSH TABLES; -DROP TABLE t1; -CREATE TABLE bug29839 (a INT) ENGINE=INNODB; -SELECT * FROM BUG29839; -ERROR 42S02: Table 'test.BUG29839' doesn't exist -DROP TABLE bug29839; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/merge_recover.result mariadb-5.5-5.5.46/mysql-test/r/merge_recover.result --- mariadb-5.5-5.5.44/mysql-test/r/merge_recover.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/merge_recover.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -# -# Test of MyISAM MRG tables with corrupted children. -# Run with --myisam-recover=force option. -# -# Preparation: we need to make sure that the merge parent -# is never left in the table cache when closed, since this may -# have effect on merge children. -# For that, we set the table cache to minimal size and populate it -# in a concurrent connection. -# -# Switching to connection con1 -# -# -# Minimal values. -# -call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:"); -call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table"); -call mtr.add_suppression(" '\..test.t1'"); -set global table_open_cache=256; -set global table_definition_cache=400; -drop procedure if exists p_create; -create procedure p_create() -begin -declare i int default 1; -set @lock_table_stmt="lock table "; -set @drop_table_stmt="drop table "; -while i < @@global.table_definition_cache + 1 do -set @table_name=concat("t_", i); -set @opt_comma=if(i=1, "", ", "); -set @lock_table_stmt=concat(@lock_table_stmt, @opt_comma, -@table_name, " read"); -set @drop_table_stmt=concat(@drop_table_stmt, @opt_comma, @table_name); -set @create_table_stmt=concat("create table if not exists ", -@table_name, " (a int)"); -prepare stmt from @create_table_stmt; -execute stmt; -deallocate prepare stmt; -set i= i+1; -end while; -end| -call p_create(); -drop procedure p_create; -# -# Switching to connection 'default' -# -# -# We have to disable the ps-protocol, to avoid -# "Prepared statement needs to be re-prepared" errors -# -- table def versions change all the time with full table cache. -# -drop table if exists t1, t1_mrg, t1_copy; -# -# Prepare a MERGE engine table, that refers to a corrupted -# child. -# -create table t1 (a int, key(a)) engine=myisam; -create table t1_mrg (a int) union (t1) engine=merge; -# -# Create a table with a corrupted index file: -# save an old index file, insert more rows, -# overwrite the new index file with the old one. -# -insert into t1 (a) values (1), (2), (3); -flush table t1; -insert into t1 (a) values (4), (5), (6); -flush table t1; -# check table is needed to mark the table as crashed. -check table t1; -Table Op Msg_type Msg_text -test.t1 check warning Size of datafile is: 42 Should be: 21 -test.t1 check error Record-count is not ok; is 6 Should be: 3 -test.t1 check warning Found 6 key parts. Should be: 3 -test.t1 check error Corrupt -# -# At this point we have a merge table t1_mrg pointing to t1, -# and t1 is corrupted, and will be auto-repaired at open. -# Check that this doesn't lead to memory corruption. -# -select * from t1_mrg; -a -1 -2 -3 -4 -5 -6 -Warnings: -Error 145 Table 't1' is marked as crashed and should be repaired -Error 1194 Table 't1' is marked as crashed and should be repaired -Error 1034 Number of rows changed from 3 to 6 -# -# Cleanup -# -drop table t1, t1_mrg; -# -# Switching to connection con1 -# -unlock tables; -prepare stmt from @drop_table_stmt; -execute stmt; -deallocate prepare stmt; -set @@global.table_definition_cache=default; -set @@global.table_open_cache=default; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/myisam_recover.result mariadb-5.5-5.5.46/mysql-test/r/myisam_recover.result --- mariadb-5.5-5.5.44/mysql-test/r/myisam_recover.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/myisam_recover.result 2015-10-09 16:50:18.000000000 +0000 @@ -0,0 +1,150 @@ +# +# Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted +# children.. +# +# Run with --myisam-recover=force option. +# +# Preparation: we need to make sure that the merge parent +# is never left in the table cache when closed, since this may +# have effect on merge children. +# For that, we set the table cache to minimal size and populate it +# in a concurrent connection. +# +# Switching to connection con1 +# +# +# Minimal values. +# +call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:"); +call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table"); +call mtr.add_suppression(" '\..test.t1'"); +set global table_open_cache=256; +set global table_definition_cache=400; +drop procedure if exists p_create; +create procedure p_create() +begin +declare i int default 1; +set @lock_table_stmt="lock table "; +set @drop_table_stmt="drop table "; +while i < @@global.table_definition_cache + 1 do +set @table_name=concat("t_", i); +set @opt_comma=if(i=1, "", ", "); +set @lock_table_stmt=concat(@lock_table_stmt, @opt_comma, +@table_name, " read"); +set @drop_table_stmt=concat(@drop_table_stmt, @opt_comma, @table_name); +set @create_table_stmt=concat("create table if not exists ", +@table_name, " (a int)"); +prepare stmt from @create_table_stmt; +execute stmt; +deallocate prepare stmt; +set i= i+1; +end while; +end| +call p_create(); +drop procedure p_create; +# +# Switching to connection 'default' +# +# +# We have to disable the ps-protocol, to avoid +# "Prepared statement needs to be re-prepared" errors +# -- table def versions change all the time with full table cache. +# +drop table if exists t1, t1_mrg, t1_copy; +# +# Prepare a MERGE engine table, that refers to a corrupted +# child. +# +create table t1 (a int, key(a)) engine=myisam; +create table t1_mrg (a int) union (t1) engine=merge; +# +# Create a table with a corrupted index file: +# save an old index file, insert more rows, +# overwrite the new index file with the old one. +# +insert into t1 (a) values (1), (2), (3); +flush table t1; +insert into t1 (a) values (4), (5), (6); +flush table t1; +# check table is needed to mark the table as crashed. +check table t1; +Table Op Msg_type Msg_text +test.t1 check warning Size of datafile is: 42 Should be: 21 +test.t1 check error Record-count is not ok; is 6 Should be: 3 +test.t1 check warning Found 6 key parts. Should be: 3 +test.t1 check error Corrupt +# +# At this point we have a merge table t1_mrg pointing to t1, +# and t1 is corrupted, and will be auto-repaired at open. +# Check that this doesn't lead to memory corruption. +# +select * from t1_mrg; +a +1 +2 +3 +4 +5 +6 +Warnings: +Error 145 Table 't1' is marked as crashed and should be repaired +Error 1194 Table 't1' is marked as crashed and should be repaired +Error 1034 Number of rows changed from 3 to 6 +# +# Cleanup +# +drop table t1, t1_mrg; +# +# Switching to connection con1 +# +unlock tables; +prepare stmt from @drop_table_stmt; +execute stmt; +deallocate prepare stmt; +set @@global.table_definition_cache=default; +set @@global.table_open_cache=default; +# +# 18075170 - sql node restart required to avoid deadlock after +# restore +# +# Check that auto-repair for MyISAM tables can now happen in the +# middle of transaction, without aborting it. +create table t1 (a int, key(a)) engine=myisam; +create table t2 (a int); +insert into t2 values (1); +# Create a table with a corrupted index file: +# save an old index file, insert more rows, +# overwrite the new index file with the old one. +insert into t1 (a) values (1); +flush table t1; +insert into t1 (a) values (4); +flush table t1; +# Check table is needed to mark the table as crashed. +check table t1; +Table Op Msg_type Msg_text +test.t1 check warning Size of datafile is: 14 Should be: 7 +test.t1 check error Record-count is not ok; is 2 Should be: 1 +test.t1 check warning Found 2 key parts. Should be: 1 +test.t1 check error Corrupt +# At this point we have a corrupt t1 +set autocommit = 0; +select * from t2; +a +1 +# Without fix select from t1 will break the transaction. After the fix +# transaction should be active and should hold lock on table t2. Alter +# table from con2 will wait only if the transaction is not broken. +select * from t1; +a +1 +4 +Warnings: +Error 145 Table 't1' is marked as crashed and should be repaired +Error 1194 Table 't1' is marked as crashed and should be repaired +Error 1034 Number of rows changed from 1 to 2 +ALTER TABLE t2 ADD val INT; +# With fix we should have alter table waiting for t2 lock here. +ROLLBACK; +SET autocommit = 1; +# Cleanup +drop table t1, t2; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/mysqldump.result mariadb-5.5-5.5.46/mysql-test/r/mysqldump.result --- mariadb-5.5-5.5.44/mysql-test/r/mysqldump.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/mysqldump.result 2015-10-09 16:50:18.000000000 +0000 @@ -4292,7 +4292,6 @@ aberrant aberration drop table words; -mysqlimport: Error: 1146, Table 'test.words' doesn't exist, when using table: words drop table t1; drop table t2; drop table words2; @@ -5281,6 +5280,34 @@ # # End of 5.1 tests # +# +# Bug #20772273 : MYSQLIMPORT --USE-THREADS DOESN'T USE MULTIPLE THREADS +# +CREATE DATABASE db_20772273; +USE db_20772273; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1), (2); +CREATE TABLE t2(a INT); +INSERT INTO t2 VALUES (3), (4); +SELECT * FROM t1; +a +1 +2 +SELECT * FROM t2; +a +3 +4 +SELECT * FROM t1; +a +1 +2 +SELECT * FROM t2; +a +3 +4 +DROP TABLE t1; +DROP TABLE t2; +DROP DATABASE db_20772273; Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...] OR mysqldump [OPTIONS] --all-databases [OPTIONS] diff -Nru mariadb-5.5-5.5.44/mysql-test/r/partition_error.result mariadb-5.5-5.5.46/mysql-test/r/partition_error.result --- mariadb-5.5-5.5.44/mysql-test/r/partition_error.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/partition_error.result 2015-10-09 16:50:18.000000000 +0000 @@ -1089,7 +1089,7 @@ subpartition by hash (sin(a+b)) (partition x1 (subpartition x11, subpartition x12), partition x2 (subpartition x21, subpartition x22)); -ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning +ERROR HY000: This partition function is not allowed select load_file('$MYSQLD_DATADIR/test/t1.par'); load_file('$MYSQLD_DATADIR/test/t1.par') NULL diff -Nru mariadb-5.5-5.5.44/mysql-test/r/sp-group.result mariadb-5.5-5.5.46/mysql-test/r/sp-group.result --- mariadb-5.5-5.5.44/mysql-test/r/sp-group.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/sp-group.result 2015-10-09 16:50:18.000000000 +0000 @@ -0,0 +1,156 @@ +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +drop view if exists view_t1; +Warnings: +Note 1051 Unknown table 'test.view_t1' +SET sql_mode=ONLY_FULL_GROUP_BY; +CREATE TABLE t1 ( +pk INT, +f0 INT, f1 INT, f2 INT, f3 INT, f4 INT, +f5 INT, f6 INT, f7 INT, f8 INT, f9 INT, +PRIMARY KEY (pk) +); +CREATE VIEW view_t1 AS SELECT * FROM t1; +CREATE PROCEDURE s1() +SELECT * FROM ( +INFORMATION_SCHEMA.`INNODB_BUFFER_PAGE_LRU` AS table1 +LEFT JOIN test.view_t1 AS table2 +ON ( table2.`f6` = table1.FREE_PAGE_CLOCK) +) +ORDER BY table1.NUMBER_RECORDS +LIMIT 0 +; +CALL s1; +POOL_ID LRU_POSITION SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE COMPRESSED IO_FIX IS_OLD FREE_PAGE_CLOCK pk f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 +CALL s1; +POOL_ID LRU_POSITION SPACE PAGE_NUMBER PAGE_TYPE FLUSH_TYPE FIX_COUNT IS_HASHED NEWEST_MODIFICATION OLDEST_MODIFICATION ACCESS_TIME TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE COMPRESSED_SIZE COMPRESSED IO_FIX IS_OLD FREE_PAGE_CLOCK pk f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 +drop table t1; +drop view view_t1; +drop procedure s1; +CREATE TABLE A ( +pk INTEGER AUTO_INCREMENT, +col_int_key INTEGER, +col_varchar_key VARCHAR(1), +PRIMARY KEY (pk) +) ENGINE=MyISAM; +CREATE VIEW view_A AS SELECT * FROM A; +CREATE TABLE C ( +pk INTEGER AUTO_INCREMENT, +col_int_nokey INTEGER, +col_int_key INTEGER, +col_date_key DATE, +col_date_nokey DATE, +col_time_key TIME, +col_time_nokey TIME, +col_datetime_key DATETIME, +col_datetime_nokey DATETIME, +col_varchar_key VARCHAR(1), +col_varchar_nokey VARCHAR(1), +PRIMARY KEY (pk) +) ENGINE=MyISAM; +CREATE VIEW view_C AS SELECT * FROM C; +CREATE TABLE AA ( +pk INTEGER AUTO_INCREMENT, +col_int_nokey INTEGER, +col_int_key INTEGER, +col_date_key DATE, +col_date_nokey DATE, +col_time_key TIME, +col_time_nokey TIME, +col_datetime_key DATETIME, +col_datetime_nokey DATETIME, +col_varchar_key VARCHAR(1), +col_varchar_nokey VARCHAR(1), +PRIMARY KEY (pk), +KEY (col_varchar_key, col_int_key) +) ENGINE=MyISAM; +CREATE VIEW view_AA AS SELECT * FROM AA; +CREATE TABLE BB ( +pk INTEGER AUTO_INCREMENT, +col_int_key INTEGER, +col_varchar_key VARCHAR(1), +col_varchar_nokey VARCHAR(1), +PRIMARY KEY (pk), +KEY (col_varchar_key, col_int_key) +) ENGINE=MyISAM; +CREATE VIEW view_BB AS SELECT * FROM BB; +CREATE TABLE DD ( +pk INTEGER AUTO_INCREMENT, +col_int_key INTEGER, +col_date_key DATE, +col_time_key TIME, +col_datetime_key DATETIME, +col_varchar_key VARCHAR(1), +PRIMARY KEY (pk), +KEY (col_varchar_key, col_int_key) +) ENGINE=MyISAM; +CREATE VIEW view_DD AS SELECT * FROM DD; +CREATE TRIGGER k BEFORE INSERT ON `DD` FOR EACH ROW INSERT INTO `view_BB` SELECT * FROM `view_A` LIMIT 0 ; +CREATE TRIGGER r BEFORE INSERT ON `A` FOR EACH ROW INSERT INTO `view_AA` SELECT * FROM `view_C` LIMIT 0 ; +ALTER TABLE `DD` DROP PRIMARY KEY; +ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key +INSERT INTO `view_A` ( `pk` ) VALUES (NULL); +INSERT INTO `DD` ( `pk` ) VALUES (NULL); +INSERT INTO `A` ( `pk` ) VALUES (NULL); +INSERT INTO `view_DD` ( `pk` ) VALUES (NULL); +drop trigger r; +drop trigger k; +drop view view_A,view_AA,view_C,view_BB,view_DD; +drop table A,C,AA,BB,DD; +CREATE TABLE A ( +i INT, +i1 INT, +i2 INT, +d1 DATE, +d2 DATE, +col_time_nokey1 TIME, +col_time_nokey2 TIME, +col_datetime_nokey1 DATETIME, +col_datetime_nokey2 DATETIME, +col_varchar_nokey1 VARCHAR(1), +col_varchar_nokey2 VARCHAR(1) +) ENGINE=MyISAM; +CREATE VIEW view_A AS SELECT * FROM A; +CREATE TABLE B ( +col_varchar_nokey VARCHAR(1) +) ENGINE=MyISAM; +CREATE TABLE AA ( +i INT, +i1 INT, +i2 INT, +d1 DATE, +d2 DATE, +col_time_nokey1 TIME, +col_time_nokey2 TIME, +col_datetime_nokey1 DATETIME, +col_datetime_nokey2 DATETIME, +col_varchar_nokey1 VARCHAR(1), +col_varchar_nokey2 VARCHAR(1) +) ENGINE=MyISAM; +CREATE VIEW view_AA AS SELECT * FROM AA; +CREATE TABLE DD ( +i INT, +i1 INT, +i2 INT, +d1 DATE, +d2 DATE, +col_time_nokey1 TIME, +col_time_nokey2 TIME, +col_datetime_nokey1 DATETIME, +col_datetime_nokey2 DATETIME, +col_varchar_nokey1 VARCHAR(1), +col_varchar_nokey2 VARCHAR(1) +) ENGINE=MyISAM; +CREATE VIEW view_DD AS SELECT * FROM DD; +CREATE TRIGGER tr1 BEFORE INSERT ON `AA` FOR EACH ROW INSERT INTO `view_A` SELECT * FROM `view_AA` LIMIT 0 ; +CREATE TRIGGER tr2 BEFORE INSERT ON `B` FOR EACH ROW INSERT INTO `D` SELECT * FROM `A` LIMIT 0 ; +INSERT INTO `view_AA` ( `i` ) VALUES (1); +INSERT INTO `AA` ( `i` ) VALUES (2); +DELETE FROM `B`; +INSERT INTO `view_DD` ( `i` ) VALUES (1); +INSERT INTO `view_AA` ( `i` ) VALUES (3); +drop trigger tr1; +drop trigger tr2; +drop view view_A, view_AA,view_DD; +drop table A,B,AA,DD; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect_mat.result mariadb-5.5-5.5.46/mysql-test/r/subselect_mat.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect_mat.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect_mat.result 2015-10-09 16:50:19.000000000 +0000 @@ -2145,6 +2145,24 @@ drop database mysqltest2; drop database mysqltest3; drop database mysqltest4; +# +# MDEV-7810 Wrong result on execution of a query as a PS +# (both 1st and further executions) +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); +SELECT a FROM (SELECT DISTINCT * FROM t1) AS sq WHERE a IN (SELECT MIN(t2.a) FROM (t1 AS t2)); +a +0 +PREPARE stmt FROM " +SELECT a FROM (SELECT DISTINCT * FROM t1) AS sq WHERE a IN (SELECT MIN(t2.a) FROM (t1 AS t2)) +"; +execute stmt; +a +0 +execute stmt; +a +0 +drop table t1; # End of 5.5 tests set @subselect_mat_test_optimizer_switch_value=null; set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off'; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect_no_mat.result mariadb-5.5-5.5.46/mysql-test/r/subselect_no_mat.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect_no_mat.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect_no_mat.result 2015-10-09 16:50:19.000000000 +0000 @@ -88,7 +88,7 @@ select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; @@ -3594,7 +3594,7 @@ drop table t1, t2; CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); -ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ERROR 42S22: Unknown column 'no_such_column' in 'where clause' SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); @@ -7012,6 +7012,72 @@ exists(select 1 from t1 group by `c` in (select `c` from t1)) 0 drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +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 table3.column3 IN ( SELECT 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; set optimizer_switch=default; select @@optimizer_switch like '%materialization=on%'; @@optimizer_switch like '%materialization=on%' diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect_no_opts.result mariadb-5.5-5.5.46/mysql-test/r/subselect_no_opts.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect_no_opts.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect_no_opts.result 2015-10-09 16:50:19.000000000 +0000 @@ -84,7 +84,7 @@ select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; @@ -3590,7 +3590,7 @@ drop table t1, t2; CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); -ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ERROR 42S22: Unknown column 'no_such_column' in 'where clause' SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); @@ -7010,4 +7010,70 @@ exists(select 1 from t1 group by `c` in (select `c` from t1)) 0 drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +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 table3.column3 IN ( SELECT 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; set @optimizer_switch_for_subselect_test=null; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect_no_scache.result mariadb-5.5-5.5.46/mysql-test/r/subselect_no_scache.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect_no_scache.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect_no_scache.result 2015-10-09 16:50:19.000000000 +0000 @@ -87,7 +87,7 @@ select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; @@ -3596,7 +3596,7 @@ drop table t1, t2; CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); -ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ERROR 42S22: Unknown column 'no_such_column' in 'where clause' SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); @@ -7021,6 +7021,72 @@ exists(select 1 from t1 group by `c` in (select `c` from t1)) 0 drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +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 table3.column3 IN ( SELECT 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; set optimizer_switch=default; select @@optimizer_switch like '%subquery_cache=on%'; @@optimizer_switch like '%subquery_cache=on%' diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect_no_semijoin.result mariadb-5.5-5.5.46/mysql-test/r/subselect_no_semijoin.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect_no_semijoin.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect_no_semijoin.result 2015-10-09 16:50:19.000000000 +0000 @@ -84,7 +84,7 @@ select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; @@ -3590,7 +3590,7 @@ drop table t1, t2; CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); -ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ERROR 42S22: Unknown column 'no_such_column' in 'where clause' SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); @@ -7010,5 +7010,71 @@ exists(select 1 from t1 group by `c` in (select `c` from t1)) 0 drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +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 table3.column3 IN ( SELECT 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; set @optimizer_switch_for_subselect_test=null; set @join_cache_level_for_subselect_test=NULL; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect.result mariadb-5.5-5.5.46/mysql-test/r/subselect.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect.result 2015-06-09 20:25:56.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect.result 2015-10-09 16:50:19.000000000 +0000 @@ -81,7 +81,7 @@ select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1))' at line 1 SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; @@ -3590,7 +3590,7 @@ drop table t1, t2; CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); -ERROR 42S22: Unknown column 'no_such_column' in 'where clause' +ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery' CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1); ERROR 42S22: Unknown column 'no_such_column' in 'where clause' SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1); @@ -7015,3 +7015,69 @@ exists(select 1 from t1 group by `c` in (select `c` from t1)) 0 drop table t1; +# +# MDEV-7565: Server crash with Signal 6 (part 2) +# +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +ControlRev +NULL +# +# MDEV-7445:Server crash with Signal 6 +# +CREATE PROCEDURE procedure2() +BEGIN +Select +(Select Sum(`TestCase`.Revenue) From mysql.slow_log E +Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) +) As `ControlRev` + From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; +END | +call procedure2(); +ControlRev +NULL +call procedure2(); +ControlRev +NULL +drop procedure procedure2; +SELECT +(SELECT user FROM mysql.user +WHERE h.host in (SELECT host FROM mysql.user) +) AS sq +FROM mysql.host h GROUP BY h.host; +sq +# +# MDEV-7846:Server crashes in Item_subselect::fix +#_fields or fails with Thread stack overrun +# +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 table3.column3 IN ( SELECT 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; diff -Nru mariadb-5.5-5.5.44/mysql-test/r/subselect_sj_mat.result mariadb-5.5-5.5.46/mysql-test/r/subselect_sj_mat.result --- mariadb-5.5-5.5.44/mysql-test/r/subselect_sj_mat.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/subselect_sj_mat.result 2015-10-09 16:50:19.000000000 +0000 @@ -2185,4 +2185,22 @@ drop database mysqltest2; drop database mysqltest3; drop database mysqltest4; +# +# MDEV-7810 Wrong result on execution of a query as a PS +# (both 1st and further executions) +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); +SELECT a FROM (SELECT DISTINCT * FROM t1) AS sq WHERE a IN (SELECT MIN(t2.a) FROM (t1 AS t2)); +a +0 +PREPARE stmt FROM " +SELECT a FROM (SELECT DISTINCT * FROM t1) AS sq WHERE a IN (SELECT MIN(t2.a) FROM (t1 AS t2)) +"; +execute stmt; +a +0 +execute stmt; +a +0 +drop table t1; # End of 5.5 tests diff -Nru mariadb-5.5-5.5.44/mysql-test/r/update.result mariadb-5.5-5.5.46/mysql-test/r/update.result --- mariadb-5.5-5.5.44/mysql-test/r/update.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/update.result 2015-10-09 16:50:20.000000000 +0000 @@ -561,6 +561,21 @@ DROP VIEW v1; DROP FUNCTION f1; DROP TABLE t1; +# Bug #21143080: UPDATE ON VARCHAR AND TEXT COLUMNS PRODUCE INCORRECT +# RESULTS +CREATE TABLE t1 (a VARCHAR(50), b TEXT, c CHAR(50)) ENGINE=INNODB; +INSERT INTO t1 (a, b, c) VALUES ('start trail', '', 'even longer string'); +UPDATE t1 SET b = a, a = 'inject'; +SELECT a, b FROM t1; +a b +inject start trail +UPDATE t1 SET b = c, c = 'inject'; +SELECT c, b FROM t1; +c b +inject even longer string +DROP TABLE t1; +# +# MDEV-3948 Assertion `records_are_comparable(table)' fails in compare_record(const TABLE*) on UPDATE with simple AND condition, index_merge+index_merge_intersection, InnoDB # # Verify that UPDATE does the same number of handler_update # operations, no matter if there is ORDER BY or not. diff -Nru mariadb-5.5-5.5.44/mysql-test/r/view.result mariadb-5.5-5.5.46/mysql-test/r/view.result --- mariadb-5.5-5.5.44/mysql-test/r/view.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/r/view.result 2015-10-09 16:50:21.000000000 +0000 @@ -4830,6 +4830,41 @@ v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `col2`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci DROP VIEW v1, v2, v3, v4, v5; # +# BUG#19886430: VIEW CREATION WITH NAMED COLUMNS, OVER UNION, +# IS REJECTED +# Without the patch, reports an error. +CREATE VIEW v1 (fld1, fld2) AS +SELECT 1 AS a, 2 AS b +UNION ALL +SELECT 1 AS a, 1 AS a; +# The column names are explicitly specified and not duplicates, hence +# succeeds. +CREATE VIEW v2 (fld1, fld2) AS +SELECT 1 AS a, 2 AS a +UNION ALL +SELECT 1 AS a, 1 AS a; +# The column name in the first SELECT are not duplicates, hence succeeds. +CREATE VIEW v3 AS +SELECT 1 AS a, 2 AS b +UNION ALL +SELECT 1 AS a, 1 AS a; +# Should report an error, since the explicitly specified column names are +# duplicates. +CREATE VIEW v4 (fld1, fld1) AS +SELECT 1 AS a, 2 AS b +UNION ALL +SELECT 1 AS a, 1 AS a; +ERROR 42S21: Duplicate column name 'fld1' +# Should report an error, since duplicate column name is specified in the +# First SELECT. +CREATE VIEW v4 AS +SELECT 1 AS a, 2 AS a +UNION ALL +SELECT 1 AS a, 1 AS a; +ERROR 42S21: Duplicate column name 'a' +# Cleanup +DROP VIEW v1, v2, v3; +# # lp:833600 Wrong result with view + outer join + uncorrelated subquery (non-semijoin) # CREATE TABLE t1 ( a int, b int ); @@ -5429,6 +5464,21 @@ v2 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci drop view v2; drop table t1; +# +# MDEV-8554: Server crashes in base_list_iterator::next_fast on 1st execution of PS with a multi-table update +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3),(4); +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (5),(6); +CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3; +PREPARE stmt FROM 'UPDATE t1, t2 SET a = 1 WHERE a IN ( SELECT 0 FROM t3 )'; +UPDATE t1, t2 SET a = 1 WHERE a IN ( SELECT 0 FROM v3 ); +EXECUTE stmt; +DROP TABLE t1, t2, t3; +DROP VIEW v3; # ----------------------------------------------------------------- # -- End of 5.5 tests. # ----------------------------------------------------------------- diff -Nru mariadb-5.5-5.5.44/mysql-test/std_data/bug16171518_1.dat mariadb-5.5-5.5.46/mysql-test/std_data/bug16171518_1.dat --- mariadb-5.5-5.5.44/mysql-test/std_data/bug16171518_1.dat 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/std_data/bug16171518_1.dat 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,59 @@ + + + 0bc + def + ghi + jkl + + + 1no + + pqr + stu + + + + 2BC + DEF + GHI + JKL + + + 3NO + + PQR + STU + + + + + + + 6BC + DEF + + JKL + + + 7NO + PQR + STU + VWX + + + + 8bc + def + ghi + + + + 9kl + + mno + pqr + + + + + diff -Nru mariadb-5.5-5.5.44/mysql-test/std_data/bug16171518_2.dat mariadb-5.5-5.5.46/mysql-test/std_data/bug16171518_2.dat --- mariadb-5.5-5.5.44/mysql-test/std_data/bug16171518_2.dat 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/std_data/bug16171518_2.dat 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,12 @@ + + + ABC + DEF + + + + GHI + + 123 + + diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result --- mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result 2015-10-09 16:50:21.000000000 +0000 @@ -2390,9 +2390,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2483,9 +2483,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2659,9 +2659,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2752,9 +2752,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2832,9 +2832,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2925,9 +2925,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3005,9 +3005,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3178,9 +3178,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3271,9 +3271,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3444,9 +3444,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3537,9 +3537,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3630,9 +3630,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result --- mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result 2015-10-09 16:50:21.000000000 +0000 @@ -2390,9 +2390,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2485,9 +2485,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2663,9 +2663,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2758,9 +2758,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2838,9 +2838,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -2933,9 +2933,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3013,9 +3013,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3188,9 +3188,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3283,9 +3283,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3458,9 +3458,9 @@ ### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3553,9 +3553,9 @@ ### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ @@ -3648,9 +3648,9 @@ ### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */ ### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */ -### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ -### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ +### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */ ### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */ ### @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */ ### @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */ diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result --- mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result 2015-10-09 16:50:21.000000000 +0000 @@ -1409,7 +1409,7 @@ #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET -### @1=000000124.450000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ +### @1=124.45000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1426,7 +1426,7 @@ #010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET -### @1=-000000543.210000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ +### @1=-543.21000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1443,7 +1443,7 @@ #010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE -### @1=000000124.450000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ +### @1=124.45000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */ # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result --- mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result 2015-10-09 16:50:21.000000000 +0000 @@ -258,7 +258,7 @@ create table t0 (n int); insert t0 select * from t1; set autocommit=1; -insert into t0 select GET_LOCK("lock1",null); +insert into t0 select GET_LOCK("lock1",0); set autocommit=0; create table t2 (n int) engine=innodb; insert into t2 values (3); diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result --- mariadb-5.5-5.5.44/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result 2015-10-09 16:50:21.000000000 +0000 @@ -242,7 +242,7 @@ create table t0 (n int); insert t0 select * from t1; set autocommit=1; -insert into t0 select GET_LOCK("lock1",null); +insert into t0 select GET_LOCK("lock1",0); Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. set autocommit=0; @@ -288,7 +288,7 @@ master-bin.000001 # Query # # use `test`; insert t0 select * from t1 master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null) +master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",0) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t1`,`ti` Binary files /tmp/jAAmiRP6OX/mariadb-5.5-5.5.44/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result and /tmp/LyToCXlpkJ/mariadb-5.5-5.5.46/mysql-test/suite/engines/iuds/r/strings_charsets_update_delete.result differ diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/add_constraint.result mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/add_constraint.result --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/add_constraint.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/add_constraint.result 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,13 @@ +# +# Bug #20762798 FK DDL: CRASH IN DICT_FOREIGN_REMOVE_FROM_CACHE +# +create table t1(a int, b int, key(a),key(b))engine=innodb; +create table t2(a int, b int, key(a),key(b))engine=innodb; +alter table t2 add constraint b foreign key (b) references t1(a); +alter table t1 add constraint b1 foreign key (b) references t2(a); +alter table t2 add constraint b1 foreign key (b) references t1(a); +ERROR HY000: Can't create table '#sql-temporary' (errno: 121) +alter table t2 drop foreign key b; +alter table t1 drop foreign key b1; +drop table t2; +drop table t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb_bug68148.result mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb_bug68148.result --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb_bug68148.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb_bug68148.result 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,36 @@ +set global innodb_file_per_table=1; +CREATE TABLE ref_table1 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB; +CREATE TABLE ref_table2 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB; +CREATE TABLE `main` ( +`id` int(11) NOT NULL AUTO_INCREMENT, +`ref_id1` int(11) NOT NULL, +`ref_id2` int(11) NOT NULL, +PRIMARY KEY (`id`), +UNIQUE KEY `idx_1` (`ref_id1`,`ref_id2`), +KEY `FK_set_out_analysis_route_id` (`ref_id2`), +CONSTRAINT `FK_1` FOREIGN KEY (`ref_id1`) REFERENCES `ref_table1` (`id`) , +CONSTRAINT `FK_2` FOREIGN KEY (`ref_id2`) REFERENCES `ref_table2` (`id`) +) ENGINE=InnoDB; +SET FOREIGN_KEY_CHECKS=0; +DROP INDEX `idx_1` ON `main`; +SHOW TABLES; +Tables_in_test +main +ref_table1 +ref_table2 +# restart and see if we can still access the main table +SET FOREIGN_KEY_CHECKS=0; +ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`); +SHOW CREATE TABLE `main`; +Table Create Table +main CREATE TABLE `main` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ref_id1` int(11) NOT NULL, + `ref_id2` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_set_out_analysis_route_id` (`ref_id2`), + KEY `idx_1` (`ref_id1`), + CONSTRAINT `FK_1` FOREIGN KEY (`ref_id1`) REFERENCES `ref_table1` (`id`), + CONSTRAINT `FK_2` FOREIGN KEY (`ref_id2`) REFERENCES `ref_table2` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE main, ref_table1, ref_table2; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb-fk.result mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb-fk.result --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb-fk.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb-fk.result 2015-10-09 16:50:21.000000000 +0000 @@ -50,6 +50,8 @@ ERROR HY000: Can't create table 'test.t2' (errno: 150) show warnings; Level Code Message +Warning 150 Create table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary close to FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE +) ENGINE=InnoDB. Error 1005 Can't create table 'test.t2' (errno: 150) CREATE TABLE t2 ( id int(11) NOT NULL AUTO_INCREMENT, @@ -62,6 +64,7 @@ ERROR HY000: Can't create table '#sql-temporary' (errno: 150) show warnings; Level Code Message +Warning 150 Alter table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary close to FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE. Error 1005 Can't create table '#sql-temporary' (errno: 150) drop table t2; drop table t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb-fk-warnings.result mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb-fk-warnings.result --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb-fk-warnings.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb-fk-warnings.result 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,105 @@ +CREATE TABLE t1 ( +id int(11) NOT NULL PRIMARY KEY, +a int(11) NOT NULL, +b int(11) NOT NULL, +c int not null, +CONSTRAINT test FOREIGN KEY (b) REFERENCES t1 (id) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE t2 ( +id int(11) NOT NULL PRIMARY KEY, +a int(11) NOT NULL, +b int(11) NOT NULL, +c int not null, +CONSTRAINT mytest FOREIGN KEY (c) REFERENCES t1(id), +CONSTRAINT test FOREIGN KEY (b) REFERENCES t2 (id) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +ERROR HY000: Can't create table 'test.t2' (errno: 121) +show warnings; +Level Code Message +Warning 121 Create or Alter table `test`.`t2` with foreign key constraint failed. Foreign key constraint `test/test` already exists on data dictionary. Foreign key constraint names need to be unique in database. Error in foreign key definition: CONSTRAINT `test` FOREIGN KEY (`b`) REFERENCES `test`.`t2` (`id`). +Error 1005 Can't create table 'test.t2' (errno: 121) +drop table t1; +create table t1(a int) engine=innodb; +create table t2(a int, constraint a foreign key a (a) references t1(a)) engine=innodb; +ERROR HY000: Can't create table 'test.t2' (errno: 150) +show warnings; +Level Code Message +Warning 150 Create table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to foreign key a (a) references t1(a)) engine=innodb. +Error 1005 Can't create table 'test.t2' (errno: 150) +drop table t1; +create table t1(a int not null primary key, b int) engine=innodb; +create table t2(a int, b int, constraint a foreign key a (a) references t1(a), +constraint a foreign key a (a) references t1(b)) engine=innodb; +ERROR HY000: Can't create table 'test.t2' (errno: 150) +show warnings; +Level Code Message +Warning 150 Create table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to foreign key a (a) references t1(b)) engine=innodb. +Error 1005 Can't create table 'test.t2' (errno: 150) +create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb; +alter table t2 add constraint b foreign key (b) references t2(b); +ERROR HY000: Can't create table '#sql-temporary' (errno: 150) +show warnings; +Level Code Message +Warning 150 Alter table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to foreign key (b) references t2(b). +Error 1005 Can't create table '#sql-temporary' (errno: 150) +drop table t2, t1; +create table t1 (f1 integer primary key) engine=innodb; +alter table t1 add constraint c1 foreign key (f1) references t11(f1); +ERROR HY000: Can't create table '#sql-temporary' (errno: 150) +show warnings; +Level Code Message +Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary close to foreign key (f1) references t11(f1). +Error 1005 Can't create table '#sql-temporary' (errno: 150) +drop table t1; +create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb; +create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb; +ERROR HY000: Can't create table 'test.t2' (errno: 150) +show warnings; +Level Code Message +Warning 150 Create table `mysqld.1`.`t2` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(a) references t1(a)) engine=innodb. +Error 1005 Can't create table 'test.t2' (errno: 150) +alter table t1 add foreign key(b) references t1(a); +ERROR HY000: Can't create table '#sql-temporary' (errno: 150) +show warnings; +Level Code Message +Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a). +Error 1005 Can't create table '#sql-temporary' (errno: 150) +drop table t1; +create table t1(a int not null primary key, b int, key(b)) engine=innodb; +alter table t1 add foreign key(a,b) references t1(a); +ERROR HY000: Can't create table '#sql-temporary' (errno: 150) +show warnings; +Level Code Message +Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Foreign key constraint parse error in foreign key(a,b) references t1(a) close to ). Too few referenced columns, you have 1 when you should have 2. +Error 1005 Can't create table '#sql-temporary' (errno: 150) +drop table t1; +create table t1(a int not null primary key, b int, key(b)) engine=innodb; +alter table t1 add foreign key(a) references t1(a,b); +ERROR HY000: Can't create table '#sql-temporary' (errno: 150) +show warnings; +Level Code Message +Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Foreign key constraint parse error in foreign key(a) references t1(a,b) close to ). Too few referenced columns, you have 2 when you should have 1. +Error 1005 Can't create table '#sql-temporary' (errno: 150) +drop table t1; +create table t1 (f1 integer not null primary key) engine=innodb; +alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null; +ERROR HY000: Can't create table '#sql-temporary' (errno: 150) +show warnings; +Level Code Message +Warning 150 Alter table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column f1 is defined as NOT NULL in foreign key (f1) references t1(f1) on update set null close to on update set null. +Error 1005 Can't create table '#sql-temporary' (errno: 150) +create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb; +ERROR HY000: Can't create table 'test.t2' (errno: 150) +show warnings; +Level Code Message +Warning 150 Create table `test`.`t2` with foreign key constraint failed. You have defined a SET NULL condition but column a is defined as NOT NULL in foreign key(a) references t1(f1) on delete set null) engine=innodb close to on delete set null) engine=innodb. +Error 1005 Can't create table 'test.t2' (errno: 150) +drop table t1; +create table t1 (id int not null primary key, f1 int, f2 int, key(f1)) engine=innodb; +create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=innodb; +ERROR HY000: Can't create table 'test.t2' (errno: 150) +show warnings; +Level Code Message +Warning 150 Create table `test`.`t2` with foreign key constraint failed. Field type or character set for column a does not mach referenced column f1 close to foreign key(a) references t1(f1)) engine=innodb +Error 1005 Can't create table 'test.t2' (errno: 150) +drop table t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb_uninstall.result mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb_uninstall.result --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/r/innodb_uninstall.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/r/innodb_uninstall.result 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,22 @@ +install plugin innodb soname 'ha_innodb'; +create table t1(a int not null primary key) engine=innodb; +begin; +insert into t1 values(1); +flush tables; +uninstall plugin innodb; +select sleep(1); +sleep(1) +0 +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown +drop table t1; +install plugin innodb soname 'ha_innodb'; +create table t2(a int not null primary key) engine=innodb; +insert into t2 values(1); +drop table t2; +uninstall plugin innodb; +select sleep(1); +sleep(1) +0 +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/add_constraint.test mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/add_constraint.test --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/add_constraint.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/add_constraint.test 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,21 @@ +--source include/have_innodb.inc + +--echo # +--echo # Bug #20762798 FK DDL: CRASH IN DICT_FOREIGN_REMOVE_FROM_CACHE +--echo # + +create table t1(a int, b int, key(a),key(b))engine=innodb; +create table t2(a int, b int, key(a),key(b))engine=innodb; + +alter table t2 add constraint b foreign key (b) references t1(a); +alter table t1 add constraint b1 foreign key (b) references t2(a); + +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +alter table t2 add constraint b1 foreign key (b) references t1(a); + +alter table t2 drop foreign key b; +alter table t1 drop foreign key b1; + +drop table t2; +drop table t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_bug60229-master.opt mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_bug60229-master.opt --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_bug60229-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_bug60229-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lower_case_table_names=0 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_bug60229.test mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_bug60229.test --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_bug60229.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_bug60229.test 2015-10-09 16:50:21.000000000 +0000 @@ -2,6 +2,10 @@ # Bug #13083023 - 60229: BROKEN COMPATIBILITY: ERROR WHILE CREATE TABLE # WITH FOREIGN KEY CONSTRAINT. +#Server variable option 'lower_case_table_names' sets '0' as default value +#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of +#insensitive filsystem is not allowed. +-- source include/have_case_sensitive_file_system.inc -- source include/have_innodb.inc CREATE TABLE PERSON ( diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_bug68148.test mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_bug68148.test --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_bug68148.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_bug68148.test 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,41 @@ +-- source include/have_innodb.inc +-- source include/not_embedded.inc + +# +# Bug #68148: drop index on a foreign key column leads to missing table +# MDEV-8845: Table disappear after modifying FK +# + +set global innodb_file_per_table=1; + +CREATE TABLE ref_table1 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB; + +CREATE TABLE ref_table2 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB; + +CREATE TABLE `main` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ref_id1` int(11) NOT NULL, + `ref_id2` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `idx_1` (`ref_id1`,`ref_id2`), + KEY `FK_set_out_analysis_route_id` (`ref_id2`), + CONSTRAINT `FK_1` FOREIGN KEY (`ref_id1`) REFERENCES `ref_table1` (`id`) , + CONSTRAINT `FK_2` FOREIGN KEY (`ref_id2`) REFERENCES `ref_table2` (`id`) +) ENGINE=InnoDB; + +SET FOREIGN_KEY_CHECKS=0; + +DROP INDEX `idx_1` ON `main`; +SHOW TABLES; + +--echo # restart and see if we can still access the main table +--source include/restart_mysqld.inc + +# This is required to access the table +SET FOREIGN_KEY_CHECKS=0; +ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`); +SHOW CREATE TABLE `main`; + +DROP TABLE main, ref_table1, ref_table2; + + diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb-fk-warnings.test mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb-fk-warnings.test --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb-fk-warnings.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb-fk-warnings.test 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,130 @@ +--source include/have_innodb.inc + +# +# MDEV-8524: Improve error messaging when there is duplicate key or foreign key names +# +CREATE TABLE t1 ( + id int(11) NOT NULL PRIMARY KEY, + a int(11) NOT NULL, + b int(11) NOT NULL, + c int not null, + CONSTRAINT test FOREIGN KEY (b) REFERENCES t1 (id) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +# +# Below create table fails because constraint name test +# is reserved for above table. +# +--error 1005 +CREATE TABLE t2 ( + id int(11) NOT NULL PRIMARY KEY, + a int(11) NOT NULL, + b int(11) NOT NULL, + c int not null, + CONSTRAINT mytest FOREIGN KEY (c) REFERENCES t1(id), + CONSTRAINT test FOREIGN KEY (b) REFERENCES t2 (id) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +show warnings; + +drop table t1; + +# +# MDEV-6697: Improve foreign keys warnings/errors +# + +# +# No index for referenced columns +# +create table t1(a int) engine=innodb; +--error 1005 +create table t2(a int, constraint a foreign key a (a) references t1(a)) engine=innodb; +show warnings; +drop table t1; + +create table t1(a int not null primary key, b int) engine=innodb; +--error 1005 +create table t2(a int, b int, constraint a foreign key a (a) references t1(a), +constraint a foreign key a (a) references t1(b)) engine=innodb; +show warnings; +create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +alter table t2 add constraint b foreign key (b) references t2(b); +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t2, t1; + +# +# Referenced table does not exists +# + +create table t1 (f1 integer primary key) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +alter table t1 add constraint c1 foreign key (f1) references t11(f1); +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t1; + +# +# Foreign key on temporal tables +# + +create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +alter table t1 add foreign key(b) references t1(a); +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t1; + +# +# Column numbers do not match +# +create table t1(a int not null primary key, b int, key(b)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +alter table t1 add foreign key(a,b) references t1(a); +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t1; +create table t1(a int not null primary key, b int, key(b)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +alter table t1 add foreign key(a) references t1(a,b); +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t1; + +# +# ON UPDATE/DELETE SET NULL on NOT NULL column +# +create table t1 (f1 integer not null primary key) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t1; + +# +# Incorrect types +# +create table t1 (id int not null primary key, f1 int, f2 int, key(f1)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1005 +create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=innodb; +--replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +show warnings; +drop table t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_uninstall.opt mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_uninstall.opt --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_uninstall.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_uninstall.opt 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,3 @@ +--ignore-builtin-innodb +--loose-innodb + diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_uninstall.test mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_uninstall.test --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/innodb_uninstall.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/innodb_uninstall.test 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,58 @@ +--source include/not_embedded.inc +--source include/not_windows.inc + +if (!$HA_INNODB_SO) { + --skip Need InnoDB plugin +} + +# +# MDEV-8474: InnoDB sets per-connection data unsafely +# Below test caused hang +# +install plugin innodb soname 'ha_innodb'; +create table t1(a int not null primary key) engine=innodb; + +connect (con1, localhost, root); +connection con1; +begin; +insert into t1 values(1); + +connection default; +flush tables; +send uninstall plugin innodb; + +connection con1; +select sleep(1); +disconnect con1; + +connection default; +reap; + +--source include/restart_mysqld.inc + +drop table t1; + +# +# Another test that caused hang. +# + +connect (con1, localhost, root); +connection con1; +install plugin innodb soname 'ha_innodb'; +create table t2(a int not null primary key) engine=innodb; +insert into t2 values(1); +drop table t2; + +connection default; +send uninstall plugin innodb; + +connection con1; +select sleep(1); +disconnect con1; + +connection default; +reap; + +--source include/restart_mysqld.inc + + diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/xa_recovery.test mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/xa_recovery.test --- mariadb-5.5-5.5.44/mysql-test/suite/innodb/t/xa_recovery.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/innodb/t/xa_recovery.test 2015-10-09 16:50:21.000000000 +0000 @@ -6,6 +6,12 @@ # Embedded server does not support restarting. --source include/not_embedded.inc +# MDEV-8841 - close tables opened by previous tests, +# so they don't get marked crashed when the server gets crashed +--disable_query_log +FLUSH TABLES; +--enable_query_log + CREATE TABLE t1 (a INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); connect (con1,localhost,root); diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_sjis-master.opt mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_sjis-master.opt --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_sjis-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_sjis-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lower_case_table_names=0 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_sjis.test mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_sjis.test --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_sjis.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_sjis.test 2015-10-09 16:50:21.000000000 +0000 @@ -1,3 +1,7 @@ +#Server variable option 'lower_case_table_names' sets '0' as default value +#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of +#insensitive filsystem is not allowed. +-- source include/have_case_sensitive_file_system.inc --source include/have_sjis.inc --source include/have_innodb.inc --character_set sjis diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lower_case_table_names=0 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ucs2.test mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ucs2.test --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ucs2.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ucs2.test 2015-10-09 16:50:21.000000000 +0000 @@ -1,3 +1,7 @@ +#Server variable option 'lower_case_table_names' sets '0' as default value +#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of +#insensitive filsystem is not allowed. +-- source include/have_case_sensitive_file_system.inc --source include/have_ucs2.inc --source include/have_innodb.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ujis-master.opt mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ujis-master.opt --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ujis-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ujis-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lower_case_table_names=0 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ujis.test mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ujis.test --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_ujis.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_ujis.test 2015-10-09 16:50:21.000000000 +0000 @@ -1,3 +1,7 @@ +#Server variable option 'lower_case_table_names' sets '0' as default value +#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of +#insensitive filsystem is not allowed. +-- source include/have_case_sensitive_file_system.inc --source include/have_ujis.inc --source include/have_innodb.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_utf8-master.opt mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_utf8-master.opt --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_utf8-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_utf8-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lower_case_table_names=0 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_utf8.test mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_utf8.test --- mariadb-5.5-5.5.44/mysql-test/suite/jp/t/jp_enum_utf8.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/jp/t/jp_enum_utf8.test 2015-10-09 16:50:21.000000000 +0000 @@ -1,3 +1,7 @@ +#Server variable option 'lower_case_table_names' sets '0' as default value +#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of +#insensitive filsystem is not allowed. +-- source include/have_case_sensitive_file_system.inc --source include/have_utf8.inc --source include/have_innodb.inc --disable_warnings diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/ndb/r/ndb_restore_discover.result mariadb-5.5-5.5.46/mysql-test/suite/ndb/r/ndb_restore_discover.result --- mariadb-5.5-5.5.44/mysql-test/suite/ndb/r/ndb_restore_discover.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/ndb/r/ndb_restore_discover.result 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,33 @@ +# +# 18075170 - sql node restart required to avoid deadlock after +# restore +# +CREATE TABLE t1 (id INT) ENGINE=NDBCluster; +CREATE TABLE t2 (id INT) ENGINE=NDBCluster; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +DROP TABLE t1; +DROP TABLE t2; +SET autocommit = 0; +SELECT * FROM t1; +id +1 +SELECT * FROM t2; +id +1 +ROLLBACK; +SET autocommit = 1; +drop table t1; +drop table t2; +SET autocommit = 0; +SELECT * FROM t1; +id +1 +SELECT * FROM t2; +id +1 +ALTER TABLE t1 ADD val INT; +ROLLBACK; +SET autocommit = 1; +drop table t1; +drop table t2; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/ndb/t/ndb_restore_discover.test mariadb-5.5-5.5.46/mysql-test/suite/ndb/t/ndb_restore_discover.test --- mariadb-5.5-5.5.44/mysql-test/suite/ndb/t/ndb_restore_discover.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/ndb/t/ndb_restore_discover.test 2015-10-09 16:50:21.000000000 +0000 @@ -0,0 +1,70 @@ +-- source include/have_ndb.inc +-- source include/count_sessions.inc + +--echo # +--echo # 18075170 - sql node restart required to avoid deadlock after +--echo # restore +--echo # +# Test Auto Discover option within a transaction +# and make sure the transaction is not broken. +CREATE TABLE t1 (id INT) ENGINE=NDBCluster; +CREATE TABLE t2 (id INT) ENGINE=NDBCluster; + +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); + +-- source include/ndb_backup.inc + +DROP TABLE t1; +DROP TABLE t2; + +-- source include/ndb_restore_master.inc + +SET autocommit = 0; +SELECT * FROM t1; + +# Without fix below select was resulting in DEADLOCK error. With fix select +# should succeed. +SELECT * FROM t2; +ROLLBACK; +SET autocommit = 1; + +drop table t1; +drop table t2; + +# +# Checking lock preservation in transaction +# +# Using existing backup to create the scenario. Tables are deleted as part of +# above test cleanup. Thus restoring the backup will bring the system to +# required state. +-- source include/ndb_restore_master.inc + +SET autocommit = 0; +SELECT * FROM t1; +SELECT * FROM t2; + +connect(con2, localhost, root); +--SEND ALTER TABLE t1 ADD val INT + +connection default; +# Alter from con2 will be in waiting state as there is a lock on t1 from +# default connection due to active transaction. We check for this condition +# then releasing the lock by rollbacking active transaction. +let $wait_condition= + SELECT count(*) = 1 FROM information_schema.processlist WHERE state + LIKE "Waiting%" AND info = "ALTER TABLE t1 ADD val INT"; +--source include/wait_condition.inc +ROLLBACK; +SET autocommit = 1; + +connection con2; +--REAP + +disconnect con2; +connection default; +drop table t1; +drop table t2; + +# Wait till all disconnects are completed +-- source include/wait_until_count_sessions.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/perfschema/r/query_cache.result mariadb-5.5-5.5.46/mysql-test/suite/perfschema/r/query_cache.result --- mariadb-5.5-5.5.44/mysql-test/suite/perfschema/r/query_cache.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/perfschema/r/query_cache.result 2015-10-09 16:50:21.000000000 +0000 @@ -38,7 +38,7 @@ NULL select * from performance_schema.setup_timers where name='wait'; NAME TIMER_NAME -wait CYCLE +wait {CYCLE_OR_NANOSECOND} show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 @@ -53,7 +53,7 @@ NULL select * from performance_schema.setup_timers where name='wait'; NAME TIMER_NAME -wait CYCLE +wait {CYCLE_OR_NANOSECOND} show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/perfschema/t/query_cache.test mariadb-5.5-5.5.46/mysql-test/suite/perfschema/t/query_cache.test --- mariadb-5.5-5.5.44/mysql-test/suite/perfschema/t/query_cache.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/perfschema/t/query_cache.test 2015-10-09 16:50:21.000000000 +0000 @@ -34,6 +34,7 @@ select spins from performance_schema.events_waits_current order by event_name limit 1; +--replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND} select * from performance_schema.setup_timers where name='wait'; show status like "Qcache_queries_in_cache"; @@ -42,6 +43,7 @@ select spins from performance_schema.events_waits_current order by event_name limit 1; +--replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND} select * from performance_schema.setup_timers where name='wait'; show status like "Qcache_queries_in_cache"; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/plugins/r/feedback_plugin_load.result mariadb-5.5-5.5.46/mysql-test/suite/plugins/r/feedback_plugin_load.result --- mariadb-5.5-5.5.44/mysql-test/suite/plugins/r/feedback_plugin_load.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/plugins/r/feedback_plugin_load.result 2015-10-09 16:50:21.000000000 +0000 @@ -1,10 +1,13 @@ select plugin_status from information_schema.plugins where plugin_name='feedback'; plugin_status ACTIVE +SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used'; +SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback where variable_name = 'FEEDBACK used'; +variable_value = @feedback_used + 1 +1 select * from information_schema.feedback where variable_name like 'feed%' - and variable_name not like '%_uid'; + and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'; VARIABLE_NAME VARIABLE_VALUE -FEEDBACK used 1 FEEDBACK version 1.1 FEEDBACK_SEND_RETRY_WAIT 60 FEEDBACK_SEND_TIMEOUT 60 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/plugins/r/feedback_plugin_send.result mariadb-5.5-5.5.46/mysql-test/suite/plugins/r/feedback_plugin_send.result --- mariadb-5.5-5.5.44/mysql-test/suite/plugins/r/feedback_plugin_send.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/plugins/r/feedback_plugin_send.result 2015-10-09 16:50:21.000000000 +0000 @@ -1,10 +1,13 @@ select plugin_status from information_schema.plugins where plugin_name='feedback'; plugin_status ACTIVE +SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used'; +SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback where variable_name = 'FEEDBACK used'; +variable_value = @feedback_used + 1 +1 select * from information_schema.feedback where variable_name like 'feed%' - and variable_name not like '%_uid'; + and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'; VARIABLE_NAME VARIABLE_VALUE -FEEDBACK used 2 FEEDBACK version 1.1 FEEDBACK_SEND_RETRY_WAIT 60 FEEDBACK_SEND_TIMEOUT 60 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/plugins/t/feedback_plugin_load.test mariadb-5.5-5.5.46/mysql-test/suite/plugins/t/feedback_plugin_load.test --- mariadb-5.5-5.5.44/mysql-test/suite/plugins/t/feedback_plugin_load.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/plugins/t/feedback_plugin_load.test 2015-10-09 16:50:21.000000000 +0000 @@ -4,7 +4,24 @@ } select plugin_status from information_schema.plugins where plugin_name='feedback'; + +# Every SELECT from INFORMATION_SCHEMA.FEEDBACK increases the value of 'FEEDBACK used'. +# We cannot record the actual value, because the test can be executed more than once, +# but we can check that the value indeed increases as expected. +# There is still a room for some race condition, e.g. if at the very moment +# between first SELECT to store the value and the next SELECT to check that it increases, +# the feedback plugin is activated. But the probability of it is close to 0, +# so lets get back to it if it ever happens. + +# Lets say the plugin was used X times before this SELECT +SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used'; + +# Now $feedback_used == X+1, and 'FEEDBACK used' is also X+1. And variable_value is increased again when we run the next SELECT +SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback where variable_name = 'FEEDBACK used'; + +# Now when we are happy with 'FEEDBACK used', we can check everything else + --replace_result https http --sorted_result select * from information_schema.feedback where variable_name like 'feed%' - and variable_name not like '%_uid'; + and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/plugins/t/feedback_plugin_send.test mariadb-5.5-5.5.46/mysql-test/suite/plugins/t/feedback_plugin_send.test --- mariadb-5.5-5.5.44/mysql-test/suite/plugins/t/feedback_plugin_send.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/plugins/t/feedback_plugin_send.test 2015-10-09 16:50:21.000000000 +0000 @@ -14,6 +14,15 @@ # is doing some work in other workers. # sleep 310; + +# The test expects that the plugin will send a report at least 2 times, +# now (5 min after loading) and on server shutdown which happens below. +# Since we have already waited for 5 min, let's be generous +# and make sure the server has enough time to shut down properly. +# We won't lose anything if the shutdown is fast, but if it's slow, the plugin +# will still be able to finish the job and write about it in the error log. + +--let $shutdown_timeout= 60 source include/restart_mysqld.inc; replace_result https http; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/rpl/r/rpl_alter.result mariadb-5.5-5.5.46/mysql-test/suite/rpl/r/rpl_alter.result --- mariadb-5.5-5.5.44/mysql-test/suite/rpl/r/rpl_alter.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/rpl/r/rpl_alter.result 2015-10-09 16:50:24.000000000 +0000 @@ -14,4 +14,109 @@ n 45 drop database mysqltest; +use test; +# +# Test bug where ALTER TABLE MODIFY didn't replicate properly +# +create table t1 (a int unsigned primary key, b int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(10) unsigned NOT NULL, + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 (a) values (1),((1<<32)-1); +select * from t1; +a b +1 NULL +4294967295 NULL +alter table t1 modify a bigint; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL DEFAULT '0', + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t1; +a b +1 NULL +4294967295 NULL +alter table t1 modify a int unsigned; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(10) unsigned NOT NULL DEFAULT '0', + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t1; +a b +1 NULL +4294967295 NULL +alter table t1 modify a bigint unsigned; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) unsigned NOT NULL DEFAULT '0', + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t1; +a b +1 NULL +4294967295 NULL +use test; +select * from t1; +a b +1 NULL +4294967295 NULL +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) unsigned NOT NULL DEFAULT '0', + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table t2 (a int unsigned auto_increment primary key, b int); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(10) unsigned NOT NULL AUTO_INCREMENT, + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t2 modify a bigint; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` bigint(20) NOT NULL DEFAULT '0', + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t2 modify a bigint auto_increment; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` int(11) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1,t2; +# +# MDEV-8432: Slave cannot replicate signed integer-type values +# with high bit set to 1 +# Test replication when we have int on master and bigint on slave +# +create table t1 (a int unsigned primary key, b int); +SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; +alter table t1 modify a bigint unsigned; +insert into t1 (a) values (1),((1<<32)-1); +select * from t1; +a b +1 NULL +4294967295 NULL +SET GLOBAL SLAVE_TYPE_CONVERSIONS=''; +drop table t1; include/rpl_end.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result mariadb-5.5-5.5.46/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result --- mariadb-5.5-5.5.44/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result 2015-10-09 16:50:24.000000000 +0000 @@ -1,2 +1,4 @@ include/master-slave.inc [connection master] +start slave; +include/rpl_end.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/rpl/t/rpl_alter.test mariadb-5.5-5.5.46/mysql-test/suite/rpl/t/rpl_alter.test --- mariadb-5.5-5.5.44/mysql-test/suite/rpl/t/rpl_alter.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/rpl/t/rpl_alter.test 2015-10-09 16:50:25.000000000 +0000 @@ -15,4 +15,57 @@ sync_slave_with_master; # End of 4.1 tests + +connection master; +use test; + +--echo # +--echo # Test bug where ALTER TABLE MODIFY didn't replicate properly +--echo # + +create table t1 (a int unsigned primary key, b int); +show create table t1; +insert into t1 (a) values (1),((1<<32)-1); +select * from t1; +alter table t1 modify a bigint; +show create table t1; +select * from t1; +alter table t1 modify a int unsigned; +show create table t1; +select * from t1; +alter table t1 modify a bigint unsigned; +show create table t1; +select * from t1; +sync_slave_with_master; +use test; +select * from t1; +show create table t1; +connection master; +# +create table t2 (a int unsigned auto_increment primary key, b int); +show create table t2; +alter table t2 modify a bigint; +show create table t2; +alter table t2 modify a bigint auto_increment; +show create table t2; +drop table t1,t2; + +--echo # +--echo # MDEV-8432: Slave cannot replicate signed integer-type values +--echo # with high bit set to 1 +--echo # Test replication when we have int on master and bigint on slave +--echo # + +create table t1 (a int unsigned primary key, b int); +sync_slave_with_master; +SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; +alter table t1 modify a bigint unsigned; +connection master; +insert into t1 (a) values (1),((1<<32)-1); +sync_slave_with_master; +select * from t1; +SET GLOBAL SLAVE_TYPE_CONVERSIONS=''; +connection master; +drop table t1; + --source include/rpl_end.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt mariadb-5.5-5.5.46/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt --- mariadb-5.5-5.5.44/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt 2015-10-09 16:50:25.000000000 +0000 @@ -0,0 +1 @@ +--innodb-flush-log-at-trx-commit=2 diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test mariadb-5.5-5.5.46/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test --- mariadb-5.5-5.5.44/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test 2015-10-09 16:50:25.000000000 +0000 @@ -10,3 +10,10 @@ --exec $MYSQL_SLAP --silent --socket=$SLAVE_MYSOCK -q "START SLAVE; STOP SLAVE; SHOW GLOBAL STATUS" -c 2 --number-of-queries=100 --create-schema=test # All done. + +--connection slave +start slave; + +--connection master +--source include/rpl_end.inc + diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db805.result mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db805.result --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db805.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db805.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -drop table if exists t1,t3; -create table t3(a3 int,b3 decimal(0,0),c3 int,d3 int,primary key(a3,b3)) engine=TOKUDB; -LOCK TABLES t3 WRITE; -create temporary table t1(f1 int,index(f1)) engine=innodb; -INSERT INTO t1 VALUES(1),(1),(1); -select * from t1; -f1 -1 -1 -1 -ALTER TABLE t1 engine=TOKUDB; -select * from t1; -f1 -1 -1 -1 -unlock tables; -drop table t1,t3; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db806.result mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db806.result --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db806.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db806.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -drop table if exists t1,t3; -CREATE TABLE t3(a int,c int,d int)engine=TOKUDB; -lock table t3 read; -create temporary table t1 engine=tokudb as SELECT 1; -select * from t1; -1 -1 -unlock tables; -drop table t1,t3; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db811.result mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db811.result --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db811.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db811.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -drop table if exists t2,t3,t4; -CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; -CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; -CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 13; -LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; -INSERT INTO t2(a)VALUES (REPEAT(0,1)); -ALTER TABLE t2 ADD COLUMN(c INT); -alter table t4 add column c int; -UPDATE t2 SET a=1; -select * from t2; -a b c -1 NULL NULL -unlock tables; -drop table t2,t3,t4; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db811s.result mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db811s.result --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db811s.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db811s.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -drop table if exists t2,t3,t4; -CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; -CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; -CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 1; -LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; -INSERT INTO t2(a)VALUES (REPEAT(0,1)); -ALTER TABLE t2 ADD COLUMN(c INT); -alter table t4 add column c int; -UPDATE t2 SET a=1; -select * from t2; -a b c -1 NULL NULL -unlock tables; -drop table t2,t3,t4; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db823.result mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db823.result --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/r/db823.result 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/r/db823.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -drop table if exists s,t; -create table s (id int) engine=tokudb; -lock tables s write; -create temporary table t (id int, key(id)) engine=innodb; -insert into t values (1); -alter table t engine=tokudb; -select * from t; -id -1 -unlock tables; -drop table s, t; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db805.test mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db805.test --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db805.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db805.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# DB-805 test that conversion of t1 from innodb to tokudb can write rows -source include/have_tokudb.inc; -source include/have_innodb.inc; -disable_warnings; -drop table if exists t1,t3; -enable_warnings; - -create table t3(a3 int,b3 decimal(0,0),c3 int,d3 int,primary key(a3,b3)) engine=TOKUDB; -LOCK TABLES t3 WRITE; -create temporary table t1(f1 int,index(f1)) engine=innodb; -INSERT INTO t1 VALUES(1),(1),(1); -select * from t1; -ALTER TABLE t1 engine=TOKUDB; -select * from t1; -unlock tables; - -drop table t1,t3; diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db806.test mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db806.test --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db806.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db806.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# DB-806 test that lock tables and create select can write rows to the new table -source include/have_tokudb.inc; -disable_warnings; -drop table if exists t1,t3; -enable_warnings; - -CREATE TABLE t3(a int,c int,d int)engine=TOKUDB; -lock table t3 read; -create temporary table t1 engine=tokudb as SELECT 1; -select * from t1; -unlock tables; - -drop table t1,t3; \ No newline at end of file diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db811s.test mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db811s.test --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db811s.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db811s.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# DB-811 test that alter table t2 updates both the schema (FRM) and the data (tokudb files) - -source include/have_tokudb.inc; -source include/have_innodb.inc; -source include/have_partition.inc; -disable_warnings; -drop table if exists t2,t3,t4; -enable_warnings; - -CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; -CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; -CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 1; -LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; -INSERT INTO t2(a)VALUES (REPEAT(0,1)); -ALTER TABLE t2 ADD COLUMN(c INT); -alter table t4 add column c int; -UPDATE t2 SET a=1; -select * from t2; -unlock tables; - -drop table t2,t3,t4; - diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db811.test mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db811.test --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db811.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db811.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# DB-811 test that alter table t2 updates both the schema (FRM) and the data (tokudb files) - -source include/have_tokudb.inc; -source include/have_innodb.inc; -source include/have_partition.inc; -disable_warnings; -drop table if exists t2,t3,t4; -enable_warnings; - -CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; -CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; -CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 13; -LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; -INSERT INTO t2(a)VALUES (REPEAT(0,1)); -ALTER TABLE t2 ADD COLUMN(c INT); -alter table t4 add column c int; -UPDATE t2 SET a=1; -select * from t2; -unlock tables; - -drop table t2,t3,t4; - diff -Nru mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db823.test mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db823.test --- mariadb-5.5-5.5.44/mysql-test/suite/tokudb.bugs/t/db823.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/suite/tokudb.bugs/t/db823.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -# test DB-823 -# test that the conversion of table t from innodb to tokudb succeeds. -source include/have_tokudb.inc; -source include/have_innodb.inc; -disable_warnings; -drop table if exists s,t; -enable_warnings; -create table s (id int) engine=tokudb; -lock tables s write; -create temporary table t (id int, key(id)) engine=innodb; -insert into t values (1); -alter table t engine=tokudb; -select * from t; -unlock tables; -drop table s, t; - diff -Nru mariadb-5.5-5.5.44/mysql-test/t/func_gconcat.test mariadb-5.5-5.5.46/mysql-test/t/func_gconcat.test --- mariadb-5.5-5.5.44/mysql-test/t/func_gconcat.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/func_gconcat.test 2015-10-09 16:50:25.000000000 +0000 @@ -821,3 +821,14 @@ ORDER BY field; drop table t3, t2, t1; + +--echo # +--echo # MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd +--echo # execution of PS +--echo # +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(2); +PREPARE stmt FROM "SELECT GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0) FROM t1 AS t1a, t1 AS t1b GROUP BY t1a.a"; +EXECUTE stmt; +EXECUTE stmt; +DROP TABLE t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/t/func_if.test mariadb-5.5-5.5.46/mysql-test/t/func_if.test --- mariadb-5.5-5.5.44/mysql-test/t/func_if.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/func_if.test 2015-10-09 16:50:26.000000000 +0000 @@ -206,6 +206,20 @@ --echo End of 5.2 tests +--echo # +--echo # MDEV-8663: IF Statement returns multiple values erroneously +--echo # (or Assertion `!null_value' failed in Item::send(Protocol*, String*) +--echo # +CREATE TABLE `t1` ( +`datas` VARCHAR(25) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `t1` VALUES ('1,2'), ('2,3'), ('3,4'); + +SELECT IF(FIND_IN_SET('1', `datas`), 1.5, IF(FIND_IN_SET('2', `datas`), 2, NULL)) AS `First`, '1' AS `Second`, '2' AS `Third` FROM `t1`; + +drop table t1; + --disable_query_log # Restore timezone to default set time_zone= @@global.time_zone; diff -Nru mariadb-5.5-5.5.44/mysql-test/t/func_misc.test mariadb-5.5-5.5.46/mysql-test/t/func_misc.test --- mariadb-5.5-5.5.44/mysql-test/t/func_misc.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/func_misc.test 2015-10-09 16:50:26.000000000 +0000 @@ -391,6 +391,210 @@ drop view v_merge, vm; drop table t1,tv; +--echo # +--echo # MDEV-4017 - GET_LOCK() with negative timeouts has strange behavior +--echo # +SELECT GET_LOCK('ul1', NULL); +SELECT GET_LOCK('ul1', -1); + +--echo # +--echo # MDEV-8624 MariaDB hangs on query with many logical condition +--echo # +CREATE TABLE `t1` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `submitdate` datetime DEFAULT NULL, + `lastpage` int(11) DEFAULT NULL, + `startlanguage` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `token` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL, + `datestamp` datetime NOT NULL, + `startdate` datetime NOT NULL, + `ipaddr` text COLLATE utf8_unicode_ci, + `refurl` text COLLATE utf8_unicode_ci, + `57813X540X1723` text COLLATE utf8_unicode_ci, + `57813X540X1724` text COLLATE utf8_unicode_ci, + `57813X540X1725` text COLLATE utf8_unicode_ci, + `57813X540X1726` double DEFAULT NULL, + `57813X540X1909` double DEFAULT NULL, + `57813X541X17271` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X541X17272` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X541X17273` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X541X17274` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X541X17275` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X541X17276` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X541X17281` text COLLATE utf8_unicode_ci, + `57813X541X17282` text COLLATE utf8_unicode_ci, + `57813X541X17283` text COLLATE utf8_unicode_ci, + `57813X541X17284` text COLLATE utf8_unicode_ci, + `57813X541X17285` text COLLATE utf8_unicode_ci, + `57813X541X17286` text COLLATE utf8_unicode_ci, + `57813X542X18131` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18132` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18133` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18134` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18135` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18136` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18137` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18138` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18139` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X542X18141` text COLLATE utf8_unicode_ci, + `57813X542X18142` text COLLATE utf8_unicode_ci, + `57813X542X18143` text COLLATE utf8_unicode_ci, + `57813X542X18144` text COLLATE utf8_unicode_ci, + `57813X542X18145` text COLLATE utf8_unicode_ci, + `57813X542X18146` text COLLATE utf8_unicode_ci, + `57813X542X18147` text COLLATE utf8_unicode_ci, + `57813X542X18148` text COLLATE utf8_unicode_ci, + `57813X542X18149` text COLLATE utf8_unicode_ci, + `57813X543X18451` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X543X18452` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X543X18453` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X543X18454` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X543X18455` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X543X18456` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X543X18461` text COLLATE utf8_unicode_ci, + `57813X543X18462` text COLLATE utf8_unicode_ci, + `57813X543X18463` text COLLATE utf8_unicode_ci, + `57813X543X18464` text COLLATE utf8_unicode_ci, + `57813X543X18465` text COLLATE utf8_unicode_ci, + `57813X543X18466` text COLLATE utf8_unicode_ci, + `57813X544X18711` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18712` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18713` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18714` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18715` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18716` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18717` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18718` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X544X18721` text COLLATE utf8_unicode_ci, + `57813X544X18722` text COLLATE utf8_unicode_ci, + `57813X544X18723` text COLLATE utf8_unicode_ci, + `57813X544X18724` text COLLATE utf8_unicode_ci, + `57813X544X18725` text COLLATE utf8_unicode_ci, + `57813X544X18726` text COLLATE utf8_unicode_ci, + `57813X544X18727` text COLLATE utf8_unicode_ci, + `57813X544X18728` text COLLATE utf8_unicode_ci, + `57813X546X1902` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X546X1903` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X546X1904` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, + `57813X545X1901` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `lime_survey_57813_idx` (`token`), + KEY `57813X540X1723` (`57813X540X1723`(100)), + KEY `57813X540X1724` (`57813X540X1724`(100)), + KEY `57813X540X1726` (`57813X540X1726`), + KEY `57813X540X1725` (`57813X540X1725`(100)), + KEY `57813X546X1902` (`57813X546X1902`), + KEY `57813X546X1903` (`57813X546X1903`), + KEY `57813X546X1904` (`57813X546X1904`) +); + +SELECT +COUNT(*) as `N`, +ROUND( + ( + SUM( + ( + ( + IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 57813X541X17271, 0 ) + + IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 57813X541X17272, 0 ) + + IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 57813X541X17273, 0 ) + + IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 57813X541X17274, 0 ) + + IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 57813X541X17275, 0 ) + + IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 57813X541X17276, 0 ) + + IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 57813X542X18131, 0 ) + + IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 57813X542X18132, 0 ) + + IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 57813X542X18133, 0 ) + + IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 57813X542X18134, 0 ) + + IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 57813X542X18135, 0 ) + + IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 57813X542X18136, 0 ) + + IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 57813X542X18137, 0 ) + + IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 57813X542X18138, 0 ) + + IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 57813X542X18139, 0 ) + + IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 57813X543X18451, 0 ) + + IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 57813X543X18452, 0 ) + + IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 57813X543X18453, 0 ) + + IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 57813X543X18454, 0 ) + + IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 57813X543X18455, 0 ) + + IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 57813X543X18456, 0 ) + + IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 57813X544X18711, 0 ) + + IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 57813X544X18712, 0 ) + + IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 57813X544X18713, 0 ) + + IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 57813X544X18714, 0 ) + + IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 57813X544X18715, 0 ) + + IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 57813X544X18716, 0 ) + + IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 57813X544X18717, 0 ) + + IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 57813X544X18718, 0 ) + ) + / + ( + IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 1, 0 ) + + IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 1, 0 ) + + IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 1, 0 ) + + IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 1, 0 ) + + IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 1, 0 ) + + IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 1, 0 ) + + IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 1, 0 ) + + IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 1, 0 ) + + IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 1, 0 ) + + IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 1, 0 ) + + IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 1, 0 ) + + IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 1, 0 ) + + IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 1, 0 ) + + IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 1, 0 ) + + IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 1, 0 ) + + IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 1, 0 ) + + IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 1, 0 ) + + IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 1, 0 ) + + IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 1, 0 ) + + IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 1, 0 ) + + IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 1, 0 ) + + IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 1, 0 ) + + IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 1, 0 ) + + IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 1, 0 ) + + IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 1, 0 ) + + IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 1, 0 ) + + IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 1, 0 ) + + IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 1, 0 ) + + IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 1, 0 ) + ) + ) + ) + / COUNT(*) ), 4) as `AVG` +FROM `t1` +WHERE `submitdate` IS NOT NULL +AND ( + ( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99' ) OR + ( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99' ) OR + ( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99' ) OR + ( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99' ) OR + ( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99' ) OR + ( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99' ) OR + ( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99' ) OR + ( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99' ) OR + ( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99' ) OR + ( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99' ) OR + ( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99' ) OR + ( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99' ) OR + ( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99' ) OR + ( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99' ) OR + ( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99' ) OR + ( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99' ) OR + ( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99' ) OR + ( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99' ) OR + ( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99' ) OR + ( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99' ) OR + ( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99' ) OR + ( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99' ) OR + ( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99' ) OR + ( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99' ) OR + ( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99' ) OR + ( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99' ) OR + ( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99' ) OR + ( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99' ) OR + ( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99' ) ) +AND 57813X540X1723 = 'Test'; + +drop table t1; --echo # --echo # End of 5.5 tests diff -Nru mariadb-5.5-5.5.44/mysql-test/t/information_schema2.test mariadb-5.5-5.5.46/mysql-test/t/information_schema2.test --- mariadb-5.5-5.5.44/mysql-test/t/information_schema2.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/information_schema2.test 2015-10-09 16:50:26.000000000 +0000 @@ -8,15 +8,12 @@ (select variable_name from information_schema.session_variables where variable_name = 'basedir'); # -# information_schema tables inside subqueries, they should not be re-populated -# (i_s.columns needs to scan i_s itself, creating a tmp table for every i_s -# table. if it's re-populated, it'll do that multiple times) +# MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows # -create table t1 (a char); -insert t1 values ('a'),('t'),('z'); -flush status; -select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1; -# fix the result in ps-protocol ---replace_result 39 38 -show status like 'created_tmp_tables'; -drop table t1; +create table t1 (x int); +create table t2 (x int); +create table t3 (x int); +create table t4 AS select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE' ; +delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE'); +select * from t4; +drop table t1, t2, t3, t4; diff -Nru mariadb-5.5-5.5.44/mysql-test/t/innodb_load_xa.test mariadb-5.5-5.5.46/mysql-test/t/innodb_load_xa.test --- mariadb-5.5-5.5.44/mysql-test/t/innodb_load_xa.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/innodb_load_xa.test 2015-10-09 16:50:26.000000000 +0000 @@ -16,3 +16,6 @@ --source include/show_binlog_events.inc drop table t1; uninstall plugin innodb; + +--source include/restart_mysqld.inc + diff -Nru mariadb-5.5-5.5.44/mysql-test/t/loadxml.test mariadb-5.5-5.5.46/mysql-test/t/loadxml.test --- mariadb-5.5-5.5.44/mysql-test/t/loadxml.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/loadxml.test 2015-10-09 16:50:26.000000000 +0000 @@ -116,3 +116,17 @@ ROWS IDENTIFIED BY '' (a,@b) SET b=concat('!',@b); SELECT * FROM t1 ORDER BY a; DROP TABLE t1; + + +--echo # +--echo # Bug#16171518 LOAD XML DOES NOT HANDLE EMPTY ELEMENTS +--echo # +CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 VARCHAR(3), col4 VARCHAR(4)); +LOAD XML INFILE '../../std_data/bug16171518_1.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY col1, col2, col3, col4; +DROP TABLE t1; + +CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 INTEGER); +LOAD XML INFILE '../../std_data/bug16171518_2.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY col1, col2, col3; +DROP TABLE t1; diff -Nru mariadb-5.5-5.5.44/mysql-test/t/lowercase_fs_on.test mariadb-5.5-5.5.46/mysql-test/t/lowercase_fs_on.test --- mariadb-5.5-5.5.44/mysql-test/t/lowercase_fs_on.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/lowercase_fs_on.test 2015-10-09 16:50:26.000000000 +0000 @@ -0,0 +1,38 @@ +# +# Specific tests for case-insensitive file systems +# i.e. lower_case_filesystem=ON +# +-- source include/have_case_insensitive_file_system.inc +# Embedded server does not support restarting. +--source include/not_embedded.inc + +--echo # +--echo # Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO PROBLEMS +--echo # + +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err; + +--error 0,1 +--remove_file $SEARCH_FILE + +#Shutdown the server +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--shutdown_server +--source include/wait_until_disconnected.inc + +#Start the server with --lower_case_table_names=0 in Windows. +--enable_reconnect +--error 1 +--exec $MYSQLD_CMD --lower_case_table_names=0 > $SEARCH_FILE 2>&1 + +#Search for the error messege in the server error log. +let SEARCH_PATTERN= \[ERROR\] The server option \'lower_case_table_names\' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination\. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode\.; +--source include/search_pattern_in_file.inc + +#Restart the server +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--source include/wait_until_connected_again.inc + +#Cleanup +--error 0,1 +--remove_file $SEARCH_FILE diff -Nru mariadb-5.5-5.5.44/mysql-test/t/lowercase_table3-master.opt mariadb-5.5-5.5.46/mysql-test/t/lowercase_table3-master.opt --- mariadb-5.5-5.5.44/mysql-test/t/lowercase_table3-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/lowercase_table3-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lower_case_table_names=0 diff -Nru mariadb-5.5-5.5.44/mysql-test/t/lowercase_table3.test mariadb-5.5-5.5.46/mysql-test/t/lowercase_table3.test --- mariadb-5.5-5.5.44/mysql-test/t/lowercase_table3.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/lowercase_table3.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -# -# Test of force of lower-case-table-names=0 -# (User has case insensitive file system and wants to preserve case of -# table names) -# - ---source include/have_innodb.inc ---source include/have_lowercase0.inc ---source include/have_case_insensitive_file_system.inc ---source include/not_windows.inc - -call mtr.add_suppression("Cannot find or open table test/BUG29839 from"); - ---disable_warnings -DROP TABLE IF EXISTS t1,T1; ---enable_warnings - -# -# This is actually an error, but ok as the user has forced this -# by using --lower-case-table-names=0 -CREATE TABLE t1 (a INT); -SELECT * FROM T1; -FLUSH TABLES; -DROP TABLE t1; - -# -# InnoDB should in this case be case sensitive -# Note that this is not true on windows as no this OS, InnoDB is always -# storing things in lower case. -# - -CREATE TABLE bug29839 (a INT) ENGINE=INNODB; ---error ER_NO_SUCH_TABLE -SELECT * FROM BUG29839; -DROP TABLE bug29839; - -# End of 4.1 tests diff -Nru mariadb-5.5-5.5.44/mysql-test/t/merge_recover-master.opt mariadb-5.5-5.5.46/mysql-test/t/merge_recover-master.opt --- mariadb-5.5-5.5.44/mysql-test/t/merge_recover-master.opt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/merge_recover-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---myisam-recover=force diff -Nru mariadb-5.5-5.5.44/mysql-test/t/merge_recover.test mariadb-5.5-5.5.46/mysql-test/t/merge_recover.test --- mariadb-5.5-5.5.44/mysql-test/t/merge_recover.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/merge_recover.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ ---echo # ---echo # Test of MyISAM MRG tables with corrupted children. ---echo # Run with --myisam-recover=force option. ---echo # ---echo # Preparation: we need to make sure that the merge parent ---echo # is never left in the table cache when closed, since this may ---echo # have effect on merge children. ---echo # For that, we set the table cache to minimal size and populate it ---echo # in a concurrent connection. -connect(con1,localhost,root,,test,,); ---echo # ---echo # Switching to connection con1 ---echo # -connection con1; ---echo # ---echo # Minimal values. ---echo # - -call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:"); -call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table"); -call mtr.add_suppression(" '\..test.t1'"); - -set global table_open_cache=256; -set global table_definition_cache=400; ---disable_warnings -drop procedure if exists p_create; ---enable_warnings -delimiter |; -create procedure p_create() -begin - declare i int default 1; - set @lock_table_stmt="lock table "; - set @drop_table_stmt="drop table "; - while i < @@global.table_definition_cache + 1 do - set @table_name=concat("t_", i); - set @opt_comma=if(i=1, "", ", "); - set @lock_table_stmt=concat(@lock_table_stmt, @opt_comma, - @table_name, " read"); - set @drop_table_stmt=concat(@drop_table_stmt, @opt_comma, @table_name); - set @create_table_stmt=concat("create table if not exists ", - @table_name, " (a int)"); - prepare stmt from @create_table_stmt; - execute stmt; - deallocate prepare stmt; - set i= i+1; - end while; -end| -delimiter ;| -call p_create(); -drop procedure p_create; ---disable_query_log -let $lock=`select @lock_table_stmt`; -eval $lock; ---enable_query_log ---echo # ---echo # Switching to connection 'default' ---echo # -connection default; ---echo # ---echo # We have to disable the ps-protocol, to avoid ---echo # "Prepared statement needs to be re-prepared" errors ---echo # -- table def versions change all the time with full table cache. ---echo # ---disable_ps_protocol ---disable_warnings -drop table if exists t1, t1_mrg, t1_copy; ---enable_warnings -let $MYSQLD_DATADIR=`select @@datadir`; ---echo # ---echo # Prepare a MERGE engine table, that refers to a corrupted ---echo # child. ---echo # -create table t1 (a int, key(a)) engine=myisam; -create table t1_mrg (a int) union (t1) engine=merge; ---echo # ---echo # Create a table with a corrupted index file: ---echo # save an old index file, insert more rows, ---echo # overwrite the new index file with the old one. ---echo # -insert into t1 (a) values (1), (2), (3); -flush table t1; ---copy_file $MYSQLD_DATADIR/test/t1.MYI $MYSQLD_DATADIR/test/t1_copy.MYI -insert into t1 (a) values (4), (5), (6); -flush table t1; ---remove_file $MYSQLD_DATADIR/test/t1.MYI ---copy_file $MYSQLD_DATADIR/test/t1_copy.MYI $MYSQLD_DATADIR/test/t1.MYI ---remove_file $MYSQLD_DATADIR/test/t1_copy.MYI ---echo # check table is needed to mark the table as crashed. -check table t1; ---echo # ---echo # At this point we have a merge table t1_mrg pointing to t1, ---echo # and t1 is corrupted, and will be auto-repaired at open. ---echo # Check that this doesn't lead to memory corruption. ---echo # ---replace_regex /'.*[\/\\]/'/ -select * from t1_mrg; ---echo # ---echo # Cleanup ---echo # -drop table t1, t1_mrg; ---echo # ---echo # Switching to connection con1 ---echo # -connection con1; -unlock tables; -prepare stmt from @drop_table_stmt; -execute stmt; -deallocate prepare stmt; -set @@global.table_definition_cache=default; -set @@global.table_open_cache=default; -disconnect con1; -connection default; ---enable_ps_protocol diff -Nru mariadb-5.5-5.5.44/mysql-test/t/myisam_recover-master.opt mariadb-5.5-5.5.46/mysql-test/t/myisam_recover-master.opt --- mariadb-5.5-5.5.44/mysql-test/t/myisam_recover-master.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/myisam_recover-master.opt 2015-10-09 16:50:26.000000000 +0000 @@ -0,0 +1 @@ +--myisam-recover=force diff -Nru mariadb-5.5-5.5.44/mysql-test/t/myisam_recover.test mariadb-5.5-5.5.46/mysql-test/t/myisam_recover.test --- mariadb-5.5-5.5.44/mysql-test/t/myisam_recover.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/myisam_recover.test 2015-10-09 16:50:26.000000000 +0000 @@ -0,0 +1,180 @@ +--source include/count_sessions.inc + +--echo # +--echo # Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted +--echo # children.. +--echo # +--echo # Run with --myisam-recover=force option. +--echo # +--echo # Preparation: we need to make sure that the merge parent +--echo # is never left in the table cache when closed, since this may +--echo # have effect on merge children. +--echo # For that, we set the table cache to minimal size and populate it +--echo # in a concurrent connection. +connect(con1,localhost,root,,test,,); +--echo # +--echo # Switching to connection con1 +--echo # +connection con1; +--echo # +--echo # Minimal values. +--echo # + +call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:"); +call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table"); +call mtr.add_suppression(" '\..test.t1'"); + +set global table_open_cache=256; +set global table_definition_cache=400; +--disable_warnings +drop procedure if exists p_create; +--enable_warnings +delimiter |; +create procedure p_create() +begin + declare i int default 1; + set @lock_table_stmt="lock table "; + set @drop_table_stmt="drop table "; + while i < @@global.table_definition_cache + 1 do + set @table_name=concat("t_", i); + set @opt_comma=if(i=1, "", ", "); + set @lock_table_stmt=concat(@lock_table_stmt, @opt_comma, + @table_name, " read"); + set @drop_table_stmt=concat(@drop_table_stmt, @opt_comma, @table_name); + set @create_table_stmt=concat("create table if not exists ", + @table_name, " (a int)"); + prepare stmt from @create_table_stmt; + execute stmt; + deallocate prepare stmt; + set i= i+1; + end while; +end| +delimiter ;| +call p_create(); +drop procedure p_create; +--disable_query_log +let $lock=`select @lock_table_stmt`; +eval $lock; +--enable_query_log +--echo # +--echo # Switching to connection 'default' +--echo # +connection default; +--echo # +--echo # We have to disable the ps-protocol, to avoid +--echo # "Prepared statement needs to be re-prepared" errors +--echo # -- table def versions change all the time with full table cache. +--echo # +--disable_ps_protocol +--disable_warnings +drop table if exists t1, t1_mrg, t1_copy; +--enable_warnings +let $MYSQLD_DATADIR=`select @@datadir`; +--echo # +--echo # Prepare a MERGE engine table, that refers to a corrupted +--echo # child. +--echo # +create table t1 (a int, key(a)) engine=myisam; +create table t1_mrg (a int) union (t1) engine=merge; +--echo # +--echo # Create a table with a corrupted index file: +--echo # save an old index file, insert more rows, +--echo # overwrite the new index file with the old one. +--echo # +insert into t1 (a) values (1), (2), (3); +flush table t1; +--copy_file $MYSQLD_DATADIR/test/t1.MYI $MYSQLD_DATADIR/test/t1_copy.MYI +insert into t1 (a) values (4), (5), (6); +flush table t1; +--remove_file $MYSQLD_DATADIR/test/t1.MYI +--copy_file $MYSQLD_DATADIR/test/t1_copy.MYI $MYSQLD_DATADIR/test/t1.MYI +--remove_file $MYSQLD_DATADIR/test/t1_copy.MYI +--echo # check table is needed to mark the table as crashed. +check table t1; +--echo # +--echo # At this point we have a merge table t1_mrg pointing to t1, +--echo # and t1 is corrupted, and will be auto-repaired at open. +--echo # Check that this doesn't lead to memory corruption. +--echo # +--replace_regex /'.*[\/\\]/'/ +select * from t1_mrg; +--echo # +--echo # Cleanup +--echo # +drop table t1, t1_mrg; +--echo # +--echo # Switching to connection con1 +--echo # +connection con1; +unlock tables; +prepare stmt from @drop_table_stmt; +execute stmt; +deallocate prepare stmt; +set @@global.table_definition_cache=default; +set @@global.table_open_cache=default; +disconnect con1; +connection default; +--enable_ps_protocol + +--echo # +--echo # 18075170 - sql node restart required to avoid deadlock after +--echo # restore +--echo # +--echo # Check that auto-repair for MyISAM tables can now happen in the +--echo # middle of transaction, without aborting it. +--enable_prepare_warnings + +connection default; + +create table t1 (a int, key(a)) engine=myisam; +create table t2 (a int); +insert into t2 values (1); + +--echo # Create a table with a corrupted index file: +--echo # save an old index file, insert more rows, +--echo # overwrite the new index file with the old one. +insert into t1 (a) values (1); +flush table t1; +--copy_file $MYSQLD_DATADIR/test/t1.MYI $MYSQLD_DATADIR/test/t1_copy.MYI +insert into t1 (a) values (4); +flush table t1; +--remove_file $MYSQLD_DATADIR/test/t1.MYI +--copy_file $MYSQLD_DATADIR/test/t1_copy.MYI $MYSQLD_DATADIR/test/t1.MYI +--remove_file $MYSQLD_DATADIR/test/t1_copy.MYI + +--echo # Check table is needed to mark the table as crashed. +check table t1; + +--echo # At this point we have a corrupt t1 +set autocommit = 0; +select * from t2; +--echo # Without fix select from t1 will break the transaction. After the fix +--echo # transaction should be active and should hold lock on table t2. Alter +--echo # table from con2 will wait only if the transaction is not broken. +--replace_regex /'.*[\/\\]/'/ +select * from t1; + +connect(con2, localhost, root); +--SEND ALTER TABLE t2 ADD val INT + +connection default; +--echo # With fix we should have alter table waiting for t2 lock here. +let $wait_condition= + SELECT count(*) = 1 FROM information_schema.processlist WHERE state + LIKE "Waiting%" AND info = "ALTER TABLE t2 ADD val INT"; + +--source include/wait_condition.inc +ROLLBACK; +SET autocommit = 1; + +connection con2; +--REAP + +connection default; +disconnect con2; + +--echo # Cleanup +drop table t1, t2; + +# Wait till all disconnects are completed +-- source include/wait_until_count_sessions.inc diff -Nru mariadb-5.5-5.5.44/mysql-test/t/mysqldump.test mariadb-5.5-5.5.46/mysql-test/t/mysqldump.test --- mariadb-5.5-5.5.44/mysql-test/t/mysqldump.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/mysqldump.test 2015-10-09 16:50:26.000000000 +0000 @@ -901,13 +901,8 @@ create view v1 as select * from v3 where b in (1, 2, 3, 4, 5, 6, 7); -# Disable warnings since LIMIT warning for unsafe statement if -# binlog_format = STATEMENT. Note: after BUG#45832, the warning should -# not be issued. ---disable_warnings create view v2 as select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; ---enable_warnings --exec $MYSQL_DUMP --skip-comments test @@ -1777,7 +1772,7 @@ --replace_regex /.*mysqlimport(\.exe)*/mysqlimport/ --replace_result mysqldump.exe mysqldump --error 1 ---exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat 2>&1 +--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat drop table t1; drop table t2; @@ -2456,6 +2451,35 @@ --echo # End of 5.1 tests --echo # +--echo # +--echo # Bug #20772273 : MYSQLIMPORT --USE-THREADS DOESN'T USE MULTIPLE THREADS +--echo # + +CREATE DATABASE db_20772273; +USE db_20772273; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1), (2); +CREATE TABLE t2(a INT); +INSERT INTO t2 VALUES (3), (4); + +SELECT * FROM t1; +SELECT * FROM t2; + +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ db_20772273 +--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t1.sql +--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t2.sql + +# Test mysqlimport with multiple threads +--exec $MYSQL_IMPORT --silent --use-threads=2 db_20772273 $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt + +SELECT * FROM t1; +SELECT * FROM t2; + +#Cleanup +DROP TABLE t1; +DROP TABLE t2; +DROP DATABASE db_20772273; + # # MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server # diff -Nru mariadb-5.5-5.5.44/mysql-test/t/mysql_upgrade.test mariadb-5.5-5.5.46/mysql-test/t/mysql_upgrade.test --- mariadb-5.5-5.5.44/mysql-test/t/mysql_upgrade.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/mysql_upgrade.test 2015-10-09 16:50:26.000000000 +0000 @@ -14,7 +14,6 @@ --echo Run it again - should say already completed --replace_result $MYSQL_SERVER_VERSION VERSION ---error 1 --exec $MYSQL_UPGRADE 2>&1 # It should have created a file in the MySQL Servers datadir diff -Nru mariadb-5.5-5.5.44/mysql-test/t/partition_error.test mariadb-5.5-5.5.46/mysql-test/t/partition_error.test --- mariadb-5.5-5.5.44/mysql-test/t/partition_error.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/partition_error.test 2015-10-09 16:50:26.000000000 +0000 @@ -1146,7 +1146,7 @@ # # Subpartition by hash, wrong subpartition function # ---error ER_SUBPARTITION_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a int not null, b int not null, diff -Nru mariadb-5.5-5.5.44/mysql-test/t/sp-group.test mariadb-5.5-5.5.46/mysql-test/t/sp-group.test --- mariadb-5.5-5.5.44/mysql-test/t/sp-group.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/sp-group.test 2015-10-09 16:50:26.000000000 +0000 @@ -0,0 +1,187 @@ +--source include/have_innodb.inc + +drop table if exists t1; +drop view if exists view_t1; + +# +# Test case for MDEV 7601, MDEV-7594 and MDEV-7555 +# Server crashes in functions related to stored procedures +# Server crashes in different ways while executing concurrent +# flow involving views and non-empty sql_mode with ONLY_FULL_GROUP_BY +# + +SET sql_mode=ONLY_FULL_GROUP_BY; + +CREATE TABLE t1 ( + pk INT, + f0 INT, f1 INT, f2 INT, f3 INT, f4 INT, + f5 INT, f6 INT, f7 INT, f8 INT, f9 INT, + PRIMARY KEY (pk) +); + +CREATE VIEW view_t1 AS SELECT * FROM t1; +CREATE PROCEDURE s1() + SELECT * FROM ( + INFORMATION_SCHEMA.`INNODB_BUFFER_PAGE_LRU` AS table1 + LEFT JOIN test.view_t1 AS table2 + ON ( table2.`f6` = table1.FREE_PAGE_CLOCK) + ) + ORDER BY table1.NUMBER_RECORDS + LIMIT 0 +; +CALL s1; +CALL s1; + +drop table t1; +drop view view_t1; +drop procedure s1; + +# +# MDEV-7590 +# Server crashes in st_select_lex_unit::cleanup on executing a trigger +# + +CREATE TABLE A ( + pk INTEGER AUTO_INCREMENT, + col_int_key INTEGER, + col_varchar_key VARCHAR(1), + PRIMARY KEY (pk) +) ENGINE=MyISAM; +CREATE VIEW view_A AS SELECT * FROM A; +CREATE TABLE C ( + pk INTEGER AUTO_INCREMENT, + col_int_nokey INTEGER, + col_int_key INTEGER, + col_date_key DATE, + col_date_nokey DATE, + col_time_key TIME, + col_time_nokey TIME, + col_datetime_key DATETIME, + col_datetime_nokey DATETIME, + col_varchar_key VARCHAR(1), + col_varchar_nokey VARCHAR(1), + PRIMARY KEY (pk) +) ENGINE=MyISAM; +CREATE VIEW view_C AS SELECT * FROM C; +CREATE TABLE AA ( + pk INTEGER AUTO_INCREMENT, + col_int_nokey INTEGER, + col_int_key INTEGER, + col_date_key DATE, + col_date_nokey DATE, + col_time_key TIME, + col_time_nokey TIME, + col_datetime_key DATETIME, + col_datetime_nokey DATETIME, + col_varchar_key VARCHAR(1), + col_varchar_nokey VARCHAR(1), + PRIMARY KEY (pk), + KEY (col_varchar_key, col_int_key) +) ENGINE=MyISAM; +CREATE VIEW view_AA AS SELECT * FROM AA; +CREATE TABLE BB ( + pk INTEGER AUTO_INCREMENT, + col_int_key INTEGER, + col_varchar_key VARCHAR(1), + col_varchar_nokey VARCHAR(1), + PRIMARY KEY (pk), + KEY (col_varchar_key, col_int_key) +) ENGINE=MyISAM; +CREATE VIEW view_BB AS SELECT * FROM BB; +CREATE TABLE DD ( + pk INTEGER AUTO_INCREMENT, + col_int_key INTEGER, + col_date_key DATE, + col_time_key TIME, + col_datetime_key DATETIME, + col_varchar_key VARCHAR(1), + PRIMARY KEY (pk), + KEY (col_varchar_key, col_int_key) +) ENGINE=MyISAM; +CREATE VIEW view_DD AS SELECT * FROM DD; +CREATE TRIGGER k BEFORE INSERT ON `DD` FOR EACH ROW INSERT INTO `view_BB` SELECT * FROM `view_A` LIMIT 0 ; +CREATE TRIGGER r BEFORE INSERT ON `A` FOR EACH ROW INSERT INTO `view_AA` SELECT * FROM `view_C` LIMIT 0 ; +--error ER_WRONG_AUTO_KEY +ALTER TABLE `DD` DROP PRIMARY KEY; +INSERT INTO `view_A` ( `pk` ) VALUES (NULL); +--error 0,ER_WRONG_VALUE_COUNT_ON_ROW +INSERT INTO `DD` ( `pk` ) VALUES (NULL); +INSERT INTO `A` ( `pk` ) VALUES (NULL); +--error 0,ER_WRONG_VALUE_COUNT_ON_ROW +INSERT INTO `view_DD` ( `pk` ) VALUES (NULL); + +drop trigger r; +drop trigger k; +drop view view_A,view_AA,view_C,view_BB,view_DD; +drop table A,C,AA,BB,DD; + +# +# MDEV-7581 +# Server crashes in st_select_lex_unit::cleanup after a sequence of statements +# + +CREATE TABLE A ( + i INT, + i1 INT, + i2 INT, + d1 DATE, + d2 DATE, + col_time_nokey1 TIME, + col_time_nokey2 TIME, + col_datetime_nokey1 DATETIME, + col_datetime_nokey2 DATETIME, + col_varchar_nokey1 VARCHAR(1), + col_varchar_nokey2 VARCHAR(1) +) ENGINE=MyISAM; + +CREATE VIEW view_A AS SELECT * FROM A; + +CREATE TABLE B ( + col_varchar_nokey VARCHAR(1) +) ENGINE=MyISAM; + +CREATE TABLE AA ( + i INT, + i1 INT, + i2 INT, + d1 DATE, + d2 DATE, + col_time_nokey1 TIME, + col_time_nokey2 TIME, + col_datetime_nokey1 DATETIME, + col_datetime_nokey2 DATETIME, + col_varchar_nokey1 VARCHAR(1), + col_varchar_nokey2 VARCHAR(1) +) ENGINE=MyISAM; + +CREATE VIEW view_AA AS SELECT * FROM AA; + +CREATE TABLE DD ( + i INT, + i1 INT, + i2 INT, + d1 DATE, + d2 DATE, + col_time_nokey1 TIME, + col_time_nokey2 TIME, + col_datetime_nokey1 DATETIME, + col_datetime_nokey2 DATETIME, + col_varchar_nokey1 VARCHAR(1), + col_varchar_nokey2 VARCHAR(1) +) ENGINE=MyISAM; + +CREATE VIEW view_DD AS SELECT * FROM DD; + +CREATE TRIGGER tr1 BEFORE INSERT ON `AA` FOR EACH ROW INSERT INTO `view_A` SELECT * FROM `view_AA` LIMIT 0 ; +CREATE TRIGGER tr2 BEFORE INSERT ON `B` FOR EACH ROW INSERT INTO `D` SELECT * FROM `A` LIMIT 0 ; + +INSERT INTO `view_AA` ( `i` ) VALUES (1); +INSERT INTO `AA` ( `i` ) VALUES (2); +DELETE FROM `B`; +INSERT INTO `view_DD` ( `i` ) VALUES (1); +INSERT INTO `view_AA` ( `i` ) VALUES (3); + +drop trigger tr1; +drop trigger tr2; +drop view view_A, view_AA,view_DD; +drop table A,B,AA,DD; diff -Nru mariadb-5.5-5.5.44/mysql-test/t/subselect_sj_mat.test mariadb-5.5-5.5.46/mysql-test/t/subselect_sj_mat.test --- mariadb-5.5-5.5.44/mysql-test/t/subselect_sj_mat.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/subselect_sj_mat.test 2015-10-09 16:50:27.000000000 +0000 @@ -1841,5 +1841,20 @@ drop database mysqltest3; drop database mysqltest4; ---echo # End of 5.5 tests +--echo # +--echo # MDEV-7810 Wrong result on execution of a query as a PS +--echo # (both 1st and further executions) + +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 VALUES (0),(8); + +SELECT a FROM (SELECT DISTINCT * FROM t1) AS sq WHERE a IN (SELECT MIN(t2.a) FROM (t1 AS t2)); +PREPARE stmt FROM " +SELECT a FROM (SELECT DISTINCT * FROM t1) AS sq WHERE a IN (SELECT MIN(t2.a) FROM (t1 AS t2)) +"; +execute stmt; +execute stmt; +drop table t1; + +--echo # End of 5.5 tests diff -Nru mariadb-5.5-5.5.44/mysql-test/t/subselect.test mariadb-5.5-5.5.46/mysql-test/t/subselect.test --- mariadb-5.5-5.5.44/mysql-test/t/subselect.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/subselect.test 2015-10-09 16:50:27.000000000 +0000 @@ -53,7 +53,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); -- error ER_WRONG_USAGE select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); --- error ER_WRONG_PARAMETERS_TO_PROCEDURE +-- error ER_PARSE_ERROR SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -- error ER_BAD_FIELD_ERROR SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; @@ -5890,3 +5890,77 @@ create table t1 (c int); select exists(select 1 from t1 group by `c` in (select `c` from t1)); drop table t1; + +--echo # +--echo # MDEV-7565: Server crash with Signal 6 (part 2) +--echo # +Select + (Select Sum(`TestCase`.Revenue) From mysql.slow_log E + Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) + ) As `ControlRev` +From +(Select 3 as Revenue, 4 as TemplateID) As `TestCase` +Group By TestCase.Revenue, TestCase.TemplateID; + +--echo # +--echo # MDEV-7445:Server crash with Signal 6 +--echo # + +--delimiter | +CREATE PROCEDURE procedure2() +BEGIN + Select + (Select Sum(`TestCase`.Revenue) From mysql.slow_log E + Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2) + ) As `ControlRev` + From + (Select 3 as Revenue, 4 as TemplateID) As `TestCase` + Group By TestCase.Revenue, TestCase.TemplateID; + +END | +--delimiter ; +call procedure2(); +call procedure2(); + +drop procedure procedure2; + + +SELECT + (SELECT user FROM mysql.user + WHERE h.host in (SELECT host FROM mysql.user) + ) AS sq +FROM mysql.host h GROUP BY h.host; + + +--echo # +--echo # MDEV-7846:Server crashes in Item_subselect::fix +--echo #_fields or fails with Thread stack overrun +--echo # +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 table3.column3 IN ( SELECT 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; diff -Nru mariadb-5.5-5.5.44/mysql-test/t/update.test mariadb-5.5-5.5.46/mysql-test/t/update.test --- mariadb-5.5-5.5.44/mysql-test/t/update.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/update.test 2015-10-09 16:50:27.000000000 +0000 @@ -506,6 +506,21 @@ DROP FUNCTION f1; DROP TABLE t1; +--echo # Bug #21143080: UPDATE ON VARCHAR AND TEXT COLUMNS PRODUCE INCORRECT +--echo # RESULTS + +CREATE TABLE t1 (a VARCHAR(50), b TEXT, c CHAR(50)) ENGINE=INNODB; + +INSERT INTO t1 (a, b, c) VALUES ('start trail', '', 'even longer string'); +UPDATE t1 SET b = a, a = 'inject'; +SELECT a, b FROM t1; +UPDATE t1 SET b = c, c = 'inject'; +SELECT c, b FROM t1; + +DROP TABLE t1; + +--echo # +--echo # MDEV-3948 Assertion `records_are_comparable(table)' fails in compare_record(const TABLE*) on UPDATE with simple AND condition, index_merge+index_merge_intersection, InnoDB --echo # --echo # Verify that UPDATE does the same number of handler_update --echo # operations, no matter if there is ORDER BY or not. diff -Nru mariadb-5.5-5.5.44/mysql-test/t/view.test mariadb-5.5-5.5.46/mysql-test/t/view.test --- mariadb-5.5-5.5.44/mysql-test/t/view.test 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysql-test/t/view.test 2015-10-09 16:50:27.000000000 +0000 @@ -4741,6 +4741,50 @@ DROP VIEW v1, v2, v3, v4, v5; + +--echo # +--echo # BUG#19886430: VIEW CREATION WITH NAMED COLUMNS, OVER UNION, +--echo # IS REJECTED + +--echo # Without the patch, reports an error. +CREATE VIEW v1 (fld1, fld2) AS + SELECT 1 AS a, 2 AS b + UNION ALL + SELECT 1 AS a, 1 AS a; + +--echo # The column names are explicitly specified and not duplicates, hence +--echo # succeeds. +CREATE VIEW v2 (fld1, fld2) AS + SELECT 1 AS a, 2 AS a + UNION ALL + SELECT 1 AS a, 1 AS a; + +--echo # The column name in the first SELECT are not duplicates, hence succeeds. +CREATE VIEW v3 AS + SELECT 1 AS a, 2 AS b + UNION ALL + SELECT 1 AS a, 1 AS a; + +--echo # Should report an error, since the explicitly specified column names are +--echo # duplicates. +--error ER_DUP_FIELDNAME +CREATE VIEW v4 (fld1, fld1) AS + SELECT 1 AS a, 2 AS b + UNION ALL + SELECT 1 AS a, 1 AS a; + +--echo # Should report an error, since duplicate column name is specified in the +--echo # First SELECT. +--error ER_DUP_FIELDNAME +CREATE VIEW v4 AS + SELECT 1 AS a, 2 AS a + UNION ALL + SELECT 1 AS a, 1 AS a; + +--echo # Cleanup +DROP VIEW v1, v2, v3; + + # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc @@ -5380,6 +5424,27 @@ drop view v2; drop table t1; +--echo # +--echo # MDEV-8554: Server crashes in base_list_iterator::next_fast on 1st execution of PS with a multi-table update +--echo # +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); # Not necessary, the table can be empty + +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3),(4); # Not necessary, the table can be empty + +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +INSERT INTO t3 VALUES (5),(6); # Not necessary, the table can be empty + +CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3; + +PREPARE stmt FROM 'UPDATE t1, t2 SET a = 1 WHERE a IN ( SELECT 0 FROM t3 )'; +UPDATE t1, t2 SET a = 1 WHERE a IN ( SELECT 0 FROM v3 ); +EXECUTE stmt; + +DROP TABLE t1, t2, t3; +DROP VIEW v3; + --echo # ----------------------------------------------------------------- --echo # -- End of 5.5 tests. --echo # ----------------------------------------------------------------- diff -Nru mariadb-5.5-5.5.44/mysys/ptr_cmp.c mariadb-5.5-5.5.46/mysys/ptr_cmp.c --- mariadb-5.5-5.5.44/mysys/ptr_cmp.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/mysys/ptr_cmp.c 2015-10-09 16:50:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -91,6 +91,7 @@ reg3 int length= *compare_length; reg1 uchar *first,*last; + DBUG_ASSERT(length > 0); first= *a; last= *b; while (--length) { diff -Nru mariadb-5.5-5.5.44/regex/regcomp.c mariadb-5.5-5.5.46/regex/regcomp.c --- mariadb-5.5-5.5.44/regex/regcomp.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/regex/regcomp.c 2015-10-09 16:50:27.000000000 +0000 @@ -1,3 +1,11 @@ +/* Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. + See file COPYRIGHT for details. + + This file was modified by Oracle on 2015-05-18 for 32-bit compatibility. + + Modifications copyright (c) 2015, Oracle and/or its affiliates. All rights + reserved. */ + #include #include #include @@ -133,12 +141,26 @@ } else len = strlen((char *)pattern); + /* + Find the maximum len we can safely process + without a rollover and a mis-malloc. + p->ssize is a sopno is a long (32+ bit signed); + size_t is 16+ bit unsigned. + */ + { + size_t new_ssize = len / (size_t)2 * (size_t)3 + (size_t)1; /* ugh */ + if ((new_ssize < len) || /* size_t rolled over */ + ((SIZE_T_MAX / sizeof(sop)) < new_ssize) || /* malloc arg */ + (new_ssize > LONG_MAX)) /* won't fit in ssize */ + return(REG_ESPACE); /* MY_REG_ESPACE or MY_REG_INVARG */ + p->ssize = new_ssize; + } + /* do the mallocs early so failure handling is easy */ g = (struct re_guts *)malloc(sizeof(struct re_guts) + (NC-1)*sizeof(cat_t)); if (g == NULL) return(REG_ESPACE); - p->ssize = (long) (len/(size_t)2*(size_t)3 + (size_t)1); /* ugh */ p->strip = (sop *)malloc(p->ssize * sizeof(sop)); p->slen = 0; if (p->strip == NULL) { diff -Nru mariadb-5.5-5.5.44/sql/field.cc mariadb-5.5-5.5.46/sql/field.cc --- mariadb-5.5-5.5.44/sql/field.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/field.cc 2015-10-09 16:50:27.000000000 +0000 @@ -7612,7 +7612,8 @@ } Field_blob::store_length(length); - if (table->copy_blobs || length <= MAX_FIELD_WIDTH) + if ((table->copy_blobs || length <= MAX_FIELD_WIDTH) && + from != value.ptr()) { // Must make a copy value.copy(from, length, cs); from= value.ptr(); diff -Nru mariadb-5.5-5.5.44/sql/field_conv.cc mariadb-5.5-5.5.46/sql/field_conv.cc --- mariadb-5.5-5.5.44/sql/field_conv.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/field_conv.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,7 +1,6 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. - Copyright (c) 2010, 2012, Monty Program Ab - + Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, 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 @@ -863,15 +862,10 @@ { // Be sure the value is stored Field_blob *blob=(Field_blob*) to; from->val_str(&blob->value); - /* - Copy value if copy_blobs is set, or source is not a string and - we have a pointer to its internal string conversion buffer. - */ - if (to->table->copy_blobs || - (!blob->value.is_alloced() && - from->real_type() != MYSQL_TYPE_STRING && - from->real_type() != MYSQL_TYPE_VARCHAR)) + + if (!blob->value.is_alloced() && from->is_updatable()) blob->value.copy(); + return blob->store(blob->value.ptr(),blob->value.length(),from->charset()); } if (from->real_type() == MYSQL_TYPE_ENUM && diff -Nru mariadb-5.5-5.5.44/sql/field.h mariadb-5.5-5.5.46/sql/field.h --- mariadb-5.5-5.5.44/sql/field.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/field.h 2015-10-09 16:50:27.000000000 +0000 @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2014, SkySQL Ab. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2008, 2015, 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 @@ -638,6 +638,16 @@ /* Hash value */ virtual void hash(ulong *nr, ulong *nr2); +/** + Checks whether a string field is part of write_set. + + @return + FALSE - If field is not char/varchar/.... + - If field is char/varchar/.. and is not part of write set. + TRUE - If field is char/varchar/.. and is part of write set. +*/ + virtual bool is_updatable() const { return FALSE; } + /* Check whether the field can be used as a join attribute in hash join */ virtual bool hash_join_is_possible() { return TRUE; } virtual bool eq_cmp_as_binary() { return TRUE; } @@ -824,6 +834,11 @@ int store_decimal(const my_decimal *d); uint32 max_data_length() const; + bool is_updatable() const + { + DBUG_ASSERT(table && table->write_set); + return bitmap_is_set(table->write_set, field_index); + } }; /* base class for float and double and decimal (old one) */ diff -Nru mariadb-5.5-5.5.44/sql/item.cc mariadb-5.5-5.5.46/sql/item.cc --- mariadb-5.5-5.5.44/sql/item.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1146,18 +1146,24 @@ because Item_singlerow_subselect later calls Item_cache-specific methods, e.g. row[i]->store() and row[i]->cache_value(). - Let's wrap Item_func_conv_charset to a new Item_cache, + Let's wrap Item_func_conv_charset in a new Item_cache, so the Item_cache-specific methods can still be used for Item_singlerow_subselect::row[i] safely. + As a bonus we cache the converted value, instead of converting every time + TODO: we should eventually check all other use cases of change_item_tree(). Perhaps some more potentially dangerous substitution examples exist. */ Item *Item_cache::safe_charset_converter(CHARSET_INFO *tocs) { - Item_func_conv_charset *conv= new Item_func_conv_charset(example, tocs, 1); + if (!example) + return Item::safe_charset_converter(tocs); + Item *conv= example->safe_charset_converter(tocs); + if (conv == example) + return this; Item_cache *cache; - if (!conv || !conv->safe || !(cache= new Item_cache_str(conv))) + if (!conv || !(cache= new Item_cache_str(conv))) return NULL; // Safe conversion is not possible, or OEM cache->setup(conv); cache->fixed= false; // Make Item::fix_fields() happy @@ -4409,18 +4415,23 @@ Item_ident *resolved_item, Item_ident *mark_item) { - const char *db_name= (resolved_item->db_name ? - resolved_item->db_name : ""); - const char *table_name= (resolved_item->table_name ? - resolved_item->table_name : ""); + DBUG_ENTER("mark_as_dependent"); + /* store pointer on SELECT_LEX from which item is dependent */ if (mark_item && mark_item->can_be_depended) + { + DBUG_PRINT("info", ("mark_item: %p lex: %p", mark_item, last)); mark_item->depended_from= last; - if (current->mark_as_dependent(thd, last, /** resolved_item psergey-thu - **/mark_item)) - return TRUE; + } + if (current->mark_as_dependent(thd, last, + /** resolved_item psergey-thu **/ mark_item)) + DBUG_RETURN(TRUE); if (thd->lex->describe & DESCRIBE_EXTENDED) { + const char *db_name= (resolved_item->db_name ? + resolved_item->db_name : ""); + const char *table_name= (resolved_item->table_name ? + resolved_item->table_name : ""); push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_WARN_FIELD_RESOLVED, ER(ER_WARN_FIELD_RESOLVED), db_name, (db_name[0] ? "." : ""), @@ -4428,7 +4439,7 @@ resolved_item->field_name, current->select_number, last->select_number); } - return FALSE; + DBUG_RETURN(FALSE); } @@ -4877,7 +4888,7 @@ non aggregated fields of the outer select. */ marker= select->cur_pos_in_select_list; - select->non_agg_fields.push_back(this); + select->join->non_agg_fields.push_back(this); } if (*from_field != view_ref_found) { @@ -5293,9 +5304,10 @@ fixed= 1; if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY && !outer_fixed && !thd->lex->in_sum_func && - thd->lex->current_select->cur_pos_in_select_list != UNDEF_POS) + thd->lex->current_select->cur_pos_in_select_list != UNDEF_POS && + thd->lex->current_select->join) { - thd->lex->current_select->non_agg_fields.push_back(this); + thd->lex->current_select->join->non_agg_fields.push_back(this); marker= thd->lex->current_select->cur_pos_in_select_list; } mark_non_agg_field: @@ -6742,7 +6754,7 @@ /* This constructor used to create some internals references over fixed items */ - if (ref && *ref && (*ref)->fixed) + if ((set_properties_only= (ref && *ref && (*ref)->fixed))) set_properties(); } @@ -6786,7 +6798,7 @@ /* This constructor is used to create some internal references over fixed items */ - if (ref && *ref && (*ref)->fixed) + if ((set_properties_only= (ref && *ref && (*ref)->fixed))) set_properties(); } @@ -6861,7 +6873,11 @@ DBUG_ASSERT(fixed == 0); SELECT_LEX *current_sel= thd->lex->current_select; - if (!ref || ref == not_found_item) + if (set_properties_only) + { + /* do nothing */ + } + else if (!ref || ref == not_found_item) { DBUG_ASSERT(reference_trough_name != 0); if (!(ref= resolve_ref_in_select_and_group(thd, this, @@ -6879,7 +6895,7 @@ { /* The current reference cannot be resolved in this query. */ my_error(ER_BAD_FIELD_ERROR,MYF(0), - this->full_name(), current_thd->where); + this->full_name(), thd->where); goto error; } @@ -7014,7 +7030,7 @@ goto error; thd->change_item_tree(reference, fld); mark_as_dependent(thd, last_checked_context->select_lex, - thd->lex->current_select, fld, fld); + current_sel, fld, fld); /* A reference is resolved to a nest level that's outer or the same as the nest level of the enclosing set function : adjust the value of @@ -7031,7 +7047,7 @@ { /* The item was not a table field and not a reference */ my_error(ER_BAD_FIELD_ERROR, MYF(0), - this->full_name(), current_thd->where); + this->full_name(), thd->where); goto error; } /* Should be checked in resolve_ref_in_select_and_group(). */ diff -Nru mariadb-5.5-5.5.44/sql/item_cmpfunc.cc mariadb-5.5-5.5.46/sql/item_cmpfunc.cc --- mariadb-5.5-5.5.44/sql/item_cmpfunc.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_cmpfunc.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1442,9 +1442,36 @@ bool Item_in_optimizer::fix_left(THD *thd, Item **ref) { DBUG_ENTER("Item_in_optimizer::fix_left"); - if ((!args[0]->fixed && args[0]->fix_fields(thd, args)) || - (!cache && !(cache= Item_cache::get_cache(args[0])))) + /* + Here we will store pointer on place of main storage of left expression. + For usual IN (ALL/ANY) it is subquery left_expr. + For other cases (MAX/MIN optimization, non-transformed EXISTS (10.0)) + it is args[0]. + */ + Item **ref0= args; + if (args[1]->type() == Item::SUBSELECT_ITEM && + ((Item_subselect *)args[1])->is_in_predicate()) + { + /* + left_expr->fix_fields() may cause left_expr to be substituted for + another item. (e.g. an Item_field may be changed into Item_ref). This + transformation is undone at the end of statement execution (e.g. the + Item_ref is deleted). However, Item_in_optimizer::args[0] may keep + the pointer to the post-transformation item. Because of that, on the + next execution we need to copy args[1]->left_expr again. + */ + ref0= &(((Item_in_subselect *)args[1])->left_expr); + args[0]= ((Item_in_subselect *)args[1])->left_expr; + } + if ((!(*ref0)->fixed && (*ref0)->fix_fields(thd, ref0)) || + (!cache && !(cache= Item_cache::get_cache(*ref0)))) DBUG_RETURN(1); + /* + During fix_field() expression could be substituted. + So we copy changes before use + */ + if (args[0] != (*ref0)) + args[0]= (*ref0); DBUG_PRINT("info", ("actual fix fields")); cache->setup(args[0]); @@ -1500,6 +1527,16 @@ bool Item_in_optimizer::fix_fields(THD *thd, Item **ref) { DBUG_ASSERT(fixed == 0); + Item_subselect *sub= 0; + uint col; + + /* + MAX/MIN optimization can convert the subquery into + expr + Item_singlerow_subselect + */ + if (args[1]->type() == Item::SUBSELECT_ITEM) + sub= (Item_subselect *)args[1]; + if (fix_left(thd, ref)) return TRUE; if (args[0]->maybe_null) @@ -1507,10 +1544,10 @@ if (!args[1]->fixed && args[1]->fix_fields(thd, args+1)) return TRUE; - Item_in_subselect * sub= (Item_in_subselect *)args[1]; - if (args[0]->cols() != sub->engine->cols()) + if ((sub && ((col= args[0]->cols()) != sub->engine->cols())) || + (!sub && (args[1]->cols() != (col= 1)))) { - my_error(ER_OPERAND_COLUMNS, MYF(0), args[0]->cols()); + my_error(ER_OPERAND_COLUMNS, MYF(0), col); return TRUE; } if (args[1]->maybe_null) @@ -2692,7 +2729,8 @@ String *res=arg->val_str(str); if (res) res->set_charset(collation.collation); - null_value=arg->null_value; + if ((null_value=arg->null_value)) + res= NULL; return res; } @@ -2703,7 +2741,8 @@ DBUG_ASSERT(fixed == 1); Item *arg= args[0]->val_bool() ? args[1] : args[2]; my_decimal *value= arg->val_decimal(decimal_value); - null_value= arg->null_value; + if ((null_value= arg->null_value)) + value= NULL; return value; } diff -Nru mariadb-5.5-5.5.44/sql/item_func.cc mariadb-5.5-5.5.46/sql/item_func.cc --- mariadb-5.5-5.5.44/sql/item_func.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_func.cc 2015-10-09 16:50:27.000000000 +0000 @@ -887,7 +887,7 @@ case DECIMAL_RESULT: { my_decimal decimal_value, *val; - if (!(val= decimal_op(&decimal_value))) + if (!(val= decimal_op_with_null_check(&decimal_value))) return 0; // null is set my_decimal_round(E_DEC_FATAL_ERROR, val, decimals, FALSE, val); str->set_charset(collation.collation); @@ -914,24 +914,22 @@ if (is_temporal_type(field_type())) { MYSQL_TIME ltime; - if (date_op(<ime, - field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0) || - str->alloc(MAX_DATE_STRING_REP_LENGTH)) - { - null_value= 1; + if (date_op_with_null_check(<ime) || + (null_value= str->alloc(MAX_DATE_STRING_REP_LENGTH))) return (String *) 0; - } ltime.time_type= mysql_type_to_time_type(field_type()); str->length(my_TIME_to_str(<ime, const_cast(str->ptr()), decimals)); str->set_charset(&my_charset_bin); + DBUG_ASSERT(!null_value); return str; } - return str_op(&str_value); + return str_op_with_null_check(&str_value); case TIME_RESULT: case ROW_RESULT: case IMPOSSIBLE_RESULT: DBUG_ASSERT(0); } + DBUG_ASSERT(!null_value || (str == NULL)); return str; } @@ -944,7 +942,7 @@ { my_decimal decimal_value, *val; double result; - if (!(val= decimal_op(&decimal_value))) + if (!(val= decimal_op_with_null_check(&decimal_value))) return 0.0; // null is set my_decimal2double(E_DEC_FATAL_ERROR, val, &result); return result; @@ -961,18 +959,14 @@ if (is_temporal_type(field_type())) { MYSQL_TIME ltime; - if (date_op(<ime, - field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0 )) - { - null_value= 1; + if (date_op_with_null_check(<ime)) return 0; - } ltime.time_type= mysql_type_to_time_type(field_type()); return TIME_to_double(<ime); } char *end_not_used; int err_not_used; - String *res= str_op(&str_value); + String *res= str_op_with_null_check(&str_value); return (res ? my_strntod(res->charset(), (char*) res->ptr(), res->length(), &end_not_used, &err_not_used) : 0.0); } @@ -992,7 +986,7 @@ case DECIMAL_RESULT: { my_decimal decimal_value, *val; - if (!(val= decimal_op(&decimal_value))) + if (!(val= decimal_op_with_null_check(&decimal_value))) return 0; // null is set longlong result; my_decimal2int(E_DEC_FATAL_ERROR, val, unsigned_flag, &result); @@ -1007,18 +1001,14 @@ if (is_temporal_type(field_type())) { MYSQL_TIME ltime; - if (date_op(<ime, - field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0)) - { - null_value= 1; + if (date_op_with_null_check(<ime)) return 0; - } ltime.time_type= mysql_type_to_time_type(field_type()); return TIME_to_ulonglong(<ime); } int err_not_used; String *res; - if (!(res= str_op(&str_value))) + if (!(res= str_op_with_null_check(&str_value))) return 0; char *end= (char*) res->ptr() + res->length(); @@ -1040,17 +1030,21 @@ DBUG_ASSERT(fixed == 1); switch (cached_result_type) { case DECIMAL_RESULT: - val= decimal_op(decimal_value); + val= decimal_op_with_null_check(decimal_value); break; case INT_RESULT: { longlong result= int_op(); + if (null_value) + return NULL; int2my_decimal(E_DEC_FATAL_ERROR, result, unsigned_flag, decimal_value); break; } case REAL_RESULT: { double result= (double)real_op(); + if (null_value) + return NULL; double2my_decimal(E_DEC_FATAL_ERROR, result, decimal_value); break; } @@ -1059,19 +1053,20 @@ if (is_temporal_type(field_type())) { MYSQL_TIME ltime; - if (date_op(<ime, - field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0)) + if (date_op_with_null_check(<ime)) { my_decimal_set_zero(decimal_value); - null_value= 1; return 0; } ltime.time_type= mysql_type_to_time_type(field_type()); return date2my_decimal(<ime, decimal_value); } String *res; - if (!(res= str_op(&str_value))) + if (!(res= str_op_with_null_check(&str_value))) + { + null_value= 1; return NULL; + } str2my_decimal(E_DEC_FATAL_ERROR, (char*) res->ptr(), res->length(), res->charset(), decimal_value); @@ -1094,7 +1089,7 @@ case DECIMAL_RESULT: { my_decimal value, *res; - if (!(res= decimal_op(&value)) || + if (!(res= decimal_op_with_null_check(&value)) || decimal_to_datetime_with_warn(res, ltime, fuzzydate, field_name_or_null())) goto err; @@ -1124,7 +1119,7 @@ return date_op(ltime, fuzzydate); char buff[40]; String tmp(buff,sizeof(buff), &my_charset_bin),*res; - if (!(res= str_op(&tmp)) || + if (!(res= str_op_with_null_check(&tmp)) || str_to_datetime_with_warn(res->charset(), res->ptr(), res->length(), ltime, fuzzydate) <= MYSQL_TIMESTAMP_ERROR) goto err; @@ -4184,7 +4179,25 @@ it's not guaranteed to be same as on master. */ if (thd->slave_thread) + { + null_value= 0; DBUG_RETURN(1); + } + + if (args[1]->null_value || + (!args[1]->unsigned_flag && ((longlong) timeout < 0))) + { + char buf[22]; + if (args[1]->null_value) + strmov(buf, "NULL"); + else + llstr(((longlong) timeout), buf); + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE), + "timeout", buf, "get_lock"); + null_value= 1; + DBUG_RETURN(0); + } mysql_mutex_lock(&LOCK_user_locks); diff -Nru mariadb-5.5-5.5.44/sql/item_func.h mariadb-5.5-5.5.46/sql/item_func.h --- mariadb-5.5-5.5.44/sql/item_func.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_func.h 2015-10-09 16:50:27.000000000 +0000 @@ -377,17 +377,17 @@ void no_rows_in_result() { - bool_func_call_args info; - info.original_func_item= this; - info.bool_function= &Item::no_rows_in_result; - walk(&Item::call_bool_func_processor, FALSE, (uchar*) &info); + for (uint i= 0; i < arg_count; i++) + { + args[i]->no_rows_in_result(); + } } void restore_to_before_no_rows_in_result() { - bool_func_call_args info; - info.original_func_item= this; - info.bool_function= &Item::restore_to_before_no_rows_in_result; - walk(&Item::call_bool_func_processor, FALSE, (uchar*) &info); + for (uint i= 0; i < arg_count; i++) + { + args[i]->no_rows_in_result(); + } } }; @@ -411,6 +411,29 @@ class Item_func_hybrid_result_type: public Item_func { + /* + Helper methods to make sure that the result of + decimal_op(), str_op() and date_op() is properly synched with null_value. + */ + bool date_op_with_null_check(MYSQL_TIME *ltime) + { + bool rc= date_op(ltime, + field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0); + DBUG_ASSERT(!rc ^ null_value); + return rc; + } + String *str_op_with_null_check(String *str) + { + String *res= str_op(str); + DBUG_ASSERT((res != NULL) ^ null_value); + return res; + } + my_decimal *decimal_op_with_null_check(my_decimal *decimal_buffer) + { + my_decimal *res= decimal_op(decimal_buffer); + DBUG_ASSERT((res != NULL) ^ null_value); + return res; + } protected: Item_result cached_result_type; diff -Nru mariadb-5.5-5.5.44/sql/item.h mariadb-5.5-5.5.46/sql/item.h --- mariadb-5.5-5.5.44/sql/item.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item.h 2015-10-09 16:50:27.000000000 +0000 @@ -631,7 +631,7 @@ */ uint name_length; /* Length of name */ uint decimals; - int8 marker; + int marker; bool maybe_null; /* If item may be null */ bool in_rollup; /* If used in GROUP BY list of a query with ROLLUP */ @@ -2946,6 +2946,7 @@ { protected: void set_properties(); + bool set_properties_only; // the item doesn't need full fix_fields public: enum Ref_Type { REF, DIRECT_REF, VIEW_REF, OUTER_REF, AGGREGATE_REF }; Field *result_field; /* Save result here */ @@ -2955,7 +2956,7 @@ const char *db_arg, const char *table_name_arg, const char *field_name_arg) :Item_ident(context_arg, db_arg, table_name_arg, field_name_arg), - result_field(0), ref(0), reference_trough_name(1) {} + set_properties_only(0), result_field(0), ref(0), reference_trough_name(1) {} /* This constructor is used in two scenarios: A) *item = NULL @@ -2978,7 +2979,7 @@ /* Constructor need to process subselect with temporary tables (see Item) */ Item_ref(THD *thd, Item_ref *item) - :Item_ident(thd, item), result_field(item->result_field), ref(item->ref) {} + :Item_ident(thd, item), set_properties_only(0), result_field(item->result_field), ref(item->ref) {} enum Type type() const { return REF_ITEM; } enum Type real_type() const { return ref ? (*ref)->type() : REF_ITEM; } diff -Nru mariadb-5.5-5.5.44/sql/item_subselect.cc mariadb-5.5-5.5.46/sql/item_subselect.cc --- mariadb-5.5-5.5.44/sql/item_subselect.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_subselect.cc 2015-10-09 16:50:27.000000000 +0000 @@ -464,6 +464,7 @@ { List_iterator it(upper_refs); Ref_to_outside *upper; + DBUG_ENTER("recalc_used_tables"); used_tables_cache= 0; while ((upper= it++)) @@ -523,6 +524,8 @@ he has done const table detection, and that will be our chance to update const_tables_cache. */ + DBUG_PRINT("exit", ("used_tables_cache: %llx", used_tables_cache)); + DBUG_VOID_RETURN; } @@ -1360,7 +1363,7 @@ upper_item(0) { DBUG_ENTER("Item_in_subselect::Item_in_subselect"); - left_expr= left_exp; + left_expr_orig= left_expr= left_exp; func= &eq_creator; init(select_lex, new select_exists_subselect(this)); max_columns= UINT_MAX; @@ -1384,7 +1387,7 @@ :Item_in_subselect(), func_creator(fc), all(all_arg) { DBUG_ENTER("Item_allany_subselect::Item_allany_subselect"); - left_expr= left_exp; + left_expr_orig= left_expr= left_exp; func= func_creator(all_arg); init(select_lex, new select_exists_subselect(this)); max_columns= 1; @@ -1989,7 +1992,7 @@ */ bool -Item_in_subselect::create_single_in_to_exists_cond(JOIN * join, +Item_in_subselect::create_single_in_to_exists_cond(JOIN *join, Item **where_item, Item **having_item) { @@ -1999,7 +2002,6 @@ during JOIN::optimize: this->tmp_having= this->having; this->having= 0; */ Item* join_having= join->having ? join->having : join->tmp_having; - DBUG_ENTER("Item_in_subselect::create_single_in_to_exists_cond"); *where_item= NULL; @@ -2584,15 +2586,13 @@ arena= thd->activate_stmt_arena_if_needed(&backup); if (!optimizer) { - result= (!(optimizer= new Item_in_optimizer(left_expr, this))); + result= (!(optimizer= new Item_in_optimizer(left_expr_orig, this))); if (result) goto out; } thd->lex->current_select= current->return_after_parsing(); result= optimizer->fix_left(thd, optimizer->arguments()); - /* fix_fields can change reference to left_expr, we need reassign it */ - left_expr= optimizer->arguments()[0]; thd->lex->current_select= current; if (changed) @@ -2651,10 +2651,12 @@ { uint outer_cols_num; List *inner_cols; + char const *save_where= thd->where; if (test_strategy(SUBS_SEMI_JOIN)) return !( (*ref)= new Item_int(1)); + thd->where= "IN/ALL/ANY subquery"; /* Check if the outer and inner IN operands match in those cases when we will not perform IN=>EXISTS transformation. Currently this is when we @@ -2685,7 +2687,7 @@ if (outer_cols_num != inner_cols->elements) { my_error(ER_OPERAND_COLUMNS, MYF(0), outer_cols_num); - return TRUE; + goto err; } if (outer_cols_num > 1) { @@ -2695,20 +2697,24 @@ { inner_col= inner_col_it++; if (inner_col->check_cols(left_expr->element_index(i)->cols())) - return TRUE; + goto err; } } } - if (thd_arg->lex->is_view_context_analysis() && - left_expr && !left_expr->fixed && + if (left_expr && !left_expr->fixed && left_expr->fix_fields(thd_arg, &left_expr)) - return TRUE; + goto err; else - if (Item_subselect::fix_fields(thd_arg, ref)) - return TRUE; + if (Item_subselect::fix_fields(thd_arg, ref)) + goto err; fixed= TRUE; + thd->where= save_where; return FALSE; + +err: + thd->where= save_where; + return TRUE; } diff -Nru mariadb-5.5-5.5.44/sql/item_subselect.h mariadb-5.5-5.5.46/sql/item_subselect.h --- mariadb-5.5-5.5.44/sql/item_subselect.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_subselect.h 2015-10-09 16:50:27.000000000 +0000 @@ -449,6 +449,12 @@ Item **having_item); public: Item *left_expr; + /* + Important for PS/SP: left_expr_orig is the item that left_expr originally + pointed at. That item is allocated on the statement arena, while + left_expr could later be changed to something on the execution arena. + */ + Item *left_expr_orig; /* Priority of this predicate in the convert-to-semi-join-nest process. */ int sj_convert_priority; /* diff -Nru mariadb-5.5-5.5.44/sql/item_sum.cc mariadb-5.5-5.5.46/sql/item_sum.cc --- mariadb-5.5-5.5.44/sql/item_sum.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_sum.cc 2015-10-09 16:50:27.000000000 +0000 @@ -3514,9 +3514,17 @@ "all_fields". The resulting field list is used as input to create tmp table columns. */ - if (arg_count_order && - setup_order(thd, args, context->table_list, list, all_fields, *order)) - DBUG_RETURN(TRUE); + if (arg_count_order) + { + uint n_elems= arg_count_order + all_fields.elements; + ref_pointer_array= static_cast(thd->alloc(sizeof(Item*) * n_elems)); + if (!ref_pointer_array) + DBUG_RETURN(TRUE); + memcpy(ref_pointer_array, args, arg_count * sizeof(Item*)); + if (setup_order(thd, ref_pointer_array, context->table_list, list, + all_fields, *order)) + DBUG_RETURN(TRUE); + } count_field_types(select_lex, tmp_table_param, all_fields, 0); tmp_table_param->force_copy_fields= force_copy_fields; diff -Nru mariadb-5.5-5.5.44/sql/item_sum.h mariadb-5.5-5.5.46/sql/item_sum.h --- mariadb-5.5-5.5.44/sql/item_sum.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/item_sum.h 2015-10-09 16:50:27.000000000 +0000 @@ -1394,6 +1394,7 @@ String *separator; TREE tree_base; TREE *tree; + Item **ref_pointer_array; /** If DISTINCT is used with this GROUP_CONCAT, this member is used to filter diff -Nru mariadb-5.5-5.5.44/sql/log.cc mariadb-5.5-5.5.46/sql/log.cc --- mariadb-5.5-5.5.44/sql/log.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/log.cc 2015-10-09 16:50:27.000000000 +0000 @@ -3676,6 +3676,7 @@ { int error; char *to_purge_if_included= NULL; + ulonglong log_space_reclaimed= 0; DBUG_ENTER("purge_first_log"); DBUG_ASSERT(is_open()); @@ -3724,17 +3725,13 @@ DBUG_EXECUTE_IF("crash_before_purge_logs", DBUG_SUICIDE();); - mysql_mutex_lock(&rli->log_space_lock); rli->relay_log.purge_logs(to_purge_if_included, included, - 0, 0, &rli->log_space_total); - mysql_mutex_unlock(&rli->log_space_lock); + 0, 0, &log_space_reclaimed); - /* - Ok to broadcast after the critical region as there is no risk of - the mutex being destroyed by this thread later - this helps save - context switches - */ + mysql_mutex_lock(&rli->log_space_lock); + rli->log_space_total-= log_space_reclaimed; mysql_cond_broadcast(&rli->log_space_cond); + mysql_mutex_unlock(&rli->log_space_lock); /* * Need to update the log pos because purge logs has been called @@ -3783,8 +3780,8 @@ @param need_mutex @param need_update_threads If we want to update the log coordinates of all threads. False for relay logs, true otherwise. - @param freed_log_space If not null, decrement this variable of - the amount of log space freed + @param reclaimeed_log_space If not null, increment this variable to + the amount of log space freed @note If any of the logs before the deleted one is in use, @@ -3800,10 +3797,10 @@ */ int MYSQL_BIN_LOG::purge_logs(const char *to_log, - bool included, - bool need_mutex, - bool need_update_threads, - ulonglong *decrease_log_space) + bool included, + bool need_mutex, + bool need_update_threads, + ulonglong *reclaimed_space) { int error= 0; bool exit_loop= 0; @@ -3868,7 +3865,7 @@ err: /* Read each entry from purge_index_file and delete the file. */ if (is_inited_purge_index_file() && - (error= purge_index_entry(thd, decrease_log_space, FALSE))) + (error= purge_index_entry(thd, reclaimed_space, FALSE))) sql_print_error("MSYQL_BIN_LOG::purge_logs failed to process registered files" " that would be purged."); close_purge_index_file(); @@ -3973,7 +3970,7 @@ DBUG_RETURN(register_purge_index_entry(entry)); } -int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *decrease_log_space, +int MYSQL_BIN_LOG::purge_index_entry(THD *thd, ulonglong *reclaimed_space, bool need_mutex) { DBUG_ENTER("MYSQL_BIN_LOG:purge_index_entry"); @@ -4093,8 +4090,8 @@ DBUG_PRINT("info",("purging %s",log_info.log_file_name)); if (!my_delete(log_info.log_file_name, MYF(0))) { - if (decrease_log_space) - *decrease_log_space-= s.st_size; + if (reclaimed_space) + *reclaimed_space+= s.st_size; } else { diff -Nru mariadb-5.5-5.5.44/sql/log_event.cc mariadb-5.5-5.5.46/sql/log_event.cc --- mariadb-5.5-5.5.44/sql/log_event.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/log_event.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1249,9 +1249,10 @@ } data_len= uint4korr(buf + EVENT_LEN_OFFSET); if (data_len < LOG_EVENT_MINIMAL_HEADER_LEN || - data_len > current_thd->variables.max_allowed_packet) + data_len > max(current_thd->variables.max_allowed_packet, + opt_binlog_rows_event_max_size + MAX_LOG_EVENT_HEADER)) { - DBUG_PRINT("error",("data_len: %ld", data_len)); + DBUG_PRINT("error",("data_len: %lu", data_len)); result= ((data_len < LOG_EVENT_MINIMAL_HEADER_LEN) ? LOG_READ_BOGUS : LOG_READ_TOO_LARGE); goto end; @@ -1372,7 +1373,7 @@ */ DBUG_RETURN(0); } - uint data_len = uint4korr(head + EVENT_LEN_OFFSET); + ulong data_len = uint4korr(head + EVENT_LEN_OFFSET); char *buf= 0; const char *error= 0; Log_event *res= 0; @@ -1381,7 +1382,8 @@ uint max_allowed_packet= thd ? slave_max_allowed_packet:~(uint)0; #endif - if (data_len > max_allowed_packet) + if (data_len > max(max_allowed_packet, + opt_binlog_rows_event_max_size + MAX_LOG_EVENT_HEADER)) { error = "Event too big"; goto err; @@ -1415,7 +1417,7 @@ { DBUG_ASSERT(error != 0); sql_print_error("Error in Log_event::read_log_event(): " - "'%s', data_len: %d, event_type: %d", + "'%s', data_len: %lu, event_type: %d", error,data_len,head[EVENT_TYPE_OFFSET]); my_free(buf); /* @@ -2010,15 +2012,10 @@ my_decimal dec; binary2my_decimal(E_DEC_FATAL_ERROR, (uchar*) ptr, &dec, precision, decimals); - int i, end; - char buff[512], *pos; - pos= buff; - pos+= sprintf(buff, "%s", dec.sign() ? "-" : ""); - end= ROUND_UP(dec.frac) + ROUND_UP(dec.intg)-1; - for (i=0; i < end; i++) - pos+= sprintf(pos, "%09d.", dec.buf[i]); - pos+= sprintf(pos, "%09d", dec.buf[i]); - my_b_printf(file, "%s", buff); + int length= DECIMAL_MAX_STR_LENGTH; + char buff[DECIMAL_MAX_STR_LENGTH + 1]; + decimal2string(&dec, buff, &length, 0, 0, 0); + my_b_write(file, (uchar*)buff, length); my_snprintf(typestr, typestr_length, "DECIMAL(%d,%d)", precision, decimals); return bin_size; diff -Nru mariadb-5.5-5.5.44/sql/mysqld.cc mariadb-5.5-5.5.46/sql/mysqld.cc --- mariadb-5.5-5.5.44/sql/mysqld.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/mysqld.cc 2015-10-09 16:50:27.000000000 +0000 @@ -2488,7 +2488,6 @@ thd->add_status_to_global(); mysql_mutex_lock(&LOCK_thread_count); - thread_count--; thd->unlink(); /* Used by binlog_reset_master. It would be cleaner to use @@ -2496,6 +2495,16 @@ sync feature has been shut down at this point. */ DBUG_EXECUTE_IF("sleep_after_lock_thread_count_before_delete_thd", sleep(5);); + if (unlikely(abort_loop)) + { + /* + During shutdown, we have to delete thd inside the mutex + to not refer to mutexes that may be deleted during shutdown + */ + delete thd; + thd= 0; + } + thread_count--; mysql_mutex_unlock(&LOCK_thread_count); delete thd; @@ -3875,13 +3884,24 @@ { if (lower_case_table_names_used) { +#if MYSQL_VERSION_ID < 100100 if (global_system_variables.log_warnings) - sql_print_warning("\ -You have forced lower_case_table_names to 0 through a command-line \ -option, even though your file system '%s' is case insensitive. This means \ -that you can corrupt a MyISAM table by accessing it with different cases. \ -You should consider changing lower_case_table_names to 1 or 2", - mysql_real_data_home); + sql_print_warning("You have forced lower_case_table_names to 0 through " + "a command-line option, even though your file system " + "'%s' is case insensitive. This means that you can " + "corrupt your tables if you access them using names " + "with different letter case. You should consider " + "changing lower_case_table_names to 1 or 2", + mysql_real_data_home); +#else + sql_print_error("The server option 'lower_case_table_names' is " + "configured to use case sensitive table names but the " + "data directory resides on a case-insensitive file system. " + "Please use a case sensitive file system for your data " + "directory or switch to a case-insensitive table name " + "mode."); +#endif + return 1; } else { diff -Nru mariadb-5.5-5.5.44/sql/opt_range.cc mariadb-5.5-5.5.46/sql/opt_range.cc --- mariadb-5.5-5.5.44/sql/opt_range.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/opt_range.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2008, 2014, Monty Program Ab. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2008, 2015, 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 @@ -4081,10 +4081,19 @@ key_tree->min_flag | key_tree->max_flag, &subpart_iter); - DBUG_ASSERT(res); /* We can't get "no satisfying subpartitions" */ + if (res == 0) + { + /* + The only case where we can get "no satisfying subpartitions" + returned from the above call is when an error has occurred. + */ + DBUG_ASSERT(range_par->thd->is_error()); + return 0; + } + if (res == -1) goto pop_and_go_right; /* all subpartitions satisfy */ - + uint32 subpart_id; bitmap_clear_all(&ppar->subparts_bitmap); while ((subpart_id= subpart_iter.get_next(&subpart_iter)) != diff -Nru mariadb-5.5-5.5.44/sql/opt_subselect.cc mariadb-5.5-5.5.46/sql/opt_subselect.cc --- mariadb-5.5-5.5.44/sql/opt_subselect.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/opt_subselect.cc 2015-10-09 16:50:27.000000000 +0000 @@ -620,6 +620,18 @@ thd->stmt_arena->state != Query_arena::PREPARED) */ { + SELECT_LEX *current= thd->lex->current_select; + thd->lex->current_select= current->return_after_parsing(); + char const *save_where= thd->where; + thd->where= "IN/ALL/ANY subquery"; + + bool failure= !in_subs->left_expr->fixed && + in_subs->left_expr->fix_fields(thd, &in_subs->left_expr); + thd->lex->current_select= current; + thd->where= save_where; + if (failure) + DBUG_RETURN(-1); /* purecov: deadcode */ + /* Check if the left and right expressions have the same # of columns, i.e. we don't have a case like @@ -633,18 +645,6 @@ my_error(ER_OPERAND_COLUMNS, MYF(0), in_subs->left_expr->cols()); DBUG_RETURN(-1); } - - SELECT_LEX *current= thd->lex->current_select; - thd->lex->current_select= current->return_after_parsing(); - char const *save_where= thd->where; - thd->where= "IN/ALL/ANY subquery"; - - bool failure= !in_subs->left_expr->fixed && - in_subs->left_expr->fix_fields(thd, &in_subs->left_expr); - thd->lex->current_select= current; - thd->where= save_where; - if (failure) - DBUG_RETURN(-1); /* purecov: deadcode */ } DBUG_PRINT("info", ("Checking if subq can be converted to semi-join")); @@ -703,6 +703,12 @@ if (!optimizer_flag(thd, OPTIMIZER_SWITCH_IN_TO_EXISTS) && !optimizer_flag(thd, OPTIMIZER_SWITCH_MATERIALIZATION)) my_error(ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES, MYF(0)); + /* + Transform each subquery predicate according to its overloaded + transformer. + */ + if (subselect->select_transformer(join)) + DBUG_RETURN(-1); /* If the subquery predicate is IN/=ANY, analyse and set all possible @@ -754,12 +760,6 @@ allany_subs->add_strategy(strategy); } - /* - Transform each subquery predicate according to its overloaded - transformer. - */ - if (subselect->select_transformer(join)) - DBUG_RETURN(-1); } } DBUG_RETURN(0); @@ -1592,8 +1592,19 @@ if (subq_pred->left_expr->cols() == 1) { nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr); + /* + Create Item_func_eq. Note that + 1. this is done on the statement, not execution, arena + 2. if it's a PS then this happens only once - on the first execution. + On following re-executions, the item will be fix_field-ed normally. + 3. Thus it should be created as if it was fix_field'ed, in particular + all pointers to items in the execution arena should be protected + with thd->change_item_tree + */ Item_func_eq *item_eq= - new Item_func_eq(subq_pred->left_expr, subq_lex->ref_pointer_array[0]); + new Item_func_eq(subq_pred->left_expr_orig, subq_lex->ref_pointer_array[0]); + 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(sj_nest->sj_on_expr, item_eq); } diff -Nru mariadb-5.5-5.5.44/sql/partition_info.cc mariadb-5.5-5.5.46/sql/partition_info.cc --- mariadb-5.5-5.5.44/sql/partition_info.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/partition_info.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,4 +1,5 @@ -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. +/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, 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 @@ -1109,15 +1110,22 @@ { int err= 0; + /* Check for partition expression. */ if (!list_of_part_fields) { DBUG_ASSERT(part_expr); err= part_expr->walk(&Item::check_partition_func_processor, 0, NULL); - if (!err && is_sub_partitioned() && !list_of_subpart_fields) - err= subpart_expr->walk(&Item::check_partition_func_processor, 0, - NULL); } + + /* Check for sub partition expression. */ + if (!err && is_sub_partitioned() && !list_of_subpart_fields) + { + DBUG_ASSERT(subpart_expr); + err= subpart_expr->walk(&Item::check_partition_func_processor, 0, + NULL); + } + if (err) { my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); diff -Nru mariadb-5.5-5.5.44/sql/rpl_handler.cc mariadb-5.5-5.5.46/sql/rpl_handler.cc --- mariadb-5.5-5.5.44/sql/rpl_handler.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/rpl_handler.cc 2015-10-09 16:50:27.000000000 +0000 @@ -38,8 +38,6 @@ char log_file[FN_REFLEN]; } Trans_binlog_info; -static pthread_key(Trans_binlog_info*, RPL_TRANS_BINLOG_INFO); - int get_user_var_int(const char *name, long long int *value, int *null_value) { @@ -143,13 +141,6 @@ } #endif - if (pthread_key_create(&RPL_TRANS_BINLOG_INFO, NULL)) - { - sql_print_error("Error while creating pthread specific data key for replication. " - "Please report a bug."); - return 1; - } - return 0; } @@ -195,27 +186,27 @@ int Trans_delegate::after_commit(THD *thd, bool all) { Trans_param param; + Trans_binlog_info *log_info; bool is_real_trans= (all || thd->transaction.all.ha_list == 0); + int ret= 0; param.flags = is_real_trans ? TRANS_IS_REAL_TRANS : 0; - Trans_binlog_info *log_info= - my_pthread_getspecific_ptr(Trans_binlog_info*, RPL_TRANS_BINLOG_INFO); + log_info= thd->semisync_info; - param.log_file= log_info ? log_info->log_file : 0; + param.log_file= log_info && log_info->log_file[0] ? log_info->log_file : 0; param.log_pos= log_info ? log_info->log_pos : 0; - int ret= 0; FOREACH_OBSERVER(ret, after_commit, false, (¶m)); /* This is the end of a real transaction or autocommit statement, we - can free the memory allocated for binlog file and position. + can mark the memory unused. */ if (is_real_trans && log_info) { - my_pthread_setspecific_ptr(RPL_TRANS_BINLOG_INFO, NULL); - my_free(log_info); + log_info->log_file[0]= 0; + log_info->log_pos= 0; } return ret; } @@ -223,27 +214,27 @@ int Trans_delegate::after_rollback(THD *thd, bool all) { Trans_param param; + Trans_binlog_info *log_info; bool is_real_trans= (all || thd->transaction.all.ha_list == 0); + int ret= 0; param.flags = is_real_trans ? TRANS_IS_REAL_TRANS : 0; - Trans_binlog_info *log_info= - my_pthread_getspecific_ptr(Trans_binlog_info*, RPL_TRANS_BINLOG_INFO); - - param.log_file= log_info ? log_info->log_file : 0; + log_info= thd->semisync_info; + + param.log_file= log_info && log_info->log_file[0] ? log_info->log_file : 0; param.log_pos= log_info ? log_info->log_pos : 0; - int ret= 0; FOREACH_OBSERVER(ret, after_rollback, false, (¶m)); /* This is the end of a real transaction or autocommit statement, we - can free the memory allocated for binlog file and position. + can mark the memory unused. */ if (is_real_trans && log_info) { - my_pthread_setspecific_ptr(RPL_TRANS_BINLOG_INFO, NULL); - my_free(log_info); + log_info->log_file[0]= 0; + log_info->log_pos= 0; } return ret; } @@ -254,25 +245,24 @@ bool synced) { Binlog_storage_param param; + Trans_binlog_info *log_info; uint32 flags=0; + int ret= 0; + if (synced) flags |= BINLOG_STORAGE_IS_SYNCED; - Trans_binlog_info *log_info= - my_pthread_getspecific_ptr(Trans_binlog_info*, RPL_TRANS_BINLOG_INFO); - - if (!log_info) + if (!(log_info= thd->semisync_info)) { if(!(log_info= - (Trans_binlog_info *)my_malloc(sizeof(Trans_binlog_info), MYF(0)))) + (Trans_binlog_info*) my_malloc(sizeof(Trans_binlog_info), MYF(0)))) return 1; - my_pthread_setspecific_ptr(RPL_TRANS_BINLOG_INFO, log_info); + thd->semisync_info= log_info; } - + strcpy(log_info->log_file, log_file+dirname_length(log_file)); log_info->log_pos = log_pos; - int ret= 0; FOREACH_OBSERVER(ret, after_flush, false, (¶m, log_info->log_file, log_info->log_pos, flags)); return ret; diff -Nru mariadb-5.5-5.5.44/sql/rpl_utility.cc mariadb-5.5-5.5.46/sql/rpl_utility.cc --- mariadb-5.5-5.5.44/sql/rpl_utility.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/rpl_utility.cc 2015-10-09 16:50:27.000000000 +0000 @@ -876,6 +876,7 @@ { Create_field *field_def= (Create_field*) alloc_root(thd->mem_root, sizeof(Create_field)); + bool unsigned_flag= 0; if (field_list.push_back(field_def)) DBUG_RETURN(NULL); @@ -885,8 +886,7 @@ uint32 max_length= max_display_length_for_field(type(col), field_metadata(col)); - switch(type(col)) - { + switch(type(col)) { int precision; case MYSQL_TYPE_ENUM: case MYSQL_TYPE_SET: @@ -925,6 +925,18 @@ pack_length= field_metadata(col) & 0x00ff; break; + case MYSQL_TYPE_TINY: + case MYSQL_TYPE_SHORT: + case MYSQL_TYPE_INT24: + case MYSQL_TYPE_LONG: + case MYSQL_TYPE_LONGLONG: + /* + As we don't know if the integer was signed or not on the master, + assume we have same sign on master and slave. This is true when not + using conversions so it should be true also when using conversions. + */ + unsigned_flag= ((Field_num*) target_table->field[col])->unsigned_flag; + break; default: break; } @@ -932,12 +944,13 @@ DBUG_PRINT("debug", ("sql_type: %d, target_field: '%s', max_length: %d, decimals: %d," " maybe_null: %d, unsigned_flag: %d, pack_length: %u", type(col), target_table->field[col]->field_name, - max_length, decimals, TRUE, FALSE, pack_length)); + max_length, decimals, TRUE, unsigned_flag, + pack_length)); field_def->init_for_tmp_table(type(col), max_length, decimals, TRUE, // maybe_null - FALSE, // unsigned_flag + unsigned_flag, pack_length); field_def->charset= target_table->field[col]->charset(); field_def->interval= interval; diff -Nru mariadb-5.5-5.5.44/sql/slave.cc mariadb-5.5-5.5.46/sql/slave.cc --- mariadb-5.5-5.5.44/sql/slave.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/slave.cc 2015-10-09 16:50:27.000000000 +0000 @@ -3556,9 +3556,7 @@ rli->clear_error(); //tell the I/O thread to take relay_log_space_limit into account from now on - mysql_mutex_lock(&rli->log_space_lock); rli->ignore_log_space_limit= 0; - mysql_mutex_unlock(&rli->log_space_lock); rli->trans_retries= 0; // start from "no error" DBUG_PRINT("info", ("rli->trans_retries: %lu", rli->trans_retries)); @@ -5228,14 +5226,8 @@ rli->ignore_log_space_limit= true; } - /* - If the I/O thread is blocked, unblock it. Ok to broadcast - after unlock, because the mutex is only destroyed in - ~Relay_log_info(), i.e. when rli is destroyed, and rli will - not be destroyed before we exit the present function. - */ - mysql_mutex_unlock(&rli->log_space_lock); mysql_cond_broadcast(&rli->log_space_cond); + mysql_mutex_unlock(&rli->log_space_lock); // Note that wait_for_update_relay_log unlocks lock_log ! rli->relay_log.wait_for_update_relay_log(rli->sql_thd); // re-acquire data lock since we released it earlier diff -Nru mariadb-5.5-5.5.44/sql/sql_acl.cc mariadb-5.5-5.5.46/sql/sql_acl.cc --- mariadb-5.5-5.5.44/sql/sql_acl.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_acl.cc 2015-10-09 16:50:27.000000000 +0000 @@ -4652,16 +4652,19 @@ tl && number-- && tl != first_not_own_table; tl= tl->next_global) { - sctx = test(tl->security_ctx) ? tl->security_ctx : thd->security_ctx; + TABLE_LIST *const t_ref= + tl->correspondent_table ? tl->correspondent_table : tl; + sctx = test(t_ref->security_ctx) ? t_ref->security_ctx : + thd->security_ctx; const ACL_internal_table_access *access= - get_cached_table_access(&tl->grant.m_internal, - tl->get_db_name(), - tl->get_table_name()); + get_cached_table_access(&t_ref->grant.m_internal, + t_ref->get_db_name(), + t_ref->get_table_name()); if (access) { - switch(access->check(orig_want_access, &tl->grant.privilege)) + switch(access->check(orig_want_access, &t_ref->grant.privilege)) { case ACL_INTERNAL_ACCESS_GRANTED: /* @@ -4685,33 +4688,33 @@ if (!want_access) continue; // ok - if (!(~tl->grant.privilege & want_access) || - tl->is_anonymous_derived_table() || tl->schema_table) + if (!(~t_ref->grant.privilege & want_access) || + t_ref->is_anonymous_derived_table() || t_ref->schema_table) { /* - It is subquery in the FROM clause. VIEW set tl->derived after + It is subquery in the FROM clause. VIEW set t_ref->derived after table opening, but this function always called before table opening. */ - if (!tl->referencing_view) + if (!t_ref->referencing_view) { /* If it's a temporary table created for a subquery in the FROM clause, or an INFORMATION_SCHEMA table, drop the request for a privilege. */ - tl->grant.want_privilege= 0; + t_ref->grant.want_privilege= 0; } continue; } GRANT_TABLE *grant_table= table_hash_search(sctx->host, sctx->ip, - tl->get_db_name(), + t_ref->get_db_name(), sctx->priv_user, - tl->get_table_name(), + t_ref->get_table_name(), FALSE); if (!grant_table) { - want_access &= ~tl->grant.privilege; + want_access &= ~t_ref->grant.privilege; goto err; // No grants } @@ -4722,17 +4725,17 @@ if (any_combination_will_do) continue; - tl->grant.grant_table= grant_table; // Remember for column test - tl->grant.version= grant_version; - tl->grant.privilege|= grant_table->privs; - tl->grant.want_privilege= ((want_access & COL_ACLS) & ~tl->grant.privilege); + t_ref->grant.grant_table= grant_table; // Remember for column test + t_ref->grant.version= grant_version; + t_ref->grant.privilege|= grant_table->privs; + t_ref->grant.want_privilege= ((want_access & COL_ACLS) & ~t_ref->grant.privilege); - if (!(~tl->grant.privilege & want_access)) + if (!(~t_ref->grant.privilege & want_access)) continue; - if (want_access & ~(grant_table->cols | tl->grant.privilege)) + if (want_access & ~(grant_table->cols | t_ref->grant.privilege)) { - want_access &= ~(grant_table->cols | tl->grant.privilege); + want_access &= ~(grant_table->cols | t_ref->grant.privilege); goto err; // impossible } } diff -Nru mariadb-5.5-5.5.44/sql/sql_base.cc mariadb-5.5-5.5.46/sql/sql_base.cc --- mariadb-5.5-5.5.44/sql/sql_base.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_base.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1682,13 +1682,20 @@ if (!thd->temporary_tables) DBUG_RETURN(FALSE); + /* + Ensure we don't have open HANDLERs for tables we are about to close. + This is necessary when close_temporary_tables() is called as part + of execution of BINLOG statement (e.g. for format description event). + */ + mysql_ha_rm_temporary_tables(thd); if (!mysql_bin_log.is_open()) { TABLE *tmp_next; - for (table= thd->temporary_tables; table; table= tmp_next) + for (TABLE *t= thd->temporary_tables; t; t= tmp_next) { - tmp_next= table->next; - close_temporary(table, 1, 1); + tmp_next= t->next; + mysql_lock_remove(thd, thd->lock, t); + close_temporary(t, 1, 1); } thd->temporary_tables= 0; DBUG_RETURN(FALSE); @@ -1783,6 +1790,7 @@ strlen(table->s->table_name.str)); s_query.append(','); next= table->next; + mysql_lock_remove(thd, thd->lock, table); close_temporary(table, 1, 1); } thd->clear_error(); @@ -4064,10 +4072,11 @@ * We met a broken table that needs repair, or a table that is not present on this MySQL server and needs re-discovery. To perform the action, we need an exclusive metadata lock on - the table. Acquiring an X lock while holding other shared - locks is very deadlock-prone. If this is a multi- statement - transaction that holds metadata locks for completed - statements, we don't do it, and report an error instead. + the table. Acquiring X lock while holding other shared + locks can easily lead to deadlocks. We rely on MDL deadlock + detector to discover them. If this is a multi-statement + transaction that holds metadata locks for completed statements, + we should keep these locks after discovery/repair. The action type in this case is OT_DISCOVER or OT_REPAIR. * Our attempt to acquire an MDL lock lead to a deadlock, detected by the MDL deadlock detector. The current @@ -4108,7 +4117,7 @@ keep tables open between statements and a livelock is not possible. */ - if (action_arg != OT_REOPEN_TABLES && m_has_locks) + if (action_arg == OT_BACKOFF_AND_RETRY && m_has_locks) { my_error(ER_LOCK_DEADLOCK, MYF(0)); m_thd->mark_transaction_to_rollback(true); @@ -4136,6 +4145,32 @@ /** + An error handler to mark transaction to rollback on DEADLOCK error + during DISCOVER / REPAIR. +*/ +class MDL_deadlock_discovery_repair_handler : public Internal_error_handler +{ +public: + virtual bool handle_condition(THD *thd, + uint sql_errno, + const char* sqlstate, + MYSQL_ERROR::enum_warning_level level, + const char* msg, + MYSQL_ERROR ** cond_hdl) + { + if (sql_errno == ER_LOCK_DEADLOCK) + { + thd->mark_transaction_to_rollback(true); + } + /* + We have marked this transaction to rollback. Return false to allow + error to be reported or handled by other handlers. + */ + return false; + } +}; + +/** Recover from failed attempt of open table by performing requested action. @pre This function should be called only with "action" != OT_NO_ACTION @@ -4150,6 +4185,12 @@ recover_from_failed_open() { bool result= FALSE; + MDL_deadlock_discovery_repair_handler handler; + /* + Install error handler to mark transaction to rollback on DEADLOCK error. + */ + m_thd->push_internal_handler(&handler); + /* Execute the action. */ switch (m_action) { @@ -4171,7 +4212,12 @@ m_thd->warning_info->clear_warning_info(m_thd->query_id); m_thd->clear_error(); // Clear error message - m_thd->mdl_context.release_transactional_locks(); + /* + Rollback to start of the current statement to release exclusive lock + on table which was discovered but preserve locks from previous statements + in current transaction. + */ + m_thd->mdl_context.rollback_to_savepoint(start_of_statement_svp()); break; } case OT_REPAIR: @@ -4185,12 +4231,18 @@ m_failed_table->table_name, FALSE); result= auto_repair_table(m_thd, m_failed_table); - m_thd->mdl_context.release_transactional_locks(); + /* + Rollback to start of the current statement to release exclusive lock + on table which was discovered but preserve locks from previous statements + in current transaction. + */ + m_thd->mdl_context.rollback_to_savepoint(start_of_statement_svp()); break; } default: DBUG_ASSERT(0); } + m_thd->pop_internal_handler(); /* Reset the pointers to conflicting MDL request and the TABLE_LIST element, set when we need auto-discovery or repair, @@ -6859,6 +6911,7 @@ if (item->cached_table) { + DBUG_PRINT("info", ("using cached table")); /* This shortcut is used by prepared statements. We assume that TABLE_LIST *first_table is not changed during query execution (which diff -Nru mariadb-5.5-5.5.44/sql/sql_class.cc mariadb-5.5-5.5.46/sql/sql_class.cc --- mariadb-5.5-5.5.44/sql/sql_class.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_class.cc 2015-10-09 16:50:27.000000000 +0000 @@ -877,6 +877,7 @@ file_id = 0; query_id= 0; query_name_consts= 0; + semisync_info= 0; db_charset= global_system_variables.collation_database; bzero(ha_data, sizeof(ha_data)); mysys_var=0; @@ -1263,6 +1264,7 @@ bzero((char *) &status_var, sizeof(status_var)); bzero((char *) &org_status_var, sizeof(org_status_var)); start_bytes_received= 0; + status_in_global= 0; if (variables.sql_log_bin) variables.option_bits|= OPTION_BIN_LOG; @@ -1366,6 +1368,7 @@ cleanup(); reset_killed(); cleanup_done= 0; + status_in_global= 0; init(); stmt_map.reset(); my_hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0, @@ -1491,6 +1494,7 @@ mysql_audit_free_thd(this); if (rli_slave) rli_slave->cleanup_after_session(); + my_free(semisync_info); #endif free_root(&main_mem_root, MYF(0)); diff -Nru mariadb-5.5-5.5.44/sql/sql_class.h mariadb-5.5-5.5.46/sql/sql_class.h --- mariadb-5.5-5.5.44/sql/sql_class.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_class.h 2015-10-09 16:50:27.000000000 +0000 @@ -47,7 +47,6 @@ class Reprepare_observer; class Relay_log_info; - class Query_log_event; class Load_log_event; class Slave_log_event; @@ -59,6 +58,7 @@ class Sroutine_hash_entry; class User_level_lock; class user_var_entry; +struct Trans_binlog_info; enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE }; enum enum_ha_read_modes { RFIRST, RNEXT, RPREV, RLAST, RKEY, RNEXT_SAME }; @@ -1670,6 +1670,9 @@ */ const char *where; + /* Needed by MariaDB semi sync replication */ + Trans_binlog_info *semisync_info; + ulong client_capabilities; /* What the client supports */ ulong max_client_packet_length; @@ -1733,11 +1736,11 @@ /* Do not set socket timeouts for wait_timeout (used with threadpool) */ bool skip_wait_timeout; - /* container for handler's private per-connection data */ - Ha_data ha_data[MAX_HA]; - bool prepare_derived_at_open; + /* Set to 1 if status of this THD is already in global status */ + bool status_in_global; + /* To signal that the tmp table to be created is created for materialized derived table or a view. @@ -1746,6 +1749,9 @@ bool save_prep_leaf_list; + /* container for handler's private per-connection data */ + Ha_data ha_data[MAX_HA]; + #ifndef MYSQL_CLIENT binlog_cache_mngr * binlog_setup_trx_data(); @@ -3116,6 +3122,8 @@ { mysql_mutex_lock(&LOCK_status); add_to_status(&global_status_var, &status_var); + /* Mark that this THD status has already been added in global status */ + status_in_global= 1; mysql_mutex_unlock(&LOCK_status); } diff -Nru mariadb-5.5-5.5.44/sql/sql_handler.cc mariadb-5.5-5.5.46/sql/sql_handler.cc --- mariadb-5.5-5.5.44/sql/sql_handler.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_handler.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,5 +1,5 @@ -/* Copyright (c) 2001, 2013, Oracle and/or its affiliates. - Copyright (c) 2011, 2013, Monty Program Ab. +/* Copyright (c) 2001, 2015, Oracle and/or its affiliates. + Copyright (c) 2011, 2015, 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 @@ -1187,3 +1187,36 @@ DBUG_VOID_RETURN; } + +/** + Remove temporary tables from the HANDLER's hash table. The reason + for having a separate function, rather than calling + mysql_ha_rm_tables() is that it is not always feasible (e.g. in + close_temporary_tables) to obtain a TABLE_LIST containing the + temporary tables. + + @See close_temporary_tables + @param thd Thread identifier. +*/ +void mysql_ha_rm_temporary_tables(THD *thd) +{ + DBUG_ENTER("mysql_ha_rm_temporary_tables"); + + TABLE_LIST *tmp_handler_tables= NULL; + for (uint i= 0; i < thd->handler_tables_hash.records; i++) + { + TABLE_LIST *handler_table= reinterpret_cast + (my_hash_element(&thd->handler_tables_hash, i)); + + if (handler_table->table && handler_table->table->s->tmp_table) + { + handler_table->next_local= tmp_handler_tables; + tmp_handler_tables= handler_table; + } + } + + if (tmp_handler_tables) + mysql_ha_rm_tables(thd, tmp_handler_tables); + + DBUG_VOID_RETURN; +} diff -Nru mariadb-5.5-5.5.44/sql/sql_handler.h mariadb-5.5-5.5.46/sql/sql_handler.h --- mariadb-5.5-5.5.44/sql/sql_handler.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_handler.h 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,8 @@ #ifndef SQL_HANDLER_INCLUDED #define SQL_HANDLER_INCLUDED -/* Copyright (C) 2010 Monty Program Ab +/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. + Copyright (C) 2010, 2015, MariaDB + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. @@ -73,6 +75,7 @@ void mysql_ha_rm_tables(THD *thd, TABLE_LIST *tables); void mysql_ha_cleanup(THD *thd); void mysql_ha_set_explicit_lock_duration(THD *thd); +void mysql_ha_rm_temporary_tables(THD *thd); SQL_HANDLER *mysql_ha_read_prepare(THD *thd, TABLE_LIST *tables, enum enum_ha_read_modes mode, char *keyname, diff -Nru mariadb-5.5-5.5.44/sql/sql_insert.cc mariadb-5.5-5.5.46/sql/sql_insert.cc --- mariadb-5.5-5.5.44/sql/sql_insert.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_insert.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2014, SkySQL Ab. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, 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 @@ -3842,7 +3842,6 @@ /* Add selected items to field list */ List_iterator_fast it(*items); Item *item; - Field *tmp_field; DBUG_ENTER("create_table_from_items"); tmp_table.alias= 0; @@ -3857,24 +3856,49 @@ while ((item=it++)) { - Create_field *cr_field; - Field *field, *def_field; + Field *tmp_table_field; if (item->type() == Item::FUNC_ITEM) { if (item->result_type() != STRING_RESULT) - field= item->tmp_table_field(&tmp_table); + tmp_table_field= item->tmp_table_field(&tmp_table); else - field= item->tmp_table_field_from_field_type(&tmp_table, 0); + tmp_table_field= item->tmp_table_field_from_field_type(&tmp_table, + false); } else - field= create_tmp_field(thd, &tmp_table, item, item->type(), - (Item ***) 0, &tmp_field, &def_field, 0, 0, 0, 0, - 0); - if (!field || - !(cr_field=new Create_field(field,(item->type() == Item::FIELD_ITEM ? - ((Item_field *)item)->field : - (Field*) 0)))) - DBUG_RETURN(0); + { + Field *from_field, * default_field; + tmp_table_field= create_tmp_field(thd, &tmp_table, item, item->type(), + (Item ***) NULL, &from_field, &default_field, + 0, 0, 0, 0, 0); + } + + if (!tmp_table_field) + DBUG_RETURN(NULL); + + Field *table_field; + + switch (item->type()) + { + /* + We have to take into account both the real table's fields and + pseudo-fields used in trigger's body. These fields are used + to copy defaults values later inside constructor of + the class Create_field. + */ + case Item::FIELD_ITEM: + case Item::TRIGGER_FIELD_ITEM: + table_field= ((Item_field *) item)->field; + break; + default: + table_field= NULL; + } + + Create_field *cr_field= new Create_field(tmp_table_field, table_field); + + if (!cr_field) + DBUG_RETURN(NULL); + if (item->maybe_null) cr_field->flags &= ~NOT_NULL_FLAG; alter_info->create_list.push_back(cr_field); @@ -3942,7 +3966,7 @@ { if (!thd->is_error()) // CREATE ... IF NOT EXISTS my_ok(thd); // succeed, but did nothing - DBUG_RETURN(0); + DBUG_RETURN(NULL); } } diff -Nru mariadb-5.5-5.5.44/sql/sql_lex.cc mariadb-5.5-5.5.46/sql/sql_lex.cc --- mariadb-5.5-5.5.44/sql/sql_lex.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_lex.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1917,7 +1917,6 @@ with_sum_func= 0; is_correlated= 0; cur_pos_in_select_list= UNDEF_POS; - non_agg_fields.empty(); cond_value= having_value= Item::COND_UNDEF; inner_refs_list.empty(); insert_tables= 0; @@ -1925,6 +1924,7 @@ m_non_agg_field_used= false; m_agg_func_used= false; name_visibility_map= 0; + join= 0; } /* diff -Nru mariadb-5.5-5.5.44/sql/sql_lex.h mariadb-5.5-5.5.46/sql/sql_lex.h --- mariadb-5.5-5.5.44/sql/sql_lex.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_lex.h 2015-10-09 16:50:27.000000000 +0000 @@ -877,8 +877,6 @@ bool no_wrap_view_item; /* exclude this select from check of unique_table() */ bool exclude_from_table_unique_test; - /* List of fields that aren't under an aggregate function */ - List non_agg_fields; /* index in the select list of the expression currently being fixed */ int cur_pos_in_select_list; diff -Nru mariadb-5.5-5.5.44/sql/sql_load.cc mariadb-5.5-5.5.46/sql/sql_load.cc --- mariadb-5.5-5.5.44/sql/sql_load.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_load.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2010, 2014, Monty Progrm Ab + Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, 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 @@ -2012,8 +2012,15 @@ break; case '/': /* close tag */ - level--; chr= my_tospace(GET); + /* Decrease the 'level' only when (i) It's not an */ + /* (without space) empty tag i.e. or, (ii) */ + /* It is of format */ + if(chr != '>' || in_tag) + { + level--; + in_tag= false; + } if(chr != '>') /* if this is an empty tag */ tag.length(0); /* we should keep tag value */ while(chr != '>' && chr != my_b_EOF) diff -Nru mariadb-5.5-5.5.44/sql/sql_parse.cc mariadb-5.5-5.5.46/sql/sql_parse.cc --- mariadb-5.5-5.5.44/sql/sql_parse.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_parse.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2008, 2014, SkySQL Ab. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2008, 2015, 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 @@ -5197,9 +5197,12 @@ for (; i < number && tables != first_not_own_table && tables; tables= tables->next_global, i++) { + TABLE_LIST *const table_ref= tables->correspondent_table ? + tables->correspondent_table : tables; + ulong want_access= requirements; - if (tables->security_ctx) - sctx= tables->security_ctx; + if (table_ref->security_ctx) + sctx= table_ref->security_ctx; else sctx= backup_ctx; @@ -5207,26 +5210,26 @@ Register access for view underlying table. Remove SHOW_VIEW_ACL, because it will be checked during making view */ - tables->grant.orig_want_privilege= (want_access & ~SHOW_VIEW_ACL); + table_ref->grant.orig_want_privilege= (want_access & ~SHOW_VIEW_ACL); - if (tables->schema_table_reformed) + if (table_ref->schema_table_reformed) { - if (check_show_access(thd, tables)) + if (check_show_access(thd, table_ref)) goto deny; continue; } - DBUG_PRINT("info", ("derived: %d view: %d", tables->derived != 0, - tables->view != 0)); - if (tables->is_anonymous_derived_table() || - (tables->table && tables->table->s && - (int)tables->table->s->tmp_table)) + DBUG_PRINT("info", ("derived: %d view: %d", table_ref->derived != 0, + table_ref->view != 0)); + if (table_ref->is_anonymous_derived_table() || + (table_ref->table && table_ref->table->s && + (int)table_ref->table->s->tmp_table)) continue; thd->security_ctx= sctx; - if (check_access(thd, want_access, tables->get_db_name(), - &tables->grant.privilege, - &tables->grant.m_internal, + if (check_access(thd, want_access, table_ref->get_db_name(), + &table_ref->grant.privilege, + &table_ref->grant.m_internal, 0, no_errors)) goto deny; } @@ -5653,6 +5656,8 @@ thd->reset_current_stmt_binlog_format_row(); thd->binlog_unsafe_warning_flags= 0; + thd->save_prep_leaf_list= false; + DBUG_PRINT("debug", ("is_current_stmt_binlog_format_row(): %d", thd->is_current_stmt_binlog_format_row())); diff -Nru mariadb-5.5-5.5.44/sql/sql_select.cc mariadb-5.5-5.5.46/sql/sql_select.cc --- mariadb-5.5-5.5.44/sql/sql_select.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_select.cc 2015-10-09 16:50:27.000000000 +0000 @@ -4904,6 +4904,8 @@ KEY_FIELD *key_fields, *end, *field; uint sz; uint m= max(select_lex->max_equal_elems,1); + DBUG_ENTER("update_ref_and_keys"); + DBUG_PRINT("enter", ("normal_tables: %llx", normal_tables)); SELECT_LEX *sel=thd->lex->current_select; sel->cond_count= 0; @@ -4950,7 +4952,7 @@ sz= max(sizeof(KEY_FIELD),sizeof(SARGABLE_PARAM))* ((sel->cond_count*2 + sel->between_count)*m+1); if (!(key_fields=(KEY_FIELD*) thd->alloc(sz))) - return TRUE; /* purecov: inspected */ + DBUG_RETURN(TRUE); /* purecov: inspected */ and_level= 0; field= end= key_fields; *sargables= (SARGABLE_PARAM *) key_fields + @@ -4959,7 +4961,7 @@ (*sargables)[0].field= 0; if (my_init_dynamic_array(keyuse,sizeof(KEYUSE),20,64)) - return TRUE; + DBUG_RETURN(TRUE); if (cond) { @@ -5009,16 +5011,16 @@ for ( ; field != end ; field++) { if (add_key_part(keyuse,field)) - return TRUE; + DBUG_RETURN(TRUE); } if (select_lex->ftfunc_list->elements) { if (add_ft_keys(keyuse,join_tab,cond,normal_tables)) - return TRUE; + DBUG_RETURN(TRUE); } - return FALSE; + DBUG_RETURN(FALSE); } @@ -14700,6 +14702,7 @@ case Item::FIELD_ITEM: case Item::DEFAULT_VALUE_ITEM: case Item::INSERT_VALUE_ITEM: + case Item::TRIGGER_FIELD_ITEM: { Item_field *field= (Item_field*) item; bool orig_modify= modify_item; @@ -17148,6 +17151,10 @@ if (return_tab < join->return_tab) join->return_tab= return_tab; + /* check for errors evaluating the condition */ + if (join->thd->is_error()) + DBUG_RETURN(NESTED_LOOP_ERROR); + if (join->return_tab < join_tab) DBUG_RETURN(NESTED_LOOP_OK); /* @@ -20705,7 +20712,7 @@ Item_field *field; int cur_pos_in_select_list= 0; List_iterator li(fields); - List_iterator naf_it(thd->lex->current_select->non_agg_fields); + List_iterator naf_it(thd->lex->current_select->join->non_agg_fields); field= naf_it++; while (field && (item=li++)) diff -Nru mariadb-5.5-5.5.44/sql/sql_select.h mariadb-5.5-5.5.46/sql/sql_select.h --- mariadb-5.5-5.5.44/sql/sql_select.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_select.h 2015-10-09 16:50:27.000000000 +0000 @@ -922,6 +922,9 @@ Item *pre_sort_idx_pushed_cond; void clean_pre_sort_join_tab(); + /* List of fields that aren't under an aggregate function */ + List non_agg_fields; + /* For "Using temporary+Using filesort" queries, JOIN::join_tab can point to either: @@ -1301,6 +1304,7 @@ all_fields= fields_arg; if (&fields_list != &fields_arg) /* Avoid valgrind-warning */ fields_list= fields_arg; + non_agg_fields.empty(); bzero((char*) &keyuse,sizeof(keyuse)); tmp_table_param.init(); tmp_table_param.end_write_records= HA_POS_ERROR; diff -Nru mariadb-5.5-5.5.44/sql/sql_show.cc mariadb-5.5-5.5.46/sql/sql_show.cc --- mariadb-5.5-5.5.44/sql/sql_show.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_show.cc 2015-10-09 16:50:27.000000000 +0000 @@ -3109,7 +3109,10 @@ /* Add to this status from existing threads */ while ((tmp= it++)) - add_to_status(to, &tmp->status_var); + { + if (!tmp->status_in_global) + add_to_status(to, &tmp->status_var); + } mysql_mutex_unlock(&LOCK_thread_count); DBUG_VOID_RETURN; @@ -7727,13 +7730,14 @@ TABLE_LIST *table_list= tab->table->pos_in_table_list; if (table_list->schema_table && thd->fill_information_schema_tables()) { -#if MYSQL_VERSION_ID > 100105 -#error I_S tables only need to be re-populated if make_cond_for_info_schema() will preserve outer fields - bool is_subselect= (&lex->unit != lex->current_select->master_unit() && - lex->current_select->master_unit()->item); -#else -#define is_subselect false -#endif + /* + I_S tables only need to be re-populated if make_cond_for_info_schema() + preserves outer fields + */ + bool is_subselect= &lex->unit != lex->current_select->master_unit() && + lex->current_select->master_unit()->item && + tab->select_cond && + tab->select_cond->used_tables() & OUTER_REF_TABLE_BIT; /* A value of 0 indicates a dummy implementation */ if (table_list->schema_table->fill_table == 0) diff -Nru mariadb-5.5-5.5.44/sql/sql_table.cc mariadb-5.5-5.5.46/sql/sql_table.cc --- mariadb-5.5-5.5.44/sql/sql_table.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_table.cc 2015-10-09 16:50:27.000000000 +0000 @@ -4010,6 +4010,12 @@ result= (open_table_def(thd, &share, 0) || open_table_from_share(thd, &share, "", 0, (uint) READ_ALL, 0, &table, TRUE)); + /* + Assert that the change list is empty as no partition function currently + needs to modify item tree. May need call THD::rollback_item_tree_changes + later before calling closefrm if the change list is not empty. + */ + DBUG_ASSERT(thd->change_list.is_empty()); if (! result) (void) closefrm(&table, 0); diff -Nru mariadb-5.5-5.5.44/sql/sql_test.cc mariadb-5.5-5.5.46/sql/sql_test.cc --- mariadb-5.5-5.5.44/sql/sql_test.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_test.cc 2015-10-09 16:50:27.000000000 +0000 @@ -248,7 +248,7 @@ #define FT_KEYPART (MAX_REF_PARTS+10) -void print_keyuse(KEYUSE *keyuse) +static void print_keyuse(KEYUSE *keyuse) { char buff[256]; char buf2[64]; @@ -266,14 +266,11 @@ else fieldname= key_info->key_part[keyuse->keypart].field->field_name; ll2str(keyuse->used_tables, buf2, 16, 0); - DBUG_LOCK_FILE; fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s optimize: %u used_tables: %s " "ref_table_rows: %lu keypart_map: %0lx\n", keyuse->table->alias.c_ptr(), fieldname, str.ptr(), (uint) keyuse->optimize, buf2, (ulong) keyuse->ref_table_rows, (ulong) keyuse->keypart_map); - DBUG_UNLOCK_FILE; - //key_part_map keypart_map; --?? there can be several? } @@ -282,9 +279,9 @@ { DBUG_LOCK_FILE; fprintf(DBUG_FILE, "KEYUSE array (%d elements)\n", keyuse_array->elements); - DBUG_UNLOCK_FILE; for(uint i=0; i < keyuse_array->elements; i++) print_keyuse((KEYUSE*)dynamic_array_ptr(keyuse_array, i)); + DBUG_UNLOCK_FILE; } diff -Nru mariadb-5.5-5.5.44/sql/sql_union.cc mariadb-5.5-5.5.46/sql/sql_union.cc --- mariadb-5.5-5.5.44/sql/sql_union.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_union.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1021,7 +1021,6 @@ { error= (bool) ((uint) error | (uint) lex_unit->cleanup()); } - non_agg_fields.empty(); inner_refs_list.empty(); exclude_from_table_unique_test= FALSE; DBUG_RETURN(error); @@ -1032,6 +1031,7 @@ { SELECT_LEX_UNIT *unit; SELECT_LEX *sl; + DBUG_ENTER("st_select_lex::cleanup_all_joins"); if (join) join->cleanup(full); @@ -1039,6 +1039,7 @@ for (unit= first_inner_unit(); unit; unit= unit->next_unit()) for (sl= unit->first_select(); sl; sl= sl->next_select()) sl->cleanup_all_joins(full); + DBUG_VOID_RETURN; } diff -Nru mariadb-5.5-5.5.44/sql/sql_yacc.cc mariadb-5.5-5.5.46/sql/sql_yacc.cc --- mariadb-5.5-5.5.44/sql/sql_yacc.cc 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_yacc.cc 2015-10-09 16:51:17.000000000 +0000 @@ -3660,114 +3660,114 @@ 10529, 10530, 10534, 10535, 10536, 10540, 10541, 10542, 10543, 10544, 10545, 10549, 10550, 10551, 10552, 10553, 10557, 10558, 10559, 10560, 10561, 10565, 10566, 10567, 10568, 10569, 10573, 10578, 10579, 10583, - 10584, 10587, 10590, 10589, 10620, 10621, 10625, 10626, 10630, 10640, - 10640, 10650, 10651, 10655, 10674, 10707, 10706, 10719, 10727, 10718, - 10729, 10741, 10753, 10752, 10770, 10769, 10780, 10780, 10796, 10803, - 10825, 10845, 10857, 10862, 10861, 10871, 10877, 10884, 10889, 10894, - 10904, 10905, 10909, 10920, 10921, 10925, 10936, 10937, 10941, 10942, - 10950, 10958, 10949, 10968, 10975, 10967, 10985, 10993, 10994, 11002, - 11006, 11007, 11018, 11019, 11023, 11032, 11033, 11034, 11036, 11035, - 11046, 11047, 11051, 11052, 11054, 11053, 11057, 11056, 11062, 11063, - 11067, 11068, 11072, 11082, 11083, 11087, 11088, 11093, 11092, 11106, - 11107, 11111, 11116, 11124, 11125, 11133, 11135, 11135, 11143, 11151, - 11142, 11173, 11174, 11178, 11186, 11187, 11191, 11201, 11202, 11209, - 11208, 11224, 11223, 11235, 11234, 11246, 11245, 11259, 11260, 11264, - 11277, 11293, 11294, 11298, 11299, 11303, 11304, 11305, 11310, 11309, - 11330, 11332, 11335, 11337, 11340, 11341, 11344, 11348, 11352, 11356, - 11360, 11364, 11368, 11372, 11376, 11384, 11387, 11397, 11396, 11411, - 11418, 11426, 11434, 11442, 11450, 11458, 11465, 11467, 11469, 11478, - 11482, 11487, 11486, 11492, 11491, 11496, 11505, 11512, 11521, 11530, - 11535, 11537, 11539, 11541, 11543, 11545, 11552, 11560, 11562, 11570, - 11577, 11584, 11594, 11601, 11607, 11615, 11623, 11627, 11631, 11638, - 11645, 11652, 11659, 11666, 11673, 11679, 11686, 11693, 11698, 11703, - 11711, 11713, 11715, 11720, 11721, 11724, 11726, 11730, 11731, 11735, - 11736, 11740, 11741, 11745, 11746, 11750, 11751, 11754, 11756, 11763, - 11774, 11773, 11789, 11788, 11798, 11799, 11803, 11804, 11805, 11809, - 11810, 11811, 11826, 11825, 11838, 11847, 11837, 11849, 11853, 11854, - 11868, 11869, 11874, 11876, 11878, 11880, 11882, 11884, 11886, 11888, - 11890, 11892, 11894, 11896, 11901, 11903, 11905, 11907, 11909, 11911, - 11913, 11918, 11919, 11923, 11924, 11928, 11927, 11937, 11938, 11942, - 11942, 11944, 11945, 11949, 11950, 11955, 11954, 11965, 11969, 11973, - 11986, 11985, 11999, 12000, 12001, 12004, 12005, 12006, 12010, 12015, - 12025, 12037, 12048, 12058, 12068, 12036, 12076, 12077, 12081, 12082, - 12086, 12087, 12095, 12099, 12100, 12101, 12104, 12106, 12110, 12111, - 12115, 12120, 12127, 12132, 12139, 12141, 12145, 12146, 12150, 12155, - 12163, 12164, 12167, 12169, 12177, 12179, 12183, 12184, 12185, 12189, - 12191, 12196, 12197, 12206, 12207, 12211, 12212, 12216, 12229, 12252, - 12264, 12275, 12294, 12302, 12314, 12322, 12337, 12357, 12358, 12359, - 12367, 12368, 12369, 12376, 12382, 12388, 12394, 12400, 12406, 12435, - 12463, 12464, 12465, 12469, 12479, 12489, 12495, 12504, 12519, 12520, - 12524, 12533, 12548, 12552, 12598, 12602, 12619, 12623, 12701, 12725, - 12755, 12756, 12772, 12782, 12786, 12792, 12798, 12808, 12814, 12823, - 12833, 12834, 12862, 12876, 12890, 12905, 12906, 12916, 12917, 12927, - 12928, 12929, 12933, 12949, 12970, 12985, 12986, 12987, 12988, 12989, - 12990, 12991, 12992, 12993, 12994, 12995, 12996, 12997, 12998, 12999, - 13000, 13001, 13002, 13003, 13004, 13005, 13006, 13007, 13008, 13009, - 13010, 13011, 13012, 13013, 13014, 13015, 13016, 13017, 13018, 13019, - 13020, 13021, 13022, 13023, 13024, 13025, 13026, 13027, 13028, 13029, - 13030, 13031, 13032, 13033, 13034, 13035, 13036, 13037, 13038, 13039, - 13040, 13041, 13042, 13043, 13053, 13054, 13055, 13056, 13057, 13058, - 13059, 13060, 13061, 13062, 13063, 13064, 13065, 13066, 13067, 13068, - 13069, 13070, 13071, 13072, 13073, 13074, 13075, 13076, 13077, 13078, - 13079, 13080, 13081, 13082, 13083, 13084, 13085, 13086, 13087, 13088, - 13089, 13090, 13091, 13092, 13093, 13094, 13095, 13096, 13097, 13098, - 13099, 13100, 13101, 13102, 13103, 13104, 13105, 13106, 13107, 13108, - 13109, 13110, 13111, 13112, 13113, 13114, 13115, 13116, 13117, 13118, - 13119, 13120, 13121, 13122, 13123, 13124, 13125, 13126, 13127, 13128, - 13129, 13130, 13131, 13132, 13133, 13134, 13135, 13136, 13137, 13138, - 13139, 13140, 13141, 13142, 13143, 13144, 13145, 13146, 13147, 13148, - 13149, 13150, 13151, 13152, 13153, 13154, 13155, 13156, 13157, 13158, - 13159, 13160, 13161, 13162, 13163, 13164, 13165, 13166, 13167, 13168, - 13169, 13170, 13171, 13172, 13173, 13174, 13175, 13176, 13177, 13178, - 13179, 13180, 13181, 13182, 13183, 13184, 13185, 13186, 13187, 13188, - 13189, 13190, 13191, 13192, 13193, 13194, 13195, 13196, 13197, 13198, - 13199, 13200, 13201, 13202, 13203, 13204, 13205, 13206, 13207, 13208, - 13209, 13210, 13211, 13212, 13213, 13214, 13215, 13216, 13217, 13218, - 13219, 13220, 13221, 13222, 13223, 13224, 13225, 13226, 13227, 13228, - 13229, 13230, 13231, 13232, 13233, 13234, 13235, 13236, 13237, 13238, - 13239, 13240, 13241, 13242, 13243, 13244, 13245, 13246, 13247, 13248, - 13249, 13250, 13251, 13252, 13253, 13254, 13255, 13256, 13257, 13258, - 13259, 13260, 13261, 13262, 13263, 13264, 13265, 13266, 13267, 13268, - 13269, 13270, 13271, 13272, 13273, 13274, 13275, 13276, 13277, 13278, - 13279, 13280, 13281, 13282, 13283, 13284, 13285, 13286, 13287, 13288, - 13289, 13290, 13291, 13292, 13293, 13294, 13295, 13296, 13297, 13298, - 13299, 13300, 13301, 13302, 13303, 13304, 13305, 13306, 13307, 13308, - 13309, 13310, 13311, 13312, 13313, 13314, 13315, 13316, 13317, 13318, - 13319, 13320, 13321, 13322, 13323, 13324, 13325, 13326, 13327, 13328, - 13329, 13330, 13331, 13332, 13333, 13334, 13335, 13336, 13337, 13338, - 13339, 13340, 13341, 13342, 13343, 13344, 13345, 13352, 13351, 13366, - 13367, 13371, 13372, 13376, 13376, 13456, 13457, 13458, 13459, 13463, - 13464, 13468, 13469, 13470, 13471, 13475, 13476, 13477, 13478, 13482, - 13483, 13487, 13528, 13546, 13557, 13569, 13582, 13597, 13616, 13642, - 13655, 13681, 13724, 13738, 13739, 13740, 13741, 13745, 13746, 13755, - 13767, 13768, 13769, 13775, 13781, 13793, 13792, 13808, 13809, 13813, - 13814, 13818, 13833, 13834, 13835, 13840, 13841, 13846, 13845, 13865, - 13877, 13890, 13889, 13923, 13924, 13928, 13929, 13933, 13934, 13935, - 13936, 13938, 13937, 13950, 13951, 13952, 13953, 13954, 13960, 13965, - 13971, 13982, 13993, 13997, 14007, 14012, 14019, 14031, 14043, 14052, - 14054, 14058, 14059, 14066, 14068, 14072, 14073, 14078, 14077, 14081, - 14080, 14084, 14083, 14087, 14086, 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, 14118, 14119, 14123, 14124, 14128, 14138, 14148, 14161, 14176, - 14189, 14202, 14214, 14219, 14227, 14232, 14239, 14239, 14240, 14240, - 14243, 14270, 14275, 14281, 14287, 14293, 14297, 14301, 14302, 14306, - 14333, 14335, 14339, 14343, 14347, 14354, 14355, 14359, 14360, 14364, - 14365, 14369, 14370, 14376, 14382, 14388, 14398, 14397, 14407, 14408, - 14413, 14414, 14415, 14420, 14421, 14422, 14426, 14427, 14431, 14443, - 14452, 14462, 14471, 14485, 14486, 14491, 14490, 14506, 14507, 14508, - 14512, 14513, 14517, 14517, 14539, 14540, 14544, 14545, 14546, 14550, - 14554, 14561, 14564, 14562, 14578, 14585, 14606, 14630, 14632, 14636, - 14637, 14641, 14642, 14650, 14651, 14652, 14653, 14659, 14665, 14675, - 14677, 14679, 14684, 14685, 14686, 14687, 14688, 14692, 14693, 14694, - 14695, 14696, 14697, 14707, 14708, 14713, 14726, 14739, 14741, 14743, - 14748, 14753, 14755, 14757, 14763, 14764, 14766, 14772, 14771, 14788, - 14789, 14793, 14798, 14806, 14806, 14830, 14831, 14836, 14837, 14839, - 14841, 14859, 14865, 14870, 14852, 14931, 14948, 14972, 15003, 15007, - 15016, 15039, 14968, 15102, 15126, 15135, 15142, 15101, 15162, 15166, - 15170, 15174, 15178, 15182, 15189, 15196, 15203, 15213, 15214, 15218, - 15219, 15220, 15224, 15225, 15230, 15232, 15231, 15237, 15238, 15242, - 15249, 15259, 15265, 15276 + 10584, 10587, 10590, 10589, 10632, 10633, 10637, 10638, 10642, 10652, + 10652, 10662, 10663, 10667, 10686, 10719, 10718, 10731, 10739, 10730, + 10741, 10753, 10765, 10764, 10782, 10781, 10792, 10792, 10808, 10815, + 10837, 10857, 10869, 10874, 10873, 10883, 10889, 10896, 10901, 10906, + 10916, 10917, 10921, 10932, 10933, 10937, 10948, 10949, 10953, 10954, + 10962, 10970, 10961, 10980, 10987, 10979, 10997, 11005, 11006, 11014, + 11018, 11019, 11030, 11031, 11035, 11044, 11045, 11046, 11048, 11047, + 11058, 11059, 11063, 11064, 11066, 11065, 11069, 11068, 11074, 11075, + 11079, 11080, 11084, 11094, 11095, 11099, 11100, 11105, 11104, 11118, + 11119, 11123, 11128, 11136, 11137, 11145, 11147, 11147, 11155, 11163, + 11154, 11185, 11186, 11190, 11198, 11199, 11203, 11213, 11214, 11221, + 11220, 11236, 11235, 11247, 11246, 11258, 11257, 11271, 11272, 11276, + 11289, 11305, 11306, 11310, 11311, 11315, 11316, 11317, 11322, 11321, + 11342, 11344, 11347, 11349, 11352, 11353, 11356, 11360, 11364, 11368, + 11372, 11376, 11380, 11384, 11388, 11396, 11399, 11409, 11408, 11423, + 11430, 11438, 11446, 11454, 11462, 11470, 11477, 11479, 11481, 11490, + 11494, 11499, 11498, 11504, 11503, 11508, 11517, 11524, 11533, 11542, + 11547, 11549, 11551, 11553, 11555, 11557, 11564, 11572, 11574, 11582, + 11589, 11596, 11606, 11613, 11619, 11627, 11635, 11639, 11643, 11650, + 11657, 11664, 11671, 11678, 11685, 11691, 11698, 11705, 11710, 11715, + 11723, 11725, 11727, 11732, 11733, 11736, 11738, 11742, 11743, 11747, + 11748, 11752, 11753, 11757, 11758, 11762, 11763, 11766, 11768, 11775, + 11786, 11785, 11801, 11800, 11810, 11811, 11815, 11816, 11817, 11821, + 11822, 11823, 11838, 11837, 11850, 11859, 11849, 11861, 11865, 11866, + 11880, 11881, 11886, 11888, 11890, 11892, 11894, 11896, 11898, 11900, + 11902, 11904, 11906, 11908, 11913, 11915, 11917, 11919, 11921, 11923, + 11925, 11930, 11931, 11935, 11936, 11940, 11939, 11949, 11950, 11954, + 11954, 11956, 11957, 11961, 11962, 11967, 11966, 11977, 11981, 11985, + 11998, 11997, 12011, 12012, 12013, 12016, 12017, 12018, 12022, 12027, + 12037, 12049, 12060, 12070, 12080, 12048, 12088, 12089, 12093, 12094, + 12098, 12099, 12107, 12111, 12112, 12113, 12116, 12118, 12122, 12123, + 12127, 12132, 12139, 12144, 12151, 12153, 12157, 12158, 12162, 12167, + 12175, 12176, 12179, 12181, 12189, 12191, 12195, 12196, 12197, 12201, + 12203, 12208, 12209, 12218, 12219, 12223, 12224, 12228, 12241, 12264, + 12276, 12287, 12306, 12314, 12326, 12334, 12349, 12369, 12370, 12371, + 12379, 12380, 12381, 12388, 12394, 12400, 12406, 12412, 12418, 12447, + 12475, 12476, 12477, 12481, 12491, 12501, 12507, 12516, 12531, 12532, + 12536, 12545, 12560, 12564, 12610, 12614, 12631, 12635, 12713, 12737, + 12767, 12768, 12784, 12794, 12798, 12804, 12810, 12820, 12826, 12835, + 12845, 12846, 12874, 12888, 12902, 12917, 12918, 12928, 12929, 12939, + 12940, 12941, 12945, 12961, 12982, 12997, 12998, 12999, 13000, 13001, + 13002, 13003, 13004, 13005, 13006, 13007, 13008, 13009, 13010, 13011, + 13012, 13013, 13014, 13015, 13016, 13017, 13018, 13019, 13020, 13021, + 13022, 13023, 13024, 13025, 13026, 13027, 13028, 13029, 13030, 13031, + 13032, 13033, 13034, 13035, 13036, 13037, 13038, 13039, 13040, 13041, + 13042, 13043, 13044, 13045, 13046, 13047, 13048, 13049, 13050, 13051, + 13052, 13053, 13054, 13055, 13065, 13066, 13067, 13068, 13069, 13070, + 13071, 13072, 13073, 13074, 13075, 13076, 13077, 13078, 13079, 13080, + 13081, 13082, 13083, 13084, 13085, 13086, 13087, 13088, 13089, 13090, + 13091, 13092, 13093, 13094, 13095, 13096, 13097, 13098, 13099, 13100, + 13101, 13102, 13103, 13104, 13105, 13106, 13107, 13108, 13109, 13110, + 13111, 13112, 13113, 13114, 13115, 13116, 13117, 13118, 13119, 13120, + 13121, 13122, 13123, 13124, 13125, 13126, 13127, 13128, 13129, 13130, + 13131, 13132, 13133, 13134, 13135, 13136, 13137, 13138, 13139, 13140, + 13141, 13142, 13143, 13144, 13145, 13146, 13147, 13148, 13149, 13150, + 13151, 13152, 13153, 13154, 13155, 13156, 13157, 13158, 13159, 13160, + 13161, 13162, 13163, 13164, 13165, 13166, 13167, 13168, 13169, 13170, + 13171, 13172, 13173, 13174, 13175, 13176, 13177, 13178, 13179, 13180, + 13181, 13182, 13183, 13184, 13185, 13186, 13187, 13188, 13189, 13190, + 13191, 13192, 13193, 13194, 13195, 13196, 13197, 13198, 13199, 13200, + 13201, 13202, 13203, 13204, 13205, 13206, 13207, 13208, 13209, 13210, + 13211, 13212, 13213, 13214, 13215, 13216, 13217, 13218, 13219, 13220, + 13221, 13222, 13223, 13224, 13225, 13226, 13227, 13228, 13229, 13230, + 13231, 13232, 13233, 13234, 13235, 13236, 13237, 13238, 13239, 13240, + 13241, 13242, 13243, 13244, 13245, 13246, 13247, 13248, 13249, 13250, + 13251, 13252, 13253, 13254, 13255, 13256, 13257, 13258, 13259, 13260, + 13261, 13262, 13263, 13264, 13265, 13266, 13267, 13268, 13269, 13270, + 13271, 13272, 13273, 13274, 13275, 13276, 13277, 13278, 13279, 13280, + 13281, 13282, 13283, 13284, 13285, 13286, 13287, 13288, 13289, 13290, + 13291, 13292, 13293, 13294, 13295, 13296, 13297, 13298, 13299, 13300, + 13301, 13302, 13303, 13304, 13305, 13306, 13307, 13308, 13309, 13310, + 13311, 13312, 13313, 13314, 13315, 13316, 13317, 13318, 13319, 13320, + 13321, 13322, 13323, 13324, 13325, 13326, 13327, 13328, 13329, 13330, + 13331, 13332, 13333, 13334, 13335, 13336, 13337, 13338, 13339, 13340, + 13341, 13342, 13343, 13344, 13345, 13346, 13347, 13348, 13349, 13350, + 13351, 13352, 13353, 13354, 13355, 13356, 13357, 13364, 13363, 13378, + 13379, 13383, 13384, 13388, 13388, 13468, 13469, 13470, 13471, 13475, + 13476, 13480, 13481, 13482, 13483, 13487, 13488, 13489, 13490, 13494, + 13495, 13499, 13540, 13558, 13569, 13581, 13594, 13609, 13628, 13654, + 13667, 13693, 13736, 13750, 13751, 13752, 13753, 13757, 13758, 13767, + 13779, 13780, 13781, 13787, 13793, 13805, 13804, 13820, 13821, 13825, + 13826, 13830, 13845, 13846, 13847, 13852, 13853, 13858, 13857, 13877, + 13889, 13902, 13901, 13935, 13936, 13940, 13941, 13945, 13946, 13947, + 13948, 13950, 13949, 13962, 13963, 13964, 13965, 13966, 13972, 13977, + 13983, 13994, 14005, 14009, 14019, 14024, 14031, 14043, 14055, 14064, + 14066, 14070, 14071, 14078, 14080, 14084, 14085, 14090, 14089, 14093, + 14092, 14096, 14095, 14099, 14098, 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, 14130, 14131, 14135, 14136, 14140, 14150, 14160, 14173, 14188, + 14201, 14214, 14226, 14231, 14239, 14244, 14251, 14251, 14252, 14252, + 14255, 14282, 14287, 14293, 14299, 14305, 14309, 14313, 14314, 14318, + 14345, 14347, 14351, 14355, 14359, 14366, 14367, 14371, 14372, 14376, + 14377, 14381, 14382, 14388, 14394, 14400, 14410, 14409, 14419, 14420, + 14425, 14426, 14427, 14432, 14433, 14434, 14438, 14439, 14443, 14455, + 14464, 14474, 14483, 14497, 14498, 14503, 14502, 14518, 14519, 14520, + 14524, 14525, 14529, 14529, 14551, 14552, 14556, 14557, 14558, 14562, + 14566, 14573, 14576, 14574, 14590, 14597, 14618, 14642, 14644, 14648, + 14649, 14653, 14654, 14662, 14663, 14664, 14665, 14671, 14677, 14687, + 14689, 14691, 14696, 14697, 14698, 14699, 14700, 14704, 14705, 14706, + 14707, 14708, 14709, 14719, 14720, 14725, 14738, 14751, 14753, 14755, + 14760, 14765, 14767, 14769, 14775, 14776, 14778, 14784, 14783, 14800, + 14801, 14805, 14810, 14818, 14818, 14842, 14843, 14848, 14849, 14851, + 14853, 14871, 14877, 14882, 14864, 14943, 14960, 14984, 15015, 15019, + 15028, 15051, 14980, 15114, 15138, 15147, 15154, 15113, 15174, 15178, + 15182, 15186, 15190, 15194, 15201, 15208, 15215, 15225, 15226, 15230, + 15231, 15232, 15236, 15237, 15242, 15244, 15243, 15249, 15250, 15254, + 15261, 15271, 15277, 15288 }; #endif @@ -31782,27 +31782,45 @@ if (add_proc_to_list(lex->thd, item)) MYSQL_YYABORT; Lex->uncacheable(UNCACHEABLE_SIDEEFFECT); + + /* + PROCEDURE CLAUSE cannot handle subquery as one of its parameter, + so set expr_allows_subselect as false to disallow any subqueries + further. Reset expr_allows_subselect back to true once the + parameters are reduced. + */ + Lex->expr_allows_subselect= false; + } + break; + + case 1573: + +/* Line 1455 of yacc.c */ +#line 10625 "/home/buildbot/git/sql/sql_yacc.yy" + { + /* Subqueries are allowed from now.*/ + Lex->expr_allows_subselect= true; } break; case 1574: /* Line 1455 of yacc.c */ -#line 10620 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10632 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1575: /* Line 1455 of yacc.c */ -#line 10621 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10633 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1578: /* Line 1455 of yacc.c */ -#line 10631 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10643 "/home/buildbot/git/sql/sql_yacc.yy" { if (add_proc_to_list(thd, (yyvsp[(2) - (3)].item))) MYSQL_YYABORT; @@ -31814,7 +31832,7 @@ case 1579: /* Line 1455 of yacc.c */ -#line 10640 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10652 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (!lex->describe && (!(lex->result= new select_dumpvar()))) @@ -31825,21 +31843,21 @@ case 1580: /* Line 1455 of yacc.c */ -#line 10646 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10658 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1582: /* Line 1455 of yacc.c */ -#line 10651 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10663 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1583: /* Line 1455 of yacc.c */ -#line 10656 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10668 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->result) @@ -31863,7 +31881,7 @@ case 1584: /* Line 1455 of yacc.c */ -#line 10675 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10687 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; sp_variable_t *t; @@ -31897,7 +31915,7 @@ case 1585: /* Line 1455 of yacc.c */ -#line 10707 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10719 "/home/buildbot/git/sql/sql_yacc.yy" { if (! Lex->parsing_options.allows_select_into) { @@ -31910,7 +31928,7 @@ case 1587: /* Line 1455 of yacc.c */ -#line 10719 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10731 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->uncacheable(UNCACHEABLE_SIDEEFFECT); @@ -31923,14 +31941,14 @@ case 1588: /* Line 1455 of yacc.c */ -#line 10727 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10739 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->exchange->cs= (yyvsp[(4) - (4)].charset); } break; case 1590: /* Line 1455 of yacc.c */ -#line 10730 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10742 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (!lex->describe) @@ -31947,7 +31965,7 @@ case 1591: /* Line 1455 of yacc.c */ -#line 10742 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10754 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->uncacheable(UNCACHEABLE_SIDEEFFECT); } @@ -31956,7 +31974,7 @@ case 1592: /* Line 1455 of yacc.c */ -#line 10753 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10765 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command = SQLCOM_DO; @@ -31967,7 +31985,7 @@ case 1593: /* Line 1455 of yacc.c */ -#line 10759 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10771 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->insert_list= (yyvsp[(3) - (3)].item_list); } @@ -31976,7 +31994,7 @@ case 1594: /* Line 1455 of yacc.c */ -#line 10770 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10782 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command = SQLCOM_DROP_TABLE; @@ -31990,21 +32008,21 @@ case 1595: /* Line 1455 of yacc.c */ -#line 10779 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10791 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1596: /* Line 1455 of yacc.c */ -#line 10780 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10792 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1597: /* Line 1455 of yacc.c */ -#line 10781 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10793 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; Alter_drop *ad= new Alter_drop(Alter_drop::KEY, (yyvsp[(3) - (6)].lex_str).str); @@ -32025,7 +32043,7 @@ case 1598: /* Line 1455 of yacc.c */ -#line 10797 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10809 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_DROP_DB; @@ -32037,7 +32055,7 @@ case 1599: /* Line 1455 of yacc.c */ -#line 10804 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10816 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; sp_name *spname; @@ -32064,7 +32082,7 @@ case 1600: /* Line 1455 of yacc.c */ -#line 10826 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10838 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; LEX_STRING db= {0, 0}; @@ -32089,7 +32107,7 @@ case 1601: /* Line 1455 of yacc.c */ -#line 10846 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10858 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->sphead) @@ -32106,7 +32124,7 @@ case 1602: /* Line 1455 of yacc.c */ -#line 10858 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10870 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_DROP_USER; } @@ -32115,7 +32133,7 @@ case 1603: /* Line 1455 of yacc.c */ -#line 10862 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10874 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_DROP_VIEW; @@ -32128,14 +32146,14 @@ case 1604: /* Line 1455 of yacc.c */ -#line 10870 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10882 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1605: /* Line 1455 of yacc.c */ -#line 10872 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10884 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->drop_if_exists= (yyvsp[(3) - (4)].num); Lex->spname= (yyvsp[(4) - (4)].spname); @@ -32146,7 +32164,7 @@ case 1606: /* Line 1455 of yacc.c */ -#line 10878 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10890 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_DROP_TRIGGER; @@ -32158,7 +32176,7 @@ case 1607: /* Line 1455 of yacc.c */ -#line 10885 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10897 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE; @@ -32168,7 +32186,7 @@ case 1608: /* Line 1455 of yacc.c */ -#line 10890 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10902 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP; @@ -32178,7 +32196,7 @@ case 1609: /* Line 1455 of yacc.c */ -#line 10895 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10907 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_DROP_SERVER; Lex->drop_if_exists= (yyvsp[(3) - (4)].num); @@ -32190,7 +32208,7 @@ case 1612: /* Line 1455 of yacc.c */ -#line 10910 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10922 "/home/buildbot/git/sql/sql_yacc.yy" { if (!Select->add_table_to_list(thd, (yyvsp[(1) - (1)].table), NULL, TL_OPTION_UPDATING, @@ -32203,7 +32221,7 @@ case 1615: /* Line 1455 of yacc.c */ -#line 10926 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10938 "/home/buildbot/git/sql/sql_yacc.yy" { if (!Select->add_table_to_list(thd, (yyvsp[(1) - (1)].table), NULL, TL_OPTION_UPDATING | TL_OPTION_ALIAS, @@ -32216,35 +32234,35 @@ case 1616: /* Line 1455 of yacc.c */ -#line 10936 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10948 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 0; } break; case 1617: /* Line 1455 of yacc.c */ -#line 10937 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10949 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 1; } break; case 1618: /* Line 1455 of yacc.c */ -#line 10941 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10953 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 0; } break; case 1619: /* Line 1455 of yacc.c */ -#line 10942 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10954 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 1; } break; case 1620: /* Line 1455 of yacc.c */ -#line 10950 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10962 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_INSERT; @@ -32256,7 +32274,7 @@ case 1621: /* Line 1455 of yacc.c */ -#line 10958 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10970 "/home/buildbot/git/sql/sql_yacc.yy" { Select->set_lock_for_tables((yyvsp[(3) - (5)].lock_type)); Lex->current_select= &Lex->select_lex; @@ -32266,14 +32284,14 @@ case 1622: /* Line 1455 of yacc.c */ -#line 10963 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10975 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1623: /* Line 1455 of yacc.c */ -#line 10968 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10980 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command = SQLCOM_REPLACE; @@ -32285,7 +32303,7 @@ case 1624: /* Line 1455 of yacc.c */ -#line 10975 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10987 "/home/buildbot/git/sql/sql_yacc.yy" { Select->set_lock_for_tables((yyvsp[(3) - (4)].lock_type)); Lex->current_select= &Lex->select_lex; @@ -32295,14 +32313,14 @@ case 1625: /* Line 1455 of yacc.c */ -#line 10980 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10992 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1626: /* Line 1455 of yacc.c */ -#line 10985 "/home/buildbot/git/sql/sql_yacc.yy" +#line 10997 "/home/buildbot/git/sql/sql_yacc.yy" { /* If it is SP we do not allow insert optimisation when result of @@ -32316,14 +32334,14 @@ case 1627: /* Line 1455 of yacc.c */ -#line 10993 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11005 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } break; case 1628: /* Line 1455 of yacc.c */ -#line 10995 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11007 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() - thd->query()); @@ -32336,21 +32354,21 @@ case 1629: /* Line 1455 of yacc.c */ -#line 11002 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11014 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= TL_WRITE; } break; case 1630: /* Line 1455 of yacc.c */ -#line 11006 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11018 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= (yyvsp[(1) - (1)].lock_type); } break; case 1631: /* Line 1455 of yacc.c */ -#line 11008 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11020 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->keyword_delayed_begin_offset= (uint)(YYLIP->get_tok_start() - thd->query()); @@ -32363,21 +32381,21 @@ case 1632: /* Line 1455 of yacc.c */ -#line 11018 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11030 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1633: /* Line 1455 of yacc.c */ -#line 11019 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11031 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1634: /* Line 1455 of yacc.c */ -#line 11024 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11036 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->field_list.empty(); @@ -32389,28 +32407,28 @@ case 1635: /* Line 1455 of yacc.c */ -#line 11032 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11044 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1636: /* Line 1455 of yacc.c */ -#line 11033 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11045 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1637: /* Line 1455 of yacc.c */ -#line 11034 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11046 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1638: /* Line 1455 of yacc.c */ -#line 11036 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11048 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (!(lex->insert_list = new List_item) || @@ -32422,63 +32440,63 @@ case 1640: /* Line 1455 of yacc.c */ -#line 11046 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11058 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->field_list.push_back((yyvsp[(3) - (3)].item)); } break; case 1641: /* Line 1455 of yacc.c */ -#line 11047 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11059 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->field_list.push_back((yyvsp[(1) - (1)].item)); } break; case 1642: /* Line 1455 of yacc.c */ -#line 11051 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11063 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1643: /* Line 1455 of yacc.c */ -#line 11052 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11064 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1644: /* Line 1455 of yacc.c */ -#line 11054 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11066 "/home/buildbot/git/sql/sql_yacc.yy" { Select->set_braces(0);} break; case 1645: /* Line 1455 of yacc.c */ -#line 11055 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11067 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1646: /* Line 1455 of yacc.c */ -#line 11057 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11069 "/home/buildbot/git/sql/sql_yacc.yy" { Select->set_braces(1);} break; case 1647: /* Line 1455 of yacc.c */ -#line 11058 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11070 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1652: /* Line 1455 of yacc.c */ -#line 11073 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11085 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->field_list.push_back((yyvsp[(1) - (3)].item)) || @@ -32490,35 +32508,35 @@ case 1653: /* Line 1455 of yacc.c */ -#line 11082 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11094 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1654: /* Line 1455 of yacc.c */ -#line 11083 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11095 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1655: /* Line 1455 of yacc.c */ -#line 11087 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11099 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1656: /* Line 1455 of yacc.c */ -#line 11088 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11100 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1657: /* Line 1455 of yacc.c */ -#line 11093 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11105 "/home/buildbot/git/sql/sql_yacc.yy" { if (!(Lex->insert_list = new List_item)) MYSQL_YYABORT; @@ -32528,7 +32546,7 @@ case 1658: /* Line 1455 of yacc.c */ -#line 11098 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11110 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->many_values.push_back(lex->insert_list)) @@ -32539,14 +32557,14 @@ case 1659: /* Line 1455 of yacc.c */ -#line 11106 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11118 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1661: /* Line 1455 of yacc.c */ -#line 11112 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11124 "/home/buildbot/git/sql/sql_yacc.yy" { if (Lex->insert_list->push_back((yyvsp[(3) - (3)].item))) MYSQL_YYABORT; @@ -32556,7 +32574,7 @@ case 1662: /* Line 1455 of yacc.c */ -#line 11117 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11129 "/home/buildbot/git/sql/sql_yacc.yy" { if (Lex->insert_list->push_back((yyvsp[(1) - (1)].item))) MYSQL_YYABORT; @@ -32566,14 +32584,14 @@ case 1663: /* Line 1455 of yacc.c */ -#line 11124 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11136 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= (yyvsp[(1) - (1)].item);} break; case 1664: /* Line 1455 of yacc.c */ -#line 11126 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11138 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= new (thd->mem_root) Item_default_value(Lex->current_context()); if ((yyval.item) == NULL) @@ -32584,14 +32602,14 @@ case 1666: /* Line 1455 of yacc.c */ -#line 11135 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11147 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->duplicates= DUP_UPDATE; } break; case 1668: /* Line 1455 of yacc.c */ -#line 11143 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11155 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; mysql_init_select(lex); @@ -32603,7 +32621,7 @@ case 1669: /* Line 1455 of yacc.c */ -#line 11151 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11163 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->select_lex.table_list.elements > 1) @@ -32627,14 +32645,14 @@ case 1670: /* Line 1455 of yacc.c */ -#line 11169 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11181 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1673: /* Line 1455 of yacc.c */ -#line 11179 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11191 "/home/buildbot/git/sql/sql_yacc.yy" { if (add_item_to_list(thd, (yyvsp[(1) - (3)].item)) || add_value_to_list(thd, (yyvsp[(3) - (3)].item))) MYSQL_YYABORT; @@ -32644,7 +32662,7 @@ case 1676: /* Line 1455 of yacc.c */ -#line 11192 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11204 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->update_list.push_back((yyvsp[(1) - (3)].item)) || @@ -32656,21 +32674,21 @@ case 1677: /* Line 1455 of yacc.c */ -#line 11201 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11213 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= TL_WRITE_DEFAULT; } break; case 1678: /* Line 1455 of yacc.c */ -#line 11202 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11214 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } break; case 1679: /* Line 1455 of yacc.c */ -#line 11209 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11221 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_DELETE; @@ -32686,7 +32704,7 @@ case 1681: /* Line 1455 of yacc.c */ -#line 11224 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11236 "/home/buildbot/git/sql/sql_yacc.yy" { if (!Select->add_table_to_list(thd, (yyvsp[(2) - (2)].table), NULL, TL_OPTION_UPDATING, YYPS->m_lock_type, @@ -32700,14 +32718,14 @@ case 1682: /* Line 1455 of yacc.c */ -#line 11233 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11245 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1683: /* Line 1455 of yacc.c */ -#line 11235 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11247 "/home/buildbot/git/sql/sql_yacc.yy" { mysql_init_multi_delete(Lex); YYPS->m_lock_type= TL_READ_DEFAULT; @@ -32718,7 +32736,7 @@ case 1684: /* Line 1455 of yacc.c */ -#line 11241 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11253 "/home/buildbot/git/sql/sql_yacc.yy" { if (multi_delete_set_locks_and_link_aux_tables(Lex)) MYSQL_YYABORT; @@ -32728,7 +32746,7 @@ case 1685: /* Line 1455 of yacc.c */ -#line 11246 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11258 "/home/buildbot/git/sql/sql_yacc.yy" { mysql_init_multi_delete(Lex); YYPS->m_lock_type= TL_READ_DEFAULT; @@ -32739,7 +32757,7 @@ case 1686: /* Line 1455 of yacc.c */ -#line 11252 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11264 "/home/buildbot/git/sql/sql_yacc.yy" { if (multi_delete_set_locks_and_link_aux_tables(Lex)) MYSQL_YYABORT; @@ -32749,7 +32767,7 @@ case 1689: /* Line 1455 of yacc.c */ -#line 11265 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11277 "/home/buildbot/git/sql/sql_yacc.yy" { Table_ident *ti= new Table_ident((yyvsp[(1) - (2)].lex_str)); if (ti == NULL) @@ -32767,7 +32785,7 @@ case 1690: /* Line 1455 of yacc.c */ -#line 11278 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11290 "/home/buildbot/git/sql/sql_yacc.yy" { Table_ident *ti= new Table_ident(thd, (yyvsp[(1) - (4)].lex_str), (yyvsp[(3) - (4)].lex_str), 0); if (ti == NULL) @@ -32785,56 +32803,56 @@ case 1691: /* Line 1455 of yacc.c */ -#line 11293 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11305 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1692: /* Line 1455 of yacc.c */ -#line 11294 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11306 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1693: /* Line 1455 of yacc.c */ -#line 11298 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11310 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1694: /* Line 1455 of yacc.c */ -#line 11299 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11311 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1695: /* Line 1455 of yacc.c */ -#line 11303 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11315 "/home/buildbot/git/sql/sql_yacc.yy" { Select->options|= OPTION_QUICK; } break; case 1696: /* Line 1455 of yacc.c */ -#line 11304 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11316 "/home/buildbot/git/sql/sql_yacc.yy" { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; } break; case 1697: /* Line 1455 of yacc.c */ -#line 11305 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11317 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ignore= 1; } break; case 1698: /* Line 1455 of yacc.c */ -#line 11310 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11322 "/home/buildbot/git/sql/sql_yacc.yy" { LEX* lex= Lex; lex->sql_command= SQLCOM_TRUNCATE; @@ -32850,7 +32868,7 @@ case 1699: /* Line 1455 of yacc.c */ -#line 11321 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11333 "/home/buildbot/git/sql/sql_yacc.yy" { LEX* lex= thd->lex; DBUG_ASSERT(!lex->m_stmt); @@ -32863,7 +32881,7 @@ case 1706: /* Line 1455 of yacc.c */ -#line 11345 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11357 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_CPU; } @@ -32872,7 +32890,7 @@ case 1707: /* Line 1455 of yacc.c */ -#line 11349 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11361 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_MEMORY; } @@ -32881,7 +32899,7 @@ case 1708: /* Line 1455 of yacc.c */ -#line 11353 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11365 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_BLOCK_IO; } @@ -32890,7 +32908,7 @@ case 1709: /* Line 1455 of yacc.c */ -#line 11357 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11369 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_CONTEXT; } @@ -32899,7 +32917,7 @@ case 1710: /* Line 1455 of yacc.c */ -#line 11361 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11373 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_PAGE_FAULTS; } @@ -32908,7 +32926,7 @@ case 1711: /* Line 1455 of yacc.c */ -#line 11365 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11377 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_IPC; } @@ -32917,7 +32935,7 @@ case 1712: /* Line 1455 of yacc.c */ -#line 11369 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11381 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_SWAPS; } @@ -32926,7 +32944,7 @@ case 1713: /* Line 1455 of yacc.c */ -#line 11373 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11385 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_SOURCE; } @@ -32935,7 +32953,7 @@ case 1714: /* Line 1455 of yacc.c */ -#line 11377 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11389 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_options|= PROFILE_ALL; } @@ -32944,7 +32962,7 @@ case 1715: /* Line 1455 of yacc.c */ -#line 11384 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11396 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_query_id= 0; } @@ -32953,7 +32971,7 @@ case 1716: /* Line 1455 of yacc.c */ -#line 11388 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11400 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->profile_query_id= atoi((yyvsp[(3) - (3)].lex_str).str); } @@ -32962,7 +32980,7 @@ case 1717: /* Line 1455 of yacc.c */ -#line 11397 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11409 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->wild=0; @@ -32975,7 +32993,7 @@ case 1718: /* Line 1455 of yacc.c */ -#line 11405 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11417 "/home/buildbot/git/sql/sql_yacc.yy" { Select->parsing_place= NO_MATTER; } @@ -32984,7 +33002,7 @@ case 1719: /* Line 1455 of yacc.c */ -#line 11412 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11424 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_DATABASES; @@ -32996,7 +33014,7 @@ case 1720: /* Line 1455 of yacc.c */ -#line 11419 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11431 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLES; @@ -33009,7 +33027,7 @@ case 1721: /* Line 1455 of yacc.c */ -#line 11427 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11439 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TRIGGERS; @@ -33022,7 +33040,7 @@ case 1722: /* Line 1455 of yacc.c */ -#line 11435 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11447 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_EVENTS; @@ -33035,7 +33053,7 @@ case 1723: /* Line 1455 of yacc.c */ -#line 11443 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11455 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLE_STATUS; @@ -33048,7 +33066,7 @@ case 1724: /* Line 1455 of yacc.c */ -#line 11451 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11463 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_OPEN_TABLES; @@ -33061,7 +33079,7 @@ case 1725: /* Line 1455 of yacc.c */ -#line 11459 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11471 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_PLUGINS; @@ -33073,21 +33091,21 @@ case 1726: /* Line 1455 of yacc.c */ -#line 11466 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11478 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_info.db_type= (yyvsp[(2) - (3)].db_type); } break; case 1727: /* Line 1455 of yacc.c */ -#line 11468 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11480 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_info.db_type= NULL; } break; case 1728: /* Line 1455 of yacc.c */ -#line 11470 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11482 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_FIELDS; @@ -33101,7 +33119,7 @@ case 1729: /* Line 1455 of yacc.c */ -#line 11479 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11491 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_BINLOGS; } @@ -33110,7 +33128,7 @@ case 1730: /* Line 1455 of yacc.c */ -#line 11483 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11495 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS; } @@ -33119,7 +33137,7 @@ case 1731: /* Line 1455 of yacc.c */ -#line 11487 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11499 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS; @@ -33129,7 +33147,7 @@ case 1733: /* Line 1455 of yacc.c */ -#line 11492 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11504 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS; @@ -33139,7 +33157,7 @@ case 1735: /* Line 1455 of yacc.c */ -#line 11497 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11509 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_KEYS; @@ -33153,7 +33171,7 @@ case 1736: /* Line 1455 of yacc.c */ -#line 11506 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11518 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; @@ -33165,7 +33183,7 @@ case 1737: /* Line 1455 of yacc.c */ -#line 11513 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11525 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_AUTHORS; @@ -33179,7 +33197,7 @@ case 1738: /* Line 1455 of yacc.c */ -#line 11522 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11534 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS; @@ -33193,7 +33211,7 @@ case 1739: /* Line 1455 of yacc.c */ -#line 11531 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11543 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_PRIVILEGES; @@ -33203,42 +33221,42 @@ case 1740: /* Line 1455 of yacc.c */ -#line 11536 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11548 "/home/buildbot/git/sql/sql_yacc.yy" { (void) create_select_for_variable("warning_count"); } break; case 1741: /* Line 1455 of yacc.c */ -#line 11538 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11550 "/home/buildbot/git/sql/sql_yacc.yy" { (void) create_select_for_variable("error_count"); } break; case 1742: /* Line 1455 of yacc.c */ -#line 11540 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11552 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_WARNS;} break; case 1743: /* Line 1455 of yacc.c */ -#line 11542 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11554 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_ERRORS;} break; case 1744: /* Line 1455 of yacc.c */ -#line 11544 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11556 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_PROFILES; } break; case 1745: /* Line 1455 of yacc.c */ -#line 11546 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11558 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_PROFILE; @@ -33250,7 +33268,7 @@ case 1746: /* Line 1455 of yacc.c */ -#line 11553 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11565 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS; @@ -33263,14 +33281,14 @@ case 1747: /* Line 1455 of yacc.c */ -#line 11561 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11573 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;} break; case 1748: /* Line 1455 of yacc.c */ -#line 11563 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11575 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_VARIABLES; @@ -33283,7 +33301,7 @@ case 1749: /* Line 1455 of yacc.c */ -#line 11571 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11583 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CHARSETS; @@ -33295,7 +33313,7 @@ case 1750: /* Line 1455 of yacc.c */ -#line 11578 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11590 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_COLLATIONS; @@ -33307,7 +33325,7 @@ case 1751: /* Line 1455 of yacc.c */ -#line 11585 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11597 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_GRANTS; @@ -33322,7 +33340,7 @@ case 1752: /* Line 1455 of yacc.c */ -#line 11595 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11607 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SHOW_GRANTS; @@ -33334,7 +33352,7 @@ case 1753: /* Line 1455 of yacc.c */ -#line 11602 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11614 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command=SQLCOM_SHOW_CREATE_DB; Lex->create_info.options=(yyvsp[(3) - (4)].num); @@ -33345,7 +33363,7 @@ case 1754: /* Line 1455 of yacc.c */ -#line 11608 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11620 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE; @@ -33358,7 +33376,7 @@ case 1755: /* Line 1455 of yacc.c */ -#line 11616 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11628 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command = SQLCOM_SHOW_CREATE; @@ -33371,7 +33389,7 @@ case 1756: /* Line 1455 of yacc.c */ -#line 11624 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11636 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_MASTER_STAT; } @@ -33380,7 +33398,7 @@ case 1757: /* Line 1455 of yacc.c */ -#line 11628 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11640 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; } @@ -33389,7 +33407,7 @@ case 1758: /* Line 1455 of yacc.c */ -#line 11632 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11644 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CLIENT_STATS; @@ -33401,7 +33419,7 @@ case 1759: /* Line 1455 of yacc.c */ -#line 11639 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11651 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_USER_STATS; @@ -33413,7 +33431,7 @@ case 1760: /* Line 1455 of yacc.c */ -#line 11646 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11658 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_TABLE_STATS; @@ -33425,7 +33443,7 @@ case 1761: /* Line 1455 of yacc.c */ -#line 11653 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11665 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_INDEX_STATS; @@ -33437,7 +33455,7 @@ case 1762: /* Line 1455 of yacc.c */ -#line 11660 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11672 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; @@ -33449,7 +33467,7 @@ case 1763: /* Line 1455 of yacc.c */ -#line 11667 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11679 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; @@ -33461,7 +33479,7 @@ case 1764: /* Line 1455 of yacc.c */ -#line 11674 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11686 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER; @@ -33472,7 +33490,7 @@ case 1765: /* Line 1455 of yacc.c */ -#line 11680 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11692 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS_PROC; @@ -33484,7 +33502,7 @@ case 1766: /* Line 1455 of yacc.c */ -#line 11687 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11699 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_SHOW_STATUS_FUNC; @@ -33496,7 +33514,7 @@ case 1767: /* Line 1455 of yacc.c */ -#line 11694 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11706 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command= SQLCOM_SHOW_PROC_CODE; Lex->spname= (yyvsp[(3) - (3)].spname); @@ -33506,7 +33524,7 @@ case 1768: /* Line 1455 of yacc.c */ -#line 11699 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11711 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command= SQLCOM_SHOW_FUNC_CODE; Lex->spname= (yyvsp[(3) - (3)].spname); @@ -33516,7 +33534,7 @@ case 1769: /* Line 1455 of yacc.c */ -#line 11704 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11716 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->spname= (yyvsp[(3) - (3)].spname); Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT; @@ -33526,84 +33544,84 @@ case 1770: /* Line 1455 of yacc.c */ -#line 11712 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11724 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; } break; case 1771: /* Line 1455 of yacc.c */ -#line 11714 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11726 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; } break; case 1772: /* Line 1455 of yacc.c */ -#line 11716 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11728 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; } break; case 1777: /* Line 1455 of yacc.c */ -#line 11730 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11742 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.simple_string)= 0; } break; case 1778: /* Line 1455 of yacc.c */ -#line 11731 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11743 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.simple_string)= (yyvsp[(2) - (2)].lex_str).str; } break; case 1779: /* Line 1455 of yacc.c */ -#line 11735 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11747 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->verbose=0; } break; case 1780: /* Line 1455 of yacc.c */ -#line 11736 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11748 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->verbose=1; } break; case 1783: /* Line 1455 of yacc.c */ -#line 11745 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11757 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->mi.log_file_name = 0; } break; case 1784: /* Line 1455 of yacc.c */ -#line 11746 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11758 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->mi.log_file_name = (yyvsp[(2) - (2)].lex_str).str; } break; case 1785: /* Line 1455 of yacc.c */ -#line 11750 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11762 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->mi.pos = 4; /* skip magic number */ } break; case 1786: /* Line 1455 of yacc.c */ -#line 11751 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11763 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->mi.pos = (yyvsp[(2) - (2)].ulonglong_number); } break; case 1788: /* Line 1455 of yacc.c */ -#line 11757 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11769 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->wild= new (thd->mem_root) String((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length, system_charset_info); @@ -33615,7 +33633,7 @@ case 1789: /* Line 1455 of yacc.c */ -#line 11764 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11776 "/home/buildbot/git/sql/sql_yacc.yy" { Select->where= normalize_cond((yyvsp[(2) - (2)].item)); if ((yyvsp[(2) - (2)].item)) @@ -33626,7 +33644,7 @@ case 1790: /* Line 1455 of yacc.c */ -#line 11774 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11786 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; mysql_init_select(lex); @@ -33642,7 +33660,7 @@ case 1791: /* Line 1455 of yacc.c */ -#line 11785 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11797 "/home/buildbot/git/sql/sql_yacc.yy" { Select->parsing_place= NO_MATTER; } @@ -33651,14 +33669,14 @@ case 1792: /* Line 1455 of yacc.c */ -#line 11789 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11801 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->describe|= DESCRIBE_NORMAL; } break; case 1793: /* Line 1455 of yacc.c */ -#line 11791 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11803 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->select_lex.options|= SELECT_DESCRIBE; @@ -33668,42 +33686,42 @@ case 1796: /* Line 1455 of yacc.c */ -#line 11803 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11815 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1797: /* Line 1455 of yacc.c */ -#line 11804 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11816 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->describe|= DESCRIBE_EXTENDED; } break; case 1798: /* Line 1455 of yacc.c */ -#line 11805 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11817 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->describe|= DESCRIBE_PARTITIONS; } break; case 1799: /* Line 1455 of yacc.c */ -#line 11809 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11821 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1800: /* Line 1455 of yacc.c */ -#line 11810 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11822 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->wild= (yyvsp[(1) - (1)].string); } break; case 1801: /* Line 1455 of yacc.c */ -#line 11812 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11824 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length, @@ -33716,7 +33734,7 @@ case 1802: /* Line 1455 of yacc.c */ -#line 11826 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11838 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_FLUSH; @@ -33728,14 +33746,14 @@ case 1803: /* Line 1455 of yacc.c */ -#line 11833 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11845 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1804: /* Line 1455 of yacc.c */ -#line 11838 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11850 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_TABLES; /* @@ -33750,28 +33768,28 @@ case 1805: /* Line 1455 of yacc.c */ -#line 11847 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11859 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1806: /* Line 1455 of yacc.c */ -#line 11848 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11860 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1808: /* Line 1455 of yacc.c */ -#line 11853 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11865 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1809: /* Line 1455 of yacc.c */ -#line 11855 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11867 "/home/buildbot/git/sql/sql_yacc.yy" { TABLE_LIST *tables= Lex->query_tables; Lex->type|= REFRESH_READ_LOCK | (yyvsp[(4) - (4)].num); @@ -33787,91 +33805,91 @@ case 1811: /* Line 1455 of yacc.c */ -#line 11870 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11882 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1812: /* Line 1455 of yacc.c */ -#line 11875 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11887 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_ERROR_LOG; } break; case 1813: /* Line 1455 of yacc.c */ -#line 11877 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11889 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_ENGINE_LOG; } break; case 1814: /* Line 1455 of yacc.c */ -#line 11879 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11891 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_GENERAL_LOG; } break; case 1815: /* Line 1455 of yacc.c */ -#line 11881 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11893 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_SLOW_LOG; } break; case 1816: /* Line 1455 of yacc.c */ -#line 11883 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11895 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_BINARY_LOG; } break; case 1817: /* Line 1455 of yacc.c */ -#line 11885 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11897 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_RELAY_LOG; } break; case 1818: /* Line 1455 of yacc.c */ -#line 11887 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11899 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_QUERY_CACHE_FREE; } break; case 1819: /* Line 1455 of yacc.c */ -#line 11889 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11901 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_HOSTS; } break; case 1820: /* Line 1455 of yacc.c */ -#line 11891 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11903 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_GRANT; } break; case 1821: /* Line 1455 of yacc.c */ -#line 11893 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11905 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_LOG; } break; case 1822: /* Line 1455 of yacc.c */ -#line 11895 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11907 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_STATUS; } break; case 1823: /* Line 1455 of yacc.c */ -#line 11897 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11909 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_SLAVE; Lex->reset_slave_info.all= false; @@ -33881,84 +33899,84 @@ case 1824: /* Line 1455 of yacc.c */ -#line 11902 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11914 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_CLIENT_STATS; } break; case 1825: /* Line 1455 of yacc.c */ -#line 11904 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11916 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_USER_STATS; } break; case 1826: /* Line 1455 of yacc.c */ -#line 11906 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11918 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_TABLE_STATS; } break; case 1827: /* Line 1455 of yacc.c */ -#line 11908 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11920 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_INDEX_STATS; } break; case 1828: /* Line 1455 of yacc.c */ -#line 11910 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11922 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_MASTER; } break; case 1829: /* Line 1455 of yacc.c */ -#line 11912 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11924 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_DES_KEY_FILE; } break; case 1830: /* Line 1455 of yacc.c */ -#line 11914 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11926 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_USER_RESOURCES; } break; case 1831: /* Line 1455 of yacc.c */ -#line 11918 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11930 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1832: /* Line 1455 of yacc.c */ -#line 11919 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11931 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1833: /* Line 1455 of yacc.c */ -#line 11923 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11935 "/home/buildbot/git/sql/sql_yacc.yy" {(yyval.num)= 0;} break; case 1834: /* Line 1455 of yacc.c */ -#line 11924 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11936 "/home/buildbot/git/sql/sql_yacc.yy" {(yyval.num)= REFRESH_CHECKPOINT; } break; case 1835: /* Line 1455 of yacc.c */ -#line 11928 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11940 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_RESET; lex->type=0; @@ -33968,56 +33986,56 @@ case 1836: /* Line 1455 of yacc.c */ -#line 11933 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11945 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1839: /* Line 1455 of yacc.c */ -#line 11942 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11954 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_SLAVE; } break; case 1840: /* Line 1455 of yacc.c */ -#line 11943 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11955 "/home/buildbot/git/sql/sql_yacc.yy" { } break; case 1841: /* Line 1455 of yacc.c */ -#line 11944 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11956 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_MASTER; } break; case 1842: /* Line 1455 of yacc.c */ -#line 11945 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11957 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->type|= REFRESH_QUERY_CACHE;} break; case 1843: /* Line 1455 of yacc.c */ -#line 11949 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11961 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->reset_slave_info.all= false; } break; case 1844: /* Line 1455 of yacc.c */ -#line 11950 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11962 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->reset_slave_info.all= true; } break; case 1845: /* Line 1455 of yacc.c */ -#line 11955 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11967 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->type=0; @@ -34028,14 +34046,14 @@ case 1846: /* Line 1455 of yacc.c */ -#line 11961 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11973 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1848: /* Line 1455 of yacc.c */ -#line 11970 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11982 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->to_log = (yyvsp[(2) - (2)].lex_str).str; } @@ -34044,7 +34062,7 @@ case 1849: /* Line 1455 of yacc.c */ -#line 11974 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11986 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->value_list.empty(); @@ -34056,7 +34074,7 @@ case 1850: /* Line 1455 of yacc.c */ -#line 11986 "/home/buildbot/git/sql/sql_yacc.yy" +#line 11998 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->value_list.empty(); @@ -34068,7 +34086,7 @@ case 1851: /* Line 1455 of yacc.c */ -#line 11993 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12005 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->kill_signal= (killed_state) ((yyvsp[(3) - (5)].num) | (yyvsp[(4) - (5)].num)); } @@ -34077,49 +34095,49 @@ case 1852: /* Line 1455 of yacc.c */ -#line 11999 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12011 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= (int) KILL_HARD_BIT; } break; case 1853: /* Line 1455 of yacc.c */ -#line 12000 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12012 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= (int) KILL_HARD_BIT; } break; case 1854: /* Line 1455 of yacc.c */ -#line 12001 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12013 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 0; } break; case 1855: /* Line 1455 of yacc.c */ -#line 12004 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12016 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= (int) KILL_CONNECTION; } break; case 1856: /* Line 1455 of yacc.c */ -#line 12005 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12017 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= (int) KILL_CONNECTION; } break; case 1857: /* Line 1455 of yacc.c */ -#line 12006 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12018 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= (int) KILL_QUERY; } break; case 1858: /* Line 1455 of yacc.c */ -#line 12011 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12023 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->value_list.push_front((yyval.item)); Lex->kill_type= KILL_TYPE_ID; @@ -34129,7 +34147,7 @@ case 1859: /* Line 1455 of yacc.c */ -#line 12016 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12028 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->users_list.push_back((yyvsp[(2) - (2)].lex_user)); Lex->kill_type= KILL_TYPE_USER; @@ -34139,7 +34157,7 @@ case 1860: /* Line 1455 of yacc.c */ -#line 12026 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12038 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command=SQLCOM_CHANGE_DB; @@ -34150,7 +34168,7 @@ case 1861: /* Line 1455 of yacc.c */ -#line 12037 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12049 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; @@ -34166,7 +34184,7 @@ case 1862: /* Line 1455 of yacc.c */ -#line 12048 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12060 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_LOAD; @@ -34181,7 +34199,7 @@ case 1863: /* Line 1455 of yacc.c */ -#line 12058 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12070 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (!Select->add_table_to_list(thd, (yyvsp[(12) - (12)].table), NULL, TL_OPTION_UPDATING, @@ -34196,56 +34214,56 @@ case 1864: /* Line 1455 of yacc.c */ -#line 12068 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12080 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->exchange->cs= (yyvsp[(14) - (14)].charset); } break; case 1865: /* Line 1455 of yacc.c */ -#line 12072 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12084 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1866: /* Line 1455 of yacc.c */ -#line 12076 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12088 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.filetype)= FILETYPE_CSV; } break; case 1867: /* Line 1455 of yacc.c */ -#line 12077 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12089 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.filetype)= FILETYPE_XML; } break; case 1868: /* Line 1455 of yacc.c */ -#line 12081 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12093 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)=0;} break; case 1869: /* Line 1455 of yacc.c */ -#line 12082 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12094 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)=1;} break; case 1870: /* Line 1455 of yacc.c */ -#line 12086 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12098 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= TL_WRITE_DEFAULT; } break; case 1871: /* Line 1455 of yacc.c */ -#line 12088 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12100 "/home/buildbot/git/sql/sql_yacc.yy" { /* Ignore this option in SP to avoid problem with query cache and @@ -34258,35 +34276,35 @@ case 1872: /* Line 1455 of yacc.c */ -#line 12095 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12107 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; } break; case 1873: /* Line 1455 of yacc.c */ -#line 12099 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12111 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->duplicates=DUP_ERROR; } break; case 1874: /* Line 1455 of yacc.c */ -#line 12100 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12112 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->duplicates=DUP_REPLACE; } break; case 1875: /* Line 1455 of yacc.c */ -#line 12101 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12113 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ignore= 1; } break; case 1880: /* Line 1455 of yacc.c */ -#line 12116 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12128 "/home/buildbot/git/sql/sql_yacc.yy" { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->field_term= (yyvsp[(3) - (3)].string); @@ -34296,7 +34314,7 @@ case 1881: /* Line 1455 of yacc.c */ -#line 12121 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12133 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; DBUG_ASSERT(lex->exchange != 0); @@ -34308,7 +34326,7 @@ case 1882: /* Line 1455 of yacc.c */ -#line 12128 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12140 "/home/buildbot/git/sql/sql_yacc.yy" { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->enclosed= (yyvsp[(3) - (3)].string); @@ -34318,7 +34336,7 @@ case 1883: /* Line 1455 of yacc.c */ -#line 12133 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12145 "/home/buildbot/git/sql/sql_yacc.yy" { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->escaped= (yyvsp[(3) - (3)].string); @@ -34328,7 +34346,7 @@ case 1888: /* Line 1455 of yacc.c */ -#line 12151 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12163 "/home/buildbot/git/sql/sql_yacc.yy" { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->line_term= (yyvsp[(3) - (3)].string); @@ -34338,7 +34356,7 @@ case 1889: /* Line 1455 of yacc.c */ -#line 12156 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12168 "/home/buildbot/git/sql/sql_yacc.yy" { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->line_start= (yyvsp[(3) - (3)].string); @@ -34348,21 +34366,21 @@ case 1890: /* Line 1455 of yacc.c */ -#line 12163 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12175 "/home/buildbot/git/sql/sql_yacc.yy" { } break; case 1891: /* Line 1455 of yacc.c */ -#line 12165 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12177 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->exchange->line_term = (yyvsp[(4) - (4)].string); } break; case 1893: /* Line 1455 of yacc.c */ -#line 12170 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12182 "/home/buildbot/git/sql/sql_yacc.yy" { DBUG_ASSERT(Lex->exchange != 0); Lex->exchange->skip_lines= atol((yyvsp[(2) - (3)].lex_str).str); @@ -34372,63 +34390,63 @@ case 1894: /* Line 1455 of yacc.c */ -#line 12177 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12189 "/home/buildbot/git/sql/sql_yacc.yy" { } break; case 1895: /* Line 1455 of yacc.c */ -#line 12179 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12191 "/home/buildbot/git/sql/sql_yacc.yy" { } break; case 1896: /* Line 1455 of yacc.c */ -#line 12183 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12195 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1897: /* Line 1455 of yacc.c */ -#line 12184 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12196 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1898: /* Line 1455 of yacc.c */ -#line 12185 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12197 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1899: /* Line 1455 of yacc.c */ -#line 12190 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12202 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->field_list.push_back((yyvsp[(3) - (3)].item)); } break; case 1900: /* Line 1455 of yacc.c */ -#line 12192 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12204 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->field_list.push_back((yyvsp[(1) - (1)].item)); } break; case 1901: /* Line 1455 of yacc.c */ -#line 12196 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12208 "/home/buildbot/git/sql/sql_yacc.yy" {(yyval.item)= (yyvsp[(1) - (1)].item);} break; case 1902: /* Line 1455 of yacc.c */ -#line 12198 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12210 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param((yyvsp[(2) - (2)].lex_str)); if ((yyval.item) == NULL) @@ -34439,21 +34457,21 @@ case 1903: /* Line 1455 of yacc.c */ -#line 12206 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12218 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1904: /* Line 1455 of yacc.c */ -#line 12207 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12219 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1907: /* Line 1455 of yacc.c */ -#line 12217 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12229 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->update_list.push_back((yyvsp[(1) - (5)].item)) || @@ -34466,7 +34484,7 @@ case 1908: /* Line 1455 of yacc.c */ -#line 12230 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12242 "/home/buildbot/git/sql/sql_yacc.yy" { LEX_STRING tmp; CHARSET_INFO *cs_con= thd->variables.collation_connection; @@ -34494,7 +34512,7 @@ case 1909: /* Line 1455 of yacc.c */ -#line 12253 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12265 "/home/buildbot/git/sql/sql_yacc.yy" { uint repertoire= Lex->text_string_is_7bit ? MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30; @@ -34511,7 +34529,7 @@ case 1910: /* Line 1455 of yacc.c */ -#line 12265 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12277 "/home/buildbot/git/sql/sql_yacc.yy" { Item_string *str= new (thd->mem_root) Item_string((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length, (yyvsp[(1) - (2)].charset)); @@ -34527,7 +34545,7 @@ case 1911: /* Line 1455 of yacc.c */ -#line 12276 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12288 "/home/buildbot/git/sql/sql_yacc.yy" { Item_string* item= (Item_string*) (yyvsp[(1) - (2)].item); item->append((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length); @@ -34548,7 +34566,7 @@ case 1912: /* Line 1455 of yacc.c */ -#line 12295 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12307 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.string)= new (thd->mem_root) String((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length, @@ -34561,7 +34579,7 @@ case 1913: /* Line 1455 of yacc.c */ -#line 12303 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12315 "/home/buildbot/git/sql/sql_yacc.yy" { Item *tmp= new (thd->mem_root) Item_hex_hybrid((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if (tmp == NULL) @@ -34578,7 +34596,7 @@ case 1914: /* Line 1455 of yacc.c */ -#line 12315 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12327 "/home/buildbot/git/sql/sql_yacc.yy" { Item *tmp= new (thd->mem_root) Item_hex_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if (tmp == NULL) @@ -34591,7 +34609,7 @@ case 1915: /* Line 1455 of yacc.c */ -#line 12323 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12335 "/home/buildbot/git/sql/sql_yacc.yy" { Item *tmp= new (thd->mem_root) Item_bin_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if (tmp == NULL) @@ -34608,7 +34626,7 @@ case 1916: /* Line 1455 of yacc.c */ -#line 12338 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12350 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -34630,21 +34648,21 @@ case 1917: /* Line 1455 of yacc.c */ -#line 12357 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12369 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(1) - (1)].item); } break; case 1918: /* Line 1455 of yacc.c */ -#line 12358 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12370 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(2) - (2)].item_num); } break; case 1919: /* Line 1455 of yacc.c */ -#line 12360 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12372 "/home/buildbot/git/sql/sql_yacc.yy" { (yyvsp[(2) - (2)].item_num)->max_length++; (yyval.item)= (yyvsp[(2) - (2)].item_num)->neg(); @@ -34654,21 +34672,21 @@ case 1920: /* Line 1455 of yacc.c */ -#line 12367 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12379 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(1) - (1)].item); } break; case 1921: /* Line 1455 of yacc.c */ -#line 12368 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12380 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(1) - (1)].item_num); } break; case 1922: /* Line 1455 of yacc.c */ -#line 12370 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12382 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = new (thd->mem_root) Item_null(); if ((yyval.item) == NULL) @@ -34680,7 +34698,7 @@ case 1923: /* Line 1455 of yacc.c */ -#line 12377 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12389 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= new (thd->mem_root) Item_int((char*) "FALSE",0,1); if ((yyval.item) == NULL) @@ -34691,7 +34709,7 @@ case 1924: /* Line 1455 of yacc.c */ -#line 12383 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12395 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= new (thd->mem_root) Item_int((char*) "TRUE",1,1); if ((yyval.item) == NULL) @@ -34702,7 +34720,7 @@ case 1925: /* Line 1455 of yacc.c */ -#line 12389 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12401 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = new (thd->mem_root) Item_hex_hybrid((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if ((yyval.item) == NULL) @@ -34713,7 +34731,7 @@ case 1926: /* Line 1455 of yacc.c */ -#line 12395 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12407 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = new (thd->mem_root) Item_hex_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if ((yyval.item) == NULL) @@ -34724,7 +34742,7 @@ case 1927: /* Line 1455 of yacc.c */ -#line 12401 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12413 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= new (thd->mem_root) Item_bin_string((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if ((yyval.item) == NULL) @@ -34735,7 +34753,7 @@ case 1928: /* Line 1455 of yacc.c */ -#line 12407 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12419 "/home/buildbot/git/sql/sql_yacc.yy" { Item *tmp= new (thd->mem_root) Item_hex_string((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length); if (tmp == NULL) @@ -34769,7 +34787,7 @@ case 1929: /* Line 1455 of yacc.c */ -#line 12436 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12448 "/home/buildbot/git/sql/sql_yacc.yy" { Item *tmp= new (thd->mem_root) Item_bin_string((yyvsp[(2) - (2)].lex_str).str, (yyvsp[(2) - (2)].lex_str).length); if (tmp == NULL) @@ -34802,28 +34820,28 @@ case 1930: /* Line 1455 of yacc.c */ -#line 12463 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12475 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(2) - (2)].item); } break; case 1931: /* Line 1455 of yacc.c */ -#line 12464 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12476 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(2) - (2)].item); } break; case 1932: /* Line 1455 of yacc.c */ -#line 12465 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12477 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item) = (yyvsp[(2) - (2)].item); } break; case 1933: /* Line 1455 of yacc.c */ -#line 12470 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12482 "/home/buildbot/git/sql/sql_yacc.yy" { int error; (yyval.item_num)= new (thd->mem_root) @@ -34838,7 +34856,7 @@ case 1934: /* Line 1455 of yacc.c */ -#line 12480 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12492 "/home/buildbot/git/sql/sql_yacc.yy" { int error; (yyval.item_num)= new (thd->mem_root) @@ -34853,7 +34871,7 @@ case 1935: /* Line 1455 of yacc.c */ -#line 12490 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12502 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item_num)= new (thd->mem_root) Item_uint((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if ((yyval.item_num) == NULL) @@ -34864,7 +34882,7 @@ case 1936: /* Line 1455 of yacc.c */ -#line 12496 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12508 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item_num)= new (thd->mem_root) Item_decimal((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length, thd->charset()); @@ -34878,7 +34896,7 @@ case 1937: /* Line 1455 of yacc.c */ -#line 12505 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12517 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item_num)= new (thd->mem_root) Item_float((yyvsp[(1) - (1)].lex_str).str, (yyvsp[(1) - (1)].lex_str).length); if (((yyval.item_num) == NULL) || (thd->is_error())) @@ -34891,21 +34909,21 @@ case 1938: /* Line 1455 of yacc.c */ -#line 12519 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12531 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=(yyvsp[(1) - (1)].item); } break; case 1939: /* Line 1455 of yacc.c */ -#line 12520 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12532 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=(yyvsp[(1) - (1)].item); } break; case 1940: /* Line 1455 of yacc.c */ -#line 12525 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12537 "/home/buildbot/git/sql/sql_yacc.yy" { SELECT_LEX *sel= Select; (yyval.item)= new (thd->mem_root) Item_field(Lex->current_context(), @@ -34919,7 +34937,7 @@ case 1941: /* Line 1455 of yacc.c */ -#line 12534 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12546 "/home/buildbot/git/sql/sql_yacc.yy" { SELECT_LEX *sel= Select; const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ? @@ -34936,14 +34954,14 @@ case 1942: /* Line 1455 of yacc.c */ -#line 12548 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12560 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=(yyvsp[(1) - (1)].item); } break; case 1943: /* Line 1455 of yacc.c */ -#line 12553 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12565 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -34994,14 +35012,14 @@ case 1944: /* Line 1455 of yacc.c */ -#line 12598 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12610 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= (yyvsp[(1) - (1)].item); } break; case 1945: /* Line 1455 of yacc.c */ -#line 12603 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12615 "/home/buildbot/git/sql/sql_yacc.yy" { SELECT_LEX *sel=Select; if ((sel->parsing_place != IN_HAVING) || @@ -35023,14 +35041,14 @@ case 1946: /* Line 1455 of yacc.c */ -#line 12619 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12631 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)= (yyvsp[(1) - (1)].item); } break; case 1947: /* Line 1455 of yacc.c */ -#line 12624 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12636 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; @@ -35113,7 +35131,7 @@ case 1948: /* Line 1455 of yacc.c */ -#line 12702 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12714 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; SELECT_LEX *sel= lex->current_select; @@ -35142,7 +35160,7 @@ case 1949: /* Line 1455 of yacc.c */ -#line 12726 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12738 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; SELECT_LEX *sel= lex->current_select; @@ -35174,14 +35192,14 @@ case 1950: /* Line 1455 of yacc.c */ -#line 12755 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12767 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);} break; case 1951: /* Line 1455 of yacc.c */ -#line 12757 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12769 "/home/buildbot/git/sql/sql_yacc.yy" { TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, (yyvsp[(1) - (5)].lex_str).str, table->db)) @@ -35202,7 +35220,7 @@ case 1952: /* Line 1455 of yacc.c */ -#line 12773 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12785 "/home/buildbot/git/sql/sql_yacc.yy" { TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, (yyvsp[(1) - (3)].lex_str).str, table->alias)) @@ -35217,14 +35235,14 @@ case 1953: /* Line 1455 of yacc.c */ -#line 12782 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12794 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(2) - (2)].lex_str);} break; case 1954: /* Line 1455 of yacc.c */ -#line 12787 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12799 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.table)= new Table_ident((yyvsp[(1) - (1)].lex_str)); if ((yyval.table) == NULL) @@ -35235,7 +35253,7 @@ case 1955: /* Line 1455 of yacc.c */ -#line 12793 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12805 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.table)= new Table_ident(thd, (yyvsp[(1) - (3)].lex_str),(yyvsp[(3) - (3)].lex_str),0); if ((yyval.table) == NULL) @@ -35246,7 +35264,7 @@ case 1956: /* Line 1455 of yacc.c */ -#line 12799 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12811 "/home/buildbot/git/sql/sql_yacc.yy" { /* For Delphi */ (yyval.table)= new Table_ident((yyvsp[(2) - (2)].lex_str)); @@ -35258,7 +35276,7 @@ case 1957: /* Line 1455 of yacc.c */ -#line 12809 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12821 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.table)= new Table_ident((yyvsp[(1) - (2)].lex_str)); if ((yyval.table) == NULL) @@ -35269,7 +35287,7 @@ case 1958: /* Line 1455 of yacc.c */ -#line 12815 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12827 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.table)= new Table_ident(thd, (yyvsp[(1) - (4)].lex_str),(yyvsp[(3) - (4)].lex_str),0); if ((yyval.table) == NULL) @@ -35280,7 +35298,7 @@ case 1959: /* Line 1455 of yacc.c */ -#line 12824 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12836 "/home/buildbot/git/sql/sql_yacc.yy" { LEX_STRING db={(char*) any_db,3}; (yyval.table)= new Table_ident(thd, db,(yyvsp[(1) - (1)].lex_str),0); @@ -35292,14 +35310,14 @@ case 1960: /* Line 1455 of yacc.c */ -#line 12833 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12845 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); } break; case 1961: /* Line 1455 of yacc.c */ -#line 12835 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12847 "/home/buildbot/git/sql/sql_yacc.yy" { if (thd->charset_is_system_charset) { @@ -35329,7 +35347,7 @@ case 1962: /* Line 1455 of yacc.c */ -#line 12863 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12875 "/home/buildbot/git/sql/sql_yacc.yy" { if (thd->charset_is_system_charset) (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); @@ -35345,7 +35363,7 @@ case 1963: /* Line 1455 of yacc.c */ -#line 12877 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12889 "/home/buildbot/git/sql/sql_yacc.yy" { if (thd->charset_is_collation_connection) (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); @@ -35361,7 +35379,7 @@ case 1964: /* Line 1455 of yacc.c */ -#line 12891 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12903 "/home/buildbot/git/sql/sql_yacc.yy" { if (thd->charset_is_character_set_filesystem) (yyval.lex_str)= (yyvsp[(1) - (1)].lex_str); @@ -35378,14 +35396,14 @@ case 1965: /* Line 1455 of yacc.c */ -#line 12905 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12917 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str); } break; case 1966: /* Line 1455 of yacc.c */ -#line 12907 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12919 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str).str= thd->strmake((yyvsp[(1) - (1)].symbol).str, (yyvsp[(1) - (1)].symbol).length); if ((yyval.lex_str).str == NULL) @@ -35397,14 +35415,14 @@ case 1967: /* Line 1455 of yacc.c */ -#line 12916 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12928 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str); } break; case 1968: /* Line 1455 of yacc.c */ -#line 12918 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12930 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str).str= thd->strmake((yyvsp[(1) - (1)].symbol).str, (yyvsp[(1) - (1)].symbol).length); if ((yyval.lex_str).str == NULL) @@ -35416,28 +35434,28 @@ case 1969: /* Line 1455 of yacc.c */ -#line 12927 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12939 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);} break; case 1970: /* Line 1455 of yacc.c */ -#line 12928 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12940 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);} break; case 1971: /* Line 1455 of yacc.c */ -#line 12929 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12941 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_str)=(yyvsp[(1) - (1)].lex_str);} break; case 1972: /* Line 1455 of yacc.c */ -#line 12934 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12946 "/home/buildbot/git/sql/sql_yacc.yy" { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -35458,7 +35476,7 @@ case 1973: /* Line 1455 of yacc.c */ -#line 12950 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12962 "/home/buildbot/git/sql/sql_yacc.yy" { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -35484,7 +35502,7 @@ case 1974: /* Line 1455 of yacc.c */ -#line 12971 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12983 "/home/buildbot/git/sql/sql_yacc.yy" { if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) MYSQL_YYABORT; @@ -35500,2471 +35518,2471 @@ case 1975: /* Line 1455 of yacc.c */ -#line 12985 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12997 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1976: /* Line 1455 of yacc.c */ -#line 12986 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12998 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1977: /* Line 1455 of yacc.c */ -#line 12987 "/home/buildbot/git/sql/sql_yacc.yy" +#line 12999 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1978: /* Line 1455 of yacc.c */ -#line 12988 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13000 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1979: /* Line 1455 of yacc.c */ -#line 12989 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13001 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1980: /* Line 1455 of yacc.c */ -#line 12990 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13002 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1981: /* Line 1455 of yacc.c */ -#line 12991 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13003 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1982: /* Line 1455 of yacc.c */ -#line 12992 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13004 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1983: /* Line 1455 of yacc.c */ -#line 12993 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13005 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1984: /* Line 1455 of yacc.c */ -#line 12994 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1985: /* Line 1455 of yacc.c */ -#line 12995 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13007 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1986: /* Line 1455 of yacc.c */ -#line 12996 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13008 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1987: /* Line 1455 of yacc.c */ -#line 12997 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13009 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1988: /* Line 1455 of yacc.c */ -#line 12998 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13010 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1989: /* Line 1455 of yacc.c */ -#line 12999 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13011 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1990: /* Line 1455 of yacc.c */ -#line 13000 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1991: /* Line 1455 of yacc.c */ -#line 13001 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13013 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1992: /* Line 1455 of yacc.c */ -#line 13002 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13014 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1993: /* Line 1455 of yacc.c */ -#line 13003 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13015 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1994: /* Line 1455 of yacc.c */ -#line 13004 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1995: /* Line 1455 of yacc.c */ -#line 13005 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13017 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1996: /* Line 1455 of yacc.c */ -#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13018 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1997: /* Line 1455 of yacc.c */ -#line 13007 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13019 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1998: /* Line 1455 of yacc.c */ -#line 13008 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13020 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 1999: /* Line 1455 of yacc.c */ -#line 13009 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13021 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2000: /* Line 1455 of yacc.c */ -#line 13010 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13022 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2001: /* Line 1455 of yacc.c */ -#line 13011 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13023 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2002: /* Line 1455 of yacc.c */ -#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13024 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2003: /* Line 1455 of yacc.c */ -#line 13013 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2004: /* Line 1455 of yacc.c */ -#line 13014 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13026 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2005: /* Line 1455 of yacc.c */ -#line 13015 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13027 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2006: /* Line 1455 of yacc.c */ -#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13028 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2007: /* Line 1455 of yacc.c */ -#line 13017 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13029 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2008: /* Line 1455 of yacc.c */ -#line 13018 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13030 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2009: /* Line 1455 of yacc.c */ -#line 13019 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13031 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2010: /* Line 1455 of yacc.c */ -#line 13020 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13032 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2011: /* Line 1455 of yacc.c */ -#line 13021 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13033 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2012: /* Line 1455 of yacc.c */ -#line 13022 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13034 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2013: /* Line 1455 of yacc.c */ -#line 13023 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13035 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2014: /* Line 1455 of yacc.c */ -#line 13024 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13036 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2015: /* Line 1455 of yacc.c */ -#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13037 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2016: /* Line 1455 of yacc.c */ -#line 13026 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13038 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2017: /* Line 1455 of yacc.c */ -#line 13027 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13039 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2018: /* Line 1455 of yacc.c */ -#line 13028 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13040 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2019: /* Line 1455 of yacc.c */ -#line 13029 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13041 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2020: /* Line 1455 of yacc.c */ -#line 13030 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13042 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2021: /* Line 1455 of yacc.c */ -#line 13031 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13043 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2022: /* Line 1455 of yacc.c */ -#line 13032 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13044 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2023: /* Line 1455 of yacc.c */ -#line 13033 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13045 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2024: /* Line 1455 of yacc.c */ -#line 13034 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13046 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2025: /* Line 1455 of yacc.c */ -#line 13035 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13047 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2026: /* Line 1455 of yacc.c */ -#line 13036 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13048 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2027: /* Line 1455 of yacc.c */ -#line 13037 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13049 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2028: /* Line 1455 of yacc.c */ -#line 13038 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13050 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2029: /* Line 1455 of yacc.c */ -#line 13039 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13051 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2030: /* Line 1455 of yacc.c */ -#line 13040 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13052 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2031: /* Line 1455 of yacc.c */ -#line 13041 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13053 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2032: /* Line 1455 of yacc.c */ -#line 13042 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13054 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2033: /* Line 1455 of yacc.c */ -#line 13043 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13055 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2034: /* Line 1455 of yacc.c */ -#line 13053 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13065 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2035: /* Line 1455 of yacc.c */ -#line 13054 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13066 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2036: /* Line 1455 of yacc.c */ -#line 13055 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13067 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2037: /* Line 1455 of yacc.c */ -#line 13056 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13068 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2038: /* Line 1455 of yacc.c */ -#line 13057 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13069 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2039: /* Line 1455 of yacc.c */ -#line 13058 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13070 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2040: /* Line 1455 of yacc.c */ -#line 13059 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13071 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2041: /* Line 1455 of yacc.c */ -#line 13060 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13072 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2042: /* Line 1455 of yacc.c */ -#line 13061 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13073 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2043: /* Line 1455 of yacc.c */ -#line 13062 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13074 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2044: /* Line 1455 of yacc.c */ -#line 13063 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13075 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2045: /* Line 1455 of yacc.c */ -#line 13064 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13076 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2046: /* Line 1455 of yacc.c */ -#line 13065 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13077 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2047: /* Line 1455 of yacc.c */ -#line 13066 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13078 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2048: /* Line 1455 of yacc.c */ -#line 13067 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13079 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2049: /* Line 1455 of yacc.c */ -#line 13068 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13080 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2050: /* Line 1455 of yacc.c */ -#line 13069 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13081 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2051: /* Line 1455 of yacc.c */ -#line 13070 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13082 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2052: /* Line 1455 of yacc.c */ -#line 13071 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13083 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2053: /* Line 1455 of yacc.c */ -#line 13072 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13084 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2054: /* Line 1455 of yacc.c */ -#line 13073 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13085 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2055: /* Line 1455 of yacc.c */ -#line 13074 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13086 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2056: /* Line 1455 of yacc.c */ -#line 13075 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13087 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2057: /* Line 1455 of yacc.c */ -#line 13076 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13088 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2058: /* Line 1455 of yacc.c */ -#line 13077 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13089 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2059: /* Line 1455 of yacc.c */ -#line 13078 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13090 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2060: /* Line 1455 of yacc.c */ -#line 13079 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13091 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2061: /* Line 1455 of yacc.c */ -#line 13080 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13092 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2062: /* Line 1455 of yacc.c */ -#line 13081 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13093 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2063: /* Line 1455 of yacc.c */ -#line 13082 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13094 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2064: /* Line 1455 of yacc.c */ -#line 13083 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13095 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2065: /* Line 1455 of yacc.c */ -#line 13084 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13096 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2066: /* Line 1455 of yacc.c */ -#line 13085 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13097 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2067: /* Line 1455 of yacc.c */ -#line 13086 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13098 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2068: /* Line 1455 of yacc.c */ -#line 13087 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13099 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2069: /* Line 1455 of yacc.c */ -#line 13088 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13100 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2070: /* Line 1455 of yacc.c */ -#line 13089 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13101 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2071: /* Line 1455 of yacc.c */ -#line 13090 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13102 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2072: /* Line 1455 of yacc.c */ -#line 13091 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13103 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2073: /* Line 1455 of yacc.c */ -#line 13092 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13104 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2074: /* Line 1455 of yacc.c */ -#line 13093 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13105 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2075: /* Line 1455 of yacc.c */ -#line 13094 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13106 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2076: /* Line 1455 of yacc.c */ -#line 13095 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13107 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2077: /* Line 1455 of yacc.c */ -#line 13096 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13108 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2078: /* Line 1455 of yacc.c */ -#line 13097 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13109 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2079: /* Line 1455 of yacc.c */ -#line 13098 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13110 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2080: /* Line 1455 of yacc.c */ -#line 13099 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13111 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2081: /* Line 1455 of yacc.c */ -#line 13100 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13112 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2082: /* Line 1455 of yacc.c */ -#line 13101 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13113 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2083: /* Line 1455 of yacc.c */ -#line 13102 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13114 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2084: /* Line 1455 of yacc.c */ -#line 13103 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13115 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2085: /* Line 1455 of yacc.c */ -#line 13104 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13116 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2086: /* Line 1455 of yacc.c */ -#line 13105 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13117 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2087: /* Line 1455 of yacc.c */ -#line 13106 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13118 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2088: /* Line 1455 of yacc.c */ -#line 13107 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13119 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2089: /* Line 1455 of yacc.c */ -#line 13108 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13120 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2090: /* Line 1455 of yacc.c */ -#line 13109 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2091: /* Line 1455 of yacc.c */ -#line 13110 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13122 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2092: /* Line 1455 of yacc.c */ -#line 13111 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13123 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2093: /* Line 1455 of yacc.c */ -#line 13112 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13124 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2094: /* Line 1455 of yacc.c */ -#line 13113 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13125 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2095: /* Line 1455 of yacc.c */ -#line 13114 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13126 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2096: /* Line 1455 of yacc.c */ -#line 13115 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13127 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2097: /* Line 1455 of yacc.c */ -#line 13116 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13128 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2098: /* Line 1455 of yacc.c */ -#line 13117 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13129 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2099: /* Line 1455 of yacc.c */ -#line 13118 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13130 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2100: /* Line 1455 of yacc.c */ -#line 13119 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13131 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2101: /* Line 1455 of yacc.c */ -#line 13120 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13132 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2102: /* Line 1455 of yacc.c */ -#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13133 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2103: /* Line 1455 of yacc.c */ -#line 13122 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13134 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2104: /* Line 1455 of yacc.c */ -#line 13123 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13135 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2105: /* Line 1455 of yacc.c */ -#line 13124 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13136 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2106: /* Line 1455 of yacc.c */ -#line 13125 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13137 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2107: /* Line 1455 of yacc.c */ -#line 13126 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13138 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2108: /* Line 1455 of yacc.c */ -#line 13127 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13139 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2109: /* Line 1455 of yacc.c */ -#line 13128 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13140 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2110: /* Line 1455 of yacc.c */ -#line 13129 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13141 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2111: /* Line 1455 of yacc.c */ -#line 13130 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13142 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2112: /* Line 1455 of yacc.c */ -#line 13131 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13143 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2113: /* Line 1455 of yacc.c */ -#line 13132 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13144 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2114: /* Line 1455 of yacc.c */ -#line 13133 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13145 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2115: /* Line 1455 of yacc.c */ -#line 13134 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13146 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2116: /* Line 1455 of yacc.c */ -#line 13135 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13147 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2117: /* Line 1455 of yacc.c */ -#line 13136 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13148 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2118: /* Line 1455 of yacc.c */ -#line 13137 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13149 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2119: /* Line 1455 of yacc.c */ -#line 13138 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13150 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2120: /* Line 1455 of yacc.c */ -#line 13139 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13151 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2121: /* Line 1455 of yacc.c */ -#line 13140 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13152 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2122: /* Line 1455 of yacc.c */ -#line 13141 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13153 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2123: /* Line 1455 of yacc.c */ -#line 13142 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13154 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2124: /* Line 1455 of yacc.c */ -#line 13143 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13155 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2125: /* Line 1455 of yacc.c */ -#line 13144 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13156 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2126: /* Line 1455 of yacc.c */ -#line 13145 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13157 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2127: /* Line 1455 of yacc.c */ -#line 13146 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13158 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2128: /* Line 1455 of yacc.c */ -#line 13147 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13159 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2129: /* Line 1455 of yacc.c */ -#line 13148 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13160 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2130: /* Line 1455 of yacc.c */ -#line 13149 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13161 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2131: /* Line 1455 of yacc.c */ -#line 13150 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13162 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2132: /* Line 1455 of yacc.c */ -#line 13151 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13163 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2133: /* Line 1455 of yacc.c */ -#line 13152 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13164 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2134: /* Line 1455 of yacc.c */ -#line 13153 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13165 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2135: /* Line 1455 of yacc.c */ -#line 13154 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13166 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2136: /* Line 1455 of yacc.c */ -#line 13155 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13167 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2137: /* Line 1455 of yacc.c */ -#line 13156 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13168 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2138: /* Line 1455 of yacc.c */ -#line 13157 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13169 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2139: /* Line 1455 of yacc.c */ -#line 13158 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13170 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2140: /* Line 1455 of yacc.c */ -#line 13159 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13171 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2141: /* Line 1455 of yacc.c */ -#line 13160 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13172 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2142: /* Line 1455 of yacc.c */ -#line 13161 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13173 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2143: /* Line 1455 of yacc.c */ -#line 13162 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13174 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2144: /* Line 1455 of yacc.c */ -#line 13163 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13175 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2145: /* Line 1455 of yacc.c */ -#line 13164 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13176 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2146: /* Line 1455 of yacc.c */ -#line 13165 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13177 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2147: /* Line 1455 of yacc.c */ -#line 13166 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13178 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2148: /* Line 1455 of yacc.c */ -#line 13167 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13179 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2149: /* Line 1455 of yacc.c */ -#line 13168 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13180 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2150: /* Line 1455 of yacc.c */ -#line 13169 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13181 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2151: /* Line 1455 of yacc.c */ -#line 13170 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13182 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2152: /* Line 1455 of yacc.c */ -#line 13171 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13183 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2153: /* Line 1455 of yacc.c */ -#line 13172 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13184 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2154: /* Line 1455 of yacc.c */ -#line 13173 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13185 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2155: /* Line 1455 of yacc.c */ -#line 13174 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13186 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2156: /* Line 1455 of yacc.c */ -#line 13175 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13187 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2157: /* Line 1455 of yacc.c */ -#line 13176 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13188 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2158: /* Line 1455 of yacc.c */ -#line 13177 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13189 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2159: /* Line 1455 of yacc.c */ -#line 13178 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13190 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2160: /* Line 1455 of yacc.c */ -#line 13179 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13191 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2161: /* Line 1455 of yacc.c */ -#line 13180 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13192 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2162: /* Line 1455 of yacc.c */ -#line 13181 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13193 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2163: /* Line 1455 of yacc.c */ -#line 13182 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13194 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2164: /* Line 1455 of yacc.c */ -#line 13183 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13195 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2165: /* Line 1455 of yacc.c */ -#line 13184 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13196 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2166: /* Line 1455 of yacc.c */ -#line 13185 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13197 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2167: /* Line 1455 of yacc.c */ -#line 13186 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13198 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2168: /* Line 1455 of yacc.c */ -#line 13187 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13199 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2169: /* Line 1455 of yacc.c */ -#line 13188 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13200 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2170: /* Line 1455 of yacc.c */ -#line 13189 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13201 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2171: /* Line 1455 of yacc.c */ -#line 13190 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13202 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2172: /* Line 1455 of yacc.c */ -#line 13191 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13203 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2173: /* Line 1455 of yacc.c */ -#line 13192 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13204 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2174: /* Line 1455 of yacc.c */ -#line 13193 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13205 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2175: /* Line 1455 of yacc.c */ -#line 13194 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13206 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2176: /* Line 1455 of yacc.c */ -#line 13195 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13207 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2177: /* Line 1455 of yacc.c */ -#line 13196 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13208 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2178: /* Line 1455 of yacc.c */ -#line 13197 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13209 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2179: /* Line 1455 of yacc.c */ -#line 13198 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13210 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2180: /* Line 1455 of yacc.c */ -#line 13199 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13211 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2181: /* Line 1455 of yacc.c */ -#line 13200 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13212 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2182: /* Line 1455 of yacc.c */ -#line 13201 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13213 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2183: /* Line 1455 of yacc.c */ -#line 13202 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13214 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2184: /* Line 1455 of yacc.c */ -#line 13203 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13215 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2185: /* Line 1455 of yacc.c */ -#line 13204 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13216 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2186: /* Line 1455 of yacc.c */ -#line 13205 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13217 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2187: /* Line 1455 of yacc.c */ -#line 13206 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13218 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2188: /* Line 1455 of yacc.c */ -#line 13207 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13219 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2189: /* Line 1455 of yacc.c */ -#line 13208 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13220 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2190: /* Line 1455 of yacc.c */ -#line 13209 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13221 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2191: /* Line 1455 of yacc.c */ -#line 13210 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13222 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2192: /* Line 1455 of yacc.c */ -#line 13211 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13223 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2193: /* Line 1455 of yacc.c */ -#line 13212 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13224 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2194: /* Line 1455 of yacc.c */ -#line 13213 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13225 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2195: /* Line 1455 of yacc.c */ -#line 13214 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13226 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2196: /* Line 1455 of yacc.c */ -#line 13215 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13227 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2197: /* Line 1455 of yacc.c */ -#line 13216 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2198: /* Line 1455 of yacc.c */ -#line 13217 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13229 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2199: /* Line 1455 of yacc.c */ -#line 13218 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13230 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2200: /* Line 1455 of yacc.c */ -#line 13219 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13231 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2201: /* Line 1455 of yacc.c */ -#line 13220 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13232 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2202: /* Line 1455 of yacc.c */ -#line 13221 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13233 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2203: /* Line 1455 of yacc.c */ -#line 13222 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13234 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2204: /* Line 1455 of yacc.c */ -#line 13223 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13235 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2205: /* Line 1455 of yacc.c */ -#line 13224 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13236 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2206: /* Line 1455 of yacc.c */ -#line 13225 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13237 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2207: /* Line 1455 of yacc.c */ -#line 13226 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13238 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2208: /* Line 1455 of yacc.c */ -#line 13227 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13239 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2209: /* Line 1455 of yacc.c */ -#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13240 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2210: /* Line 1455 of yacc.c */ -#line 13229 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13241 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2211: /* Line 1455 of yacc.c */ -#line 13230 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13242 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2212: /* Line 1455 of yacc.c */ -#line 13231 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13243 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2213: /* Line 1455 of yacc.c */ -#line 13232 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13244 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2214: /* Line 1455 of yacc.c */ -#line 13233 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13245 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2215: /* Line 1455 of yacc.c */ -#line 13234 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13246 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2216: /* Line 1455 of yacc.c */ -#line 13235 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13247 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2217: /* Line 1455 of yacc.c */ -#line 13236 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13248 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2218: /* Line 1455 of yacc.c */ -#line 13237 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13249 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2219: /* Line 1455 of yacc.c */ -#line 13238 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13250 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2220: /* Line 1455 of yacc.c */ -#line 13239 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13251 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2221: /* Line 1455 of yacc.c */ -#line 13240 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13252 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2222: /* Line 1455 of yacc.c */ -#line 13241 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13253 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2223: /* Line 1455 of yacc.c */ -#line 13242 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13254 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2224: /* Line 1455 of yacc.c */ -#line 13243 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13255 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2225: /* Line 1455 of yacc.c */ -#line 13244 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13256 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2226: /* Line 1455 of yacc.c */ -#line 13245 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13257 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2227: /* Line 1455 of yacc.c */ -#line 13246 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13258 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2228: /* Line 1455 of yacc.c */ -#line 13247 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13259 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2229: /* Line 1455 of yacc.c */ -#line 13248 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13260 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2230: /* Line 1455 of yacc.c */ -#line 13249 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13261 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2231: /* Line 1455 of yacc.c */ -#line 13250 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13262 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2232: /* Line 1455 of yacc.c */ -#line 13251 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13263 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2233: /* Line 1455 of yacc.c */ -#line 13252 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13264 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2234: /* Line 1455 of yacc.c */ -#line 13253 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13265 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2235: /* Line 1455 of yacc.c */ -#line 13254 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13266 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2236: /* Line 1455 of yacc.c */ -#line 13255 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13267 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2237: /* Line 1455 of yacc.c */ -#line 13256 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13268 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2238: /* Line 1455 of yacc.c */ -#line 13257 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13269 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2239: /* Line 1455 of yacc.c */ -#line 13258 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13270 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2240: /* Line 1455 of yacc.c */ -#line 13259 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13271 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2241: /* Line 1455 of yacc.c */ -#line 13260 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13272 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2242: /* Line 1455 of yacc.c */ -#line 13261 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13273 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2243: /* Line 1455 of yacc.c */ -#line 13262 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13274 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2244: /* Line 1455 of yacc.c */ -#line 13263 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13275 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2245: /* Line 1455 of yacc.c */ -#line 13264 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13276 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2246: /* Line 1455 of yacc.c */ -#line 13265 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13277 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2247: /* Line 1455 of yacc.c */ -#line 13266 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13278 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2248: /* Line 1455 of yacc.c */ -#line 13267 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13279 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2249: /* Line 1455 of yacc.c */ -#line 13268 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13280 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2250: /* Line 1455 of yacc.c */ -#line 13269 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13281 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2251: /* Line 1455 of yacc.c */ -#line 13270 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13282 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2252: /* Line 1455 of yacc.c */ -#line 13271 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13283 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2253: /* Line 1455 of yacc.c */ -#line 13272 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13284 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2254: /* Line 1455 of yacc.c */ -#line 13273 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13285 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2255: /* Line 1455 of yacc.c */ -#line 13274 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13286 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2256: /* Line 1455 of yacc.c */ -#line 13275 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13287 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2257: /* Line 1455 of yacc.c */ -#line 13276 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13288 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2258: /* Line 1455 of yacc.c */ -#line 13277 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13289 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2259: /* Line 1455 of yacc.c */ -#line 13278 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13290 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2260: /* Line 1455 of yacc.c */ -#line 13279 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13291 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2261: /* Line 1455 of yacc.c */ -#line 13280 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13292 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2262: /* Line 1455 of yacc.c */ -#line 13281 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13293 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2263: /* Line 1455 of yacc.c */ -#line 13282 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13294 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2264: /* Line 1455 of yacc.c */ -#line 13283 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13295 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2265: /* Line 1455 of yacc.c */ -#line 13284 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13296 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2266: /* Line 1455 of yacc.c */ -#line 13285 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13297 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2267: /* Line 1455 of yacc.c */ -#line 13286 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13298 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2268: /* Line 1455 of yacc.c */ -#line 13287 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13299 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2269: /* Line 1455 of yacc.c */ -#line 13288 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13300 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2270: /* Line 1455 of yacc.c */ -#line 13289 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13301 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2271: /* Line 1455 of yacc.c */ -#line 13290 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13302 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2272: /* Line 1455 of yacc.c */ -#line 13291 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13303 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2273: /* Line 1455 of yacc.c */ -#line 13292 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13304 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2274: /* Line 1455 of yacc.c */ -#line 13293 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13305 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2275: /* Line 1455 of yacc.c */ -#line 13294 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13306 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2276: /* Line 1455 of yacc.c */ -#line 13295 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13307 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2277: /* Line 1455 of yacc.c */ -#line 13296 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13308 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2278: /* Line 1455 of yacc.c */ -#line 13297 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13309 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2279: /* Line 1455 of yacc.c */ -#line 13298 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13310 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2280: /* Line 1455 of yacc.c */ -#line 13299 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13311 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2281: /* Line 1455 of yacc.c */ -#line 13300 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13312 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2282: /* Line 1455 of yacc.c */ -#line 13301 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13313 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2283: /* Line 1455 of yacc.c */ -#line 13302 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13314 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2284: /* Line 1455 of yacc.c */ -#line 13303 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13315 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2285: /* Line 1455 of yacc.c */ -#line 13304 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13316 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2286: /* Line 1455 of yacc.c */ -#line 13305 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13317 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2287: /* Line 1455 of yacc.c */ -#line 13306 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13318 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2288: /* Line 1455 of yacc.c */ -#line 13307 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13319 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2289: /* Line 1455 of yacc.c */ -#line 13308 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13320 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2290: /* Line 1455 of yacc.c */ -#line 13309 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13321 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2291: /* Line 1455 of yacc.c */ -#line 13310 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13322 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2292: /* Line 1455 of yacc.c */ -#line 13311 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13323 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2293: /* Line 1455 of yacc.c */ -#line 13312 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13324 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2294: /* Line 1455 of yacc.c */ -#line 13313 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13325 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2295: /* Line 1455 of yacc.c */ -#line 13314 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13326 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2296: /* Line 1455 of yacc.c */ -#line 13315 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13327 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2297: /* Line 1455 of yacc.c */ -#line 13316 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2298: /* Line 1455 of yacc.c */ -#line 13317 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13329 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2299: /* Line 1455 of yacc.c */ -#line 13318 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13330 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2300: /* Line 1455 of yacc.c */ -#line 13319 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13331 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2301: /* Line 1455 of yacc.c */ -#line 13320 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13332 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2302: /* Line 1455 of yacc.c */ -#line 13321 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13333 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2303: /* Line 1455 of yacc.c */ -#line 13322 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13334 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2304: /* Line 1455 of yacc.c */ -#line 13323 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13335 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2305: /* Line 1455 of yacc.c */ -#line 13324 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13336 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2306: /* Line 1455 of yacc.c */ -#line 13325 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13337 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2307: /* Line 1455 of yacc.c */ -#line 13326 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13338 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2308: /* Line 1455 of yacc.c */ -#line 13327 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13339 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2309: /* Line 1455 of yacc.c */ -#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13340 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2310: /* Line 1455 of yacc.c */ -#line 13329 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13341 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2311: /* Line 1455 of yacc.c */ -#line 13330 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13342 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2312: /* Line 1455 of yacc.c */ -#line 13331 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13343 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2313: /* Line 1455 of yacc.c */ -#line 13332 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13344 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2314: /* Line 1455 of yacc.c */ -#line 13333 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13345 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2315: /* Line 1455 of yacc.c */ -#line 13334 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13346 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2316: /* Line 1455 of yacc.c */ -#line 13335 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13347 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2317: /* Line 1455 of yacc.c */ -#line 13336 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13348 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2318: /* Line 1455 of yacc.c */ -#line 13337 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13349 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2319: /* Line 1455 of yacc.c */ -#line 13338 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13350 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2320: /* Line 1455 of yacc.c */ -#line 13339 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13351 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2321: /* Line 1455 of yacc.c */ -#line 13340 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13352 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2322: /* Line 1455 of yacc.c */ -#line 13341 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13353 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2323: /* Line 1455 of yacc.c */ -#line 13342 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13354 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2324: /* Line 1455 of yacc.c */ -#line 13343 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13355 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2325: /* Line 1455 of yacc.c */ -#line 13344 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13356 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2326: /* Line 1455 of yacc.c */ -#line 13345 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13357 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2327: /* Line 1455 of yacc.c */ -#line 13352 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13364 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SET_OPTION; @@ -37979,28 +37997,28 @@ case 2328: /* Line 1455 of yacc.c */ -#line 13362 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13374 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2329: /* Line 1455 of yacc.c */ -#line 13366 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13378 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2330: /* Line 1455 of yacc.c */ -#line 13367 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13379 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2333: /* Line 1455 of yacc.c */ -#line 13376 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13388 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -38035,7 +38053,7 @@ case 2334: /* Line 1455 of yacc.c */ -#line 13406 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13418 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -38088,105 +38106,105 @@ case 2335: /* Line 1455 of yacc.c */ -#line 13456 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13468 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2336: /* Line 1455 of yacc.c */ -#line 13457 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13469 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_GLOBAL; } break; case 2337: /* Line 1455 of yacc.c */ -#line 13458 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13470 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2338: /* Line 1455 of yacc.c */ -#line 13459 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13471 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2339: /* Line 1455 of yacc.c */ -#line 13463 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13475 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= OPT_DEFAULT; } break; case 2340: /* Line 1455 of yacc.c */ -#line 13464 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13476 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->one_shot_set= 1; (yyval.num)= OPT_SESSION; } break; case 2341: /* Line 1455 of yacc.c */ -#line 13468 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13480 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2342: /* Line 1455 of yacc.c */ -#line 13469 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13481 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_GLOBAL; } break; case 2343: /* Line 1455 of yacc.c */ -#line 13470 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13482 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2344: /* Line 1455 of yacc.c */ -#line 13471 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13483 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2345: /* Line 1455 of yacc.c */ -#line 13475 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13487 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_DEFAULT; } break; case 2346: /* Line 1455 of yacc.c */ -#line 13476 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13488 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_GLOBAL; } break; case 2347: /* Line 1455 of yacc.c */ -#line 13477 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13489 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2348: /* Line 1455 of yacc.c */ -#line 13478 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13490 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.var_type)=OPT_SESSION; } break; case 2351: /* Line 1455 of yacc.c */ -#line 13488 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13500 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; LEX_STRING *name= &(yyvsp[(2) - (4)].variable).base_name; @@ -38232,7 +38250,7 @@ case 2352: /* Line 1455 of yacc.c */ -#line 13529 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13541 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->option_type= (yyvsp[(1) - (5)].var_type); @@ -38252,7 +38270,7 @@ case 2353: /* Line 1455 of yacc.c */ -#line 13547 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13559 "/home/buildbot/git/sql/sql_yacc.yy" { Item_func_set_user_var *item; item= new (thd->mem_root) Item_func_set_user_var((yyvsp[(2) - (4)].lex_str), (yyvsp[(4) - (4)].item)); @@ -38268,7 +38286,7 @@ case 2354: /* Line 1455 of yacc.c */ -#line 13558 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13570 "/home/buildbot/git/sql/sql_yacc.yy" { struct sys_var_with_base tmp= (yyvsp[(4) - (6)].variable); /* Lookup if necessary: must be a system variable. */ @@ -38285,7 +38303,7 @@ case 2355: /* Line 1455 of yacc.c */ -#line 13570 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13582 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; CHARSET_INFO *cs2; @@ -38303,7 +38321,7 @@ case 2356: /* Line 1455 of yacc.c */ -#line 13583 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13595 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; sp_pcontext *spc= lex->spcont; @@ -38323,7 +38341,7 @@ case 2357: /* Line 1455 of yacc.c */ -#line 13598 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13610 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; CHARSET_INFO *cs2; @@ -38347,7 +38365,7 @@ case 2358: /* Line 1455 of yacc.c */ -#line 13617 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13629 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; LEX_USER *user; @@ -38378,7 +38396,7 @@ case 2359: /* Line 1455 of yacc.c */ -#line 13643 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13655 "/home/buildbot/git/sql/sql_yacc.yy" { set_var_password *var= new set_var_password((yyvsp[(3) - (5)].lex_user),(yyvsp[(5) - (5)].simple_string)); if (var == NULL) @@ -38393,7 +38411,7 @@ case 2360: /* Line 1455 of yacc.c */ -#line 13656 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13668 "/home/buildbot/git/sql/sql_yacc.yy" { sp_pcontext *spc= thd->lex->spcont; sp_variable_t *spv; @@ -38424,7 +38442,7 @@ case 2361: /* Line 1455 of yacc.c */ -#line 13682 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13694 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (check_reserved_words(&(yyvsp[(1) - (3)].lex_str))) @@ -38472,7 +38490,7 @@ case 2362: /* Line 1455 of yacc.c */ -#line 13725 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13737 "/home/buildbot/git/sql/sql_yacc.yy" { sys_var *tmp=find_sys_var(thd, (yyvsp[(3) - (3)].lex_str).str, (yyvsp[(3) - (3)].lex_str).length); if (!tmp) @@ -38488,42 +38506,42 @@ case 2363: /* Line 1455 of yacc.c */ -#line 13738 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13750 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; } break; case 2364: /* Line 1455 of yacc.c */ -#line 13739 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13751 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.tx_isolation)= ISO_READ_COMMITTED; } break; case 2365: /* Line 1455 of yacc.c */ -#line 13740 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13752 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.tx_isolation)= ISO_REPEATABLE_READ; } break; case 2366: /* Line 1455 of yacc.c */ -#line 13741 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13753 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.tx_isolation)= ISO_SERIALIZABLE; } break; case 2367: /* Line 1455 of yacc.c */ -#line 13745 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13757 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.simple_string)=(yyvsp[(1) - (1)].lex_str).str;} break; case 2368: /* Line 1455 of yacc.c */ -#line 13747 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13759 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.simple_string)= (yyvsp[(3) - (4)].lex_str).length ? thd->variables.old_passwords ? Item_func_old_password::alloc(thd, (yyvsp[(3) - (4)].lex_str).str, (yyvsp[(3) - (4)].lex_str).length) : @@ -38537,7 +38555,7 @@ case 2369: /* Line 1455 of yacc.c */ -#line 13756 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13768 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.simple_string)= (yyvsp[(3) - (4)].lex_str).length ? Item_func_old_password::alloc(thd, (yyvsp[(3) - (4)].lex_str).str, (yyvsp[(3) - (4)].lex_str).length) : @@ -38550,21 +38568,21 @@ case 2370: /* Line 1455 of yacc.c */ -#line 13767 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13779 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=(yyvsp[(1) - (1)].item); } break; case 2371: /* Line 1455 of yacc.c */ -#line 13768 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13780 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=0; } break; case 2372: /* Line 1455 of yacc.c */ -#line 13770 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13782 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=new (thd->mem_root) Item_string("ON", 2, system_charset_info); if ((yyval.item) == NULL) @@ -38575,7 +38593,7 @@ case 2373: /* Line 1455 of yacc.c */ -#line 13776 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13788 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=new (thd->mem_root) Item_string("ALL", 3, system_charset_info); if ((yyval.item) == NULL) @@ -38586,7 +38604,7 @@ case 2374: /* Line 1455 of yacc.c */ -#line 13782 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13794 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.item)=new (thd->mem_root) Item_string("binary", 6, system_charset_info); if ((yyval.item) == NULL) @@ -38597,7 +38615,7 @@ case 2375: /* Line 1455 of yacc.c */ -#line 13793 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13805 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; @@ -38613,28 +38631,28 @@ case 2376: /* Line 1455 of yacc.c */ -#line 13804 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13816 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2377: /* Line 1455 of yacc.c */ -#line 13808 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13820 "/home/buildbot/git/sql/sql_yacc.yy" { } break; case 2378: /* Line 1455 of yacc.c */ -#line 13809 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13821 "/home/buildbot/git/sql/sql_yacc.yy" { } break; case 2381: /* Line 1455 of yacc.c */ -#line 13819 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13831 "/home/buildbot/git/sql/sql_yacc.yy" { thr_lock_type lock_type= (thr_lock_type) (yyvsp[(3) - (3)].num); bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE); @@ -38651,21 +38669,21 @@ case 2382: /* Line 1455 of yacc.c */ -#line 13833 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13845 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= TL_READ_NO_INSERT; } break; case 2383: /* Line 1455 of yacc.c */ -#line 13834 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13846 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= TL_WRITE_DEFAULT; } break; case 2384: /* Line 1455 of yacc.c */ -#line 13836 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13848 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT); } @@ -38674,21 +38692,21 @@ case 2385: /* Line 1455 of yacc.c */ -#line 13840 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13852 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= TL_WRITE_LOW_PRIORITY; } break; case 2386: /* Line 1455 of yacc.c */ -#line 13841 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13853 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= TL_READ; } break; case 2387: /* Line 1455 of yacc.c */ -#line 13846 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13858 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; @@ -38704,14 +38722,14 @@ case 2388: /* Line 1455 of yacc.c */ -#line 13857 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13869 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2389: /* Line 1455 of yacc.c */ -#line 13866 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13878 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->sphead) @@ -38728,7 +38746,7 @@ case 2390: /* Line 1455 of yacc.c */ -#line 13878 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13890 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->sphead) @@ -38745,7 +38763,7 @@ case 2391: /* Line 1455 of yacc.c */ -#line 13890 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13902 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->sphead) @@ -38770,7 +38788,7 @@ case 2392: /* Line 1455 of yacc.c */ -#line 13910 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13922 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->expr_allows_subselect= TRUE; /* Stored functions are not supported for HANDLER READ. */ @@ -38786,63 +38804,63 @@ case 2393: /* Line 1455 of yacc.c */ -#line 13923 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ident= null_lex_str; } break; case 2394: /* Line 1455 of yacc.c */ -#line 13924 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ident= (yyvsp[(1) - (2)].lex_str); } break; case 2395: /* Line 1455 of yacc.c */ -#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ha_read_mode = RFIRST; } break; case 2396: /* Line 1455 of yacc.c */ -#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ha_read_mode = RNEXT; } break; case 2397: /* Line 1455 of yacc.c */ -#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ha_read_mode = RFIRST; } break; case 2398: /* Line 1455 of yacc.c */ -#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ha_read_mode = RNEXT; } break; case 2399: /* Line 1455 of yacc.c */ -#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ha_read_mode = RPREV; } break; case 2400: /* Line 1455 of yacc.c */ -#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ha_read_mode = RLAST; } break; case 2401: /* Line 1455 of yacc.c */ -#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->ha_read_mode = RKEY; @@ -38855,56 +38873,56 @@ case 2402: /* Line 1455 of yacc.c */ -#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13958 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2403: /* Line 1455 of yacc.c */ -#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13962 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; } break; case 2404: /* Line 1455 of yacc.c */ -#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13963 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; } break; case 2405: /* Line 1455 of yacc.c */ -#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13964 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; } break; case 2406: /* Line 1455 of yacc.c */ -#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; } break; case 2407: /* Line 1455 of yacc.c */ -#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; } break; case 2408: /* Line 1455 of yacc.c */ -#line 13961 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2409: /* Line 1455 of yacc.c */ -#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_REVOKE; @@ -38915,7 +38933,7 @@ case 2410: /* Line 1455 of yacc.c */ -#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->columns.elements) @@ -38931,7 +38949,7 @@ case 2411: /* Line 1455 of yacc.c */ -#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" +#line 13995 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->columns.elements) @@ -38947,7 +38965,7 @@ case 2412: /* Line 1455 of yacc.c */ -#line 13994 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_REVOKE_ALL; } @@ -38956,7 +38974,7 @@ case 2413: /* Line 1455 of yacc.c */ -#line 13998 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->users_list.push_front ((yyvsp[(3) - (5)].lex_user)); @@ -38968,14 +38986,14 @@ case 2414: /* Line 1455 of yacc.c */ -#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14020 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2415: /* Line 1455 of yacc.c */ -#line 14014 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_GRANT; @@ -38986,7 +39004,7 @@ case 2416: /* Line 1455 of yacc.c */ -#line 14021 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->columns.elements) @@ -39002,7 +39020,7 @@ case 2417: /* Line 1455 of yacc.c */ -#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; if (lex->columns.elements) @@ -39018,7 +39036,7 @@ case 2418: /* Line 1455 of yacc.c */ -#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->users_list.push_front ((yyvsp[(3) - (6)].lex_user)); @@ -39030,14 +39048,14 @@ case 2421: /* Line 1455 of yacc.c */ -#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2422: /* Line 1455 of yacc.c */ -#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->all_privileges= 1; Lex->grant= GLOBAL_ACLS; @@ -39047,259 +39065,259 @@ case 2427: /* Line 1455 of yacc.c */ -#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->which_columns = SELECT_ACL;} break; case 2428: /* Line 1455 of yacc.c */ -#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2429: /* Line 1455 of yacc.c */ -#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->which_columns = INSERT_ACL;} break; case 2430: /* Line 1455 of yacc.c */ -#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2431: /* Line 1455 of yacc.c */ -#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->which_columns = UPDATE_ACL; } break; case 2432: /* Line 1455 of yacc.c */ -#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2433: /* Line 1455 of yacc.c */ -#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->which_columns = REFERENCES_ACL;} break; case 2434: /* Line 1455 of yacc.c */ -#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2435: /* Line 1455 of yacc.c */ -#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= DELETE_ACL;} break; case 2436: /* Line 1455 of yacc.c */ -#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2437: /* Line 1455 of yacc.c */ -#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= INDEX_ACL;} break; case 2438: /* Line 1455 of yacc.c */ -#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= ALTER_ACL;} break; case 2439: /* Line 1455 of yacc.c */ -#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= CREATE_ACL;} break; case 2440: /* Line 1455 of yacc.c */ -#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= DROP_ACL;} break; case 2441: /* Line 1455 of yacc.c */ -#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= EXECUTE_ACL;} break; case 2442: /* Line 1455 of yacc.c */ -#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= RELOAD_ACL;} break; case 2443: /* Line 1455 of yacc.c */ -#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= SHUTDOWN_ACL;} break; case 2444: /* Line 1455 of yacc.c */ -#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= PROCESS_ACL;} break; case 2445: /* Line 1455 of yacc.c */ -#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= FILE_ACL;} break; case 2446: /* Line 1455 of yacc.c */ -#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= GRANT_ACL;} break; case 2447: /* Line 1455 of yacc.c */ -#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= SHOW_DB_ACL;} break; case 2448: /* Line 1455 of yacc.c */ -#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= SUPER_ACL;} break; case 2449: /* Line 1455 of yacc.c */ -#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= CREATE_TMP_ACL;} break; case 2450: /* Line 1455 of yacc.c */ -#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= LOCK_TABLES_ACL; } break; case 2451: /* Line 1455 of yacc.c */ -#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= REPL_SLAVE_ACL; } break; case 2452: /* Line 1455 of yacc.c */ -#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= REPL_CLIENT_ACL; } break; case 2453: /* Line 1455 of yacc.c */ -#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= CREATE_VIEW_ACL; } break; case 2454: /* Line 1455 of yacc.c */ -#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= SHOW_VIEW_ACL; } break; case 2455: /* Line 1455 of yacc.c */ -#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= CREATE_PROC_ACL; } break; case 2456: /* Line 1455 of yacc.c */ -#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= ALTER_PROC_ACL; } break; case 2457: /* Line 1455 of yacc.c */ -#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= CREATE_USER_ACL; } break; case 2458: /* Line 1455 of yacc.c */ -#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= EVENT_ACL;} break; case 2459: /* Line 1455 of yacc.c */ -#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= TRIGGER_ACL; } break; case 2460: /* Line 1455 of yacc.c */ -#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= CREATE_TABLESPACE_ACL; } break; case 2461: /* Line 1455 of yacc.c */ -#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2462: /* Line 1455 of yacc.c */ -#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2465: /* Line 1455 of yacc.c */ -#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->x509_subject) @@ -39314,7 +39332,7 @@ case 2466: /* Line 1455 of yacc.c */ -#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->x509_issuer) @@ -39329,7 +39347,7 @@ case 2467: /* Line 1455 of yacc.c */ -#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (lex->ssl_cipher) @@ -39344,7 +39362,7 @@ case 2468: /* Line 1455 of yacc.c */ -#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; size_t dummy; @@ -39364,7 +39382,7 @@ case 2469: /* Line 1455 of yacc.c */ -#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->current_select->db = (yyvsp[(1) - (3)].lex_str).str; @@ -39382,7 +39400,7 @@ case 2470: /* Line 1455 of yacc.c */ -#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->current_select->db = NULL; @@ -39400,7 +39418,7 @@ case 2471: /* Line 1455 of yacc.c */ -#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (!lex->current_select->add_table_to_list(lex->thd, (yyvsp[(1) - (1)].table),NULL, @@ -39414,7 +39432,7 @@ case 2472: /* Line 1455 of yacc.c */ -#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" { if (Lex->users_list.push_back((yyvsp[(1) - (1)].lex_user))) MYSQL_YYABORT; @@ -39424,7 +39442,7 @@ case 2473: /* Line 1455 of yacc.c */ -#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" { if (Lex->users_list.push_back((yyvsp[(3) - (3)].lex_user))) MYSQL_YYABORT; @@ -39434,7 +39452,7 @@ case 2474: /* Line 1455 of yacc.c */ -#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" { if (Lex->users_list.push_back((yyvsp[(1) - (1)].lex_user))) MYSQL_YYABORT; @@ -39444,7 +39462,7 @@ case 2475: /* Line 1455 of yacc.c */ -#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" { if (Lex->users_list.push_back((yyvsp[(3) - (3)].lex_user))) MYSQL_YYABORT; @@ -39454,7 +39472,7 @@ case 2480: /* Line 1455 of yacc.c */ -#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_user)=(yyvsp[(1) - (4)].lex_user); (yyvsp[(1) - (4)].lex_user)->password=(yyvsp[(4) - (4)].lex_str); if ((yyvsp[(4) - (4)].lex_str).length) @@ -39486,7 +39504,7 @@ case 2481: /* Line 1455 of yacc.c */ -#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14283 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_user)= (yyvsp[(1) - (5)].lex_user); (yyvsp[(1) - (5)].lex_user)->password= (yyvsp[(5) - (5)].lex_str); @@ -39496,7 +39514,7 @@ case 2482: /* Line 1455 of yacc.c */ -#line 14276 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14288 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_user)= (yyvsp[(1) - (4)].lex_user); (yyvsp[(1) - (4)].lex_user)->plugin= (yyvsp[(4) - (4)].lex_str); @@ -39507,7 +39525,7 @@ case 2483: /* Line 1455 of yacc.c */ -#line 14282 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14294 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_user)= (yyvsp[(1) - (6)].lex_user); (yyvsp[(1) - (6)].lex_user)->plugin= (yyvsp[(4) - (6)].lex_str); @@ -39518,14 +39536,14 @@ case 2484: /* Line 1455 of yacc.c */ -#line 14288 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14300 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.lex_user)= (yyvsp[(1) - (1)].lex_user); (yyvsp[(1) - (1)].lex_user)->password= null_lex_str; } break; case 2485: /* Line 1455 of yacc.c */ -#line 14293 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14305 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->grant |= lex->which_columns; @@ -39535,7 +39553,7 @@ case 2489: /* Line 1455 of yacc.c */ -#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14319 "/home/buildbot/git/sql/sql_yacc.yy" { String *new_str = new (thd->mem_root) String((const char*) (yyvsp[(1) - (1)].lex_str).str,(yyvsp[(1) - (1)].lex_str).length,system_charset_info); if (new_str == NULL) @@ -39565,7 +39583,7 @@ case 2491: /* Line 1455 of yacc.c */ -#line 14336 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14348 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ssl_type=SSL_TYPE_SPECIFIED; } @@ -39574,7 +39592,7 @@ case 2492: /* Line 1455 of yacc.c */ -#line 14340 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14352 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ssl_type=SSL_TYPE_ANY; } @@ -39583,7 +39601,7 @@ case 2493: /* Line 1455 of yacc.c */ -#line 14344 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14356 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ssl_type=SSL_TYPE_X509; } @@ -39592,7 +39610,7 @@ case 2494: /* Line 1455 of yacc.c */ -#line 14348 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14360 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->ssl_type=SSL_TYPE_NONE; } @@ -39601,49 +39619,49 @@ case 2495: /* Line 1455 of yacc.c */ -#line 14354 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14366 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2497: /* Line 1455 of yacc.c */ -#line 14359 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14371 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2498: /* Line 1455 of yacc.c */ -#line 14360 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14372 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= GRANT_ACL;} break; case 2499: /* Line 1455 of yacc.c */ -#line 14364 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14376 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2500: /* Line 1455 of yacc.c */ -#line 14365 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14377 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2501: /* Line 1455 of yacc.c */ -#line 14369 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14381 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->grant |= GRANT_ACL;} break; case 2502: /* Line 1455 of yacc.c */ -#line 14371 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14383 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->mqh.questions=(yyvsp[(2) - (2)].ulong_num); @@ -39654,7 +39672,7 @@ case 2503: /* Line 1455 of yacc.c */ -#line 14377 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14389 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->mqh.updates=(yyvsp[(2) - (2)].ulong_num); @@ -39665,7 +39683,7 @@ case 2504: /* Line 1455 of yacc.c */ -#line 14383 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14395 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->mqh.conn_per_hour= (yyvsp[(2) - (2)].ulong_num); @@ -39676,7 +39694,7 @@ case 2505: /* Line 1455 of yacc.c */ -#line 14389 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14401 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->mqh.user_conn= (yyvsp[(2) - (2)].num); @@ -39687,7 +39705,7 @@ case 2506: /* Line 1455 of yacc.c */ -#line 14398 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14410 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command = SQLCOM_BEGIN; @@ -39698,84 +39716,84 @@ case 2507: /* Line 1455 of yacc.c */ -#line 14403 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14415 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2508: /* Line 1455 of yacc.c */ -#line 14407 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2509: /* Line 1455 of yacc.c */ -#line 14408 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2510: /* Line 1455 of yacc.c */ -#line 14413 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14425 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.m_yes_no_unk)= TVL_UNKNOWN; } break; case 2511: /* Line 1455 of yacc.c */ -#line 14414 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14426 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.m_yes_no_unk)= TVL_NO; } break; case 2512: /* Line 1455 of yacc.c */ -#line 14415 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.m_yes_no_unk)= TVL_YES; } break; case 2513: /* Line 1455 of yacc.c */ -#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14432 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.m_yes_no_unk)= TVL_UNKNOWN; } break; case 2514: /* Line 1455 of yacc.c */ -#line 14421 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14433 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.m_yes_no_unk)= TVL_YES; } break; case 2515: /* Line 1455 of yacc.c */ -#line 14422 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14434 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.m_yes_no_unk)= TVL_NO; } break; case 2516: /* Line 1455 of yacc.c */ -#line 14426 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14438 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2517: /* Line 1455 of yacc.c */ -#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14439 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2518: /* Line 1455 of yacc.c */ -#line 14432 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14444 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_COMMIT; @@ -39789,7 +39807,7 @@ case 2519: /* Line 1455 of yacc.c */ -#line 14444 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14456 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_ROLLBACK; @@ -39803,7 +39821,7 @@ case 2520: /* Line 1455 of yacc.c */ -#line 14454 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14466 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT; @@ -39814,7 +39832,7 @@ case 2521: /* Line 1455 of yacc.c */ -#line 14463 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14475 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_SAVEPOINT; @@ -39825,7 +39843,7 @@ case 2522: /* Line 1455 of yacc.c */ -#line 14472 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14484 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; lex->sql_command= SQLCOM_RELEASE_SAVEPOINT; @@ -39836,14 +39854,14 @@ case 2523: /* Line 1455 of yacc.c */ -#line 14485 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14497 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2525: /* Line 1455 of yacc.c */ -#line 14491 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14503 "/home/buildbot/git/sql/sql_yacc.yy" { if (add_select_to_union_list(Lex, (bool)(yyvsp[(2) - (2)].num), TRUE)) MYSQL_YYABORT; @@ -39853,7 +39871,7 @@ case 2526: /* Line 1455 of yacc.c */ -#line 14496 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14508 "/home/buildbot/git/sql/sql_yacc.yy" { /* Remove from the name resolution context stack the context of the @@ -39866,42 +39884,42 @@ case 2527: /* Line 1455 of yacc.c */ -#line 14506 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14518 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 0; } break; case 2528: /* Line 1455 of yacc.c */ -#line 14507 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14519 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 1; } break; case 2529: /* Line 1455 of yacc.c */ -#line 14508 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14520 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)= 1; } break; case 2530: /* Line 1455 of yacc.c */ -#line 14512 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14524 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.is_not_empty)= false; } break; case 2531: /* Line 1455 of yacc.c */ -#line 14513 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14525 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.is_not_empty)= true; } break; case 2532: /* Line 1455 of yacc.c */ -#line 14517 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14529 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); @@ -39921,7 +39939,7 @@ case 2533: /* Line 1455 of yacc.c */ -#line 14532 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14544 "/home/buildbot/git/sql/sql_yacc.yy" { thd->lex->current_select->no_table_names_allowed= 0; thd->where= ""; @@ -39931,28 +39949,28 @@ case 2536: /* Line 1455 of yacc.c */ -#line 14544 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14556 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)=1; } break; case 2537: /* Line 1455 of yacc.c */ -#line 14545 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14557 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)=1; } break; case 2538: /* Line 1455 of yacc.c */ -#line 14546 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14558 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.num)=0; } break; case 2539: /* Line 1455 of yacc.c */ -#line 14551 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14563 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.select_lex)= Lex->current_select->master_unit()->first_select(); } @@ -39961,7 +39979,7 @@ case 2540: /* Line 1455 of yacc.c */ -#line 14555 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14567 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.select_lex)= Lex->current_select->master_unit()->first_select(); } @@ -39970,7 +39988,7 @@ case 2542: /* Line 1455 of yacc.c */ -#line 14564 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14576 "/home/buildbot/git/sql/sql_yacc.yy" { if (add_select_to_union_list(Lex, (bool)(yyvsp[(3) - (3)].num), FALSE)) MYSQL_YYABORT; @@ -39980,7 +39998,7 @@ case 2543: /* Line 1455 of yacc.c */ -#line 14570 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14582 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->pop_context(); (yyval.select_lex)= (yyvsp[(1) - (6)].select_lex); @@ -39990,7 +40008,7 @@ case 2544: /* Line 1455 of yacc.c */ -#line 14579 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14591 "/home/buildbot/git/sql/sql_yacc.yy" { (yyval.select_lex)= (yyvsp[(2) - (3)].select_lex); } @@ -39999,7 +40017,7 @@ case 2545: /* Line 1455 of yacc.c */ -#line 14585 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14597 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; if (!lex->expr_allows_subselect || @@ -40023,7 +40041,7 @@ case 2546: /* Line 1455 of yacc.c */ -#line 14606 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14618 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex=Lex; @@ -40051,14 +40069,14 @@ case 2551: /* Line 1455 of yacc.c */ -#line 14641 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14653 "/home/buildbot/git/sql/sql_yacc.yy" { Select->options|= SELECT_STRAIGHT_JOIN; } break; case 2552: /* Line 1455 of yacc.c */ -#line 14643 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14655 "/home/buildbot/git/sql/sql_yacc.yy" { if (check_simple_select()) MYSQL_YYABORT; @@ -40071,28 +40089,28 @@ case 2553: /* Line 1455 of yacc.c */ -#line 14650 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14662 "/home/buildbot/git/sql/sql_yacc.yy" { Select->options|= SELECT_DISTINCT; } break; case 2554: /* Line 1455 of yacc.c */ -#line 14651 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14663 "/home/buildbot/git/sql/sql_yacc.yy" { Select->options|= SELECT_SMALL_RESULT; } break; case 2555: /* Line 1455 of yacc.c */ -#line 14652 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14664 "/home/buildbot/git/sql/sql_yacc.yy" { Select->options|= SELECT_BIG_RESULT; } break; case 2556: /* Line 1455 of yacc.c */ -#line 14654 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14666 "/home/buildbot/git/sql/sql_yacc.yy" { if (check_simple_select()) MYSQL_YYABORT; @@ -40103,7 +40121,7 @@ case 2557: /* Line 1455 of yacc.c */ -#line 14660 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14672 "/home/buildbot/git/sql/sql_yacc.yy" { if (check_simple_select()) MYSQL_YYABORT; @@ -40114,35 +40132,35 @@ case 2558: /* Line 1455 of yacc.c */ -#line 14665 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14677 "/home/buildbot/git/sql/sql_yacc.yy" { Select->options|= SELECT_ALL; } break; case 2559: /* Line 1455 of yacc.c */ -#line 14676 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14688 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2560: /* Line 1455 of yacc.c */ -#line 14678 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14690 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2561: /* Line 1455 of yacc.c */ -#line 14680 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14692 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2575: /* Line 1455 of yacc.c */ -#line 14713 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14725 "/home/buildbot/git/sql/sql_yacc.yy" { /* We have to distinguish missing DEFINER-clause from case when @@ -40158,7 +40176,7 @@ case 2576: /* Line 1455 of yacc.c */ -#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14739 "/home/buildbot/git/sql/sql_yacc.yy" { thd->lex->definer= get_current_user(thd, (yyvsp[(3) - (3)].lex_user)); } @@ -40167,77 +40185,77 @@ case 2577: /* Line 1455 of yacc.c */ -#line 14740 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14752 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2578: /* Line 1455 of yacc.c */ -#line 14742 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14754 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2579: /* Line 1455 of yacc.c */ -#line 14744 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14756 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2580: /* Line 1455 of yacc.c */ -#line 14749 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14761 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_mode= VIEW_CREATE_OR_REPLACE; } break; case 2581: /* Line 1455 of yacc.c */ -#line 14754 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14766 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; } break; case 2582: /* Line 1455 of yacc.c */ -#line 14756 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14768 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; } break; case 2583: /* Line 1455 of yacc.c */ -#line 14758 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14770 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; } break; case 2584: /* Line 1455 of yacc.c */ -#line 14763 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14775 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_suid= VIEW_SUID_DEFAULT; } break; case 2585: /* Line 1455 of yacc.c */ -#line 14765 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14777 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_suid= VIEW_SUID_DEFINER; } break; case 2586: /* Line 1455 of yacc.c */ -#line 14767 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14779 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_suid= VIEW_SUID_INVOKER; } break; case 2587: /* Line 1455 of yacc.c */ -#line 14772 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14784 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; lex->sql_command= SQLCOM_CREATE_VIEW; @@ -40254,14 +40272,14 @@ case 2589: /* Line 1455 of yacc.c */ -#line 14788 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14800 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2591: /* Line 1455 of yacc.c */ -#line 14794 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14806 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->view_list.push_back((LEX_STRING*) sql_memdup(&(yyvsp[(1) - (1)].lex_str), sizeof(LEX_STRING))); @@ -40271,7 +40289,7 @@ case 2592: /* Line 1455 of yacc.c */ -#line 14799 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14811 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->view_list.push_back((LEX_STRING*) sql_memdup(&(yyvsp[(3) - (3)].lex_str), sizeof(LEX_STRING))); @@ -40281,7 +40299,7 @@ case 2593: /* Line 1455 of yacc.c */ -#line 14806 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14818 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->parsing_options.allows_variable= FALSE; @@ -40295,7 +40313,7 @@ case 2594: /* Line 1455 of yacc.c */ -#line 14815 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14827 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str; @@ -40313,35 +40331,35 @@ case 2597: /* Line 1455 of yacc.c */ -#line 14836 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14848 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_check= VIEW_CHECK_NONE; } break; case 2598: /* Line 1455 of yacc.c */ -#line 14838 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14850 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_check= VIEW_CHECK_CASCADED; } break; case 2599: /* Line 1455 of yacc.c */ -#line 14840 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14852 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_check= VIEW_CHECK_CASCADED; } break; case 2600: /* Line 1455 of yacc.c */ -#line 14842 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14854 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->create_view_check= VIEW_CHECK_LOCAL; } break; case 2601: /* Line 1455 of yacc.c */ -#line 14859 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14871 "/home/buildbot/git/sql/sql_yacc.yy" { /* $8 */ Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start(); } @@ -40350,7 +40368,7 @@ case 2602: /* Line 1455 of yacc.c */ -#line 14865 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14877 "/home/buildbot/git/sql/sql_yacc.yy" { /* $12 */ Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start(); } @@ -40359,7 +40377,7 @@ case 2603: /* Line 1455 of yacc.c */ -#line 14870 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14882 "/home/buildbot/git/sql/sql_yacc.yy" { /* $15 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -40393,7 +40411,7 @@ case 2604: /* Line 1455 of yacc.c */ -#line 14899 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14911 "/home/buildbot/git/sql/sql_yacc.yy" { /* $17 */ LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -40422,7 +40440,7 @@ case 2605: /* Line 1455 of yacc.c */ -#line 14933 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14945 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; if (is_native_function(thd, & (yyvsp[(4) - (8)].lex_str))) @@ -40443,7 +40461,7 @@ case 2606: /* Line 1455 of yacc.c */ -#line 14950 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14962 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; if (is_native_function(thd, & (yyvsp[(3) - (7)].lex_str))) @@ -40464,7 +40482,7 @@ case 2607: /* Line 1455 of yacc.c */ -#line 14972 "/home/buildbot/git/sql/sql_yacc.yy" +#line 14984 "/home/buildbot/git/sql/sql_yacc.yy" { /* $5 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -40499,7 +40517,7 @@ case 2608: /* Line 1455 of yacc.c */ -#line 15003 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15015 "/home/buildbot/git/sql/sql_yacc.yy" { /* $8 */ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); } @@ -40508,7 +40526,7 @@ case 2609: /* Line 1455 of yacc.c */ -#line 15007 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15019 "/home/buildbot/git/sql/sql_yacc.yy" { /* $10 */ LEX *lex= Lex; lex->charset= NULL; @@ -40522,7 +40540,7 @@ case 2610: /* Line 1455 of yacc.c */ -#line 15016 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15028 "/home/buildbot/git/sql/sql_yacc.yy" { /* $12 */ LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -40550,7 +40568,7 @@ case 2611: /* Line 1455 of yacc.c */ -#line 15039 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15051 "/home/buildbot/git/sql/sql_yacc.yy" { /* $14 */ LEX *lex= thd->lex; Lex_input_stream *lip= YYLIP; @@ -40563,7 +40581,7 @@ case 2612: /* Line 1455 of yacc.c */ -#line 15047 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15059 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; sp_head *sp= lex->sphead; @@ -40620,7 +40638,7 @@ case 2613: /* Line 1455 of yacc.c */ -#line 15102 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15114 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; sp_head *sp; @@ -40649,7 +40667,7 @@ case 2614: /* Line 1455 of yacc.c */ -#line 15126 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15138 "/home/buildbot/git/sql/sql_yacc.yy" { const char* tmp_param_begin; @@ -40662,7 +40680,7 @@ case 2615: /* Line 1455 of yacc.c */ -#line 15135 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15147 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; @@ -40674,7 +40692,7 @@ case 2616: /* Line 1455 of yacc.c */ -#line 15142 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= thd->lex; @@ -40686,7 +40704,7 @@ case 2617: /* Line 1455 of yacc.c */ -#line 15149 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15161 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; sp_head *sp= lex->sphead; @@ -40700,7 +40718,7 @@ case 2618: /* Line 1455 of yacc.c */ -#line 15163 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_XA_START; } @@ -40709,7 +40727,7 @@ case 2619: /* Line 1455 of yacc.c */ -#line 15167 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15179 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_XA_END; } @@ -40718,7 +40736,7 @@ case 2620: /* Line 1455 of yacc.c */ -#line 15171 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15183 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_XA_PREPARE; } @@ -40727,7 +40745,7 @@ case 2621: /* Line 1455 of yacc.c */ -#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15187 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_XA_COMMIT; } @@ -40736,7 +40754,7 @@ case 2622: /* Line 1455 of yacc.c */ -#line 15179 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15191 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_XA_ROLLBACK; } @@ -40745,7 +40763,7 @@ case 2623: /* Line 1455 of yacc.c */ -#line 15183 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15195 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->sql_command = SQLCOM_XA_RECOVER; } @@ -40754,7 +40772,7 @@ case 2624: /* Line 1455 of yacc.c */ -#line 15190 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15202 "/home/buildbot/git/sql/sql_yacc.yy" { MYSQL_YYABORT_UNLESS((yyvsp[(1) - (1)].string)->length() <= MAXGTRIDSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) @@ -40766,7 +40784,7 @@ case 2625: /* Line 1455 of yacc.c */ -#line 15197 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15209 "/home/buildbot/git/sql/sql_yacc.yy" { MYSQL_YYABORT_UNLESS((yyvsp[(1) - (3)].string)->length() <= MAXGTRIDSIZE && (yyvsp[(3) - (3)].string)->length() <= MAXBQUALSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) @@ -40778,7 +40796,7 @@ case 2626: /* Line 1455 of yacc.c */ -#line 15204 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15216 "/home/buildbot/git/sql/sql_yacc.yy" { MYSQL_YYABORT_UNLESS((yyvsp[(1) - (5)].string)->length() <= MAXGTRIDSIZE && (yyvsp[(3) - (5)].string)->length() <= MAXBQUALSIZE); if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) @@ -40790,84 +40808,84 @@ case 2627: /* Line 1455 of yacc.c */ -#line 15213 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15225 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2628: /* Line 1455 of yacc.c */ -#line 15214 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15226 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2629: /* Line 1455 of yacc.c */ -#line 15218 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15230 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_NONE; } break; case 2630: /* Line 1455 of yacc.c */ -#line 15219 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15231 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_JOIN; } break; case 2631: /* Line 1455 of yacc.c */ -#line 15220 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15232 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_RESUME; } break; case 2632: /* Line 1455 of yacc.c */ -#line 15224 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15236 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_NONE; } break; case 2633: /* Line 1455 of yacc.c */ -#line 15225 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15237 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_ONE_PHASE; } break; case 2634: /* Line 1455 of yacc.c */ -#line 15230 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15242 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_NONE; } break; case 2635: /* Line 1455 of yacc.c */ -#line 15232 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15244 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_SUSPEND; } break; case 2637: /* Line 1455 of yacc.c */ -#line 15237 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15249 "/home/buildbot/git/sql/sql_yacc.yy" {} break; case 2638: /* Line 1455 of yacc.c */ -#line 15238 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15250 "/home/buildbot/git/sql/sql_yacc.yy" { Lex->xa_opt=XA_FOR_MIGRATE; } break; case 2639: /* Line 1455 of yacc.c */ -#line 15243 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15255 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_INSTALL_PLUGIN; @@ -40879,7 +40897,7 @@ case 2640: /* Line 1455 of yacc.c */ -#line 15250 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15262 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_INSTALL_PLUGIN; @@ -40891,7 +40909,7 @@ case 2641: /* Line 1455 of yacc.c */ -#line 15260 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15272 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_UNINSTALL_PLUGIN; @@ -40902,7 +40920,7 @@ case 2642: /* Line 1455 of yacc.c */ -#line 15266 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15278 "/home/buildbot/git/sql/sql_yacc.yy" { LEX *lex= Lex; lex->sql_command= SQLCOM_UNINSTALL_PLUGIN; @@ -40914,7 +40932,7 @@ case 2643: /* Line 1455 of yacc.c */ -#line 15277 "/home/buildbot/git/sql/sql_yacc.yy" +#line 15289 "/home/buildbot/git/sql/sql_yacc.yy" { YYERROR; } @@ -40923,7 +40941,7 @@ /* Line 1455 of yacc.c */ -#line 40927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" +#line 40945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff -Nru mariadb-5.5-5.5.44/sql/sql_yacc.yy mariadb-5.5-5.5.46/sql/sql_yacc.yy --- mariadb-5.5-5.5.44/sql/sql_yacc.yy 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/sql_yacc.yy 2015-10-09 16:50:27.000000000 +0000 @@ -10612,8 +10612,20 @@ if (add_proc_to_list(lex->thd, item)) MYSQL_YYABORT; Lex->uncacheable(UNCACHEABLE_SIDEEFFECT); + + /* + PROCEDURE CLAUSE cannot handle subquery as one of its parameter, + so set expr_allows_subselect as false to disallow any subqueries + further. Reset expr_allows_subselect back to true once the + parameters are reduced. + */ + Lex->expr_allows_subselect= false; } '(' procedure_list ')' + { + /* Subqueries are allowed from now.*/ + Lex->expr_allows_subselect= true; + } ; procedure_list: diff -Nru mariadb-5.5-5.5.44/sql/table.cc mariadb-5.5-5.5.46/sql/table.cc --- mariadb-5.5-5.5.44/sql/table.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/sql/table.cc 2015-10-09 16:50:27.000000000 +0000 @@ -5194,7 +5194,7 @@ if (item && thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY && !thd->lex->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS) { - select->non_agg_fields.push_back(item); + select->join->non_agg_fields.push_back(item); item->marker= select->cur_pos_in_select_list; select->set_non_agg_field_used(true); } diff -Nru mariadb-5.5-5.5.44/storage/innobase/btr/btr0cur.c mariadb-5.5-5.5.46/storage/innobase/btr/btr0cur.c --- mariadb-5.5-5.5.44/storage/innobase/btr/btr0cur.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/btr/btr0cur.c 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -2085,6 +2085,7 @@ ulint max_size; ulint new_rec_size; ulint old_rec_size; + ulint max_ins_size = 0; dtuple_t* new_entry; roll_ptr_t roll_ptr; trx_t* trx; @@ -2195,6 +2196,11 @@ : (old_rec_size + page_get_max_insert_size_after_reorganize(page, 1)); + if (!page_zip) { + max_ins_size = page_get_max_insert_size_after_reorganize( + page, 1); + } + if (!(((max_size >= BTR_CUR_PAGE_REORGANIZE_LIMIT) && (max_size >= new_rec_size)) || (page_get_n_recs(page) <= 1))) { @@ -2246,10 +2252,14 @@ rec = btr_cur_insert_if_possible(cursor, new_entry, 0/*n_ext*/, mtr); ut_a(rec); /* <- We calculated above the insert would fit */ - if (page_zip && !dict_index_is_clust(index) + if (!dict_index_is_clust(index) && page_is_leaf(page)) { /* Update the free bits in the insert buffer. */ - ibuf_update_free_bits_zip(block, mtr); + if (page_zip) { + ibuf_update_free_bits_zip(block, mtr); + } else { + ibuf_update_free_bits_low(block, max_ins_size, mtr); + } } /* Restore the old explicit lock state on the record */ @@ -2358,6 +2368,7 @@ ulint n_reserved; ulint n_ext; ulint* offsets = NULL; + ulint max_ins_size = 0; *big_rec = NULL; @@ -2495,6 +2506,11 @@ ut_ad(flags & BTR_KEEP_POS_FLAG); } + if (!page_zip) { + max_ins_size = page_get_max_insert_size_after_reorganize( + page, 1); + } + /* Store state of explicit locks on rec on the page infimum record, before deleting rec. The page infimum acts as a dummy carrier of the locks, taking care also of lock releases, before we can move the locks @@ -2540,10 +2556,15 @@ big_rec_vec != NULL && (flags & BTR_KEEP_POS_FLAG), mtr); - if (page_zip && !dict_index_is_clust(index) + if (!dict_index_is_clust(index) && page_is_leaf(page)) { /* Update the free bits in the insert buffer. */ - ibuf_update_free_bits_zip(block, mtr); + if (page_zip) { + ibuf_update_free_bits_zip(block, mtr); + } else { + ibuf_update_free_bits_low(block, max_ins_size, + mtr); + } } err = DB_SUCCESS; diff -Nru mariadb-5.5-5.5.44/storage/innobase/CMakeLists.txt mariadb-5.5-5.5.46/storage/innobase/CMakeLists.txt --- mariadb-5.5-5.5.44/storage/innobase/CMakeLists.txt 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/CMakeLists.txt 2015-10-09 16:50:27.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -89,6 +89,18 @@ "#include int main() { + unsigned char c; + + __atomic_test_and_set(&c, __ATOMIC_ACQUIRE); + __atomic_clear(&c, __ATOMIC_RELEASE); + return(0); + }" + HAVE_IB_GCC_ATOMIC_TEST_AND_SET + ) + CHECK_C_SOURCE_RUNS( + "#include + int main() + { __sync_synchronize(); return(0); }" @@ -110,6 +122,10 @@ ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_BUILTINS=1) ENDIF() +IF(HAVE_IB_GCC_ATOMIC_TEST_AND_SET) + ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1) +ENDIF() + IF(HAVE_IB_GCC_SYNC_SYNCHRONISE) ADD_DEFINITIONS(-DHAVE_IB_GCC_SYNC_SYNCHRONISE=1) ENDIF() diff -Nru mariadb-5.5-5.5.44/storage/innobase/dict/dict0crea.c mariadb-5.5-5.5.46/storage/innobase/dict/dict0crea.c --- mariadb-5.5-5.5.44/storage/innobase/dict/dict0crea.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/dict/dict0crea.c 2015-10-09 16:50:27.000000000 +0000 @@ -1420,6 +1420,104 @@ } /********************************************************************//** +Construct foreign key constraint defintion from data dictionary information. +*/ +UNIV_INTERN +char* +dict_foreign_def_get( +/*=================*/ + dict_foreign_t* foreign,/*!< in: foreign */ + trx_t* trx) /*!< in: trx */ +{ + char* fk_def = mem_heap_alloc(foreign->heap, 4*1024); + const char* tbname; + char tablebuf[MAX_TABLE_NAME_LEN + 1] = ""; + int i; + char* bufend; + + tbname = dict_remove_db_name(foreign->id); + bufend = innobase_convert_name(tablebuf, MAX_TABLE_NAME_LEN, + tbname, strlen(tbname), trx->mysql_thd, FALSE); + tablebuf[bufend - tablebuf] = '\0'; + + sprintf(fk_def, + (char *)"CONSTRAINT %s FOREIGN KEY (", (char *)tablebuf); + + for(i = 0; i < foreign->n_fields; i++) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->foreign_col_names[i], + strlen(foreign->foreign_col_names[i]), + trx->mysql_thd, FALSE); + strcat(fk_def, buf); + if (i < foreign->n_fields-1) { + strcat(fk_def, (char *)","); + } + } + + strcat(fk_def,(char *)") REFERENCES "); + + bufend = innobase_convert_name(tablebuf, MAX_TABLE_NAME_LEN, + foreign->referenced_table_name, + strlen(foreign->referenced_table_name), + trx->mysql_thd, TRUE); + tablebuf[bufend - tablebuf] = '\0'; + + strcat(fk_def, tablebuf); + strcat(fk_def, " ("); + + for(i = 0; i < foreign->n_fields; i++) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + bufend = innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->referenced_col_names[i], + strlen(foreign->referenced_col_names[i]), + trx->mysql_thd, FALSE); + buf[bufend - buf] = '\0'; + strcat(fk_def, buf); + if (i < foreign->n_fields-1) { + strcat(fk_def, (char *)","); + } + } + strcat(fk_def, (char *)")"); + + return fk_def; +} + +/********************************************************************//** +Convert foreign key column names from data dictionary to SQL-layer. +*/ +static +void +dict_foreign_def_get_fields( +/*========================*/ + dict_foreign_t* foreign,/*!< in: foreign */ + trx_t* trx, /*!< in: trx */ + char** field, /*!< out: foreign column */ + char** field2, /*!< out: referenced column */ + int col_no) /*!< in: column number */ +{ + char* bufend; + char* fieldbuf = mem_heap_alloc(foreign->heap, MAX_TABLE_NAME_LEN+1); + char* fieldbuf2 = mem_heap_alloc(foreign->heap, MAX_TABLE_NAME_LEN+1); + + bufend = innobase_convert_name(fieldbuf, MAX_TABLE_NAME_LEN, + foreign->foreign_col_names[col_no], + strlen(foreign->foreign_col_names[col_no]), + trx->mysql_thd, FALSE); + + fieldbuf[bufend - fieldbuf] = '\0'; + + bufend = innobase_convert_name(fieldbuf2, MAX_TABLE_NAME_LEN, + foreign->referenced_col_names[col_no], + strlen(foreign->referenced_col_names[col_no]), + trx->mysql_thd, FALSE); + + fieldbuf2[bufend - fieldbuf2] = '\0'; + *field = fieldbuf; + *field2 = fieldbuf2; +} + +/********************************************************************//** Add a single foreign key definition to the data dictionary tables in the database. We also generate names to constraints that were not named by the user. A generated constraint has a name of the format @@ -1501,6 +1599,29 @@ if (error != DB_SUCCESS) { + if (error == DB_DUPLICATE_KEY) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + char tablename[MAX_TABLE_NAME_LEN + 1] = ""; + char* fk_def; + + innobase_convert_name(tablename, MAX_TABLE_NAME_LEN, + table->name, strlen(table->name), + trx->mysql_thd, TRUE); + + innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->id, strlen(foreign->id), trx->mysql_thd, FALSE); + + fk_def = dict_foreign_def_get(foreign, trx); + + ib_push_warning(trx, error, + "Create or Alter table %s with foreign key constraint" + " failed. Foreign key constraint %s" + " already exists on data dictionary." + " Foreign key constraint names need to be unique in database." + " Error in foreign key definition: %s.", + tablename, buf, fk_def); + } + return(error); } @@ -1509,6 +1630,26 @@ i, table, foreign, trx); if (error != DB_SUCCESS) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + char tablename[MAX_TABLE_NAME_LEN + 1] = ""; + char* field=NULL; + char* field2=NULL; + char* fk_def; + + innobase_convert_name(tablename, MAX_TABLE_NAME_LEN, + table->name, strlen(table->name), + trx->mysql_thd, TRUE); + innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->id, strlen(foreign->id), trx->mysql_thd, FALSE); + fk_def = dict_foreign_def_get(foreign, trx); + dict_foreign_def_get_fields(foreign, trx, &field, &field2, i); + + ib_push_warning(trx, error, + "Create or Alter table %s with foreign key constraint" + " failed. Error adding foreign key constraint name %s" + " fields %s or %s to the dictionary." + " Error in foreign key definition: %s.", + tablename, buf, i+1, fk_def); return(error); } @@ -1593,7 +1734,7 @@ foreign = UT_LIST_GET_NEXT(foreign_list, foreign)) { error = dict_create_add_foreign_to_dictionary(&number, table, - foreign, trx); + foreign, trx); if (error != DB_SUCCESS) { diff -Nru mariadb-5.5-5.5.44/storage/innobase/dict/dict0dict.c mariadb-5.5-5.5.46/storage/innobase/dict/dict0dict.c --- mariadb-5.5-5.5.44/storage/innobase/dict/dict0dict.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/dict/dict0dict.c 2015-10-09 16:50:27.000000000 +0000 @@ -2534,8 +2534,9 @@ const ib_rbt_node_t* node = rbt_lookup(rbt, foreign->id); - if (node) { - dict_foreign_t* val = *(dict_foreign_t**) node->value; + if (node != NULL) { + dict_foreign_t* val + = *(dict_foreign_t**) node->value; if (val == foreign) { rbt_delete(rbt, foreign->id); @@ -2555,9 +2556,10 @@ if (rbt != NULL && foreign->id != NULL) { const ib_rbt_node_t* node = rbt_lookup(rbt, foreign->id); - if (node) { - dict_foreign_t* val = *(dict_foreign_t**) node->value; + if (node != NULL) { + dict_foreign_t* val + = *(dict_foreign_t**) node->value; if (val == foreign) { rbt_delete(rbt, foreign->id); @@ -2614,6 +2616,11 @@ DBUG_RETURN(NULL); } +#define DB_FOREIGN_KEY_IS_PREFIX_INDEX 200 +#define DB_FOREIGN_KEY_COL_NOT_NULL 201 +#define DB_FOREIGN_KEY_COLS_NOT_EQUAL 202 +#define DB_FOREIGN_KEY_INDEX_NOT_FOUND 203 + /*********************************************************************//** Tries to find an index whose first fields are the columns in the array, in the same order and is not marked for deletion and is not the same @@ -2631,12 +2638,21 @@ ibool check_charsets, /*!< in: whether to check charsets. only has an effect if types_idx != NULL */ - ulint check_null) + ulint check_null, /*!< in: nonzero if none of the columns must be declared NOT NULL */ + ulint* error, /*!< out: error code */ + ulint* err_col_no, + /*!< out: column number where error happened */ + dict_index_t** err_index) + /*!< out: index where error happened */ { dict_index_t* index; + if (error) { + *error = DB_FOREIGN_KEY_INDEX_NOT_FOUND; + } + index = dict_table_get_first_index(table); while (index != NULL) { @@ -2662,6 +2678,12 @@ /* We do not accept column prefix indexes here */ + if (error && err_col_no && err_index) { + *error = DB_FOREIGN_KEY_IS_PREFIX_INDEX; + *err_col_no = i; + *err_index = index; + } + break; } @@ -2673,6 +2695,11 @@ if (check_null && (field->col->prtype & DATA_NOT_NULL)) { + if (error && err_col_no && err_index) { + *error = DB_FOREIGN_KEY_COL_NOT_NULL; + *err_col_no = i; + *err_index = index; + } return(NULL); } @@ -2682,6 +2709,12 @@ i), check_charsets)) { + if (error && err_col_no && err_index) { + *error = DB_FOREIGN_KEY_COLS_NOT_EQUAL; + *err_col_no = i; + *err_index = index; + } + break; } } @@ -2689,6 +2722,10 @@ if (i == n_cols) { /* We found a matching index */ + if (error) { + *error = DB_SUCCESS; + } + return(index); } } @@ -2720,7 +2757,7 @@ foreign->foreign_table, foreign->foreign_col_names, foreign->n_fields, foreign->foreign_index, TRUE, /* check types */ - FALSE/* allow columns to be NULL */)); + FALSE/* allow columns to be NULL */, NULL, NULL, NULL)); } #endif /* !UNIV_HOTBACKUP */ @@ -2883,11 +2920,15 @@ } if (for_in_cache->referenced_table == NULL && ref_table) { + ulint index_error; + ulint err_col; + dict_index_t *err_index=NULL; + index = dict_foreign_find_index( ref_table, for_in_cache->referenced_col_names, for_in_cache->n_fields, for_in_cache->foreign_index, - check_charsets, FALSE); + check_charsets, FALSE, &index_error, &err_col, &err_index); if (index == NULL && !(ignore_err & DICT_ERR_IGNORE_FK_NOKEY)) { @@ -2919,6 +2960,9 @@ } if (for_in_cache->foreign_table == NULL && for_table) { + ulint index_error; + ulint err_col; + dict_index_t* err_index=NULL; index = dict_foreign_find_index( for_table, @@ -2927,7 +2971,8 @@ for_in_cache->referenced_index, check_charsets, for_in_cache->type & (DICT_FOREIGN_ON_DELETE_SET_NULL - | DICT_FOREIGN_ON_UPDATE_SET_NULL)); + | DICT_FOREIGN_ON_UPDATE_SET_NULL), + &index_error, &err_col, &err_index); if (index == NULL && !(ignore_err & DICT_ERR_IGNORE_FK_NOKEY)) { @@ -3538,6 +3583,8 @@ void dict_foreign_report_syntax_err( /*===========================*/ + const char* fmt, /*!< in: syntax err msg */ + const char* oper, /*!< in: operation */ const char* name, /*!< in: table name */ const char* start_of_latest_foreign, /*!< in: start of the foreign key clause @@ -3548,12 +3595,102 @@ mutex_enter(&dict_foreign_err_mutex); dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nSyntax error close to:\n%s\n", - start_of_latest_foreign, ptr); + fprintf(ef, fmt, oper, name, start_of_latest_foreign, ptr); mutex_exit(&dict_foreign_err_mutex); } /*********************************************************************//** +Push warning message to SQL-layer based on foreign key constraint +index match error. */ +static +void +dict_foreign_push_index_error( +/*==========================*/ + trx_t* trx, /*!< in: trx */ + const char* operation, /*!< in: operation create or alter + */ + const char* create_name, /*!< in: table name in create or + alter table */ + const char* latest_foreign, /*!< in: start of latest foreign key + constraint name */ + const char** columns, /*!< in: foreign key columns */ + ulint index_error, /*!< in: error code */ + ulint err_col, /*!< in: column where error happened + */ + dict_index_t* err_index, /*!< in: index where error happened + */ + dict_table_t* table, /*!< in: table */ + FILE* ef) /*!< in: output stream */ +{ + switch (index_error) { + case DB_FOREIGN_KEY_INDEX_NOT_FOUND: { + fprintf(ef, + "%s table '%s' with foreign key constraint" + " failed. There is no index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.\n", + operation, create_name, latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table '%s' with foreign key constraint" + " failed. There is no index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.", + operation, create_name, latest_foreign); + break; + } + case DB_FOREIGN_KEY_IS_PREFIX_INDEX: { + fprintf(ef, + "%s table '%s' with foreign key constraint" + " failed. There is only prefix index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.\n", + operation, create_name, latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table '%s' with foreign key constraint" + " failed. There is only prefix index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.", + operation, create_name, latest_foreign); + break; + } + case DB_FOREIGN_KEY_COL_NOT_NULL: { + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but " + "field %s on index is defined as NOT NULL close to %s\n", + operation, create_name, columns[err_col], latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but " + "field %s on index is defined as NOT NULL close to %s", + operation, create_name, columns[err_col], latest_foreign); + break; + } + case DB_FOREIGN_KEY_COLS_NOT_EQUAL: { + dict_field_t* field; + const char* col_name; + field = dict_index_get_nth_field(err_index, err_col); + + col_name = dict_table_get_col_name( + table, dict_col_get_no(field->col)); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Field type or character set for column %s " + "does not mach referenced column %s close to %s\n", + operation, create_name, columns[err_col], col_name, latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Field type or character set for column %s " + "does not mach referenced column %s close to %s", + operation, create_name, columns[err_col], col_name, latest_foreign); + break; + } + default: + ut_error; + } +} + +/*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function should be called after the indexes for a table have been created. Each foreign key constraint must @@ -3581,15 +3718,20 @@ DB_CANNOT_ADD_CONSTRAINT if any foreign keys are found. */ { - dict_table_t* table; - dict_table_t* referenced_table; - dict_table_t* table_to_alter; + dict_table_t* table = NULL; + dict_table_t* referenced_table = NULL; + dict_table_t* table_to_alter = NULL; + dict_table_t* table_to_create = NULL; ulint highest_id_so_far = 0; - dict_index_t* index; - dict_foreign_t* foreign; + dict_index_t* index = NULL; + dict_foreign_t* foreign = NULL; const char* ptr = sql_string; const char* start_of_latest_foreign = sql_string; + const char* start_of_latest_set = NULL; FILE* ef = dict_foreign_err_file; + ulint index_error = DB_SUCCESS; + dict_index_t* err_index = NULL; + ulint err_col; const char* constraint_name; ibool success; ulint error; @@ -3602,29 +3744,68 @@ ulint n_on_updates; const dict_col_t*columns[500]; const char* column_names[500]; + const char* ref_column_names[500]; const char* referenced_table_name; + const char* create_table_name; + const char* orig; + char create_name[MAX_TABLE_NAME_LEN + 1]; + const char operation[8]; ut_ad(mutex_own(&(dict_sys->mutex))); table = dict_table_get_low(name, DICT_ERR_IGNORE_NONE); + /* First check if we are actually doing an ALTER TABLE, and in that + case look for the table being altered */ + ptr = dict_accept(cs, ptr, "ALTER", &success); + + strcpy((char *)operation, success ? "Alter " : "Create "); + + if (!success) { + orig = ptr; + ptr = dict_scan_to(ptr, "CREATE"); + ptr = dict_scan_to(ptr, "TABLE"); + ptr = dict_accept(cs, ptr, "TABLE", &success); + + if (success) { + ptr = dict_scan_table_name(cs, ptr, &table_to_create, name, + &success, heap, &create_table_name); + } + + if (success) { + char *bufend; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + create_table_name, strlen(create_table_name), + trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + ptr = orig; + } else { + char *bufend; + ptr = orig; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + name, strlen(name), trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + } + + goto loop; + } if (table == NULL) { mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, - "Cannot find the table in the internal" - " data dictionary of InnoDB.\n" - "Create table statement:\n%s\n", sql_string); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.\n", + operation, create_name, create_name, start_of_latest_foreign); mutex_exit(&dict_foreign_err_mutex); - + ib_push_warning(trx, DB_ERROR, + "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.", + operation, create_name, create_name, start_of_latest_foreign); return(DB_ERROR); } - /* First check if we are actually doing an ALTER TABLE, and in that - case look for the table being altered */ - - ptr = dict_accept(cs, ptr, "ALTER", &success); - + /* If not alter table jump to loop */ if (!success) { goto loop; @@ -3639,13 +3820,40 @@ /* We are doing an ALTER TABLE: scan the table name we are altering */ + orig = ptr; ptr = dict_scan_table_name(cs, ptr, &table_to_alter, name, &success, heap, &referenced_table_name); + + if (table_to_alter) { + char *bufend; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + table_to_alter->name, strlen(table_to_alter->name), + trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + } else { + char *bufend; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + referenced_table_name, strlen(referenced_table_name), + trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + + } + if (!success) { - fprintf(stderr, - "InnoDB: Error: could not find" - " the table being ALTERED in:\n%s\n", - sql_string); + mutex_enter(&dict_foreign_err_mutex); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.\n", + operation, create_name, create_name, orig); + mutex_exit(&dict_foreign_err_mutex); + + ib_push_warning(trx, DB_ERROR, + "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.", + operation, create_name, create_name, orig); return(DB_ERROR); } @@ -3711,7 +3919,19 @@ if so, immediately reject the command if the table is a temporary one. For now, this kludge will work. */ if (reject_fks && (UT_LIST_GET_LEN(table->foreign_list) > 0)) { + mutex_enter(&dict_foreign_err_mutex); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, "%s table %s with foreign key constraint" + " failed. Temporary tables can't have foreign key constraints." + " Error close to %s.\n", + operation, create_name, start_of_latest_foreign); + mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Temporary tables can't have foreign key constraints." + " Error close to %s.", + operation, create_name, start_of_latest_foreign); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3747,11 +3967,21 @@ if (!success) { /* MySQL allows also an index id before the '('; we skip it */ + orig = ptr; ptr = dict_skip_word(cs, ptr, &success); if (!success) { dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3771,15 +4001,26 @@ /* Scan the columns in the first list */ col_loop1: ut_a(i < (sizeof column_names) / sizeof *column_names); + orig = ptr; ptr = dict_scan_col(cs, ptr, &success, table, columns + i, heap, column_names + i); if (!success) { mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nCannot resolve column name close to:\n%s\n", - start_of_latest_foreign, ptr); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3791,11 +4032,22 @@ goto col_loop1; } + orig = ptr; ptr = dict_accept(cs, ptr, ")", &success); if (!success) { dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3803,27 +4055,41 @@ as the first fields and in the right order */ index = dict_foreign_find_index(table, column_names, i, - NULL, TRUE, FALSE); + NULL, TRUE, FALSE, &index_error, &err_col, &err_index); if (!index) { mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); + dict_foreign_error_report_low(ef, create_name); fputs("There is no index in table ", ef); - ut_print_name(ef, NULL, TRUE, name); + ut_print_name(ef, NULL, TRUE, create_name); fprintf(ef, " where the columns appear\n" "as the first columns. Constraint:\n%s\n" "See " REFMAN "innodb-foreign-key-constraints.html\n" "for correct foreign key definition.\n", start_of_latest_foreign); - mutex_exit(&dict_foreign_err_mutex); - return(DB_CHILD_NO_INDEX); + dict_foreign_push_index_error(trx, operation, create_name, start_of_latest_foreign, + column_names, index_error, err_col, err_index, table, ef); + + mutex_exit(&dict_foreign_err_mutex); + return(DB_CANNOT_ADD_CONSTRAINT); } + + orig = ptr; ptr = dict_accept(cs, ptr, "REFERENCES", &success); if (!success || !my_isspace(cs, *ptr)) { dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3872,24 +4138,50 @@ checking of foreign key constraints! */ if (!success || (!referenced_table && trx->check_foreigns)) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + char* bufend; + + bufend = innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + referenced_table_name, strlen(referenced_table_name), + trx->mysql_thd, TRUE); + buf[bufend - buf] = '\0'; + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary " + "close to %s.", + operation, create_name, buf, start_of_latest_foreign); + dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nCannot resolve table name close to:\n" - "%s\n", - start_of_latest_foreign, ptr); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary " + "close to %s.\n", + operation, create_name, buf, start_of_latest_foreign); + mutex_exit(&dict_foreign_err_mutex); return(DB_CANNOT_ADD_CONSTRAINT); } + orig = ptr; ptr = dict_accept(cs, ptr, "(", &success); if (!success) { dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3897,20 +4189,29 @@ i = 0; col_loop2: + orig = ptr; ptr = dict_scan_col(cs, ptr, &success, referenced_table, columns + i, - heap, column_names + i); + heap, ref_column_names + i); i++; if (!success) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nCannot resolve column name close to:\n" - "%s\n", - start_of_latest_foreign, ptr); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3920,13 +4221,25 @@ goto col_loop2; } + orig = ptr; ptr = dict_accept(cs, ptr, ")", &success); if (!success || foreign->n_fields != i) { + + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s. Too few referenced columns.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s. Too few referenced columns, you have %d when you should have %d.", + operation, create_name, start_of_latest_foreign, orig, i, foreign->n_fields); + dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3936,6 +4249,7 @@ scan_on_conditions: /* Loop here as long as we can find ON ... conditions */ + start_of_latest_set = ptr; ptr = dict_accept(cs, ptr, "ON", &success); if (!success) { @@ -3946,13 +4260,24 @@ ptr = dict_accept(cs, ptr, "DELETE", &success); if (!success) { + orig = ptr; ptr = dict_accept(cs, ptr, "UPDATE", &success); if (!success) { dict_foreign_free(foreign); dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3984,12 +4309,22 @@ ptr = dict_accept(cs, ptr, "NO", &success); if (success) { + orig = ptr; ptr = dict_accept(cs, ptr, "ACTION", &success); if (!success) { dict_foreign_free(foreign); dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4003,42 +4338,73 @@ goto scan_on_conditions; } + orig = ptr; ptr = dict_accept(cs, ptr, "SET", &success); if (!success) { dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + return(DB_CANNOT_ADD_CONSTRAINT); } + orig = ptr; ptr = dict_accept(cs, ptr, "NULL", &success); if (!success) { dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); return(DB_CANNOT_ADD_CONSTRAINT); } for (j = 0; j < foreign->n_fields; j++) { if ((dict_index_get_nth_col(foreign->foreign_index, j)->prtype) & DATA_NOT_NULL) { + const dict_col_t* col + = dict_index_get_nth_col(foreign->foreign_index, j); + const char* col_name = dict_table_get_col_name(foreign->foreign_index->table, + dict_col_get_no(col)); /* It is not sensible to define SET NULL if the column is not allowed to be NULL! */ - dict_foreign_free(foreign); - mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\n" - "You have defined a SET NULL condition" - " though some of the\n" - "columns are defined as NOT NULL.\n", - start_of_latest_foreign); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but column %s is defined as NOT NULL" + " in %s close to %s.\n", + operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set); mutex_exit(&dict_foreign_err_mutex); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but column %s is defined as NOT NULL" + " in %s close to %s.", + operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set); + + dict_foreign_free(foreign); return(DB_CANNOT_ADD_CONSTRAINT); } } @@ -4055,16 +4421,22 @@ if (n_on_deletes > 1 || n_on_updates > 1) { /* It is an error to define more than 1 action */ - dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\n" - "You have twice an ON DELETE clause" - " or twice an ON UPDATE clause.\n", - start_of_latest_foreign); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. You have more than one on delete or on update clause" + " in %s close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. You have more than one on delete or on update clause" + " in %s close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + dict_foreign_free(foreign); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4074,13 +4446,13 @@ if (referenced_table) { index = dict_foreign_find_index(referenced_table, - column_names, i, - foreign->foreign_index, - TRUE, FALSE); + ref_column_names, i, + foreign->foreign_index, + TRUE, FALSE, &index_error, &err_col, &err_index); if (!index) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); + dict_foreign_error_report_low(ef, create_name); fprintf(ef, "%s:\n" "Cannot find an index in the" " referenced table where the\n" @@ -4098,9 +4470,13 @@ "innodb-foreign-key-constraints.html\n" "for correct foreign key definition.\n", start_of_latest_foreign); + + dict_foreign_push_index_error(trx, operation, create_name, start_of_latest_foreign, + column_names, index_error, err_col, err_index, referenced_table, ef); + mutex_exit(&dict_foreign_err_mutex); - return(DB_PARENT_NO_INDEX); + return(DB_CANNOT_ADD_CONSTRAINT); } } else { ut_a(trx->check_foreigns == FALSE); @@ -4118,7 +4494,7 @@ i * sizeof(void*)); for (i = 0; i < foreign->n_fields; i++) { foreign->referenced_col_names[i] - = mem_heap_strdup(foreign->heap, column_names[i]); + = mem_heap_strdup(foreign->heap, ref_column_names[i]); } /* We found an ok constraint definition: add to the lists */ @@ -5251,7 +5627,8 @@ foreign->referenced_table, foreign->referenced_col_names, foreign->n_fields, index, - /*check_charsets=*/TRUE, /*check_null=*/FALSE); + /*check_charsets=*/TRUE, /*check_null=*/FALSE, + NULL, NULL, NULL); ut_ad(new_index || !trx->check_foreigns); ut_ad(!new_index || new_index->table == index->table); diff -Nru mariadb-5.5-5.5.44/storage/innobase/handler/ha_innodb.cc mariadb-5.5-5.5.46/storage/innobase/handler/ha_innodb.cc --- mariadb-5.5-5.5.44/storage/innobase/handler/ha_innodb.cc 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/handler/ha_innodb.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1597,6 +1597,7 @@ if (trx == NULL) { trx = innobase_trx_allocate(thd); + thd_set_ha_data(thd, innodb_hton_ptr, trx); } else if (UNIV_UNLIKELY(trx->magic_n != TRX_MAGIC_N)) { mem_analyze_corruption(trx); ut_error; @@ -12303,3 +12304,29 @@ " ROW_FORMAT=COMPRESSED ": "" , prefix ? DICT_MAX_FIXED_COL_LEN : 0); } + +/********************************************************************//** +Helper function to push warnings from InnoDB internals to SQL-layer. */ +extern "C" UNIV_INTERN +void +ib_push_warning( + trx_t* trx, /*!< in: trx */ + ulint error, /*!< in: error code to push as warning */ + const char *format,/*!< in: warning message */ + ...) +{ + va_list args; + THD *thd = (THD *)trx->mysql_thd; + char *buf; +#define MAX_BUF_SIZE 4*1024 + + va_start(args, format); + buf = (char *)my_malloc(MAX_BUF_SIZE, MYF(MY_WME)); + vsprintf(buf,format, args); + + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + convert_error_code_to_mysql(error, 0, thd), + buf); + my_free(buf); + va_end(args); +} diff -Nru mariadb-5.5-5.5.44/storage/innobase/include/dict0crea.h mariadb-5.5-5.5.46/storage/innobase/include/dict0crea.h --- mariadb-5.5-5.5.44/storage/innobase/include/dict0crea.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/include/dict0crea.h 2015-10-09 16:50:27.000000000 +0000 @@ -106,6 +106,17 @@ ulint dict_create_or_check_foreign_constraint_tables(void); /*================================================*/ + +/********************************************************************//** +Construct foreign key constraint defintion from data dictionary information. +*/ +UNIV_INTERN +char* +dict_foreign_def_get( +/*=================*/ + dict_foreign_t* foreign,/*!< in: foreign */ + trx_t* trx); /*!< in: trx */ + /********************************************************************//** Adds foreign key definitions to data dictionary tables in the database. We look at table->foreign_list, and also generate names to constraints that were diff -Nru mariadb-5.5-5.5.44/storage/innobase/include/ha_prototypes.h mariadb-5.5-5.5.46/storage/innobase/include/ha_prototypes.h --- mariadb-5.5-5.5.44/storage/innobase/include/ha_prototypes.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/include/ha_prototypes.h 2015-10-09 16:50:27.000000000 +0000 @@ -326,5 +326,14 @@ const char* from, /* in: identifier to convert */ ulint len); /* in: length of 'to', in bytes */ +/********************************************************************//** +Helper function to push warnings from InnoDB internals to SQL-layer. */ +UNIV_INTERN +void +ib_push_warning( + trx_t* trx, /*!< in: trx */ + ulint error, /*!< in: error code to push as warning */ + const char *format,/*!< in: warning message */ + ...); #endif diff -Nru mariadb-5.5-5.5.44/storage/innobase/include/os0sync.h mariadb-5.5-5.5.46/storage/innobase/include/os0sync.h --- mariadb-5.5-5.5.44/storage/innobase/include/os0sync.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/include/os0sync.h 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -37,6 +37,20 @@ #include "univ.i" #include "ut0lst.h" +#if defined __i386__ || defined __x86_64__ || defined _M_IX86 \ + || defined _M_X64 || defined __WIN__ + +#define IB_STRONG_MEMORY_MODEL + +#endif /* __i386__ || __x86_64__ || _M_IX86 || M_X64 || __WIN__ */ + +#ifdef HAVE_WINDOWS_ATOMICS +typedef LONG lock_word_t; /*!< On Windows, InterlockedExchange operates + on LONG variable */ +#else +typedef byte lock_word_t; +#endif + #ifdef __WIN__ /** Native event (slow)*/ typedef HANDLE os_native_event_t; @@ -321,31 +335,61 @@ # define os_atomic_increment_ulint(ptr, amount) \ os_atomic_increment(ptr, amount) -/**********************************************************//** -Returns the old value of *ptr, atomically sets *ptr to new_val */ +# if defined(HAVE_IB_GCC_ATOMIC_TEST_AND_SET) -#if defined(__powerpc__) || defined(__aarch64__) -/* - os_atomic_test_and_set_byte_release() should imply a release barrier before - setting, and a full barrier after. But __sync_lock_test_and_set() is only - documented as an aquire barrier. So on PowerPC we need to add the full - barrier explicitly. */ -# define os_atomic_test_and_set_byte_release(ptr, new_val) \ - do { __sync_lock_release(ptr); \ - __sync_synchronize(); } while (0) -#else -/* - On x86, __sync_lock_test_and_set() happens to be full barrier, due to - LOCK prefix. -*/ -# define os_atomic_test_and_set_byte_release(ptr, new_val) \ - __sync_lock_test_and_set(ptr, (byte) new_val) -#endif -/* - os_atomic_test_and_set_byte_acquire() is a full memory barrier on x86. But - in general, just an aquire barrier should be sufficient. */ -# define os_atomic_test_and_set_byte_acquire(ptr, new_val) \ - __sync_lock_test_and_set(ptr, (byte) new_val) +/** Do an atomic test-and-set. +@param[in,out] ptr Memory location to set to non-zero +@return the previous value */ +static inline +lock_word_t +os_atomic_test_and_set(volatile lock_word_t* ptr) +{ + return(__atomic_test_and_set(ptr, __ATOMIC_ACQUIRE)); +} + +/** Do an atomic clear. +@param[in,out] ptr Memory location to set to zero */ +static inline +void +os_atomic_clear(volatile lock_word_t* ptr) +{ + __atomic_clear(ptr, __ATOMIC_RELEASE); +} + +# elif defined(IB_STRONG_MEMORY_MODEL) + +/** Do an atomic test and set. +@param[in,out] ptr Memory location to set to non-zero +@return the previous value */ +static inline +lock_word_t +os_atomic_test_and_set(volatile lock_word_t* ptr) +{ + return(__sync_lock_test_and_set(ptr, 1)); +} + +/** Do an atomic release. + +In theory __sync_lock_release should be used to release the lock. +Unfortunately, it does not work properly alone. The workaround is +that more conservative __sync_lock_test_and_set is used instead. + +Performance regression was observed at some conditions for Intel +architecture. Disable release barrier on Intel architecture for now. +@param[in,out] ptr Memory location to write to +@return the previous value */ +static inline +lock_word_t +os_atomic_clear(volatile lock_word_t* ptr) +{ + return(__sync_lock_test_and_set(ptr, 0)); +} + +# else + +# error "Unsupported platform" + +# endif /* HAVE_IB_GCC_ATOMIC_TEST_AND_SET */ #elif defined(HAVE_IB_SOLARIS_ATOMICS) @@ -394,13 +438,25 @@ # define os_atomic_increment_ulint(ptr, amount) \ atomic_add_long_nv(ptr, amount) -/**********************************************************//** -Returns the old value of *ptr, atomically sets *ptr to new_val */ - -# define os_atomic_test_and_set_byte_acquire(ptr, new_val) \ - atomic_swap_uchar(ptr, new_val) -# define os_atomic_test_and_set_byte_release(ptr, new_val) \ - atomic_swap_uchar(ptr, new_val) +/** Do an atomic xchg and set to non-zero. +@param[in,out] ptr Memory location to set to non-zero +@return the previous value */ +static inline +lock_word_t +os_atomic_test_and_set(volatile lock_word_t* ptr) +{ + return(atomic_swap_uchar(ptr, 1)); +} + +/** Do an atomic xchg and set to zero. +@param[in,out] ptr Memory location to set to zero +@return the previous value */ +static inline +lock_word_t +os_atomic_clear(volatile lock_word_t* ptr) +{ + return(atomic_swap_uchar(ptr, 0)); +} #elif defined(HAVE_WINDOWS_ATOMICS) @@ -442,15 +498,27 @@ # define os_atomic_increment_ulint(ptr, amount) \ ((ulint) (win_xchg_and_add(ptr, amount) + amount)) -/**********************************************************//** -Returns the old value of *ptr, atomically sets *ptr to new_val. -InterlockedExchange() operates on LONG, and the LONG will be -clobbered */ - -# define os_atomic_test_and_set_byte_acquire(ptr, new_val) \ - ((byte) InterlockedExchange(ptr, new_val)) -# define os_atomic_test_and_set_byte_release(ptr, new_val) \ - ((byte) InterlockedExchange(ptr, new_val)) +/** Do an atomic test and set. +InterlockedExchange() operates on LONG, and the LONG will be clobbered +@param[in,out] ptr Memory location to set to non-zero +@return the previous value */ +static inline +lock_word_t +os_atomic_test_and_set(volatile lock_word_t* ptr) +{ + return(InterlockedExchange(ptr, 1)); +} + +/** Do an atomic release. +InterlockedExchange() operates on LONG, and the LONG will be clobbered +@param[in,out] ptr Memory location to set to zero +@return the previous value */ +static inline +lock_word_t +os_atomic_clear(volatile lock_word_t* ptr) +{ + return(InterlockedExchange(ptr, 0)); +} #else # define IB_ATOMICS_STARTUP_MSG \ diff -Nru mariadb-5.5-5.5.44/storage/innobase/include/row0purge.h mariadb-5.5-5.5.46/storage/innobase/include/row0purge.h --- mariadb-5.5-5.5.44/storage/innobase/include/row0purge.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/include/row0purge.h 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -111,6 +111,17 @@ purge of a row */ }; +#ifdef UNIV_DEBUG +/***********************************************************//** +Validate the persisent cursor in the purge node. The purge node has two +references to the clustered index record - one via the ref member, and the +other via the persistent cursor. These two references must match each +other if the found_clust flag is set. +@return true if the persistent cursor is consistent with the ref member.*/ +ibool +row_purge_validate_pcur(purge_node_t* node); +#endif /* UNIV_DEBUG */ + #ifndef UNIV_NONINL #include "row0purge.ic" #endif diff -Nru mariadb-5.5-5.5.44/storage/innobase/include/sync0sync.h mariadb-5.5-5.5.46/storage/innobase/include/sync0sync.h --- mariadb-5.5-5.5.44/storage/innobase/include/sync0sync.h 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/include/sync0sync.h 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -45,13 +45,6 @@ extern my_bool timed_mutexes; #endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */ -#ifdef HAVE_WINDOWS_ATOMICS -typedef LONG lock_word_t; /*!< On Windows, InterlockedExchange operates - on LONG variable */ -#else -typedef byte lock_word_t; -#endif - #if defined UNIV_PFS_MUTEX || defined UNIV_PFS_RWLOCK /* There are mutexes/rwlocks that we want to exclude from instrumentation even if their corresponding performance schema diff -Nru mariadb-5.5-5.5.44/storage/innobase/include/sync0sync.ic mariadb-5.5-5.5.46/storage/innobase/include/sync0sync.ic --- mariadb-5.5-5.5.44/storage/innobase/include/sync0sync.ic 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/include/sync0sync.ic 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -80,7 +80,7 @@ mutex_t* mutex) /*!< in: mutex */ { #if defined(HAVE_ATOMIC_BUILTINS) - return(os_atomic_test_and_set_byte_acquire(&mutex->lock_word, 1)); + return(os_atomic_test_and_set(&mutex->lock_word)); #else ibool ret; @@ -108,10 +108,7 @@ mutex_t* mutex) /*!< in: mutex */ { #if defined(HAVE_ATOMIC_BUILTINS) - /* In theory __sync_lock_release should be used to release the lock. - Unfortunately, it does not work properly alone. The workaround is - that more conservative __sync_lock_test_and_set is used instead. */ - os_atomic_test_and_set_byte_release(&mutex->lock_word, 0); + os_atomic_clear(&mutex->lock_word); #else mutex->lock_word = 0; diff -Nru mariadb-5.5-5.5.44/storage/innobase/lock/lock0lock.c mariadb-5.5-5.5.46/storage/innobase/lock/lock0lock.c --- mariadb-5.5-5.5.44/storage/innobase/lock/lock0lock.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/lock/lock0lock.c 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2457,16 +2457,16 @@ /* If srv_locks_unsafe_for_binlog is TRUE or session is using READ COMMITTED isolation level, we do not want locks set by an UPDATE or a DELETE to be inherited as gap type locks. But we - DO want S-locks set by a consistency constraint to be inherited also - then. */ + DO want S-locks/X-locks (taken for replace) set by a consistency + constraint to be inherited also then. */ while (lock != NULL) { if (!lock_rec_get_insert_intention(lock) && !((srv_locks_unsafe_for_binlog || lock->trx->isolation_level <= TRX_ISO_READ_COMMITTED) - && lock_get_mode(lock) == LOCK_X)) { - + && lock_get_mode(lock) == + (lock->trx->duplicates ? LOCK_S : LOCK_X))) { lock_rec_add_to_queue(LOCK_REC | LOCK_GAP | lock_get_mode(lock), heir_block, heir_heap_no, diff -Nru mariadb-5.5-5.5.44/storage/innobase/os/os0file.c mariadb-5.5-5.5.46/storage/innobase/os/os0file.c --- mariadb-5.5-5.5.44/storage/innobase/os/os0file.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/os/os0file.c 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. Portions of this file contain modifications contributed and copyrighted @@ -1276,16 +1276,19 @@ #else /* __WIN__ */ os_file_t file; int create_flag; + const char* mode_str = NULL; ut_a(name); if (create_mode == OS_FILE_OPEN) { + mode_str = "OPEN"; if (access_type == OS_FILE_READ_ONLY) { create_flag = O_RDONLY; } else { create_flag = O_RDWR; } } else if (create_mode == OS_FILE_CREATE) { + mode_str = "CREATE"; create_flag = O_RDWR | O_CREAT | O_EXCL; } else { create_flag = 0; @@ -1310,6 +1313,14 @@ #endif } else { *success = TRUE; + + /* This function is always called for data files, we should + disable OS caching (O_DIRECT) here as we do in + os_file_create_func(), so we open the same file in the same + mode, see man page of open(2). */ + if (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT) { + os_file_set_nocache(file, name, mode_str); + } } return(file); diff -Nru mariadb-5.5-5.5.44/storage/innobase/row/row0purge.c mariadb-5.5-5.5.46/storage/innobase/row/row0purge.c --- mariadb-5.5-5.5.44/storage/innobase/row/row0purge.c 2015-06-09 20:25:57.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/innobase/row/row0purge.c 2015-10-09 16:50:27.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -43,6 +43,7 @@ #include "row0vers.h" #include "row0mysql.h" #include "log0log.h" +#include "rem0cmp.h" /************************************************************************* IMPORTANT NOTE: Any operation that generates redo MUST check that there @@ -80,7 +81,7 @@ /***********************************************************//** Repositions the pcur in the purge node on the clustered index record, -if found. +if found. If the record is not found, close pcur. @return TRUE if the record was found */ static ibool @@ -90,23 +91,28 @@ purge_node_t* node, /*!< in: row purge node */ mtr_t* mtr) /*!< in: mtr */ { - ibool found; - if (node->found_clust) { - found = btr_pcur_restore_position(mode, &(node->pcur), mtr); + ut_ad(row_purge_validate_pcur(node)); - return(found); - } + node->found_clust = btr_pcur_restore_position( + mode, &(node->pcur), mtr); + + } else { + + node->found_clust = row_search_on_row_ref( + &(node->pcur), mode, node->table, node->ref, mtr); - found = row_search_on_row_ref(&(node->pcur), mode, node->table, - node->ref, mtr); - node->found_clust = found; + if (node->found_clust) { + btr_pcur_store_position(&(node->pcur), mtr); + } + } - if (found) { - btr_pcur_store_position(&(node->pcur), mtr); + /* Close the current cursor if we fail to position it correctly. */ + if (!node->found_clust) { + btr_pcur_close(&node->pcur); } - return(found); + return(node->found_clust); } /***********************************************************//** @@ -143,8 +149,8 @@ if (!success) { /* The record is already removed */ - - btr_pcur_commit_specify_mtr(pcur, &mtr); + /* Persistent cursor is closed if reposition fails. */ + mtr_commit(&mtr); return(TRUE); } @@ -258,7 +264,12 @@ btr_pcur_get_rec(&node->pcur), &mtr, index, entry); - btr_pcur_commit_specify_mtr(&node->pcur, &mtr); + /* Persistent cursor is closed if reposition fails. */ + if (node->found_clust) { + btr_pcur_commit_specify_mtr(&node->pcur, &mtr); + } else { + mtr_commit(&mtr); + } return(can_delete); } @@ -806,3 +817,53 @@ return(thr); } + +#ifdef UNIV_DEBUG +/***********************************************************//** +Validate the persisent cursor in the purge node. The purge node has two +references to the clustered index record - one via the ref member, and the +other via the persistent cursor. These two references must match each +other if the found_clust flag is set. +@return true if the stored copy of persistent cursor is consistent +with the ref member.*/ +ibool +row_purge_validate_pcur( + purge_node_t* node) +{ + dict_index_t* clust_index; + ulint* offsets; + int st; + + if (!node->found_clust) { + return(TRUE); + } + + if (node->index == NULL) { + return(TRUE); + } + + if (node->pcur.old_stored != BTR_PCUR_OLD_STORED) { + return(TRUE); + } + + clust_index = node->pcur.btr_cur.index; + + offsets = rec_get_offsets(node->pcur.old_rec, clust_index, NULL, + node->pcur.old_n_fields, &node->heap); + + /* Here we are comparing the purge ref record and the stored initial + part in persistent cursor. Both cases we store n_uniq fields of the + cluster index and so it is fine to do the comparison. We note this + dependency here as pcur and ref belong to different modules. */ + st = cmp_dtuple_rec(node->ref, node->pcur.old_rec, offsets); + + if (st != 0) { + fprintf(stderr, "Purge node pcur validation failed\n"); + dtuple_print(stderr, node->ref); + rec_print(stderr, node->pcur.old_rec, clust_index); + return(FALSE); + } + + return(TRUE); +} +#endif /* UNIV_DEBUG */ diff -Nru mariadb-5.5-5.5.44/storage/perfschema/pfs_timer.cc mariadb-5.5-5.5.46/storage/perfschema/pfs_timer.cc --- mariadb-5.5-5.5.44/storage/perfschema/pfs_timer.cc 2015-06-09 20:25:58.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/perfschema/pfs_timer.cc 2015-10-09 16:50:27.000000000 +0000 @@ -1,5 +1,4 @@ -/* Copyright (c) 2008 MySQL AB, 2010 Sun Microsystems, Inc. - Use is subject to license terms. +/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -89,6 +88,46 @@ (double)pfs_timer_info.ticks.frequency); else tick_to_pico= 0; + + /* + Depending on the platform and build options, some timers may not be + available. Pick best replacements. + */ + + /* + For WAIT, the cycle timer is used by default. However, it is not available + on all architectures. Fall back to the nanosecond timer in this case. It is + unlikely that neither cycle nor nanosecond are available, but we continue + probing less resolution timers anyway for consistency with other events. + */ + if (cycle_to_pico != 0) + { + /* Normal case. */ + wait_timer= TIMER_NAME_CYCLE; + } + else if (nanosec_to_pico != 0) + { + /* Robustness, no known cases. */ + wait_timer= TIMER_NAME_NANOSEC; + } + else if (microsec_to_pico != 0) + { + /* Robustness, no known cases. */ + wait_timer= TIMER_NAME_MICROSEC; + } + else if (millisec_to_pico != 0) + { + /* Robustness, no known cases. */ + wait_timer= TIMER_NAME_MILLISEC; + } + else + { + /* + Will never be reached on any architecture, but must provide a default if + no other timers are available. + */ + wait_timer= TIMER_NAME_TICK; + } } ulonglong get_timer_value(enum_timer_name timer_name) diff -Nru mariadb-5.5-5.5.44/storage/tokudb/ft-index/util/tests/sm-basic.cc mariadb-5.5-5.5.46/storage/tokudb/ft-index/util/tests/sm-basic.cc --- mariadb-5.5-5.5.44/storage/tokudb/ft-index/util/tests/sm-basic.cc 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/ft-index/util/tests/sm-basic.cc 2015-10-09 16:50:28.000000000 +0000 @@ -0,0 +1,127 @@ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: +#ident "$Id$" +/* +COPYING CONDITIONS NOTICE: + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation, and provided that the + following conditions are met: + + * Redistributions of source code must retain this COPYING + CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the + DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the + PATENT MARKING NOTICE (below), and the PATENT RIGHTS + GRANT (below). + + * Redistributions in binary form must reproduce this COPYING + CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the + DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the + PATENT MARKING NOTICE (below), and the PATENT RIGHTS + GRANT (below) in the documentation and/or other materials + provided with the distribution. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + +COPYRIGHT NOTICE: + + TokuFT, Tokutek Fractal Tree Indexing Library. + Copyright (C) 2007-2013 Tokutek, Inc. + +DISCLAIMER: + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + +UNIVERSITY PATENT NOTICE: + + The technology is licensed by the Massachusetts Institute of + Technology, Rutgers State University of New Jersey, and the Research + Foundation of State University of New York at Stony Brook under + United States of America Serial No. 11/760379 and to the patents + and/or patent applications resulting from it. + +PATENT MARKING NOTICE: + + This software is covered by US Patent No. 8,185,551. + This software is covered by US Patent No. 8,489,638. + +PATENT RIGHTS GRANT: + + "THIS IMPLEMENTATION" means the copyrightable works distributed by + Tokutek as part of the Fractal Tree project. + + "PATENT CLAIMS" means the claims of patents that are owned or + licensable by Tokutek, both currently or in the future; and that in + the absence of this license would be infringed by THIS + IMPLEMENTATION or by using or running THIS IMPLEMENTATION. + + "PATENT CHALLENGE" shall mean a challenge to the validity, + patentability, enforceability and/or non-infringement of any of the + PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. + + Tokutek hereby grants to you, for the term and geographical scope of + the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, + irrevocable (except as stated in this section) patent license to + make, have made, use, offer to sell, sell, import, transfer, and + otherwise run, modify, and propagate the contents of THIS + IMPLEMENTATION, where such license applies only to the PATENT + CLAIMS. This grant does not include claims that would be infringed + only as a consequence of further modifications of THIS + IMPLEMENTATION. If you or your agent or licensee institute or order + or agree to the institution of patent litigation against any entity + (including a cross-claim or counterclaim in a lawsuit) alleging that + THIS IMPLEMENTATION constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any rights + granted to you under this License shall terminate as of the date + such litigation is filed. If you or your agent or exclusive + licensee institute or order or agree to the institution of a PATENT + CHALLENGE, then Tokutek may terminate any rights granted to you + under this License. +*/ + +// test that basic scoped malloc works with a thread + +#ident "Copyright (c) 2015 Tokutek Inc. All rights reserved." +#include +#include +#include +#include + +static void sm_test(void) { + toku::scoped_malloc a(1); + { + toku::scoped_malloc b(2); + { + toku::scoped_malloc c(3); + } + } +} + +static void *sm_test_f(void *arg) { + sm_test(); + return arg; +} + +int main(void) { + toku_scoped_malloc_init(); + + // run the test + toku_pthread_t tid; + int r; + r = toku_pthread_create(&tid, NULL, sm_test_f, NULL); + assert_zero(r); + void *ret; + r = toku_pthread_join(tid, &ret); + assert_zero(r); + + toku_scoped_malloc_destroy(); + + return 0; +} diff -Nru mariadb-5.5-5.5.44/storage/tokudb/ft-index/util/tests/sm-crash-double-free.cc mariadb-5.5-5.5.46/storage/tokudb/ft-index/util/tests/sm-crash-double-free.cc --- mariadb-5.5-5.5.44/storage/tokudb/ft-index/util/tests/sm-crash-double-free.cc 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/ft-index/util/tests/sm-crash-double-free.cc 2015-10-09 16:50:28.000000000 +0000 @@ -0,0 +1,128 @@ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: +#ident "$Id$" +/* +COPYING CONDITIONS NOTICE: + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation, and provided that the + following conditions are met: + + * Redistributions of source code must retain this COPYING + CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the + DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the + PATENT MARKING NOTICE (below), and the PATENT RIGHTS + GRANT (below). + + * Redistributions in binary form must reproduce this COPYING + CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the + DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the + PATENT MARKING NOTICE (below), and the PATENT RIGHTS + GRANT (below) in the documentation and/or other materials + provided with the distribution. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + +COPYRIGHT NOTICE: + + TokuFT, Tokutek Fractal Tree Indexing Library. + Copyright (C) 2007-2013 Tokutek, Inc. + +DISCLAIMER: + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + +UNIVERSITY PATENT NOTICE: + + The technology is licensed by the Massachusetts Institute of + Technology, Rutgers State University of New Jersey, and the Research + Foundation of State University of New York at Stony Brook under + United States of America Serial No. 11/760379 and to the patents + and/or patent applications resulting from it. + +PATENT MARKING NOTICE: + + This software is covered by US Patent No. 8,185,551. + This software is covered by US Patent No. 8,489,638. + +PATENT RIGHTS GRANT: + + "THIS IMPLEMENTATION" means the copyrightable works distributed by + Tokutek as part of the Fractal Tree project. + + "PATENT CLAIMS" means the claims of patents that are owned or + licensable by Tokutek, both currently or in the future; and that in + the absence of this license would be infringed by THIS + IMPLEMENTATION or by using or running THIS IMPLEMENTATION. + + "PATENT CHALLENGE" shall mean a challenge to the validity, + patentability, enforceability and/or non-infringement of any of the + PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. + + Tokutek hereby grants to you, for the term and geographical scope of + the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, + irrevocable (except as stated in this section) patent license to + make, have made, use, offer to sell, sell, import, transfer, and + otherwise run, modify, and propagate the contents of THIS + IMPLEMENTATION, where such license applies only to the PATENT + CLAIMS. This grant does not include claims that would be infringed + only as a consequence of further modifications of THIS + IMPLEMENTATION. If you or your agent or licensee institute or order + or agree to the institution of patent litigation against any entity + (including a cross-claim or counterclaim in a lawsuit) alleging that + THIS IMPLEMENTATION constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any rights + granted to you under this License shall terminate as of the date + such litigation is filed. If you or your agent or exclusive + licensee institute or order or agree to the institution of a PATENT + CHALLENGE, then Tokutek may terminate any rights granted to you + under this License. +*/ + +// force a race between the scoped malloc global destructor and a thread variable destructor + +#ident "Copyright (c) 2015 Tokutek Inc. All rights reserved." +#define TOKU_SCOPED_MALLOC_DEBUG 1 +#include +#include +#include +#include +#include + +volatile int state = 0; + +static void sm_test(void) { + toku::scoped_malloc a(1); +} + +static void *sm_test_f(void *arg) { + sm_test(); + state = 1; + while (state != 2) sleep(1); + return arg; +} + +int main(void) { + TOKU_VALGRIND_HG_DISABLE_CHECKING(&state, sizeof state); + state = 0; + toku_scoped_malloc_init(); + toku_pthread_t tid; + int r; + r = toku_pthread_create(&tid, NULL, sm_test_f, NULL); + assert_zero(r); + void *ret; + while (state != 1) sleep(1); + toku_scoped_malloc_destroy_set(); + state = 2; + r = toku_pthread_join(tid, &ret); + assert_zero(r); + toku_scoped_malloc_destroy_key(); + return 0; +} diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db805.result mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db805.result --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db805.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db805.result 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,18 @@ +drop table if exists t1,t3; +create table t3(a3 int,b3 decimal(0,0),c3 int,d3 int,primary key(a3,b3)) engine=TOKUDB; +LOCK TABLES t3 WRITE; +create temporary table t1(f1 int,index(f1)) engine=innodb; +INSERT INTO t1 VALUES(1),(1),(1); +select * from t1; +f1 +1 +1 +1 +ALTER TABLE t1 engine=TOKUDB; +select * from t1; +f1 +1 +1 +1 +unlock tables; +drop table t1,t3; diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db806.result mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db806.result --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db806.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db806.result 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,9 @@ +drop table if exists t1,t3; +CREATE TABLE t3(a int,c int,d int)engine=TOKUDB; +lock table t3 read; +create temporary table t1 engine=tokudb as SELECT 1; +select * from t1; +1 +1 +unlock tables; +drop table t1,t3; diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db811.result mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db811.result --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db811.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db811.result 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,14 @@ +drop table if exists t2,t3,t4; +CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; +CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; +CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 13; +LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; +INSERT INTO t2(a)VALUES (REPEAT(0,1)); +ALTER TABLE t2 ADD COLUMN(c INT); +alter table t4 add column c int; +UPDATE t2 SET a=1; +select * from t2; +a b c +1 NULL NULL +unlock tables; +drop table t2,t3,t4; diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db811s.result mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db811s.result --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db811s.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db811s.result 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,14 @@ +drop table if exists t2,t3,t4; +CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; +CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; +CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 1; +LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; +INSERT INTO t2(a)VALUES (REPEAT(0,1)); +ALTER TABLE t2 ADD COLUMN(c INT); +alter table t4 add column c int; +UPDATE t2 SET a=1; +select * from t2; +a b c +1 NULL NULL +unlock tables; +drop table t2,t3,t4; diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db823.result mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db823.result --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/r/db823.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/r/db823.result 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,11 @@ +drop table if exists s,t; +create table s (id int) engine=tokudb; +lock tables s write; +create temporary table t (id int, key(id)) engine=innodb; +insert into t values (1); +alter table t engine=tokudb; +select * from t; +id +1 +unlock tables; +drop table s, t; diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db805.test mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db805.test --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db805.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db805.test 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,17 @@ +# DB-805 test that conversion of t1 from innodb to tokudb can write rows +source include/have_tokudb.inc; +source include/have_innodb.inc; +disable_warnings; +drop table if exists t1,t3; +enable_warnings; + +create table t3(a3 int,b3 decimal(0,0),c3 int,d3 int,primary key(a3,b3)) engine=TOKUDB; +LOCK TABLES t3 WRITE; +create temporary table t1(f1 int,index(f1)) engine=innodb; +INSERT INTO t1 VALUES(1),(1),(1); +select * from t1; +ALTER TABLE t1 engine=TOKUDB; +select * from t1; +unlock tables; + +drop table t1,t3; diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db806.test mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db806.test --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db806.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db806.test 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,13 @@ +# DB-806 test that lock tables and create select can write rows to the new table +source include/have_tokudb.inc; +disable_warnings; +drop table if exists t1,t3; +enable_warnings; + +CREATE TABLE t3(a int,c int,d int)engine=TOKUDB; +lock table t3 read; +create temporary table t1 engine=tokudb as SELECT 1; +select * from t1; +unlock tables; + +drop table t1,t3; \ No newline at end of file diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db811s.test mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db811s.test --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db811s.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db811s.test 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,22 @@ +# DB-811 test that alter table t2 updates both the schema (FRM) and the data (tokudb files) + +source include/have_tokudb.inc; +source include/have_innodb.inc; +source include/have_partition.inc; +disable_warnings; +drop table if exists t2,t3,t4; +enable_warnings; + +CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; +CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; +CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 1; +LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; +INSERT INTO t2(a)VALUES (REPEAT(0,1)); +ALTER TABLE t2 ADD COLUMN(c INT); +alter table t4 add column c int; +UPDATE t2 SET a=1; +select * from t2; +unlock tables; + +drop table t2,t3,t4; + diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db811.test mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db811.test --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db811.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db811.test 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,22 @@ +# DB-811 test that alter table t2 updates both the schema (FRM) and the data (tokudb files) + +source include/have_tokudb.inc; +source include/have_innodb.inc; +source include/have_partition.inc; +disable_warnings; +drop table if exists t2,t3,t4; +enable_warnings; + +CREATE TABLE t3(a INT,b INT,UNIQUE KEY (a,b)) engine=TOKUDB; +CREATE TABLE t4(c1 FLOAT ZEROFILL) engine=innodb; +CREATE TABLE t2(a int KEY,b CHAR (1)) engine=TOKUDB PARTITION BY HASH (a) PARTITIONS 13; +LOCK TABLES t4 WRITE,t3 WRITE,t2 WRITE; +INSERT INTO t2(a)VALUES (REPEAT(0,1)); +ALTER TABLE t2 ADD COLUMN(c INT); +alter table t4 add column c int; +UPDATE t2 SET a=1; +select * from t2; +unlock tables; + +drop table t2,t3,t4; + diff -Nru mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db823.test mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db823.test --- mariadb-5.5-5.5.44/storage/tokudb/mysql-test/tokudb_bugs/t/db823.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/tokudb/mysql-test/tokudb_bugs/t/db823.test 2015-10-09 16:50:40.000000000 +0000 @@ -0,0 +1,16 @@ +# test DB-823 +# test that the conversion of table t from innodb to tokudb succeeds. +source include/have_tokudb.inc; +source include/have_innodb.inc; +disable_warnings; +drop table if exists s,t; +enable_warnings; +create table s (id int) engine=tokudb; +lock tables s write; +create temporary table t (id int, key(id)) engine=innodb; +insert into t values (1); +alter table t engine=tokudb; +select * from t; +unlock tables; +drop table s, t; + diff -Nru mariadb-5.5-5.5.44/storage/xtradb/buf/buf0buf.c mariadb-5.5-5.5.46/storage/xtradb/buf/buf0buf.c --- mariadb-5.5-5.5.44/storage/xtradb/buf/buf0buf.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/buf/buf0buf.c 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -1666,6 +1666,10 @@ /* buf_pool->watch is protected by zip_mutex for now */ mutex_enter(&buf_pool->zip_mutex); + + /* The maximum number of purge threads should never exceed + BUF_POOL_WATCH_SIZE. So there is no way for purge thread + instance to hold a watch when setting another watch. */ for (i = 0; i < BUF_POOL_WATCH_SIZE; i++) { bpage = &buf_pool->watch[i]; diff -Nru mariadb-5.5-5.5.44/storage/xtradb/dict/dict0crea.c mariadb-5.5-5.5.46/storage/xtradb/dict/dict0crea.c --- mariadb-5.5-5.5.44/storage/xtradb/dict/dict0crea.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/dict/dict0crea.c 2015-10-09 16:50:40.000000000 +0000 @@ -1627,6 +1627,104 @@ } /********************************************************************//** +Construct foreign key constraint defintion from data dictionary information. +*/ +UNIV_INTERN +char* +dict_foreign_def_get( +/*=================*/ + dict_foreign_t* foreign,/*!< in: foreign */ + trx_t* trx) /*!< in: trx */ +{ + char* fk_def = mem_heap_alloc(foreign->heap, 4*1024); + const char* tbname; + char tablebuf[MAX_TABLE_NAME_LEN + 1] = ""; + int i; + char* bufend; + + tbname = dict_remove_db_name(foreign->id); + bufend = innobase_convert_name(tablebuf, MAX_TABLE_NAME_LEN, + tbname, strlen(tbname), trx->mysql_thd, FALSE); + tablebuf[bufend - tablebuf] = '\0'; + + sprintf(fk_def, + (char *)"CONSTRAINT %s FOREIGN KEY (", (char *)tablebuf); + + for(i = 0; i < foreign->n_fields; i++) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->foreign_col_names[i], + strlen(foreign->foreign_col_names[i]), + trx->mysql_thd, FALSE); + strcat(fk_def, buf); + if (i < foreign->n_fields-1) { + strcat(fk_def, (char *)","); + } + } + + strcat(fk_def,(char *)") REFERENCES "); + + bufend = innobase_convert_name(tablebuf, MAX_TABLE_NAME_LEN, + foreign->referenced_table_name, + strlen(foreign->referenced_table_name), + trx->mysql_thd, TRUE); + tablebuf[bufend - tablebuf] = '\0'; + + strcat(fk_def, tablebuf); + strcat(fk_def, " ("); + + for(i = 0; i < foreign->n_fields; i++) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + bufend = innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->referenced_col_names[i], + strlen(foreign->referenced_col_names[i]), + trx->mysql_thd, FALSE); + buf[bufend - buf] = '\0'; + strcat(fk_def, buf); + if (i < foreign->n_fields-1) { + strcat(fk_def, (char *)","); + } + } + strcat(fk_def, (char *)")"); + + return fk_def; +} + +/********************************************************************//** +Convert foreign key column names from data dictionary to SQL-layer. +*/ +static +void +dict_foreign_def_get_fields( +/*========================*/ + dict_foreign_t* foreign,/*!< in: foreign */ + trx_t* trx, /*!< in: trx */ + char** field, /*!< out: foreign column */ + char** field2, /*!< out: referenced column */ + int col_no) /*!< in: column number */ +{ + char* bufend; + char* fieldbuf = mem_heap_alloc(foreign->heap, MAX_TABLE_NAME_LEN+1); + char* fieldbuf2 = mem_heap_alloc(foreign->heap, MAX_TABLE_NAME_LEN+1); + + bufend = innobase_convert_name(fieldbuf, MAX_TABLE_NAME_LEN, + foreign->foreign_col_names[col_no], + strlen(foreign->foreign_col_names[col_no]), + trx->mysql_thd, FALSE); + + fieldbuf[bufend - fieldbuf] = '\0'; + + bufend = innobase_convert_name(fieldbuf2, MAX_TABLE_NAME_LEN, + foreign->referenced_col_names[col_no], + strlen(foreign->referenced_col_names[col_no]), + trx->mysql_thd, FALSE); + + fieldbuf2[bufend - fieldbuf2] = '\0'; + *field = fieldbuf; + *field2 = fieldbuf2; +} + +/********************************************************************//** Add a single foreign key definition to the data dictionary tables in the database. We also generate names to constraints that were not named by the user. A generated constraint has a name of the format @@ -1708,6 +1806,29 @@ if (error != DB_SUCCESS) { + if (error == DB_DUPLICATE_KEY) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + char tablename[MAX_TABLE_NAME_LEN + 1] = ""; + char* fk_def; + + innobase_convert_name(tablename, MAX_TABLE_NAME_LEN, + table->name, strlen(table->name), + trx->mysql_thd, TRUE); + + innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->id, strlen(foreign->id), trx->mysql_thd, FALSE); + + fk_def = dict_foreign_def_get(foreign, trx); + + ib_push_warning(trx, error, + "Create or Alter table %s with foreign key constraint" + " failed. Foreign key constraint %s" + " already exists on data dictionary." + " Foreign key constraint names need to be unique in database." + " Error in foreign key definition: %s.", + tablename, buf, fk_def); + } + return(error); } @@ -1716,6 +1837,26 @@ i, table, foreign, trx); if (error != DB_SUCCESS) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + char tablename[MAX_TABLE_NAME_LEN + 1] = ""; + char* field=NULL; + char* field2=NULL; + char* fk_def; + + innobase_convert_name(tablename, MAX_TABLE_NAME_LEN, + table->name, strlen(table->name), + trx->mysql_thd, TRUE); + innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + foreign->id, strlen(foreign->id), trx->mysql_thd, FALSE); + fk_def = dict_foreign_def_get(foreign, trx); + dict_foreign_def_get_fields(foreign, trx, &field, &field2, i); + + ib_push_warning(trx, error, + "Create or Alter table %s with foreign key constraint" + " failed. Error adding foreign key constraint name %s" + " fields %s or %s to the dictionary." + " Error in foreign key definition: %s.", + tablename, buf, i+1, fk_def); return(error); } @@ -1800,7 +1941,7 @@ foreign = UT_LIST_GET_NEXT(foreign_list, foreign)) { error = dict_create_add_foreign_to_dictionary(&number, table, - foreign, trx); + foreign, trx); if (error != DB_SUCCESS) { diff -Nru mariadb-5.5-5.5.44/storage/xtradb/dict/dict0dict.c mariadb-5.5-5.5.46/storage/xtradb/dict/dict0dict.c --- mariadb-5.5-5.5.44/storage/xtradb/dict/dict0dict.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/dict/dict0dict.c 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2663,12 +2663,14 @@ foreign); rbt = foreign->referenced_table->referenced_rbt; + if (rbt != NULL && foreign->id != NULL) { const ib_rbt_node_t* node = rbt_lookup(rbt, foreign->id); - if (node) { - dict_foreign_t* val = *(dict_foreign_t**) node->value; + if (node != NULL) { + dict_foreign_t* val + = *(dict_foreign_t**) node->value; if (val == foreign) { rbt_delete(rbt, foreign->id); @@ -2689,8 +2691,9 @@ const ib_rbt_node_t* node = rbt_lookup(rbt, foreign->id); - if (node) { - dict_foreign_t* val = *(dict_foreign_t**) node->value; + if (node != NULL) { + dict_foreign_t* val + = *(dict_foreign_t**) node->value; if (val == foreign) { rbt_delete(rbt, foreign->id); @@ -2747,6 +2750,11 @@ DBUG_RETURN(NULL); } +#define DB_FOREIGN_KEY_IS_PREFIX_INDEX 200 +#define DB_FOREIGN_KEY_COL_NOT_NULL 201 +#define DB_FOREIGN_KEY_COLS_NOT_EQUAL 202 +#define DB_FOREIGN_KEY_INDEX_NOT_FOUND 203 + /*********************************************************************//** Tries to find an index whose first fields are the columns in the array, in the same order and is not marked for deletion and is not the same @@ -2764,12 +2772,21 @@ ibool check_charsets, /*!< in: whether to check charsets. only has an effect if types_idx != NULL */ - ulint check_null) + ulint check_null, /*!< in: nonzero if none of the columns must be declared NOT NULL */ + ulint* error, /*!< out: error code */ + ulint* err_col_no, + /*!< out: column number where error happened */ + dict_index_t** err_index) + /*!< out: index where error happened */ { dict_index_t* index; + if (error) { + *error = DB_FOREIGN_KEY_INDEX_NOT_FOUND; + } + index = dict_table_get_first_index(table); while (index != NULL) { @@ -2795,6 +2812,12 @@ /* We do not accept column prefix indexes here */ + if (error && err_col_no && err_index) { + *error = DB_FOREIGN_KEY_IS_PREFIX_INDEX; + *err_col_no = i; + *err_index = index; + } + break; } @@ -2806,6 +2829,11 @@ if (check_null && (field->col->prtype & DATA_NOT_NULL)) { + if (error && err_col_no && err_index) { + *error = DB_FOREIGN_KEY_COL_NOT_NULL; + *err_col_no = i; + *err_index = index; + } return(NULL); } @@ -2815,6 +2843,12 @@ i), check_charsets)) { + if (error && err_col_no && err_index) { + *error = DB_FOREIGN_KEY_COLS_NOT_EQUAL; + *err_col_no = i; + *err_index = index; + } + break; } } @@ -2822,6 +2856,10 @@ if (i == n_cols) { /* We found a matching index */ + if (error) { + *error = DB_SUCCESS; + } + return(index); } } @@ -2853,7 +2891,7 @@ foreign->foreign_table, foreign->foreign_col_names, foreign->n_fields, foreign->foreign_index, TRUE, /* check types */ - FALSE/* allow columns to be NULL */)); + FALSE/* allow columns to be NULL */, NULL, NULL, NULL)); } #endif /* !UNIV_HOTBACKUP */ @@ -3016,11 +3054,15 @@ } if (for_in_cache->referenced_table == NULL && ref_table) { + ulint index_error; + ulint err_col; + dict_index_t *err_index=NULL; + index = dict_foreign_find_index( ref_table, for_in_cache->referenced_col_names, for_in_cache->n_fields, for_in_cache->foreign_index, - check_charsets, FALSE); + check_charsets, FALSE, &index_error, &err_col, &err_index); if (index == NULL && !(ignore_err & DICT_ERR_IGNORE_FK_NOKEY)) { @@ -3052,6 +3094,9 @@ } if (for_in_cache->foreign_table == NULL && for_table) { + ulint index_error; + ulint err_col; + dict_index_t* err_index=NULL; index = dict_foreign_find_index( for_table, @@ -3060,7 +3105,8 @@ for_in_cache->referenced_index, check_charsets, for_in_cache->type & (DICT_FOREIGN_ON_DELETE_SET_NULL - | DICT_FOREIGN_ON_UPDATE_SET_NULL)); + | DICT_FOREIGN_ON_UPDATE_SET_NULL), + &index_error, &err_col, &err_index); if (index == NULL && !(ignore_err & DICT_ERR_IGNORE_FK_NOKEY)) { @@ -3671,6 +3717,8 @@ void dict_foreign_report_syntax_err( /*===========================*/ + const char* fmt, /*!< in: syntax err msg */ + const char* oper, /*!< in: operation */ const char* name, /*!< in: table name */ const char* start_of_latest_foreign, /*!< in: start of the foreign key clause @@ -3681,12 +3729,102 @@ mutex_enter(&dict_foreign_err_mutex); dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nSyntax error close to:\n%s\n", - start_of_latest_foreign, ptr); + fprintf(ef, fmt, oper, name, start_of_latest_foreign, ptr); mutex_exit(&dict_foreign_err_mutex); } /*********************************************************************//** +Push warning message to SQL-layer based on foreign key constraint +index match error. */ +static +void +dict_foreign_push_index_error( +/*==========================*/ + trx_t* trx, /*!< in: trx */ + const char* operation, /*!< in: operation create or alter + */ + const char* create_name, /*!< in: table name in create or + alter table */ + const char* latest_foreign, /*!< in: start of latest foreign key + constraint name */ + const char** columns, /*!< in: foreign key columns */ + ulint index_error, /*!< in: error code */ + ulint err_col, /*!< in: column where error happened + */ + dict_index_t* err_index, /*!< in: index where error happened + */ + dict_table_t* table, /*!< in: table */ + FILE* ef) /*!< in: output stream */ +{ + switch (index_error) { + case DB_FOREIGN_KEY_INDEX_NOT_FOUND: { + fprintf(ef, + "%s table '%s' with foreign key constraint" + " failed. There is no index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.\n", + operation, create_name, latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table '%s' with foreign key constraint" + " failed. There is no index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.", + operation, create_name, latest_foreign); + break; + } + case DB_FOREIGN_KEY_IS_PREFIX_INDEX: { + fprintf(ef, + "%s table '%s' with foreign key constraint" + " failed. There is only prefix index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.\n", + operation, create_name, latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table '%s' with foreign key constraint" + " failed. There is only prefix index in the referenced" + " table where the referenced columns appear" + " as the first columns. Error close to %s.", + operation, create_name, latest_foreign); + break; + } + case DB_FOREIGN_KEY_COL_NOT_NULL: { + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but " + "field %s on index is defined as NOT NULL close to %s\n", + operation, create_name, columns[err_col], latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but " + "field %s on index is defined as NOT NULL close to %s", + operation, create_name, columns[err_col], latest_foreign); + break; + } + case DB_FOREIGN_KEY_COLS_NOT_EQUAL: { + dict_field_t* field; + const char* col_name; + field = dict_index_get_nth_field(err_index, err_col); + + col_name = dict_table_get_col_name( + table, dict_col_get_no(field->col)); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Field type or character set for column %s " + "does not mach referenced column %s close to %s\n", + operation, create_name, columns[err_col], col_name, latest_foreign); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Field type or character set for column %s " + "does not mach referenced column %s close to %s", + operation, create_name, columns[err_col], col_name, latest_foreign); + break; + } + default: + ut_error; + } +} + +/*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function should be called after the indexes for a table have been created. Each foreign key constraint must @@ -3714,15 +3852,20 @@ DB_CANNOT_ADD_CONSTRAINT if any foreign keys are found. */ { - dict_table_t* table; - dict_table_t* referenced_table; - dict_table_t* table_to_alter; + dict_table_t* table = NULL; + dict_table_t* referenced_table = NULL; + dict_table_t* table_to_alter = NULL; + dict_table_t* table_to_create = NULL; ulint highest_id_so_far = 0; - dict_index_t* index; - dict_foreign_t* foreign; + dict_index_t* index = NULL; + dict_foreign_t* foreign = NULL; const char* ptr = sql_string; const char* start_of_latest_foreign = sql_string; + const char* start_of_latest_set = NULL; FILE* ef = dict_foreign_err_file; + ulint index_error = DB_SUCCESS; + dict_index_t* err_index = NULL; + ulint err_col; const char* constraint_name; ibool success; ulint error; @@ -3735,29 +3878,68 @@ ulint n_on_updates; const dict_col_t*columns[500]; const char* column_names[500]; + const char* ref_column_names[500]; const char* referenced_table_name; + const char* create_table_name; + const char* orig; + char create_name[MAX_TABLE_NAME_LEN + 1]; + const char operation[8]; ut_ad(mutex_own(&(dict_sys->mutex))); table = dict_table_get_low(name, DICT_ERR_IGNORE_NONE); + /* First check if we are actually doing an ALTER TABLE, and in that + case look for the table being altered */ + ptr = dict_accept(cs, ptr, "ALTER", &success); + + strcpy((char *)operation, success ? "Alter " : "Create "); + + if (!success) { + orig = ptr; + ptr = dict_scan_to(ptr, "CREATE"); + ptr = dict_scan_to(ptr, "TABLE"); + ptr = dict_accept(cs, ptr, "TABLE", &success); + + if (success) { + ptr = dict_scan_table_name(cs, ptr, &table_to_create, name, + &success, heap, &create_table_name); + } + + if (success) { + char *bufend; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + create_table_name, strlen(create_table_name), + trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + ptr = orig; + } else { + char *bufend; + ptr = orig; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + name, strlen(name), trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + } + + goto loop; + } if (table == NULL) { mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, - "Cannot find the table in the internal" - " data dictionary of InnoDB.\n" - "Create table statement:\n%s\n", sql_string); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.\n", + operation, create_name, create_name, start_of_latest_foreign); mutex_exit(&dict_foreign_err_mutex); - + ib_push_warning(trx, DB_ERROR, + "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.", + operation, create_name, create_name, start_of_latest_foreign); return(DB_ERROR); } - /* First check if we are actually doing an ALTER TABLE, and in that - case look for the table being altered */ - - ptr = dict_accept(cs, ptr, "ALTER", &success); - + /* If not alter table jump to loop */ if (!success) { goto loop; @@ -3772,13 +3954,40 @@ /* We are doing an ALTER TABLE: scan the table name we are altering */ + orig = ptr; ptr = dict_scan_table_name(cs, ptr, &table_to_alter, name, &success, heap, &referenced_table_name); + + if (table_to_alter) { + char *bufend; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + table_to_alter->name, strlen(table_to_alter->name), + trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + } else { + char *bufend; + bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN, + referenced_table_name, strlen(referenced_table_name), + trx->mysql_thd, TRUE); + create_name[bufend-create_name]='\0'; + + } + if (!success) { - fprintf(stderr, - "InnoDB: Error: could not find" - " the table being ALTERED in:\n%s\n", - sql_string); + mutex_enter(&dict_foreign_err_mutex); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.\n", + operation, create_name, create_name, orig); + mutex_exit(&dict_foreign_err_mutex); + + ib_push_warning(trx, DB_ERROR, + "%s table %s with foreign key constraint" + " failed. Table %s not found from data dictionary." + " Error close to %s.", + operation, create_name, create_name, orig); return(DB_ERROR); } @@ -3844,7 +4053,19 @@ if so, immediately reject the command if the table is a temporary one. For now, this kludge will work. */ if (reject_fks && (UT_LIST_GET_LEN(table->foreign_list) > 0)) { + mutex_enter(&dict_foreign_err_mutex); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, "%s table %s with foreign key constraint" + " failed. Temporary tables can't have foreign key constraints." + " Error close to %s.\n", + operation, create_name, start_of_latest_foreign); + mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Temporary tables can't have foreign key constraints." + " Error close to %s.", + operation, create_name, start_of_latest_foreign); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3880,11 +4101,21 @@ if (!success) { /* MySQL allows also an index id before the '('; we skip it */ + orig = ptr; ptr = dict_skip_word(cs, ptr, &success); if (!success) { dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3904,15 +4135,26 @@ /* Scan the columns in the first list */ col_loop1: ut_a(i < (sizeof column_names) / sizeof *column_names); + orig = ptr; ptr = dict_scan_col(cs, ptr, &success, table, columns + i, heap, column_names + i); if (!success) { mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nCannot resolve column name close to:\n%s\n", - start_of_latest_foreign, ptr); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3924,11 +4166,22 @@ goto col_loop1; } + orig = ptr; ptr = dict_accept(cs, ptr, ")", &success); if (!success) { dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -3936,27 +4189,41 @@ as the first fields and in the right order */ index = dict_foreign_find_index(table, column_names, i, - NULL, TRUE, FALSE); + NULL, TRUE, FALSE, &index_error, &err_col, &err_index); if (!index) { mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); + dict_foreign_error_report_low(ef, create_name); fputs("There is no index in table ", ef); - ut_print_name(ef, NULL, TRUE, name); + ut_print_name(ef, NULL, TRUE, create_name); fprintf(ef, " where the columns appear\n" "as the first columns. Constraint:\n%s\n" "See " REFMAN "innodb-foreign-key-constraints.html\n" "for correct foreign key definition.\n", start_of_latest_foreign); - mutex_exit(&dict_foreign_err_mutex); - return(DB_CHILD_NO_INDEX); + dict_foreign_push_index_error(trx, operation, create_name, start_of_latest_foreign, + column_names, index_error, err_col, err_index, table, ef); + + mutex_exit(&dict_foreign_err_mutex); + return(DB_CANNOT_ADD_CONSTRAINT); } + + orig = ptr; ptr = dict_accept(cs, ptr, "REFERENCES", &success); if (!success || !my_isspace(cs, *ptr)) { dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4005,24 +4272,50 @@ checking of foreign key constraints! */ if (!success || (!referenced_table && trx->check_foreigns)) { + char buf[MAX_TABLE_NAME_LEN + 1] = ""; + char* bufend; + + bufend = innobase_convert_name(buf, MAX_TABLE_NAME_LEN, + referenced_table_name, strlen(referenced_table_name), + trx->mysql_thd, TRUE); + buf[bufend - buf] = '\0'; + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary " + "close to %s.", + operation, create_name, buf, start_of_latest_foreign); + dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nCannot resolve table name close to:\n" - "%s\n", - start_of_latest_foreign, ptr); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint failed. Referenced table %s not found in the data dictionary " + "close to %s.\n", + operation, create_name, buf, start_of_latest_foreign); + mutex_exit(&dict_foreign_err_mutex); return(DB_CANNOT_ADD_CONSTRAINT); } + orig = ptr; ptr = dict_accept(cs, ptr, "(", &success); if (!success) { dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4030,20 +4323,29 @@ i = 0; col_loop2: + orig = ptr; ptr = dict_scan_col(cs, ptr, &success, referenced_table, columns + i, - heap, column_names + i); + heap, ref_column_names + i); i++; if (!success) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\nCannot resolve column name close to:\n" - "%s\n", - start_of_latest_foreign, ptr); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, orig); + mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, orig); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4053,13 +4355,25 @@ goto col_loop2; } + orig = ptr; ptr = dict_accept(cs, ptr, ")", &success); if (!success || foreign->n_fields != i) { + + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s. Too few referenced columns\n", + operation, create_name, start_of_latest_foreign, orig); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s. Too few referenced columns, you have %d when you should have %d.", + operation, create_name, start_of_latest_foreign, orig, i, foreign->n_fields); + dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4069,6 +4383,7 @@ scan_on_conditions: /* Loop here as long as we can find ON ... conditions */ + start_of_latest_set = ptr; ptr = dict_accept(cs, ptr, "ON", &success); if (!success) { @@ -4079,13 +4394,24 @@ ptr = dict_accept(cs, ptr, "DELETE", &success); if (!success) { + orig = ptr; ptr = dict_accept(cs, ptr, "UPDATE", &success); if (!success) { dict_foreign_free(foreign); dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4117,12 +4443,22 @@ ptr = dict_accept(cs, ptr, "NO", &success); if (success) { + orig = ptr; ptr = dict_accept(cs, ptr, "ACTION", &success); if (!success) { dict_foreign_free(foreign); dict_foreign_report_syntax_err( - name, start_of_latest_foreign, ptr); + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4136,42 +4472,73 @@ goto scan_on_conditions; } + orig = ptr; ptr = dict_accept(cs, ptr, "SET", &success); if (!success) { dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + return(DB_CANNOT_ADD_CONSTRAINT); } + orig = ptr; ptr = dict_accept(cs, ptr, "NULL", &success); if (!success) { dict_foreign_free(foreign); - dict_foreign_report_syntax_err(name, start_of_latest_foreign, - ptr); + dict_foreign_report_syntax_err( + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. Foreign key constraint parse error in %s" + " close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); return(DB_CANNOT_ADD_CONSTRAINT); } for (j = 0; j < foreign->n_fields; j++) { if ((dict_index_get_nth_col(foreign->foreign_index, j)->prtype) & DATA_NOT_NULL) { + const dict_col_t* col + = dict_index_get_nth_col(foreign->foreign_index, j); + const char* col_name = dict_table_get_col_name(foreign->foreign_index->table, + dict_col_get_no(col)); /* It is not sensible to define SET NULL if the column is not allowed to be NULL! */ - dict_foreign_free(foreign); - mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\n" - "You have defined a SET NULL condition" - " though some of the\n" - "columns are defined as NOT NULL.\n", - start_of_latest_foreign); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but column %s is defined as NOT NULL" + " in %s close to %s.\n", + operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set); mutex_exit(&dict_foreign_err_mutex); + + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. You have defined a SET NULL condition but column %s is defined as NOT NULL" + " in %s close to %s.", + operation, create_name, col_name, start_of_latest_foreign, start_of_latest_set); + + dict_foreign_free(foreign); return(DB_CANNOT_ADD_CONSTRAINT); } } @@ -4188,16 +4555,22 @@ if (n_on_deletes > 1 || n_on_updates > 1) { /* It is an error to define more than 1 action */ - dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); - fprintf(ef, "%s:\n" - "You have twice an ON DELETE clause" - " or twice an ON UPDATE clause.\n", - start_of_latest_foreign); + dict_foreign_error_report_low(ef, create_name); + fprintf(ef, + "%s table %s with foreign key constraint" + " failed. You have more than one on delete or on update clause" + " in %s close to %s.\n", + operation, create_name, start_of_latest_foreign, start_of_latest_set); mutex_exit(&dict_foreign_err_mutex); + ib_push_warning(trx, DB_CANNOT_ADD_CONSTRAINT, + "%s table %s with foreign key constraint" + " failed. You have more than one on delete or on update clause" + " in %s close to %s.", + operation, create_name, start_of_latest_foreign, start_of_latest_set); + dict_foreign_free(foreign); return(DB_CANNOT_ADD_CONSTRAINT); } @@ -4207,13 +4580,13 @@ if (referenced_table) { index = dict_foreign_find_index(referenced_table, - column_names, i, - foreign->foreign_index, - TRUE, FALSE); + ref_column_names, i, + foreign->foreign_index, + TRUE, FALSE, &index_error, &err_col, &err_index); if (!index) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); - dict_foreign_error_report_low(ef, name); + dict_foreign_error_report_low(ef, create_name); fprintf(ef, "%s:\n" "Cannot find an index in the" " referenced table where the\n" @@ -4231,9 +4604,13 @@ "innodb-foreign-key-constraints.html\n" "for correct foreign key definition.\n", start_of_latest_foreign); + + dict_foreign_push_index_error(trx, operation, create_name, start_of_latest_foreign, + column_names, index_error, err_col, err_index, referenced_table, ef); + mutex_exit(&dict_foreign_err_mutex); - return(DB_PARENT_NO_INDEX); + return(DB_CANNOT_ADD_CONSTRAINT); } } else { ut_a(trx->check_foreigns == FALSE); @@ -4251,7 +4628,7 @@ i * sizeof(void*)); for (i = 0; i < foreign->n_fields; i++) { foreign->referenced_col_names[i] - = mem_heap_strdup(foreign->heap, column_names[i]); + = mem_heap_strdup(foreign->heap, ref_column_names[i]); } /* We found an ok constraint definition: add to the lists */ @@ -5796,7 +6173,8 @@ foreign->referenced_table, foreign->referenced_col_names, foreign->n_fields, index, - /*check_charsets=*/TRUE, /*check_null=*/FALSE); + /*check_charsets=*/TRUE, /*check_null=*/FALSE, + NULL, NULL, NULL); ut_ad(new_index || !trx->check_foreigns); ut_ad(!new_index || new_index->table == index->table); diff -Nru mariadb-5.5-5.5.44/storage/xtradb/handler/ha_innodb.cc mariadb-5.5-5.5.46/storage/xtradb/handler/ha_innodb.cc --- mariadb-5.5-5.5.44/storage/xtradb/handler/ha_innodb.cc 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/handler/ha_innodb.cc 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. @@ -1853,6 +1853,7 @@ if (trx == NULL) { trx = innobase_trx_allocate(thd); + thd_set_ha_data(thd, innodb_hton_ptr, trx); } else if (UNIV_UNLIKELY(trx->magic_n != TRX_MAGIC_N)) { mem_analyze_corruption(trx); ut_error; @@ -9119,6 +9120,13 @@ estimate = 2 * local_data_file_length / dict_index_calc_min_rec_len(index); + /* Set num_rows less than MERGEBUFF to simulate the case where we do + not have enough space to merge the externally sorted file blocks. */ + DBUG_EXECUTE_IF("set_num_rows_lt_MERGEBUFF", + estimate = 2; + DBUG_SET("-d,set_num_rows_lt_MERGEBUFF"); + ); + prebuilt->trx->op_info = (char*)""; DBUG_RETURN((ha_rows) estimate); @@ -9398,17 +9406,6 @@ prebuilt->trx->op_info = "returning various info to MySQL"; } - my_snprintf(path, sizeof(path), "%s/%s%s", - mysql_data_home, ib_table->name, reg_ext); - - unpack_filename(path,path); - - /* Note that we do not know the access time of the table, - nor the CHECK TABLE time, nor the UPDATE or INSERT time. */ - - if (os_file_get_status(path,&stat_info)) { - stats.create_time = (ulong) stat_info.ctime; - } } if (flag & HA_STATUS_VARIABLE) { @@ -9652,6 +9649,20 @@ } dict_table_stats_unlock(ib_table, RW_S_LATCH); + + my_snprintf(path, sizeof(path), "%s/%s%s", + mysql_data_home, + table->s->normalized_path.str, + reg_ext); + + unpack_filename(path,path); + + /* Note that we do not know the access time of the table, + nor the CHECK TABLE time, nor the UPDATE or INSERT time. */ + + if (os_file_get_status(path,&stat_info)) { + stats.create_time = (ulong) stat_info.ctime; + } } if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) { @@ -14106,3 +14117,28 @@ DBUG_RETURN(NULL); } +/********************************************************************//** +Helper function to push warnings from InnoDB internals to SQL-layer. */ +extern "C" UNIV_INTERN +void +ib_push_warning( + trx_t* trx, /*!< in: trx */ + ulint error, /*!< in: error code to push as warning */ + const char *format,/*!< in: warning message */ + ...) +{ + va_list args; + THD *thd = (THD *)trx->mysql_thd; + char *buf; +#define MAX_BUF_SIZE 4*1024 + + va_start(args, format); + buf = (char *)my_malloc(MAX_BUF_SIZE, MYF(MY_WME)); + vsprintf(buf,format, args); + + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + convert_error_code_to_mysql(error, 0, thd), + buf); + my_free(buf); + va_end(args); +} diff -Nru mariadb-5.5-5.5.44/storage/xtradb/include/dict0crea.h mariadb-5.5-5.5.46/storage/xtradb/include/dict0crea.h --- mariadb-5.5-5.5.44/storage/xtradb/include/dict0crea.h 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/include/dict0crea.h 2015-10-09 16:50:40.000000000 +0000 @@ -121,6 +121,17 @@ ulint dict_create_or_check_foreign_constraint_tables(void); /*================================================*/ + +/********************************************************************//** +Construct foreign key constraint defintion from data dictionary information. +*/ +UNIV_INTERN +char* +dict_foreign_def_get( +/*=================*/ + dict_foreign_t* foreign,/*!< in: foreign */ + trx_t* trx); /*!< in: trx */ + /********************************************************************//** Adds foreign key definitions to data dictionary tables in the database. We look at table->foreign_list, and also generate names to constraints that were diff -Nru mariadb-5.5-5.5.44/storage/xtradb/include/ha_prototypes.h mariadb-5.5-5.5.46/storage/xtradb/include/ha_prototypes.h --- mariadb-5.5-5.5.44/storage/xtradb/include/ha_prototypes.h 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/include/ha_prototypes.h 2015-10-09 16:50:40.000000000 +0000 @@ -353,5 +353,14 @@ const char* from, /* in: identifier to convert */ ulint len); /* in: length of 'to', in bytes */ +/********************************************************************//** +Helper function to push warnings from InnoDB internals to SQL-layer. */ +UNIV_INTERN +void +ib_push_warning( + trx_t* trx, /*!< in: trx */ + ulint error, /*!< in: error code to push as warning */ + const char *format,/*!< in: warning message */ + ...); #endif diff -Nru mariadb-5.5-5.5.44/storage/xtradb/include/row0purge.h mariadb-5.5-5.5.46/storage/xtradb/include/row0purge.h --- mariadb-5.5-5.5.44/storage/xtradb/include/row0purge.h 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/include/row0purge.h 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -111,6 +111,18 @@ purge of a row */ }; +#ifdef UNIV_DEBUG +/***********************************************************//** +Validate the persisent cursor in the purge node. The purge node has two +references to the clustered index record - one via the ref member, and the +other via the persistent cursor. These two references must match each +other if the found_clust flag is set. +@return true if the persistent cursor is consistent with the ref member.*/ +UNIV_INTERN +ibool +row_purge_validate_pcur(purge_node_t* node); +#endif /* UNIV_DEBUG */ + #ifndef UNIV_NONINL #include "row0purge.ic" #endif diff -Nru mariadb-5.5-5.5.44/storage/xtradb/include/srv0srv.h mariadb-5.5-5.5.46/storage/xtradb/include/srv0srv.h --- mariadb-5.5-5.5.44/storage/xtradb/include/srv0srv.h 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/include/srv0srv.h 2015-10-09 16:50:40.000000000 +0000 @@ -270,7 +270,6 @@ extern ulong srv_ibuf_accel_rate; extern ulint srv_checkpoint_age_target; extern ulong srv_flush_neighbor_pages; -extern ulint srv_deprecated_enable_unsafe_group_commit; extern ulong srv_read_ahead; extern ulong srv_adaptive_flushing_method; diff -Nru mariadb-5.5-5.5.44/storage/xtradb/include/univ.i mariadb-5.5-5.5.46/storage/xtradb/include/univ.i --- mariadb-5.5-5.5.44/storage/xtradb/include/univ.i 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/include/univ.i 2015-10-09 16:50:40.000000000 +0000 @@ -64,10 +64,10 @@ (INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR) #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 37.2 +#define PERCONA_INNODB_VERSION 37.4 #endif -#define INNODB_VERSION_STR "5.5.43-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION) +#define INNODB_VERSION_STR "5.5.45-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION) #define REFMAN "http://dev.mysql.com/doc/refman/" \ IB_TO_STR(MYSQL_MAJOR_VERSION) "." \ diff -Nru mariadb-5.5-5.5.44/storage/xtradb/os/os0file.c mariadb-5.5-5.5.46/storage/xtradb/os/os0file.c --- mariadb-5.5-5.5.44/storage/xtradb/os/os0file.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/os/os0file.c 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /*********************************************************************** -Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2009, Percona Inc. Portions of this file contain modifications contributed and copyrighted @@ -1376,16 +1376,19 @@ #else /* __WIN__ */ os_file_t file; int create_flag; + const char* mode_str = NULL; ut_a(name); if (create_mode == OS_FILE_OPEN) { + mode_str = "OPEN"; if (access_type == OS_FILE_READ_ONLY) { create_flag = O_RDONLY; } else { create_flag = O_RDWR; } } else if (create_mode == OS_FILE_CREATE) { + mode_str = "CREATE"; create_flag = O_RDWR | O_CREAT | O_EXCL; } else { create_flag = 0; @@ -1410,6 +1413,14 @@ #endif } else { *success = TRUE; + + /* This function is always called for data files, we should + disable OS caching (O_DIRECT) here as we do in + os_file_create_func(), so we open the same file in the same + mode, see man page of open(2). */ + if (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT) { + os_file_set_nocache(file, name, mode_str); + } } return(file); diff -Nru mariadb-5.5-5.5.44/storage/xtradb/row/row0purge.c mariadb-5.5-5.5.46/storage/xtradb/row/row0purge.c --- mariadb-5.5-5.5.44/storage/xtradb/row/row0purge.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/row/row0purge.c 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -43,6 +43,7 @@ #include "row0vers.h" #include "row0mysql.h" #include "log0log.h" +#include "rem0cmp.h" /************************************************************************* IMPORTANT NOTE: Any operation that generates redo MUST check that there @@ -80,7 +81,7 @@ /***********************************************************//** Repositions the pcur in the purge node on the clustered index record, -if found. +if found. If the record is not found, close pcur. @return TRUE if the record was found */ static ibool @@ -90,23 +91,28 @@ purge_node_t* node, /*!< in: row purge node */ mtr_t* mtr) /*!< in: mtr */ { - ibool found; - if (node->found_clust) { - found = btr_pcur_restore_position(mode, &(node->pcur), mtr); + ut_ad(row_purge_validate_pcur(node)); - return(found); - } + node->found_clust = btr_pcur_restore_position( + mode, &(node->pcur), mtr); + + } else { + + node->found_clust = row_search_on_row_ref( + &(node->pcur), mode, node->table, node->ref, mtr); - found = row_search_on_row_ref(&(node->pcur), mode, node->table, - node->ref, mtr); - node->found_clust = found; + if (node->found_clust) { + btr_pcur_store_position(&(node->pcur), mtr); + } + } - if (found) { - btr_pcur_store_position(&(node->pcur), mtr); + /* Close the current cursor if we fail to position it correctly. */ + if (!node->found_clust) { + btr_pcur_close(&node->pcur); } - return(found); + return(node->found_clust); } /***********************************************************//** @@ -143,8 +149,8 @@ if (!success) { /* The record is already removed */ - - btr_pcur_commit_specify_mtr(pcur, &mtr); + /* Persistent cursor is closed if reposition fails. */ + mtr_commit(&mtr); return(TRUE); } @@ -258,7 +264,12 @@ btr_pcur_get_rec(&node->pcur), &mtr, index, entry); - btr_pcur_commit_specify_mtr(&node->pcur, &mtr); + /* Persistent cursor is closed if reposition fails. */ + if (node->found_clust) { + btr_pcur_commit_specify_mtr(&node->pcur, &mtr); + } else { + mtr_commit(&mtr); + } return(can_delete); } @@ -806,3 +817,54 @@ return(thr); } + +#ifdef UNIV_DEBUG +/***********************************************************//** +Validate the persisent cursor in the purge node. The purge node has two +references to the clustered index record - one via the ref member, and the +other via the persistent cursor. These two references must match each +other if the found_clust flag is set. +@return true if the stored copy of persistent cursor is consistent +with the ref member.*/ +UNIV_INTERN +ibool +row_purge_validate_pcur( + purge_node_t* node) +{ + dict_index_t* clust_index; + ulint* offsets; + int st; + + if (!node->found_clust) { + return(TRUE); + } + + if (node->index == NULL) { + return(TRUE); + } + + if (node->pcur.old_stored != BTR_PCUR_OLD_STORED) { + return(TRUE); + } + + clust_index = node->pcur.btr_cur.index; + + offsets = rec_get_offsets(node->pcur.old_rec, clust_index, NULL, + node->pcur.old_n_fields, &node->heap); + + /* Here we are comparing the purge ref record and the stored initial + part in persistent cursor. Both cases we store n_uniq fields of the + cluster index and so it is fine to do the comparison. We note this + dependency here as pcur and ref belong to different modules. */ + st = cmp_dtuple_rec(node->ref, node->pcur.old_rec, offsets); + + if (st != 0) { + fprintf(stderr, "Purge node pcur validation failed\n"); + dtuple_print(stderr, node->ref); + rec_print(stderr, node->pcur.old_rec, clust_index); + return(FALSE); + } + + return(TRUE); +} +#endif /* UNIV_DEBUG */ diff -Nru mariadb-5.5-5.5.44/storage/xtradb/srv/srv0srv.c mariadb-5.5-5.5.46/storage/xtradb/srv/srv0srv.c --- mariadb-5.5-5.5.44/storage/xtradb/srv/srv0srv.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/srv/srv0srv.c 2015-10-09 16:50:40.000000000 +0000 @@ -438,7 +438,6 @@ UNIV_INTERN ulint srv_checkpoint_age_target = 0; UNIV_INTERN ulong srv_flush_neighbor_pages = 1; /* 0:disable 1:area 2:contiguous */ -UNIV_INTERN ulint srv_deprecated_enable_unsafe_group_commit = 0; UNIV_INTERN ulong srv_read_ahead = 3; /* 1: random 2: linear 3: Both */ UNIV_INTERN ulong srv_adaptive_flushing_method = 0; /* 0: native 1: estimate 2: keep_average */ diff -Nru mariadb-5.5-5.5.44/storage/xtradb/srv/srv0start.c mariadb-5.5-5.5.46/storage/xtradb/srv/srv0start.c --- mariadb-5.5-5.5.44/storage/xtradb/srv/srv0start.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/srv/srv0start.c 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. @@ -2501,9 +2501,9 @@ ibuf_close(); log_shutdown(); - lock_sys_close(); trx_sys_file_format_close(); trx_sys_close(); + lock_sys_close(); mutex_free(&srv_monitor_file_mutex); mutex_free(&srv_dict_tmpfile_mutex); diff -Nru mariadb-5.5-5.5.44/storage/xtradb/sync/sync0arr.c mariadb-5.5-5.5.46/storage/xtradb/sync/sync0arr.c --- mariadb-5.5-5.5.44/storage/xtradb/sync/sync0arr.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/sync/sync0arr.c 2015-10-09 16:50:40.000000000 +0000 @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2013, 2014, MariaDB Corporation. All Rights Reserved. @@ -1114,8 +1114,9 @@ os_thread_id_t r; fprintf(file, - "OS WAIT ARRAY INFO: reservation count %ld, signal count %ld\n", - (long) arr->res_count, (long) arr->sg_count); + "OS WAIT ARRAY INFO: reservation count " ULINTPF + ", signal count " ULINTPF "\n", + arr->res_count, arr->sg_count); i = 0; count = 0; diff -Nru mariadb-5.5-5.5.44/storage/xtradb/trx/trx0trx.c mariadb-5.5-5.5.46/storage/xtradb/trx/trx0trx.c --- mariadb-5.5-5.5.44/storage/xtradb/trx/trx0trx.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/storage/xtradb/trx/trx0trx.c 2015-10-09 16:50:40.000000000 +0000 @@ -768,9 +768,9 @@ " anyway.\n"); trx->state = TRX_ACTIVE; - trx_reserve_descriptor( - trx); } + + trx_reserve_descriptor(trx); } else { trx->state = TRX_COMMITTED_IN_MEMORY; diff -Nru mariadb-5.5-5.5.44/support-files/mysql.spec.sh mariadb-5.5-5.5.46/support-files/mysql.spec.sh --- mariadb-5.5-5.5.44/support-files/mysql.spec.sh 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/support-files/mysql.spec.sh 2015-10-09 16:50:40.000000000 +0000 @@ -635,7 +635,7 @@ # Check local settings to support them. if [ -x %{_bindir}/my_print_defaults ] then - mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` + mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | tail -1 | sed -n 's/--datadir=//p'` PID_FILE_PATT=`%{_bindir}/my_print_defaults server mysqld | grep '^--pid-file=' | sed -n 's/--pid-file=//p'` fi if [ -z "$mysql_datadir" ] @@ -740,7 +740,7 @@ STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER -if [ -f $STATUS_FILE ]; then +if [ -f "$STATUS_FILE" ]; then echo "Some previous upgrade was not finished:" ls -ld $STATUS_FILE echo "Please check its status, then do" @@ -811,7 +811,7 @@ # Check local settings to support them. if [ -x %{_bindir}/my_print_defaults ] then - mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` + mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | tail -1 | sed -n 's/--datadir=//p'` fi if [ -z "$mysql_datadir" ] then @@ -824,8 +824,8 @@ # ---------------------------------------------------------------------- # Create data directory if needed, check whether upgrade or install # ---------------------------------------------------------------------- -if [ ! -d $mysql_datadir ] ; then mkdir -m 755 $mysql_datadir; fi -if [ -f $STATUS_FILE ] ; then +if [ ! -d "$mysql_datadir" ] ; then mkdir -m 755 "$mysql_datadir" ; fi +if [ -f "$STATUS_FILE" ] ; then SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-` else SERVER_TO_START='' @@ -1003,7 +1003,7 @@ # Check local settings to support them. if [ -x %{_bindir}/my_print_defaults ] then - mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` + mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | tail -1 | sed -n 's/--datadir=//p'` fi if [ -z "$mysql_datadir" ] then @@ -1014,7 +1014,7 @@ STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER-LAST # Note the difference! STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY -if [ -f $STATUS_FILE ] ; then +if [ -f "$STATUS_FILE" ] ; then SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-` else # This should never happen, but let's be prepared diff -Nru mariadb-5.5-5.5.44/util/tests/sm-basic.cc mariadb-5.5-5.5.46/util/tests/sm-basic.cc --- mariadb-5.5-5.5.44/util/tests/sm-basic.cc 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/util/tests/sm-basic.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ -/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: -#ident "$Id$" -/* -COPYING CONDITIONS NOTICE: - - This program is free software; you can redistribute it and/or modify - it under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation, and provided that the - following conditions are met: - - * Redistributions of source code must retain this COPYING - CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the - DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the - PATENT MARKING NOTICE (below), and the PATENT RIGHTS - GRANT (below). - - * Redistributions in binary form must reproduce this COPYING - CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the - DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the - PATENT MARKING NOTICE (below), and the PATENT RIGHTS - GRANT (below) in the documentation and/or other materials - provided with the distribution. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. - -COPYRIGHT NOTICE: - - TokuFT, Tokutek Fractal Tree Indexing Library. - Copyright (C) 2007-2013 Tokutek, Inc. - -DISCLAIMER: - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -UNIVERSITY PATENT NOTICE: - - The technology is licensed by the Massachusetts Institute of - Technology, Rutgers State University of New Jersey, and the Research - Foundation of State University of New York at Stony Brook under - United States of America Serial No. 11/760379 and to the patents - and/or patent applications resulting from it. - -PATENT MARKING NOTICE: - - This software is covered by US Patent No. 8,185,551. - This software is covered by US Patent No. 8,489,638. - -PATENT RIGHTS GRANT: - - "THIS IMPLEMENTATION" means the copyrightable works distributed by - Tokutek as part of the Fractal Tree project. - - "PATENT CLAIMS" means the claims of patents that are owned or - licensable by Tokutek, both currently or in the future; and that in - the absence of this license would be infringed by THIS - IMPLEMENTATION or by using or running THIS IMPLEMENTATION. - - "PATENT CHALLENGE" shall mean a challenge to the validity, - patentability, enforceability and/or non-infringement of any of the - PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. - - Tokutek hereby grants to you, for the term and geographical scope of - the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, - irrevocable (except as stated in this section) patent license to - make, have made, use, offer to sell, sell, import, transfer, and - otherwise run, modify, and propagate the contents of THIS - IMPLEMENTATION, where such license applies only to the PATENT - CLAIMS. This grant does not include claims that would be infringed - only as a consequence of further modifications of THIS - IMPLEMENTATION. If you or your agent or licensee institute or order - or agree to the institution of patent litigation against any entity - (including a cross-claim or counterclaim in a lawsuit) alleging that - THIS IMPLEMENTATION constitutes direct or contributory patent - infringement, or inducement of patent infringement, then any rights - granted to you under this License shall terminate as of the date - such litigation is filed. If you or your agent or exclusive - licensee institute or order or agree to the institution of a PATENT - CHALLENGE, then Tokutek may terminate any rights granted to you - under this License. -*/ - -// test that basic scoped malloc works with a thread - -#ident "Copyright (c) 2015 Tokutek Inc. All rights reserved." -#include -#include -#include -#include - -static void sm_test(void) { - toku::scoped_malloc a(1); - { - toku::scoped_malloc b(2); - { - toku::scoped_malloc c(3); - } - } -} - -static void *sm_test_f(void *arg) { - sm_test(); - return arg; -} - -int main(void) { - toku_scoped_malloc_init(); - - // run the test - toku_pthread_t tid; - int r; - r = toku_pthread_create(&tid, NULL, sm_test_f, NULL); - assert_zero(r); - void *ret; - r = toku_pthread_join(tid, &ret); - assert_zero(r); - - toku_scoped_malloc_destroy(); - - return 0; -} diff -Nru mariadb-5.5-5.5.44/util/tests/sm-crash-double-free.cc mariadb-5.5-5.5.46/util/tests/sm-crash-double-free.cc --- mariadb-5.5-5.5.44/util/tests/sm-crash-double-free.cc 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/util/tests/sm-crash-double-free.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: -#ident "$Id$" -/* -COPYING CONDITIONS NOTICE: - - This program is free software; you can redistribute it and/or modify - it under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation, and provided that the - following conditions are met: - - * Redistributions of source code must retain this COPYING - CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the - DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the - PATENT MARKING NOTICE (below), and the PATENT RIGHTS - GRANT (below). - - * Redistributions in binary form must reproduce this COPYING - CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the - DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the - PATENT MARKING NOTICE (below), and the PATENT RIGHTS - GRANT (below) in the documentation and/or other materials - provided with the distribution. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. - -COPYRIGHT NOTICE: - - TokuFT, Tokutek Fractal Tree Indexing Library. - Copyright (C) 2007-2013 Tokutek, Inc. - -DISCLAIMER: - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -UNIVERSITY PATENT NOTICE: - - The technology is licensed by the Massachusetts Institute of - Technology, Rutgers State University of New Jersey, and the Research - Foundation of State University of New York at Stony Brook under - United States of America Serial No. 11/760379 and to the patents - and/or patent applications resulting from it. - -PATENT MARKING NOTICE: - - This software is covered by US Patent No. 8,185,551. - This software is covered by US Patent No. 8,489,638. - -PATENT RIGHTS GRANT: - - "THIS IMPLEMENTATION" means the copyrightable works distributed by - Tokutek as part of the Fractal Tree project. - - "PATENT CLAIMS" means the claims of patents that are owned or - licensable by Tokutek, both currently or in the future; and that in - the absence of this license would be infringed by THIS - IMPLEMENTATION or by using or running THIS IMPLEMENTATION. - - "PATENT CHALLENGE" shall mean a challenge to the validity, - patentability, enforceability and/or non-infringement of any of the - PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. - - Tokutek hereby grants to you, for the term and geographical scope of - the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, - irrevocable (except as stated in this section) patent license to - make, have made, use, offer to sell, sell, import, transfer, and - otherwise run, modify, and propagate the contents of THIS - IMPLEMENTATION, where such license applies only to the PATENT - CLAIMS. This grant does not include claims that would be infringed - only as a consequence of further modifications of THIS - IMPLEMENTATION. If you or your agent or licensee institute or order - or agree to the institution of patent litigation against any entity - (including a cross-claim or counterclaim in a lawsuit) alleging that - THIS IMPLEMENTATION constitutes direct or contributory patent - infringement, or inducement of patent infringement, then any rights - granted to you under this License shall terminate as of the date - such litigation is filed. If you or your agent or exclusive - licensee institute or order or agree to the institution of a PATENT - CHALLENGE, then Tokutek may terminate any rights granted to you - under this License. -*/ - -// force a race between the scoped malloc global destructor and a thread variable destructor - -#ident "Copyright (c) 2015 Tokutek Inc. All rights reserved." -#define TOKU_SCOPED_MALLOC_DEBUG 1 -#include -#include -#include -#include -#include - -volatile int state = 0; - -static void sm_test(void) { - toku::scoped_malloc a(1); -} - -static void *sm_test_f(void *arg) { - sm_test(); - state = 1; - while (state != 2) sleep(1); - return arg; -} - -int main(void) { - TOKU_VALGRIND_HG_DISABLE_CHECKING(&state, sizeof state); - state = 0; - toku_scoped_malloc_init(); - toku_pthread_t tid; - int r; - r = toku_pthread_create(&tid, NULL, sm_test_f, NULL); - assert_zero(r); - void *ret; - while (state != 1) sleep(1); - toku_scoped_malloc_destroy_set(); - state = 2; - r = toku_pthread_join(tid, &ret); - assert_zero(r); - toku_scoped_malloc_destroy_key(); - return 0; -} diff -Nru mariadb-5.5-5.5.44/VERSION mariadb-5.5-5.5.46/VERSION --- mariadb-5.5-5.5.44/VERSION 2015-06-09 20:25:55.000000000 +0000 +++ mariadb-5.5-5.5.46/VERSION 2015-10-09 16:50:17.000000000 +0000 @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=44 +MYSQL_VERSION_PATCH=46 MYSQL_VERSION_EXTRA= diff -Nru mariadb-5.5-5.5.44/vio/viosslfactories.c mariadb-5.5-5.5.46/vio/viosslfactories.c --- mariadb-5.5-5.5.44/vio/viosslfactories.c 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/vio/viosslfactories.c 2015-10-09 16:50:40.000000000 +0000 @@ -21,31 +21,42 @@ static my_bool ssl_algorithms_added = FALSE; static my_bool ssl_error_strings_loaded= FALSE; -/* the function below was generated with "openssl dhparam -2 -C 1024" */ +/* the function below was generated with "openssl dhparam -2 -C 2048" */ static -DH *get_dh1024() +DH *get_dh2048() { - static unsigned char dh1024_p[]={ - 0xEC,0x46,0x7E,0xF9,0x4E,0x10,0x29,0xDC,0x44,0x97,0x71,0xFD, - 0x71,0xC6,0x9F,0x0D,0xD1,0x09,0xF6,0x58,0x6F,0xAD,0xCA,0xF4, - 0x37,0xD5,0xC3,0xBD,0xC3,0x9A,0x51,0x66,0x2C,0x58,0xBD,0x02, - 0xBD,0xBA,0xBA,0xFC,0xE7,0x0E,0x5A,0xE5,0x97,0x81,0xC3,0xF3, - 0x28,0x2D,0xAD,0x00,0x91,0xEF,0xF8,0xF0,0x5D,0xE9,0xE7,0x18, - 0xE2,0xAD,0xC4,0x70,0xC5,0x3C,0x12,0x8A,0x80,0x6A,0x9F,0x3B, - 0x00,0xA2,0x8F,0xA9,0x26,0xB0,0x0E,0x7F,0xED,0xF6,0xC2,0x03, - 0x81,0xB5,0xC5,0x41,0xD0,0x00,0x2B,0x21,0xD4,0x4B,0x74,0xA6, - 0xD7,0x1A,0x0E,0x82,0xC8,0xEE,0xD4,0xB1,0x6F,0xB4,0x79,0x01, - 0x8A,0xF1,0x12,0xD7,0x3C,0xFD,0xCB,0x9B,0xAE,0x1C,0xA9,0x0F, - 0x3D,0x0F,0xF8,0xD6,0x7D,0xDE,0xD6,0x0B, + static unsigned char dh2048_p[]={ + 0xA1,0xBB,0x7C,0x20,0xC5,0x5B,0xC0,0x7B,0x21,0x8B,0xD6,0xA8, + 0x15,0xFC,0x3B,0xBA,0xAB,0x9F,0xDF,0x68,0xC4,0x79,0x78,0x0D, + 0xC1,0x12,0x64,0xE4,0x15,0xC9,0x66,0xDB,0xF6,0xCB,0xB3,0x39, + 0x02,0x5B,0x78,0x62,0xFB,0x09,0xAE,0x09,0x6B,0xDD,0xD4,0x5D, + 0x97,0xBC,0xDC,0x7F,0xE6,0xD6,0xF1,0xCB,0xF5,0xEB,0xDA,0xA7, + 0x2E,0x5A,0x43,0x2B,0xE9,0x40,0xE2,0x85,0x00,0x1C,0xC0,0x0A, + 0x98,0x77,0xA9,0x31,0xDE,0x0B,0x75,0x4D,0x1E,0x1F,0x16,0x83, + 0xCA,0xDE,0xBD,0x21,0xFC,0xC1,0x82,0x37,0x36,0x33,0x0B,0x66, + 0x06,0x3C,0xF3,0xAF,0x21,0x57,0x57,0x80,0xF6,0x94,0x1B,0xA9, + 0xD4,0xF6,0x8F,0x18,0x62,0x0E,0xC4,0x22,0xF9,0x5B,0x62,0xCC, + 0x3F,0x19,0x95,0xCF,0x4B,0x00,0xA6,0x6C,0x0B,0xAF,0x9F,0xD5, + 0xFA,0x3D,0x6D,0xDA,0x30,0x83,0x07,0x91,0xAC,0x15,0xFF,0x8F, + 0x59,0x54,0xEA,0x25,0xBC,0x4E,0xEB,0x6A,0x54,0xDF,0x75,0x09, + 0x72,0x0F,0xEF,0x23,0x70,0xE0,0xA8,0x04,0xEA,0xFF,0x90,0x54, + 0xCD,0x84,0x18,0xC0,0x75,0x91,0x99,0x0F,0xA1,0x78,0x0C,0x07, + 0xB7,0xC5,0xDE,0x55,0x06,0x7B,0x95,0x68,0x2C,0x33,0x39,0xBC, + 0x2C,0xD0,0x6D,0xDD,0xFA,0xDC,0xB5,0x8F,0x82,0x39,0xF8,0x67, + 0x44,0xF1,0xD8,0xF7,0x78,0x11,0x9A,0x77,0x9B,0x53,0x47,0xD6, + 0x2B,0x5D,0x67,0xB8,0xB7,0xBC,0xC1,0xD7,0x79,0x62,0x15,0xC2, + 0xC5,0x83,0x97,0xA7,0xF8,0xB4,0x9C,0xF6,0x8F,0x9A,0xC7,0xDA, + 0x1B,0xBB,0x87,0x07,0xA7,0x71,0xAD,0xB2,0x8A,0x50,0xF8,0x26, + 0x12,0xB7,0x3E,0x0B, }; - static unsigned char dh1024_g[]={ + static unsigned char dh2048_g[]={ 0x02, }; DH *dh; if ((dh=DH_new()) == NULL) return(NULL); - dh->p=BN_bin2bn(dh1024_p,sizeof(dh1024_p),NULL); - dh->g=BN_bin2bn(dh1024_g,sizeof(dh1024_g),NULL); + dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); + dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); if ((dh->p == NULL) || (dh->g == NULL)) { DH_free(dh); return(NULL); } return(dh); @@ -259,7 +270,7 @@ } /* DH stuff */ - dh=get_dh1024(); + dh=get_dh2048(); SSL_CTX_set_tmp_dh(ssl_fd->ssl_context, dh); DH_free(dh); diff -Nru mariadb-5.5-5.5.44/win/packaging/ca/CustomAction.cpp mariadb-5.5-5.5.46/win/packaging/ca/CustomAction.cpp --- mariadb-5.5-5.5.44/win/packaging/ca/CustomAction.cpp 2015-06-09 20:25:59.000000000 +0000 +++ mariadb-5.5-5.5.46/win/packaging/ca/CustomAction.cpp 2015-10-09 16:50:40.000000000 +0000 @@ -17,6 +17,8 @@ #define UNICODE #endif +#undef NOMINMAX + #include #include #include