Commit graph

172503 commits

Author SHA1 Message Date
Sergei Golubchik
4569a895f9 simplify and unify my_safe_alloca usage 2015-09-04 10:32:02 +02:00
Sergei Golubchik
b6776b3ca5 package new SELinux/AppArmor policies instead of old ones 2015-09-04 10:32:02 +02:00
Sergei Golubchik
a0114b8627 cmake: don't repeat yourself
make repeated cmake runs less verbose:
* remove few not very useful MESSAGE's
* only run pkg_check_modules() if there's no cached result
* only print QQGraph messages on the first run
2015-09-04 10:32:02 +02:00
Sergei Golubchik
e74f91dfd7 cmake: always use the same function to test for compiler flags
Fix all cmake tests (including plugin) to use
MY_CHECK_AND_SET_COMPILER_FLAG. And fix that function
to be compatible with cmake 3.0. This way flag checks
are correctly cached (even in cmake 3.0) and properly reused.
2015-09-04 10:32:02 +02:00
Sergei Golubchik
efbd4bb039 cmake: fix warnings when PLUGIN_MROONGA=NO 2015-09-04 10:32:01 +02:00
Sergei Golubchik
d33c8831e8 more 32-bit fixes 2015-09-04 08:47:29 +02:00
Sergei Golubchik
1a599c79ff test fixes for 32bit 2015-09-03 21:51:45 +02:00
Sergei Golubchik
8f6aac81d7 fix innodb.innodb_uninstall test to cleanup after itself
It caused the following main.innodb_load_xa to fail.
2015-09-03 17:11:18 +02:00
Sergei Golubchik
ce8d4d39ac cleanup: comment 2015-09-03 16:32:17 +02:00
Sergei Golubchik
a5b0a32ac3 Merge branch '10.0-galera' into 10.1 2015-09-03 16:32:00 +02:00
Sergei Golubchik
09307c443c clang warning 2015-09-03 12:58:53 +02:00
Sergei Golubchik
530a6e7481 Merge branch '10.0' into 10.1
referenced_by_foreign_key2(), needed for InnoDB to compile,
was taken from 10.0-galera
2015-09-03 12:58:41 +02:00
Alexander Barkov
5088cbf4ed MDEV-8671 Wrong result for SELECT..WHERE varchar_column=' 1' AND (varchar_column XOR '1') 2015-09-02 15:56:24 +04:00
Kristian Nielsen
0671430252 After-merge fix. 2015-09-02 11:11:24 +02:00
Kristian Nielsen
ef82cb7c2c Merge MDEV-8725 into 10.1 2015-09-02 10:53:37 +02:00
Kristian Nielsen
09bfaf3a13 Fix a potential lost wakeup for binlog_commit_wait_usec
If a transaction T1 needs to wait for a transaction T2, T2's commit will
skip the normal binlog_commit_wait_usec delay, in order not to needlessly
stall throughput.

This works by checking if T2 is already ready to commit. If so, it is woken
up. If not, we set a flag in T2 so that when it gets ready to commit, it
will do so immediately.

But there was a potential race due to insufficient locking, if T2 gets ready
to commit just at the point where T1 does the check. If the race hits, the
wakeup (and early commit) of T2 might be lost.

The race is only theoretical (from code inspection, no known test case), but
seems best to fix it anyway, by properly locking LOCK_prepare_ordered around
the check.
2015-09-02 10:08:09 +02:00
Kristian Nielsen
999c43aeb7 MDEV-8725: Assertion `!(thd->rgi_slave && thd-> rgi_slave->did_mark_start_commit)' failed in ha_rollback_trans
The assertion is there to catch cases where we rollback while
mark_start_commit() is active. This can allow following event groups
to be replicated too early, causing conflicts.

But in this case, we have an _explicit_ ROLLBACK event in the binlog,
which should not assert.

We fix this by delaying the mark_start_commit() in the explicit
ROLLBACK case. It seems safest to delay this in ROLLBACK case anyway,
and there should be no reason to try to optimise this corner case.
2015-09-02 09:57:18 +02:00
Alexander Barkov
4f37a861c9 The fix for MDEV-8723 unintentionally broke vcol_supported_sql_funcs_myisam
and vcol_supported_sql_funcs_innodb. Moving the test for using CHARSET(),
COLLATION(), COERCIBILITY() in virtual column from
vcol_supported_sql_funcs_xxx to vcol_blocked_sql_funcs_xxx,
as these functions are not supported in virtual columns any longer.
Discussed with Sanja on IRC.
2015-09-02 11:51:07 +04:00
Alexander Barkov
aa1002a35c MDEV-8723 Wrong result for SELECT..WHERE COLLATION(a)='binary' AND a='a' 2015-09-02 08:20:49 +04:00
Alexander Barkov
68810129a0 MDEV-8695 Wrong result for SELECT..WHERE varchar_column='a' AND CRC32(varchar_column)=3904355907 2015-09-01 22:48:17 +04:00
Monty
4f0255cbf9 Fixed errors and bugs found by valgrind:
- If run with valgrind, mysqltest will now wait longer when syncronizing slave with master
- Ensure that we wait with cleanup() until slave thread has stopped.
- Added signal_thd_deleted() to signal close_connections() that all THD's has been freed.
- Check in handle_fatal_signal() that we don't use variables that has been freed.
- Increased some timeouts when run with --valgrind

Other things:
- Fixed wrong test in one_thread_per_connection_end() if galera is used.
- Removed not needed calls to THD_CHECK_SENTRY() when we are calling 'delete thd'.
2015-09-01 18:42:02 +03:00
Monty
56aa19989f MDEV-6152: Remove calls to current_thd while creating Item
Part 5: Removing calls to current_thd in net_read calls, creating fields,
        query_cache, acl and some other places where thd was available
2015-09-01 18:42:02 +03:00
Alexander Barkov
8ea9b8c0b1 MDEV-8722 The patch for MDEV-8688 disabled equal field propagation for temporal column and BETWEEN and IN
Item::cmp_context was inconsistently used in combination with cmp_type()
and result_type() in different places of the code. Fixed to use cmp_type()
in all places where cmp_context is involved, to avoid unexpected results
for temporal data types (which have result_type()==STRING_RESULT and
cmp_type==TIME_RESULT).
2015-09-01 19:24:58 +04:00
Oleksandr Byelkin
4b41e3c7f3 MDEV-6219: Server crashes in Bitmap<64u>::merge (this=0x180, map2=...) on 2nd execution of PS with INSERT .. SELECT, derived_merge
Problem: Not all permanent Item_direct_view_ref was in permanent list of used items of the view.

Solution: Detect creating permenent view/derived table reference and put them in the permanent list at once.
2015-08-31 18:40:24 +02:00
Alexander Barkov
a3c24ee739 MDEV-8707 Wrong result for
SELECT..WHERE varchar_column=DATE'2001-01-01' AND varchar_column='2001-01-01'
2015-08-31 18:18:10 +04:00
Alexander Barkov
44a99777bf MDEV-8698 Wrong result for SELECT..WHERE a BETWEEN 'a' AND 'c' COLLATE latin1_bin; 2015-08-29 23:08:15 +04:00
Alexander Barkov
787adc6166 MDEV-8680 Wrong result for SELECT..WHERE a IN ('a' COLLATE latin1_bin,'b') AND a='a'
The fix for MDEV-8688 fixed MDEV-8680 as well. Just adding a test case.
2015-08-29 21:41:37 +04:00
Alexander Barkov
f071a12498 MDEV-8688 Wrong result for
SELECT..WHERE varchar_column IN (1,2,3) AND varchar_column=' 1';
2015-08-29 19:26:30 +04:00
Alexander Barkov
09fb51255a Clean-up: removing duplicate code: removing
Item_func_in::compare_collation() and Item_func_between::compare_collation(),
and adding Item_func_opt_neg::compare_collation() instead.
2015-08-29 18:45:04 +04:00
Alexander Barkov
b4e56a5658 Moving common members of Item_func_in and Item_func_between to their
parent Item_func_opt_neg. A pre-requisite patch for a number of
upcoming equal field propagation related bug fixes.
2015-08-29 16:31:11 +04:00
Alexander Barkov
3ba2a958be MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'
Note, the patch for MDEV-8661 unintentionally fixed MDEV-8694 as well,
as a side effect. Adding a real clear fix: implementing
Item_func_like::propagate_equal_fields() with comments.
2015-08-28 17:03:09 +04:00
Monty
3bca8db4f9 MDEV-6152: Remove calls to current_thd while creating Item
- Part 4: Removing calls to sql_alloc() and sql_calloc()

Other things:
- Added current_thd in some places to make it clear that it's called (easier to remove later)
- Move memory allocation from Item_func_case::fix_length_and_dec() to Item_func_case::fix_fields()
- Added mem_root to some new calls
- Fixed some wrong UNINIT_VAR() calls
- Fixed a bug in generate_partition_syntax() in case of errors
- Added mem_root to argument to new thread_info
- Simplified my_parse_error() call in sql_yacc.yy
2015-08-27 22:29:11 +03:00
Monty
3cb578c001 MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front()

Other things:
- Added THD as an argument to some partition functions.
- Added memory overflow checking for XML tag's in read_xml()
2015-08-27 22:21:08 +03:00
Alexander Barkov
ba340d8c47 Making Item_field::can_be_substituted_to_equal_item() private. 2015-08-26 23:17:34 +04:00
Alexander Barkov
1b6b44b6b5 MDEV-8661 Wrong result for SELECT..WHERE a='a' AND a='a' COLLATE latin1_bin
MDEV-8679 Equal field propagation is not used for VARCHAR when it safely could
2015-08-26 22:32:01 +04:00
Jan Lindström
c0b7bf2625 MDEV-8683: Bunch of tests fail in buildbot on new InnoDB variables 2015-08-26 18:07:34 +03:00
Jan Lindström
3ed384baf0 Merge pull request #94 from ericherman/evict_table_metric
Evict table metric
2015-08-26 14:59:33 +03:00
Eric Herman
f66ef6a05d Add lru evict count for the idle loop (xtradb) 2015-08-26 11:50:47 +02:00
Eric Herman
b7abdcf5c7 Add lru evict count for the idle loop (innobase)
port of work by dveeden:
555ca34958
2015-08-26 11:49:21 +02:00
Eric Herman
df32920ba0 Add eviction count for table cache lru cleanup (xtradb) 2015-08-26 10:27:19 +02:00
Eric Herman
4f4373fe31 Add eviction count for table cache lru cleanup (innobase)
This is a port of dveeden's work:

e9d00e859e

(Mostly changes in linenumbers, a bit of whitespace fix-up.)
2015-08-26 10:24:03 +02:00
Elena Stepanova
cf154cc9d2 MDEV-8676 Some storage_engine tests fail on 10.1
- foreign_keys: adjusted according to code changes;
- type_spatial: adjusted according to code changes;
- type_spatial_indexes (for MyISAM): disabled till MDEV-8675 is fixed
2015-08-26 02:09:57 +03:00
Nirbhay Choubey
f533b2b462 Merge branch '5.5-galera' into 10.0-galera 2015-08-25 11:15:45 -04:00
Jan Lindström
871259f171 MDEV-8665: innodb.innodb_bug14147491 fails in buildbot on some debug builds
Added MTR suppressions for database corruption that is intentionally
caused in test.
2015-08-25 16:15:22 +03:00
Sergey Vojtovich
27444871a8 UNINIT_VAR() fixes
Restored self-initialization version of UNINIT_VAR() for all gcc versions.
Fixed UNINIT_VAR() usage: it is supposed to be used along with declaration.
2015-08-25 11:46:31 +04:00
Elena Stepanova
b66455f67d Increase the version number 2015-08-24 01:41:12 +03:00
Elena Stepanova
aef8bfdc82 MDEV-8670 main.mdev-504 fails on Windows (in buildbot and outside)
Test failed because it hit net_write_timeout. It might happen in
different circumstances, and that's not what the testcase tests,
so the timeout is now set to a bigger value.
2015-08-24 01:37:21 +03:00
Elena Stepanova
c18110bd52 Increase the version number 2015-08-23 00:57:57 +03:00
Nirbhay Choubey
472d66320d MDEV-8149: Random mtr test failures during warning check
Do not replicate commands from check-warnings.test to other
nodes in the cluster.
2015-08-22 01:18:02 -04:00
Alexander Barkov
98ba2bf424 Clean-up: moving compare_collation() from Item to Item_bool_func. 2015-08-21 17:08:55 +04:00