Commit graph

185589 commits

Author SHA1 Message Date
Elena Stepanova
4b5a14d0fe List of unstable tests for 10.3.17 release (updated) 2019-07-28 03:14:33 +03:00
Vladislav Vaintroub
5e112a2620 Fix Windows packaging. 2019-07-27 13:53:56 +02:00
Oleksandr Byelkin
7a8747f757 Changes of merge moved to oracle mode parser. 2019-07-27 10:01:12 +02:00
Oleksandr Byelkin
8990e3e2b9 Fix initialiser. 2019-07-26 23:04:12 +02:00
Oleksandr Byelkin
d97342b6f2 Merge branch '10.2' into 10.3 2019-07-26 22:42:35 +02:00
Aleksey Midenkov
00a254cc06 MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY
Fix reinitialize vers_write on table reopen.
2019-07-26 18:21:23 +03:00
Oleksandr Byelkin
32c6f40a63 Merge branch '10.1' into 10.2 2019-07-26 13:39:17 +02:00
Oleksandr Byelkin
2382cd14a8 Merge branch '5.5' into 10.1 2019-07-26 13:33:51 +02:00
Oleksandr Byelkin
f8a1a262e2 Move the test not suitable for embedded. 2019-07-26 13:19:49 +02:00
Eugene Kosov
29df1003d9 MDEV-20184 data race at global counter btr_cur_n_non_sea
Make all accesses to btr_cur_n_non_sea atomic.
2019-07-26 13:52:52 +03:00
Eugene Kosov
7db999322c MDEV-20183 data race at safe_mutex_lock()
fix is simple: just move mp->file under mp->global protection
2019-07-26 12:36:06 +03:00
Oleksandr Byelkin
4177181e16 Merge branch 'merge-tokudb-5.6' into 10.1 2019-07-26 10:48:12 +02:00
Oleksandr Byelkin
24a0d7c507 5.6.44-86.0 2019-07-26 08:48:46 +02:00
Oleksandr Byelkin
25d216dcd5 Merge remote-tracking branch 'connect/10.1' into 10.1 2019-07-26 07:57:57 +02:00
Oleksandr Byelkin
cf8c2a3c3b Merge branch '10.1' into 10.2 2019-07-26 07:03:39 +02:00
Alexey Botchkov
51d58f566a MDEV-18350 Using audit plugin with MySQL, mysqld crashes when running COM_INIT_DB against invalid database.
mysql_event_general structure changed in 10.3.
the database_length should be size_t now instead of the int.
2019-07-26 08:44:43 +04:00
Aleksey Midenkov
f6d0d309fa MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY
Turn off versioned_write for DELETE HISTORY.
2019-07-25 21:11:15 +03:00
Aleksey Midenkov
1a73444d57 Cleanups: DELETE HISTORY [MDEV-19814]
* Made make_versioned_*() proxies inline;
* Renamed truncate_history to delete_history

Part of:
MDEV-19814 Server crash in row_upd_del_mark_clust_rec or Assertion
`update->n_fields < ulint(table->n_cols + table->n_v_cols)' failed in
upd_node_t::make_versioned_helper
2019-07-25 21:11:06 +03:00
Oleksandr Byelkin
584d213235 Merge branch '5.5' into 10.1 2019-07-25 17:42:20 +02:00
Marko Mäkelä
f3eb82f048 Merge 10.2 into 10.3 2019-07-25 18:09:34 +03:00
Marko Mäkelä
fc77a66c7e Disable a failing test 2019-07-25 18:08:50 +03:00
Marko Mäkelä
75e1b1a088 Merge 10.2 into 10.3 2019-07-25 17:44:25 +03:00
Marko Mäkelä
57421419ce RocksDB: Do not test bogus parameter slave_gtid_info
This removes the test combination
rocksdb_rpl.mdev12179 'innodb,row,row-write-committed-slave-gtid-optimized'
for which the server failed to start due to the invalid parameter
slave_gtid_info=optimized.

This was broken in 5173e396ff
2019-07-25 17:42:33 +03:00
Oleksandr Byelkin
cc37250a76 Backslash added to wrong cachacters of names of client plugin. 2019-07-25 16:36:32 +02:00
Marko Mäkelä
fdef9f9b89 Merge 10.2 into 10.3 2019-07-25 15:31:11 +03:00
Oleksandr Byelkin
ae476868a5 Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
Marko Mäkelä
a7e9395f9d fts_sync_table(), fts_sync() dead code removal
fts_sync(): Remove the constant parameter has_dict=false.

fts_sync_table(): Remove the constant parameter has_dict=false,
and the redundant parameter unlock_cache = !wait.
Make wait=true the default parameter.
2019-07-25 13:34:36 +03:00
Marko Mäkelä
7de38492fc After-merge fix: cmake -DPLUGIN_PERFSCHEMA=NO
An #include was forgotten in b6ac67389d
2019-07-25 13:34:31 +03:00
Marko Mäkelä
a3455c6085 MDEV-20133 Merge new release of InnoDB 5.7.27 to 10.2 2019-07-25 13:08:46 +03:00
Aditya A
60069a9829 Bug #29127203 VIRTUAL GENERATED COLUMN INDEX DATA INCONSISTENCY
PROBLEM
-------

Index defined on a virtual column whose base column was in a fk
relation was not getting updated. This is because while getting
the updated field information from the update vector of the parent
table we were comparing the column number of the base column (for
virtual column) in child table with the associated column number
in the parent table. There was a mismatch in this column number
because of which this update field information was skipped and
subsequently index was not getting updated.

FIX
2019-07-25 12:39:39 +03:00
Marko Mäkelä
b6ac67389d Merge 10.1 into 10.2 2019-07-25 12:14:27 +03:00
Sujatha
8d0dabc56b MDEV-20091 DROP TEMPORARY table is logged despite no CREATE was logged
Fixing post push test issues.

Recorded the result files for following:
rpl_stm_drop_create_temp_table.result
rpl_mixed_drop_create_temp_table.result.
2019-07-25 14:24:04 +05:30
Marko Mäkelä
f6ea0389a4 Replace ut_timer() with my_interval_timer()
The function pointer ut_timer() was only used by the
InnoDB defragmenting thread. Let InnoDB use a single monotonic
high-precision timer, my_interval_timer() [in nanoseconds],
occasionally wrapped by microsecond_interval_timer().

srv_defragment_interval: Change from "timer" units to nanoseconds.

This concludes the InnoDB time function cleanup that was
motivated by MDEV-14154. Only ut_time_ms() will remain for now,
wrapping my_interval_timer().
2019-07-25 10:43:11 +03:00
Anel Husakovic
ee555f8fc5 MDEV-19948 SHOW GRANTS return privileges individually update in 10.2 2019-07-24 23:27:10 -07:00
Anel Husakovic
55d8ff0de8 MDEV-19948 SHOW GRANTS FOR user return privileges individually 2019-07-24 23:19:43 -07:00
Sujatha
e32f29b7f3 MDEV-20091 DROP TEMPORARY table is logged despite no CREATE was logged
MDEV-5589 commit set up a policy to skip DROP TEMPORARY TABLE binary logging
in case the target table has not been "CREATEed" in binlog (no CREATE
Query-log-event was logged into the binary log).

It turns out that

1. the rule did not cover non-existing table DROPped with IF-EXISTS clause.
   The logged-create knowledge for the non-existing one does not even need
   MDEV-5589 patch, and

2. connection close disobeys it to trigger automatic DROP-IF-EXISTS
   binlogging.

Either 1 or 2 or even both is/are also responsible for unexpected binlog
records observed in MDEV-17863, actually rendering a referred
@@global.read_only irrelevant as far as the described stored procedure
definition *and* the ROW binlog-format are concerned.
2019-07-25 11:38:45 +05:30
Marko Mäkelä
0c7c61019d Remove the wrappers ut_time(), ut_difftime(), ib_time_t 2019-07-24 21:59:26 +03:00
Marko Mäkelä
c663a9414b MDEV-14154: Failing assertion: slot->last_run <= current_time in fts0opt.cc
The FTS optimizer thread made a false assumption that time(NULL)
is monotonic. The system clock can be adjusted to the past,
for example if the hardware clock was drifting to the future,
and it was adjusted by NTP.

fts_slot_t::interval_time: Replace with the constant
FTS_OPTIMIZE_INTERVAL_IN_SECS.

fts_slot_t::last_run, fts_slot_t::completed: Clarify the
documentation.

fts_optimize_get_time_limit(): Remove a type cast, and
add a FIXME comment about domain mismatch.

fts_optimize_compact(), fts_optimize_words(): Limit the time
also when the current time has been moved to the past.

fts_optimize_table_bk(): Check for wrap-around.

fts_optimize_how_many(): Check for wrap-around, and remove the
failing assertions.

fts_is_sync_needed(): Remove a redundant call to time(NULL).
2019-07-24 21:59:26 +03:00
Marko Mäkelä
9e5df96751 Reduce the amount of time(NULL) calls for lock processing
lock_t::requested_time: Document what the field is used for.

lock_t::wait_time: Document that the field is only used for
diagnostics and may be garbage if the system time is being adjusted.

srv_slot_t::suspend_time: Document that this is duplicating
trx_lock_t::wait_started.

lock_table_print(), lock_rec_print(): Declare in static scope.
Add a parameter for the current time.

lock_deadlock_check_and_resolve(), lock_deadlock_lock_print(),
lock_deadlock_joining_trx_print():
Add a parameter for the current time.
2019-07-24 21:59:26 +03:00
Marko Mäkelä
2b5bc761d3 MDEV-14154: Document some time_t fields better
srv_slot_t::suspend_time, os_aio_slot_t::reservation_time,
sync_cell_t::reservation_time: Explain what could happen
if the system time has is being adjusted.

fts_sync_t::start_time: Document that the field is mostly unused.
2019-07-24 21:59:26 +03:00
Marko Mäkelä
10727b6953 Always initialize trx_t::start_time_micro
This affects the function has_higher_priority() for internal or
recovered transactions.
2019-07-24 21:59:26 +03:00
Marko Mäkelä
10ee1b95b8 Remove ut_usectime(), ut_gettimeofday()
Replace ut_usectime() with my_interval_timer(),
which is equivalent, but monotonically counting nanoseconds
instead of counting the microseconds of real time.

os_event_wait_time_low(): Use my_hrtime() instead of ut_usectime().

FIXME: Set a clock attribute on the condition variable that allows
a monotonic clock to be chosen as the time base, so that the wait
is immune to adjustments of the system clock.
2019-07-24 21:59:26 +03:00
Marko Mäkelä
e764d5bc01 Correct the type of a parameter 2019-07-24 21:21:54 +03:00
Marko Mäkelä
ab6dd77408 MDEV-14154: Remove ut_time_us()
Use microsecond_interval_timer()
or my_interval_timer() [in nanoseconds] instead.
2019-07-24 21:21:54 +03:00
Elena Stepanova
0d99ccea1e List of unstable tests for 10.3.17 release 2019-07-24 20:35:21 +03:00
Marko Mäkelä
86767f4ac1 Remove unused ut_get_year_month_day() 2019-07-24 19:41:59 +03:00
Nisha Gopalakrishnan
2536c0b1eb BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN WITH TEMPORARY TABLE -> ERRORS
Analysis
========
Point in time recovery using mysqlbinlog containing queries
operating on temporary tables results in an error.

While writing the query log event in the binary log, the
thread id used for execution of DROP TABLE and DELETE commands
were incorrect. The thread variable 'thread_specific_used'
is used to determine whether a specific thread id is to used
while executing the statements i.e using 'SET
@@session.pseudo_thread_id'. This variable was not set
correctly for DROP TABLE query and was never set for DELETE
query. The thread id is important for temporary tables
since the tables are session specific. DROP TABLE and DELETE
queries executed using a wrong thread id resulted in errors
while applying the queries generated by mysqlbinlog utility.

Fix
===
Set the 'thread_specific_used' THD variable for DROP TABLE and
DELETE queries.

ReviewBoard: 21833
2019-07-24 18:32:24 +02:00
Gleb Shchepa
7473a71a28 Bug #29419820: MEMORY LEAK IN MY_YYOVERFLOW()
Note: this patch is for 5.6.

Detected by ASAN.

The patch fixes the cleanup of parser stack pointers.

Reviewed-by: Guilhem Bichot <guilhem.bichot@oracle.com>
2019-07-24 18:32:24 +02:00
Sergei Golubchik
8ddb7e3eb7 Bug#27167197 USING ? IN INSTALL PLUGIN QUERY ABORTS DEBUG, AND HANGS OPTIMIZED SERVER
check_valid_path() uses my_strcspn() that cannot handle invalid characters
properly. This is fixed by a big refactoring in 10.2 (MDEV-6353).

For 5.5, let's simply swap tests, because check_string_char_length()
rejects invalid characters just fine.
2019-07-24 18:32:24 +02:00
Sergei Golubchik
5e8ab9b7af Bug#27302459: EMPTY VALUE IN MYSQL.PLUGIN TABLE CAUSES SERVER TO EXIT ON STARTUP
Description:- During server startup, the server exits if
the 'mysql.plugin' system table has any rows with empty
value for the field 'name' (plugin name).
2019-07-24 18:32:24 +02:00