Commit graph

15041 commits

Author SHA1 Message Date
Rich Prohaska
aed868b4b9 DB-742 set plugin version to tokudb_version_major.tokudb_version_minor 2014-10-17 13:46:15 -04:00
Rich Prohaska
5788312433 DB-742 set plugin version to tokudb_version_major.tokudb_version_minor 2014-10-17 13:46:15 -04:00
Kristian Nielsen
4c07b93bdb Fix missing UNIV_INTERN on dict_table_check_foreign_keys().
When UNIV_INTERN is missing in built-in XtraDB, this causes the
innodb_plugin to call the XtraDB version of the function instead
of its own (seen in --embedded-server test failure in Buildbot).
This in turn causes bad things to happen in case of difference
between XtranDB and innodb_plugin.
2014-10-20 10:50:10 +02:00
Rich Prohaska
a60c748aa3 DB-742 set the tokudb plugin version string for mariadb 2014-10-16 19:50:53 -04:00
Rich Prohaska
178a511217 DB-742 set the tokudb plugin version string for mariadb 2014-10-16 19:50:53 -04:00
Jon Olav Hauglid
57eec7bc29 Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG
Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS
Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG
Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE
  
Backport from mysql-5.6 to mysql-5.5
2014-10-13 09:52:28 +02:00
Jon Olav Hauglid
8b64f82505 Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG
Bug#17959689: MAKE GCC AND CLANG GIVE CONSISTENT COMPILATION WARNINGS
Bug#18313717: ENABLE -WERROR IN MAINTANER MODE WHEN COMPILING WITH CLANG
Bug#18510941: REMOVE CMAKE WORKAROUNDS FOR OLDER VERSIONS OF OS X/XCODE
  
Backport from mysql-5.6 to mysql-5.5
2014-10-13 09:52:28 +02:00
Rich Prohaska
d589648edd DB-736 fix tokudb IS table errors 2014-10-08 08:39:40 -04:00
Rich Prohaska
de3cd3e182 DB-736 fix tokudb IS table errors 2014-10-08 08:39:40 -04:00
Sergei Golubchik
7e6d4bba0c XtraDB 5.5.40-36.1 2014-10-08 00:44:37 +02:00
Sergei Golubchik
e5bc21af37 MDEV-4813 Replication fails on updating a MEMORY table with an index using btree
skip NULL VARCHAR key parts like it's done elsewhere
2014-10-07 10:54:14 +02:00
Sergei Golubchik
0d2cba5df2 XtraDB 5.5.39-36.0 2014-10-06 20:06:39 +02:00
Sergei Golubchik
1ddfce4840 mysql-5.5.40 2014-10-06 19:53:55 +02:00
Rich Prohaska
768b13d5c1 DB-735 use thd_killed 2014-10-03 15:41:54 -04:00
Rich Prohaska
69756a5994 DB-735 use thd_killed 2014-10-03 15:41:54 -04:00
Sergei Golubchik
384999f3e8 MDEV-6528 review debian patches for mysql
and apply whatever was reasonable
2014-10-02 11:58:24 +02:00
Sergei Golubchik
aa36d9e742 MDEV-5120 Test suite test maria-no-logging fails
stat structure (from <sys/stat.h>) is conditionally defined
to have different layout and size depending on the defined macros.
The correct macro is defined in my_config.h, which means it MUST be
included first (or, at least before <features.h> - so, practically,
before including any system headers).
2014-10-02 11:57:40 +02:00
Rich Prohaska
dcda78e71f DB-732 map TOKUDB_OUT_OF_LOCKS tokudb error to HA_ERR_LOCK_TABLE_FULL handler error 2014-10-01 09:24:21 -04:00
Rich Prohaska
d24fd98e99 DB-732 map TOKUDB_OUT_OF_LOCKS tokudb error to HA_ERR_LOCK_TABLE_FULL handler error 2014-10-01 09:24:21 -04:00
Rich Prohaska
0ea9d023fa DB-450 use interruptible cursors for index scans and info schema scans 2014-09-26 11:45:39 -04:00
Rich Prohaska
665a9b6ea7 DB-450 use interruptible cursors for index scans and info schema scans 2014-09-26 11:45:39 -04:00
Rich Prohaska
460e7716de DB-397 remove table lock for tables with triggers in tokudb::start_stmt 2014-09-26 08:02:24 -04:00
Rich Prohaska
b3601d02f8 DB-397 remove table lock for tables with triggers in tokudb::start_stmt 2014-09-26 08:02:24 -04:00
Sergei Golubchik
02125587e1 update tokudb version in CMakeLists.txt, disable unstable tokudb tests 2014-09-25 19:00:41 +02:00
Sergei Golubchik
53a44915c5 merge 2014-09-23 23:37:35 +02:00
Sergei Golubchik
b91432b4a4 tokudb 7.5.0 2014-09-23 22:03:35 +02:00
Michael Widenius
348a24a70a Allow tokudb test to pass even if jemalloc is not available. 2014-09-23 13:57:55 +03:00
Annamalai Gurusami
b8c9d93bf3 Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE CALLED
FROM A FUNCTION

Scenario:

In a stored procedure, CREATE TABLE statement is not allowed.  But an
exception is provided for CREATE TEMPORARY TABLE.  We can create a temporary
table in a stored procedure.

Let there be two stored functions f1 and f2 and two stored procedures p1 and
p2.  Their properties are as follows:

. stored function f1() calls stored procedure p1().
. stored function f2() calls stored procedure p2().
. stored procedure p1() creates temporary table t1.
. stored procedure p2() does DML on t1.

Consider the following situation:

1.  Autocommit mode is on. 
2.  select f1()
3.  select f2()

Step 2:  In this step, t1 would be created via p1().  A table level transaction
lock would have been taken.  The ::external_lock() would not have been called
on this table.  At the end of step 2, because of autocommit mode on, this table
level lock will be released.

Step 3:  When we execute DML on table t1 via p2() we have two problems:

Problem 1:

The function ha_innobase::external_lock() would have been called but since
it is a select query no table level locks would have been taken.  Hence the
following assert will fail:

ut_ad(lock_table_has(thr_get_trx(thr), index->table, LOCK_IX));

Solution:

The solution would be to identify this situation and take a table level lock
and use the proper lock type prebuilt->select_lock_type = LOCK_X for DML
operations.

Problem 2:

Another problem is that in step 3, ha_innobase::open() is never called on
the table t1.  

Solution:

The solution would be to identify this situation and call re-init the handler
of table t1.

rb#6429 approved by Krunal.
2014-09-18 15:17:39 +05:30
Annamalai Gurusami
db78f29b31 Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE CALLED
FROM A FUNCTION

Scenario:

In a stored procedure, CREATE TABLE statement is not allowed.  But an
exception is provided for CREATE TEMPORARY TABLE.  We can create a temporary
table in a stored procedure.

Let there be two stored functions f1 and f2 and two stored procedures p1 and
p2.  Their properties are as follows:

. stored function f1() calls stored procedure p1().
. stored function f2() calls stored procedure p2().
. stored procedure p1() creates temporary table t1.
. stored procedure p2() does DML on t1.

Consider the following situation:

1.  Autocommit mode is on. 
2.  select f1()
3.  select f2()

Step 2:  In this step, t1 would be created via p1().  A table level transaction
lock would have been taken.  The ::external_lock() would not have been called
on this table.  At the end of step 2, because of autocommit mode on, this table
level lock will be released.

Step 3:  When we execute DML on table t1 via p2() we have two problems:

Problem 1:

The function ha_innobase::external_lock() would have been called but since
it is a select query no table level locks would have been taken.  Hence the
following assert will fail:

ut_ad(lock_table_has(thr_get_trx(thr), index->table, LOCK_IX));

Solution:

The solution would be to identify this situation and take a table level lock
and use the proper lock type prebuilt->select_lock_type = LOCK_X for DML
operations.

Problem 2:

Another problem is that in step 3, ha_innobase::open() is never called on
the table t1.  

Solution:

The solution would be to identify this situation and call re-init the handler
of table t1.

rb#6429 approved by Krunal.
2014-09-18 15:17:39 +05:30
Annamalai Gurusami
40f30ee6cc Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN INNODB_STRICT_MODE = 1
Problem:

Creation of a table fails when innodb_strict_mode is enabled, but the same
table is created without any warning when innodb_strict_mode is enabled.

Solution:

If creation of a table fails with an error when innodb_strict_mode is
enabled, it must issue a warning when innodb_strict_mode is disabled.

rb#6723 approved by Krunal.
2014-09-17 10:42:31 +05:30
Annamalai Gurusami
44fd241a22 Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN INNODB_STRICT_MODE = 1
Problem:

Creation of a table fails when innodb_strict_mode is enabled, but the same
table is created without any warning when innodb_strict_mode is enabled.

Solution:

If creation of a table fails with an error when innodb_strict_mode is
enabled, it must issue a warning when innodb_strict_mode is disabled.

rb#6723 approved by Krunal.
2014-09-17 10:42:31 +05:30
Rich Prohaska
b183d81d2e DB-714 read free replication 2014-09-15 07:47:43 -04:00
Rich Prohaska
8978487477 DB-714 read free replication 2014-09-15 07:47:43 -04:00
Sergei Golubchik
e3deed438a ft-index: restore a chunk that was lost in the merge
and other fixes for gcc-4.9.1 on sid
2014-09-13 21:32:49 +02:00
Sergei Golubchik
77a0c9b161 tokudb: use thd_killed() api function, not thd->killed directly 2014-09-13 08:32:53 +02:00
Sergei Golubchik
e7ddd89adc tokudb tests: master-slave.inc should be included *last* 2014-09-13 08:16:00 +02:00
Sergei Golubchik
aef3818981 tokudb 7.1.8 2014-09-13 00:28:15 +02:00
Sergei Golubchik
3d94523638 MDEV-6613 build system endianness test fails for ppc64le (i.e. Ubuntu)
* remove bundled jemalloc, use the system one
* force jemalloc in release builds on linux
2014-09-12 08:41:16 +02:00
Praveenkumar Hulakund
0b28d7e048 Bug#18790730 - CROSS-DATABASE FOREIGN KEY WITHOUT PERMISSIONS
CHECK.

Analysis:
----------
Issue here is, while creating or altering the InnoDB table,
if the foreign key defined on the table references a parent
table on which the user has no access privileges then the
table is created without reporting any error. 

Currently the privilege level REFERENCES_ACL is unused
and is not used for access evaluation while creating the
table with a foreign key constraint or adding the foreign
key constraint to a table. But when no privileges are granted
to user then also access evaluation on parent table is ignored.

Fix:
---------
For DMLs, irrelevant of the fact, support does not want any
changes to avoid permission checks on every operation.

So, as a fix, added a function "check_fk_parent_table_access" 
to check whether any of the SELECT_ACL, INSERT_ACL, UDPATE_ACL,
DELETE_ACL or REFERENCE_ACL privileges are granted for user
at table level. If none of them is granted then error is reported.
This function is called during the table creation and alter 
operation.
2014-09-10 10:50:17 +05:30
Praveenkumar Hulakund
cf4231a7f9 Bug#18790730 - CROSS-DATABASE FOREIGN KEY WITHOUT PERMISSIONS
CHECK.

Analysis:
----------
Issue here is, while creating or altering the InnoDB table,
if the foreign key defined on the table references a parent
table on which the user has no access privileges then the
table is created without reporting any error. 

Currently the privilege level REFERENCES_ACL is unused
and is not used for access evaluation while creating the
table with a foreign key constraint or adding the foreign
key constraint to a table. But when no privileges are granted
to user then also access evaluation on parent table is ignored.

Fix:
---------
For DMLs, irrelevant of the fact, support does not want any
changes to avoid permission checks on every operation.

So, as a fix, added a function "check_fk_parent_table_access" 
to check whether any of the SELECT_ACL, INSERT_ACL, UDPATE_ACL,
DELETE_ACL or REFERENCE_ACL privileges are granted for user
at table level. If none of them is granted then error is reported.
This function is called during the table creation and alter 
operation.
2014-09-10 10:50:17 +05:30
Sergei Golubchik
6b720ae4cb MDEV-6605 Multiple Clients Inserting Causing Error: Failed to read auto-increment value from storage engine
* handler::get_auto_increment() was not expecting any errors from the storage engine.
  That was wrong, errors could happen.
* ha_partition::get_auto_increment() was doing index lookups in partition under a mutex.
  This was redundant (engine transaction isolation was covering that anyway)
  and harmful (causing deadlocks).
2014-09-08 18:38:13 +02:00
Sergei Golubchik
8deb9066e2 fix compilation on windows - wrong include file 2014-09-08 17:10:48 +02:00
Murthy Narkedimilli
3139aa87b4 Adding patch for security bug 19471516 2014-09-08 11:33:55 +02:00
Sergei Golubchik
695781a53e MDEV-6595 [PATCH] HPPA: storage/xtradb/os/os0stacktrace.c:88:54: error: invalid operands to binary & (have 'void *' and 'long unsigned int')
fix precedence as in the patch from Brian Evans
2014-09-06 09:51:34 +02:00
BohuTANG
ef579d8921 DB-310 add tokudb_support_xa variable
this variable scope is Global, Session
type is boolean and default value is TRUE
2014-09-05 13:17:54 +08:00
BohuTANG
856dd95b71 DB-310 add tokudb_support_xa variable
this variable scope is Global, Session
type is boolean and default value is TRUE
2014-09-05 13:17:54 +08:00
Rich Prohaska
f7c43e4b9c DB-718 handle errors in tokudb info schema plugins 2014-09-03 07:49:52 -04:00
Rich Prohaska
f99f2254d9 DB-718 handle errors in tokudb info schema plugins 2014-09-03 07:49:52 -04:00
Sergey Vojtovich
c01c819209 Backport from 10.0:
MDEV-6483 - Deadlock around rw_lock_debug_mutex on PPC64

This problem affects only debug builds on PPC64.

There are at least two race conditions around
rw_lock_debug_mutex_enter and rw_lock_debug_mutex_exit:

- rw_lock_debug_waiters was loaded/stored without setting
  appropriate locks/memory barriers.
- there is a gap between calls to os_event_reset() and
  os_event_wait() and in such case we're supposed to pass
  return value of the former to the latter.

Fixed by replacing self-cooked spinlocks with system mutexes.
These days system mutexes offer much better performance. OTOH
performance is not that critical for debug builds.
2014-08-29 16:14:11 +04:00
Sergey Vojtovich
40497577ff Backport from 10.0:
MDEV-6450 - MariaDB crash on Power8 when built with advance tool
            chain

InnoDB mutex_exit() function calls __sync_test_and_set() to release
the lock. According to manual this function is supposed to create
"acquire" memory barrier whereas in fact we need "release" memory
barrier at mutex_exit().

The problem isn't repeatable with gcc because it creates
"acquire-release" memory barrier for __sync_test_and_set().
ATC creates just "acquire" barrier.

Fixed by creating proper barrier at mutex_exit() by using
__sync_lock_release() instead of __sync_test_and_set().
2014-08-29 16:02:46 +04:00
Rich Prohaska
08eb88eec4 DB-712 split locks and lock_waits dname into schema, table, and dictionary 2014-08-28 06:19:32 -04:00
Rich Prohaska
43c3843368 DB-712 split locks and lock_waits dname into schema, table, and dictionary 2014-08-28 06:19:32 -04:00
Rich Prohaska
8c5cd26053 DB-703 DB-704 split dname into schema, table, and dictionary 2014-08-28 06:19:32 -04:00
Rich Prohaska
a0056c489f DB-703 DB-704 split dname into schema, table, and dictionary 2014-08-28 06:19:32 -04:00
Rich Prohaska
66504277bf DB-702 print upgrade failed clean shutdown required error message 2014-08-27 10:31:45 -04:00
Rich Prohaska
577e3a0fd3 DB-702 print upgrade failed clean shutdown required error message 2014-08-27 10:31:45 -04:00
Murthy Narkedimilli
de71240ed3 Changing the copyright headers a bit to be complaint with the standards 2014-08-27 16:06:50 +02:00
Murthy Narkedimilli
96748c37f7 Changing the copyright headers a bit to be complaint with the standards 2014-08-27 16:06:50 +02:00
Annamalai Gurusami
2f8bd757cd Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE ADD FOREIGN KEY
Problem:

We maintain two rb trees in each dict_table_t.  The foreign_rbt must be in
sync with foreign_list.  The referenced_rbt must be in sync with
referenced_list. There is one function which checks this consistency and it
failed, resulting in an assert failure.

The root cause of the problem was identified that the search order was 
lost in the referenced_rbt.  This is because while renaming the table,
we didn't not refresh this referenced_rbt.

Solution:

When a foreign key is renamed, we must delete and re-insert into both
foreign_rbt and referenced_rbt.  

rb#6412 approved by Jimmy.
2014-08-25 16:25:07 +02:00
Annamalai Gurusami
f97dfa81a5 Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE ADD FOREIGN KEY
Problem:

We maintain two rb trees in each dict_table_t.  The foreign_rbt must be in
sync with foreign_list.  The referenced_rbt must be in sync with
referenced_list. There is one function which checks this consistency and it
failed, resulting in an assert failure.

The root cause of the problem was identified that the search order was 
lost in the referenced_rbt.  This is because while renaming the table,
we didn't not refresh this referenced_rbt.

Solution:

When a foreign key is renamed, we must delete and re-insert into both
foreign_rbt and referenced_rbt.  

rb#6412 approved by Jimmy.
2014-08-25 16:25:07 +02:00
Rich Prohaska
71208afb5b DB-500 allow simple deletes to use bulk fetch 2014-08-19 17:08:14 -04:00
Rich Prohaska
667401cab6 FT-502 print huge pages guy when env fails to open 2014-08-19 17:07:48 -04:00
Michael Widenius
5569132ffe MDEV-6450 - MariaDB crash on Power8 when built with advance tool chain
Part of this work is based on Stewart Smitch's memory barrier and lower priori
patches for power8.

- Added memory syncronization for innodb & xtradb for power8.
- Added HAVE_WINDOWS_MM_FENCE to CMakeList.txt
- Added os_isync to fix a syncronization problem on power
- Added log_get_lsn_nowait which is now used srv_error_monitor_thread to ensur
  if log mutex is locked.

All changes done both for InnoDB and Xtradb
2014-08-19 19:28:35 +03:00
Rich Prohaska
96fbab5fcb DB-500 allow simple deletes to use bulk fetch 2014-08-18 13:38:51 -04:00
Rich Prohaska
56126798a8 DB-500 allow simple deletes to use bulk fetch 2014-08-18 13:38:51 -04:00
Rich Prohaska
9e079da4cf FT-502 print huge pages guy when env fails to open 2014-08-18 09:13:29 -04:00
Rich Prohaska
a2566787a9 FT-502 print huge pages guy when env fails to open 2014-08-18 09:13:29 -04:00
Rich Prohaska
65547f32a0 DB-506 add a session variable to enable/disable bulk fetch default enabled 2014-08-14 15:18:56 -04:00
Rich Prohaska
b16b461d25 DB-506 add a session variable to enable/disable bulk fetch default enabled 2014-08-14 15:18:27 -04:00
Rich Prohaska
5893b3026b DB-506 add a session variable to enable/disable bulk fetch default enabled 2014-08-14 15:18:27 -04:00
Rich Prohaska
880fac82e2 #272 set tokudb product name 2014-08-12 14:41:35 -04:00
Rich Prohaska
ebb7a85c1b #272 set tokudb product name 2014-08-12 14:41:35 -04:00
Rich Prohaska
0b72d47cef #272 set TokuDB product name 2014-08-12 12:56:15 -04:00
Rich Prohaska
d8fffbc931 #272 set TokuDB product name 2014-08-12 12:56:15 -04:00
Sergei Golubchik
fd8da99119 disable still racy tokudb tests 2014-08-12 17:12:08 +02:00
Rich Prohaska
6a92fe510a #271 turn off FT debug flags by default. can be overridden by cmake arguments 2014-08-11 16:47:36 -04:00
unknown
07668e6751 Remove unstable test case innodb_bug18942294, approved by Jimmy over IM. 2014-08-06 09:51:20 +08:00
bin.x.su@oracle.com
d345978d27 Remove unstable test case innodb_bug18942294, approved by Jimmy over IM. 2014-08-06 09:51:20 +08:00
Sergei Golubchik
68d72f9167 fix tokudb version 2014-08-05 20:22:57 +02:00
Rich Prohaska
ba4cc58dea #271 turn off FT debug flags by default. can be overridden by cmake arguments 2014-08-04 15:49:28 -04:00
Rich Prohaska
865df2ba49 #271 turn off FT debug flags by default. can be overridden by cmake arguments 2014-08-04 15:49:28 -04:00
Sergei Golubchik
c722e5f25f MDEV-6507 tokudb release builds compiled with debug code on
disable tokudb paranoid asserts
2014-08-03 13:38:54 +02:00
Sergei Golubchik
359d764b79 fix xtradb on windows (again) 2014-08-03 07:38:41 +02:00
Sergei Golubchik
1c6ad62a26 mysql-5.5.39 merge
~40% bugfixed(*) applied
~40$ bugfixed reverted (incorrect or we're not buggy)
~20% bugfixed applied, despite us being not buggy
(*) only changes in the server code, e.g. not cmakefiles
2014-08-02 21:26:16 +02:00
Sergei Golubchik
14200dfa43 tokudb-7.1.7 2014-08-01 17:04:15 +02:00
Sergei Golubchik
4b4de01fae 5.3 merge 2014-08-01 16:51:12 +02:00
Jan Lindström
27d23c020a Merged percona-server-5.5.38-35.2. 2014-08-01 12:54:56 +03:00
Rich Prohaska
ed9a5d5d38 #269 use bulk fetch for replace select 2014-07-31 12:24:04 -04:00
Rich Prohaska
0b49d864f9 #269 use bulk fetch for replace select 2014-07-31 12:23:23 -04:00
Rich Prohaska
f3e62fdda8 #269 use bulk fetch for replace select 2014-07-31 12:23:23 -04:00
Michael Widenius
37ba4f37ac Fixed memory overflow 2014-07-31 13:13:33 +03:00
Michael Widenius
5364315229 Fix for MDEV-6493: Assertion `table->file->stats.records > 0 || error' failure, or 'Invalid write' valgrind warnings, or crash on scenario with Aria table, view, LOCK TABLES
This bug only happens in case of paritioned tables used in LOCK TABLES and implicit_commit() was called
(as part of trying to execute a CREATE TABLE withing lock tables)

The problem was that Aria could not move the tables from one transaction to the new one, as thd->open_tables contained
a partitioned tables and not an Aria table.

Fix:
- Store a list of all open tables that are part of a share in share->open_tables
- In maria::implict_commit() use transaction->used_tables & share->open_tables to find out which tables
  was part of the current transaction instead of using thd->open_tables, which may contain partitioned tables.


mysql-test/suite/maria/maria_partition.result:
  Added test case
mysql-test/suite/maria/maria_partition.test:
  Added test case
storage/maria/ha_maria.cc:
  Use trn->used tables and share->open_tables to find out which tables was part of the current transaction instead of using thd->open_tables.
storage/maria/ma_close.c:
  Remove closed table from share->open_list
storage/maria/ma_open.c:
  Add table to share->open_list
storage/maria/ma_state.c:
  Added comment
storage/maria/maria_def.h:
  Added share->open_list, a list of all tables that is using this share.
2014-07-30 13:27:52 +03:00
Michael Widenius
a1c1700b89 Fixed some compiler warnings 2014-07-30 10:05:01 +03:00
Sergei Golubchik
6ef139780d MDEV-6497 InnoDB deadlocks on UNINSTALL PLUGIN
Free the trx of the current thd (if any) in innobase_end()
2014-07-29 09:09:52 +02:00
Jan Lindström
42b9758814 Fix compiler error on sparc. 2014-07-27 08:44:45 +03:00
Jan Lindström
8ae267400c Fix InnoDB: Assertion failure in thread 2868898624 in file buf0lru.c line 1000
InnoDB: Failing assertion: mutex_own(&buf_pool->LRU_list_mutex)

and

InnoDB: Assertion failure in thread 2868898624 in file buf0lru.c line 1077
InnoDB: Failing assertion: mutex_own(&buf_pool->LRU_list_mutex)

Analysis: Function buf_LRU_free_block might release LRU_list_mutex on
same cases to avoid mutex order problems, we need to take it back 
before accessing list.
2014-07-26 21:14:21 +03:00
Jan Lindström
c104965746 Fix test failure caused by simulated compression failure on
IBUF_DUMMY table.
2014-07-25 09:34:05 +03:00
Jan Lindström
7bf45bec54 Fix too agressive long semaphore wait output and add guard against introducing
compression failures on insert buffer.
2014-07-24 14:35:09 +03:00
Jan Lindström
be00265557 Fix compiler errors on product build. 2014-07-23 13:52:17 +03:00
Rich Prohaska
79608786fb #261 auto detect index scans to fix perf problem with partitions 2014-07-18 06:40:52 -04:00
Rich Prohaska
444af9c8e7 #261 debug prelocking for index scans 2014-07-18 06:40:10 -04:00
Rich Prohaska
030487487c #261 auto detect index scans to fix perf problem with partitions 2014-07-18 06:39:07 -04:00
Rich Prohaska
5f034b7a50 #261 auto detect index scans to fix perf problem with partitions 2014-07-18 06:39:07 -04:00
Rich Prohaska
e543cf162b #263 enable bulk fetch for insert select sql commands 2014-07-16 10:13:37 -04:00
Rich Prohaska
871dbcf60a #262 enable bulk fetch for create select sql commands 2014-07-16 10:13:16 -04:00
Rich Prohaska
862d17b361 #261 debug prelocking for index scans 2014-07-16 10:03:00 -04:00
Rich Prohaska
4c2cef0a65 #261 debug prelocking for index scans 2014-07-16 10:03:00 -04:00
Rich Prohaska
53231b1341 #263 enable bulk fetch for insert select sql commands 2014-07-15 15:45:48 -04:00
Rich Prohaska
dd283b75e8 #263 enable bulk fetch for insert select sql commands 2014-07-15 15:45:48 -04:00
Rich Prohaska
79411796ce #262 enable bulk fetch for create select sql commands 2014-07-15 13:13:30 -04:00
Rich Prohaska
0430a96512 #262 enable bulk fetch for create select sql commands 2014-07-15 13:13:30 -04:00
Rich Prohaska
c5e9952458 #258 support deferred XA recovery with discard of prepared txns and dirty shutdown of the FT environment 2014-07-10 16:30:40 -04:00
Rich Prohaska
48a6883b34 #258 support deferred XA recovery with discard of prepared txns and dirty shutdown of the FT environment 2014-07-09 15:50:15 -04:00
Rich Prohaska
54a8443b96 #258 support deferred XA recovery with discard of prepared txns and dirty shutdown of the FT environment 2014-07-09 15:50:15 -04:00
unknown
de0c78c019 BUG#18942294 - SEGV IN DICT_FIND_TABLE_BY_SPACE TRYING TO MARK SPACE CORRUPT
IN RECOVERY

During redo log processing, the data dictionary is not available. We should
check it in dict_find_table_by_space() to prevent SEGV error.

rb#5678, approved by Jimmy.
2014-07-08 15:10:15 +08:00
bin.x.su@oracle.com
95ec5bdd71 BUG#18942294 - SEGV IN DICT_FIND_TABLE_BY_SPACE TRYING TO MARK SPACE CORRUPT
IN RECOVERY

During redo log processing, the data dictionary is not available. We should
check it in dict_find_table_by_space() to prevent SEGV error.

rb#5678, approved by Jimmy.
2014-07-08 15:10:15 +08:00
Rich Prohaska
28833bd162 #257 disable missing field initializer warning 2014-07-03 08:44:51 -04:00
Rich Prohaska
4df66169f2 #256 only force MDL X for certain alter table operations 2014-07-03 08:44:40 -04:00
Annamalai Gurusami
301032d20a Bug #19140907 DUPLICATES IN UNIQUE SECONDARY INDEX BECAUSE OF FIX OF BUG#68021
Problem:

When a unique secondary index is scanned for duplicate checking, gap locks
were not taken if the transaction had isolation level <= READ COMMITTED. 
This change was done while fixing Bug #16133801 UNEXPLAINABLE INNODB UNIQUE
INDEX LOCKS ON DELETE + INSERT WITH SAME VALUES (rb#2035). Because of this
the duplicate check logic failed, and resulted in duplicate values in unique
secondary index.

Solution:

When a unique secondary index is scanned for duplicate checking, gap locks
must be taken irrespective of the transaction isolation level.  This is
achieved by reverting rb#2035.

rb#5910 approved by Jimmy
2014-07-03 10:13:29 +05:30
Annamalai Gurusami
76e690fb37 Bug #19140907 DUPLICATES IN UNIQUE SECONDARY INDEX BECAUSE OF FIX OF BUG#68021
Problem:

When a unique secondary index is scanned for duplicate checking, gap locks
were not taken if the transaction had isolation level <= READ COMMITTED. 
This change was done while fixing Bug #16133801 UNEXPLAINABLE INNODB UNIQUE
INDEX LOCKS ON DELETE + INSERT WITH SAME VALUES (rb#2035). Because of this
the duplicate check logic failed, and resulted in duplicate values in unique
secondary index.

Solution:

When a unique secondary index is scanned for duplicate checking, gap locks
must be taken irrespective of the transaction isolation level.  This is
achieved by reverting rb#2035.

rb#5910 approved by Jimmy
2014-07-03 10:13:29 +05:30
Rich Prohaska
3a030fac86 #257 disable missing field initializer warning 2014-07-02 13:27:37 -04:00
Rich Prohaska
9a59ea1419 #257 disable missing field initializer warning 2014-07-02 13:27:37 -04:00
Rich Prohaska
ca032f3e82 #256 only force MDL X for certain alter table operations 2014-06-26 15:24:47 -04:00
Rich Prohaska
d74c5f7432 #256 only force MDL X for certain alter table operations 2014-06-26 15:24:47 -04:00
Arun Kuruvila
76d3e3bccb Bug#18463911 : SERVER CRASHES ON CREATING A TEMP TABLE WITH
CERTAIN MAX_HEAP_TABLE_SIZE VALUES

Followup patch to fix failure on Window machine.
2014-06-26 10:08:55 +05:30
Arun Kuruvila
dd31a2c27b Bug#18463911 : SERVER CRASHES ON CREATING A TEMP TABLE WITH
CERTAIN MAX_HEAP_TABLE_SIZE VALUES

Followup patch to fix failure on Window machine.
2014-06-26 10:08:55 +05:30
Arun Kuruvila
1177d3402d Bug #18463911 : SERVER CRASHES ON CREATING A TEMP TABLE
WITH CERTAIN MAX_HEAP_TABLE_SIZE VALUES

Description:
When the  system variable 'max_heap_table_size'
is set to 20GB, the server crashes on creation of a
temporary tables or tables using MEMORY storage engine.

Analysis:
The variable 'max_record' determines the amount heap
allocated for the records of the table. This value
is determined using the 'max_heap_table_size' variable.
'records_in_block' in turn uses the max_records to
determine the number of records per block.

When the 'max_heap_table_size' is set to 20GB, then
the 'records_in_block' is calculated to a value of
2^28.

The size of the block determined by multiplying the
'records_in_block' and 'recbuffer' results in overflow
and hence the value becomes zero. As a result, zero bytes
of the heap is allocated for the table. This will
result in a server crash when the table is accessed.

Fix:
The variables 'records_in_block' and 'recbuffer' are
typecasted to 'unsigned long' while calculating the
size of the block.
2014-06-25 11:42:41 +05:30
Arun Kuruvila
774095a59b Bug #18463911 : SERVER CRASHES ON CREATING A TEMP TABLE
WITH CERTAIN MAX_HEAP_TABLE_SIZE VALUES

Description:
When the  system variable 'max_heap_table_size'
is set to 20GB, the server crashes on creation of a
temporary tables or tables using MEMORY storage engine.

Analysis:
The variable 'max_record' determines the amount heap
allocated for the records of the table. This value
is determined using the 'max_heap_table_size' variable.
'records_in_block' in turn uses the max_records to
determine the number of records per block.

When the 'max_heap_table_size' is set to 20GB, then
the 'records_in_block' is calculated to a value of
2^28.

The size of the block determined by multiplying the
'records_in_block' and 'recbuffer' results in overflow
and hence the value becomes zero. As a result, zero bytes
of the heap is allocated for the table. This will
result in a server crash when the table is accessed.

Fix:
The variables 'records_in_block' and 'recbuffer' are
typecasted to 'unsigned long' while calculating the
size of the block.
2014-06-25 11:42:41 +05:30
Gopal Shankar
119984db0c Bug#18776592 INNODB: FAILING ASSERTION: PRIMARY_KEY_NO == -1 ||
PRIMARY_KEY_NO == 0 

This bug is a backport of the following revision of 5.6 source tree:
# committer: Gopal Shankar <gopal.shankar@oracle.com>
# branch nick: priKey56
# timestamp: Wed 2013-05-29 11:11:46 +0530
# message:
#   Bug#16368875 INNODB: FAILING ASSERTION:
2014-06-25 09:50:17 +05:30
Gopal Shankar
e107c24f1c Bug#18776592 INNODB: FAILING ASSERTION: PRIMARY_KEY_NO == -1 ||
PRIMARY_KEY_NO == 0 

This bug is a backport of the following revision of 5.6 source tree:
# committer: Gopal Shankar <gopal.shankar@oracle.com>
# branch nick: priKey56
# timestamp: Wed 2013-05-29 11:11:46 +0530
# message:
#   Bug#16368875 INNODB: FAILING ASSERTION:
2014-06-25 09:50:17 +05:30
Jan Lindström
ebf3437810 MDEV-5673: Crash while parallel dropping multiple tables under heavy load
Improve long semaphore wait output to include all semaphore waits
and try to find out if there is a sequence of waiters.
2014-07-23 09:04:59 +03:00
Jan Lindström
67eb6f33a9 MDEV-5670: Assertion failure in file buf0lru.c line 2355
Add more status information if repeatable.
2014-07-22 22:08:06 +03:00
unknown
71a596b90c Makes innodb/xtradb compilable in 5.5 2014-07-15 12:37:34 +03:00
Jan Lindström
970163d0be MDEV-6348: mariadb crash signal 11
Analysis: sync array output function, should make sure that all 
used pointers are valid before using them.
2014-07-08 17:21:13 +03:00
Jan Lindström
8d8c456dbb MDEV-5621: Server random crash on ALTER TABLE
This is not a real fix, instead try to gather additional information
at the point when dictionary content is not what we expect it to be.
2014-07-04 12:25:32 +03:00
Jan Lindström
c922048368 MDEV-6191: row_search_for_mysql comment and code consistency about isolation level
and gap locks
2014-07-04 08:42:59 +03:00
Jan Lindström
838977e54d MDEV-6318: MariaDB with XtraDB uses times more of IO events
than with InnoDB plugin
  
  Fix: os0file.h in XtraDB had OS_AIO_N_PENDING_IOS_PER_THREAD 256
  when on InnoDB it is OS_AIO_N_PENDING_IOS_PER_THREAD 32. Changed
  XtraDB also to use 32.
2014-07-04 08:16:45 +03:00
Jan Lindström
6cc5e00586 MDEV-6225: Idle replication slave keeps crashing.
Analysis: Based on crashed the buffer pool instance identifier is
  not correct on block to be freed. Add LRU list mutex holding
  on functions calling free and add additional safety checks.
2014-06-30 14:06:28 +03:00
Sergei Golubchik
315a4efb91 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751805 typo fixed
use ascii 'x' not utf8 '×' for hex numbers
2014-06-16 22:11:54 +02:00
Rich Prohaska
e8f1ef3975 #252 fix the MDEV-6324 fix 2014-06-13 14:46:38 -04:00
Rich Prohaska
4a993fc93f #252 fix the MDEV-6324 fix 2014-06-13 14:43:36 -04:00
Rich Prohaska
5b4ea7d26a #252 fix the MDEV-6324 fix 2014-06-13 14:43:36 -04:00
Rich Prohaska
eb00a1221e #250 reset thd proc info in end_bulk_insert to fix invalid proc info pointer inside of a deleted ha_tokudb object 2014-06-13 12:06:05 -04:00
Rich Prohaska
f34eddb9f3 #250 reset thd proc info in end_bulk_insert to fix invalid proc info pointer inside of a deleted ha_tokudb object 2014-06-13 12:06:05 -04:00
Rich Prohaska
814f0dd173 #250 reset thd proc info in end_bulk_insert to fix invalid proc info pointer inside of a deleted ha_tokudb object 2014-06-13 12:05:36 -04:00
Rich Prohaska
8a1406b4e3 #252 fix MDEV-6324 uninit var in discover3 2014-06-10 18:56:29 -04:00
Rich Prohaska
f16b3122ab #252 fix MDEV-6324 uninit var in discover3 2014-06-10 18:55:57 -04:00
Rich Prohaska
fd9ded206c #252 fix MDEV-6324 uninit var in discover3 2014-06-10 18:55:57 -04:00
Annamalai Gurusami
b5299f3559 Bug #18806829 OPENING INNODB TABLES WITH MANY FOREIGN KEY REFERENCES IS
SLOW/CRASHES SEMAPHORE

Problem:

There are 2 lakh tables - fk_000001, fk_000002 ... fk_200000.  All of them
are related to the same parent_table through a foreign key constraint.
When the parent_table is loaded into the dictionary cache, all the child table
will also be loaded.  This is taking lot of time.  Since this operation happens
when the dictionary latch is taken, the scenario leads to "long semaphore wait"
situation and the server gets killed.

Analysis:

A simple performance analysis showed that the slowness is because of the
dict_foreign_find() function.  It does a linear search on two linked list
table->foreign_list and table->referenced_list, looking for a particular
foreign key object based on foreign->id as the key.  This is called two
times for each foreign key object.

Solution:

Introduce a rb tree in table->foreign_rbt and table->referenced_rbt, which
are some sort of index on table->foreign_list and table->referenced_list
respectively, using foreign->id as the key.  These rbt structures will be
solely used by dict_foreign_find().  

rb#5599 approved by Vasil
2014-06-10 09:35:50 +05:30
Annamalai Gurusami
ada5a9a2cf Bug #18806829 OPENING INNODB TABLES WITH MANY FOREIGN KEY REFERENCES IS
SLOW/CRASHES SEMAPHORE

Problem:

There are 2 lakh tables - fk_000001, fk_000002 ... fk_200000.  All of them
are related to the same parent_table through a foreign key constraint.
When the parent_table is loaded into the dictionary cache, all the child table
will also be loaded.  This is taking lot of time.  Since this operation happens
when the dictionary latch is taken, the scenario leads to "long semaphore wait"
situation and the server gets killed.

Analysis:

A simple performance analysis showed that the slowness is because of the
dict_foreign_find() function.  It does a linear search on two linked list
table->foreign_list and table->referenced_list, looking for a particular
foreign key object based on foreign->id as the key.  This is called two
times for each foreign key object.

Solution:

Introduce a rb tree in table->foreign_rbt and table->referenced_rbt, which
are some sort of index on table->foreign_list and table->referenced_list
respectively, using foreign->id as the key.  These rbt structures will be
solely used by dict_foreign_find().  

rb#5599 approved by Vasil
2014-06-10 09:35:50 +05:30