Commit graph

8518 commits

Author SHA1 Message Date
Sergei Golubchik
f20598b27d TokuDB 7.5.4 2015-01-13 23:44:32 +01: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
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
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
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
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
1d7f9ec24c DB-775 binlog group commit for 5.6 2014-11-21 16:31:53 -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
412be21f5a DB-762 create tokudb trx when needed in tokudb::start_stmt 2014-11-19 12:31:34 -05:00
Kristian Nielsen
6ea41f1e84 MDEV-7026: Race in InnoDB/XtraDB mutex implementation can stall or hang the server.
The bug was that full memory barrier was missing in the code that ensures that
a waiter on an InnoDB mutex will not go to sleep unless it is guaranteed to be
woken up again by another thread currently holding the mutex. This made
possible a race where a thread could get stuck waiting for a mutex that is in
fact no longer locked. If that thread was also holding other critical locks,
this could stall the entire server. There is an error monitor thread than can
break the stall, it runs about once per second. But if the error monitor
thread itself got stuck or was not running, then the entire server could hang
infinitely.

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

This commit reverts the incorrect PowerPC patch, and instead implements a fix
for PowerPC that does not change i386/amd64 behaviour, making PowerPC work
similarly to i386/amd64.
2014-11-19 13:56:46 +01:00
Sergei Golubchik
302b50fa30 TokuDB 7.5.3 2014-11-18 17:54:00 +01:00
Rich Prohaska
ea9bd89327 DB-770 tokudb::extra HA_EXTRA_NOT_USED should explicitly do nothing 2014-11-17 14:57:06 -05:00
Rich Prohaska
50b928b046 DB-759 test and fix alter table bug with cardinality data 2014-11-13 10:53:22 -05:00
Rich Prohaska
2494bde757 DB-759 fix tokudb::alter_card to copy ALL of the cardinality data not just the low byte 2014-11-12 21:06:51 -05:00
Rich Prohaska
8a7f07711e increase test coverage of the cardinality code 2014-11-12 18:30:16 -05:00
Rich Prohaska
ca67239c51 speed up tokudb handler unit tests 2014-11-12 14:36:08 -05:00
Rich Prohaska
fa92c90393 speed up tokudb handler unit tests 2014-11-12 08:38:04 -05:00
Rich Prohaska
43c176a779 speed up tokudb handler unit tests 2014-11-10 16:34:55 -05:00
Elena Stepanova
b99328bbf8 Re-enabling tests disabled due to MDEV-5266 and MySQL:65225 (fixed now) 2014-11-17 20:28:18 +04:00
Jan Lindström
8c7ef99bb2 MDEV-7100: InnoDB error monitor might unnecessary wait log_sys mutex
Analysis: InnoDB error monitor is responsible to call every second
sync_arr_wake_threads_if_sema_free() to wake up possible hanging 
threads if they are missed in mutex_signal_object. This is not 
possible if error monitor itself is on mutex/semaphore wait. We 
should avoid all unnecessary mutex/semaphore waits on error monitor.
Currently error monitor calls function buf_flush_stat_update() 
that calls log_get_lsn() function and there we will try to get 
log_sys mutex. Better, solution for error monitor is that in 
buf_flush_stat_update() we will try to get lsn with 
mutex_enter_nowait() and if we did not get mutex do not update 
the stats.

Fix: Use log_get_lsn_nowait() function on buf_flush_stat_update()
function. If returned lsn is 0, we do not update flush stats. 
log_get_lsn_nowait() will use mutex_enter_nowait() and if
we get mutex we return a correct lsn if not we return 0.
2014-11-13 11:24:19 +02:00
Rich Prohaska
f127e2120c DB-757 compute cardinality when alter table analyze partition is run 2014-11-08 10:36:33 -05:00
Rich Prohaska
695ce3ad29 DB-756 set cardinality data for partitioned tokudb tables 2014-11-08 08:59:55 -05:00
Rich Prohaska
c14fdb70b1 DB-754 include my_config.h first for mariadb 5.5.40 2014-11-05 11:24:27 -05:00
Rich Prohaska
7adf64d857 DB-730 build tokudb without XA 2014-11-05 04:15:43 -05:00
Jan Lindström
2da6f7ceba MDEV-7017: Add function to print semaphore waits
Add function to print to stderr all current semaphore 
waits. This function should be able to executed 
inside a gdb/ddd.
2014-11-03 15:43:44 +02:00
Sergei Golubchik
50556e7e9a tokudb post-merge fixes 2014-11-02 17:33:02 +01:00
Sergei Golubchik
a2a18dd9d7 tokudb-7.5.3 2014-11-02 16:47:46 +01:00
Marko Makela
a265914018 Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1 CAUSES INFINITE PAGE SPLIT
The debug configuration parameter innodb_optimistic_insert_debug
which was introduced for testing corner cases in B-tree handling
had a bug in it. The value 1 would trigger an infinite sequence
of page splits.

Fix: When the value 1 is specified, disable this debug feature.
Approved by Yasufumi Kinoshita
2014-10-30 08:53:46 +02:00
Annamalai Gurusami
ffc33cffe3 Bug #19908343 SERVER CRASHES WHEN EXECUTING ALTER TABLE
Problem:

In the function dict_foreign_remove_from_cache(), the rb tree was updated
without actually verifying whether the given foreign key object is there in the
rb tree or not.  There can be an existing foreign key object with the same id 
in the rb tree, which must not be removed.  Such a scenario comes when an
attempt is made to add a foreign key object with a duplicate identifier.

Solution:

When the foreign key object is removed from the dictionary cache, ensure
that the foreign key object removed from the rbt is the correct one.

rb#7168 approved by Jimmy and Marko.
2014-10-29 16:53:53 +05:30
Marko Makela
c978f6988d Bug#19584379 Reporting corruption may corrupt the innodb data dictionary
dict_set_corrupted(): Use the canonical way of searching for
less-than-equal (PAGE_CUR_LE) and then checking low_match.

The code that was introduced in MySQL 5.5.17 in
    Bug#11830883 SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES
could position the cursor on the page supremum, and then attempt
to overwrite non-existing 7th field of the 1-field supremum record.

Approved by Jimmy Yang
2014-10-27 14:27:08 +02:00
Rich Prohaska
4c57196e02 DB-747 merge mariadb 10 frm hack and dont compile row format compression code 2014-10-25 16:16:23 -04:00
Rich Prohaska
57f2f606f0 DB-745 merge clustering key is covering key for mariadb 10 2014-10-24 12:34:55 -04:00
Rich Prohaska
ac995231d6 DB-746 merge clustering key is covering key for mariadb 10 2014-10-24 11:23:54 -04:00
Rich Prohaska
ad4af10218 DB-744 ER_GET_ERRNO has additional parameter on MariaDB 10 which crashes tokudb 2014-10-24 05:36:18 -04:00
Rich Prohaska
c5bf055079 DB-742 combine mysql and mariadb plugin declarations 2014-10-18 10:58:38 -04:00
Rich Prohaska
cfbe8342da DB-742 use consistent version macros 2014-10-17 21:23:17 -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
178a511217 DB-742 set the tokudb plugin version string for mariadb 2014-10-16 19:50:53 -04:00