Commit graph

173927 commits

Author SHA1 Message Date
Sergei Golubchik
21ee0ca457 after merge fixes 2016-03-23 22:45:48 +01:00
Sergei Golubchik
f67a2211ec Merge branch '10.1' into 10.2 2016-03-23 22:36:46 +01:00
Sergei Golubchik
a75d269464 thread cache: cleanup DBUG state when caching a thread
this fixes 40 failures in mysql-test
2016-03-23 22:12:00 +01:00
Monty
06b4556452 Fixed failures from changing values of thread_stack and thread_cache_size
Added --thread_cache_size=0 to some tests that was depending on not having
a thread cache.
2016-03-23 15:11:30 +02:00
Monty
02d75ae1fd Fixed failures from changing values of thread_stack and thread_cache_size
Added --thread_cache_size=0 to slow_launch_time_func.test as otherwise
the new thread would start too fast to be counted as a slow_launch_thread.
2016-03-23 14:36:59 +02:00
Alexander Barkov
0a83caf4a9 Removing duplicate code: sharing implementation of "strnxfrm"
between gbk_chinese_ci and big5_chinese_ci.
2016-03-23 14:26:43 +04:00
Alexander Barkov
0d42d4e9e0 Removing unused code in ctype-bin5.c 2016-03-23 12:44:31 +04:00
Alexander Barkov
1170d23ca3 Fixing compilation warnings introduced in:
> commit e09299511e
> Author: Alexander Barkov <bar@mariadb.org>
> Date:   Wed Mar 16 10:55:12 2016 +0400
>
>     MDEV-9665 Remove cs->cset->ismbchar()
>     Using a more powerfull cs->cset->charlen() instead.
2016-03-23 12:37:19 +04:00
Oleksandr Byelkin
aa77bc5c62 Make step bigger to reflect modern needs. 2016-03-23 09:21:37 +01:00
Alexey Botchkov
2783fc7d14 MDEV-717 LP:1003679 - Wrong binlog order on concurrent DROP schema and CREATE function.
The cause of the issue is when DROP DATABASE takes
        metadata lock and is in progress through it's
        execution, a concurrently running CREATE FUNCTION checks
        for the existence of database which it succeeds and then it
        waits on the metadata lock.  Once DROP DATABASE writes to
        BINLOG and finally releases the metadata lock on schema
        object, the CREATE FUNCTION waiting on metadata lock
        gets in it's code path and succeeds and writes to binlog.
2016-03-23 12:16:39 +04:00
Alexander Barkov
e4435b5ec3 MDEV-9604 crash in Item::save_in_field with empty enum value
1. Fixing Field_time::get_equal_const_item() to pass TIME_FUZZY_DATES
   and TIME_INVALID_DATES to get_time_with_conversion().
   This is needed to make the recursively called Item::get_date() return
   non-NULL values on garbage input. This makes Field_time::get_equal_const_item()
   work consistently with how Item::val_time_packed() works.

2. Fixing Item::get_date() to return TIME'00:00:00' rather than
   DATE'0000-00-00' on empty or garbage input when:
   - TIME_FUZZY_DATES is enabled
   - The caller requested a TIME value (by passing TIME_TIME_ONLY).
   This is needed to avoid conversion of DATE'0000-00-00' to TIME
   in get_time_with_conversion(), which would erroneously try to subtract
   CURRENT_DATE from DATE'0000-00-00' and return TIME'-838:59:59' rather than
   the desired zero value TIME'00:00:00'.

   #1 and #2 fix these type of scripts to return one row with both
   MyISAM and InnoDB, with and without an index on t1.b:

     CREATE TABLE t1 (a ENUM('a'), b TIME, c INT, KEY(b));
     INSERT INTO t1 VALUES ('','00:00:00',0);
     SELECT * FROM t1 WHERE b='';
     SELECT * FROM t1 WHERE a=b;
     SELECT * FROM t1 IGNORE INDEX(b) WHERE b='';
     SELECT * FROM t1 IGNORE INDEX(b) WHERE a=b;

   Additionally, #1 and #2 fix the originally reported in MDEV-9604 crash
   in Item::save_in_field(), because now execution goes through a different
   path, so save_in_field() is called for a Item_time_literal instance
   (which is non-NULL) rather than a Item_cache_str instance (which could
   return NULL without setting null_value).

3. Fixing Field_temporal::get_equal_const_item_datetime() to enable
   equal field propagation for DATETIME and TIMESTAMP in case of
   comparison (e.g. when ANY_SUBST), for symmetry with
   Field_newdate::get_equal_const_item(). This fixes a number of problems
   with empty set returned on comparison to empty/garbage input.
   Now all SELECT queries in this script return one row for MyISAM and InnoDB,
   with and without an index on t1.b:

     CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b));
     INSERT INTO t1 VALUES ('','0000-00-00 00:00:00',0);
     SELECT * FROM t1 WHERE b='';
     SELECT * FROM t1 WHERE a=b;
     SELECT * FROM t1 IGNORE INDEX(b) WHERE b='';
     SELECT * FROM t1 IGNORE INDEX(b) WHERE a=b;
2016-03-23 08:26:40 +04:00
Elena Stepanova
f66303dcf9 Fix sysvar tests - embedded and 32-bit 2016-03-23 02:22:09 +02:00
Monty
fa3edbf40d Increase value of thread_cache_size to 32
Added 5 minute timeout before automaticlally removing threads from thread
cache.

This solves a problem with jemalloc, which is slow with a small
thread cache and also makes thread_cache big enough that most users
doesn't have to touch it
2016-03-22 23:44:52 +02:00
Monty
260dd476b0 Removed TABLE->sort to make it possible to have multiple active calls to
filesort and init_read_record() for the same table.
This will simplify code for WINDOW FUNCTIONS (MDEV-6115)

- Filesort_info renamed to SORT_INFO and moved to filesort.h
- filesort now returns SORT_INFO
- init_read_record() now takes a SORT_INFO parameter.
- unique declaration is moved to uniques.h
- subselect caching of buffers is now more explicit than before
- filesort_buffer is now reusable even if rec_length has changed.
- filsort_free_buffers() and free_io_cache() calls are removed
- Remove one malloc() when using get_addon_fields()

Other things:
- Added --debug-assert-on-not-freed-memory option to make it easier to
  debug some not-freed-memory issues.
2016-03-22 23:44:52 +02:00
Oleksandr Byelkin
d0a47704c5 MDEV-9058: protocol: COM_MULTI command
Fix of status variable name and order.
2016-03-22 21:52:38 +01:00
Vicențiu Ciorbaru
29753fb9f2 MDEV-9443: Add reexecution test cases. 2016-03-22 22:21:04 +02:00
Vicențiu Ciorbaru
287f2d2947 MDEV-9443: Add REVOKE <role> as a command to PREPARE 2016-03-22 22:21:04 +02:00
Vicențiu Ciorbaru
c4bef7ad3c MDEV-9443: Roles aren't supported in prepared statements
Make role statements work with the PREPARE keyword.
2016-03-22 22:21:04 +02:00
Vicențiu Ciorbaru
16ddd1824c MDEV-9613: keyfile without any keys crashes mysqld on loading file_key_management plugin
Code was assuming that the keys file would contain at least one valid
key. This caused a Dynamic_array::at(0) call that lead to the crash.
2016-03-22 22:20:33 +02:00
Vicențiu Ciorbaru
8e048579cd Add an empty file to std_data for future testing purposes 2016-03-22 22:20:33 +02:00
Sergei Petrunia
5a6cd35e5a MDEV-9058: protocol: COM_MULTI command (part 3)
The actual patch with this name neglected to update a test result. Fixing.
2016-03-22 22:36:40 +03:00
Alexey Botchkov
0a4a78ae8c MDEV-6058 MySQL Bug #11766693: LOG-SLOW-ADMIN-STATEMENTS AND
LOG-SLOW-SLAVE-STATEMENTS NOT DISPLAYED.

        These parameters were moved from the command line options to
        the system variables section. Treatment of the
        opt_log_slow_slave_statements changed to let the
        dynamic change of the variable.
2016-03-22 23:26:39 +04:00
Sergei Golubchik
fd6c588659 Merge branch 'bb-10.1-serg' into 10.1 2016-03-22 19:18:48 +01:00
Vladislav Vaintroub
e6921f28c1 Fix valgrind error - memory leak in yassl's SSL_remove_state 2016-03-22 19:02:05 +01:00
Vladislav Vaintroub
6950f83d5e fix most annoying warnings on Windows 2016-03-22 18:46:02 +01:00
Jan Lindström
f71c45c71d MDEV-9678: Data Directory bug
Problem was that link file (.isl) is also opened using O_DIRECT
    mode and if this fails the whole create table fails on internal
    error.

    Fixed by not using O_DIRECT on link files as they are used only
    on create table and startup and do not contain real data.
    O_DIRECT failures are successfully ignored for data files
    if O_DIRECT is not supported by file system on used
    data directory.
2016-03-22 19:39:52 +02:00
Sergey Vojtovich
642978cc57 Fixed Windows compilation failure 2016-03-22 21:19:57 +04:00
Sergei Petrunia
dfa22c5d39 Don't select 'digest' column from PERFORMANCE_SCHEMA.events_statements_history_long
Its value changes depending on the parser constants, so it changes
every time somebody makes a change in the parser
2016-03-22 18:24:09 +03:00
Sergey Vojtovich
c42ffc1ca8 Cleanup All_share_tables_list definition 2016-03-22 18:01:40 +04:00
Sergei Golubchik
e0c136b4f0 MDEV-9737 Duplicate error in replication with slave triggers and auto increment
delete deferred events after they're executed
(otherwise they can be executed again for a sub-statement)

See also
commit 0e78d1d
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Mar 20 11:20:47 2013 +0530

    BUG#15850951-DUPLICATE ERROR IN REPLICATION WITH SLAVE
    TRIGGERS AND AUTO INCREMENT
2016-03-22 10:53:28 +01:00
Nirbhay Choubey
37f915c191 Merge branch '10.0-galera' into 10.1 2016-03-22 01:35:56 -04:00
Nirbhay Choubey
52ce743bbf MDEV-9382: After updating mariadb server apt-configure fails
When acting as a Galera receiver node, server startup may take
more than 30 secs (the current default) as it has to wait for
SST/IST operation to complete besides spending some time doing
wsrep recovery.

Fixed by raising the default value of MYSQLD_STARTUP_TIMEOUT
to 60 secs. Also sourced /etc/default/mariadb into the init
script so that it can be used to set MYSQLD_STARTUP_TIMEOUT.
2016-03-22 00:38:21 -04:00
Nirbhay Choubey
df3ad11097 MDEV-9598: Donor's rsync SST script hangs if FTWRL fails
Post-fix: initialize err
2016-03-22 00:38:21 -04:00
Nirbhay Choubey
d31d6d31bb MDEV-9696: CREATE SERVER statement does not replicate in Galera Cluster
Enable replication of CREATE/ALTER/DROP SERVER statements
in Galera cluster.
2016-03-22 00:38:21 -04:00
Nirbhay Choubey
000f76d886 Fix galera_sync_wait_show test. 2016-03-22 00:38:20 -04:00
Nirbhay Choubey
7c42b47e67 Merge branch '5.5-galera' into 10.0-galera 2016-03-22 00:35:14 -04:00
Sergei Golubchik
d5a80519c9 Merge branch 'connect/10.1' into 10.1 2016-03-21 21:43:28 +01:00
Alexander Barkov
537fc572d4 MDEV-9516 type error when setting session variable
Allowing assigning of DECIMAL(N,0) values to INT-alike system variables.
2016-03-22 00:09:04 +04:00
Igor Babaev
1fc2c63fb1 Manual merge of branch 'bb-10.2-mdev8789' into 10.2 2016-03-21 11:46:03 -07:00
Sergei Golubchik
e984159e39 MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
10.1 part of the fix
2016-03-21 13:02:59 +01:00
Sergei Golubchik
3b0c7ac1f9 Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
Sergei Golubchik
22ebf3cb45 MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
10.0 part of the fix
2016-03-21 11:55:03 +01:00
Sergei Golubchik
98ea806207 Merge branch '5.5' into 10.0 2016-03-21 11:54:45 +01:00
Oleksandr Byelkin
e8af217e16 MDEV-9590: Always print "Engine-independent statistic" warnings and might be filtering columns unintentionally from engines
Do not issue the warning in case we are not going to collect the statistics.
2016-03-21 11:48:04 +01:00
Sergei Golubchik
b9e571882b MDEV-9679 main.delayed fails sporadically
update main.delayed test after 38b89a61
ALTER TABLE ... COMMENT is no longer blocking,
use a different ALTER TABLE variant.
2016-03-21 11:43:19 +01:00
Sergei Golubchik
d158ba62f7 ASAN error in OQGraph engine
Fixed more cases for MDEV-6282
2016-03-21 11:43:19 +01:00
Sergei Golubchik
a2de604309 ASAN error in CONNECT engine
don't strcpy a string to itself
2016-03-21 11:43:19 +01:00
Sergei Golubchik
2ed882f9c4 update tests and results
s/Execute/Query/ to account for --ps-protocol
2016-03-21 11:43:19 +01:00
Sergei Golubchik
620d975ecd typo in a comment 2016-03-21 11:43:19 +01:00
Sergei Golubchik
7baff9f687 fix extension_based_table_discovery for partitioned tables
typo. the code was not matching the comment
2016-03-21 11:43:19 +01:00