Commit graph

173161 commits

Author SHA1 Message Date
Jan Lindström
9337173915 MDEV-8893: Test encryption.innodb_encryption_filekeys fails on buildbot 2015-10-05 09:27:33 +03:00
Olivier Bertrand
608ad38a0d Temporary changes for making compile to work 2015-10-04 11:57:57 +02:00
Alexander Barkov
ba0b668551 A clean-up for MDEV-7950:
- Turning get_mm_tree_for_const() from a static function into
  a protected method in Item.
- Adding a new class Item_bool_func2_with_rev, for the functions and operators
  that have a reverse function and can use the range optimizer for
  to optimize "value OP field" as "field REV_OP value". Deriving
  Item_bool_rowready_func2 and Item_funt_spatial_rel from the new class.
- Removing Item_bool_func2::have_rev_func().
2015-10-04 09:37:57 +04:00
Alexander Barkov
100d77e69d Clean-up: removing the unused "Item_result cmp_type" parameter from the methods:
- Item_bool_func::get_func_mm_tree()
- Item_bool_func::get_mm_parts()
- Item_bool_func::get_ne_mm_tree()
2015-10-02 14:48:32 +04:00
Alexander Barkov
322bc6e8c9 Adding "virtual bool Field::can_optimize_range(...)" and moving the code
from Item_bool_func::get_mm_leaf() into Field_xxx::can_optimize_range().
This reduces the total amount of virtual calls. Also, it's a prerequisite
change for the pluggable data types.
2015-10-02 12:14:50 +04:00
Jan Lindström
5e7f100bf5 MDEV-8523: InnoDB: Assertion failure in file buf0buf.cc line 5963 (Failing assertion: key_version == 0 || key_version >= bpage->key_version) 2015-10-02 09:45:02 +03:00
Alexander Barkov
6b36fb96f1 Clean-up: sharing duplicate code in Item_field::val_bool_result() and
Item_ref::val_bool_result().
2015-10-02 08:54:25 +04:00
Nirbhay Choubey
38f3b99d46 MDEV-8831 : enforce_storage_engine doesn't block table creation on other nodes
Check if the engine is supported/allowed before replicating the
statement.
2015-10-01 20:36:25 -04:00
Alexander Barkov
accf9b5675 MDEV-5694 GREATEST(date, time) returns a wrong data type 2015-10-01 20:01:35 +04:00
Sergey Vojtovich
a84fae27d9 MDEV-8836 - Server crashed in my_copy_8bit on querying I_S.PROCESSLIST
Fixed race condition in code filling INFORMATION_SCHEMA.PROCESSLIST.INFO_BINARY.
When loading query string/length of another connection one must have
LOCK_thd_data locked.
2015-10-01 17:39:09 +04:00
Alexander Barkov
e1cbca1851 MDEV-657 LP:873142 - GREATEST() does not always return same signness of argument types.
The patch for MDEV-8871 also fixed the problem reported in MDEV-657.
Adding the test case from the bug report.
2015-10-01 14:21:12 +04:00
Alexander Barkov
b50c607056 MDEV-4848 Wrong metadata or column type for LEAST(1.0,'10')
MDEV-8873 Wrong field type or metadata for LEAST(int_column,string_column)
2015-10-01 14:07:42 +04:00
Sergey Vojtovich
bb22eb55db MDEV-8379 - SUSE mariadb patches
Corrected variable name in dead code for consistency.

Patch contributed by Michal Hrusecky.
2015-10-01 13:40:23 +04:00
Sergey Vojtovich
727da9c8ec MDEV-8379 - SUSE mariadb patches
Fixed unclean prototype declaration. According to ISO/IEC 9899:TC2:
...
10. The special case of an unnamed parameter of type void as the only item in
    the list specifies that the function has no parameters.
...
14. An identifier list declares only the identifiers of the parameters of the
    function. An empty list in a function declarator that is part of a
    definition of that function specifies that the function has no parameters.
    The empty list in a function declarator that is not part of a definition of
    that function specifies that no information about the number or types of the
    parameters is supplied. 124)
...
6.11.6 Function declarators

The use of function declarators with empty parentheses (not prototype-format
parameter type declarators) is an obsolescent feature.
...

Patch contributed by Michal Hrusecky.
2015-10-01 13:04:59 +04:00
Jan Lindström
3266216f2c MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
Analysis: When a page is read from encrypted table and page can't be
decrypted because of bad key (or incorrect encryption algorithm or
method) page was incorrectly left on buffer pool.

Fix: Remove page from buffer pool and from pending IO.
2015-10-01 08:20:27 +03:00
Alexander Barkov
cb2c799bd0 MDEV-8860 Wrong result for WHERE 2016 < SOME (SELECT CAST(time_column AS DATETIME) FROM t1)
MDEV-8875 Wrong metadata for MAX(CAST(time_column AS DATETIME))
2015-09-30 16:04:24 +04:00
Alexander Barkov
cc9cfecab7 MDEV-8865 Wrong field type or metadata for COALESCE(signed_int_column, unsigned_int_column)
Item_func_hybrid_field_type did not return correct field_type(), cmp_type()
and result_type() in some cases, because cached_result_type and
cached_field_type were set in independent pieces of the code and
did not properly match to each other.
Fix:
- Removing Item_func_hybrid_result_type
- Deriving Item_func_hybrid_field_type directly from Item_func
- Introducing a new class Type_handler which guarantees that
  field_type(), cmp_type() and result_type() are always properly synchronized
  and using the new class in Item_func_hybrid_field_type.
2015-09-30 12:37:34 +04:00
Jan Lindström
006acf7454 Bug #68148: drop index on a foreign key column leads to missing table
MDEV-8845: Table disappear after modifying FK

Added test case.
2015-09-30 10:49:45 +03:00
Alexander Barkov
09b87d6293 MDEV-8871 Wrong result for CREATE TABLE .. SELECT LEAST(unsigned_column,unsigned_column) 2015-09-30 10:05:16 +04:00
Jan Lindström
c13f4091f5 MDEV-8815: InnoDB should refuse to start if crash recovery fails instead of asserting
Added error handling to crash recovery so that we stop instead of
asserting.
2015-09-29 15:15:28 +03:00
Jan Lindström
a95711e45d MDEV-8855: innodb.innodb-fk-warnings fails on Windows
Fixed incorrect access to freed memory.
2015-09-29 08:39:54 +03:00
Alexander Barkov
a4e5902039 MDEV-8862 Wrong field type for MAX(COALESCE(datetime_column)) 2015-09-28 19:12:05 +04:00
Jan Lindström
c5922c5701 MDEV-8821: Failing assertion: !page || page_type != 0 in file log0recv. cc line 1404
Alloc creating crypt_data to empty page at crash recovery and redo.
2015-09-28 14:03:23 +03:00
Oleksandr Byelkin
02a38fd27e MDEV-8624: MariaDB hangs on query with many logical condition
Made no_rows_in_result()/restore_to_before_no_rows_in_result() not looking
annecessary deep with walk() method.
2015-09-28 11:56:33 +02:00
Alexander Barkov
3cc6e5b7f2 MDEV-8852 Implicit or explicit CAST from MAX(string) to INT,DOUBLE,DECIMAL does not produce warnings 2015-09-28 12:51:02 +04:00
Sergey Vojtovich
54db387410 MDEV-8682 - CSV engine does not properly process "", in quotes
Added per-table boolean IETF_QUOTES variable to CSV storage engine. It allows to
enable IETF-compatible parsing of embedded quote and comma characters. Disabled
by default.

This patch is based on Percona revision:
b32fbf0276

Note that original patch adds server variable, while this patch adds per-table
variable.
2015-09-28 12:04:26 +04:00
Elena Stepanova
f804b74fd4 MDEV-8154 rpl.show_status_stop_slave_race-7126 sporadically causes internal check failure
The patch was pushed into 10.0, but it needs to be applied to 5.5 as well
2015-09-28 03:40:29 +03:00
Nirbhay Choubey
bca5894d51 Adjust warning suppression over a recent change in galera library. 2015-09-27 19:20:43 -04:00
Elena Stepanova
ce7d8c5ee8 MDEV-7330 plugins.feedback_plugin_send fails sporadically in buildbot
The test restarts the server and expects that the feedback plugin
will send a report on shutdown, and will write about it in the error
log. But the server is only given 10 sec to shut down properly,
which is not always enough.
Added a parameter to restart_mysqld.inc, and set it to a bigger
value in feedback_plugin_send
2015-09-27 18:01:47 +03:00
Elena Stepanova
bdcf370765 MDEV-7933 plugins.feedback_plugin_send depends on being executed after plugins.feedback_plugin_load
The culprit is the feedback_plugin_load test, which is run both separately
and from inside feedback_plugin_send.test. The test queries I_S.FEEDBACK,
and every time it does, 'FEEDBACK used' value is increased.
Fixed by checking that the value is increased instead of recording the actual
value in the result file.
2015-09-27 16:00:48 +03:00
Elena Stepanova
256360956f Increased the version number 2015-09-26 02:51:29 +03:00
Elena Stepanova
86ed494aef MDEV-8849 rpl.rpl_innodb_bug30888 sporadically fails in buildbot with testcase timeout
The test would take really long if it was run without --mem.
Fixed by adding --innodb-flush-log-at-trx-commit=2
2015-09-26 02:48:55 +03:00
Nirbhay Choubey
6927459e5b MDEV-8208: Sporadic SEGFAULT on startup
Addendum:
* Before calling THD::init_for_queries(), flip the current_thd to wsrep
thread so that memory gets allocated for the right THD.
* Use wsrep_creating_startup_threads instead of plugins_are_initialized
as the condition for the execution of THD::init_for_queries() within
start_wsrep_THD(), as use of latter could still leave some room for
race.
2015-09-25 18:50:57 -04:00
Nirbhay Choubey
59037d9629 MDEV-8208: Sporadic SEGFAULT on startup
Problem:
When mysqld starts as a galera node, it creates 2 system threads
(applier & rollbacker) using start_wsrep_THD(). These threads are
created before plugin initialization (plugin_init()) for SST methods
like rsync and xtrabackup.

The threads' initialization itself can proceed in parallel to mysqld's
main thread of execution. As a result, the thread initialization code
(start_wsrep_THD()) can end up accessing some un/partially initialized
structures (like maria_hton, in this particular case) resulting in
segfault.

Solution:
Fixed by calling THD::init_for_queries() (which accesses maria_hton)
only after the plugins have been initialized.
2015-09-25 18:24:39 -04:00
Nirbhay Choubey
4d33f9dca0 Merge branch '5.5-galera' into 10.0-galera 2015-09-25 14:57:56 -04:00
Nirbhay Choubey
13615c5e18 MDEV-8208: Sporadic SEGFAULT on startup
Addendum:
* Before calling THD::init_for_queries(), flip the current_thd to wsrep
thread so that memory gets allocated for the right THD.
* Use wsrep_creating_startup_threads instead of plugins_are_initialized
as the condition for the execution of THD::init_for_queries() within
start_wsrep_THD(), as use of latter could still leave some room for
race.
2015-09-25 13:56:02 -04:00
Alexander Barkov
30711c6650 MDEV-8806 Numeric CAST produce different warnings for strings literals vs functions 2015-09-25 21:33:50 +04:00
Jan Lindström
26e4403f64 MDEV-8819: Failing assertion: block->page.space == page_get_space_id(page_align(ptr)) in file buf0buf.cc line 2551
Add error handling on page reading and do not try to access empty pages.
2015-09-25 11:54:03 +03:00
Sergei Golubchik
9554342d16 Merge branch '10.1' into pull-request-97
Merge downstream Debian packaging (MDEV-6284)
2015-09-25 10:24:14 +02:00
Alexander Barkov
4070ce00dc MDEV-8635 Redundant warnings on WHERE decimal_column='ax'
The fix for MDEV-8466 earlier fixed MDEV-8635 as well. Adding a test only.
2015-09-25 07:18:04 +04:00
Elena Stepanova
dca4ab92b8 MDEV-8841 innodb_zip.innodb-create-options fails in buildbot
The real problem is that when innodb.xa_recovery test intentionally
crashes the server, system tables can be opened and marked as crashed,
and the next test in line gets blamed for the error which appears
in the error log.
Fixed by flushing the tables before crashing the server
2015-09-24 21:24:28 +03:00
Sergei Petrunia
125001881d Fix typos in JSON MRR output 2015-09-24 16:31:45 +03:00
Sergei Petrunia
7016621596 MDEV-8829: Assertion `0' failed in Explain_table_access::tag_to_json
- Add EXPLAIN/ANALYZE FORMAT=JSON handling for a few special cases.
2015-09-24 15:45:54 +03:00
Alexander Barkov
428f03c0b5 MDEV-8839 COLUMN_GET() produces warnings with no data 2015-09-24 15:48:02 +04:00
Oleksandr Byelkin
5cc149feba The compiler warnings fixed. 2015-09-24 10:28:47 +02:00
Alexander Barkov
e541894260 Fixing a failure in "mtr --ps xml",
introduced by the patch for MDEV-8466 and MDEV-8468.
Using --enable_prepare_warnings and --disable_prepare_warnings
around the affected query, to have the same warning in regular
and --ps mtr runs.
2015-09-23 20:59:54 +04:00
Alexander Barkov
3ad035f66b MDEV-8658 DATE(zerofill_column) and DATE(COALESCE(zerofill_column)) return different results
MDEV-8660 TIME(int_zerofill_column) returns a wrong result
2015-09-23 20:42:28 +04:00
Elena Stepanova
b9da3ba45e Follow-up for MDEV-6756 - fix the ps-protocol version of the tests 2015-09-23 19:28:20 +03:00
Elena Stepanova
70effb6be8 Follow-up for MDEV-6756 - fix the embedded version of the test 2015-09-23 19:15:29 +03:00
Elena Stepanova
138e7bffaf Follow up for disabling encrypt_tmp_files and encrypt_binlog by default 2015-09-23 19:06:21 +03:00