Commit graph

511 commits

Author SHA1 Message Date
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
Sergei Petrunia
34188ac455 Organize information in storage/rocksdb/mysql-test/rocksdb/t/disabled.def 2017-10-29 09:41:40 +00:00
Sergei Petrunia
a6dc22fc73 MyRocks: enable a few tests that do not seem to fail anymore 2017-10-29 11:49:18 +03:00
Sergei Petrunia
b6d4859547 MDEV-14181: rocksdb.rocksdb fails: line 1117: query 'reap' succeeded - should have failed
Fix a race condition in the testcase.
2017-10-29 11:39:52 +03:00
Sergei Petrunia
8abe840085 Merge branch 'bb-10.2-mariarocks' of github.com:MariaDB/server into 10.2 2017-10-29 11:27:24 +03:00
Sergei Petrunia
3d46ebbc89 MDEV-11934: MariaRocks: Group Commit with binlog
Adjust and enable rocksdb.2pc_group_commit test
2017-10-27 17:48:17 +03:00
Sergei Petrunia
1792a80af4 Disable rocksdb.col_opt_zerofill due to MDEV-14165. 2017-10-27 12:33:27 +03:00
Sergei Petrunia
965c72d331 MDEV-12474 - Fails in fulltest
Apply fix for https://github.com/facebook/mysql-5.6/issues/748
A few tests in rocksdb suite fail with --ps-protocol

They fail because --ps-protocol uses different data format on the
wire. Work around that by doing a dummy CONCAT operation which forces
the data to be transfered in text form (like it is done without
--ps-protocol)
2017-10-26 18:22:48 +03:00
Sergei Petrunia
6cfbffad5b Code cleanup 2017-10-23 10:04:55 +00:00
Sergei Petrunia
9d47c4cfdb Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks 2017-10-23 09:47:10 +00:00
Sergei Petrunia
d577b1a9c2 MDEV-11934: MariaRocks: Group Commit with binlog
Fix a failure in rocksdb_rpl.rpl_rocksdb_2pc_crash_recover test.
Don't do XA with binlog if @@rocksdb_enable_2pc=OFF.
2017-10-23 09:45:47 +00:00
Sergei Petrunia
4995091c33 Temporarily disable rocksdb.rpl_ddl_high_priority test 2017-10-20 14:15:37 +00:00
Sergei Petrunia
7c42b091b7 Make rocksdb.index_merge_rocksdb2 test stable 2017-10-20 13:36:55 +03:00
Sergei Petrunia
cd7fa0fd62 MDEV-11934: MariaRocks: Group Commit with binlog
Port the previous patch:
- Implement MariaDB's Group Commit API. This is a first
   attempt which lacks the expected performance.

To newer MariaDB (which includes newer MyRocks)
2017-10-17 12:04:53 +03:00
Sergei Petrunia
f11eaaa3f6 Merge branch 'bb-10.2-mariarocks' of github.com:MariaDB/server into 10.2
Conflicts:
	storage/rocksdb/ha_rocksdb.cc
2017-10-13 14:37:04 +03:00
Sergei Petrunia
0507b09402 Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks-merge 2017-10-13 13:25:46 +03:00
Varun Gupta
dc8ac122bb MDEV-13928: Missing symbols building RocksDB on macOS 10.12.6
rdb_sst_info.cc must be compiled with RTTI
2017-10-11 21:51:09 +05:30
Sergei Petrunia
8f6266e927 MDEV-13852: temporarily disable running tests on windows 2017-10-11 14:41:09 +03:00
Varun Gupta
ac2ae901e8 MDEV-13974: Build failure in rocksdb/rdb_datadic.cc
Added cstdlib librabry to rdb_datadic.h
2017-10-10 23:56:13 +05:30
Sergei Petrunia
d1eee0407f Temporarily disable tests that rely on FB-only features 2017-10-09 13:35:43 +03:00
Sergei Petrunia
f62f9d661a Fix rocksdb.perf_context test
The part of the test that counts IO should be run with default
rocksdb_flush_log_at_trx_commt.
2017-10-09 13:29:09 +03:00
Sergei Petrunia
6ff8d57128 Fix mege error in rocksdb.use_direct_reads_writes test 2017-10-09 12:56:31 +03:00
Sergei Petrunia
70af9cf5ed Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks-merge 2017-10-06 18:27:39 +03:00
Vladislav Vaintroub
7354dc6773 MDEV-13384 - misc Windows warnings fixed 2017-09-28 17:20:46 +00:00
Vladislav Vaintroub
eba44874ca MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings
(usually coming from misusing 0x%lx and long cast in DBUG)

- Also fix printf-format warnings

Make the above mentioned warnings fatal.

- fix pthread_join on Windows to set return value.
2017-09-28 17:20:46 +00:00
Sergei Petrunia
262d7e4c09 Post-merge test fixes part #3. 2017-09-19 17:20:36 +03:00
Sergei Petrunia
da9c385fd6 Post-merge test fixes part #2. 2017-09-19 17:00:54 +03:00
Sergei Petrunia
f321f0823b Post-merge fixes part #1. 2017-09-19 16:15:08 +03:00
Sergei Petrunia
6b0588018a Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks-merge 2017-09-19 15:34:38 +03:00
Sergei Petrunia
a2d2866e80 Post-merge fix for compilation on Windows 2017-09-19 14:28:30 +03:00
Sergei Petrunia
ba3209e219 Merge mergetrees/merge-myrocks into bb-10.2-mariarocks-merge
Upstream cset we are merging from:

    commit 184a4a2d82f4f6f3cbcb1015bcdb32bebe73315c
    Author: Abhinav Sharma <abhinavsharma@fb.com>
    Date:   Thu Sep 14 11:40:08 2017 -0700

        Bump rocksdb submodule

        Summary:
        Bump rocksdb to include the fix for rocksdb.trx_info_rpl

Lots of conflicts, got the code to compile but tests are likely to
be broken
2017-09-18 14:06:01 +03:00
Sergei Petrunia
3fae64b196 Copy of
commit 184a4a2d82f4f6f3cbcb1015bcdb32bebe73315c
Author: Abhinav Sharma <abhinavsharma@fb.com>
Date:   Thu Sep 14 11:40:08 2017 -0700

    Bump rocksdb submodule

    Summary:
    Bump rocksdb to include the fix for rocksdb.trx_info_rpl

    The bug was introduced in: https://github.com/facebook/rocksdb/pull/2850
    Fixed in: https://github.com/facebook/rocksdb/pull/2881

    update-submodule: rocksdb

    Reviewed By: lth

    Differential Revision: D5834658

    fbshipit-source-id: d1551bf
2017-09-15 10:04:49 +00:00
Sergei Petrunia
49878be331 MDEV-13602: rocksdb.index_merge_rocksdb2 failed in buildbot
Part#2: stabilize the test output
2017-09-12 13:32:09 +03:00
Varun Gupta
80c90887fe MDEV-13585: RocksDB plugin fails to build on macOS because of unknown type timer_t etc.
Rdb_io_watchdog can not be built on  OS X. Disable it.
2017-09-05 23:00:59 +05:30
Sergei Petrunia
4ae200a97a Update test results for rocksdb.bulk_load_rev_cf_and_data 2017-09-05 18:28:05 +03:00
Sergei Petrunia
0e45edf350 MDEV-13669: Some MyRocks test take a long time
Make rocksdb.bloomfilter* tests 1.8x faster by doing loading in bulk
2017-08-31 11:42:41 +03:00
Sergei Petrunia
d20fa48599 MDEV-13669: Some MyRocks test take a long time
Make rocksdb.cardinality test faster (77 -> 42 sec with --mem) by
loading records in batches.
(loading everything as one bulk load batch will remove the purpose
 of the test)
2017-08-30 11:45:24 +03:00
Sergei Petrunia
c52ffbeba9 Remove garbage code 2017-08-25 11:55:12 +03:00
Sergei Petrunia
575afea786 MyRocks: Remove todo-#ifdef in Rdb_trx_info_aggregator::process_tran 2017-08-25 11:55:12 +03:00
Sergei Petrunia
fba53e7775 Make MyRocks test stable: Data_length may vary slightly as well 2017-08-25 11:55:12 +03:00
Sergei Petrunia
765519694d Enable basic XA between MyRocks and the binlog
This allows basic master crash-safety
- Un-comment and update relevant parts of the code
- Make rocksdb_rpl suite work like other MyRocks testsuites
  (load the MyRocks plugin, don't start if it is not compiled in, etc)
- For now, disable all tests in the rocksdb_rpl suite.
- MariaDB-fication of rpl_rocksdb_2p_crash_recover test.
2017-08-25 11:55:12 +03:00
Sergei Petrunia
ae0759ad45 MDEV-13602: rocksdb.index_merge_rocksdb2 failed in buildbot
- Add include/index_merge*. Upstream has different files than MariaDB,
  use copies theirs, not ours.
- There was a prblem with running "DDL-like" commands with binlog=ON:
  MariaDB sets binlog_format=STATEMENT for the duration of such command
  to prevent RBR replication from catching (and replicating) updates to
  system tables.
  However, MyRocks tries to prevent any writes to MyRocks tables with
  binlog_format!=ROW.
- Added exceptions for DDL-type commands (ANALYZE TABLE, OPTIMIZE TABLE)
- Added special handling for "LOCK TABLE(s) myrocks_table WRITE".
2017-08-23 18:41:43 +03:00
Sergei Petrunia
ef8e1a35cc Fix rocksdb.bulk_load test
- Remove the merge error
- Update test results
2017-08-21 16:12:09 +03:00
Sergei Petrunia
4f34ec26fa MDEV-13600: Update test results for rocksdb.bulk_load_rev_cf 2017-08-21 15:26:21 +03:00
Sergei Petrunia
b3a4bc481b MDEV-13513: rocksdb.drop_table fails in buidbot with assertion failure
Apply this patch from upstream:

commit 2c8deddfb67f1cd41ea3d1ac95aa1aa9327e3406
Author: Yoshinori Matsunobu <yoshinorim@users.noreply.github.com>
Date:   Tue Aug 15 16:21:58 2017 -0700

    Set exclusive_manual_compaction = false on manual compactions

    Summary:
    Combining exclusive manual compaction and
    non-exclusive manual compaction may hit rocksdb assertion errors.
    This diff makes all MyRocks internal manual compactions non exclusive.
    Closes https://github.com/facebook/mysql-5.6/pull/682

    Differential Revision: D5633619

    Pulled By: yoshinorim

    fbshipit-source-id: a90786d
2017-08-16 14:36:03 +03:00
Sergei Petrunia
c354cb66b0 MDEV-13515: rocksdb.use_direct_reads_writes fails in buildbot with not found pattern
The test mis-used MTR's "restart the server if it crashed or exited"
feature to try starting MyRocks plugin with invalid arguments.

Changed the test to use the --default-storage-engine=myisam which
allows the server to start when MyRocks fails to start.

This removes the need to "start the server with the arguments which
will caused it to fail to start", and so removes the race conditions
with MTR server restart code and  mysqld.*.expect file.
2017-08-15 16:42:11 +03:00
Elena Stepanova
88879b37fc Changes to RocksDB tests after the engine merge 2017-08-14 23:39:35 +03:00
Sergei Petrunia
d24f76e1a8 MDEV-13522: rocksdb.rocksdb_parts failed in buildbot
Make test result stable
2017-08-14 23:12:35 +03:00
Sergei Petrunia
cfa18cb5cf MyRocks: Fix merge typo in server stderr message 2017-08-14 14:30:22 +03:00
Sergei Petrunia
5ae598390a Attempt to make rocksdb.rocksdb_parts stable 2017-08-07 18:12:24 +03:00
Sergei Petrunia
30c36b2c15 Make rocksdb.rocksdb_icp test stable 2017-08-07 17:25:11 +03:00
Sergei Petrunia
93a6eed607 Backport to 10.2: Make rocksdb.type_varchar test stable
It may produce test failures like this because of non-deterministic
cost calculations:

-1	SIMPLE	t1	#	col1	col1	259	NULL	#	Using where
+1	SIMPLE	t1	#	col1	NULL	NULL	NULL	#	Using where
2017-08-06 15:36:50 +03:00
Sergei Petrunia
7925a4bce8 More comments 2017-08-05 13:57:17 +00:00
Sergei Petrunia
eda033255a Make "SET @@rocksdb_bulk_load=0" return an error instead of crashing the server
- This is more in line with MariaDB environment
- And help with rocksdb.bulk_load_errors test, too
2017-08-03 15:16:40 +00:00
Sergei Petrunia
fcb8d8e598 Make rocksdb.prefix_extractor_override work on Windows 2017-08-01 19:19:54 +00:00
Sergei Petrunia
0899724257 Use proper #include's 2017-08-01 08:50:48 +00:00
Sergei Petrunia
2963a49f72 Post-merge fix: Rdb_io_watchdog doesn't support windows
Part #2.
2017-08-01 08:50:25 +00:00
Sergei Petrunia
61ca3cf524 Post-merge fix: Rdb_io_watchdog doesn't support windows
So disable it there for now.
2017-07-31 17:34:47 +00:00
Sergei Petrunia
1388afcd84 MDEV-13413: After the merge rocksdb.drop_table fails with warnings
- Fix the bad merge in drop_table.test
- Remove the obsolete rocksdb_info_log_level=info_level option
  which caused warnings to be found in the error log.
2017-07-31 13:44:15 +00:00
Sergei Petrunia
6bf757a2a9 Disable rocksdb.issue243_transactionStatus
It uses SHOW ENGINE TRANSACTION STATUS, which is not supported in MariaDB
2017-07-30 13:37:04 +00:00
Sergei Petrunia
4eec6d4cca Update test result for rocksdb.tbl_opt_data_index_dir
See MDEV-12279, MariaDB is still not able to produce nice error messages
in this case.
2017-07-30 13:36:11 +00:00
Sergei Petrunia
da9c669210 Fixes for a few more post-merge test failures 2017-07-30 12:09:51 +00:00
Sergei Petrunia
d74e43e7bc Fix rocksdb.duplicate_table test 2017-07-30 11:12:54 +00:00
Sergei Petrunia
894c797eaf Mark all tests that are derived from rocksdb.bulk_load as "big".
(Could we just put the mark into bulk_load.inc ?)
2017-07-30 10:51:27 +00:00
Sergei Petrunia
1e6b02e688 MDEV-13404: MyRocks upstream uses I_S.table_statistics.row_lock_deadlocks
Comment out a part of testcase that uses it.
2017-07-30 10:42:39 +00:00
Sergei Petrunia
123187dfed Fix the merge of rocksdb_sys_vars test suite 2017-07-29 18:06:46 +00:00
Sergei Petrunia
ff0ae68eae Merge branch 'bb-10.2-mariarocks' of github.com:MariaDB/server into bb-10.2-mariarocks 2017-07-29 17:05:38 +00:00
Sergei Petrunia
d083c2490a Make rocksdb.bloomfilter_skip pass. 2017-07-29 17:05:14 +00:00
Sergei Petrunia
a95ace491b Test result updates: don't hardcode error numbers in the tests. 2017-07-29 15:26:55 +00:00
Sergei Petrunia
b2617cae3f Post-merge fix: fix compilation 2017-07-29 17:24:10 +03:00
Sergei Petrunia
be6c4f5d15 More post-merge updates to get the tests pass 2017-07-29 13:24:55 +00:00
Sergei Petrunia
a89d01fb60 Trivial updates to get a few rocksdb.* testcases to pass 2017-07-29 11:06:22 +00:00
Sergei Petrunia
f2952485a1 Merge MyRocks merge tree into bb-10.2-mariarocks, unfinished.
It compiles on Linux but fails a lot of tests still
2017-07-29 10:06:09 +00:00
Sergei Petrunia
43d5edf97c Copy of
commit 394d0712d3d46a87a8063e14e998e9c22336e3a6
Author: Anca Agape <anca@fb.com>
Date:   Thu Jul 27 15:43:07 2017 -0700

    Fix rpl.rpl_4threads_deadlock test broken by D5005670

    Summary:
    In D5005670 in fill_fields_processlist() function we introduced a point
    where we were trying to take the LOCK_thd_data before the
    synchronization point used by test
    processlist_after_LOCK_thd_count_before_LOCK_thd_data. This was
    happening in get_attached_srv_session() function called. Replaced this
    with get_attached_srv_session_safe() and moved it after lock is aquired.

    Reviewed By: tianx

    Differential Revision: D5505992

    fbshipit-source-id: bc53924
2017-07-28 17:52:07 +00:00
Sergei Petrunia
488f46f3de MDEV-13153: Assertion ... failed on partitioned RocksDB table
ha_partition creates temporary ha_XXX objects for its partitions when
performing DDL operations. The objects were created on a MEM_ROOT and
never deleted.
This works as long as ha_XXX objects free all data ha_XXX::close() and
don't rely on a proper destructor invocation. Unfortunately, ha_rocksdb
includes String members which need to be delete'd properly.

Fixed the bug by having ha_partition::~ha_partition delete these temporary
objects.
2017-07-28 13:22:28 +00:00
Vladislav Vaintroub
6f1f911497 MDEV-12445 : Rocksdb does not shutdown worker threads and aborts in memleak check on server shutdown
Disable memory leak check in debug server, if rocksdb is loaded.
There is some subtle bug somewhere in 3rd party code we cannot
do much about.

The bug is manifested as follows

Rocksdb does not shutdown worker threads, when plugin is shut down. Thus
OS does not unload the library since there are some active threads using
this library's code. Thus global destructors in the library do not run,
and there is still some memory allocated when server exits.

The workaround disables server's memory leak check, if rocksdb engine was
loaded.
2017-07-06 11:36:17 +00:00
Vladislav Vaintroub
53d6325db0 Fix assertion in rocksb.
Use thd_query_safe() to read query from a different connection.
2017-07-06 11:35:54 +00:00
Sergei Golubchik
785e2248bd MDEV-13089 identifier quoting in partitioning
don't print partitioning expression as it was entered by the user,
use Item::print() according to the sql_mode and sql_quote_show_create
2017-07-05 17:15:59 +02:00
Elena Stepanova
a8131e71f9 MDEV-12528 Run the engine-agnostic test suite on MyRocks 2017-06-23 00:34:57 +03:00
Sergei Petrunia
fff61e31ec Fix a compiler warning 2017-05-17 14:44:16 +03:00
Elena Stepanova
001e54af70 Disable RocksDB tests that fail regularly on buildbot (MDEV-12474)
Tests which fail on Xenial fulltest
2017-05-10 01:56:23 +03:00
Sergei Petrunia
2b29c52ea8 Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks 2017-05-07 23:42:59 +00:00
Sergei Petrunia
a0aacb3443 Continuation of e13e1eea96
Missed doing a few updates to rocksdb.use_direct_reads_writes test.
2017-05-07 23:40:51 +00:00
Daniel Black
52463ccff7 MDEV-12469: rocksdb having large numberic storage errors on ppc64 (BE)
(from: http://buildbot.askmonty.org/buildbot/builders/p8-rhel6-bintar/builds/820/steps/test/logs/stdio)

Errors like the following indicate a potential endian storage issue:

rocksdb.rocksdb_range                    w1 [ fail ]
        Test ended at 2017-04-27 18:56:11

CURRENT_TEST: rocksdb.rocksdb_range
--- /home/buildbot/maria-slave/p8-rhel6-bintar/build/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range.result	2017-04-27 17:41:27.740050347 -0400
+++ /home/buildbot/maria-slave/p8-rhel6-bintar/build/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range.reject	2017-04-27 18:56:11.230050346 -0400
@@ -25,15 +25,15 @@
 select * from t2 force index (a) where a=0;
 pk	a	b
 0	0	0
-1	0	1
-2	0	2
-3	0	3
-4	0	4
-5	0	5
-6	0	6
-7	0	7
-8	0	8
-9	0	9
+16777216	0	1
+33554432	0	2
+50331648	0	3
+67108864	0	4
+83886080	0	5
+100663296	0	6
+117440512	0	7
+134217728	0	8
+150994944	0	9
 # The rest are for code coverage:
 explain
 select * from t2 force index (a) where a=2;
@@ -41,23 +41,23 @@
 1	SIMPLE	t2	ref	a	a	4	const	#
 select * from t2 force index (a) where a=2;
 pk	a	b
-20	2	20
-21	2	21
-22	2	22
-23	2	23
-24	2	24
-25	2	25
-26	2	26
-27	2	27
-28	2	28
-29	2	29
+335544320	2	20
+352321536	2	21
+369098752	2	22
+385875968	2	23
+402653184	2	24
+419430400	2	25
+436207616	2	26
+452984832	2	27
+469762048	2	28
+486539264	2	29
 explain
 select * from t2 force index (a) where a=3 and pk=33;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	const	a	a	8	const,const	#
 select * from t2 force index (a) where a=3 and pk=33;
 pk	a	b
-33	3	33
+553648128	3	33
 select * from t2 force index (a) where a=99 and pk=99;
 pk	a	b
 select * from t2 force index (a) where a=0 and pk=0;
...

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-05-03 10:27:24 +04:00
Sergei Petrunia
b48f2a097d MDEV-12663 : rocksdb.compact_deletes times out and causes other tests to fail
Temporarily disable rocksdb.compact_deletes.
2017-05-02 13:55:08 +00:00
Sergei Petrunia
07d329a758 Continuation of the previous cset: rename sysvar's test, too.
use_direct_writes was renamed to use_direct_io_for_flush_and_compaction
2017-05-02 09:36:16 -04:00
Sergei Petrunia
e13e1eea96 MyRocks: update to latest rocksdb
- Update rocksdb submodule to revision
  d616ebea23fa88cb9c2c8588533526a566d9cfab
- Normally this should be done by doing a merge from upstream
  MyRocks, but now we are just updating rocksdb, MyRocks merge will
  follow later.
- Apply a part of 4f6f072f6c74513087004755508eb6d6c432c5c1
  use_direct_writes was renamed to use_direct_io_for_flush_and_compaction
- Update build_rocksdb.cmake - RocksDB have moved files around
2017-05-01 17:50:18 +03:00
Daniel Black
d7d8c23654 MDEV-12469: static_assert cannot be determined on bigendian
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-04-25 18:46:13 +04:00
Vladislav Vaintroub
8c9cd26c06 Rocksdb - disable tests that fail regularly on buildbot (MDEV-12474) 2017-04-07 17:00:51 +00:00
Vladislav Vaintroub
a33653eedb MDEV-12473 - fix rocksdb linking error
link rocksdb with librt, for clock_gettime()
2017-04-07 15:09:28 +00:00
Vladislav Vaintroub
30cbbfbf77 MDEV-12452 postfix - use C style cast, not reinterpret_cast
to fix build on Win64
2017-04-07 06:09:25 +00:00
Vladislav Vaintroub
b64910ce27 MDEV-12452 MDEV-12453 : Fix building rocksdb and aws_key_management on macOS
use  CMAKE_CXX_STANDARD to set C++11 flags  with CMake 3.1+ (apples flags are somehow different from standard clang)
port htonbe16/32/64 macros for rocksdb
use reinterpret_cast<size_t> to cast macOS's pthread_t (pointer type) to  size_t , for rocksdb
2017-04-06 18:40:12 -04:00
Sergei Petrunia
23b86a18e6 MariaRocks: temporarily disable 32-bit Windows builds 2017-04-04 17:46:56 +03:00
Sergei Petrunia
c85ea1ab6d MDEV-12439: (Temporary) Don't run MariaRocks tests under valgrind 2017-04-04 12:39:27 +03:00
Sergei Petrunia
d1fc3cc469 MariaRocks: temporarily disable a few failing tests 2017-04-04 12:36:14 +03:00
Sergei Petrunia
5c66eb5c9f Disable compilation of storage/rocksdb/unittest/test_properties_collector
Met additional issues while trying to enable it.
2017-04-03 10:29:40 +03:00
Sergei Petrunia
44bc2a0ef7 Post-fixes for "Rename plugin rocksdb_se to rocksdb"
- Also rename plugin's config file
- And fix unit test's CMakeLists.txt
2017-04-02 23:38:28 +03:00
Sergei Petrunia
e7e6e30cb7 rocksdb_sys_vars should not be run if MyRocks is not compiled.
Copy the detection logic from 'rocksdb' test suite, add a note.
2017-04-02 23:14:12 +03:00
Vladislav Vaintroub
45a9470ff3 Rename plugin rocksdb_se to rocksdb 2017-04-02 18:22:22 +00:00
Vladislav Vaintroub
85a1d9edbe rocksdb - fix failing tests on Windows 2017-04-02 17:29:04 +00:00
Vladislav Vaintroub
3599b4989d MariaRocks : Fix looking up sst_dump 2017-04-02 17:29:04 +00:00
Vladislav Vaintroub
2be18d9b7f Fix the build on Windows.
Restore MYSQL_SYSVAR_UINT64_T and MYSQL_SYSVAR_SIZE_T in
plugin.h
2017-04-02 17:29:04 +00:00
Sergei Petrunia
c35a5884b0 Mark rocksdb.bulk_load and rocksdb.add_index_inplace_sstfilewriter as big
They use much more disk space than all other tests in rocksdb test suite
2017-04-02 14:51:59 +03:00
Sergei Petrunia
0aa056f642 Disable persistent_cache.test due to upstream MyRocks issue #579. 2017-04-02 13:12:19 +03:00
Sergei Petrunia
20d9fbcf9a MDEV-12424: binlog_encryption.encrypted_* tests fail with Can't locate autodie.pm error
Don't use Perl autodie module as there are platforms where it is not present
2017-04-02 12:18:23 +03:00
Sergei Petrunia
74889de426 Apply a workaround for MyRocks upstream issue #569
We are hitting this
https://github.com/facebook/mysql-5.6/issues/569
and we are not ready to merge the fix currently
2017-04-01 16:11:19 +03:00
Sergei Petrunia
788382f77a Fix coompilation on windows
Some Windows enviroments don't have uint64_t, and we dont really need
that type. Assume 64-bit integers take 8 bytes.
2017-04-01 06:32:20 +03:00
Sergei Golubchik
16a99c5ad9 MariaRocks tests: various cleanups
remove hard-coded paths (that assumed we're in a source tree)
remove various shell/perl/awk/whatsnot scripts, use mysqltest and perl
remove numerous --exec /some/unix/tool commands, use mysqltest and perl
2017-03-31 19:28:58 +02:00
Sergei Golubchik
d6d994bf42 remove two redundant *.inc files to restart a server
namely, restart_mysqld_with_option.inc and kill_and_restart_mysqld.inc -
use restart_mysqld.inc instead.

Also remove innodb_wl6501_crash_stripped.inc that wasn't used anywhere.
2017-03-31 19:28:58 +02:00
Sergei Golubchik
6e899642fe move rocksdb specific changes into rocksdb 2017-03-31 19:28:57 +02:00
Sergei Golubchik
9ce639af52 don't export all charsets to plugins
don't use internal server collation symbol names, use collation
properties and collation IDs, they are much more stable.
2017-03-31 19:22:20 +02:00
Sergei Golubchik
76a262cdf8 remove my_hash_const_element(), use Hash_set in C++ code 2017-03-31 19:22:19 +02:00
Sergei Golubchik
63798a6ea8 remove DB_TYPE_ROCKSDB 2017-03-31 19:22:19 +02:00
Sergei Petrunia
54a892e133 Post-merge fixes 2017-03-31 01:32:59 +03:00
Vicențiu Ciorbaru
7ebb81be1d Make mysql_ldb and sst_dump part of the rocksdb-engine component 2017-03-26 17:30:26 +03:00
Vicențiu Ciorbaru
3ade211a72 Do not build ldb binary as mysql_ldb does the same thing 2017-03-25 23:28:05 +02:00
Vicențiu Ciorbaru
86680e8b4f Skip rocksdb plugin if sources can not be fetched
Either we are building from a source package, in which case all sources
should be present, or we are building from a repository. The repository
needs to fetch the rocksdb submodule before building rocksdb.
2017-03-25 22:18:34 +02:00
Sergei Petrunia
4653b6e2a3 MDEV-12279: rocksdb.tbl_opt_data_index_dir fails, wrong error code
Change the returned error code to be ER_CANT_CREATE_TABLE.
Emit the warning text ourselves.

(When a query produces both an error and a warning, command-line client
with default settings will not provide any indication that the warning
is present, unfortunately. Need \W)
2017-03-23 11:06:26 +03:00
Vicențiu Ciorbaru
21bbe10bb3 Revert "Revert "Make rocksdb build as a deb package too""
This reverts commit 49de95679d.
2017-03-17 17:08:34 +02:00
Sergei Petrunia
619623b862 MariaRocks: SET GLOBAL rocksdb_strict_collation_exceptions=null crashes
A trivial fix
2017-03-17 14:44:05 +03:00
Sergei Petrunia
131d858206 Temporarily disable rocksdb.blind_delete_without_tx_api test 2017-03-17 04:46:01 +03:00
Sergei Petrunia
dd743dae32 Update test results for rocksdb.misc
This .result file is not a statement of which storage engine
should be used for any particular table in mysql database.

This is just a check that a query against I_S doesn't crash.
2017-03-17 04:05:03 +03:00
Sergei Petrunia
c707997e15 MariaRocks: run rocksdb testsuite with --default-storage-engine=rocksdb
Most tests use CREATE TABLE ... ENGINE=ROCKSB, but there are some
exceptions: rpl_savepoint, rpl_row_stats.
In order to avoid any "oh we are using the wrong storage engine"
surprises, set the default for the whole testsuite.
2017-03-17 01:21:11 +03:00
Sergei Petrunia
46a78868fe MariaRocks: make rocksdb.rocksdb_datadir test pass
The test runs $MYSQLD_BOOTSTRAP_CMD but that command does not include
arguments for loading ha_rocksdb.so plugin. Add them.
2017-03-17 00:05:48 +03:00
Sergei Petrunia
23f9bb966b MDEV-12285: MariaRocks: "[ERROR] mysqld: Deadlock ..." messages in server stderr
The mssages are caused by log_warnings=2.
Set log_warnings=1 for the rocksdb test suite.
2017-03-16 21:28:42 +03:00
Vicențiu Ciorbaru
49de95679d Revert "Make rocksdb build as a deb package too"
This reverts commit 38919f68a1.

Temporary revert to be able to see other failures until builders are
updated.
2017-03-16 09:50:26 +02:00
Sergei Petrunia
17d7cc731e MDEV-12277: rocksdb.rocksdb fails with Sort Aborted error in server stderr
Add a suppression
2017-03-16 09:46:01 +03:00
Sergei Petrunia
c5a20553c0 More testsuite fixes
- Disable rocksdb.show_enge
- Disable rocksdb.rpl_row_not_found

- Run rocksdb.blind_delete_without_tx_api only with binlog_format=row
  (like its .cnf file specifies)
2017-03-16 01:12:01 +03:00
Vicențiu Ciorbaru
38919f68a1 Make rocksdb build as a deb package too 2017-03-15 23:20:20 +02:00
Sergei Petrunia
adb7470742 Disable rocksdb.rpl_row_triggers, rocksdb.trx_info_rpl
These are not expected to work yet.
2017-03-15 23:44:16 +03:00
Sergei Petrunia
6dc2d581d4 Make rocksdb.rocksdb_range pass: MariaDB doesnt support ICP over reverse index scans atm 2017-03-15 23:36:20 +03:00
Sergei Petrunia
c010f06380 MariaRocks: Run rocksdb testsuite with @@rocksdb_flush_log_at_trx_commit=0
The default value of 1 causes many tests to time out (primary reason is
that many tests populate tables with one-row INSERT statements that
run with autocommit=1).
2017-03-15 23:20:28 +03:00
Sergei Petrunia
bf578ff920 Add missing source include/have_rocksdb.inc 2017-03-15 16:02:37 +00:00
Sergei Petrunia
20c085a4b7 MariaRocks: disable rocksdb.mysqldump2 also (needs --print-ordering-key) 2017-03-14 12:23:36 +03:00
Sergei Petrunia
1a3065b51a MariaRocks: make rocksdb.issue495 declare it uses partitioning 2017-03-14 12:23:08 +03:00
Vicențiu Ciorbaru
3eb8bc7408 Make rocksdb not be compiled on x86 architectures 2017-03-14 01:01:11 +02:00
Sergei Petrunia
57672a85e3 MariaRocks: make partition.test work on any platform 2017-03-13 22:04:07 +00:00
Sergei Petrunia
69387c68b5 MariaRocks: update results for innodb_i_s_tables_disabled 2017-03-13 10:34:38 +03:00
Sergei Petrunia
b4ea125252 MariaRocks: disable tests that are known to fail 2017-03-13 10:34:19 +03:00
Sergei Petrunia
17aa495b64 MariaRocks: attempt to get to compile on Windows
\include\mysql/psi/psi.h(1267): error C2061: syntax error:
identifier 'pthread_t' (compiling source file D:\win32-debug\build\src
\storage\rocksdb\rdb_psi.cc)\include\mysql/psi/psi.h(1267):
error C2061: syntax error: identifier 'pthread_t' (compiling source
file D:\win32-debug\build\src\storage\rocksdb\rdb_psi.cc)
2017-03-12 22:52:52 +03:00
Sergei Petrunia
11789a4fbe MariaRocks: Only call pthread_setname_np on platforms that support it
This is a second such fix, the first was wiped out in a merge.
2017-03-12 17:39:45 +03:00
Sergei Petrunia
a72abc8c30 Fix compile on windows 2017-03-12 16:08:26 +03:00
Sergei Petrunia
ec01aa5d6b MariaRocks: fix compilation in Windows: don't use __PRETTY_FUNCTION__ where it is not available 2017-03-12 15:59:46 +03:00
Sergei Petrunia
d49bbf12a2 MariaRocks: post-merge fixes: trivial updates to a few test results 2017-03-12 12:17:48 +03:00
Sergei Petrunia
5c1c2f67ec Merge branch 'merge-myrocks' of github.com:MariaDB/mergetrees into bb-10.2-mariarocks
Manually resolved a few conflicts
2017-03-11 20:00:08 +00:00
Sergei Petrunia
65d01da29c Copy of
commit ba00e640f658ad8d0a4dff09a497a51b8a4de935
Author: Herman Lee <herman@fb.com>
Date:   Wed Feb 22 06:30:06 2017 -0800

    Improve add_index_alter_cardinality test

    Summary:
    Split add_index_inplace_cardinality test out and add a debug_sync point
    to it so that the flush of the memtable occurs while the alter is
    running.
    Closes https://github.com/facebook/mysql-5.6/pull/539

    Reviewed By: alxyang

    Differential Revision: D4597887

    Pulled By: hermanlee

    fbshipit-source-id: faedda2
2017-03-11 07:17:42 +03:00
Sergei Petrunia
fd39f25ca7 MariaRocks: fix compilation on Oracle Linux Server 7.3.
#define __STDC_FORMAT_MACROS. Unfortunately there is no single location
that would be #includ'ed before everything else. Have to put the #define
into each .cc file
2017-03-10 14:05:17 +03:00
Vladislav Vaintroub
e19f1dd61e Fix build on Windows.
Remove some GCC specific pragmas, use #ifdef __GNUC__ in other places.
Only use  pthread_setname_np on Linux.
Fix a mismerge
2017-03-07 14:11:19 +00:00
Sergei Petrunia
f9e63b7c59 MariaRocks port: __PRETTY_FUNCTION__ is a gcc extension. Use __func__ when it is not available
For example, on Windows.
2017-03-07 11:38:26 +03:00
Sergei Petrunia
48a5dd945b MariaRocks: fix compilation on kvm-rpm-centos7-amd64
Define __STDC_FORMAT_MACROS before using PRIu64.
RocksDB does this in many files
2017-03-07 11:08:41 +03:00
Sergei Petrunia
e7948e34ee Fix the previous cset: use a proper disabled.def syntax 2017-03-06 23:59:29 +03:00
Sergei Petrunia
f080c93dcd MariaRocks: (Temporarily?) disable MTR tests that run RQG 2017-03-06 14:50:14 +03:00
Sergei Petrunia
ea5cc017e9 Test fixes in rocksdb_sys_vars test suite
- Get the suite to work with dynamically-linked plugin (ha_rocksdb.so)
- Due to the push to keep everything MyRocks-related in storage/rocksdb,
  there is no mysql-test/include/have_rocksdb.* anymore.
  Make a copy of storage/rocksdb/mysql-test/rocksdb/include/have_rocksdb*,
  hopefully these files wont be changed [often].
- Maria-fication of rocksdb_persistent_cache_path test.
2017-02-21 16:49:18 +03:00
Sergei Petrunia
e57ab94cce Update rocksdb submodule to match the rocksdb version used in upstream
This change should have been a part of
    Merge 'merge-myrocks' into 'bb-10.2-mariarocks'

    Merged cset:
        Copy of

        commit d1bb19b8f751875472211312c8e810143a7ba4b6

We probably should make submodule info a part of the mergetree process.
2017-02-21 03:51:09 +03:00
Sergei Petrunia
7d00f0981e Merge between local changes bb-10.2-mariarocks and the merge from upstream 2017-02-20 13:01:32 +00:00
Sergei Petrunia
5e47d08eb6 Merge 'merge-myrocks' into 'bb-10.2-mariarocks'
Merged cset:
    Copy of

    commit d1bb19b8f751875472211312c8e810143a7ba4b6
    Author: Manuel Ung <mung@fb.com>
    Date:   Fri Feb 3 11:50:34 2017 -0800
    ...

        Add cardinality stats to information schema
2017-02-19 16:29:01 +00:00
Sergei Petrunia
7facbc548d MariaRocks: fix a few tests
Test suite parameters for 'rocksdb' test suite were disabled in order
to get mysqld to start at all when ha_rocksdb is a dynamic plugin.

A lot of tests depend on these parameters being enabled, though. Put
them back by using the loose- form.
2017-02-19 18:51:26 +03:00
Vladislav Vaintroub
de49fd842a RocksDB : Add lookup / compiling with optional compression libraries.
This change add WITH_ROCKSDB_{LZ4,BZIP2,ZSTD,snappy} CMake variables
that can be set to ON/OFF/AUTO.

If variable has default value AUTO, rocksdb links with corresponding
compression library. OFF disables compiling/linking with specific compression
library, ON forces compiling with it (cmake would throw error if library
is not available)

Support for ZLIB is added unconditionally, as it is always there.
2017-02-09 16:55:02 +00:00
Vicențiu Ciorbaru
241e8a15a2 Ignore "invisible" files 2017-02-07 22:15:11 +02:00
Vicențiu Ciorbaru
e2f3739aa1 Ignore dynamically generated build_version.cc file 2017-02-07 22:15:05 +02:00
Vicențiu Ciorbaru
f46176cbef Make rocksdb build with clang
We need to provide -fPIC for ROCKSDB files as well as -frtti if we
compile with Clang
2017-02-07 22:14:59 +02:00
Vicențiu Ciorbaru
840f8eab71 Make mysql_ldb work on clang 2017-02-07 22:14:52 +02:00
Vicențiu Ciorbaru
884fd9ac2b Make RocksDB run git submodule init and update if rocksdb is not fetched 2017-02-07 22:14:44 +02:00
Sergei Petrunia
7468ccfadf Copy of
commit d1bb19b8f751875472211312c8e810143a7ba4b6
Author: Manuel Ung <mung@fb.com>
Date:   Fri Feb 3 11:50:34 2017 -0800

    Add cardinality stats to information schema

    Summary: This adds cardinality stats to the INFORMATION_SCHEMA.ROCKSDB_INDEX_FILE_MAP table. This is the only missing user collected properties from SST files that we don't expose, which is useful for debugging cardinality bugs.

    Reviewed By: hermanlee

    Differential Revision: D4509156

    fbshipit-source-id: 2d3918a
2017-02-06 17:39:08 +00:00
Vladislav Vaintroub
5875633c2a MDEV-11901 : MariaRocks on Windows
fixed compilation, disabled unix-only tests (the ones that use bash
etc).

Changed plugin library name to ha_rocksdb.dll/so
2017-02-01 21:27:13 +00:00
Sergei Petrunia
13c7839ba7 MariaRocks port: Fix for the previous cset (MariaRocks port: put back the assert)
- Put back the assert on SQL layer at the right location
- Adjust rdb_pack_with_make_sort_key to work around the assert (like
  it is done at other palaces):  MyRocks may need to pack a column
  value even when the column is not in the read set.
2017-01-24 21:51:57 +03:00
Vicențiu Ciorbaru
555b1b9f15 Make rocksdb dynamic plugin 2017-01-24 09:27:15 +02:00
Vicențiu Ciorbaru
024a5ec0ec Add ut0counter.h instead of xtradb linked ut0counter.h 2017-01-23 21:32:11 +02:00
Sergei Petrunia
1f0c28f36e MariaRocks port: move include/atomic_stat.h into storage/rocksdb 2017-01-21 22:58:57 +03:00
Sergei Petrunia
7fb3b348d7 MariaRocks port: Remove handler::init_with_fields
- It turns out, ha_rocksdb::table_flags() can return
  HA_PRIMARY_KEY_IN_READ_INDEX for all kinds of tables (as its meaning
  is "if there is a PK, PK columns contribute to the secondary index
  tuple". There is no assumption that a certain PK column can be decoded
  from the secondary index.
  (Should probably be fixed in the upstream, too, but I was unable to
   construct a testcase showing this is necessary).

- Following the above, we can undo the init_with_fields() changes in
  table.cc. MyRocks calls init_with_fields() from ha_rocksdb::open()
  which sets index-only read capabilities properly.
2017-01-21 22:58:04 +03:00
Sergei Petrunia
2d789dd9dd MariaRocks: fix a few tests in rocksdb_sys_vars test suite 2017-01-11 22:29:34 +03:00
Sergei Petrunia
1a8731952d MariaRocks port: get rocksdb_sys_vars.rocksdb_deadlock_detect_basic to work 2017-01-11 19:40:25 +03:00
Sergei Petrunia
80be676fc0 MariaRocks port
- Use rocksdb_sys_vars/my.cnf so that one can run tests from that suite
  by just  "./mtr rocksdb_sys_vars.$TESTNAME"
- Add rocksdb and rocksdb_sys_vars to the set of default test suites.
  Don't run with embedded server, yet.
2017-01-11 17:32:47 +03:00
Sergei Petrunia
edfe980aa1 MariaRocks port: fix rocksdb.rpl_row_stats test
"Userstat" feature in MariaDB does not have
I_S.table_statistics.rows_requested column.

We'll use I_S.table_statistics.rows_read instead. The testcase
doesn't do anything where rows_requested != rows_read.
2017-01-11 13:14:52 +03:00
Sergei Petrunia
f89e07785a MariaRocks port: Get rocksdb.autoinc_vars_thread test to work
MariaDB doesn't have NO_CLEAR_EVENT support in DEBUG_SYNC facility.
Luckily, the test can be re-written to use two different sync points
instead. (I've checked that the modified test fails with fb/mysql-5.6
without the fix for e004fd9f (PR #394)
2017-01-11 12:41:22 +03:00
Sergei Petrunia
520d206365 MariaRocks port: get rocksdb.rocksdb_icp[_rev] to work
- Fix the test cases to not use userstat counters specific to
  facebook/mysql-5.6
- Make testcase also check MariaDB's ICP counters
- Remove ha_rocksdb::check_index_cond(), call handler_index_cond_check
  instead.
2017-01-08 18:29:14 +00:00
Sergei Petrunia
93d3a39ba9 MariaRocks port: fix rocksdb.rocksdb_row_stats test
Make rocksdb_rows_XXX counters to work
2017-01-07 19:43:27 +00:00
Sergei Petrunia
ebbe59fa33 MariaRocks port: fix rocksdb.bloomfilter3 test
In MySQL 5.6, QUICK_SELECT_DESC calls handler->set_end_range() to
inform the storage engine about the bounds of the range being scanned.

MariaDB doesn't have that (handler::set_end_range call was back-ported
but it is not called from QUICK_SELECT_DESC).
Instead, it got prepare_*scan() methods from TokuDB.

Implement these methods so that MyRocks has information about the range
end.
2017-01-07 16:03:47 +00:00
Sergei Petrunia
69d5ee58c6 MariaRocks port: Temporarily disable tests related to Gap Lock detector (MDEV-11735) 2017-01-06 23:36:23 +03:00
Sergei Petrunia
e3df50c4b9 MariaRocks port: fix rocksdb.table_stats
- Need to manually enable userstat
- MariaDB has a lot fewer columns in table_statistics table.
2017-01-03 00:21:04 +03:00
Sergei Petrunia
31b2237c68 Merge branch '10.2' of github.com:MariaDB/server into 10.2-mariarocks
and a few trivial test result updates
2017-01-02 21:09:31 +00:00
Sergei Petrunia
a597e0e164 MariaRocks port: fix tests
- rocksdb.tmpdir works (however @@rocksdb_tmpdir has no effect yet!)
- trx_info_rpl is only run in RBR mode
- type_char_indexes_collation now works
  = take into account that characters with the same weight can have
    any order after sorting (and they do in MariaDB)
  = MariaDB doesn't use index-only for extended keys that have partially-
    covered columns.
2017-01-02 22:50:35 +03:00
Sergei Petrunia
3ecd9e0bfc Post-merge fixes for rocksdb.add_index_inplace_crash 2017-01-02 00:15:45 +00:00
Sergei Petrunia
7c4ebec82d MariaRocks: trivial post-merge test fixes 2017-01-02 00:06:26 +00:00
Sergei Petrunia
302ec9ab26 Merge branch '10.2-mariarocks' of github.com:MariaDB/server into 10.2-mariarocks 2017-01-01 23:33:50 +00:00
Sergei Petrunia
d8288b306c Merge remote-tracking branch 'mergetrees/merge-myrocks' into 10.2-mariarocks 2017-01-01 23:33:18 +00:00
Sergei Petrunia
3e7e559150 Fix the "fatal error: mysqld_error.h: No such file or directory" compile error 2017-01-01 01:50:17 +03:00
Sergei Petrunia
cfb59f3196 Copy of
commit f6ed777697db4ad7aee1e98c53243dced2b5891c
Author: Chenyu Yan <seayan@outlook.com>
Date:   Thu Dec 29 16:10:25 2016 -0800

    Fix BIG_TIMEOUT constant

    Summary: Update the constant to reflect what the comments indicates.

    Reviewed By: gunnarku

    Differential Revision: D4374476

    fbshipit-source-id: dd7f484
2016-12-31 23:30:09 +03:00
Sergei Petrunia
ae0a490eb3 MariaRocks port: Remove ifdef in ha_rocksdb::set_skip_unique_check_tables
We expose @@rocksdb_skip_unique_check_tables anyway, so it's not
really disabled.
2016-12-31 22:08:05 +03:00
Sergei Petrunia
d1af31b3c2 MariaRocks port: Make rocksdb_sys_vars suite pass
- Fix include paths, add suite.opt
- Add a test for @@rocksdb_supported_compression_types
Now all tests pass, except rocksdb_sysvars.rocksdb_rpl_skip_tx_api_basic
2016-12-31 21:31:50 +03:00
Sergei Petrunia
d379963d73 MariaRocks port: remove target_lsn parameter of rocksdb_flush_wal
- It's from a webscalesql feature that we dont have
- MyRocks ignores it anyway
2016-12-30 02:18:56 +03:00
Sergei Petrunia
9ca608028f MariaRocks port: make rocksdb.rocksdb_qcache test pass 2016-12-27 00:13:32 +00:00
Sergei Petrunia
8f2d58b26b MariaRocks port: run rocksdb.rpl_row_stats with binlog_format=row only
The test still fails but at least we do not try to run it with
wrong binlog_format.
2016-12-26 22:31:46 +03:00
Sergei Petrunia
122bc4b54c MariaRocks port: Remove ifdef MARIAROCKS_NOT_YET in rocksdb_start_tx_and_assign_read_view
Looked though the code: MariaDB's method of doing START TRANSACTION
WITH CONSISTENT SNAPSHOT doesn't require mysql_bin_log_lock_commits
calls.
2016-12-26 19:12:16 +00:00
Sergei Petrunia
9f7dc2bbf5 MariaRocks port: make rocksdb.rpl_savepoint pass
Run it only with binlog_format=row, update test result
2016-12-15 20:56:27 +03:00
Sergei Petrunia
24224839d8 MariaRocks port: make rocksdb.rpl_statement_not_found work 2016-12-15 19:25:32 +03:00
Sergei Petrunia
0d3d2a5747 MariaRocks port: mark rocksdb.rpl_statement to be run only in statement mode. 2016-12-15 16:11:22 +03:00
Sergei Petrunia
73c702eae5 MariaRocks port: fix rocksdb.rpl_row_rocksdb test
The 'combinations' system in MTR ignores settings from $testname.cnf,
and tries to run RBR test with binlog_format=mixed.

Fixed by using "source include/have_binlog_format_row.inc" which tells
MTR to only run the test with binlog_format=ROW.
The test still needs its $testname.cnf to include suite/rpl/my.cnf. This
is necessary to setup replication

(Using "source include/master-slave.inc" will have MTR set up replication
for the test, but only as long as the testsuite doesn't have its own
suite/rocksdb/my.cnf.  We do have that file (and it doesn't set up
replication), so we need to have $testname.cnf to setup replication).
2016-12-15 15:34:56 +03:00
Sergei Petrunia
8e2cfde953 MariaRocks port: fix rocksdb.collation, rocksdb.collation_exception
- port Regex_list_handler from facebook/mysql-5.6/sql/handler.cc
  put it into a separate file in storage/rocksdb directory

- Adjust the build process so that the main library is build with
  Regex_list_handler (which has dependencies on the server),
  while RocksDB tools are built without it.

- Un-comment @@rdb_collation_exceptions handling in ha_rocksdb.cc
- Also adjust rocksdb_set_collation_exception_list() to free the
  old variable value and alloc the new one.
2016-12-04 23:55:54 +03:00
Sergei Petrunia
34b66fcc98 MariaRocks port: get rocksdb.locking_issues test to work
Also update test results (MariaDB's dialect changes)
2016-12-04 14:27:10 +00:00
Sergei Petrunia
7b708ee3ed MDEV-11329: MariaRocks: rocksdb.add_index_inplace fails
- Make ha_rocksdb::check_if_supported_inplace_alter() take into
  account the Alter_inplace_info::ALTER_PARTITIONED flag

- Adjust the testcase to work in MariaDB
2016-12-04 09:28:51 +00:00
Sergei Petrunia
05a593dfc9 MariaRocks: temporary disable read-free replication
Making read-free replication to work is filed as MDEV-10976
2016-12-04 08:28:34 +00:00
Sergei Petrunia
81c05c5931 MariaRocks port: disable rocksdb.select_for_update_skip_locked_nowait 2016-12-03 20:56:40 +00:00
Sergei Petrunia
9a49210ec3 MariaRocks port: disable rocksdb.slwo_query_log test (MDEV-11480) 2016-12-03 20:37:45 +00:00
Sergei Petrunia
aecc95a15c MariaRocks port: fix rocksdb.autoinc_vars 2016-12-03 18:29:36 +00:00
Sergei Petrunia
044ad5d3d9 MariaRocks port: make rocksdb.show_table_status test pass
The test relies on having userstat enabled, which is not ON
by default in MariaDB.
2016-12-03 18:17:21 +00:00
Sergei Petrunia
4f90605a3d MariaRocks port: make datetime-aware tests work in any timezone
This fixes
- rocksdb.col_opt_not_null
- rocksdb.col_opt_null
- rocksdb.type_date_time
2016-12-03 14:56:38 +00:00
Sergei Petrunia
00e3869a66 MariaRocks port: get rocksdb.checksum_table to work
MariaDB has a different checksumming algorithm. Old one
can be used by setting @@old=1
2016-12-03 14:00:23 +00:00
Sergei Petrunia
8018bb737c MariaRocks port: use correct MTR command separators
Failure to do so caused the command not to be run, and test failed
2016-12-03 12:52:34 +00:00
Sergei Petrunia
b504c56bff MariaRocks: test result MariaDB-fication
The test stopped giving deadlock errors after the previous cset.
2016-12-03 12:46:05 +00:00
Sergei Petrunia
e6afa256e7 MariaRocks port: Make ha_rocksdb::index_flags() return HA_CLUSTERED_INDEX for PK
Failure to do so caused a failure in rocksdb.rocksdb test.
When test_if_cheaper_ordering computes is_covering= ...,
- MySQL calls table->file->primary_key_is_clustered()
- MariaDB calls (table->file->index_flags(nr, 0, 1) &
                          HA_CLUSTERED_INDEX)

The first produces true, the second used to produce false.
2016-12-03 12:42:30 +00:00
Sergei Petrunia
0d5257215a MariaRocks port: update test results 2016-12-03 06:21:31 +00:00
Sergei Petrunia
ec58a1cca8 MariaRocks port: update test results
MariaDB produces warnings when INSERT IGNORE hits a duplicate (this
was introduced in MEV-5168)
2016-12-03 06:17:57 +00:00
Sergei Petrunia
d903396c18 MDEV-11321: MariaRocks: type_binary_indexes, type_blob_indexes fail
... due to different index statistics
Make statistics calculations in MariaRocks produce the same values
that MyRocks produces.

Added a comment in rdb_datadic.cc
2016-12-02 21:08:08 +00:00
Sergei Petrunia
7f43f736ac MDEV-11477: MariaRocks: rocksdb.type_varchar failure
Update the test results (checked)
2016-12-02 20:53:08 +00:00
Sergei Petrunia
097bd3049c MariaRocks port: update test results
- EXPLAIN result differences are due to MariaDB's MDEV-11172
- Don't print the value of rocksdb_supported_compression_types
  to .result file
- The rest is trivial Maria-fication
2016-12-02 20:49:10 +00:00
Sergei Petrunia
9c083cd355 MariaRocks port: update test result for rocksdb.rocksdb_parts
- EXPLAIN is different
- error message is
- the output order is different, because MySQL knows when to use
  ha_partition::handle_unordered_scan_next_partition.
  Reading the table data without any ordering happens to produce
  MariaDB uses  ha_partition::handle_ordered_index_scan for this index
  scan (this is a deficiency), which causes it to produce the row with
  pk=1 first.


  MariaDB uses
2016-12-02 17:25:51 +00:00
Sergei Petrunia
59d76665ee MariaRocks port: Return correct value of HA_PRIMARY_KEY_IN_READ_INDEX flag
This cset just re-uses the approach from facebook/mysql-5.6 (Perhaps we
will have something different for MariaDB in the end).

For now this is:
Port this fix
  dd7eeae69503cb8ab6ddc8fd9e2fef451cc31a32
  Issue#250: MyRocks/Innodb different output from query with order by on table with index and decimal type
  Summary:
  Make open_binary_frm() set TABLE_SHARE::primary_key before it computes

Also add the patch for
  https://github.com/facebook/mysql-5.6/issues/376
2016-12-02 15:35:36 +00:00
Sergei Petrunia
f2219fe94d MDEV-11462: MariaRocks: rocksdb.type_float_indexes fails
Also do similar result updates for:
- rocksdb.type_date_time_indexese
- rocksdb.type_fixed_indexes
2016-12-02 13:59:31 +00:00
Sergei Petrunia
9668b705f9 MDEV-11462: MariaRocks: rocksdb.type_float_indexes fails
Upadte test results (see jira entry for investigation about
the source of the differences)
2016-12-02 13:52:12 +00:00
Sergei Petrunia
3876f461a8 MariaRocks port: MDEV-11318: rocksdb.rocksdb test fails
- MariaDB produces a warning instead of error when the key
  length is too long
- Trivial test results updates
- rocksdb.rocksdb still fails but this commit makes some progress.
2016-11-20 20:54:36 +00:00
Sergei Petrunia
a4c1b5bba8 MariaRocks port: make rocksdb.alter_table work
The warning
"ORDER BY ignored as there is a user-defined clustered index in the table 't1'
was missing.

The reason is different condition in copy_data_between_tables():
MariaDB has a change, it uses

  to->file->ha_table_flags() & HA_TABLE_SCAN_ON_INDEX

while MySQL uses:

  to->file->primary_key_is_clustered()).

For some reason, MyRocks didn't have HA_TABLE_SCAN_ON_INDEX flag.
It should have one, will raise that with upstream, too.
2016-11-18 23:18:56 +00:00
Sergei Petrunia
c12a1bb9c2 MariaRocks port: more testcase fixes
rocksdb.lock: LOCK TABLE t1 LOW_PRIORITY WRITE does not produce a
  warining in MariaDB

rocksdb.unique_check:
- MariaDB's mtr prints connection actions
- New (but temporary) ER_LOCK_WAIT_TIMEOUT text

rocksdb.allow_pk_no_concurrent_insert:
- Fix path

rocksdb.locking_issues
- Fix path
- The test still fails but for a different reason now
2016-11-18 21:08:44 +00:00
Sergei Petrunia
e370d0a9ae MariaRocks port: Make rocksdb.compression_zstd test skip itself when ZSTD is not supported
- Introduce @@rocksdb_supported_compression_types read-only variable.
  It has a comma-separated list of compiled-in compression algorithms.

- Make rocksdb.compression_zstd test skip itself when ZSTD support
  is not compiled in
2016-11-13 18:31:09 +00:00