Commit graph

511 commits

Author SHA1 Message Date
Nikita Malyavin
e25623e78a MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed
The assertion failed in handler::ha_reset upon SELECT under
READ UNCOMMITTED from table with index on virtual column.

This was the debug-only failure, though the problem is mush wider:
* MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw
 bitmap.
* read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP
* The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE
* The pointers to the stored MY_BITMAPs, like orig_read_set etc, and
 sometimes all_set and tmp_set, are assigned to the pointers.
* Sometimes tmp_use_all_columns is used to substitute the raw bitmap
 directly with all_set.bitmap
* Sometimes even bitmaps are directly modified, like in
TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called.

The last three bullets in the list, when used together (which is mostly
always) make the program flow cumbersome and impossible to follow,
notwithstanding the errors they cause, like this MDEV-17556, where tmp_set
pointer was assigned to read_set, write_set and vcol_set, then its bitmap
was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call,
and then bitmap_clear_all(&tmp_set) was applied to all this.

To untangle this knot, the rule should be applied:
* Never substitute bitmaps! This patch is about this.
 orig_*, all_set bitmaps are never substituted already.

This patch changes the following function prototypes:
* tmp_use_all_columns, dbug_tmp_use_all_columns
 to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map*
* tmp_restore_column_map, dbug_tmp_restore_column_maps to accept
 MY_BITMAP* instead of my_bitmap_map*

These functions now will substitute read_set/write_set/vcol_set directly,
and won't touch underlying bitmaps.
2021-01-08 16:04:29 +10:00
Sergei Petrunia
ceef26cf86 MyRocks: Bare Windows compatibility: use rmdir built-in, not "rm -rf" 2020-11-17 15:49:36 +03:00
Sergei Petrunia
8c2909a2a4 Fix a typo in the previous cset 2020-09-04 09:12:27 +00:00
Sergei Petrunia
d63fcbc2f0 MDEV-23661: RocksDB produces "missing initializer for member" warnings
Add -Wno-missing-field-initializers for MyRocks and gcc version below 5.0
2020-09-03 15:26:55 +00:00
Andrei Elkin
a19cb3884f MDEV-23511 shutdown_server 10 times out, causing server kill at shutdown
Shutdown of mtr tests may be too impatient, esp on CI environment where
10 seconds of `arg` of `shutdown_server arg` may not be enough for the clean
shutdown to complete.

This is fixed to remove explicit non-zero timeout argument to
`shutdown_server` from all mtr tests. mysqltest computes 60 seconds default
value for the timeout for the argless `shutdown_server` command.
This policy is additionally ensured with a compile time assert.
2020-08-21 14:48:53 +03:00
Daniel Black
940668f5cb MDEV-23137: aarch64, postfix - cmake include 2020-07-28 19:53:19 +10:00
Daniel Black
cae4b3f811 rocksdb: FreeBSD disable jemalloc search
FreeBSD's inbuilt default jemalloc means its pointless
to do a package search on it. The paths are already set
by the system defaults.
2020-07-28 10:49:47 +10:00
Daniel Black
715beee46a MDEV-23051: riscv64 fails build (atomics)
riscv64 fails to build because the use
of #include <atomic> needs to link with -latomic.

per https://github.com/riscv/riscv-gnu-toolchain/issues/183#issuecomment-253721765
2020-07-28 10:13:45 +10:00
Krunal Bauskar
d88ea26088 MDEV-23137: RocksDB: undefined reference to crc32c_arm64
RocksDB fails to build on arm64: undefined reference to
            `crc32c_arm64(unsigned int, unsigned char const*, unsigned int)'

MariaDB uses storage/rocksdb/build_rocksdb.cmake to compile RocksDB.
Said cmake missed adding crc32c_arm64 compilation target so if
machine native architecture supported crc32 then complier would enable
usage of function defined in crc32c_arm64 causing the listed error.

Added crc32c_arm64 complition target.

closes #1642
2020-07-28 10:06:29 +10:00
Daniel Black
186d9d0d72 MDEV-12474: rocksdb: mtr - rocksdb.concurrent_alter use sh
FreeBSD doesn't have bash installed by default and sh
has sufficient job control for this test.

$  mysql-test/mtr --mem --max-test-fail=30 --force --parallel=1 rocksdb.concurrent_alter
Logging: /home/dan/mariadb-server-10.5/mysql-test/mysql-test-run.pl  --mem --max-test-fail=30 --force --parallel=1 rocksdb.concurrent_alter
vardir: /usr/home/dan/build-mariadb-server-10.5/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/usr/home/dan/build-mariadb-server-10.5/mysql-test/var'...
 - symlinking 'var' to '/tmp/var_auto_P81m'
Checking supported features...
MariaDB Version 10.5.4-MariaDB
 - SSL connections supported

 - binaries built with wsrep patch
Collecting tests...
Installing system database...

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
rocksdb.concurrent_alter 'write_committed' [ pass ]  16348
rocksdb.concurrent_alter 'write_prepared' [ pass ]  16771
--------------------------------------------------------------------------
The servers were restarted 1 times
Spent 33.119 of 41 seconds executing testcases

Completed: All 2 tests were successful.

$ uname -a
FreeBSD freebsd 12.1-RELEASE-p6 FreeBSD 12.1-RELEASE-p6 GENERIC  amd64
2020-07-28 09:02:29 +10:00
Sergei Golubchik
cceb965a79 Revert "MDEV-12445 : Rocksdb does not shutdown worker threads and aborts in memleak check on server shutdown"
This reverts commit 6f1f911497.

because it doesn't do anything now (the server doesn't check
my_disable_leak_check) and it never did anything before
(because without `extern` it simply created a local instance of
my_disable_leak_check, did not affect server's my_disable_leak_check).
2020-05-27 15:56:40 +02:00
Sergei Golubchik
6af37ba881 fix rocksdb zstd detection
WITH_ROCKSDB_ZSTD must use the same capitalization as
in the foreach loop
2020-05-27 15:56:40 +02:00
Sergei Golubchik
d565895bbd fix rocksdb compression detection
cmake module name is BZip2, not BZIP2.
variable names are WITH_ROCKSDB_zstd and WITH_ROCKSDB_snappy.
it's SNAPPY_FOUND in older cmake (and both in newer cmake).
also, make it verbose.
2020-04-08 11:22:37 +02:00
Oleksandr Byelkin
cb4da5da74 MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error
Added indication of truncated string for "s" and "M" formats
2020-04-01 11:34:32 +02:00
Vladislav Vaintroub
82b3f1a80f MDEV-21930 RocksDB does not compile anymore, with Visual Studio
Update submodule, change the source file list
rename CACHE_LINE_SIZE in ut0counter, so it does not conflics with
rocksdb sources, which also defines this constant now.
2020-03-23 11:25:01 +01:00
Sergei Golubchik
0d70f40bdb Disable -Werror for rocksdb submodule
We cannot have -Werror for third-party submodules because
whenever they break the build we cannot fix it as needed.
2019-12-17 21:22:57 +01:00
Marko Mäkelä
2931fd2917 After-merge fix: Adjust a result 2019-09-23 09:04:51 +03:00
Marko Mäkelä
bb4214272a Merge 10.1 into 10.2 2019-09-18 16:24:48 +03:00
Sergei Petrunia
be6beb73e9 MDEV-16560: [counter] rocksdb.ttl_secondary_read_filtering fail in buildbot
It is not reproducible, but the issue seems to be the same as with
MDEV-20490 and rocksdb.ttl_primary_read_filtering - a compaction caused
by DROP TABLE gets behind and compacts away the expired rows for the next
test. Fix this in the same way.
2019-09-11 23:05:12 +03:00
Sergei Golubchik
2480f6b7ff don't run RocksDB suites by default 2019-09-06 16:35:56 +02:00
Sergei Petrunia
41e351f608 MDEV-20490: rocksdb.ttl_primary_read_filtering fails in BB
Make the test stable: after DROP TABLE, make sure the compaction is
run and finishes.

If we don't do this, the post-drop compaction may run during the next
testcase. It will cause a record from the next testcase to be compacted
away when the test logic doesn't expect it and the test will fail
2019-09-05 17:43:13 +03:00
Monty
9cba6c5aa3 Updated mtr files to support different compiled in options
This allows one to run the test suite even if any of the following
options are changed:
- character-set-server
- collation-server
- join-cache-level
- log-basename
- max-allowed-packet
- optimizer-switch
- query-cache-size and query-cache-type
- skip-name-resolve
- table-definition-cache
- table-open-cache
- Some innodb options
etc

Changes:
- Don't print out the value of system variables as one can't depend on
  them to being constants.
- Don't set global variables to 'default' as the default may not
  be the same as the test was started with if there was an additional
  option file. Instead save original value and reset it at end of test.
- Test that depends on the latin1 character set should include
  default_charset.inc or set the character set to latin1
- Test that depends on the original optimizer switch, should include
  default_optimizer_switch.inc
- Test that depends on the value of a specific system variable should
  set it in the test (like optimizer_use_condition_selectivity)
- Split subselect3.test into subselect3.test and subselect3.inc to
  make it easier to set and reset system variables.
- Added .opt files for test that required specfic options that could
  be changed by external configuration files.
- Fixed result files in rockdsb & tokudb that had not been updated for
  a while.
2019-09-01 19:17:35 +03:00
Sergei Petrunia
1688a22612 MDEV-18384: rocksdb.index_merge_rocksdb2 test fails
Merge the changes to include/index_merge*inc from the upstream. The changes
add this command in many places:

 +if ($engine_type == RocksDB)
 +{
 +    set global rocksdb_force_flush_memtable_now=1;
 +}

also add it in one more place to make the test truly stable.
2019-08-30 14:13:00 +03:00
Sergei Petrunia
65296123d0 MDEV-12439: MariaRocks produces numerous (spurious?) valgrind failures
Enable the rocksdb test suite. It now passes the valgrind tests.
2019-08-13 16:37:21 +03:00
Sergei Petrunia
a18d1cc777 MDEV-20315: MyRocks tests produce valgrind failures (Backport to 10.2)
- Include the valgrind suppressions from the FB upstream

- Use HAVE_Valgrind, not HAVE_Purify (like the rest of MariaDB code does)
  The call to DisownData() is now actually disabled under Valgrind
2019-08-13 16:26:17 +03:00
Sergei Petrunia
3b234104ae MDEV-16955: rocksdb_sys_vars.rocksdb_update_cf_options_basic
... produces "bytes lost" warnings

When rocksdb_validate_update_cf_options() returns an error,
the update won't happen.
Free the copy of the string in this case.
2019-08-10 01:46:50 +03:00
Monty
6765cc6077 Fixed assertion Assertion `!table->pos_in_locked_tables' failed
MDEV-17717
Assertion `!table->pos_in_locked_tables' failed in tc_release_table on
flushing RocksDB table under SERIALIZABLE
MDEV-17998
Deadlock and eventual Assertion `!table->pos_in_locked_tables' failed
in tc_release_table on KILL_TIMEOUT
MDEV-19591
Assertion `!table->pos_in_locked_tables' failed in tc_release_table upon
altering table into S3 under lock.

The problem was that thd->open_tables->pos_in_locked_tables was not reset
when alter table failed to reopen a locked table.
2019-08-08 23:08:23 +03:00
Sergei Petrunia
988ff90256 MDEV-20227: rocksdb.rocksdb_concurrent_delete fails on windows
A combination of:
* lots of include'd test files where each has "--source
  include/have_rocksdb.inc"
* for each such occurrence, MTR adds testsuite's arguments into server
  arguments
* which hits some limit on the length of argv array on Windows, causing
  the server to get garbage data in the last argument.

Work around this by commenting out one of the totally redundant
"source include/have_rocksdb.inc" lines.
2019-08-04 23:37:47 +03:00
Sergei Petrunia
09a85692a6 Post-merge fixes for rocksdb.group_min_max test
- Fix the LooseScan code to support storage engines that return
  HA_ERR_END_OF_FILE if the index scan goes out of provided range
  bounds
- Add a DBUG_EXECUTE_IF("force_group_by",...) to allow a test to
  force a LooseScan
- Adjust rocksdb.group_min_max test not to use features not present
  in MariaDB 10.2 (e.g. optimizer_trace.  In MariaDB 10.4 it's present
  but it doesn't meet the  assumptions that the test makes about it
- Adjust the test result file:
  = MariaDB doesn't support "Enhanced Loose Scan" that FB/MySQL has
  = MariaDB has different cost calculations.
2019-08-04 17:25:17 +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
Sergei Petrunia
731ef75175 MDEV#20107: rocksdb.check_ignore_unknown_options fails on OS X again
Make it to work on Windows, too.
2019-07-19 21:24:28 +03:00
Sergei Petrunia
8ec4aa4b6b MDEV#20107: rocksdb.check_ignore_unknown_options fails on OS X again
Rewrite the unportable sed/shell code in Perl.
2019-07-19 18:22:32 +03:00
Sergei Petrunia
52f6aa1c54 Disable rocksdb_rpl.rpl_gtid_crash_safe_optimized
It uses slave_gtid_info=optimized which is not supported in MariaDB
2019-07-16 18:42:19 +03:00
Sergei Petrunia
a2dc3b9461 Disable rocksdb_rpl.optimize_myrocks_replace_into
It requires @@enable_blind_replace which MariaDB doesn't support
2019-07-16 17:16:59 +03:00
Sergei Petrunia
e9a1918376 Disable rocksdb.rpl_row_not_found
It requires slave_exec_mode='SEMI_STRICT'
2019-07-16 16:50:05 +03:00
Sergei Petrunia
612f4908d2 rocksdb.unique_check: attempt to remove race condtitions from the test 2019-07-16 12:23:52 +03:00
Sergei Petrunia
143fede177 Disable rocksdb.force_shutdown, rocksdb.shutdown is fine
Fix this patch (two csets before):
  Disable rocksdb.shutdown test

  It was introduced by this patch in fb/mysql-5.6:
  Author: Yoshinori Matsunobu <yoshinori@fb.com>
  Date:   Mon Jun 10 14:09:28 2019 -0700

      Extending SHUTDOWN query to support read_only/aborting

      Summary:
      This diff extends SHUTDOWN query to support the following
      features.
      - Aborting with any specified exit code (range is 0..255).
      If nothing is specified or 0 is given, it does default clean
      shutdown. If 1+ is given, exits with the given error code
      immediately. This is helpful to shutting down instance
      even if it is stuck somewhere.

   MariaDB doesn't support SHUTDOWN statement or have any other way
   to exit the server process.
2019-07-16 11:10:59 +03:00
Sergei Petrunia
537893b072 Fix rocksdb.tbl_opt_data_index_dir on a mac
Part #2: also replace error text in SHOW WARNINGS
2019-07-16 11:07:46 +03:00
Sergei Petrunia
d2f094d9e6 Disable rocksdb.shutdown test
It was introduced by this patch in fb/mysql-5.6:
Author: Yoshinori Matsunobu <yoshinori@fb.com>
Date:   Mon Jun 10 14:09:28 2019 -0700

    Extending SHUTDOWN query to support read_only/aborting

    Summary:
    This diff extends SHUTDOWN query to support the following
    features.
    - Aborting with any specified exit code (range is 0..255).
    If nothing is specified or 0 is given, it does default clean
    shutdown. If 1+ is given, exits with the given error code
    immediately. This is helpful to shutting down instance
    even if it is stuck somewhere.

MariaDB doesn't support SHUTDOWN statement or have any other way
to exit the server process.
2019-07-15 22:50:18 +03:00
Sergei Petrunia
1da844124d Fix rocksdb.tbl_opt_data_index_dir on a mac 2019-07-15 12:26:13 +03:00
Sergei Petrunia
b3bd51c992 Fix rocksdb.autoinc_vars_thread test 2019-07-15 00:50:46 +03:00
Sergei Petrunia
9ccbe8d581 Fix intermittent test failure in rocksdb.rocksdb_cf_per_partition
was getting rows=2 instead of 1 on kvm-rpm-centos74-amd64
2019-07-14 11:25:24 +03:00
Sergei Petrunia
fbbc2354c8 MDEV-14455: rocksdb.2pc_group_commit failed in buildbot
Use RocksDB debug sync points to introduce a sync delay. This
commits to get grouped even when the datadir is on ramdisk.

For some unclear reason the effect is visible on write_prepared
but not write_committed, so run the test only with write_prepared.
2019-07-12 21:41:01 +03:00
Sergei Petrunia
9abdf11ed1 Update RocksDB the revision that fixes the compile error on power8 2019-07-07 18:17:17 +03:00
Sergei Petrunia
c17b0b734c MDEV-19936: MyRocks: compile fails on Windows
(Cumulative diff, back-port to 10.2)
Remove other unneeded files which cause compile
warnings-treated-as-errors errors on Windows.
2019-07-04 00:53:07 +03:00
Marko Mäkelä
24403da91a Remove unused const TABLE_HASH_SIZE 2019-07-03 14:42:04 +03:00
Robert Bindar
666730ee52 Fix gcc-8 warning in rocksdb 2019-07-03 14:32:24 +03:00
Sergei Petrunia
7345c0de26 Fix tests: some build hosts have ramdisk in /run/shm instead of /dev/shm 2019-06-20 21:34:15 +03:00
Sergei Petrunia
622ecfc7c6 Update test results 2019-06-20 19:35:36 +03:00
Sergei Petrunia
a2e9e3fbd4 MyRocks: dont show read-Free replication variables
MariaDB doesn't support Read-Free replication, so showing them only causes
confusion.
Removed variables:
- @@rocksdb_read_free_rpl
- @@rocksdb_read_free_rpl_tables
2019-06-20 15:29:17 +03:00