Commit graph

86594 commits

Author SHA1 Message Date
Michael Widenius
10ab3e6887 MDEV-4010 Deadlock on concurrent INSERT .. SELECT into an Aria table with statement binary logging
There was a bug in lock handling when mixing INSERT ... SELECT on the same table.


mysql-test/suite/maria/insert_select.result:
  Test case for MDEV_4010
mysql-test/suite/maria/insert_select.test:
  Test case for MDEV_4010
mysys/thr_lock.c:
  We wrongly alldoed TL_WRITE_CONCURRENT_INSERT when there was a TL_READ_NO_INSERT lock
2014-12-15 14:49:23 +02:00
Michael Widenius
80ee57a30a MDEV-6896 kill user command cause MariaDB crash
mysql-test/r/kill-2.result:
  test case for MDEV-6896
mysql-test/t/kill-2-master.opt:
  test case for MDEV-6896
mysql-test/t/kill-2.test:
  test case for MDEV-6896
sql/sql_parse.cc:
  Use host_or_ip instead of host as host may be 0
2014-12-15 13:01:11 +02:00
Michael Widenius
4a32d9c058 MDEV-6871 Multi-value insert on MyISAM table that makes slaves crash (when using --skip-external-locking=0)
Problem was that repair() did lock and unlock tables, which leaved already locked tables in wrong state

include/my_check_opt.h:
  Added option T_NO_LOCKS to disable locking during repair()
  Fixed duplicated bit T_NO_CREATE_RENAME_LSN
mysql-test/suite/rpl/r/myisam_external_lock.result:
  Test case for MDEV-6871
mysql-test/suite/rpl/t/myisam_external_lock-slave.opt:
  Test case for MDEV-6871
mysql-test/suite/rpl/t/myisam_external_lock.test:
  Test case for MDEV-6871
storage/maria/ha_maria.cc:
  Don't lock tables during enable_indexes()
  Removed some calls to current_thd
storage/myisam/ha_myisam.cc:
  Don't lock tables during enable_indexes()
  Removed some calls to current_thd
2014-12-15 11:16:33 +02:00
Nirbhay Choubey
743e2ae433 MDEV-6891: Addendum, update company name in copyright notice 2014-12-12 17:10:51 -05:00
Nirbhay Choubey
4ba6ee1b31 MDEV-6891: Update company name 2014-12-12 10:38:19 -05:00
Sergey Vojtovich
ed313e8a92 MDEV-7148 - Recurring: InnoDB: Failing assertion: !lock->recursive
On PPC64 high-loaded server may crash due to assertion failure in InnoDB
rwlocks code.

This happened because load order between "recursive" and "writer_thread"
wasn't properly enforced.
2014-12-01 14:58:29 +04:00
Jan Lindström
df20184c03 MDEV-7252: Test failure on innodb.innodb_bug12400341 at Windows
Problem is that there could be undo slots from previous runs.
2014-12-03 13:38:39 +02:00
Jan Lindström
e544bcd16d MDEV-7243: innodb-change-buffer-recovery fails on windows
Problem is that on Windows command "perl" failed with error: 255  my_errno: 0  errno: 0.
Do not run on Windows.
2014-12-02 12:19:29 +02:00
Elena Stepanova
e0c71a9ab8 MDEV-7169: innodb.innodb_bug14147491 fails in buildbot on Windows
Applied the fix previously pushed into 10.0. 
Initial Jan's commit comment:
Problem is that test could open Microsoft C++ Client Debugger
windows with abort exception. Lets not try to test this on
windows.
2014-12-02 01:31:49 +04:00
Jan Lindström
89a3628b0b Better comments part 2 with proof and simplified implementation.
Thanks to Daniel Black.
2014-11-25 12:04:32 +02:00
Jan Lindström
e3ded84b83 Fix typo. 2014-11-25 08:22:10 +02:00
Jan Lindström
e5802c38f9 Better comments and add a test case. 2014-11-25 08:06:41 +02:00
Jan Lindström
8ff66501ca Forgot to add test file. 2014-11-21 13:32:53 +02:00
Sergey Vojtovich
4472a0ef95 MDEV-7026 - Race in InnoDB/XtraDB mutex implementation can stall or hang the
server

This is an addition to original patch. Added full memory barrier to ensure
proper StoreLoad order between waiters and lock_word on PPC64.
2014-11-21 15:23:18 +04:00
Jan Lindström
b0febdb66e MDEV-7084: innodb index stats inadequate using constant innodb_stats_sample_pages
Use traditional statistics estimation by default (innodb-stats-traditional=true).
There could be performance regression for customers if there is a lot of
open table operations.
2014-11-21 13:27:36 +02:00
Sergei Golubchik
48f4961a12 followup: disable openssl_6975.test as appropriate 2014-11-20 16:11:30 +01:00
Sergei Golubchik
ed2cc2a8cb Fix YaSSL on windows
This came with the upgrade from yassl 2.3.0 to 2.3.4 -
ssl tests started to hang on Windows. Comparing and removing changes
I've got to this:

 void input_buffer::set_current(uint i) 
 {
-    if (i)
-        check(i - 1, size_); 
-    current_ = i; 
+    if (error_ == 0 && i && check(i - 1, size_) == 0)
+        current_ = i;
+    else
+        error_ = -1;
 }

in 2.3.0 i==0 was only used to avoid the check, in 2.3.4 it's an error.
but there are places in the code that do set_current(0) and others that
do, like, { before=get_current(); ...; set_current(before); } - and the
initial value of current_ is 0.

So, I suspect that set_current(0) should not be an error, but it should
only skip the check().
2014-11-19 22:04:51 +01:00
Sergei Golubchik
d851d5e70c MDEV-6975 Implement TLS protocol
followup:
* explicitly disable SSLv2 and SSLv3, keep other protocols enabled
* fix a compiler warning
* rename the test and combinations to avoid confusion

vio/viossl.c:
  fix a compiler warning
2014-11-19 18:54:02 +01:00
Jan Lindström
8bc5eabea8 MDEV-7084: innodb index stats inadequate using constant
innodb_stats_sample_pages

Analysis: If you set the number of analyzed pages 
to very low number compared to actual pages on 
that table/index it randomly pics those pages 
(default 8 pages), this leads to fact that query 
after analyze table returns different results. If 
the index tree is small, smaller than 10 * 
n_sample_pages + total_external_size, then the 
estimate is ok. For bigger index trees it is 
common that we do not see any borders between 
key values in the few pages we pick. But still 
there may be n_sample_pages different key values, 
or even more. And it just tries to 
approximate to n_sample_pages (8).

Fix: (1) Introduced new dynamic configuration variable
innodb_stats_sample_traditional  that retains
the current design. Default false.

(2) If traditional sample is not used we use
n_sample_pages = max(min(srv_stats_sample_pages,
                         index->stat_index_size),
                     log2(index->stat_index_size)*
                          srv_stats_sample_pages);

(3) Introduced new dynamic configuration variable
stat_modified_counter (default = 0) if set
sets lower bound for row updates when statistics is re-estimated.

If user has provided upper bound for how many rows needs to be updated
before we calculate new statistics we use minimum of provided value
and 1/16 of table every 16th round. If no upper bound is provided
(srv_stats_modified_counter = 0, default) then calculate new statistics
if 1 / 16 of table has been modified
since the last time a statistics batch was run.
We calculate statistics at most every 16th round, since we may have
a counter table which is very small and updated very often.
@param t table
@return true if the table has changed too much and stats need to be
recalculated
*/
#define DICT_TABLE_CHANGED_TOO_MUCH(t) \
	((ib_int64_t) (t)->stat_modified_counter > (srv_stats_modified_counter ? \
	ut_min(srv_stats_modified_counter, (16 + (t)->stat_n_rows / 16)) : \
		16 + (t)->stat_n_rows / 16))
2014-11-19 20:27:34 +02:00
Kristian Nielsen
6ea41f1e84 MDEV-7026: Race in InnoDB/XtraDB mutex implementation can stall or hang the server.
The bug was that full memory barrier was missing in the code that ensures that
a waiter on an InnoDB mutex will not go to sleep unless it is guaranteed to be
woken up again by another thread currently holding the mutex. This made
possible a race where a thread could get stuck waiting for a mutex that is in
fact no longer locked. If that thread was also holding other critical locks,
this could stall the entire server. There is an error monitor thread than can
break the stall, it runs about once per second. But if the error monitor
thread itself got stuck or was not running, then the entire server could hang
infinitely.

This was introduced on i386/amd64 platforms in 5.5.40 and 10.0.13 by an
incorrect patch that tried to fix the similar problem for PowerPC.

This commit reverts the incorrect PowerPC patch, and instead implements a fix
for PowerPC that does not change i386/amd64 behaviour, making PowerPC work
similarly to i386/amd64.
2014-11-19 13:56:46 +01:00
Sergei Golubchik
496fda66fd openssl-poodle_6975.test: don't run it for older OpenSSL versions 2014-11-19 00:19:52 +01:00
Sergei Golubchik
cb8f837a3d MDEV-6975 Implement TLS protocol
change SSL methods to be SSLv23 (according to openssl manpage:
"A TLS/SSL connection established with these methods may understand
the SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols") from
TLSv1 methods, that go back to the initial SSL implementation
in MySQL in 2001.

OpenSSL default ciphers are different if TLSv1.2 is enabled,
so tests need to take this into account.
2014-11-18 17:57:06 +01:00
Sergei Golubchik
386e2e52f6 new mysqltest connect option SSL-CIPHER=xxxx 2014-11-18 17:56:58 +01:00
Sergei Golubchik
c8fa6f782c improve OpenSSL error reporting
e.g. from "error:00000001:lib(0):func(0):reason(1)"
to "error:140830B5:SSL routines:SSL3_CLIENT_HELLO:no ciphers available"
2014-11-18 17:56:49 +01:00
Sergei Golubchik
302b50fa30 TokuDB 7.5.3 2014-11-18 17:54:00 +01:00
Sergei Golubchik
84fc27fbef 5.3 merge 2014-11-18 17:36:51 +01:00
Sergei Golubchik
f3a800ef6e MDEV-7028 mysql_config produces invalid cflags (was: udf_example.c couldn't compile)
two bugs in mysql_config:
1. flags like -Werror=format were not stipped out
2. one-pass s/// command was used that could not remove all matching flags
   (e.g. s/ A */ /g cannot remove all A's in " 1 2 A A A A A 4 5 ")
2014-11-18 15:43:01 +01:00
Sergei Golubchik
cc2c296309 MDEV-4513 Valgrind warnings (Conditional jump or move depends on uninitialised value) in inflate on UNCOMPRESS 2014-11-18 15:42:48 +01:00
Sergei Golubchik
5d0122bd77 MDEV-7113 difference between check_vcol_func_processor and check_partition_func_processor
MDEV-6789 segfault in Item_func_from_unixtime::get_date on updating table with virtual columns

* prohibit VALUES in partitioning expression
* prohibit user and system variables in virtual column expressions
* fix Item_func_date_format to cache locale (for %M/%W to return the same as MONTHNAME/DAYNAME)
* fix Item_func_from_unixtime to cache time_zone directly, not THD (and not to crash)
* added tests for other incorrectly allowed (in vcols) functions to see that they don't crash
2014-11-18 15:42:40 +01:00
Sergei Golubchik
84f25c25f2 MDEV-3940 Server crash or assertion `item->type() == Item::STRING_ITEM' failure on LOAD DATA through a view with statement binary logging
A "field" could be either an Item_field or
(if loading into a view) an Item_direct_ref that references Item_field.

Also: when iterating fields, use fields of the TABLE_LIST (table or view),
not fields of a TABLE (actual underlying table - might have more columns).
2014-11-18 15:42:32 +01:00
Sergei Golubchik
241294b53a MDEV-6854 Typo in cmake/plugin.cmake 2014-11-18 15:42:25 +01:00
Alexey Botchkov
c9742ceac5 MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0)).
Fixed the case when a polygon contains a single-point ring.
2014-11-15 21:30:16 +04:00
Rich Prohaska
4555904b16 Merge branch 'master' into releases/tokudb-7.5 2014-11-14 13:10:22 -05:00
Rich Prohaska
3fbe68e6f8 DB-754 build with bundled jemalloc 2014-11-14 13:10:07 -05:00
Rich Prohaska
a4e20cfd46 Merge branch 'master' into releases/tokudb-7.5 2014-11-13 10:53:37 -05:00
Rich Prohaska
50b928b046 DB-759 test and fix alter table bug with cardinality data 2014-11-13 10:53:22 -05:00
Sergey Petrunya
50c5339272 MDEV-7068: MRR accessing uninitialised bytes, test case failure main.innodb_mrr
Backport to 5.3:
- Don't call index_reader->interrupt_read() if the
  index reader has returned all rows that matched its keys.
2014-11-13 14:12:41 +03:00
Rich Prohaska
2494bde757 DB-759 fix tokudb::alter_card to copy ALL of the cardinality data not just the low byte 2014-11-12 21:06:51 -05:00
Rich Prohaska
8a7f07711e increase test coverage of the cardinality code 2014-11-12 18:30:16 -05:00
Rich Prohaska
ca67239c51 speed up tokudb handler unit tests 2014-11-12 14:36:08 -05:00
Rich Prohaska
fa92c90393 speed up tokudb handler unit tests 2014-11-12 08:38:04 -05:00
Rich Prohaska
7b269f8a06 Merge branch 'master' into releases/tokudb-7.5 2014-11-10 16:37:45 -05:00
Rich Prohaska
43c176a779 speed up tokudb handler unit tests 2014-11-10 16:34:55 -05:00
Sergei Golubchik
c4598ce300 MDEV-6862 "#error <my_config.h>" and third-party libraries
only enforce the include order if SAFE_MUTEX is defined
(that is, in MariaDB source builds in debug mode)
2014-11-10 19:17:39 +01:00
Rich Prohaska
0e6a4915e1 Merge branch 'master' into releases/tokudb-7.5 2014-11-08 14:35:15 -05:00
Sergei Golubchik
360c49c1b9 MDEV-6179: dynamic columns functions/cast()/convert() doesn't play nice with CREATE/ALTER TABLE
When parsing a field declaration, grab type information from LEX before it's overwritten
by further rules. Pass type information through the parser stack to the rule that needs it.
2014-11-08 19:54:42 +01:00
Elena Stepanova
b99328bbf8 Re-enabling tests disabled due to MDEV-5266 and MySQL:65225 (fixed now) 2014-11-17 20:28:18 +04:00
Elena Stepanova
116baede50 Sporadic failure in storage_engine/trx.xa_recovery test
The test complains that the server failed to disappear upon shutdown /
wait_for_disconnect. Trying to solve the probably race condition by 
adding a wait before restart.
2014-11-17 20:10:57 +04:00
Alexander Barkov
e072a647d9 MDEV-6865 Merge Bug#18935421 RPAD DIES WITH CERTAIN PADSTR INTPUTS.. 2014-11-17 17:24:04 +04:00
unknown
e7c356f717 MDEV-6868: MariaDB server crash ( select with union and order by with subquery )
Excluding ORDER BY condition should be done after preparation it (even to catch syntax errors).
2014-11-15 22:18:33 +01:00