Commit graph

15130 commits

Author SHA1 Message Date
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
Rich Prohaska
280cac9fe1 #250 restore proc info to valid pointers in commit, abort, analyze, and optimize 2014-06-04 12:08:43 -04:00
Rich Prohaska
2f948975f6 #250 restore proc info to valid pointers in commit, abort, analyze, and optimize 2014-06-04 10:44:15 -04:00
Rich Prohaska
ee2a0724a0 #250 restore proc info to valid pointers in commit, abort, analyze, and optimize 2014-06-04 10:44:15 -04:00
Sergei Golubchik
2673910654 mark tokudb in 5.5 as MariaDB_PLUGIN_MATURITY_GAMMA, not MariaDB_PLUGIN_MATURITY_ALPHA. 2014-06-03 10:58:03 +02:00
Sergei Golubchik
77ec219d58 cmake: mark AIO_LIBRARY, EVENT_LIBRARY, GROFF, NROFF as advanced;
use -ggdb3 if supported
2014-06-03 10:57:57 +02:00
Sergei Golubchik
5d16592d44 mysql-5.5.38 merge 2014-06-03 09:55:08 +02:00
Sergei Golubchik
2d687cad5d merge with XtraDB 5.5.37-35.0 2014-06-03 09:53:10 +02:00
Rich Prohaska
768b7b41cb #225 fix tokudb store lock to fix lock tables crash 2014-06-01 16:57:53 -04:00
Rich Prohaska
39ef408165 #225 fix tokudb store lock to fix lock tables crash 2014-06-01 12:48:53 -04:00
Rich Prohaska
7ea92a6561 #225 fix tokudb store lock to fix lock tables crash 2014-06-01 12:48:53 -04:00
Rich Prohaska
083764f033 #225 hot optimize for 5.6 and 10.0 using alter recreate 2014-06-01 07:50:32 -04:00
Rich Prohaska
454e974ce4 #225 hot optimize for 5.6 and 10.0 using alter recreate 2014-06-01 07:49:28 -04:00
Rich Prohaska
e335e62c87 #225 hot optimize for 5.6 and 10.0 using alter recreate 2014-06-01 07:49:28 -04:00
Rich Prohaska
676c38a886 #245 use row estimate parameter to start_bulk_insert to decide if a loader is used 2014-05-31 12:16:56 -04:00
Rich Prohaska
27c8ae28fc #245 use row estimate parameter to start_bulk_insert to decide if a loader is used 2014-05-31 12:16:56 -04:00
Rich Prohaska
bf21d6334d #245 use row estimate parameter to start_bulk_insert to decide if a loader is used 2014-05-31 11:11:36 -04:00
Sergei Golubchik
69bb48b89b disable unstable tokudb tests 2014-05-31 10:16:25 +02:00
Sergei Golubchik
de8cb7a1f3 MDEV-5485 Minor man pages formatting issues
MDEV-6281 Typo in mysql_install_db scripts
and collateral changes:

* remove mysql_tableinfo.1 and references to it (there's no mysql_tableinfo)
* for debian: create manpages for mysqlrepair, mysqlanalyze, mysqloptimize
  (as symlinks for mysqlcheck.1, just as executables are symlinks to mysqlcheck)
* remove mysqlmanager.8 and references to it
* correct "very long line" error in mysqladmin.1
* simplify and fix table formatting in mysqlbinlog.1 and mysqldump.1
* fix a typo in the help text in mysql_install_db
* aria_chk: say "for Linux on x86_64", like other tools do
  (not "for Linux at x86_64")
* add simple manpages for aria_* utilities
2014-05-30 23:19:26 +02:00
Rich Prohaska
cb0ae1663a #241 unique key check should avoid relocking keys if the table is already prelocked by the loader 2014-05-29 07:41:46 -04:00
Rich Prohaska
e7496641ce #241 unique key check should avoid relocking keys if the table is already prelocked by the loader 2014-05-29 07:41:16 -04:00
Rich Prohaska
4121f1193c #241 unique key check should avoid relocking keys if the table is already prelocked by the loader 2014-05-29 07:41:16 -04:00
Rich Prohaska
c1c2d0e5aa #206 merge mariadb 10.0.11 changes 2014-05-20 09:47:19 -04:00
Rich Prohaska
2006f3bf58 #206 merge mariadb 10.0.11 changes 2014-05-14 14:43:44 -04:00
Rich Prohaska
ede2f6963a #206 merge mariadb 10.0.11 changes 2014-05-14 14:43:44 -04:00
Rich Prohaska
67ec3f3075 #221 fix tokudb::estimate_num_rows 2014-05-13 13:25:44 -04:00
Rich Prohaska
f39c22282a #221 fix tokudb::estimate_num_rows 2014-05-13 08:56:06 -04:00
Rich Prohaska
02c6f5bb07 #221 fix tokudb::estimate_num_rows 2014-05-13 08:56:06 -04:00
Rich Prohaska
e2fa4abda1 #232 compile in jemalloc detector 2014-05-12 06:35:42 -04:00
Rich Prohaska
39b08e0222 #232 compile in jemalloc detector 2014-05-10 15:53:31 -04:00
Rich Prohaska
cae1d71b88 #232 compile in jemalloc detector 2014-05-10 15:53:31 -04:00
Venkata Sidagam
858e5626c5 Bug #18045646 LOCAL USER CAN RUN ARBITRARY CODE IN THE CONTEXT OF THE MYSQL SERVER
Description: Using the temporary file vulnerability an
attacker can create a file with arbitrary content at a
location of his choice. This can be used to create the
file /var/lib/mysql/my.cnf, which will be read as a
configuration file by MySQL, because it is located in the
home directory of the mysql user. With this configuration
file, the attacker can specify his own plugin_dir variable,
which then allows him to load arbitrary code via
"INSTALL PLUGIN...".

Analysis: While creating the ".TMD" file we are not checking
if the file is already exits or not in mi_repair() function.
And we are truncating if the ".TMD" file exits and going ahead
This is creating the security breach.

Fix: We need to use O_EXCL flag along with O_RDWR and O_TRUNC
which will make sure if any user creates ".TMD" file, will
fails the repair table with "cannot create ".TMD" file error".
Actually we are initialing "param.tmpfile_createflag" member
with O_RDWR | O_TRUNC | O_EXCL in myisamchk_init(). And we
are modifying it in ha_myisam::repair() to O_RDWR | O_TRUNC.
So, we need to remove the line which is modifying the
"param.tmpfile_createflag".
2014-05-08 14:41:01 +05:30
Venkata Sidagam
b9c03d41e4 Bug #18045646 LOCAL USER CAN RUN ARBITRARY CODE IN THE CONTEXT OF THE MYSQL SERVER
Description: Using the temporary file vulnerability an
attacker can create a file with arbitrary content at a
location of his choice. This can be used to create the
file /var/lib/mysql/my.cnf, which will be read as a
configuration file by MySQL, because it is located in the
home directory of the mysql user. With this configuration
file, the attacker can specify his own plugin_dir variable,
which then allows him to load arbitrary code via
"INSTALL PLUGIN...".

Analysis: While creating the ".TMD" file we are not checking
if the file is already exits or not in mi_repair() function.
And we are truncating if the ".TMD" file exits and going ahead
This is creating the security breach.

Fix: We need to use O_EXCL flag along with O_RDWR and O_TRUNC
which will make sure if any user creates ".TMD" file, will
fails the repair table with "cannot create ".TMD" file error".
Actually we are initialing "param.tmpfile_createflag" member
with O_RDWR | O_TRUNC | O_EXCL in myisamchk_init(). And we
are modifying it in ha_myisam::repair() to O_RDWR | O_TRUNC.
So, we need to remove the line which is modifying the
"param.tmpfile_createflag".
2014-05-08 14:41:01 +05:30
Rich Prohaska
2c992d641b #228 use thd_get/set_ha_data for tokudb_trx data 2014-05-07 15:22:14 -04:00
Rich Prohaska
c636dd5287 #226 delete CMakeLists.in, no longer used 2014-05-07 15:21:46 -04:00
Rich Prohaska
b0493252e0 #228 use thd_get/set_ha_data for tokudb_trx data 2014-05-07 08:20:41 -04:00
Rich Prohaska
493f9fd081 #228 use thd_get/set_ha_data for tokudb_trx data 2014-05-07 08:20:41 -04:00
Rich Prohaska
5624a03c83 #226 delete CMakeLists.in, no longer used 2014-05-06 13:17:49 -04:00
Rich Prohaska
78204c2152 #226 delete CMakeLists.in, no longer used 2014-05-06 13:17:49 -04:00
Jan Lindström
1adf9e7984 MDEV-6257: MariaDB 5.5 fails to start with 10.0 InnoDB log files
Analysis: Can't disable the error message because you may get database
started with incorrect log file size. 

Fix: Thus only improve the error message to give more information 
to users.
2014-05-22 16:20:56 +03:00
Jan Lindström
75137522b9 MDEV-6257: MariaDB 5.5 fails to start with 10.0 InnoDB log files
Analysis: By default 10.0 creates 48M log files and 5.5 assumes they
are 5M.

Fix: Remove the error and do size comparison later.
2014-05-21 13:14:43 +03:00
Michael Widenius
a55c159424 MDEV-6245 Certain compressed tables with myisampack are corrupted by "CHECK TABLE"
- Fixed bug that we where using wrong checksum algorithm when using VARCHAR with fixed lenth rows
- Ensure in myisampack that HA_OPTION_NULL_FIELDS is set for tables with null fields.

mysql-test/r/myisampack.result:
  Updated results
mysql-test/t/myisampack.test:
  Added more tests
storage/myisam/mi_open.c:
  Use correct checksum algorithm when we have VARCHAR fields with fixed length records
storage/myisam/myisampack.c:
  Ensure HA_OPTION_NULL_FIELDS is set for tables with null fields.
  (This was not set by default for not compressed tables without checksums to keep MyISAM tables compatible with MySQL)
2014-05-17 10:42:59 +03:00
Jan Lindström
124428a9e2 MDEV-4791: Assertion range_end >= range_start fails in log0online.c
on select from I_S.INNODB_CHANGED_PAGES

Analysis: limit_lsn_range_from_condition() incorrectly parses
start_lsn and/or end_lsn conditions.

Fix from SergeyP. Added some test cases.
2014-05-09 11:03:39 +03:00
Michael Widenius
554fd30ba3 Fixed bug where CHECK TABLE for a MYISAM table before 5.5.38 wrongly gave warning:
"Table upgrade required..."

The row format is only different for the case where we have a very old MyISAM table with varchar fields, null fields and created with CHECKSUM=1
The table is usable, except that CHECKSUM TABLE will give a wrong result and CHECK TABLE will warn about this.

I added a test for this to warn when a table needs to be upgraded, but forgot to add a test that this was only relevant for tables with CHECKSUM=1
This is now fixed.



storage/myisam/ha_myisam.cc:
  Fixed wrong test.
2014-05-06 23:44:02 +03:00
Sergei Golubchik
7a0a2c4b84 after tokudb-7.1.6 merge 2014-05-06 14:40:32 +02:00
Sergei Golubchik
aff4854dfd merge:
git://github.com/Tokutek/ft-index.git
git://github.com/Tokutek/ft-engine.git
at the tag tokudb-7.1.6
2014-05-05 22:59:44 +02:00
Rich Prohaska
d274f91a8e #224 fail tokudb init if jemalloc is not loaded 2014-05-05 08:13:25 -04:00
Rich Prohaska
394202d207 #224 fail tokudb init if jemalloc is not loaded 2014-05-05 07:59:33 -04:00
Rich Prohaska
af1fbde5f8 #224 fail tokudb init if jemalloc is not loaded 2014-05-05 07:59:33 -04:00
Rich Prohaska
2eb45b888e #223 build tokudb without upserts 2014-05-03 06:03:39 -04:00
Rich Prohaska
2a8682244a #223 build tokudb without upserts 2014-05-02 15:55:52 -04:00
Rich Prohaska
12f56b69d6 #223 build tokudb without upserts 2014-05-02 15:55:52 -04:00
Rich Prohaska
fa301b7bd4 #222 filter out degenerate key range in tokudb::record_in_range 2014-05-01 14:38:26 -04:00
Rich Prohaska
85d338cc3e #222 filter out degenerate key range in tokudb::record_in_range 2014-04-30 18:19:14 -04:00
Rich Prohaska
0a75992219 #222 filter out degenerate key range in tokudb::record_in_range 2014-04-30 18:19:14 -04:00
Rich Prohaska
879d9449cc #218 fix incorrect use of num_DBs_lock 2014-04-29 13:53:37 -04:00
Rich Prohaska
53cb5329e4 #218 fix incorrect use of num_DBs_lock 2014-04-29 13:51:05 -04:00
Rich Prohaska
1a58d90e41 #218 fix incorrect use of num_DBs_lock 2014-04-29 13:51:05 -04:00
Sergei Golubchik
2797f0c534 fix XtraDB version to tell the truth 2014-04-28 12:11:35 +02:00
Sergei Golubchik
0e05dc81b3 rename handler::ha_set_lock_type() -> handler::set_lock_type(),
because it's not a handler convenience wrapper
2014-04-28 11:11:16 +02:00
Rich Prohaska
d36f401008 ft-index#218 use cursor set range with bound for point queries 2014-04-25 14:39:54 -04:00
Rich Prohaska
fa3526f17a #110 turn off replace into and insert ignore optimizations when binlog format != statement (2nd try) 2014-04-25 14:39:53 -04:00
Rich Prohaska
f2e73c9a6f #110 turn off replace into and insert ignore optimizations when binlog format != statement 2014-04-25 14:39:53 -04:00
Rich Prohaska
975c904f16 #202 allow non-null AND null key index cursor operations (2nd try) 2014-04-25 14:39:53 -04:00
Rich Prohaska
197e2a44aa #206 support mariadb 10.0.10 start_bulk_insert api change 2014-04-25 14:39:53 -04:00
Rich Prohaska
847e14f3b0 #212 binlog row replication turns the insert ignore optimization off 2014-04-25 14:39:53 -04:00
Rich Prohaska
4fbec79e55 #202 allow non-null AND null key index cursor operations 2014-04-25 14:39:53 -04:00
Rich Prohaska
dbb07c3f9e #194 fix gcc 4.8 warnings 2014-04-25 14:39:53 -04:00
Rich Prohaska
a97122c505 #206 compile without partition storage engine 2014-04-25 14:39:53 -04:00
Rich Prohaska
c9dfa7496e #206 support mariadb 10.0.10 alter compression table attribute 2014-04-25 14:39:53 -04:00
Rich Prohaska
06274e30cf #209 add variable to control table empty algorithm 2014-04-25 14:39:53 -04:00
Rich Prohaska
25f13fdac0 #208 debug create temp table and transactions 2014-04-25 14:39:53 -04:00
Rich Prohaska
2df1755756 #133 dont overlock key ranges for unique secondary keys 2014-04-25 14:39:53 -04:00
Rich Prohaska
d9bddf1341 #209 add tokudb_open_table_check_empty session variable to enable/disable may_table_be_open 2014-04-25 14:26:29 -04:00
Rich Prohaska
d8fdb8dc9f #205 build tokudb with webscalesql-5.6 2014-04-25 14:26:29 -04:00
Rich Prohaska
f2a7a7d0b4 #204 print compression status variables 2014-04-25 14:26:29 -04:00
Rich Prohaska
1c3a7b0be7 #200 handle errors when writing cardinality data 2014-04-25 14:26:28 -04:00
Rich Prohaska
2e45809303 #195 merge mariadb 10.0.9 2014-04-25 14:26:28 -04:00
Rich Prohaska
3527f774f0 #198 add tokudb_backtrace to help debug handler interface bugs 2014-04-25 14:26:28 -04:00
Rich Prohaska
94ed981ffe ft-index#218 use cursor set range with bound for point queries 2014-04-25 13:43:45 -04:00
Rich Prohaska
0c2889b2ea ft-index#218 use cursor set range with bound for point queries 2014-04-25 13:43:45 -04:00
Rich Prohaska
02fce56777 #110 turn off replace into and insert ignore optimizations when binlog format != statement (2nd try) 2014-04-21 12:35:59 -04:00
Rich Prohaska
f7b9d7f6a4 #110 turn off replace into and insert ignore optimizations when binlog format != statement (2nd try) 2014-04-21 12:35:59 -04:00
Rich Prohaska
99c4517b29 #110 turn off replace into and insert ignore optimizations when binlog format != statement 2014-04-21 10:35:03 -04:00
Rich Prohaska
a7836999d1 #110 turn off replace into and insert ignore optimizations when binlog format != statement 2014-04-21 10:35:03 -04:00
Rich Prohaska
25f931c6b6 #202 allow non-null AND null key index cursor operations (2nd try) 2014-04-18 14:07:14 -04:00
Rich Prohaska
139634dcf0 #202 allow non-null AND null key index cursor operations (2nd try) 2014-04-18 14:07:14 -04:00
Rich Prohaska
5d2d9bfdeb #206 support mariadb 10.0.10 start_bulk_insert api change 2014-04-17 09:12:43 -04:00
Rich Prohaska
4990d18886 #206 support mariadb 10.0.10 start_bulk_insert api change 2014-04-17 09:12:43 -04:00
Rich Prohaska
9f324de94d #212 binlog row replication turns the insert ignore optimization off 2014-04-14 17:23:06 -04:00
Rich Prohaska
8cbc61dabd #212 binlog row replication turns the insert ignore optimization off 2014-04-14 17:23:06 -04:00
Rich Prohaska
e7e91ab6bb #202 allow non-null AND null key index cursor operations 2014-04-14 15:11:31 -04:00
Rich Prohaska
86849fb5f8 #202 allow non-null AND null key index cursor operations 2014-04-14 15:11:31 -04:00
Rich Prohaska
cb41cf0db1 #194 fix gcc 4.8 warnings 2014-04-13 14:40:54 -04:00
Rich Prohaska
957881df87 #194 fix gcc 4.8 warnings 2014-04-13 14:40:54 -04:00
Arun Kuruvila
92351c831f Description: When we execute a correlated subquery on an
archive table which is using an auto increment column, the
server hangs. In order to recover the mysqld process, it
has to be terminated abnormally using SIGKILL. The problem
is observed in mysql-5.5.
Bug #18065452 "PREPARING" STATE HOGS CPU WITH ARCHIVE
               + SUBQUERY

Analysis: This happens because the server is trapped inside
an infinite loop in the function,
"subselect_indexsubquery_engine::exec()". This function
resolves the correlated suquery by doing an index lookup
for the appropriate engine. In  case of archive engine,
after reaching the end of records, "table->status" is not
set to STATUS_NOT_FOUND. As a result the loop is not 
terminated.

Fix: The "table->status" is set to STATUS_NOT_FOUND when
the end of records is reached.
2014-04-10 11:10:31 +05:30
Arun Kuruvila
e12156e7b6 Description: When we execute a correlated subquery on an
archive table which is using an auto increment column, the
server hangs. In order to recover the mysqld process, it
has to be terminated abnormally using SIGKILL. The problem
is observed in mysql-5.5.
Bug #18065452 "PREPARING" STATE HOGS CPU WITH ARCHIVE
               + SUBQUERY

Analysis: This happens because the server is trapped inside
an infinite loop in the function,
"subselect_indexsubquery_engine::exec()". This function
resolves the correlated suquery by doing an index lookup
for the appropriate engine. In  case of archive engine,
after reaching the end of records, "table->status" is not
set to STATUS_NOT_FOUND. As a result the loop is not 
terminated.

Fix: The "table->status" is set to STATUS_NOT_FOUND when
the end of records is reached.
2014-04-10 11:10:31 +05:30
Rich Prohaska
da5e2a19e6 #206 compile without partition storage engine 2014-04-09 07:45:15 -04:00
Rich Prohaska
a1b98694e5 #206 compile without partition storage engine 2014-04-09 07:45:15 -04:00
Rich Prohaska
38b95830b5 #206 support mariadb 10.0.10 alter compression table attribute 2014-04-08 15:24:06 -04:00
Rich Prohaska
0b1edd4302 #206 support mariadb 10.0.10 alter compression table attribute 2014-04-08 15:24:06 -04:00
Rich Prohaska
5b3f63c0d0 #209 add variable to control table empty algorithm 2014-04-08 11:15:28 -04:00
Rich Prohaska
2a518937fe #209 add variable to control table empty algorithm 2014-04-08 11:15:28 -04:00
Rich Prohaska
fb30dc2667 #208 debug create temp table and transactions 2014-04-07 16:58:51 -04:00
Rich Prohaska
37fd531d2a #208 debug create temp table and transactions 2014-04-07 16:58:51 -04:00
Rich Prohaska
4a88423538 #133 dont overlock key ranges for unique secondary keys 2014-04-07 13:34:58 -04:00
Rich Prohaska
1dce2eaa2f #133 dont overlock key ranges for unique secondary keys 2014-04-07 13:34:58 -04:00
Rich Prohaska
22bf01e7f5 #209 add tokudb_open_table_check_empty session variable to enable/disable may_table_be_open 2014-04-03 11:21:00 -04:00
Rich Prohaska
db470f2979 #209 add tokudb_open_table_check_empty session variable to enable/disable may_table_be_open 2014-04-03 11:21:00 -04:00
Thirunarayanan B
0df90f2a6f Bug #17858679 TOO MANY TIMES OF MEMSET DECREASE
THE PERFORMANCE UNDER HEAVY INSERT
	Fixing the build problem in 5.5.
2014-04-01 11:36:58 +05:30
Thirunarayanan B
5e9a285164 Bug #17858679 TOO MANY TIMES OF MEMSET DECREASE
THE PERFORMANCE UNDER HEAVY INSERT
	Fixing the build problem in 5.5.
2014-04-01 11:36:58 +05:30
Thirunarayanan B
5541d7c656 Bug #17858679 TOO MANY TIMES OF MEMSET DECREASE
THE PERFORMANCE UNDER HEAVY INSERT
Problem:
	There are three memset call to allocate memory for system fields
in each insert.

Solution:
	Instead of calling it in 3 times, we can combine it into
one memset call. It will reduce the CPU usage under heavy insert.

	Approved by Marko rb-4916
2014-04-01 10:46:13 +05:30