Commit graph

171654 commits

Author SHA1 Message Date
Sergei Golubchik
e24caa7588 small cleanup
* keep all com_xxx constants together in struct system_status_var
* fix an outdated comment in sql_cmd.h
* fix an off-by-one bug in mysqld.cc
2015-06-27 09:40:56 +02:00
Sergei Golubchik
c47acc21aa remove unused function and array 2015-06-27 09:40:55 +02:00
Sergei Golubchik
794a895c4c simplify CREATE TEMPORARY TABLE parser rule
as a bonus that makes CREATE TEMPORARY TEMPORARY TABLE illegal
2015-06-27 09:40:55 +02:00
Sergei Golubchik
bfabaf6486 Deinitialize plugins in the reverse plugin_type_initialization_order
Old code worked because plugin locking guaranteed that
encryption plugin is deinitialized last.
But compiled-in plugins are never locked.

This fixes encryption failures on fulltest builder
2015-06-27 09:40:55 +02:00
Sergei Golubchik
ff7a1ff6d7 fix printf format string 2015-06-27 09:40:54 +02:00
Sergei Golubchik
8036ad0a08 misc encryption tests fixes
* support statically compiled file_key_management when possible
* rename encryption.encryption_create_or_replace -> encryption.create_or_replace
* delete unnecessary *.opt file (including
  have_key_management_plugin.inc is enough)
* remove unnecessary LOWER() for strings that are compared
  case insensitively anyway
2015-06-27 09:40:54 +02:00
Sergei Golubchik
627c6e812b MDEV-8298 sys_vars.all_vars fails in -DWITH_WSREP=OFF build
Disable sys_vars.all_vars test. There's no need to write
boilerplate tests for every new system variable, our
INFORMATION_SCHEMA.SYSTEM_VARIABLES and sysvar_* tests
are now used to show all basic properties of all variables.
2015-06-27 09:40:54 +02:00
Sergei Golubchik
e7620ce4ce MDEV-8281 aes_decrypt crashes in block_crypt()
fix aes_decrypt of yassl to support zero-length input
2015-06-27 09:40:54 +02:00
Sergei Golubchik
e20be69ecc update test results and 32-bit rdiffs 2015-06-27 09:40:42 +02:00
Alexander Barkov
55d8ee5f70 MDEV-8239 Reverse spatial operations OP(const, field) do not get optimized
Moving Item_func_spatial_rel from Item_bool_func to Item_bool_func2.
to make OP(const,field) use indexes.
- MBR functions supported OP(const,field) optimization in 10.0,
but were inintentionally broken in an earlier 10.1 change that introduced
a common parent for Item_func_spatial_mbr_rel and Item_func_spatial_precise_rel.
- Precise functions never supported optimization for OP(const,field).
Now both MBR and precise functions support OP(const,field) optimization.
2015-06-26 22:49:49 +04:00
Alexander Barkov
cb5f32ebe3 Moving Item_func_xor out of Item_bool_func2, as it does not need
any of the optimizer related functionality.
2015-06-26 20:00:24 +04:00
Alexander Barkov
40e5aceaff Removing Item_int_func::sargable. Adding virtual implementations of
count_sargable_conds() instead for Item_func_in, Item_func_null_predicate,
Item_bool_func2. There other Item_int_func descendants that used to set
"sargable" to true (Item_func_between, Item_equal) already have their
own implementation of count_sargable_conds(). There is no sense to
have two parallel coding models for the same thing.
2015-06-26 17:46:34 +04:00
Alexander Barkov
436411860e Moving ST_RELATE() implementation out of Item_func_precise_spatial_rel,
adding a separte class Item_func_spatial_relate for ST_RELATE().
This is a preparatory patch for:
 MDEV-8239 Reverse spatial operations OP(const, field) do not get optimized
2015-06-26 15:42:49 +04:00
Alexander Barkov
4f828a1cac MDEV-8214 Asian MB2 charsets: compare broken bytes as "greater than any non-broken character" 2015-06-26 13:40:28 +04:00
Jan Lindström
d535728165 MDEV-8219: enforce_storage_engine cannot be set globally
Change session only variable enforce_storage_engine to be
session variable and make sure that also global value
is used if session variable is not set.
2015-06-26 11:43:16 +03:00
Alexander Barkov
a4b0063d7b MDEV-8256 A part of a ROW comparison is erroneously optimized away
Item_func_eq's created during conversion of a ROW equality to a conjunction
of scalar equalities did not set cmp_context for its arguments properly,
so some of these created Item_func_eq could be later erroneously eliminated.
2015-06-26 10:58:51 +04:00
Alexander Barkov
4a7afdde86 MDEV-8373 Zero date can be inserted in strict no-zero mode through CREATE TABLE AS SELECT timestamp_field 2015-06-26 10:18:34 +04:00
Alexander Barkov
115904c2c8 MDEV-7824 [Bug #68041] Zero date can be inserted in strict no-zero mode through a default value 2015-06-26 10:16:51 +04:00
Jan Lindström
874df5092b Fix failing test case. 2015-06-26 08:34:09 +03:00
Alexey Botchkov
9111ab7127 GIS-related tests started to fail as some related functions
don't return NULL-s anymore, and actually they're not BOOLEAN.
Fixed.
2015-06-25 13:16:27 +05:00
Alexander Barkov
42bc08b347 MDEV-8229 GROUP_MIN_MAX is erroneously applied for BETWEEN in some cases 2015-06-25 12:51:32 +04:00
Nirbhay Choubey
1f4a89b10c Do print SST log messages. 2015-06-24 23:38:04 -04:00
Kristian Nielsen
565960816e Merge MDEV-8354 into 10.1 2015-06-24 17:18:12 +02:00
Kristian Nielsen
b89de2b2ce MDEV-8354: out-of-order error with --gtid-ignore-duplicates and row-based replication
The --gtid-ignore-duplicates option was not working correctly with row-based
replication. When a row event was completed, but before committing, there
was a small window where another multi-source SQL thread could wrongly try
to re-execute the same transaction, without properly ignoring the duplicate
GTID. This would lead to duplicate key error or out-of-order GTID error or
similar.

Thanks to Matt Neth for reporting this and giving an easy way to reproduce
the issue.
2015-06-24 16:52:50 +02:00
Alexey Botchkov
d43df4a33a These functions can never return NULL. 2015-06-23 15:06:23 +05:00
Jan Lindström
b7ff2f1b59 MDEV-7472: Implementation of user statements for handling the xtradb changed page bitmaps
Introduce a new dummy INFORMATION_SCHEMA.CHANGED_PAGE_BITMAPS table to XtraDB
with reset_table callback to allow FLUSH NO_WRITE_TO_BINLOG CHANGED_PAGE_BITMAPS
to be called from innobackupex.
2015-06-23 14:46:06 +03:00
Alexey Botchkov
d3b7eb7b99 MDEV-7528 GIS: Functions return NULL instead of specified -1 for NULL arguments.
The behaviour required by the standard seems too weird to expect.
2015-06-23 11:57:05 +05:00
Alexey Botchkov
3e4126e9d6 Merge branch '10.1' of github.com:MariaDB/server into 10.1 2015-06-23 11:30:39 +05:00
Sergey Vojtovich
9b57b214c4 MDEV-8199 - first_breadth_first_tab() takes 0.07% in OLTP RO
This is an addition to original patch: cleanups for next_breadth_first_tab().

Overhead change:
next_breadth_first_tab()  0.04% -> out of radar
2015-06-23 09:54:36 +04:00
Sergey Vojtovich
45f41b52e8 MDEV-8199 - first_breadth_first_tab() takes 0.07% in OLTP RO
Split first_breadth_first_tab() into
JOIN::first_breadth_first_optimization_tab() and
JOIN::first_breadth_first_execution_tab().

This allows to eliminate function call and one condition. Adjusted callers
accordingly.

Overhead change:
first_breadth_first_tab()        0.07% -> out of radar
next_breadth_first_tab()         0.04% -> 0.04%
JOIN::cleanup()                  0.15% -> 0.11%
JOIN::save_explain_data_intern() 0.28% -> 0.24%
2015-06-23 09:54:36 +04:00
Sergey Vojtovich
84568c2965 MDEV-8030 - Apc_target::disable() locks mutex twice
Moved Apc_target::destroy(), Apc_target::enable() and Apc_targe::disable()
definitions to my_apc.h so that they can be inlined.

Apc_targe::disable() now calls Apc_target::process_apc_requests() only if
there're APC requests. This saves one pthread_mutex_lock() call.

Overhead change:
Apc_target::disable              0.04% -> out of radar
Apc_target::enable               0.03% -> out of radar
Apc_target::process_apc_requests 0.02% -> out of radar
pthread_mutex_lock               0.43% -> 0.42%
pthread_mutex_unlock             0.26% -> 0.25%
2015-06-23 09:54:36 +04:00
Alexey Botchkov
fb3e31203f MDEV-7925 Inconsistent behavior of ST_Touches with a POINT as one of arguments.
Some cases of the feature's borders were treated incorrectly.
2015-06-22 23:33:35 +05:00
Vicențiu Ciorbaru
0357791e3c MDEV-8280: crash in 'show global status' with --skip-grant-tables
The crash was caused by attempting to use a hashtable without
it getting initialized, due to the --skip-grant-tables switch.
2015-06-22 08:44:46 +03:00
Sergei Petrunia
cbb8b2d033 More testcases. 2015-06-20 05:01:16 +03:00
Sergei Petrunia
ebe2bd74fe MDEV-7836: ANALYZE FORMAT=JSON should provide info about GROUP BY
ANALYZE should also record remove_duplicates() operation.
2015-06-20 04:20:18 +03:00
Sergei Petrunia
f33173d19e MDEV-8282: crash in filesort() with simple ordered delete
Handle the case where the optimizer decides to use
handler->delete_all_rows(), but then this call returns
HA_ERR_UNSUPPORTED and execution switches to regular
row-by-row deletion.
2015-06-20 01:24:06 +03:00
Sergey Vojtovich
12d9fe14be MDEV-7956 - handler::rebind_psi() takes 0.07% in OLTP RO
Do not call handler::rebind_psi() and handler::unbind_psi() when performance
schema is compiled out.

Overhead change:
handler::rebind_psi 0.04% -> out of radar
handler::unbind_psi 0.03% -> out of radar
open_table          0.21% -> 0.18%
close_thread_table  0.05% -> 0.05%
2015-06-19 15:06:34 +04:00
Sergey Vojtovich
8f603bcbca MDEV-7952 - clock_gettime() takes 0.24% in OLTP RO
Initialize abs_timeout when it is about to be used. This saves one my_hrtime()
call on hot path (when we acquire MDL lock without waiting).

When filling I_S.PROCESSLIST use THD::start_utime/THD::utime_after_query instead
of THD::start_time. This allows us to save 2 clock_gettime() calls.

Overhead change:
__clock_gettime   0.13% -> 0.11% (122 -> 76 calls per OLTP RO transaction)
my_interval_timer 0.07% -> 0.06%
my_hrtime         0.04% -> 0.01%
2015-06-19 15:06:34 +04:00
Sergey Vojtovich
2bc6e29afe MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Pass THD to Sort_and_group_tracker::report_sorting().
This reduces number of pthread_getspecific() calls from 292 to 290.
2015-06-19 15:06:34 +04:00
Sergey Vojtovich
360176f397 MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Pass THD to Item_field (and all derivatives) constructors.
This reduces number of pthread_getspecific() calls from 322 to 292.
2015-06-19 15:06:34 +04:00
Sergey Vojtovich
b85e5efca3 MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO
Pass THD to find_all_keys() and Item_equal::Item_equal().
In MRR use table->in_use instead of current_thd.

This reduces number of pthread_getspecific() calls from 354 to 320.
2015-06-19 15:06:34 +04:00
Sergey Vojtovich
2b253ed41f MDEV-8324 - MariaDB fails to build with performance schema disabled
Various fixes to let MariaDB compile with performance schema disabled.
2015-06-19 15:06:33 +04:00
Alexander Barkov
366cda4937 Adding "const" qualifier into a few methods in Field. 2015-06-18 23:27:44 +04:00
Alexander Barkov
091f67738e Removing duplicate code: Adding a protected method
Field_temporal_with_date::validate_for_get_date()
and reusing it in a few places.
2015-06-18 22:16:44 +04:00
Jan Lindström
f5ddffd83e MDEV-8156: Assertion failure in file log0crypt.cc line 220 on server restart
Instead of asserting print informative error message to error log
and return failure from innodb_init causing the server to shutdown.
2015-06-18 20:01:00 +03:00
Sergei Petrunia
e2a59eba5d Make dbug_print_item() print conditions in siccint form 2015-06-18 14:52:17 +03:00
Sergei Petrunia
caf4291d29 Remove garbage comment 2015-06-18 14:51:50 +03:00
Jan Lindström
eb2c170bb0 MDEV-8303; Dumping buffer pool noisy in the logs.
Added new dynamic configuration variable innodb_buf_dump_status_frequency
to configure how often buffer pool dump status is printed in the logs.
A number between [0, 100] that tells how oftern buffer pool dump status
in percentages should be printed. E.g. 10 means that buffer pool dump
status is printed when every 10% of number of buffer pool pages are
dumped. Default is 0 (only start and end status is printed).
2015-06-18 12:20:21 +03:00
Jan Lindström
b94eaff8d9 MDEV-8310: Encryption bogus message still in 10.1.5
Moved warning print to debug builds only because on production
these messages are unnecessary.
2015-06-17 09:12:26 +03:00
Kristian Nielsen
6a92fa4be5 Merge branch 'mdev8294' into 10.1 2015-06-15 08:28:04 +02:00