Commit graph

65 commits

Author SHA1 Message Date
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
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 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
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
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
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
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
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
Vicențiu Ciorbaru
024a5ec0ec Add ut0counter.h instead of xtradb linked ut0counter.h 2017-01-23 21:32:11 +02: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
d8288b306c Merge remote-tracking branch 'mergetrees/merge-myrocks' into 10.2-mariarocks 2017-01-01 23:33:18 +00: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
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
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
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
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
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
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
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
Sergei Petrunia
997c86c76c MariaRocks port: fix rocksdb.handler_basic test
MySQL has each storage engine to increment Handler_XXX counters,
while MariaDB has handler::ha_XXX() methods to do the increments.

MariaDB's solution doesn't work for storage engines that implement
handler::read_range_first(), though.
Make ha_rocksdb::read_range_first increment the counter (when it is
calling handler::ha_XXX() function that will)
2016-10-30 21:07:16 +00:00
Sergei Petrunia
15f2bcfa94 MariaRocks port: get rid of "invalid table name" in the error log
filename_to_tablename() in MariaDB produces warnings when its is
called for temporary file names.
Don't call this function for temporary filename (as we don't need
its result anyway)
2016-10-29 00:30:01 +00:00
Sergei Petrunia
fd4e83eb32 MariaRocks port: update ha_rocksdb::delete_all_rows() to match the definition in class handler 2016-10-21 21:27:23 +00:00
Sergei Petrunia
e22b271b39 MariaRocks port: compilation fixes 2016-10-21 21:11:47 +00:00
Sergei Petrunia
86d963eb08 MariaRocks port: provide timeout_message()
Also, ER_LOCK_WAIT_TIMEOUT error doesn't have a string parameter
in MariaDB.
2016-10-21 20:05:40 +00:00
Sergei Petrunia
8c5912e9ee MariaRocks port: temporarily disable gap lock checking
Also provide handler::is_using_full_key
2016-10-19 14:27:43 +00:00
Sergei Petrunia
fe0b57dfbe MariaRocks port: disable more code that synchronizes with the binlog 2016-10-19 13:16:51 +00:00
Sergei Petrunia
085fa3e4bc MariaRocks port: rli_slave is called rgi_slave in MariaDB. 2016-10-19 12:15:59 +00:00
Sergei Petrunia
e951fd17e8 MariaRocks port: make rocksdb_flush_wal() match handlerton::flush_logs definition
The original parameter comes from
commit a869c56d361bb44f46c0efeb11a8f03561676247
write/sync redo log before flushing binlog cache to file

we've already disabled some of that patch in
8cde1d449a
2016-10-19 12:00:22 +00:00
Sergei Petrunia
960fbc38d6 MariaRocks port: temporarily? disable "CONSISTENT INNODB|ROCKSDB SNAPSHOT" feature
cset
c2b8ced16e255ffdbcc1e638ac8dd4f398eb1a93
Implement START TRANSACTION WITH CONSISTENT INNODB SNAPSHOT
2016-10-17 16:53:20 +00:00
Sergei Petrunia
0a132ae7a2 MariaRocks: disable more of my_io_perf_t usage 2016-10-16 18:38:34 +00:00
Sergei Petrunia
9b78cd3cac MariaRocks port: MariaDB doesn't support SHOW ENGINE ROCKSDB TRANSACTION STATUS
Should we start supporting it?
2016-10-16 18:02:28 +00:00
Sergei Petrunia
c6dee75759 MariaRocks: MariaDB doesnt support ICP over backwards index scans yet 2016-10-16 14:34:46 +00:00
Sergei Petrunia
54295beee2 MariaRocks port: compare_key_icp() is called compare_key2() in MariaDB 2016-10-16 14:28:22 +00:00
Sergei Petrunia
8cde1d449a MariaRocks port: disable thd_store_lsn() call
It is from "write/sync redo log before flushing binlog cache to file"
feature that MariaDB doesn't have (or need?)
2016-10-16 14:16:58 +00:00
Sergei Petrunia
1dead2d213 MariaRocks port: MariaDB has no "ASYNC_COMMIT" feature
adjust a few function definitions accordingly
2016-10-16 14:06:25 +00:00
Sergei Petrunia
27adea907b MariaRocks port: temporarily disable rdb_collation_exceptions
Then Regex_list_handler is not needed and we don't have to backport
it right now.
2016-10-16 12:30:51 +00:00
Sergei Petrunia
7eef3de1ae MariaRocks port: In MariaDB, there's no Field_longlong::PACK_LENGTH
And the code in ha_rocksdb.cc makes assumptions about hidden pk length
being 8, anyway.
2016-10-16 11:56:14 +00:00