Commit graph

484 commits

Author SHA1 Message Date
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
Sergei Petrunia
9a23b22346 Adjust myrocks_hotbackup to work with MariaDB. 2018-01-25 14:43:18 +03:00
Sergei Petrunia
e402d779c7 Import myrocks_hotbackup from the upstream
- They have it in scripts/myrocks_hotbackup, so we don't get it during
  merges. this will be fixed

- OTOH the testsuite is already being merged into
  storage/rocksdb/mysql-test/rocksdb (but isn't run due to using many
  upstream-only features)
2018-01-25 14:08:11 +03:00
Sergei Petrunia
0292cd0a27 Better explanation why rpl_row_triggers is disabled. 2018-01-15 21:08:00 +03:00
Sergei Petrunia
85aea5a12b Update .result for rocksdb.rpl_row_triggers (not the whole test works yet) 2018-01-15 16:50:18 +03:00
Sergei Petrunia
1eea7966f3 Merge branch 'bb-10.2-mariarocks' into 10.2 2018-01-13 01:27:35 +03:00
Sergei Petrunia
4cafd8e66f rocksdb.information_schema testcase is not stable 2018-01-13 01:26:06 +03:00
Sergei Petrunia
2da1917912 Attempt to eliminate race conditions in rocksdb.information_schema 2018-01-12 16:04:29 +00:00
Varun Gupta
028e2ddc54 Added a missing result file to the rocksdb_sys_vars result suite 2018-01-12 19:16:36 +05:30
Sergei Petrunia
c481fc9ca7 Change MyRocks maturity from Alpha to Beta 2018-01-12 15:58:34 +03:00
Sergei Petrunia
d32f5be307 MDEV-14372: Fix and enable rocksdb.information_schema test
- Make Rdb_binlog_manager::unpack_value to not have a stack overrun
  when it is reading invalid data (which it currently does as we in
  MariaDB do not store binlog coordinates under BINLOG_INFO_INDEX_NUMBER,
  see comments in MDEV-14892 for details).
- We may need to store these coordinates in the future, so instead of
  removing the call of this function, let's make it work properly for
  all possible inputs.
2018-01-12 15:58:34 +03:00
Varun Gupta
b2115ce235 Rocksdb fails to build when the source and build directory are not the same. This is a follow
up fix for MDEV-12458
2018-01-02 21:50:40 +02:00
Varun Gupta
7703095d2e MDEV-12458: Variable and log records to indicate RocksDB version are missing
Added a system variabe rocsdb_git_hash to MyRocks which tell us the version of RocksDB being used
2017-12-31 21:58:50 +02:00
Monty
14de2ad3cb Removed curr_bitmap_pos++ from possible macro 2017-12-28 11:47:03 +02:00
Sergei Petrunia
8c3a1b15e6 Fix a typo in previous commit 2017-12-22 13:22:59 +03:00
Sergei Petrunia
5426f6e30f Better comments: explain why slave_use_idempotent_for_recovery is disabled 2017-12-22 02:30:32 +03:00
Sergei Petrunia
ab0a7e13b2 More fixes in MyRocks' rocksdb_rpl testsuite
- Make my.cnf to include rpl_1slave_base.cnf (needed for tests that
  actually use replication, i.e. need a functioning slave)
- Adjust and enable singledelete_idempotent_table.test
- More edits in disabled.def
2017-12-22 02:21:27 +03:00
Sergei Petrunia
aed781ef7f Cleanup in storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def 2017-12-22 01:13:43 +03:00
Sergei Petrunia
9c28fd7a33 Merge branch '10.2' into bb-10.2-mariarocks 2017-12-21 23:34:49 +03:00
Sergei Petrunia
207976d6b9 Better comments part #2 2017-12-21 02:34:02 +03:00
Sergei Petrunia
e27e7ec767 Better comments part #1 2017-12-21 02:02:25 +03:00
Sergei Petrunia
85fad60dc7 Disable back rocksdb.col_opt_zerofill due to MDEV-14729 2017-12-21 01:50:44 +03:00
Sergei Petrunia
73fa7aeb20 MDEV-14165: not MyRocks -problem in ps-protocol, happens in upstream too
Enable the test back, as the fix has been pushed.
2017-12-20 19:49:56 +03:00
Sergei Petrunia
21eed925a0 Cleanup out of date comments (no real changes). 2017-12-20 19:37:48 +03:00
Monty
06f0b23a78 Fixed memory leak in my_rocks
rocksdb_sys_vars.rocksdb_update_cf_options_basic.test failed with
reports about not freed memory.
2017-12-17 17:53:53 +02:00
Sergei Petrunia
4bd63bd551 MDEV-14679: RocksdB plugin fails to load with "Loading of unknown plugin ROCKSDB_CFSTATS
Set maturity level of all "Sub-plugins" to be the same as the main maturity level.
2017-12-16 17:45:55 +03:00
Sergei Petrunia
7380376370 MDEV-14293: MyRocks lacks basic functionality
Adjust the fix according to the review input: don't introduce a special
error caode, use ER_INTERNAL_ERROR catch-all.
2017-12-16 16:44:33 +03:00
Sergei Petrunia
64b11e61b5 MDEV-14293: MyRocks lacks basic functionality
The error
  "Unsupported collation on string indexed column %s Use
    binary collation (latin1_bin, binary, utf8_bin)."

is misleading. Change it:
- It is now a warning
- It is printed only for collations that do not support index-only access
  (reversible collations that use unpack_info are ok)
- The new warning text is:

  Indexed column %s.%s uses a collation that does not allow index-only
  access in secondary key and has reduced disk space efficiency
  in primary key.
2017-12-15 18:00:24 +03:00
Elena Stepanova
0e69d0b094 MDEV-14607 storage_engine-rocksdb.type_bit_indexes fails after latest pushes 2017-12-13 00:29:44 +02:00
Sergei Petrunia
86c69263a4 MDEV-14389: MyRocks and NOPAD collations
Part #2: Take into accont the fact that three binary collations that
we handle are technically NOPAD collations
2017-12-12 13:31:41 +03:00
Sergei Petrunia
e12f77a7e3 MDEV-14389: MyRocks and NOPAD collations
Disallow use of NOPAD collations in indexed columns.
2017-12-12 01:33:03 +03:00
Andrei Elkin
15219eb08a MDEV-14290 Binlog rotate crashes when two commit_checkpoint_notify capable engines.
The crash (sometimes assert) in MYSQL_BIN_LOG::mark_xid_done was caused by a
fact that log.cc:binlog_background_thread_queue could become a cyclic list.
This possibility becomes real with two checkpoint capable engines that
may execute TC_LOG_BINLOG::commit_checkpoint_notify() in succession before
binlog_background thread gets control and eventually finds a freed memory
while otherwise endlessly looping in while(queue).

It is fixed with counting the notificaion kind instead of en-listing the same notificaion kind in commit_checkpoint_notify as formerly. The while(queue) of binlog background thread is refined to pay attention to the new counter. In effectno more access to free memory is possible.
2017-12-11 12:41:45 +02:00
Sergei Petrunia
bdeb27a000 MDEV-14123: .rocksdb folder may break workflow which re-create data directory
Part #2: Adjust other parts of testsuite to take into account
that RocksDB files are in "#rocksdb" now.
2017-12-11 12:31:59 +03:00
Sergei Petrunia
ddc1d6904a MDEV-14123: .rocksdb folder may break workflow which re-create data directory
Part2: make MyRocks add its directory into @@ignore_db_dirs when starting.

This is necessary because apparently not everybody are using plugin's my.cnf
So load ha_rocksdb.{so,dll} manually and then hit MDEV-12451, MDEV-14461
etc.
2017-12-11 12:31:58 +03:00
Sergei Petrunia
b8a0373ed2 MDEV-14123: ".rocksdb folder may break workflow", and other MDEVs
Rename  Use '#rocksdb' instead of '.rocksdb' as subdirectory for RocksDB
datadir.
2017-12-11 12:31:58 +03:00
Sergei Petrunia
2c1e4d4d7a MDEV-14563: Wrong query plan for query with no PK
Part #2: Don't use the new code for the clustered PK, it is handled
in the special way right above.
2017-12-06 12:35:17 +03:00
Sergei Petrunia
a6254e5e7d MDEV-14563: Wrong query plan for query with no PK
TABLE_SHARE::init_from_binary_frm_image() calls handler_file->index_flags()
before it has set TABLE_SHARE::primary_key (it is 0 while it should be
MAX_KEY in my example).
This causes MyRocks to report wrong index flags (it thinks it's a PK while
it is not), which causes invalid query plans later on.

Do the only thing that seems feasible: adjust field->part_of key to have
correct value in ha_rocksdb::open.
2017-12-06 12:35:17 +03:00
Sergei Petrunia
c3803914c5 MDEV-14433: RocksDB may show empty or incorrect output with rocksdb_strict_collation_check=off
Part#1: Set field->part_of_key correctly for PK fields.
2017-12-06 12:35:17 +03:00
David Carlier
f86413ecc1 Fix the build on OpenBSD (#488)
* rocksdb fails without timer_delete() - only use it when it exists
2017-11-22 12:52:12 +01:00
Sergei Golubchik
14c2a9a52e don't git submodule update from rocksdb/CMakeLists.txt (#492)
we now have cmake/submodules.cmake that updates all submodules
2017-11-21 20:03:57 +01:00
Vladislav Vaintroub
0d1e805aeb Fix rocksdb tests on Windows 2017-11-16 22:11:08 +00:00
Vladislav Vaintroub
689168be12 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.
2017-11-16 18:57:18 +00:00
Sergei Petrunia
e2376e8137 MDEV-14334: Update test results for rocksdb.bulk_load_rev_data 2017-11-09 19:52:55 +03:00
Monty
d40c23570f Cleanup up after failed alter table in add_index_inplace_crash 2017-11-09 14:58:26 +02:00
Sergei Petrunia
80d61515ac Make rocksdb.read_only_tx pass and enable it
- FB/MySQL 5.6' MyRocks has START TRANSACTION WITH CONSISTENT
  ROCKSDB SNAPSHOT, which returns binlog position.

- MariaDB has a cross-engine START TRANSACTION WITH CONSISTENT
  SNAPSHOT. It can be used for the same purpose. Binlog position
  can be obtained from Binlog_snapshot_file/position status vars.
2017-11-02 16:15:37 +00:00
Elena Stepanova
a269173e97 Workaround for MDEV-13852 (tests don't run on Windows) 2017-10-30 03:24:35 +02:00
Sergei Petrunia
7cca0df0d7 Fix rocksdb.rocksdb test
Forgot to put the updated rocksdb.result in
2017-10-29 22:55:51 +03:00
Sergei Petrunia
e5678c3fac MDEV-13904: rocksdb.add_index_inplace_sstfilewriter timed out
Downscale rocksdb.add_index_inplace_sstfilewriter to be 10x smaller
2017-10-29 13:21:23 +03:00