Commit graph

64642 commits

Author SHA1 Message Date
iangilfillan
a8422fa241 Update sponsors 2016-05-27 18:25:14 +02:00
Sergei Golubchik
cf22514591 after-merge fixes for failures in buildbot 2016-04-27 08:34:35 +02:00
Sergei Golubchik
872649c7ba Merge branch '5.5' into 10.0 2016-04-26 23:05:26 +02:00
Sergei Golubchik
29868de2ff MDEV-9986 Full-text search of the utf8mb4 column causes crash
take into account that agg_arg_charsets_for_comparison()
can replace Item_field's with Item_func_conv_charset
2016-04-26 12:58:14 +02:00
Alexey Botchkov
44554d6111 MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.
Added SSL support to the mysqlbinlog.
2016-04-26 14:37:19 +04:00
Sergei Golubchik
7f5ceb7768 disable main.wait_timeout_not_windows for embedded 2016-04-26 11:49:35 +02:00
Sergei Golubchik
2220480731 MDEV-7775 Wrong error message (Unknown error) when idle sessions are killed after wait_timeout
restore the error message that was removed by mistake in ec38c1bbd7
2016-04-25 22:46:43 +02:00
Sergei Golubchik
a98ecc2aaf support SEARCH_RANGE in search_pattern_in_file.inc
Backport a part of

commit 439f75f
Author: Kristian Nielsen <knielsen@knielsen-hq.org>
Date:   Mon Jun 30 13:59:21 2014 +0200

    Fix test failures in rpl.rpl_checksum and rpl.rpl_gtid_errorlog.
2016-04-25 22:46:43 +02:00
Monty
f6cc7f1bdc Fixed failing test cases and compiler warnings
- Fixed wait condition in kill_processlist-6619
- Updated Ssl_chiper for openssl tests
- Added supression for valgrinds when using libcrypto
- Fixed wrong argument to pthread_mutex in server_audit.c when compiling with debug
- Adding missing debug_sync_update() to debug_sync.h
- Added initializers to some variables and fixed error handling in jsonudf.cpp
- Fixed cluster_filter_unpack_varchar which doesn't have a stable index type.
- Updated compiler_warnings.supp
2016-04-25 15:37:24 +03:00
Sergey Vojtovich
2b7573ecdd MDEV-9975 - main.partition_innodb_plugin fails sporadically
Fixed wait condition to wait for InnoDB to actually acquire row locks instead
of waiting for thread to enter "Searching rows for update" state (which happens
earlier).

Also use default wait timeout, 2 seconds can be too few for threads to enter
appropriate state.
2016-04-24 20:35:27 +04:00
Sergei Golubchik
7b58fd5ef0 tests -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
This fixes:
MDEV-7693 MariaDB - mysql-test - SUITE:funcs_1 - funcs_1.is_tables_mysql is failing on TABLE_COLLATION /DATABASE_COLLATION
MDEV-8487 mysql-test - main.information_schema 'xtradb' fails
MDEV-8486 mysql-test - main.bootstrap fails
2016-04-24 18:15:20 +02:00
Sergei Golubchik
0ee919b86e MDEV-8480 mysql-test - main.func_encrypt_ucs2 fails if FIPS=1
disable the test when DES doesn't work
2016-04-24 18:15:20 +02:00
Sergei Golubchik
797cadce47 MDEV-8482 mysql-test - main.func_encrypt fails if FIPS=1
* check for openssl errors in DES_ENCRYPT/DES_DECRYPT
* disable the test when DES doesn't work
* also disable main.func_des_encrypt
2016-04-24 18:15:20 +02:00
Sergei Golubchik
906f97d310 MDEV-8481 mysql-test - main.func_crypt fails if FIPS=1
disable the test when crypt(3) doesn't work
2016-04-24 18:15:20 +02:00
Sergei Golubchik
78989b67d1 MDEV-9168 altering a column comment does a full copy
add a test case
2016-04-24 18:15:20 +02:00
Sergei Golubchik
b233b15ccd MDEV-9868 Altering a partitioned table comment does a full copy
let handler::check_if_supported_inplace_alter()
(that detects frm-only changes) to work for partitioned
tables too.
2016-04-24 18:15:20 +02:00
Sergei Golubchik
d821dd106a MDEV-9580 SHOW GRANTS FOR <current_user> fails
use get_current_user() to distinguish user name without
a hostname and a role name.

move privilege checks inside mysql_show_grants() to remove
duplicate get_current_user() calls
2016-04-24 18:15:20 +02:00
Jan Lindström
19e3597e0c MDEV-9142 :Adding Constraint with no database reference
results in ERROR 1046 (3D000) at line 13: No database selected.

Use database from create table to foreign key database if
nothing else is given.
2016-04-23 13:05:15 +03:00
Sergey Vojtovich
618e300bce MDEV-9970 - main.sp-threads fails sporadically
Added proper waiting for thread to enter required state. Also reduced amount of
information dumped from processlist.
2016-04-23 00:28:50 +04:00
Alexander Barkov
3f0d07e55b MDEV-9372 select 100 between 1 and 9223372036854775808 returns false
Integer comparison of INT expressions with different signess in BETWEEN
is not safe. Switching to DECIMAL comparison in case if INT arguments
have different signess.
2016-04-22 16:04:20 +04:00
Jan Lindström
628bc576b3 MDEV-9918: [ERROR] mysqld got signal 11 during ALTER TABLE name COLUMN ADD
Problem was that in-place online alter table was used on a table
that had mismatch between MySQL frm file and InnoDB data dictionary.
Fixed so that traditional "Copy" method is used if the MySQL frm
and InnoDB data dictionary is not consistent.
2016-04-22 08:57:07 +03:00
Sergei Golubchik
0991e19e9d Merge branch 'bb-5.5-serg' into 5.5 2016-04-20 20:25:46 +02:00
Vladislav Vaintroub
2a45fa900b MDEV-9836 Connection lost when using SSL
Don't read from socket in yassl in SSL_pending().
Just return size of the buffered processed data.
This is what OpenSSL is documented to do too:

  SSL_pending() returns the number of bytes which have been processed,
  buffered and are available inside ssl for immediate read.
2016-04-20 19:03:59 +02:00
Sergei Golubchik
24ac546d0f use consistent error messaging for IGNORE
1. the same message text for INSERT and INSERT IGNORE
2. no new warnings in UPDATE IGNORE yet (big change for 5.5)

and replace a commonly used expression with a
named constant
2016-04-20 18:27:23 +02:00
Sergei Golubchik
8f1f869f68 another test case for ER_DATA_OUT_OF_RANGE on insert
tests it with a non-const table too
2016-04-20 15:26:37 +02:00
Sergei Golubchik
b069d19284 Merge branch 'mysql/5.5' into 5.5 2016-04-20 15:25:55 +02:00
Alexander Barkov
e90f8b7a68 MDEV-9413 "datetime >= coalesce(c1(NULL))" doesn't return expected NULL
The patch for MDEV-9521 earlier fixed the problem reported in MDEV-9413.
Only adding tests.
2016-04-20 11:11:13 +04:00
Alexander Barkov
2564650fb9 MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
The patch for MDEV-9745 earlier fixed the problem reported in MDEV-9662 as well.
Only adding tests.
2016-04-20 11:02:34 +04:00
Alexander Barkov
9a987142f9 MDEV-9745 Crash with CASE WHEN TRUE THEN COALESCE(CAST(NULL AS UNSIGNED)) ELSE 4 END
This is a backport of the patch for MDEV-9653 (fixed earlier in 10.1.13).

The code in Item_func_case::fix_length_and_dec() did not
calculate max_length and decimals properly.

In case of any numeric result (DECIMAL, REAL, INT) a generic method
Item_func_case::agg_num_lengths() was called, which could erroneously result
into a DECIMAL item with max_length==0 and decimals==0, so the constructor of
Field_new_decimals tried to create a field of DECIMAL(0,0) type,
which caused a crash.

Unlike Item_func_case, the code responsible for merging attributes in
Item_func_coalesce::fix_length_and_dec() works fine: it has specific execution
branches for all distinct numeric types and correctly creates a DECIMAL(1,0)
column instead of DECIMAL(0,0) for the same set of arguments.

The fix does the following:
- Moves the attribute merging code from Item_func_coalesce::fix_length_and_dec()
  to a new method Item_func_hybrid_result_type::fix_attributes()
- Removes the wrong code from Item_func_case::fix_length_and_dec()
  and reuses fix_attributes() in both Item_func_coalesce::fix_length_and_dec()
  and Item_func_case::fix_length_and_dec()
- Fixes count_real_length() and count_decimal_length() to get an array
  of Items as an argument, instead of using Item::args directly.
  This is needed for Item_func_case::fix_length_and_dec().
- Moves methods Item_func::count_xxx_length() from "public" to "protected".
- Removes Item_func_case::agg_num_length(), as it's not used any more.
- Additionally removes Item_func_case::agg_str_length(),
  as it also was not used (dead code).
2016-04-20 08:53:30 +04:00
Sergey Vojtovich
6c0e231c02 MDEV-9945 - main.kill_processlist-6619 fails sporadically
SHOW PROCESSLIST output can be affected by not completed concurrent queries.
Removed this affected SHOW PROCESSLIST since it doesn't seem to affect original
problem.
2016-04-19 14:05:52 +04:00
Sergei Golubchik
1bc0b0b524 fix a couple of dbug tests not to write to /tmp 2016-04-19 11:27:00 +02:00
Sergei Golubchik
cc04a9fc0f MDEV-9835 Valid password is not working after server restart
On SET PASSWORD if the plugin is mysql_native_password
or mysql_old_password, do reset plugin and auth_str
fields.
2016-04-19 11:27:00 +02:00
Sergei Golubchik
95fe71afa6 MDEV-9707 MAX(timestamp(6) column) in correlated sub-query returns non-existent row data in original table
special treatment for  temporal values in
create_tmp_field_from_item().

old code only did it when result_type() was STRING_RESULT,
but Item_cache_temporal::result_type() is INT_RESULT
2016-04-19 11:27:00 +02:00
Sergei Golubchik
4f133fbf79 MDEV-9493 --tc-heuristic-recover option values off by one
fix typelib to match defines:
#define TC_HEURISTIC_RECOVER_COMMIT   1
#define TC_HEURISTIC_RECOVER_ROLLBACK 2
2016-04-19 11:27:00 +02:00
Sergei Golubchik
edf71fd1d7 MDEV-9928 LC_TIME_NAMES=de_AT; unusual name for february
s/Feber/Februar/
2016-04-19 11:27:00 +02:00
Sergey Vojtovich
18ff6f654b MDEV-9944 - main.events_2 fails sporadically
Fixed wait condition in test case to actually wait for get_lock() completion
(not for lock acquisition as it was before). This removes sporadic extra row in
subsequent processlist queries.
2016-04-19 12:38:00 +04:00
Alexander Barkov
6fd54c01bb MDEV-9521 Least function returns 0000-00-00 for null date columns instead of null
Item_func_ifnull::date_op() and Item_func_coalesce::date_op() could
erroneously return 0000-00-00 instead of NULL when get_date()
was called with the TIME_FUZZY_DATES flag, e.g. from LEAST().
2016-04-18 23:15:15 +04:00
Elena Stepanova
f8adeccd78 MDEV-9713 Sporadic test failure: sys_vars.innodb_buffer_pool_load_now_basic
Previous fix using wait condition did not work because of MDEV-9867, so
we have to use conditional sleep instead. Sleep will only happen if the test
is executed after another one which also ran buffer pool dump without
server restart between two tests
2016-04-04 17:04:14 +03:00
Alexander Barkov
777c2131dd MDEV-9862 Illegal mix of collation, when comparing column with CASE expression 2016-04-02 00:04:47 +04:00
Sergei Golubchik
98ea806207 Merge branch '5.5' into 10.0 2016-03-21 11:54:45 +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
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
Elena Stepanova
96a7e74ed3 Extra space in the result file 2016-03-18 00:28:18 +02:00
iangilfillan
497800ee64 Update sponsors 2016-03-15 14:41:29 +02:00
Elena Stepanova
0125e588f3 MDEV-9713 Sporadic test failure: sys_vars.innodb_buffer_pool_load_now_basic
It could have happened that one of previous tests already executed
buffer pool dump and set the status variable value, so when it's been
checked, the check passes too early, before the dump starts and
the dump file is created. See more detailed explanation in MDEV-9713.

Fixed by waiting for the current time to change in case it equals
to the timestamp in the status variable, and then checking that
the status variable not only matches the expected pattern, but also
differs from the previous value, whatever it was.
2016-03-12 17:50:57 +02:00
Jan Lindström
8103526b38 MDEV-9667: Server hangs after select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
In row_search_for_mysql function on XtraDB there was a old logic
where null bytes were inited. This caused server to think that
key value is null and continue on incorrect path.
2016-03-11 13:36:29 +02:00
iangilfillan
6befd84202 Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
Otto Kekäläinen
1777fd5f55 Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
Venkatesh Duggirala
29cc2c2883 BUG#20574550 MAIN.MERGE TEST CASE FAILS IF BINLOG_FORMAT=ROW
The main.merge test case was failing when tested using row based
binlog format.

While analyzing the issue it was found the following issues:

a) The server is calling binlog related code even when a statement will
   not be binlogged;
b) The child table list was not present into table structure by the time
   to generate the create table statement;
c) The tables in the child table list will not be opened yet when
   generating table create info using row based replication;
d) CREATE TABLE LIKE TEMP_TABLE does not preserve original table storage
   engine when using row based replication;

This patch addressed all above issues.

@ sql/sql_class.h

Added a function to determine if the binary log is disabled to
  the current session. This is related with issue (a) above.

@ sql/sql_table.cc

Added code to skip binary logging related code if the statement
  will not be binlogged. This is related with issue (a) above.

Added code to add the children to the query list of the table that
  will have its CREATE TABLE generated. This is related with issue (b)
  above.

Added code to force the storage engine to be generated into the
  CREATE TABLE. This is related with issue (d) above.

@ storage/myisammrg/ha_myisammrg.cc

Added a test to skip a table getting info about a child table if the
  child table is not opened. This is related to issue (c) above.
2016-02-26 09:01:49 +05:30
Elena Stepanova
c29e450e37 MDEV-4070 sys_vars.secure_file_priv fails sporadically if it's executed with --mem
The test created a file in location relative to the datadir
(a few levels above datadir).
The file was created by MariaDB server (via INTO OUTFILE), and
later removed by mysqltest (via remove_file). The problem is that
when the vardir is a symlink, MariaDB server and mysqltest can
resolve such paths differently. MariaDB server would return back
to where the symlink is located, while mysqltest would go above
the real directory. For example, if the test is run with --mem,
and /bld/5.5/mysql-test/var points at /dev/shm/var_auto_X, then
SELECT INTO OUTFILE created a file in /bld/5.5/mysql-test , but
remove_file would look for it in /dev/shm/.

The test is re-written so that all paths are resolved in perl,
the logic itself hasn't changed.
2016-02-26 03:02:07 +02:00