Cleanups:
* remove unused HA_EXTRA_EXPORT (can be added later if needed, e.g. for Aria)
* clarify the meaning of HA_CAN_EXPORT
* make all engines that support EXPORT to announce it
* reduce code duplication
Syntax. Server support. Test cases.
InnoDB bugfixes:
* don't mess around with system sprintf's, always use my_error() for errors.
* don't use InnoDB internal error codes where OS error codes are expected.
* don't say "file not found", when it was.
Update InnoDB to 5.6.14
Apply MySQL-5.6 hack for MySQL Bug#16434374
Move Aria-only HA_RTREE_INDEX from my_base.h to maria_def.h (breaks an assert in InnoDB)
Fix InnoDB memory leak
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
to find header files from the bundled libraries
(jemalloc, yassl, readline, pcre, etc)
before the ones installed in the system.
on server shutdown after SELECT with CONVERT_TZ
It's wrong to return my_empty_string from val_str().
Removing my_empty_string. Using make_empty_result() instead.
INSTALL PLUGIN
There was mixed lock order between LOCK_plugin, LOCK_global_system_variables
and LOCK_system_variables_hash. This patch ensures that write-lock on
LOCK_system_variables_hash doesn't intersect with LOCK_plugin.
Fixed by moving initialization/deinitialization of plugin options from
plugin_add()/plugin_del() to plugin_initialize()/plugin_deinitalize().
So that plugin options are handled without protection of LOCK_plugin.
if two threads were calling mi_assign_to_key_cache() for the same table,
one could change share->key_cache while the other was having
share->key_cache->op_lock locked. The other thread would crash then,
trying to unlock share->key_cache->op_lock (because it would be a different mutex).
fixed by caching the value of share->key_cache in a local variable. The thread can still
call flush_key_blocks() for an unassigned keycache, but it's harmless.
Old code in create_tmp_table(), that created an extra one-byte field (recinfo)
before every NULL-able grouping field (Field) in the tmp table, did not actually work.
Because the matching code in end_update(), that was supposed to update this byte,
was using a wrong offset, updating the first byte of the Field, not a byte before it.
Normally this wasn't an issue, because the Field value (written later in end_update)
was overwriting this byte anyway. But in this bug the Field was Field_null, with zero
length, so end_update() was overwriting the first byte of the following field.
And the following field was not-nullable constant, which was stored only once in
create_tmp_table and never updated later.
Fixed by removing the code that didn't do any useful work anyway.
Added variable "OLD_MODE" that can be used to turn off the new behavior
mysql-test/r/insert.result:
Added test case
mysql-test/r/mysqld--help.result:
Added old_mode
mysql-test/suite/sys_vars/r/old_mode_basic.result:
Added testing of new variable
mysql-test/suite/sys_vars/t/old_mode_basic.test:
Added testing of new variable
mysql-test/t/insert.test:
Added test case
sql/sql_class.h:
Added bit flags for OLD_MODE
sql/sql_insert.cc:
Disable duplicate key warnings for INSERT IGNORE of OLD_MODE NO_DUP_KEY_WARNINGS_WITH_IGNORE is used
sql/sql_show.cc:
Don't show progress reporting on SHOW PROCESSLIST if OLD_MODE NO_PROGRESS_INFO is used
sql/sys_vars.cc:
Added OLD_MODE
sql/item.h:
Added cache for setup_natural_join_row_types
sql/sql_base.cc:
Cache old value of first_name_resolution_table for next call.
(It's not safe to try to recalculate the value as the join structure may have been changed by the optimizer)
Added test cases
mysql-test/r/mysql_tzinfo_to_sql_symlink.result:
Updated results
mysql-test/std_data/zoneinfo/garbage:
test file
mysql-test/std_data/zoneinfo/ignored.tab:
test file
mysql-test/t/mysql_tzinfo_to_sql_symlink.test:
Added test cases for all options
sql/tztime.cc:
Better error messages.
Fixed wrong place for 'continue'
Problem was that ALTER TABLE DISABLE KEYS incremented create_trid for the table,
which made the new index entries invisible until the global trid catched up.
Fixed by only updating create_trid if we are rewriting all rows and indexes.
mysql-test/suite/maria/alter.result:
Added test case
mysql-test/suite/maria/alter.test:
Added test case
storage/maria/ha_maria.cc:
Only updating create_trid if we are doing a full repair (and thus rewriting all rows and indexes).
storage/maria/trnman.c:
More DBUG_PRINT
MDEV-5337: Wrong result in mariadb 5.5.32 with ORDER BY + LIMIT when
index_condition_pushdown=on
- in test_if_skip_sort_order(), correct the condition under which
we have the code that restores the previously pushed index condition.