Commit graph

381 commits

Author SHA1 Message Date
Sergei Petrunia
c686483264 MDEV-12427: rocksdb.write_sync fails
Enable the test as the cause of the failure has been fixed
2018-05-11 13:56:42 +03:00
Sergei Petrunia
e5bd75fb4e MyRocks: disable rocksdb.check_ignore_unknown_options on Windows 2018-05-10 21:46:57 +03:00
Sergei Petrunia
ffb48234df MyRocks on windows: make bulk_load_unsorted pass.
It produced warnings due to perl code printing \r\n into the text
file which is then used by LOAD DATA INFILE.
2018-05-10 20:16:15 +03:00
Sergei Petrunia
b0269816a5 MyRocks: post-merge fixes for Windows: take into account FN_LIBCHAR2
Table name may be passed either as "./db/table" or as ".\\db\\table".
2018-05-10 19:05:13 +03:00
Sergei Petrunia
4d51009a77 MyRocks: fix rocksdb.rocksdb_range test attempt 3 2018-05-08 13:00:26 +03:00
Sergei Petrunia
45ef87ee92 Post-merge fixes: fix rocksdb.rocksdb_checksums test
(see also: MDEV-15911)
2018-05-07 22:13:18 +03:00
Sergei Petrunia
dbe73588cd Merge branch 'bb-10.2-mariarocks-merge' of github.com:MariaDB/server into 10.2
Manually resolved the conflicts
2018-05-07 21:38:18 +03:00
Sergei Petrunia
e3661b9f7c Cherry-picked from MyRocks upstream: Issue #809: Wrong query result with bloom filters
In reverse-ordered column families, if one wants to start reading at the
  logical end of the index, they should Seek() to a key value that is not
  covered by the index. This may (and typically does) prevent use of a bloom
  filter.
  The calls to setup_scan_iterator() that are made for index and table scan
  didn't take this into account and passed eq_cond_len=INDEX_NUMBER_SIZE.
  Fixed them to compute and pass correct eq_cond_len.

  Also, removed an incorrect assert in ha_rocksdb::setup_iterator_bounds.
2018-05-07 20:21:35 +03:00
Sergei Petrunia
39fbafbcc2 Post-merge fixes: make rocksdb.allow_to_start_after_corruption pass 2018-04-19 16:28:05 +03:00
Sergei Petrunia
955233256e MyRocks: fix rocksdb.information_schema testcase.
"The Store binlog position inside RocksDB" feature is only needed for
obtaining binlog position after having restored a MyRocks backup.

This is not yet supported in MariaDB, so properly disable it in both
places where it is done.
2018-04-19 15:41:13 +03:00
Sergei Petrunia
0c02c91bc1 MyRocks: MDEV-15911: Reduce debug logging on default levels in error log
MyRocks internally will print non-critical messages to
sql_print_verbose_info() which will do what InnoDB does in similar cases:
check if (global_system_variables.log_warnings > 2).
2018-04-19 14:13:28 +03:00
Sergei Petrunia
6bea5e9e0f MyRocks: Post-merge fixes in bulk_load_error.test 2018-04-17 15:04:15 +03:00
Sergei Petrunia
a7e5049fec MyRocks: Fix link error on Windows
rocksdb_aux_lib.lib(rdb_sst_info.obj) : error LNK2001: unresolved
external symbol PSI_server
[D:\winx64-packages\build\storage\rocksdb\rocksdb.vcxproj]

rocksdb_aux_lib is an utility library used by standalone tools. These
won't have PSI_server.

FIxed by moving rdb_sst_info.* out of the library (as they do not seem
to be used by these standalone tools)
2018-04-17 11:10:11 +03:00
Sergei Petrunia
40bed2d39e MyRocks: Add files lost during the merge
Include files that upstream has in mysql-test/include and so they were
not picked up by the merge process
2018-04-16 11:06:43 +03:00
Sergei Petrunia
ce4149fc9b Post-merge fixes: make rocksdb.use_direct_reads_writes pass 2018-04-15 21:15:21 +03:00
Sergei Petrunia
0fad97a9ec Post-merge fixes: add a suppression for rocksdb.skip_validate_tmP_table 2018-04-15 15:34:06 +03:00
Sergei Petrunia
261d4755f4 Post-merge fixes: rocksdb.check_ignore_unknown_options 2018-04-15 14:34:56 +03:00
Sergei Petrunia
8496e84f05 Trivial post-merge fixes 2018-04-15 12:52:27 +03:00
Sergei Petrunia
78e42153b5 Fix compile on windows: O_SYNC is not available, use a my_sync() call instead. 2018-04-13 20:26:40 +03:00
Sergei Petrunia
d13e3547e4 MDEV-14460: Memory leak with only SELECT statements
Cherry-pick this fix from the upstream:
commit 6ddedd8f1e0ddcbc24e8f9a005636c5463799ab7
Author: Sergei Petrunia <psergey@askmonty.org>
Date:   Tue Apr 10 11:43:01 2018 -0700

    [mysql-5.6][PR] Issue #802: MyRocks: Statement rollback doesnt work correctly for nes…

    Summary:
    …ted statements

    Variant #1: When the statement fails, we should roll back to the latest
    savepoint taken at the top level.
    Closes https://github.com/facebook/mysql-5.6/pull/804

    Differential Revision: D7509380

    Pulled By: hermanlee

    fbshipit-source-id: 9a6f414
2018-04-13 01:56:01 +03:00
Sergei Petrunia
5545753b0b Update test results
In the upstream include/search_pattern_in_file.inc prints nothing
when it has found the searched string (if it hasn't, it produces an error)

In MariaDB, it prints "FOUND n ..."
2018-04-13 00:39:51 +03:00
Sergei Petrunia
34e6b5fa6f Undo fix for MDEV-13852: RocksDB now has a proper WinWriteableFile::IsSyncThreadSafe()
Commit being reverted is:
commit 689168be12
Author: Vladislav Vaintroub <wlad@mariadb.com>
Date:   Thu Nov 16 18:57:18 2017 +0000

    MDEV-13852 - redefine WinWriteableFile such as IsSyncThreadSafe()
    is set to true, as it should.

    Copy and modify original io_win.h header file to a different location
    (as we cannot patch anything in submodule). Make sure modified header is
    used.
2018-04-12 20:28:54 +03:00
Sergei Petrunia
5715177a76 - Fix a merge error
- Test result updates
2018-04-11 18:39:06 +03:00
Sergei Petrunia
7e700bd2a8 Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly
This is Variant#2.
- Undo Variant#1
- Instead, swap the range bounds if we are doing a reverse-ordered scan.
2018-04-09 19:12:23 +03:00
Sergei Petrunia
8628c589f6 Fix ha_rocksdb::calc_eq_cond_len() to handle HA_READ_PREFIX_LAST_OR_PREV correctly 2018-04-09 15:27:35 +03:00
Sergei Petrunia
e7efc79350 Make rocksdb.information_schema test stable 2018-04-09 01:10:43 +03:00
Sergei Petrunia
1cb2e0333d MDEV-12466 : Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || ...
When "FLUSH TABLE ... FOR EXPORT" fails, the SQL layer should rollback
the statement. Otherwise we hit an assert when we try to close the
tables while having a non-empty list of statement transaction participants.
2018-04-07 14:05:28 +03:00
Sergei Petrunia
b922741074 MDEV-15472: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failure
MariaDB differs from the upstream for "DDL-like" command. For these,
it sets binlog_format=STATEMENT for the duration of the statement.
This doesn't play well with MyRocks, which tries to prevent DML
commands with binlog_format!=ROW.

Also, if Locked_tables_list::reopen_tables() returned an error, then
close_cached_tables should propagate the error condition and not silently
consume it (it's difficult to have test coverage for this because this
error condition is rare)
2018-03-29 14:43:08 +03:00
Sergei Petrunia
0d2fffb612 MDEV-15686: Loading MyRocks plugin back after it has been unloaded causes a crash
Adjust the testcase to handle all possible outcomes.
2018-03-29 11:08:32 +03:00
Sergei Petrunia
011586c04d MDEV-15686: Loading MyRocks plugin back after it has been unloaded causes a crash
- Disallow loading of MyRocks (or any auxilary) plugins after it has been
  unloaded.
- Do it carefully - Plugin's system variables may be accesssed (e.g. default
  value is set) after the first rocksdb_done_func() call but before
  the secon rocksdb_init_func() call.
2018-03-28 14:30:37 +03:00
Sergei Petrunia
907aae2502 MDEV-15708: rocksdb.mariadb_plugin fails on winx64, Cannot enable tc-log at run-time
Ignore the warning.
On Windows, Galera is not available so the server starts in non-XA mode
when both MyRocks and InnoDB are disabled.
2018-03-28 14:28:58 +03:00
Sergei Petrunia
60438451c3 MDEV-14843: Assertion `s_tx_list.size() == 0' failed in myrocks::Rdb_transaction::term_mutex
When the plugin is unloaded, walk the s_trx_list and delete the left over
Rdb_transaction objects.
It is responsibility of the SQL layer to make sure that the storage engine
has no open tables when the plugin is being unloaded.
2018-03-26 21:25:40 +03:00
Sergei Golubchik
d390e501eb MDEV-11839 move value caching from get_datetime_value to fix_fields time
Refactor get_datetime_value() not to create Item_cache_temporal(),
but do it always in ::fix_fields() or ::fix_length_and_dec().

Creating items at the execution time doesn't work very well with
virtual columns and check constraints that are fixed and executed
in different THDs.
2018-03-14 12:45:28 +01:00
Sergei Petrunia
28777046b4 MDEV-15245: Assertion `false' failed in myrocks::ha_rocksdb::position
Don't call handler->position() if the last call to read a row did
not succeed.
2018-03-11 16:43:36 +00:00
Sergei Golubchik
e119799a92 fix compilation wih -DPLUGIN_PARTITION=NO
rocksdb and spider
2018-02-22 08:40:54 +01:00
Sergei Petrunia
db0484f355 Change MyRocks Maturity Level from Beta to Gamma (RC) 2018-02-21 17:27:46 +03:00
Sergei Petrunia
00a556c0c2 MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF
Part #2: some transactions have m_rocksdb_tx==NULL (and most functions of
Rdb_transction_impl handle this case. Do like they do)
2018-02-21 17:00:03 +03:00
Sergei Petrunia
01e89d6a86 MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF
Make MyRocks' non-XA commit path to first do the commit without syncing
and then sync.
2018-02-21 15:42:34 +03:00
Sergei Petrunia
7beaa5e34e Merge branch 'bb-10.2-mariarocks' into 10.2 2018-02-09 13:44:38 +03:00
Varun Gupta
34ff2967c5 Post merge fix
rocksdb_set_update_cf_options functions was freeing a pointer which it should not.
2018-02-08 19:25:19 +05:30
Vladislav Vaintroub
76600199cb rocksdb : Disable the constantly failing bloomfilter test, until MDEV-14562 is fixed 2018-02-08 13:05:13 +00:00
Vicentiu Ciorbaru
cbe566dc42 Add myrocks_hotbackup part of rocksdb plugin in cmake 2018-02-07 13:08:19 +00:00
Sergei Petrunia
48cfb3b80d Post-merge fixes: rocksdb.i_s_ddl 2018-02-01 23:37:41 +00:00
Sergei Petrunia
d0fd44fc52 Post-merge fixes: MariaDB-fication of rdb_i_s_deadlock_info 2018-02-01 19:44:48 +00:00
Sergei Petrunia
f457a113ab Post-merge fixes: update .result for rocksdb.i_s_deadlock 2018-02-01 11:56:31 +00:00
Sergei Petrunia
ba03577a1f Post-merge fixes: make rocksdb.bulk_load_unsorted_rev to work. 2018-01-31 14:31:44 +00:00
Sergei Petrunia
669e910a6a More post-merge fixes 2018-01-30 12:50:30 +00:00
Sergei Petrunia
819adb44a8 Post-merge fixes
- Fix rocksdb.rocksdb test
- Update rocksdb.autoinc_crash_safe_partition* tests
2018-01-29 16:07:23 +03:00
Sergei Petrunia
e3a03da2bc Merge from merge-myrocks:
commit 445e518bc7
Author: Sergei Petrunia <psergey@askmonty.org>
Date:   Sat Jan 27 10:18:20 2018 +0000

    Copy of
    commit f8f364b47f2784f16b401f27658f1c16eaf348ec
    Author: Jay Edgar <jkedgar@fb.com>
    Date:   Tue Oct 17 15:19:31 2017 -0700

        Add a hashed, hierarchical, wheel timer implementation

        Summary:
        In order to implement idle timeouts on detached sessions we need something inside MySQL that is lightweight and can handle calling events in the future wi

        By default the timers are grouped into 10ms buckets (the 'hashed' part), though the size of the buckets is configurable at the creation of the timer.  Eac

        Reviewed By: djwatson

        Differential Revision: D6199806

        fbshipit-source-id: 5e1590f
2018-01-27 11:52:34 +00:00
Sergei Petrunia
445e518bc7 Copy of
commit f8f364b47f2784f16b401f27658f1c16eaf348ec
Author: Jay Edgar <jkedgar@fb.com>
Date:   Tue Oct 17 15:19:31 2017 -0700

    Add a hashed, hierarchical, wheel timer implementation

    Summary:
    In order to implement idle timeouts on detached sessions we need something inside MySQL that is lightweight and can handle calling events in the future with very little cost for cancelling or resetting the event.  A hashed, hi

    By default the timers are grouped into 10ms buckets (the 'hashed' part), though the size of the buckets is configurable at the creation of the timer.  Each wheel (the 'wheel' part) maintains 256 buckets and cascades to the whe

    Reviewed By: djwatson

    Differential Revision: D6199806

    fbshipit-source-id: 5e1590f
2018-01-27 10:18:20 +00:00