Commit graph

65834 commits

Author SHA1 Message Date
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Sergei Golubchik
6ce20fb2b9 MDEV-9428 NO_AUTO_VALUE_ON_ZERO is ignored when a trigger before insert is defined
fix the *other* fill_record() too, arrgh!
2016-06-28 12:54:01 +02:00
Alexander Barkov
56a3496067 MDEV-10236 Where expression with NOT function gives incorrect result
Item_cache::is_null() erroneously returned null_value in a
non-cached state. Now Item_cache::is_null() uses has_value(),
which caches the value if not cached yet, similar to what other value methods do
(e.g. val_int, val_real, etc).
2016-06-28 13:11:04 +04:00
Nirbhay Choubey
7ff44b1a83 MDEV-10161: wsrep_sync_wait not enabled when set to 1 in config file
Since wsrep_sync_wait & wsrep_causal_reads variables are related,
they are always kept in sync whenever one of them changes.
Same is tried on server start, where wsrep_sync_wait get updated
based on wsrep_causal_reads' value. But, since wsrep_causal_reads
is OFF by default, wsrep_sync_wait's value gets modified and loses
its WSREP_SYNC_WAIT_BEFORE_READ bit.

Fixed by syncing wsrep_sync_wait & wsrep_causal_reads values
individually on server start in mysqld_get_one_option() based
on command line arguments used.
2016-06-27 18:30:07 -04:00
Nirbhay Choubey
90f222ea7d MDEV-10235: Deadlock in CREATE TABLE .. AS SELECT .. if result set is empty in Galera
In CTAS, handlers get registered under statement transaction
(st_transactions::stmt), while ha_fake_trx_id(), used by CTAS,
looked under standard transaction (st_transactions::all) for
registered handlers, and thus it failed to grab a fake transaction
ID. As a result, with no valid transaction ID, wsrep commit failed
with an error.

ha_fake_trx_id() now looks for handlers registered under 'stmt'
in case 'all' is empty. Also modified the logic to print warning
only once if none of the registered handlers have fake_trx_id.
2016-06-27 18:21:00 -04:00
Nirbhay Choubey
ad3584bf72 Test cleanup: Remove unnecessary global suppressions 2016-06-27 18:17:03 -04:00
Nirbhay Choubey
48a0a66ffa MDEV-10186: mysqld crash when runtime setting wsrep_cluster_address without wsrep_on=ON
On wsrep_cluster_address update, node restarts the replication
and attempts to connect to the new address. In this process it
makes a call to wsrep provider's connect API, which could lead
to segfault if wsrep provider is not loaded (wsrep_on=OFF).

Fixed by making sure that it proceeds only if a provider is
loaded.
2016-06-27 18:15:47 -04:00
Nirbhay Choubey
47e4e5dfd9 MDEV-6699: wsrep_node_name not automatically set to hostname
Update sys_vars.sysvars_wsrep test.
2016-06-27 18:06:18 -04:00
Nirbhay Choubey
b57232d3cb MDEV-6699 : wsrep_node_name not automatically set to hostname
Fixed by using hostname (glob_hostname) as default value for
wsrep_node_name system variable.
Added a test case.
2016-06-27 17:56:59 -04:00
Alexander Barkov
652e799a38 MDEV-8502 DECIMAL accepts out of range DEFAULT values
MDEV-10277 Redundant NOTE when inserting '0.00001 ' into a DECIMAL(2,1) column
2016-06-27 15:14:07 +04:00
Alexander Barkov
6f66920086 Recording innodb_ctype_ldml.result forgotten in the patch for:
MDEV-8686 A user defined collation utf8_confusables doesn't work
25e68c5e46
2016-06-23 21:57:15 +04:00
Alexander Barkov
25e68c5e46 MDEV-8686 A user defined collation utf8_confusables doesn't work
The collation customization code for the UCA (Unicode Collation Alrorithm)
based collations now allows to reset to and shift of characters with
implicit weights. Previously reset/shift worked only for the characters
with explicit DUCET weights. An attempt to use reset/shift with
character with implicit weights made the server crash.
2016-06-23 14:25:48 +04:00
Sergey Vojtovich
f289f3ee9c MDEV-9728 - Hard crash in metadata_lock_info
Disable output of MDL lock duration since there is no facility to retreive
it properly.
2016-06-23 12:16:20 +04:00
Jan Lindström
26de9061e8 Merge following commit from 5.5:
commit ef92aaf9ec
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date:   Wed Jun 22 22:37:28 2016 +0300

    MDEV-10083: Orphan ibd file when playing with foreign keys

    Analysis: row_drop_table_for_mysql did not allow dropping
    referenced table even in case when actual creating of the
    referenced table was not successfull if foreign_key_checks=1.

    Fix: Allow dropping referenced table even if foreign_key_checks=1
    if actual table create returned error.
2016-06-23 07:42:40 +03:00
Sergei Petrunia
3e03b89b0a MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in
Make tree_or set correct SEL_TREE::keys_map for the result.
2016-06-22 23:20:41 +03:00
Vicențiu Ciorbaru
b449612907 MDEV-8638: REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_ROLE breaks replication
Fix the replication failure caused by incorect initialization of
THD::invoker_host && THD::invoker_user.

Breakdown of the failure is this:
Query_log_event::host and Query_log_event::user can have their
LEX_STRING's set to length 0, but the actual str member points to
garbage. Code afterwards copies Query_log_event::host and user to
THD::invoker_host and THD::invoker_user.

Calling code for these members expects both members to be initialized.
Eg. the str member be a NULL terminated string and length have
appropriate size.
2016-06-22 16:41:38 +03:00
Igor Pashev
5fd8087590 [MDEV-9614] Roles and Users longer than 6 characters
The bug is apparent when the username is longer than the rolename.
It is caused by a simple typo that caused a memcmp call to compare a
different number of bytes than necessary.

The fix was proposed by Igor Pashev. I have reviewed it and it is the
correct approach. Test case introduced by me, using the details provided
in the MDEV.

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2016-06-22 16:41:38 +03:00
Sergei Golubchik
f9b5acfb0c Merge branch 'bb-10.0-serg' into 10.0 2016-06-22 10:54:19 +02:00
Sergei Golubchik
a10fd659aa Fixed for failures in buildbot: Replication
1. remove unnecessary rpl-tokudb combination file.
2. fix rpl_ignore_table to cleanup properly (not leave test
   grants in memory)
3. check_temp_dir() is supposed to set the error in stmt_da - do
   it even when called multiple times, this fixes a crash when
   rpl.rpl_slave_load_tmpdir_not_exist is run twice.
2016-06-22 10:40:43 +02:00
Alexander Barkov
63120090f9 MDEV-10262 ucs2_thai_520_w2: wrong implicit weights on the secondary level 2016-06-21 21:36:23 +04:00
Alexander Barkov
21479a6bb3 MDEV-9524 Cannot load from mysql.event when sql_mode is set to PAD_CHAR_TO_FULL_LENGTH
The patch fixes the problem with loading information from system tables
(e.g. event and help related tables) when PAD_CHAR_TO_FULL_LENGTH is enabled,
as well as includes some additional minor improvements:
- refactoring in get_field() to return an error rather than success
  if strmake_root() failed
- removing of duplicate code in similar functions:
  char *get_field(MEM_ROOT *mem, Field *field)
  bool get_field(MEM_ROOT *mem, Field *field, String *res)
2016-06-21 21:26:31 +04:00
Oleksandr Byelkin
911af69d1e MDEV-5973: MySQL Bug#11757486:49539: NON-DESCRIPTIVE ERR (ERROR 0 FROM STORAGE ENGINE) WITH MULTI-TABLE UPDATE
Condition in processing IGNORE clause for UPDATE & multi-table UPDATE made the same.
2016-06-21 18:48:14 +02:00
Sergei Golubchik
a69f4c783d Merge branch 'bb-10.0-serg' into 10.0 2016-06-21 15:55:37 +02:00
Sergei Golubchik
61a880d02c Merge branch 'merge-perfschema-5.6' into 10.0 2016-06-21 15:47:55 +02:00
Sergey Vojtovich
82a96926a7 MDEV-9728 - Hard crash in metadata_lock_info
metadata_lock_info plugin called MDL_context::find_ticket() to obtain lock
duration, which in turn iterates foreign thread private lists. These lists
can be updated by owner thread without protection.

Fixed by iterating threads (instead of MDL locks and tickets) and obtaining
data through APC.

Also fixed mdl_iterate_lock() to initialize iterator under prlock protection.
2016-06-21 17:04:57 +04:00
Sergei Golubchik
c081c978a2 Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
Sergei Golubchik
a482e76e65 fix a mysql-5.5.50 merge: mysqlcheck
quote identifiers correctly
2016-06-20 16:12:54 +02:00
Alexander Barkov
a80dbe068c MDEV-10020 InnoDB NOT IN Query Crash When One Item Is NULL
The problem was that the loop in get_func_mm_tree()
accessed improperly initialized instances of String,
which resided in the bzero'ed part of the in_vector::base array.

Strings in in_vector::base are originally initialized
in Item_func_in::fix_length_and_dec(),
in in_vector::in_vector() using sql_calloc,
rather than using a String constructor, so their str_charset
members are originally equal to NULL.

Strings in in_vector::base are later initialized
to good values in Item_func_in::fix_length_and_dec(),
using array->set(), in this code:

      uint j=0;
      for (uint i=1 ; i < arg_count ; i++)
      {
        array->set(j,args[i]);
        if (!args[i]->null_value)                      // Skip NULL values
          j++;
        else
          have_null= 1;
      }
      if ((array->used_count= j))
        array->sort();

NULLs are not taken into account, so at the end
array->used_count can be smaller than array->count.

This patch fixes the loop in opt_range.cc, in get_func_mm_tree(),
to access only properly initialized elements in in_vector::base,
preventing access to its bzero'ed non-initialized tail.
2016-06-20 14:11:01 +04:00
Jan Lindström
70ad689b11 MDEV-8633: information_schema.index_statistics doesn't delete
item when drop table indexes or drop table;

Problem was that table and index statistics is removed from
persistent tables but not from memory cache. Added functions
to remove table and index statistics from memory cache.
2016-06-20 09:58:31 +03:00
Monty
61492ea5dd Reset user status after unix_socket.test
Fixed mysql-test-run failures for roles.acl_statistics
2016-06-19 15:03:13 +03:00
Alexey Botchkov
e24a183370 MDEV-9969 mysql_install_db error processing ignore_db_dirs.
test failed on Windows so fixed by testing slightly differently.
2016-06-18 10:46:55 +04:00
Vicențiu Ciorbaru
c7eef02953 Increase the number of default build thread ids possibilities
When running mysql-test-run without a parallel parameter, it might
be impossible to find a free port.
2016-06-16 22:02:45 +03:00
Alexander Barkov
0a50e43e9d MDEV-9374 having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true
The problem was earlier fixed by the patch for MDEV-9521.
Adding tests only.
2016-06-16 14:57:32 +04:00
Alexey Botchkov
0e50b92482 MDEV-9969 mysql_install_db error processing ignore_db_dirs.
Check for same directories in the list added.
2016-06-16 12:35:14 +04:00
Daniel Black
cf721d23cc MDEV-9257: Increase limit on parallel workers in mysql-test-run
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-06-14 19:17:29 +03:00
Sergei Golubchik
05bb3b9f85 fix main.ssl_ca test for windows
where $HOME is the empty string
2016-06-14 16:28:07 +02:00
Sergei Golubchik
a4cfd32125 main.openssl_1 failure
don't test a cipher that was removed from
recent openssl versions
2016-06-14 14:52:43 +02:00
Sergei Golubchik
c73b987e73 MDEV-8328 Evaluation of two "!" operators depends on space in beetween
fix the lexer to backtrack when parsing
"<=", "<>", "!=", ">=", "<<", ">>", "<=>".
2016-06-14 13:59:55 +02:00
Sergei Golubchik
90eb30266b fix main.ssl_ca from mysql-5.5.50
1. to work for OpenSSL
2. to work when $HOME can match in the middle of $MYSQL_TEST_DIR
2016-06-14 13:57:49 +02:00
Sergei Golubchik
ae29ea2d86 Merge branch 'mysql/5.5' into 5.5 2016-06-14 13:55:28 +02:00
Sergey Vojtovich
1b50d59960 MDEV-9945 - main.kill_processlist-6619 fails sporadically
SHOW PROCESSLIST output can be affected by not completed concurrent KILL QUERY.
Filter out more column values to make output stable.
2016-06-14 14:44:09 +04:00
Sergey Vojtovich
d6a1bae57f MDEV-10218 - rpl.rpl_binlog_errors fails in buildbot with valgrind warnings -
bytes are possibly lost

Restored suppressions removed by MDEV-9994: they're needed for detached threads.
2016-06-13 17:10:31 +04:00
Elena Stepanova
67b4a6f576 MDEV-8859 rpl.rpl_mdev382 sporadically fails to finish due to disappeared expect file
The combination of --remove_file and --write_file on .expect file creates
a race condition which can be hit by MTR which reads the file in a loop.
Instead, .expect file should be changed with --append_file.
It was fixed in 10.x, but in 5.5 the sporadic failure still affected buildbot.
Fixed 3 test files which use the problematic combination
2016-06-12 20:14:51 +03:00
Sergey Vojtovich
87007dc2f7 MDEV-9994 - Aria service threads are not "joined"
Aria service threads are created "joinable", but they're not "joined" on
completion. This causes memory leaks around thread local storage.

Fixed by joining service thread. Simplified relevant code and cleaned up
relevant valgrind suppressions.
2016-06-10 22:07:49 +04:00
Alexander Barkov
4155d0937b MDEV-8402 Bug #77473 Truncated data with subquery & UTF8 2016-06-10 17:06:38 +04:00
Alexander Barkov
df1448801c MDEV-10181 Illegal mix of collation for a field and an ASCII string as a view field 2016-06-10 15:50:19 +04:00
Alexander Barkov
a4848e975d MDEV-9972 Least function retuns date in date time format 2016-06-08 19:04:12 +04:00
Jan Lindström
0f252702b1 MDEV-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8
Use direct persistent index corruption set on InnoDB dictionary
for this test. Do not allow creating new indexes if one of the
existing indexes is already marked as corrupted.
2016-06-08 08:40:10 +03:00
Vladislav Vaintroub
9ff93656ae Fix sporadic failure of set_statement mtr test.
On Windows with low precision  (10-16 ms) timer used for timing queries,
the statement "set @@long_query_time=0.01" can log itself a slow if it
spawn more single timer tick.

The fix is to filter this query out  from "SELECT FROM mysql.slow_log"
results
2016-06-03 19:22:47 +00:00
Sergei Petrunia
825427fa9f Update test results 2016-06-03 10:58:32 +03:00