Commit graph

68967 commits

Author SHA1 Message Date
Thirunarayanan Balathandayuthapani
f2c7972a3d MDEV-17432 Assertion `lock_trx_has_sys_table_locks(trx) == 0' failed upon ALTER TABLE .. ADD FOREIGN KEY
- This is a regression of commit b26e603aeb. While dropping
the incompletely created table, InnoDB shouldn't consider that operation as non-atomic one.
2018-12-03 01:12:04 +05:30
Igor Babaev
46960365b1 MDEV-17871 Crash when running explain with CTE
When the with clause of a query contains a recursive CTE that is not used
then processing of EXPLAIN for this query does not require optimization
of the unit specifying this CTE. In this case if 'derived' is the
TABLE_LIST object created for this CTE then derived->derived_result is NULL
and any assignment to derived->derived_result->table causes a crash.
After fixing this problem in the code of st_select_lex_unit::prepare()
EXPLAIN for such a query worked without crashes. Yet an execution
plan for the recursive CTE appeared there. The cause of this problem was
an incorrect condition used in JOIN::save_explain_data_intern() that
determined whether CTE was to be optimized or not. A similar condition was
used in select_describe() and this patch has corrected it as well.
2018-12-01 15:06:04 -08:00
Marko Mäkelä
3e5162d814 Re-disable a failing test 2018-11-30 15:54:21 +02:00
Jan Lindström
7826b9b983 Fix syntax error on galera/disabled.def file 2018-11-29 17:11:19 +02:00
Jan Lindström
33fdb443ea Fix xtrabackup SST tests by using innodb-safe-truncate=OFF.
Disable tests that do not yet pass.
2018-11-29 17:11:19 +02:00
Marko Mäkelä
b26e603aeb MDEV-17859 Operating system errors in file operations after failed CREATE
This is a regression due to MDEV-17816.

When creating a table fails, we must roll back the dictionary
transaction. Because the rollback may rename tables, and because
InnoDB lacks proper undo logging for CREATE operations, we must
drop the incompletely created table before rolling back the
transaction, which could include a RENAME operation.
But, we must not blindly drop the table by name; after all,
the operation could have failed because another table by the
same name already existed.

create_table_info_t::m_drop_before_rollback: A flag that is set
if the table needs to be dropped before transaction rollback.

create_table_info_t::create_table(): Remove some duplicated
error handling.

ha_innobase::create(): On error, only drop the table if it was
actually created.
2018-11-28 15:17:56 +02:00
Marko Mäkelä
971e1d8677 MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSED
If a table had a KEY_BLOCK_SIZE attribute, but no ROW_FORMAT,
it would be created as ROW_FORMAT=COMPRESSED in InnoDB.
However, TRUNCATE TABLE would lose the KEY_BLOCK_SIZE attribute
and create the table with the innodb_default_row_format (DYNAMIC).

This is a regression that was introduced by MDEV-13564.

update_create_info_from_table(): Copy also KEY_BLOCK_SIZE.
2018-11-26 16:41:09 +02:00
Marko Mäkelä
2a31b82831 MDEV-17816 Crash in TRUNCATE TABLE when table creation fails
The error handling in the MDEV-13564 TRUNCATE TABLE was broken
when an error occurred during table creation.

row_create_index_for_mysql(): Do not drop the table on error.

fts_create_one_common_table(), fts_create_one_index_table():
Do drop the table on error.

create_index(), create_table_info_t::create_table():
Let the caller handle the index creation errors.

ha_innobase::create(): If create_table_info_t::create_table()
fails, drop the incomplete table, roll back the transaction,
and finally return an error to the caller.
2018-11-26 12:50:27 +02:00
Jan Lindström
3728b11f87 MDEV-17804: Galera tests cause mysql_socket.h:738: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed.
Do not do end of statement logic if thd is already killed as
socket is already closed.
2018-11-22 16:36:16 +02:00
Jan Lindström
dde0a83fff MDEV-17801: Galera test failure on galera_var_reject_queries
Problem was that controlling connection i.e. connection that
executed the query SET GLOBAL wsrep_reject_queries = ALL_KILL;
was also killed but server would try to send result from that
query to controlling connection resulting a assertion
mysqld: /home/jan/mysql/10.2-sst/include/mysql/psi/mysql_socket.h:738: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed.
as socket was closed when controlling connection was closed.

wsrep_close_client_connections()
	Do not close controlling connection and instead of
	wsrep_close_thread() we do now soft kill by THD::awake

wsrep_reject_queries_update()
	Call wsrep_close_client_connections using current thd.
2018-11-22 16:36:16 +02:00
Jan Lindström
2b49e15686 MDEV-15522: Change galera suite MTR tests to use mariabackup instead of xtrabackup
Disable galera_3nodes tests using xtrabackup.
2018-11-22 16:36:16 +02:00
Jan Lindström
00c88a7122 MDEV-15522: Change galera suite MTR tests to use mariabackup instead of xtrabackup
Disable galera tests using xtrabackup.
2018-11-22 16:36:16 +02:00
Jan Lindström
4b1b4b3920 MDEV-17771: Add Galera ist and sst tests using mariabackup
Record result files for 10.2.
2018-11-22 16:36:09 +02:00
Jan Lindström
06063e8a41 Merge remote-tracking branch 'origin/10.1' into 10.2 2018-11-21 16:59:11 +02:00
Jan Lindström
8324e5e84d MDEV-17771: Add Galera ist and sst tests using mariabackup
Add test case for encrypted and page compressed tables.
2018-11-21 09:05:47 +02:00
Jan Lindström
41fa9a5986 Add missing .rdiff file to test galera_sst_xtrabackup-v2_data_dir
for debug build.
2018-11-20 07:49:46 +02:00
Elena Stepanova
ae96b47f9e MDEV-17507 Make MTR tests work for builds without Aria for temporary tables
Skip tests which expectedly fail when Aria is not used for temporary tables
2018-11-20 01:50:59 +02:00
Jan Lindström
6fad15d02a MDEV-17771: Add Galera ist and sst tests using mariabackup
Remove unnecessary have_debug requirement, record results using
release build and create .rdiff file for debug builds where
needed.
2018-11-19 17:34:22 +02:00
zdrav1
ea03eac5d7 fiexed debug build failure of galera_ist_mariabackup_innodb_flush_logs 2018-11-19 15:06:34 +02:00
zdrav1
0529c9e93e fiexed debug build failure of galera_ist_mariabackup test 2018-11-19 15:06:30 +02:00
zdrav1
c85912c8c6 added galera_ist_mariabackup_innodb_flush_logs test 2018-11-19 15:06:27 +02:00
zdrav1
2160e075dc fixed the test comments of galera_sst_mariabackup_encrypt_with_key test 2018-11-19 15:06:23 +02:00
zdrav1
ace0b7215e added test galera_sst_mariabackup_encrypt_with_key; corrected path to galera_ist_mariabackup test 2018-11-19 15:06:20 +02:00
zdrav1
92e99775e9 added test case galera_ist_mariabackup 2018-11-19 15:06:16 +02:00
zdrav1
bae7c1ebd4 added galera_autoinc_sst_mariabackup test 2018-11-19 15:06:14 +02:00
Jan Lindström
de0eeb800e MDEV-16890: Galera test failure on galera_sst_mysqldump_with_key
Record .rdiff file for debug build and record .result file using
product build.
2018-11-19 11:00:56 +02:00
Jan Lindström
ae0361ab39 MDEV-13881: galera.partition failed in buildbot with wrong result
Add proper wait conditions to second node before continuing test.
2018-11-17 08:11:52 +02:00
Varun Gupta
705abdebaf MDEV-13170: Database service (MySQL) stops after update with trigger
For prepare statemtent/stored procedures we rollback the items to original
ones after prepare execution in the function reinit_stmt_before_use.
This rollback is done for group by, order by clauses but is not done for
the window specification containing the order by and partition by clause of the
window function.
2018-11-16 10:43:53 +05:30
Oleksandr Byelkin
f74649b522 Merge branch '10.1' into 10.2 2018-11-15 19:21:40 +01:00
Oleksandr Byelkin
a77f80b79e Merge branch '10.0' into 10.1 2018-11-15 17:20:26 +01:00
Oleksandr Byelkin
a84d87fde8 Merge branch '5.5' into 10.0 2018-11-15 13:57:35 +01:00
Alexander Barkov
1956695c69 MDEV-17724 Wrong result for BETWEEN 0 AND 18446744073709551615
The fix for "MDEV-17698 MEMORY engine performance regression"
previously fixed this problem.

- Adding the test for MDEV-17724
- Re-recording wrong results for tests:
  * engines/iuds/r/insert_number
  * engines/iuds/r/update_delete_number
  which started to fail since MDEV-17698
2018-11-15 16:45:43 +04:00
Oleksandr Byelkin
7e75643778 Merge branch '10.1' into 10.2 2018-11-14 18:40:09 +01:00
Oleksandr Byelkin
9e23171c70 Merge branch '10.0' into 10.1 2018-11-14 16:58:33 +01:00
Oleksandr Byelkin
47274d902e fix of test suite 2018-11-14 15:46:53 +01:00
Oleksandr Byelkin
01d3e40197 MDEV-16217: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in Field_num::get_date
- clean up DEFAULT() to work only with default value and correctly print
  itself.
- fix of DBUG_ASSERT about fields read/write
- fix of field marking for write based really on the thd->mark_used_columns flag
2018-11-14 10:27:41 +01:00
Elena Stepanova
32bebfeefb Updated list of unstable tests for 10.2.19 2018-11-12 18:19:31 +02:00
Sergei Golubchik
85baa03c60 update results after CONC-351 fix 2018-11-12 11:46:13 +01:00
Vladislav Vaintroub
4f9c44ed39 adjust MTR code after C/C changed the location of plugin libraries 2018-11-12 11:46:13 +01:00
Alexey Botchkov
b290ef8c76 MDEV-17454 JSON_VALID( '{"a":1]' ) evaluates to 1.
Produce syntax error when '{...]'.
2018-11-12 01:50:07 +04:00
Varun Gupta
a12b8ac8e9 MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free or Invalid write in JOIN::make_aggr_tables_info
During the optimize state of a query, we come know that the result set
would atmost contain one row, then for such a query we don't need
to compute GROUP BY, ORDER BY and DISTINCT.
2018-11-10 13:13:26 +05:30
Alexey Botchkov
5cfb043d29 MDEV-16174 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*)
maybe_null should be always set to TRUE in
Item_func_json_array_append::fix_length_and_dec()
2018-11-09 22:55:34 +04:00
Igor Babaev
2d7d19a3cd MDEV-17574 SIGSEGV or Assertion `producing_item != __null' in
Item_direct_view_ref::derived_field_transformer_for_where
           upon updating a view

The condition pushed into a materialized derived / view mast be adjusted
for the new context: its column references must be substituted for
references to the columns of the underlying tables if the condition
is pushed into WHERE. The substitution is performed by the 'transform'
method. If the materialized derived is used in a mergeable view then
the references to the columns of the view are represented by
Item_direct_view_ref objects. The transform method first processes
the item wrapped in such an object and only after this it transforms
the object itself.
The transformation procedure of an Item_direct_view_ref object has
to know whether the item it wraps has been substituted. If so the
procedure does not have to do anything. In the code before this patch
it was not possible for the transformation procedure used by an
Item_direct_view_ref object to find out whether a substitution for
the wrapped item had happened.
2018-11-08 22:55:26 -08:00
Marko Mäkelä
3fbee66499 MDEV-17645 innodb.log_file_name_debug does not clean up after itself
The test innodb.log_file_name_debug failed to ensure that
the bogus redo log record that its debug injection emitted
would be consumed by a redo log checkpoint before running a
subsequent test, which could perform crash recovery.

Add an extra shutdown to ensure that a redo log checkpoint is
generated. In this way, the following will succeed:

./mtr --no-reorder innodb.log_file_name_debug innodb.read_only_recovery
2018-11-08 14:50:32 +02:00
Igor Babaev
4142589207 MDEV-17635 Server hangs after the query with recursive CTE
This bug in the code of the function With_element::check_unrestricted_recursive()
could force a recursive CTE to be executed in a non-standard compliant mode
in which recursive UNION ALL could lead to an infinite execution. This
problem could occur only in the case when this CTE was used by another
recursive CTE at least twice.
2018-11-07 12:08:15 -08:00
Andrei Elkin
c565622c6c MDEV-14528 followup.
There was a failure in rpl_delayed_slave after recent MDEV-14528 commit.
The parallel applier should not set its
Relay_log::last_master_timestamp from Format-descriptor log event.
The latter may reflect a deep past so Seconds-behind-master will be
computed through it and displayed all time while the first possibly
"slow" group of events is executed.

The main MDEV-14528 is refined, rpl_delayed_slave now passes also
in the parallel mode.
2018-11-07 21:13:50 +02:00
Marko Mäkelä
e82ebb8f06 MDEV-14528: Disable a failing test 2018-11-07 13:08:00 +02:00
Oleksandr Byelkin
6cecb10a2f MDEV-11167: InnoDB: Warning: using a partial-field key prefix in search, results in assertion failure or "Can't find record" error
Fix ha_rnd_init() argument (we do not doing scan but use rnd_pos)
2018-11-07 09:25:12 +01:00
Marko Mäkelä
89f948c766 Merge 10.1 into 10.2 2018-11-07 08:17:47 +02:00
Marko Mäkelä
59c82dde09 Merge 10.0 into 10.1 2018-11-07 08:08:45 +02:00