Commit graph

89851 commits

Author SHA1 Message Date
Michael Widenius
7cb4a1c61f Fixed MDEV-7314: Deadlock when doing insert-select with Aria
mysql-test/suite/maria/insert_select.result:
  Added test case
mysql-test/suite/maria/insert_select.test:
  Added test case
mysys/thr_lock.c:
  Ensure we don't allow concurrent_insert when a read_no_write lock is in use
2015-01-18 20:38:07 +02:00
Michael Widenius
32be7dffbe Return to original stage after mysql_lock_tables
Stage "Filling schema table" is now properly shown in 'show processlist'


mysys/mf_keycache.c:
  Simple cleanup with more comments
sql/lock.cc:
  Return to original stage after mysql_lock_tables
  Made 'Table lock' as a true stage
sql/sql_show.cc:
  Restore original stage after get_schema_tables_result
2015-01-18 13:39:59 +02:00
Alexander Barkov
c11a054a98 MDEV-7152 Wrong result set for WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'
- The code that tested if
     WHERE expr=value AND expr=const
  can be rewritten to:
     WHERE const=value AND expr=const
  was incomplete in case of STRING_RESULT.
- Moving the test into a new function, to reduce duplicate code.
2015-01-18 01:54:11 +04:00
Vicențiu Ciorbaru
09d54b37f5 MDEV-7362: ANALYZE TABLES crash with table-independent-statistics gathering
FULLTEXT indexes do not permit index first lookups. By calling:
ha_index_first() with a garbage parameter, random data gets overwritten
that causes the table->field array to be corrupted. Subsequently, when
the field array is accessed, a segfault occurs.

By not allowing index statistics for FULLTEXT indexes, the problem is
resolved.
2015-01-17 16:58:10 +00:00
Alexander Barkov
6e6750ad6c MDEV-7366 SELECT 'a' = BINARY 'A' returns 1 (utf8 charset, utf8_unicode_ci collation)
Fixing a wrong assymetric code in Arg_comparator::set_cmp_func().
It existed for a long time, but showed up in 10.0.14 after the fix
for "MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string)".
2015-01-17 17:52:03 +04:00
Alexander Barkov
252be4c9e7 A post-fix for:
MDEV-7254 Assigned expression is evaluated twice when updating column TIMESTAMP NOT NULL
The test type_timestamp failed depending on the build machine time zone.
Setting a fixed time zone for the test.
2015-01-17 16:10:45 +04:00
Jan Lindström
6164157b3f MDEV-7254: Assigned expression is evaluated twice when updating
column TIMESTAMP NOT NULL
      
Analysis: Problem was that value->is_null() function is called
even when user had explicitly set the value for timestamp
field. Calling this function had the side effect that
expression was evaluated twice.
      
Fix: (by Sergei Golubchik) check instead value->null_value.
2015-01-16 12:00:07 +02:00
Jan Lindström
813af4cde8 Fix try for Buildbot test failure for tests
innodb_bug12400341
	innodb-mdev7046
	innodb_stats_fetch_nonexistent
2015-01-16 11:26:03 +02:00
Elena Stepanova
26a8a95cb3 MDEV-7431 main.log_tables fails sporadically in buildbot
Structure of the table created by the test to archive mysql.slow_log
data didn't match the structure of mysql.slow_log. The failure only 
appeared if the slow_log was not empty, which was very rare. 
  
Updated the structure of the table.
2015-01-15 20:15:50 +04:00
Kristian Nielsen
df2db86341 MDEV-7430: rpl.rpl_gtid_crash still fails in buildbot
The problem was a too low timeout for slave reconnect. It was set to 9 seconds
(10 retries with 1 second in-between). This is occasinally too short on some
Buildbot hosts, when the test crashes and restarts the master while the slave
IO thread is running.

Fix by increasing --master-retry-count for this test.
2015-01-15 15:55:09 +01:00
Nirbhay Choubey
919825a3ad MDEV-7368 : SLES: Failed to start mysql.service: Unit
mysql.service failed to load

Added 'systemctl daemon-reload' command in postin and
postun rpm scripts.
2015-01-14 18:26:29 -05:00
Kristian Nielsen
02099a335e MDEV-7467: sporadic failure in rpl.rpl_gtid_crash
The test case injects a DBUG that will crash the server during replication,
then does a START SLAVE. We need to use --error 0,2006,2013 on the START
SLAVE, so that we will not fail the test if the server has time to crash
before the START SLAVE returns to the client.

Fixes a failure seen in Buildbot.
2015-01-14 18:19:05 +01:00
Jan Lindström
39556a7814 MDEV-7262: innodb.innodb-mdev7046 fail on BuildBot
Test causes OS error printout and we need to supress this
error message on tests. Additionally, test could cause
different error codes on different OSs.
2015-01-13 16:48:11 +02:00
Kristian Nielsen
f27817c1d0 MDEV-7326: Server deadlock in connection with parallel replication
The bug occurs when a transaction does a retry after all transactions have
done mark_start_commit() in a batch of group commit from the master. In this
case, the retrying transaction can unmark_start_commit() after the following
batch has already started running and de-allocated the GCO. Then after retry,
the transaction will re-do mark_start_commit() on a de-allocated GCO, and also
wakeup of later GCOs can be lost.

This was seen "in the wild" by a user, even though it is not known exactly
what circumstances can lead to retry of one transaction after all transactions
in a group have reached the commit phase.

The lifetime around GCO was somewhat clunky anyway. With this patch, a GCO
lives until rpl_parallel_entry::last_committed_sub_id has reached the last
transaction in the GCO. This guarantees that the GCO will still be alive when
a transaction does mark_start_commit(). Also, we now loop over the list of
active GCOs for wakeup, to ensure we do not lose a wakeup even in the
problematic case.
2015-01-07 14:45:39 +01:00
Jan Lindström
4a3251595c MDEV-7403: should not pass recv_writer_thread_handle to CloseHandle()
Analysis: For some reason actual thread handle is not
returned on Windows instead lpThreadId was returned and
thread handle was closed after thread create. Later
CloseHandle was called for recv_writer_thread_handle
and psort_info->thread_hdl.

Fix: Return thread handle from os_thread_create()
also on Windows and store these thread handles also
in srv0start.cc so that they can be later closed.
2015-01-06 16:08:42 +02:00
Kristian Nielsen
6e0a00ed75 MDEV-7353: rpl_mdev6386 fails sporadically in buildbot
Use include/sync_with_master_gtid.inc instead of --sync_with_master to avoid a
race in the test case.

In parallel replication, the old-style slave position (which is used by
--sync_with_master) is updated out-of-order between parallel threads. This
makes it possible for the position to be updated past DROP TEMPORARY TABLE t2
just before the commit of INSERT INTO t1 SELECT * FROM t2 becomes visible.

In this case, there is a small window where a SELECT just after
--sync_with_master may not see the changes from the INSERT.
2015-01-06 09:52:09 +01:00
Michael Widenius
f0be022cf0 MDEV-5539 Empty results in UNION with Sphinx engine
The bug was fixed by Serg earlier by including Sphinx 2.2.6, but he forgot to update the test case.
2014-12-30 17:10:54 +02:00
Jan Lindström
de09076486 MDEV-7369: MariaDB build fails when XTRADB_STORAGE_ENGINE enabled
Patch by James Taylor.
2014-12-28 13:44:30 +02:00
Michael Widenius
bc21e7a67f Fixed compiler warnings
scripts/mysql_system_tables.sql:
  Removed DEFAULT from a blob definition as this can cause problems.
2014-12-19 09:25:29 +02:00
Kristian Nielsen
826d7c68d2 MDEV-7342: Test failure in perfschema.setup_instruments_defaults
Fix a possible race in the test case when restarting the server.

Make sure we have disconnected before waiting for the reconnect
that signals that the server is back up. Otherwise, we may in
rare cases continue the test while the old server is shutting
down, eventually leading to "connection lost" failure.
2014-12-18 11:59:08 +01:00
Nirbhay Choubey
fc1a7055a3 MDEV-6891: Addendum, update company name in copyright notice 2014-12-12 17:13:13 -05:00
Nirbhay Choubey
def5bd67ba MDEV-6891: Update company name 2014-12-12 10:40:27 -05:00
Kristian Nielsen
16fb2963ff Fix typo that breaks compilation on platforms without atomics. 2014-12-12 14:03:20 +01:00
Jan Lindström
76c3981e43 Fix test case to allow success on create table (Windows). 2014-12-10 12:12:09 +02:00
Elena Stepanova
c9a8859db6 MDEV-7255 Failures in engines/* tests 2014-12-07 21:24:02 +04:00
Elena Stepanova
f7fed26390 Storage engines tests: ALTER ONLINE works differently for MERGE in 10.0 2014-12-05 21:38:16 +04:00
Elena Stepanova
010724f6c5 Run engines tests for MyISAM and in-built InnoDB 2014-12-05 14:23:24 +04:00
Jan Lindström
5bba1109b2 Add possibility to success on Windows. 2014-12-04 14:10:41 +02:00
Elena Stepanova
c8f7f98737 MDEV-7255 Failures in engines/* tests, part 6
Updated hardcoded event numbers according to current GTID logic
2014-12-04 02:54:42 +04:00
Elena Stepanova
f02f06172c MDEV-7255 Failures in engines/* tests, part 5
RENAME TABLE on a non-existing table produces a better error message
2014-12-04 02:17:09 +04:00
Elena Stepanova
d5f52fec77 MDEV-7255 Failures in engines/* tests, part 4
Updated engines/* test results according to the bugfix MDEV-5894
(MySQL BUG#34750: Print database name in Unknown Table error message)
2014-12-04 02:16:41 +04:00
Elena Stepanova
27ac97ef9e MDEV-7255 Failures in engines/* tests, part 3
Error message was changed along with CREATE OR REPLACE TABLE fixes
2014-12-04 01:59:25 +04:00
Elena Stepanova
aafdc4b16e MDEV-7255 Failures in engines/* tests, part 2
Result files updated according to bugfix for MySQL#55843 (Handled 
condition appears as not handled)
2014-12-04 01:52:03 +04:00
Elena Stepanova
cc06415fd6 MDEV-7255 Failures in engines/* tests, part 1
In 10.0 output of SHOW DATABASES appears to be sorted, while in result
files it is not. 
Added sorted_result for certainty and updated result files.
2014-12-03 19:53:40 +04:00
Sergei Golubchik
2b5db1d5bc put at least some output-generating statement in the test
otherwise mysqltest complains "No queries executed but non-empty result file found!"
2014-12-02 20:35:45 +01:00
Sergei Golubchik
b3aed01ae9 fix include/not_embedded.inc to be independent from the environment
in particular, not fail with --vertical_results
2014-12-02 19:15:16 +01:00
Kristian Nielsen
5fc2814698 MDEV-7251: Test failure in rpl.rpl_parallel
There was a race. The test case was expecting the slave to start processing a
particular DELETE statement, then the test would stop the slave at this
point. But there was missing something to wait until the slave would actually
reach this point; thus depending on timing it was possible that the slave
would be stopped too early, causing .result file difference.

Fixed by adding an appropriate wait to the test case.
2014-12-02 18:11:05 +01:00
Jan Lindström
6cd78eedea MDEV-7242: innodb.innodb-mdev7046 fails in various ways on buildbot
Problem with test is that test causes OS failures that change. 
Idea with test is just to test that server does not crash, no other
output is necessary.
2014-12-02 13:26:45 +02:00
Kristian Nielsen
d79cce86ab MDEV-4393: show_explain.test times out randomly
The problem was a race between the debug code in the server and the SHOW
EXPLAIN FOR in the test case.

The test case would wait for a query to reach the first point of interest
(inside dbug_serve_apcs()), then send it a SHOW EXPLAIN FOR, then wait for the
query to reach the next point of interest. However, the second wait was
insufficient. It was possible for the the second wait to complete immediately,
causing both the first and the second SHOW EXPLAIN FOR to hit the same
invocation of dbug_server_apcs(). Then a later invocation would miss its
intended SHOW EXPLAIN FOR and hang, and the test case would eventually time
out.

Fix is to make sure that the second wait can not trigger during the first
invocation of dbug_server_apcs(). We do this by clearing the thd_proc_info
(that the wait is looking for) before processing the SHOW EXPLAIN FOR; this
way the second wait can not start until the thd_proc_info from the first
invocation has been cleared.
2014-12-03 15:49:31 +01:00
Kristian Nielsen
1eed274848 Fix wording in error log message, to be consistent with other messages ("IO thread" -> "I/O thread"). 2014-12-02 12:11:07 +01:00
Kristian Nielsen
0450623f73 MDEV-7236: rpl.rpl_gtid_basic failed in buildbot with wait_condition timeout
Fix rare failures in test case rpl.rpl_gtid_basic:

 - Add another possible error code when a connection is killed.

 - Make sure that the IO thread has had time to complete its stop after START
   SLAVE UNTIL. Otherwise, START SLAVE might run before IO thread stop,
   leaving the test case with a stopped IO thread that eventually causes a
   wait timeout.
2014-12-02 12:10:21 +01:00
Kristian Nielsen
50b42441a6 MDEV-7241: rpl.rpl_parallel2 fails sporadically in buildbot
There was a race, a small window between updating slave position and updating
Seconds_Behind_Master, during which the test case could see the wrong value.

Fix by waiting for the expected status to appear.
2014-12-02 09:27:22 +01:00
Sergei Golubchik
433b28cede add a proper cleanup to innodb.innodb-mdev7046 test 2014-12-01 23:56:36 +01:00
Sergei Golubchik
ba076763ec remove ssl debugging report_errors() function that was sometimes destroying the state 2014-12-01 22:24:58 +01:00
Sergei Golubchik
4e9e04b28b tests that require server restart cannot be run with --embedded 2014-12-01 15:35:01 +01:00
Sergei Golubchik
230132dc41 bump the version 2014-12-01 14:38:41 +01:00
Sergei Golubchik
a4baf9b3ea test failure: make list_files more selective to prevent db.opt from showing up 2014-12-01 13:52:49 +01:00
Sergei Golubchik
e3108e6d2b silence stderr correctly 2014-11-22 18:43:53 +01:00
Sergei Golubchik
912bbfda12 MDEV-7144 Warnings "bytes lost" during server shutdown after running connect.part_file test in buildbot 2014-11-22 11:56:29 +01:00
Kristian Nielsen
52b25934d7 MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave
The replication relay log position was sometimes updated incorrectly at the
end of a transaction in parallel replication. This happened because the relay
log file name was taken from the current Relay_log_info (SQL driver thread),
not the correct value for the transaction in question.

The result was that if a transaction was applied while the SQL driver thread
was at least one relay log file ahead, _and_ the SQL thread was subsequently
stopped before applying any events from the most recent relay log file, then
the relay log position would be incorrect - wrong relay log file name. Thus,
when the slave was started again, usually a relay log read error would result,
or in rare cases, if the position happened to be readable, the slave might
even skip arbitrary amounts of events.

In GTID mode, the relay log position is reset when both slave threads are
restarted, so this bug would only be seen in non-GTID mode, or in GTID mode
when only the SQL thread, not the IO thread, was stopped.
2014-12-01 13:53:57 +01:00