Commit graph

46274 commits

Author SHA1 Message Date
Sergei Golubchik
74f184aff2 Fix tests not to fail with OpenSSL 1.1.1 with TLSv1.3 2019-01-25 19:57:37 +01:00
Marko Mäkelä
25161e6219 Merge 10.1 into 10.2 2019-01-24 14:43:29 +02:00
Sergei Golubchik
c2a4bfad22 MDEV-18119 upgrading from 10.3 to 10.4 can result in the password for a user to be wiped out
10.1 part: SHOW CREATE USER didn't show the password, if plugin was set,
but authentication_string was not
2019-01-23 17:34:22 +01:00
Marko Mäkelä
9a7281a703 Merge 10.1 into 10.2 2019-01-23 15:09:06 +02:00
Marko Mäkelä
3b6d2efcb1 Merge 10.0 into 10.1 2019-01-23 14:34:23 +02:00
Sergey Vojtovich
9f4d4f404f MDEV-12747 - main.mysqld_option_err fails in buildbot with timeout
thd_destructor_proxy() may miss abort signal if innobase_end() is running
concurrently, which causes server hang in pthread_join() on shutdown.

The problem was that aborting wasn't protected by mutex:
proxy thr: while (!myvar->abort)
end thr: running->abort = 1;
end thr: mysql_cond_broadcast(...);
proxy thr: mysql_cond_wait(...); // nobody to awake it
end thr: pthread_join(...); // waits for proxy thr

Also made main.mysqld_option_err reentrant.
2019-01-22 18:26:37 +04:00
Sergei Golubchik
6786fb004c MDEV-15925 FRM_MAX_SIZE too low for some use cases
increase to 1M
2019-01-21 17:14:31 +01:00
Varun Gupta
2061e00c20 MDEV-14440: Assertion `inited==RND' failed in handler::ha_rnd_end
In the function QUICK_RANGE_SELECT::init_ror_merged_scan we create a seperate handler if the handler in
head->file cannot be reused. The flag free_file tells us if we have a seperate handler or not.
There are cases where you might create a handler and then there might be a failure(running ALTER)
and then we have to revert the handler back to the original one. The code does that
but it does not reset the flag 'free_file' in this case.
Also backported f2c418079d.
2019-01-18 23:36:47 +05:30
Marko Mäkelä
8e80fd6bfd Merge 10.1 into 10.2 2019-01-17 11:24:38 +02:00
Marko Mäkelä
71eb762611 Merge 10.0 into 10.1 2019-01-17 06:40:24 +02:00
Anel Husakovic
f3e9d9a6e6 Change information_schema-big to include innodb 2019-01-16 13:34:54 +02:00
Varun Gupta
d0d0f88f2c MDEV-13784: query causes seg fault
When we have a nested subquery then a subquery that was a dependent subquery
may change to an independent one when we optimizer the inner subqueries.
This is handled st_select_lex::optimize_unflattened_subqueries.
Currently a subquery that was changed to independent from dependent after optimization
phase incorrectly shows dependent in the output of Explain, this happens because we
don't update used_tables for the WHERE clause, ON clause, etc after the optimization phase.
2019-01-06 23:15:25 +05:30
Sergei Golubchik
842402e4df Merge branch '10.1' into 10.2 2019-01-03 09:57:02 +01:00
Sergei Golubchik
3ba3f81ae0 Merge branch '10.0' into 10.1 2019-01-03 09:56:24 +01:00
Sergei Golubchik
b87eb04f77 Merge branch '5.5' into 10.0 2019-01-03 00:20:53 +01:00
Sergei Golubchik
2450fd67ed fix the test for 2019 2019-01-02 12:03:15 +01:00
Sergei Golubchik
67240858b2 Merge branch '10.1' into 10.2 2018-12-30 18:30:29 +01:00
Sergei Golubchik
aeefd26ecb Merge branch '10.0' into 10.1 2018-12-29 23:44:45 +01:00
Marko Mäkelä
b7a9563b21 Merge 10.1 into 10.2 2018-12-21 09:43:35 +02:00
Alexander Barkov
e631ea4a7c MDEV-17738 Server crashes in Item::delete_self on closing connection after unsuccessful PS
Also fixes:
MDEV-17741 Assertion `thd->Item_change_list::is_empty()' failed in mysql_parse after unsuccessful PS

The problem was introduced by:
  commit f033fbd9f2
  Changed the test case for MDEV-15571

It was later fixed, but in 10.3 only:

  commit ce2cf855bf
  MDEV-16043 Assertion thd->Item_change_list::is_empty() failed in mysql_parse
  upon SELECT from a view reading from a versioned table

This patch is a backport of ce2cf855bf to 10.2
2018-12-21 09:41:23 +04:00
Sergei Golubchik
8634f7e528 Merge branch '5.5' into 10.0 2018-12-20 09:15:01 +01:00
Sergei Golubchik
8ede9b3ae5 MDEV-17975 Assertion ! is_set()' or !is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon REVOKE under LOCK TABLE
open_grant_tables() returns -1/0/1, where -1 is an error, while 1 is not.
Don't store it's return value in bool
2018-12-20 08:39:54 +01:00
Sergei Golubchik
2027841d5b MDEV-16110 ALTER with ALGORITHM=INPLACE breaks temporary table with virtual columns
Part two, temporary tables.

Make temporary tables respect TABLE::m_needs_reopen.

See also 77cd754229
2018-12-20 08:06:55 +01:00
Sergei Golubchik
f04bbed220 MDEV-17755 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed in Field_bit::val_int upon SELECT with JOIN, partitions, indexed virtual column
add a test case
2018-12-20 08:06:55 +01:00
Sergei Golubchik
7b2e2288e9 MDEV-16903 Assertion `!auto_increment_field_not_null' failed in TABLE::init after unsuccessful attempt to add CHECK constraint on temporary table
if the CHECK constraint failed in copy_data_between_tables(),
the loop was aborted prematurely and to->auto_increment_field_not_null
wasn't reset.
2018-12-20 08:06:55 +01:00
Sergei Golubchik
a79183b01e correct table name in CHECK failures during ALTER TABLE 2018-12-20 08:06:55 +01:00
Varun Gupta
82a4d55d5c MDEV-15424: Unreasonable SQL Error (1356) on select from view
While printing a view containing a window function we were printing it as an
Item_field object instead of an Item_window_func object. This is incorrect and this
leads to us throwing an error ER_VIEW_INVALID.
Fixed by adjusting the Item_ref:print function.
Also made UDF function aware if there arguments have window function.
2018-12-19 18:57:14 +05:30
Varun Gupta
7e606a2d5c MDEV-17589: Stack-buffer-overflow with indexed varchar (utf8) field
Create a new constant MAX_DATA_LENGTH_FOR_KEY.
Replace the value of MAX_KEY_LENGTH to also include the LENGTH and NULL BYTES
of a field.
2018-12-19 10:38:46 +05:30
Varun Gupta
da4efd56aa Backported MDEV-11196(e4d10e09cf) and MDEV-10360(8a8ba1949b) to 10.0 2018-12-19 10:38:29 +05:30
Varun Gupta
d1f399408d MDEV-6453: Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init(bool)
with InnoDB, joins, AND/OR conditions

The inited parameter handler is not initialised when we do a quick_select after a table scan.
2018-12-16 21:50:49 +02:00
Varun Gupta
32eeed2129 MDEV-17676: Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init
While calculating distinct with the function remove_dup_with_compare, we don't have rnd_end calls
when we have completed the scan over the temporary table.
Added ha_rnd_end calls when we are done with the scan of the table.
2018-12-17 00:35:44 +05:30
Alexey Botchkov
20011c8b14 MDEV-14576 Include full name of object in message about incorrect value for column.
galera_prepared_statement test fixed.
2018-12-16 18:43:51 +04:00
Sergey Vojtovich
15eaeace39 MDEV-16987 - ALTER DATABASE possible in read-only mode
Forbid ALTER DATABASE under read_only.
2018-12-13 20:52:23 +04:00
Marko Mäkelä
db1210f939 Merge 10.1 into 10.2 2018-12-12 12:13:43 +02:00
Marko Mäkelä
f77f8f6d1a Merge 10.0 into 10.1 2018-12-12 10:48:53 +02:00
Varun Gupta
4886d14827 MDEV-17032: Estimates are higher for partitions of a table with @@use_stat_tables= PREFERABLY
The problem here is EITS statistics does not calculate statistics for the partitions of the table.
So a temporary solution would be to not read EITS statistics for partitioned tables.

Also disabling reading of EITS for columns that participate in the partition list of a table.
2018-12-07 19:59:45 +05:30
Marko Mäkelä
5e5deabdbc Merge 10.1 into 10.2 2018-12-07 13:41:10 +02:00
Vladislav Vaintroub
2a2e8ea8fe MDEV-17917 MTR: fixed race conditions in perfschema.socket_connect, main.connect 2018-12-06 21:46:14 +01:00
Sergei Golubchik
6491c591b2 Merge branch '10.0' into 10.1 2018-12-06 15:08:42 +01:00
Varun Gupta
17e8570285 Added a testcase for mdev-17734 2018-12-05 19:31:25 +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
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
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