Commit graph

15041 commits

Author SHA1 Message Date
Sergei Golubchik
17a37796e1 after innodb/xtradb merge: use the correct visibility for internal functions
otherwise innodb plugin might invoke xtradb function with the same name,
and that might crash (./mtr --emb innodb.strict_mode)
2015-03-06 18:13:06 +01:00
Jan Lindström
206b111b11 MDEV-7672: Crash creating an InnoDB table with foreign keys
Analysis: after a red-black-tree lookup we use node withouth
checking did lookup succeed or not. This lead to situation
where NULL-pointer was used.

Fix: Add additional check that found node from red-back-tree
is valid.
2015-03-06 11:19:23 +02:00
Jan Lindström
f66fbe8ce0 MDEV-7578 :Slave is ~10x slower to execute set of statements compared to master when using RBR
Analysis: On master when executing (single/multi) row INSERTs/REPLACEs
InnoDB fallback to old style autoinc locks (table locks)
only if another transaction has already acquired the AUTOINC lock.
Instead on slave as we are executing log_events and sql_command
is not correctly set, InnoDB does not use new style autoinc
locks when it could.

Fix: Use new style autoinc locks also when
thd_sql_command(user_thd) == SQLCOM_END i.e. this is RBR event.
2015-03-05 12:05:59 +02:00
Sergei Golubchik
fa87fc733d update tokudb version after merge 2015-02-27 18:28:40 +01:00
Sergei Golubchik
5dce6aa1fe Merge remote-tracking branch 'bzr/5.5' into bb-5.5-merge 2015-02-12 13:14:55 +01:00
Sergei Golubchik
ed839052d7 Merge tag 'tokudb-7.5.5' into bb-5.5-merge 2015-02-12 00:23:21 +01:00
Sergei Golubchik
8e80f91fa3 Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42 2015-02-11 23:50:40 +01:00
Sergei Golubchik
2a1be9cdf8 XtraDB 5.5.41-37.0 2015-02-11 20:40:56 +01:00
Sergei Golubchik
f007f82881 MDEV-7351 5.5 build fails on Ubuntu Utopic in buildbot
include oqgraph into deb packages conditionally, just like we do with tokudb
2015-02-09 20:53:28 +01:00
Jan Lindström
44a9e3f7b4 MDEV-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8
The testcase fails randomly due to ibuf merge happening in the background.
Fix not to do any merges with ibuf_debug enabled.
2015-02-09 16:14:27 +02:00
Jan Lindström
8cc9751165 MDEV-7538: Wrong constraint (TINYINT or MEDIUMINT and INT)
causes server crash

Analysis: If wrong data types used on foreign constraint there
was possibility that foreign->id is NULL when incorrect
foreign constraint was removed from the dictionary cache.

Fix: Add guard foreign->id != NULL before trying to lookup
or remove the foreign constraint from dictionary cache.

Tested using user database where problem was repeatable.
2015-02-04 14:40:46 +02:00
Jan Lindström
f32091532d MDEV-7055: MySQL#74664 - InnoDB: Failing assertion: len <= col->len || col->mtype == 5 || (col->len == 0 && col->mtype == 1) in file rem0rec.cc line 845
Debug assertion maybe too strict.
2015-02-04 10:50:16 +02:00
Jan Lindström
7afbf338aa MDEV-7513: ib_warn_row_too_big dereferences null thd
Analysis: Purge thread does not have thd and no access to
handlerton.

Fix: If thd does not exists we use sql_print_warning instead
of push_warning_printf.
2015-02-04 09:29:54 +02:00
Sergei Golubchik
cb9c116a50 update tokudb version after merge 2015-01-23 09:13:21 +01:00
Rich Prohaska
e7f48475d9 DB-798 add the tokudb_rpl_check_readonly variable for RFR 2015-01-19 09:45:41 -05:00
Sergei Golubchik
2fc0b22f2a restore an incorrectly merged line
it's in the dead code (ifdef-ed out) so it doesn't matter what it is.
still better to keep it closer to the upstream
2015-01-16 17:54:00 +01:00
Rich Prohaska
25c152b005 DB-777 when a tokudb lock timeout occurs print info about the conflicting queries to the error log 2015-01-15 19:06:39 -05:00
Rich Prohaska
9927d0f930 DB-777 when a tokudb lock timeout occurs print info about the conflicting queries to the error log 2015-01-15 15:56:32 -05:00
Rich Prohaska
c87f8151ac DB-478 DB-788 DB-789 optimize tokudb table enhancements 2015-01-15 14:09:57 -05:00
Rich Prohaska
7629f47993 DB-793 add debug tracing to records_in_range to help debug query plan problems 2015-01-14 08:26:41 -05:00
Sergei Golubchik
f20598b27d TokuDB 7.5.4 2015-01-13 23:44:32 +01:00
Rich Prohaska
f9e59a0616 DB-790 remove the handle fatal signal mysql patch 2015-01-10 16:50:04 -05:00
Rich Prohaska
fa59b13a55 DB-781 check killed in tokudb get_next to terminate a big partition copy. should be done in partition storage engine, however 2015-01-07 19:02:26 -05:00
Rich Prohaska
efb32d4644 DB-787 the tokudb_report_fractal_tree_info_for_db function can leak a db on an error path where db->open fails 2015-01-04 12:13:54 -05:00
Rich Prohaska
9cd31bc559 DB-787 the tokudb_report_fractal_tree_info_for_db function can leak a db on an error path where db->open fails 2015-01-04 12:13:54 -05:00
Rich Prohaska
78bc6e37ad DB-785 turn off fsync on mariadb for 2PC transactions 2015-01-02 09:53:30 -05:00
Rich Prohaska
7229b9f5f8 DB-785 turn off fsync on mariadb for 2PC transactions 2015-01-02 09:53:30 -05:00
Jan Lindström
5fafc3ce42 MDEV-7369: MariaDB build fails when XTRADB_STORAGE_ENGINE enabled
Patch by James Taylor.
2014-12-28 13:24:53 +02:00
Thiru
901ce5314b Bug #20144839 AFTER UPDATING TO MYSQL 5.6.22 SERVER
CRASHES ON EVERY START ATTEMPT

Description:
------------
push_warning_printf function is used to print the warning message
to the client. So this function should not invoke while recovering
the server. Moreover current_thd is NULL while starting the server.

Solution:
---------
 - Avoiding the warning to be printed while recovery.
This patch already pushed in mysql-5.6.
2014-12-24 15:22:10 +05:30
Rich Prohaska
b9d154c564 DB-766 use an extra flag that is supported on MySQL and does not require a tokutek patch to the wait_while_table_is_used function 2014-12-21 19:15:39 -05:00
Rich Prohaska
de9a378646 DB-766 use an extra flag that is supported on MySQL and does not require a tokutek patch to the wait_while_table_is_used function 2014-12-21 19:15:39 -05:00
Sergey Vojtovich
094640c036 Fixed a couple of compiler warnings. 2014-12-19 23:17:59 +04:00
Sergei Golubchik
a978bdda1e mysql-5.5.41 merge 2014-12-19 11:35:44 +01:00
Rich Prohaska
6714ec1247 DB-783 append -Wvla to compiler flags to allow variable length arrays to be used in tokudb 2014-12-17 16:44:02 -05:00
Rich Prohaska
59f2e81769 DB-783 append -Wvla to compiler flags to allow variable length arrays to be used in tokudb 2014-12-17 16:44:02 -05: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
Rich Prohaska
e149ab9da9 run on mariadb 10 with its safe malloc 2014-12-07 13:17:45 -05:00
Rich Prohaska
955cce52f6 run on mariadb 10 with its safe malloc 2014-12-07 13:17:45 -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
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
Rich Prohaska
b798b3546a DB-775 binlog group commit for 5.6 2014-11-21 16:31:53 -05:00
Rich Prohaska
1d7f9ec24c DB-775 binlog group commit for 5.6 2014-11-21 16:31:53 -05:00
Rich Prohaska
e64b621179 DB-771 fix incorrect assert in update callback for varchar expansion 2014-11-21 07:13:07 -05:00
Rich Prohaska
eb13e2b40d DB-771 fix incorrect assert in update callback for varchar expansion 2014-11-21 07:13:07 -05: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
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
Rich Prohaska
3f3e058f5a DB-762 create tokudb trx when needed in tokudb::start_stmt 2014-11-19 12:31:34 -05:00