Commit graph

7920 commits

Author SHA1 Message Date
Alexey Botchkov
1707cfc9ef MDEV-8211 plugins.server_audit fails sporadically in buildbot.
More fixes to assure the order of queries in the log.
2015-06-08 21:55:52 +05:00
Alexey Botchkov
87088b91f7 MDEV-8211 plugins.server_audit fails sporadically in buildbot.
This test also should be fixed - delay added so the connection
  event doesn't happen before the query.
2015-06-08 21:44:13 +05:00
Alexey Botchkov
96b37035e4 MDEV-8211 plugins.server_audit fails sporadically in buildbot.
Connection event can happen before the query ends. Added a delay to
   confirm the order.
2015-06-08 21:40:17 +05:00
Alexey Botchkov
69ed429aff MDEV-7500 thread_handling option in my.cnf is not passing "connect events" to audit plugin.
The MYSQL_AUDIT_NOTIFY_CONNECTION_CONNECT() call moved to the login_connection()
  function. So that it'll be invoked in any thread handling mode.
2015-06-08 12:09:13 +05:00
Alexey Botchkov
1ae05db49c MDEV-8078 Memory disclosure/buffer overread on audit plugin.
If the SET PASSWORD query doesn't have the password string,
        the parsing of it can fail. It manifested first in MySQL 5.6 as
        it started to hide password lines sent to the plugins.
        Fixed by checking for that case.
2015-06-07 15:40:42 +05:00
Alexey Botchkov
db0ecf2662 MDEV-8032 [PATCH] audit plugin - csv output broken.
Symbols like TAB or NEWLINE should be escaped, which was
        forgotten in one place.
2015-06-06 19:12:44 +05:00
Sergei Golubchik
9a3b975da6 Merge branch '5.5' into bb-5.5-serg 2015-06-05 09:51:17 +02:00
Sergei Golubchik
ae0c576d46 Merge branch 'merge/merge-xtradb-5.5' into bb-5.5-serg
update tests
2015-06-05 02:14:49 +02:00
Sergei Golubchik
f84f577aa1 Merge tag 'mysql-5.5.44' into bb-5.5-serg 2015-06-05 02:06:51 +02:00
Alexander Barkov
9da8a8f946 MDEV-7269 mysqlbinlog Don't know how to handle column type=0 meta=0 (0000)#
MDEV-8267 Add /*old*/ comment into I_S.COLUMN_TYPE for old DECIMAL
2015-06-04 18:49:12 +04:00
Sergei Golubchik
7b05650c7d Merge tag 'tokudb-engine/tokudb-7.5.7' into 5.5 2015-06-03 20:24:51 +02:00
Sergei Golubchik
8e7d6652ad CRLF->LF 2015-06-02 22:07:47 +02:00
Nirbhay Choubey
0bfae356d4 MDEV-8166 : Adding index on new table from select crashes Galera cluster
In wsrep, CTAS should be handled like a regular transaction.
Added a test case.
2015-05-16 11:11:26 -04:00
Ajo Robert
515b2203c5 Bug #18075170 SQL NODE RESTART REQUIRED TO
AVOID DEADLOCK AFTER RESTORE

Analysis
--------
Accessing the restored NDB table in an active multi-statement
transaction was resulting in deadlock found error.

MySQL Server needs to discover metadata of NDB table from
data nodes after table is restored from backup. Metadata
discovery happens on the first access to restored table.
Current code mandates this statement to be the first one
in the transaction. This is because discover needs exclusive
metadata lock on the table. Lock upgrade at this point can
lead to MDL deadlock and the code was written at the time
when MDL deadlock detector was not present. In case when
discovery attempted in the statement other than the first
one in transaction ER_LOCK_DEADLOCK error is reported
pessimistically.

Fix:
---
Removed the constraint as any potential deadlock will be
handled by deadlock detector. Also changed code in discover
to keep metadata locks of active transaction.

Same issue was present in table auto repair scenario. Same
fix is added in repair path also.
2015-05-11 16:05:50 +05:30
Nirbhay Choubey
d2562004c5 Merge tag 'mariadb-5.5.43' into 5.5-galera 2015-05-04 13:50:52 -04:00
Sergei Golubchik
4c87f72773 Merge branch '5.5' into bb-5.5-serg 2015-04-29 16:24:52 +02:00
Jan Lindström
4c174fcb4a MDEV-8020: innodb.innodb-mdev-7055 produces valgrind warnings in buildbot
Fixed by reverting incorrect fix of MDEC-7055 (reopened) and removing the
test case (because it now crashes).
2015-04-28 15:29:46 +03:00
Sergei Golubchik
0f12ada6b6 Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-04-27 21:04:06 +02:00
Sergei Golubchik
e26b2071be MDEV-7938 MariaDB Crashes Suddenly while writing binlogs
on disconnect THD must clean user_var_events array before
dropping temporary tables. Otherwise when binlogging a DROP,
it'll access user_var_events, but they were allocated
in the already freed memroot.
2015-04-27 15:42:12 +02:00
V S Murthy Sidagam
7797ef4dec Merge branch 'mysql-5.1' into mysql-5.5 2015-04-27 14:46:40 +05:30
V S Murthy Sidagam
c655515d1b Bug #20683237 BACKPORT 19817663 TO 5.1 and 5.5
Restrict when user table hashes can be viewed. Require SUPER privileges.
2015-04-27 14:33:25 +05:30
Sergei Golubchik
f8320210e7 MDEV-7126 replication slave - deadlock in terminate_slave_thread with stop slave and show variables of replication filters and show global status
Three-way deadlock:

  T1: SHOW GLOBAL STATUS
      -> acquire LOCK_status
  T2: STOP SLAVE
      -> acquire LOCK_active_mi
      -> terminate_slave_thread()
      -> -> cond_timedwait for handle_slave_sql to stop
  T3: sql slave thread (same applies to io thread)
      -> handle_slave_sql(), when exiting
      -> -> THD::add_status_to_global()
      -> -> -> wait for LOCK_status...
  T1: SHOW GLOBAL STATUS
      -> for "Slave_heartbeat_period" status variable
      -> -> show_heartbeat_period()
      -> -> -> wait for LOCK_active_mi

cherry-pick from 5.6:

  commit fc8b395898f40387b3468122bd0dae31e29a6fde
  Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
  Date:   Wed Jun 12 21:41:05 2013 +0530

    BUG#16904035-SHOW STATUS - EXCESSIVE LOCKING ON LOCK_ACTIVE_MI AND
    ACTIVE_MI->RLI->DATA_LOCK

    Problem: Excessive locking on lock_active_mi and rli->data_lock
    while executing any `show status like 'X'` command.

    Analysis: SHOW_FUNCs for Slave_running, Slave_retried_transactions,
    Slave_heartbeat_period, Slave_received_heartbeats,
    Slave_last_heartbeat are acquiring lock_active_mi and rli->data_lock
    to show their variable value. It is ok to show stale data while showing
    the status variables i.e., even if they miss one update, it will
    not cause any great trouble.

    Fix: Remove the locks from the above mentioned SHOW_FUNC functions.

Add a test case
2015-04-26 22:05:33 +02:00
Nirbhay Choubey
581b49dd3d MDEV-7995 : DMLs not getting replicated with log-bin=OFF & binlog-format != ROW
This bug is a side-effect of fix for MDEV-6924, where we completely
stopped a statement-based event from getting into the binlog cache when
binary logging is not enabled (and thus, wsrep_emulate_binlog mode = 1).
As a result, the SBR events were not replicated.

Fixed by allowing the SBR events to be written into the binlog cache.

Note: Only DMLs were affected as DDLs are replicated via TOI.

Merged galera_create_trigger.test from github.com/codership/mysql-wsrep.
2015-04-22 18:13:30 -04:00
Marko Mäkelä
a3e80aeac8 Bug#20816223 test fix.
Embedded server does not support restarting and needs to skip the test.
2015-04-09 16:43:33 +03:00
Marko Mäkelä
25323de2a4 Bug#20816223 InnoDB crash on shutdown
if XA PREPARE transactions hold explicit locks.

innobase_shutdown_for_mysql(): Call trx_sys_close() before lock_sys_close()
(and dict_close()) so that trx_free_prepared() will see all locks intact.

RB: 8561
Reviewed-by: Vasil Dimov <vasil.dimov@oracle.com>
2015-04-09 08:13:07 +03:00
aditya
1950628835 Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE WRONG FOR PARTITIONED TABLES
Posty push fix for test case
2015-04-07 09:56:28 +05:30
Rik Prohaska
c2bfc5b2d9 DB-832 add start time to tokudb_trx information schema table 2015-04-06 16:17:09 -04:00
Rik Prohaska
e1dc36248c DB-811 run tests on mariadb 2015-04-05 15:15:40 -04:00
Alexey Botchkov
cc84ac3be4 MDEV-7596 audit plugin - record full query / document line length / make buffer configurable.
The serve_audit_query_log_limit variable implemented.
        Also QUERY_DCL filter added.
2015-03-31 13:10:43 +05:00
Nirbhay Choubey
d7445ea6df MDEV-7194: galera fails to replicate DDL queries when using binlog_checksum
Restore fix for MDEV-4328 (revno: 3391) that got accidentally
overwritten while merging :
http://bazaar.launchpad.net/~codership/codership-mysql/5.5-23/revision/3900

Added a test case.
2015-03-27 20:35:37 -04:00
Rik Prohaska
b576414189 DB-829 ignore read uncommitted errors when querying tokudb_fractal_tree_info 2015-03-25 17:16:57 -04:00
Nirbhay Choubey
6a204546ef MDEV-7798: mysql.server init script can't stop mysqld when WSREP is turned off
wsrep threads should be always be checked for existence & stopped on
server shutdown.
2015-03-24 16:41:04 -04:00
Alexey Botchkov
5e20df2ff9 MDEV-7641 Server crash on set global server_audit_incl_users=null.
plugin_variable_update() can get NULL as a value for a string parameter.
Needs to be checked and handled properly.
2015-03-19 19:46:08 +04:00
Jon Olav Hauglid
120907c0a2 Merge branch 'mysql-5.1' into mysql-5.5
Conflicts:
	mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
	mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result
	mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
	mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test
	sql/mysqld.cc
2015-03-19 12:50:16 +01:00
Jon Olav Hauglid
c7581bb5a1 Bug#20730053: BACKPORT BUG#19770858 TO 5.1
Backport from mysql-5.5 to mysql-5.1 of:

Bug19770858: MYSQLD CAN BE DRIVEN TO OOM WITH TWO SIMPLE SESSION VARS

The problem was that the maximum value of the transaction_prealloc_size
session system variable was ULONG_MAX which meant that it was possible
to cause the server to allocate excessive amounts of memory.

This patch fixes the problem by reducing the maxmimum value of
transaction_prealloc_size and transaction_alloc_block_size down
to 128K.

Note that transactions will still be able to allocate more than
128K if needed, this patch just reduces the amount that can be
preallocated - as well as the maximum size of the incremental
allocation blocks.

(cherry picked from commit 540c9f7ebb428bbf9ec028feabe1f7f919fdefd9)

Conflicts:
	mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result
	mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result
	mysql-test/suite/sys_vars/t/disabled.def
	mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test
	sql/sys_vars.cc
2015-03-19 11:29:13 +01:00
Venkatesh Duggirala
59142d9a27 Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS
BINLOGGED INCORRECTLY - BREAKS A SLAVE

Submitted a incomplete patch with my previous push,
re submitting the extra changes the required to make
the patch complete.
2015-03-13 13:13:48 +05:30
Venkatesh Duggirala
151b8ec4d1 Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS BINLOGGED INCORRECTLY - BREAKS A SLAVE
Analysis:
In row based replication, Master does not send temp table information
to Slave. If there are any DDLs that involves in regular table that needs
to be sent to Slave and a temp tables (which will not be available at Slave),
the Master rewrites the query replacing temp table with it's defintion.
Eg: create table regular_table like temptable.
In rewrite logic, server is ignoring the database of regular table
which can cause problems mentioned in this bug.

Fix: dont ignore database information (if available) while
rewriting the query
2015-03-13 12:32:44 +05:30
Elena Stepanova
5a3bf84468 MDEV-7692 MariaDB - mysql-test - SUITE:percona - percona.innodb_sys_index 'xtradb' fails - @@version_comment
The test checked version_comment which is not helpful, and it would
cause the mismatch on any build apart from default source builds.
Fixed by removing the check
2015-03-12 18:53:31 +02:00
Nirbhay Choubey
7a6cad5221 Backport fix for MDEV-7673, MDEV-7203 and MDEV-7192 from 10.0-galera 2015-03-11 12:36:00 -04:00
Nirbhay Choubey
07ff90e99b Reduce gcache size to cut down disk usage 2015-03-09 22:55:54 -04:00
Jan Lindström
6c19f51a5f 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-07 22:56:33 -05: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
Rik Prohaska
51b68e4379 DB-823 test case for lock tables + alter table conversion from innodb to tokudb failure 2015-03-04 15:53:26 -05:00
Rik Prohaska
ad974e3bed DB-811 test case for lock tables + add column schema mismatch bug 2015-03-04 15:52:53 -05:00
Rik Prohaska
7a34080868 DB-806 test case lock tables + create select bug 2015-03-04 15:51:32 -05:00
Rik Prohaska
d71c76041c DB-805 test case lock tables + alter table conversion from innodb to tokudb bug 2015-03-04 15:50:39 -05:00
Nirbhay Choubey
4fb2f66907 Changes in wsrep_guess_ip()
* Changed loopback detection to be done via ifa->ifa_flags
* Removed unused function wsrep_guess_address()
2015-02-24 21:55:22 -05:00
Rik Prohaska
60dd921463 DB-817 fix savepoint release and duplicate savepoint name bug 2015-02-24 14:12:36 -05:00
Kristian Nielsen
b5d6aa5517 MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit
When the binlog was rotated due to @@max_binlog_size, the values of the
binlog_shapshot_file and binlog_snapshot_position were inconsistent in case of
non-transactional DML. The position was refering to the old file, while the
filename was of the new file after rotation. This patch makes them consistent
by making sure the position is also refering to the new file.
2015-02-23 13:27:51 +01:00
Nirbhay Choubey
1e6f46d78f cleanup: remove unused THD::COND_wsrep_thd 2015-02-19 17:28:18 -05:00
Nirbhay Choubey
fcc6e12d69 MDEV-7544: Update global_suppressions to include warning related to "gvwstate.dat" 2015-02-18 19:02:00 -05:00
Nirbhay Choubey
3c9137deeb Merge branch '5.5' into 5.5-galera
Merge banch 5.5 till revision :
fdd6c11 - MDEV-7419 Function cli_safe_read not exported

Conflicts:
	.bzrignore
	debian/dist/Debian/mariadb-galera-server-5.5.files.in
	debian/dist/Ubuntu/mariadb-galera-server-5.5.files.in
	storage/tokudb/CMakeLists.txt
	support-files/build-tags
2015-02-18 17:15:57 -05: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
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
Jan Lindström
552f1b3505 Fix test failures on innodb-mdev-7055 and innodb-mdev-7513. 2015-02-10 14:17:23 +02:00
Jan Lindström
ada07435b4 Fix test failure on innodb-mdev-7055. 2015-02-10 08:08:59 +02: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
Alexey Botchkov
919f40e464 Audit plugin v1.2.0. 2015-02-08 22:38:19 +04:00
Jan Lindström
5c6eb5222e Fix test failure. 2015-02-04 16:50:29 +02:00
Jan Lindström
422ffe99b5 InnoDB and XtraDB produce different output on MDEV-7513. 2015-02-04 11:12: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
Rich Prohaska
bc605380b1 DB-803 fix the 5733 test to be more tolerant of join type 2015-01-29 08:56:01 -05:00
Nirbhay Choubey
9b7e3801f4 MDEV-7476: Allow SELECT to succeed even when node is not ready
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT
queries to pass even when the node is not prepared to accept queries
(wsrep_ready=OFF). Added a test case.
2015-01-27 16:22:29 -05:00
Nirbhay Choubey
5b6f637caa MDEV-7322: Option to allow setting the binlog_format with Galera
At session scope, allow binlog_format to be changed to
values other than ROW with a warning.
2015-01-27 14:17:40 -05:00
Nirbhay Choubey
248c662cd7 Minor test modifications. 2015-01-26 22:43:46 -05:00
Nirbhay Choubey
fffc9f585d MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
Backport from 10.1.
2015-01-24 18:39:21 -05:00
Jon Olav Hauglid
7a408dbdf4 Bug#19770858: MYSQLD CAN BE DRIVEN TO OOM WITH TWO SIMPLE SESSION VARS
The problem was that the maximum value of the transaction_prealloc_size
session system variable was ULONG_MAX which meant that it was possible
to cause the server to allocate excessive amounts of memory.

This patch fixes the problem by reducing the maxmimum value of
transaction_prealloc_size and transaction_alloc_block_size down
to 128K.

Note that transactions will still be able to allocate more than
128K if needed, this patch just reduces the amount that can be
preallocated - as well as the maximum size of the incremental
allocation blocks.
2015-01-23 10:17:09 +01:00
Rich Prohaska
7c78945c87 DB-801 test case for a tokudb update that should fail but succeeds 2015-01-21 15:55:31 -05:00
Rich Prohaska
e7f48475d9 DB-798 add the tokudb_rpl_check_readonly variable for RFR 2015-01-19 09:45:41 -05:00
s.sujatha
70f5d81a96 Bug#20041860: SLAVE ERROR WHEN DROP DATABASE
Fixing a post push test issue.
2015-01-19 18:22:14 +05:30
Nirbhay Choubey
bb93d46241 Test changes (backported from 10.1). 2015-01-16 13:52:30 -05:00
Rich Prohaska
44bb19b7d1 DB-788 fix optimize by index name test result 2015-01-15 15:49:37 -05:00
Rich Prohaska
c87f8151ac DB-478 DB-788 DB-789 optimize tokudb table enhancements 2015-01-15 14:09:57 -05:00
Sergei Golubchik
5900333aa5 MDEV-7404 REPAIR multiple tables crash in MDL_ticket::has_stronger_or_equal_type
mysql_alter_table() that is used in mysql_recreate_table() doesn't expect
many tables in the TABLE_LIST.
2015-01-14 12:10:13 +01:00
Venkatesh Duggirala
ebb2a3f5e1 Problem: IO thread fails to connect to master if servers are configured with
special character sets like utf16, utf32, ucs2.

Analysis: MySQL server does not support few special character sets like
  utf16,utf32 and ucs2 as "client's character set"(eg: utf16,utf32, ucs2).
  It is known limitation listed in the documentation
  http://dev.mysql.com/doc/refman/5.5/en/charset-connection.html.

  The default value for default-character-set parameter is 'auto'
  which means that if the server's character set is not supported,
  then server automatically changes client's character set to
  predefined character-set which is 'latin1' in the current code.

  Eg:
  $ ./mysql -uroot -S$SOCKET_FILE --default-character-set=utf16
  ERROR 1231 (42000): Variable 'character_set_client' can't be set to the value of 'utf16'

  $ ./mysql -uroot -S$SOCKET_FILE will be successfully connected to
  server with 'latin1' as default client side character set.

  When IO thread is trying to connect to Master, it sets server's character
  set as client's character set. When Slave server is started with these
  special character sets, IO thread (which is like a connection to Master)
  fails because of the above said limitation.

 Fix: Now even IO thread also behaves the same as a regular client behaves.
  i.e., If server's character set is not supported as client's character set,
  then set default's client character set(latin1) as client's character set.
2015-01-14 14:13:52 +05:30
Rich Prohaska
ba000b3db3 DB-791 remove memcache patch 2015-01-12 14:07:14 -05:00
Sergei Golubchik
2ab49689c6 MDEV-7410 Temporary table name conflict between sessions
workaround for missing SP auto-reparse.
allow the user to disable stored_program_cache_size, if he wants
2015-01-10 14:07:46 +01:00
Nirbhay Choubey
952b575272 MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
Synchronous read view should not be needed for
SHOW commands.
2014-12-31 19:28:20 -05:00
s.sujatha
5da083ef67 Bug#20041860: SLAVE ERROR WHEN DROP DATABASE
Fix:
===
Backport Bug#11756194 to mysql-5.5. slave breaks if
'drop database' fails on master and mismatched tables on
slave.

'DROP TABLE <deleted tables>' was binlogged when
'DROP DATABASE' failed and at least one table was deleted
from the database. The log event would lead slave SQL thread
stop if some of the tables did not exist on slave.

After this patch, It is always binlogged with 'IF EXISTS'
option.
2014-12-29 12:17:55 +05:30
Nirbhay Choubey
eda3db826f Merge revisions from maria/5.5 (5.5.41)
bzr merge -r4393 lp:maria/5.5
2014-12-22 20:09:25 -05:00
Thiru
e7391e472e Bug #19815702 TIS620: CRASH WITH MULTI TABLE DELETE
- Moving the test case to correct place.
2014-12-22 13:33:48 +05:30
Sergei Golubchik
a978bdda1e mysql-5.5.41 merge 2014-12-19 11:35:44 +01:00
Rich Prohaska
03a0eb3f7b FT-635 adjust test result with new status variable 2014-12-17 10:48:34 -05:00
Nirbhay Choubey
89b2bc42f4 Merge revisions from maria/5.5
bzr merge -r4388 lp:maria/5.5
2014-12-16 20:07:34 -05:00
Michael Widenius
10ab3e6887 MDEV-4010 Deadlock on concurrent INSERT .. SELECT into an Aria table with statement binary logging
There was a bug in lock handling when mixing INSERT ... SELECT on the same table.


mysql-test/suite/maria/insert_select.result:
  Test case for MDEV_4010
mysql-test/suite/maria/insert_select.test:
  Test case for MDEV_4010
mysys/thr_lock.c:
  We wrongly alldoed TL_WRITE_CONCURRENT_INSERT when there was a TL_READ_NO_INSERT lock
2014-12-15 14:49:23 +02:00
Michael Widenius
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
f6d2798f8a relax the time constraints on the bulk fetch tests again 2014-12-12 09:21:08 -05:00
Rich Prohaska
cef4e0a650 relax the time constraints on the bulk fetch tests 2014-12-11 19:59:48 -05:00
Jan Lindström
df20184c03 MDEV-7252: Test failure on innodb.innodb_bug12400341 at Windows
Problem is that there could be undo slots from previous runs.
2014-12-03 13:38:39 +02:00
Jan Lindström
e544bcd16d MDEV-7243: innodb-change-buffer-recovery fails on windows
Problem is that on Windows command "perl" failed with error: 255  my_errno: 0  errno: 0.
Do not run on Windows.
2014-12-02 12:19:29 +02:00
Elena Stepanova
e0c71a9ab8 MDEV-7169: innodb.innodb_bug14147491 fails in buildbot on Windows
Applied the fix previously pushed into 10.0. 
Initial Jan's commit comment:
Problem is that test could open Microsoft C++ Client Debugger
windows with abort exception. Lets not try to test this on
windows.
2014-12-02 01:31:49 +04:00
Rich Prohaska
e790efdf80 DB-755 speed up 5585.test 2014-11-28 08:53:03 -05:00
Jan Lindström
e5802c38f9 Better comments and add a test case. 2014-11-25 08:06:41 +02:00
Rich Prohaska
e64b621179 DB-771 fix incorrect assert in update callback for varchar expansion 2014-11-21 07:13:07 -05:00
Jan Lindström
8ff66501ca Forgot to add test file. 2014-11-21 13:32:53 +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
Sergei Golubchik
5d0122bd77 MDEV-7113 difference between check_vcol_func_processor and check_partition_func_processor
MDEV-6789 segfault in Item_func_from_unixtime::get_date on updating table with virtual columns

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

Also: when iterating fields, use fields of the TABLE_LIST (table or view),
not fields of a TABLE (actual underlying table - might have more columns).
2014-11-18 15:42:32 +01:00