Commit graph

7920 commits

Author SHA1 Message Date
Daniele Sciascia
0c7dffe9e1 refs codership/mysql-wsrep#201
- Eliminates code duplication in query cache patch
- Reduces the number of iterations in mysql-wsrep#201.test
  to shorten the execution time
- Adds a new test case that exercises more scenarios
2016-02-09 21:52:42 -05:00
Daniele Sciascia
8a71fde01f refs codership/mysql-wsrep#201
- Fixes query cache so that it is aware of wsrep_sync_wait.
  Query cache would return (possibly stale) results to the
  client, regardless of the value of wsrep_sync_wait.
- Includes the test case that reproduced the issue.
2016-02-09 21:28:54 -05:00
Nirbhay Choubey
3f515a09ff MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
As a fix for MDEV-8208, for initial wsrep threads, the
invocation of init_for_queries() was moved after plugins
were initialized. Due to which, OPTION_BEGIN bit of wsrep
applier THD (originally set in wsrep_replication_process)
got reset due to implicit commit within init_for_queries().
As a result, events from a multi-statement transaction from
another node were committed separately by the applier thread,
which leads to an assertion as they all carry same seqno.

Fixed by making sure that variable.option_bits are restored
post init_for_queries(). Also restored server_status.
Added a test case.
2015-12-16 20:07:12 -05:00
Nirbhay Choubey
ca07ee85ea Merge tag 'mariadb-5.5.47' into 5.5-galera 2015-12-10 13:00:08 -05:00
Sergei Golubchik
abf9d35213 Merge branch 'mysql/5.5' into 5.5 2015-12-09 10:00:49 +01:00
Sergei Golubchik
18954ff25d MDEV-8313 Got an error writing communication packets
Don't let network errors from mysql_close() leak into THD.

* remove incorrect upstream fix
** table->in_use can be NULL, must use ha_thd()
** clear_error() may remove earlier errors, don't use it
* fix the bug properly in federated and federatedx
2015-12-07 15:20:23 +01:00
Sergei Golubchik
ef47b62551 MDEV-8827 Duplicate key with auto increment
fix innodb auto-increment handling
three bugs:
1. innobase_next_autoinc treated the case of current<offset incorrectly
2. ha_innobase::get_auto_increment didn't recalculate current when increment changed
3. ha_innobase::get_auto_increment didn't pass offset down to innobase_next_autoinc
2015-12-07 15:20:23 +01:00
Sergei Golubchik
c8652eefe5 one more test 2015-12-07 15:20:22 +01:00
Jan Lindström
33589b25ef MDEV-7762 InnoDB: Failing assertion: block->page.buf_fix_count > 0 in buf0buf.ic line 730
Analysis: debug only assertion I_S function (IS is XtraDB feature) is calling
buf_block_get_frame on any page it reads, which debug-asserts that the page is
buffer-fixed, which is not the case in I_S query.

Fixed by holding the buffer page mutex while the fields are read directly.
2015-12-03 13:18:10 +02:00
Sergei Golubchik
43a5090980 MDEV-9051 mysqld got signal 11, after upgrade to 10.1.8
feedback plugin needs to set tables->select_lex properly
2015-11-18 11:23:15 +01:00
Sergei Golubchik
726162989b feedback plugin debug
make it possible to change feedback plugin wait intervals
* only in debug builds
* and force the feedback report to be ignored

update the test to use this feature
2015-11-18 11:23:15 +01:00
Jan Lindström
5d754fce95 MDEV-8854: New warning messages are unreadable
Improved warning messages by quote marks.
2015-11-09 09:24:52 +02:00
Nirbhay Choubey
278ff1661a Add warnings to galera test suppression list. 2015-10-15 05:47:06 -04:00
Nirbhay Choubey
8d2d947ac1 Fix galera_var_dirty_reads test. 2015-10-13 15:42:53 -04:00
Nirbhay Choubey
fd68a7dac6 Merge tag 'mariadb-5.5.46' into 5.5-galera 2015-10-13 14:42:36 -04:00
Sergei Golubchik
82e9f6d948 Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-10-08 22:54:24 +02:00
Jan Lindström
006acf7454 Bug #68148: drop index on a foreign key column leads to missing table
MDEV-8845: Table disappear after modifying FK

Added test case.
2015-09-30 10:49:45 +03:00
Elena Stepanova
f804b74fd4 MDEV-8154 rpl.show_status_stop_slave_race-7126 sporadically causes internal check failure
The patch was pushed into 10.0, but it needs to be applied to 5.5 as well
2015-09-28 03:40:29 +03:00
Elena Stepanova
ce7d8c5ee8 MDEV-7330 plugins.feedback_plugin_send fails sporadically in buildbot
The test restarts the server and expects that the feedback plugin
will send a report on shutdown, and will write about it in the error
log. But the server is only given 10 sec to shut down properly,
which is not always enough.
Added a parameter to restart_mysqld.inc, and set it to a bigger
value in feedback_plugin_send
2015-09-27 18:01:47 +03:00
Elena Stepanova
bdcf370765 MDEV-7933 plugins.feedback_plugin_send depends on being executed after plugins.feedback_plugin_load
The culprit is the feedback_plugin_load test, which is run both separately
and from inside feedback_plugin_send.test. The test queries I_S.FEEDBACK,
and every time it does, 'FEEDBACK used' value is increased.
Fixed by checking that the value is increased instead of recording the actual
value in the result file.
2015-09-27 16:00:48 +03:00
Elena Stepanova
86ed494aef MDEV-8849 rpl.rpl_innodb_bug30888 sporadically fails in buildbot with testcase timeout
The test would take really long if it was run without --mem.
Fixed by adding --innodb-flush-log-at-trx-commit=2
2015-09-26 02:48:55 +03:00
Elena Stepanova
dca4ab92b8 MDEV-8841 innodb_zip.innodb-create-options fails in buildbot
The real problem is that when innodb.xa_recovery test intentionally
crashes the server, system tables can be opened and marked as crashed,
and the next test in line gets blamed for the error which appears
in the error log.
Fixed by flushing the tables before crashing the server
2015-09-24 21:24:28 +03:00
Annamalai Gurusami
8ea80ecfeb Bug #19929435 DROP DATABASE HANGS WITH MALFORMED TABLE
Note: Backporting the patch from mysql-5.6.

Problem:

A CREATE TABLE with an invalid table name is detected
at SQL layer. So the table name is reset to an empty
string.  But the storage engine is called with this
empty table name.  The table name is specified as
"database/table".  So, in the given scenario we get
only "database/".

Solution:

Within InnoDB, detect this error and report it to
higher layer.

rb#9274 approved by jimmy.
2015-09-22 06:21:13 +02:00
Nirbhay Choubey
d54bc3c0d1 Cleanup: remove dead code which could also lead to race. 2015-09-21 20:49:31 -04:00
Oleksandr Byelkin
29ac245dd0 MDEV-8473: mysqlbinlog -v does not properly decode DECIMAL values in an RBR log
Backport of upstream patch. revno: 5696
2015-09-07 13:13:52 +02:00
Arun Kuruvila
f4ff086abe Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO
PROBLEMS

Description:- Server variable "--lower_case_tables_names"
when set to "0" on windows platform which does not support
case sensitive file operations leads to problems. A warning
message is printed in the error log while starting the
server with "--lower_case_tables_names=0". Also according to
the documentation, seting "lower_case_tables_names" to "0"
on a case-insensitive filesystem might lead to index
corruption.

Analysis:- The problem reported in the bug is:-
Creating an INNODB table 'a' and executing a query, "INSERT
INTO a SELECT a FROM A;" on a server started with
"--lower_case_tables_names=0" and running on a
case-insensitive filesystem leads innodb to flat spin.
Optimizer thinks that "a" and "A" are two different tables
as the variable "lower_case_table_names" is set to "0". As a
result, optimizer comes up with a plan which does not need a
temporary table. If the same table is used in select and
insert, a temporary table is needed. This incorrect
optimizer plan leads to infinite insertions.

Fix:- If the server is started with
"--lower_case_tables_names" set to 0 on a case-insensitive
filesystem, an error, "The server option
'lower_case_table_names'is configured to use case sensitive
table names but the data directory is on a case-insensitive
file system which is an unsupported combination. Please
consider either using a case sensitive file system for your
data directory or switching to a case-insensitive table name
mode.", is printed in the server error log and the server
exits.
2015-08-21 08:35:42 +05:30
Nirbhay Choubey
4ee28865f6 MDEV-5146 : Bulk loads into partitioned table not working
When wsrep is enabled, for any update on innodb tables, the
corresponding keys are appended to galera's transaction writeset
(wsrep_append_keys()). However, for LOAD DATA, this got skipped
if binary logging was disabled or it was non-ROW based.
As a result, while the updates from LOAD DATA on non-partitioned
tables replicated fine as wsrep implicitly enables binary logging
(if not enabled, explicitly), the same did not work on partitioned
tables as for partitioned tables the binary logging gets disabled
temporarily (ha_partition::write_row()).

Fixed by removing the unwanted conditions from the check.
Also backported some changes from 10.0-galera to make sure
wsrep_load_data_splitting affects LOAD DATA commands only.
2015-08-20 20:55:52 -04:00
Nirbhay Choubey
ccd39b2dd3 Backport partition tests from 10.0-galera. 2015-08-20 09:55:54 -04:00
Nirbhay Choubey
98bebad672 Fix for a typo. 2015-08-18 17:03:28 -04:00
Nirbhay Choubey
fe757e006c Fix for some failing tests. 2015-08-14 13:45:52 -04:00
Nirbhay Choubey
e998dffde7 MDEV-8598 : Failed MySQL DDL commands and Galera replication
RENAME TABLE, unlike other DDLs, was getting replicated before
the access check was performed. As a result, the command could
get get replicated and thus executed on other nodes, even if it
fails on the originating node due to permission issues. Fixed by
moving the logic to check user privileges before replicating the
command.
2015-08-12 17:47:25 -04:00
Nirbhay Choubey
5b9dd459fb Merge tag 'mariadb-5.5.45' into 5.5-galera 2015-08-07 17:02:51 -04:00
Sergei Golubchik
6300f2f274 Merge tag 'mysql-5.5.45' into 5.5 2015-08-01 14:56:18 +02:00
Jan Lindström
fa765a4525 MDEV-6697: Improve foreign keys warnings/errors
There is several different ways to incorrectly define
foreign key constraint. In many cases earlier MariaDB
versions the error messages produced by these cases
are not very clear and helpful. This patch improves
the warning messages produced by foreign key parsing.
2015-07-31 08:59:13 +03:00
Jan Lindström
e05cd97b8a MDEV-8524: Improve error messaging when there is duplicate key or foreign key names
Added better error message that will be printed when foreign key
constraint name in create table is not unique in database.
2015-07-31 08:59:13 +03:00
Sergey Vojtovich
392df76bc3 MDEV-4017 - GET_LOCK() with negative timeouts has strange behavior
GET_LOCK() silently accepted negative values and NULL for timeout.
Fixed GET_LOCK() to issue a warning and return NULL in such cases.
2015-07-29 15:59:56 +04:00
Jan Lindström
7a9670218b MDEV-8474: InnoDB sets per-connection data unsafely
Analysis: At check_trx_exists function InnoDB allocates
a new trx if no trx is found from thd but this newly
allocated trx is not registered to thd. This is unsafe,
because nothing prevents InnoDB plugin from being uninstalled
while there's active transaction. This can cause crashes, hang
and any other odd behavior. It may also corrupt stack, as
functions pointers are not available after dlclose.

Fix: The fix is to use thd_set_ha_data() when
manipulating per-connection handler data. It does appropriate
plugin locking.
2015-07-21 12:12:58 +03:00
Nirbhay Choubey
af2f7ce3f9 MDEV-8464 : ALTER VIEW not replicated in some cases
In galera, like other DDLs, CREATE/ALTER VIEW commands are recreated
and replicated during parsing. The ALGORITHM clause is internally set
to VIEW_ALGORITHM_INHERIT if its not explicitly specified by the user.
But since its not a valid type to be used in a command, it leads to an
assertion failure. The solution is to not include the ALGORITHM clause
in the command if its not explicitly specified (or INHERIT).
2015-07-19 22:51:19 -04:00
Monty
00d3b20fbb MDEV-8432 Slave cannot replicate signed integer-type values with high bit set to 1
The fix is that if the slave has a different integer size than
the master, then they will assume the master has the same signed/unsigned modifier
as the slave.

This means that one can safely change a coon the slave an int to a bigint
or an unsigned int to an unsigned int.  Changing an unsigned int to an
signed bigint will cause replication failures when the high bit of the
unsigned int is set.

We can't give an error if the signess is different on the master and slave
as the binary log doesn't contain the signess of the column on the master.
2015-07-17 00:06:27 +03:00
Christopher Powers
49667f0441 Bug#21374104 SETUP_TIMERS INITIALIZATION ASSUMES CYCLE TIMER IS ALWAYS AVAILABLE
For WAIT events, fall back to other timers if CYCLE is not available.
2015-07-10 20:42:33 +02:00
Sreeharsha Ramanavarapu
c773b320ff Merge branch 'mysql-5.1' into mysql-5.5 2015-07-10 07:54:55 +05:30
Sreeharsha Ramanavarapu
33a2e5abd8 Bug #20238729: ILLEGALLY CRAFTED UTF8 SELECT PROVIDES NO
WARNINGS

Backporting to 5.1 and 5.5
2015-07-10 07:52:00 +05:30
Praveenkumar Hulakund
2ac01ca660 Bug#18487951 - QUERY_CACHE_MIN_RES_UNIT SET TO ZERO, CRASHES IN QUERY_CACHE::FIND_BIN
Follow up patch to fix sys_vars.query_cache_min_res_unit_basic_32 test failure.
2015-07-03 16:56:13 +05:30
Nirbhay Choubey
327409443f Merge tag 'mariadb-5.5.44' into 5.5-galera 2015-06-21 21:50:43 -04:00
Nirbhay Choubey
fc716dc5a5 MDEV-8260 : Issues related to concurrent CTAS
* Wait for aborted thd (victim) to release MDL locks
* Skip aborting an already aborted thd
* Defer setting OK status in case of CTAS
* Minor cosmetic changes
* Added a test case
2015-06-19 19:25:15 -04:00
Annamalai Gurusami
db2ed27e0e Bug #20762798 FK DDL: CRASH IN DICT_FOREIGN_REMOVE_FROM_CACHE
Problem:

If we add a referential integrity constraint with a duplicate
name, an error occurs.  The foreign key object would not have
been added to the dictionary cache.  In the error path, there
is an attempt to remove this foreign key object. Since this
object is not there, the search returns a NULL result.
De-referencing the null object results in this crash.

Solution:

If the search to the foreign key object failed, then don't
attempt to access it.

rb#9309 approved by Marko.
2015-06-19 10:17:52 +05:30
Sergei Golubchik
d199a0ffb0 more renames after tokudb merge 2015-06-11 17:47:52 +02:00
Sergey Vojtovich
80f6b22593 MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with disabled
keys

Fixed that OPTIMIZE TABLE against MyISAM/Aria table may write uninitialized key
root position for disabled keys.
2015-06-09 23:24:03 +04:00
Alexander Barkov
92b365981b MDEV-7268 Column of table cannot be converted from type 'decimal(0,?)' to type ' 'decimal(10,7)'
Changing the error message to:
 "...from type 'decimal(0,?)/*old*/' to type ' 'decimal(10,7)'..."
So it's now clear that the master data type is OLD decimal.
2015-06-09 12:05:06 +04:00
Sergei Golubchik
a4d93e07cc MDEV-8050 sphinx test cases cannot run with sphinxsearch-2.2.6
remove/replace deprecated options
2015-06-08 21:48:19 +02:00