Commit ebfc4e6a authored by Sergei Petrunia's avatar Sergei Petrunia

Initial commit,

copy of
commit 86587affafe77ef555f7c3839839de44f0f203f3
Author: Tian Xia <tianx@fb.com>
Date:   Tue Oct 4 10:01:52 2016 -0700

    Allow filtering of show commands through admission control
parents
# TODO: Copyrights
IF (NOT EXISTS "${CMAKE_SOURCE_DIR}/rocksdb/Makefile")
MESSAGE(SEND_ERROR "Missing Makefile in rocksdb directory. Try \"git submodule update\".")
ENDIF()
# get a list of rocksdb library source files
# run with env -i to avoid passing variables
EXECUTE_PROCESS(
COMMAND env -i ${CMAKE_SOURCE_DIR}/storage/rocksdb/get_rocksdb_files.sh
OUTPUT_VARIABLE SCRIPT_OUTPUT
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
# split the list into lines
STRING(REGEX MATCHALL "[^\n]+" ROCKSDB_LIB_SOURCES ${SCRIPT_OUTPUT})
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/rocksdb
${CMAKE_SOURCE_DIR}/rocksdb/include
${CMAKE_SOURCE_DIR}/rocksdb/third-party/gtest-1.7.0/fused-src
)
ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DOS_LINUX
-DZLIB)
SET(ROCKSDB_SOURCES
ha_rocksdb.cc ha_rocksdb.h ha_rocksdb_proto.h
logger.h
rdb_comparator.h
rdb_datadic.cc rdb_datadic.h
rdb_cf_options.cc rdb_cf_options.h
rdb_cf_manager.cc rdb_cf_manager.h
properties_collector.cc properties_collector.h
event_listener.cc event_listener.h
rdb_i_s.cc rdb_i_s.h
rdb_index_merge.cc rdb_index_merge.h
rdb_perf_context.cc rdb_perf_context.h
rdb_mutex_wrapper.cc rdb_mutex_wrapper.h
rdb_sst_info.cc rdb_sst_info.h
rdb_utils.cc rdb_utils.h rdb_buff.h
rdb_threads.cc rdb_threads.h
${ROCKSDB_LIB_SOURCES}
)
IF(WITH_FB_TSAN)
SET(PIC_EXT "_pic")
ELSE()
SET(PIC_EXT "")
ENDIF()
SET(rocksdb_static_libs )
IF (NOT "$ENV{WITH_SNAPPY}" STREQUAL "")
SET(rocksdb_static_libs ${rocksdb_static_libs}
$ENV{WITH_SNAPPY}/lib/libsnappy${PIC_EXT}.a)
ADD_DEFINITIONS(-DSNAPPY)
ELSE()
SET(rocksdb_static_libs ${rocksdb_static_libs} snappy)
ENDIF()
IF (NOT "$ENV{WITH_LZ4}" STREQUAL "")
SET(rocksdb_static_libs ${rocksdb_static_libs}
$ENV{WITH_LZ4}/lib/liblz4${PIC_EXT}.a)
ADD_DEFINITIONS(-DLZ4)
ELSE()
SET(rocksdb_static_libs ${rocksdb_static_libs} lz4)
ENDIF()
IF (NOT "$ENV{WITH_BZ2}" STREQUAL "")
SET(rocksdb_static_libs ${rocksdb_static_libs}
$ENV{WITH_BZ2}/lib/libbz2${PIC_EXT}.a)
ADD_DEFINITIONS(-DBZIP2)
ELSE()
SET(rocksdb_static_libs ${rocksdb_static_libs} bz2)
ENDIF()
# link ZSTD only if instructed
IF (NOT "$ENV{WITH_ZSTD}" STREQUAL "")
SET(rocksdb_static_libs ${rocksdb_static_libs}
$ENV{WITH_ZSTD}/lib/libzstd${PIC_EXT}.a)
ADD_DEFINITIONS(-DZSTD)
ENDIF()
SET(rocksdb_static_libs ${rocksdb_static_libs} ${ZLIB_LIBRARY} "-lrt")
MYSQL_ADD_PLUGIN(rocksdb_se ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY
LINK_LIBRARIES ${rocksdb_static_libs}
)
IF(WITH_EMBEDDED_SERVER)
ADD_SUBDIRECTORY(unittest)
ENDIF()
IF (WITH_ROCKSDB_SE_STORAGE_ENGINE)
# TODO: read this file list from src.mk:TOOL_SOURCES
SET(ROCKSDB_TOOL_SOURCES
${CMAKE_SOURCE_DIR}/rocksdb/tools/ldb_tool.cc
${CMAKE_SOURCE_DIR}/rocksdb/tools/ldb_cmd.cc
${CMAKE_SOURCE_DIR}/rocksdb/tools/sst_dump_tool.cc
)
MYSQL_ADD_EXECUTABLE(sst_dump ${CMAKE_SOURCE_DIR}/rocksdb/tools/sst_dump.cc ${ROCKSDB_TOOL_SOURCES})
TARGET_LINK_LIBRARIES(sst_dump rocksdb_se)
MYSQL_ADD_EXECUTABLE(ldb ${CMAKE_SOURCE_DIR}/rocksdb/tools/ldb.cc ${ROCKSDB_TOOL_SOURCES})
TARGET_LINK_LIBRARIES(ldb rocksdb_se)
MYSQL_ADD_EXECUTABLE(mysql_ldb ${CMAKE_SOURCE_DIR}/storage/rocksdb/tools/mysql_ldb.cc ${ROCKSDB_TOOL_SOURCES})
TARGET_LINK_LIBRARIES(mysql_ldb rocksdb_se)
ENDIF()
== Summary ==
This directory contains RocksDB-based Storage Engine (RDBSE) for MySQL = "MyRocks".
== Resources ==
See https://github.com/facebook/mysql-5.6/wiki/Getting-Started-with-MyRocks
Facebook group: https://www.facebook.com/groups/mysqlonrocksdb/
== Coding Conventions ==
The baseline for MyRocks coding conventions is the MySQL set, available at
http://dev.mysql.com/doc/internals/en/coding-guidelines.html.
Several refinements:
0. There is an umbrella C++ namespace named "myrocks" for all MyRocks code.
1. We introduced "RDB" as the super-short abbreviation for "RocksDB". We will
use it as a name prefix, with different capitalization (see below), to ease
up code navigation with ctags and grep.
N.B. For ease of matching, we'll keep the variables and functions dealing
with sysvars as close as possible to the outside visible names of
sysvars, which start with "rocksdb_" prefix, the outward storage
engine name.
2. The names for classes, interfaces, and C++ structures (which act as
classes), start with prefix "Rdb_".
NB: For historical reasons, we'll keep the "ha_<storage_engine_name>" class
name for ha_rocksdb class, which is an exception to the rule.
3. The names for global objects and functions start with prefix "rdb_".
4. The names for macros and constants start with prefix "RDB_".
5. Regular class member names start with "m_".
6. Static class member names start with "s_".
7. Given the 80 character per line limit, we'll not always use full English
words in names, when a well known or easily recognizable abbreviation
exists (like "tx" for "transaction" or "param" for "parameter" etc).
8. When needing to disambiguate, we use different suffixes for that, like
"_arg" for a function argument/parameter, "_arr" for a C style array, and
"_vect" for a std::vector etc.
== Running Tests ==
To run tests from rocksdb, rocksd_rpl or rocksdb_sys_vars packages, use the following parameters:
--mysqld=--default-storage-engine=rocksdb --mysqld=--skip-innodb --mysqld=--default-tmp-storage-engine=MyISAM --mysqld=--rocksdb
\ No newline at end of file
/*
Copyright (c) 2015, Facebook, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* The C++ file's header */
#include "./event_listener.h"
/* C++ standard header files */
#include <string>
#include <vector>
/* MySQL includes */
#include <mysql/plugin.h>
#include <my_global.h>
/* MyRocks includes */
#include "./ha_rocksdb.h"
#include "./properties_collector.h"
#include "./rdb_datadic.h"
namespace myrocks {
static std::vector<Rdb_index_stats>
extract_index_stats(
const std::vector<std::string>& files,
const rocksdb::TablePropertiesCollection& props
) {
std::vector<Rdb_index_stats> ret;
for (auto fn : files) {
auto it = props.find(fn);
DBUG_ASSERT(it != props.end());
std::vector<Rdb_index_stats> stats;
Rdb_tbl_prop_coll::read_stats_from_tbl_props(it->second, &stats);
ret.insert(ret.end(), stats.begin(), stats.end());
}
return ret;
}
void Rdb_event_listener::OnCompactionCompleted(
rocksdb::DB *db,
const rocksdb::CompactionJobInfo& ci
) {
DBUG_ASSERT(db != nullptr);
DBUG_ASSERT(m_ddl_manager != nullptr);
if (ci.status.ok()) {
m_ddl_manager->adjust_stats(
extract_index_stats(ci.output_files, ci.table_properties),
extract_index_stats(ci.input_files, ci.table_properties));
}
}
void Rdb_event_listener::OnFlushCompleted(
rocksdb::DB* db,
const rocksdb::FlushJobInfo& flush_job_info
) {
DBUG_ASSERT(db != nullptr);
DBUG_ASSERT(m_ddl_manager != nullptr);
auto tbl_props = std::make_shared<const rocksdb::TableProperties>(
flush_job_info.table_properties);
std::vector<Rdb_index_stats> stats;
Rdb_tbl_prop_coll::read_stats_from_tbl_props(tbl_props, &stats);
m_ddl_manager->adjust_stats(stats);
}
} // namespace myrocks
/*
Copyright (c) 2015, Facebook, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#pragma once
#include "rocksdb/listener.h"
namespace myrocks {
class Rdb_ddl_manager;
class Rdb_event_listener : public rocksdb::EventListener
{
public:
explicit Rdb_event_listener(Rdb_ddl_manager* ddl_manager) :
m_ddl_manager(ddl_manager) {
}
void OnCompactionCompleted(
rocksdb::DB *db, const rocksdb::CompactionJobInfo& ci) override;
void OnFlushCompleted(
rocksdb::DB* db, const rocksdb::FlushJobInfo& flush_job_info) override;
private:
Rdb_ddl_manager* m_ddl_manager;
};
} // namespace myrocks
#!/bin/bash
MKFILE=`mktemp`
# create and run a simple makefile
# include rocksdb make file relative to the path of this script
echo "include rocksdb/src.mk
all:
@echo \$(LIB_SOURCES)" > $MKFILE
for f in `make --makefile $MKFILE`
do
echo ../../rocksdb/$f
done
rm $MKFILE
# create build_version.cc file. Only create one if it doesn't exists or if it is different
# this is so that we don't rebuild mysqld every time
bv=rocksdb/util/build_version.cc
date=$(date +%F)
git_sha=$(pushd rocksdb >/dev/null && git rev-parse HEAD 2>/dev/null && popd >/dev/null)
if [ ! -f $bv ] || [ -z $git_sha ] || [ ! `grep $git_sha $bv` ]
then
echo "#include \"build_version.h\"
const char* rocksdb_build_git_sha =
\"rocksdb_build_git_sha:$git_sha\";
const char* rocksdb_build_git_date =
\"rocksdb_build_git_date:$date\";
const char* rocksdb_build_compile_date = __DATE__;" > $bv
fi
This diff is collapsed.
This diff is collapsed.
/*
Copyright (c) 2012,2013 Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#pragma once
/* C++ standard header files */
#include <string>
#include <vector>
/* MySQL header files */
#include "./sql_string.h"
/* RocksDB includes */
#include "rocksdb/table.h"
namespace myrocks {
enum RDB_IO_ERROR_TYPE {
RDB_IO_ERROR_TX_COMMIT,
RDB_IO_ERROR_DICT_COMMIT,
RDB_IO_ERROR_BG_THREAD
};
void rdb_handle_io_error(rocksdb::Status status, RDB_IO_ERROR_TYPE err_type);
int rdb_normalize_tablename(const std::string& tablename, std::string* str)
__attribute__((__nonnull__, __warn_unused_result__));
int rdb_split_normalized_tablename(const std::string& fullname, std::string *db,
std::string *table = nullptr,
std::string *partition = nullptr)
__attribute__((__warn_unused_result__));
std::vector<std::string> rdb_get_open_table_names(void);
int rdb_get_table_perf_counters(const char *tablename,
Rdb_perf_counters *counters)
__attribute__((__nonnull__(2)));
void rdb_get_global_perf_counters(Rdb_perf_counters *counters)
__attribute__((__nonnull__(1)));
void rdb_queue_save_stats_request();
/*
Access to singleton objects.
*/
rocksdb::DB *rdb_get_rocksdb_db();
class Rdb_cf_manager;
Rdb_cf_manager& rdb_get_cf_manager();
rocksdb::BlockBasedTableOptions& rdb_get_table_options();
class Rdb_dict_manager;
Rdb_dict_manager *rdb_get_dict_manager(void)
__attribute__((__warn_unused_result__));
class Rdb_ddl_manager;
Rdb_ddl_manager *rdb_get_ddl_manager(void)
__attribute__((__warn_unused_result__));
class Rdb_binlog_manager;
Rdb_binlog_manager *rdb_get_binlog_manager(void)
__attribute__((__warn_unused_result__));
} // namespace myrocks
/*
Copyright (c) 2015, Facebook, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#pragma once
#include <log.h>
#include <sstream>
#include <string>
namespace myrocks {
class Rdb_logger : public rocksdb::Logger
{
public:
void Logv(const rocksdb::InfoLogLevel log_level,
const char* format,
va_list ap) override
{
DBUG_ASSERT(format != nullptr);
enum loglevel mysql_log_level;
if (m_logger) {
m_logger->Logv(log_level, format, ap);
}
if (log_level < GetInfoLogLevel()) {
return;
}
if (log_level >= rocksdb::InfoLogLevel::ERROR_LEVEL) {
mysql_log_level= ERROR_LEVEL;
} else if (log_level >= rocksdb::InfoLogLevel::WARN_LEVEL) {
mysql_log_level= WARNING_LEVEL;
} else {
mysql_log_level= INFORMATION_LEVEL;
}
// log to MySQL
std::string f("LibRocksDB:");
f.append(format);
error_log_print(mysql_log_level, f.c_str(), ap);
}
void Logv(const char* format, va_list ap) override
{
DBUG_ASSERT(format != nullptr);
// If no level is specified, it is by default at information level
Logv(rocksdb::InfoLogLevel::INFO_LEVEL, format, ap);
}
void SetRocksDBLogger(std::shared_ptr<rocksdb::Logger> logger)
{
m_logger = logger;
}
private:
std::shared_ptr<rocksdb::Logger> m_logger;
};
} // namespace myrocks
let $max_table = 2;
--disable_query_log
let $table = 1;
while ($table <= $max_table) {
let $max = 9;
let $i = 2;
while ($i <= $max) {
let $insert = INSERT INTO t$table VALUES ($i, $i, $i);
eval $insert;
inc $i;
}
inc $table;
}
--enable_query_log
let $table = 1;
while ($table <= $max_table) {
let $i = 1;
let $j = 9;
while ($i <= $max) {
let $insert = INSERT INTO t$table VALUES ($i, $i, $i) ON DUPLICATE KEY UPDATE id2 = $j;
eval $insert;
let $select = SELECT * FROM t$table WHERE id1 = $i;
eval $select;
let $select = SELECT * FROM t$table FORCE INDEX (id3) WHERE id3 = $i;
eval $select;
inc $j;
let $insert = INSERT INTO t$table VALUES ($i, $i, $i) ON DUPLICATE KEY UPDATE id2 = $j;
eval $insert;
let $select = SELECT * FROM t$table WHERE id1 = $i;
eval $select;
let $select = SELECT * FROM t$table FORCE INDEX (id3) WHERE id3 = $i;
eval $select;
inc $j;
let $insert = INSERT INTO t$table VALUES ($i, $i, $i) ON DUPLICATE KEY UPDATE id2 = $j;
eval $insert;
let $select = SELECT * FROM t$table WHERE id1 = $i;
eval $select;
let $select = SELECT * FROM t$table FORCE INDEX (id3) WHERE id3 = $i;
eval $select;
inc $j;
inc $i;
inc $i;
inc $i;
inc $i;
}
let $select = SELECT * FROM t$table;
eval $select;
let $select = SELECT * FROM t$table FORCE INDEX (id3);
eval $select;
inc $table;
}
#
# Check concurrent locking issues:
# Locking rows that do not exist when using all primary key columns in a
# WHERE clause
#
# To call this, set $isolation_level and call this file
#
# let $isolation_level = REPEATABLE READ;
# --source suite/rocksdb/include/locking_issues_case1_1.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 1.1:
--echo - Locking rows that do not exist when using all primary key columns in
--echo - a WHERE clause
--echo - using $isolation_level transaction isolation level
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
CREATE TABLE t0(id1 INT, id2 INT, value INT, PRIMARY KEY(id1, id2));
INSERT INTO t0 VALUES (1,1,0), (3,3,0), (4,4,0), (6,6,0);
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
SELECT * FROM t0 WHERE id1=1 AND id2=5 FOR UPDATE;
connection con2;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
--error ER_LOCK_WAIT_TIMEOUT
INSERT INTO t0 VALUES (1,5,0);
--error ER_LOCK_WAIT_TIMEOUT
SELECT * FROM t0 WHERE id1=1 AND id2=5 FOR UPDATE;
connection con1;
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
#
# Check concurrent locking issues:
# Locking rows that do not exist without using all primary key columns in a
# WHERE clause
#
# To call this, set $isolation_level and call this file
#
# let $isolation_level = REPEATABLE READ;
# --source suite/rocksdb/include/locking_issues_case1_2.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 1.2:
--echo - Locking rows that do not exist without using all primary key
--echo - columns in a WHERE clause
--echo - using $isolation_level transaction isolation level
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
CREATE TABLE t0(id1 INT, id2 INT, value INT, PRIMARY KEY(id1, id2));
INSERT INTO t0 VALUES (1,1,0), (3,3,0), (4,4,0), (6,6,0);
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
SELECT * FROM t0 WHERE id1=1 FOR UPDATE;
connection con2;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
SELECT * FROM t0 WHERE id1=1 AND id2=4 FOR UPDATE;
INSERT INTO t0 VALUES (1,5,0);
connection con1;
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
#
# Check concurrent locking issues:
# Rows that are scanned but do not match the WHERE clause are not locked.
#
# To call this, set $isolation_level and call this file
# If you want to enable rocksdb_lock_scanned_rows set $lock_scanned_rows=1
#
# let $isolation_level = REPEATABLE READ;
# let $lock_scanned_rows = 1 (optional)
# --source suite/rocksdb/include/locking_issues_case2.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 2:
--echo - Rows that are scanned but do not match the WHERE are not locked
--echo - using $isolation_level transaction isolation level unless
--echo - rocksdb_lock_scanned_rows is on
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
SELECT @@global.rocksdb_lock_scanned_rows;
if ($lock_scanned_rows)
{
let $original_val=query_get_value(
select @@global.rocksdb_lock_scanned_rows as val, val, 1);
SET GLOBAL rocksdb_lock_scanned_rows=ON;
}
CREATE TABLE t0(id INT PRIMARY KEY, value INT);
INSERT INTO t0 VALUES (1,0), (2,1), (3,0), (4,0), (5,1);
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
connection con2;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
if ($lock_scanned_rows == 1)
{
connection con1;
# This is expected to leave locks on all the rows in t0
SELECT * FROM t0 WHERE value > 0 FOR UPDATE;
connection con2;
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t0 SET VALUE=10 WHERE id=1;
}
if ($lock_scanned_rows == 0)
{
connection con1;
# This is expected to release locks on rows with value=0
SELECT * FROM t0 WHERE value > 0 FOR UPDATE;
connection con2;
# This should succeed as con1 should have released the lock on row (1,0)
UPDATE t0 SET VALUE=10 WHERE id=1;
# This should fail because lock on row (5,1) is still held.
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t0 SET VALUE=10 WHERE id=5;
connection con1;
# Do another operation
UPDATE t0 SET value=100 WHERE id in (4,5) and value>0;
connection con2;
# Check that row (4,0) is still not locked
SELECT * FROM t0 WHERE id=4 FOR UPDATE;
COMMIT;
SELECT * FROM t0;
}
connection con1;
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
if ($lock_scanned_rows == 1)
{
eval SET GLOBAL rocksdb_lock_scanned_rows=$original_val;
}
#
# Check concurrent locking issues:
# After creating a snapshot, other clients updating rows
#
# To call this, set $isolation_level and call this file
#
# let $isolation_level = REPEATABLE READ;
# --source suite/rocksdb/include/locking_issues_case3.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 3:
--echo - After creating a snapshot, other clients updating rows
--echo - using $isolation_level transaction isolation level
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
CREATE TABLE t0(id INT AUTO_INCREMENT PRIMARY KEY, value INT);
# Insert 200,000 rows, breaking it up into inserts of 1000 rows at a time
--echo Inserting 200,000 rows
--disable_query_log
SET @save_rocksdb_bulk_load=@@rocksdb_bulk_load;
SET rocksdb_bulk_load=1;
SET @save_rocksdb_write_disable_wal=@@rocksdb_write_disable_wal;
SET GLOBAL rocksdb_write_disable_wal=1;
let $i = 1;
while ($i <= 200) {
eval BEGIN;
let $j = 1;
while ($j <= 100) {
eval INSERT INTO t0(value) VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
inc $j;
}
eval COMMIT;
inc $i;
}
SET rocksdb_bulk_load=@save_rocksdb_bulk_load;
SET GLOBAL rocksdb_write_disable_wal=@save_rocksdb_write_disable_wal;
--enable_query_log
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
let $ID = `SELECT connection_id()`;
send SELECT * FROM t0 WHERE value > 0 FOR UPDATE;
connection con2;
let $wait_condition = SELECT 1 FROM information_schema.processlist
WHERE id = $ID AND state = "Sending data";
--source include/wait_condition.inc
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
UPDATE t0 SET VALUE=VALUE+1 WHERE id=190000;
connection con1;
--error ER_LOCK_DEADLOCK
reap;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
#
# Check concurrent locking issues:
# Phantom rows
#
# To call this, set $isolation_level and call this file
#
# let $isolation_level = REPEATABLE READ;
# --source suite/rocksdb/include/locking_issues_case4.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 4:
--echo - Phantom rows
--echo - using $isolation_level transaction isolation level
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
CREATE TABLE t0(id INT AUTO_INCREMENT PRIMARY KEY, value INT);
# Insert 200,000 rows, breaking it up into inserts of 1000 rows at a time
--echo Inserting 200,000 rows
--disable_query_log
SET @save_rocksdb_bulk_load=@@rocksdb_bulk_load;
SET rocksdb_bulk_load=1;
SET @save_rocksdb_write_disable_wal=@@rocksdb_write_disable_wal;
SET GLOBAL rocksdb_write_disable_wal=1;
let $i = 1;
while ($i <= 200) {
eval BEGIN;
let $j = 1;
while ($j <= 100) {
eval INSERT INTO t0(value) VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
inc $j;
}
eval COMMIT;
inc $i;
}
SET rocksdb_bulk_load=@save_rocksdb_bulk_load;
SET GLOBAL rocksdb_write_disable_wal=@save_rocksdb_write_disable_wal;
--enable_query_log
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
let $ID = `SELECT connection_id()`;
send SELECT * FROM t0 WHERE value > 0 FOR UPDATE;
connection con2;
let $wait_condition = SELECT 1 FROM information_schema.processlist
WHERE id = $ID AND state = "Sending data";
--source include/wait_condition.inc
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
INSERT INTO t0 VALUES(200001,1), (-1,1);
connection con1;
reap;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
#
# Check concurrent locking issues:
# Deleting primary key
#
# To call this, set $isolation_level and call this file
#
# let $isolation_level = REPEATABLE READ;
# --source suite/rocksdb/include/locking_issues_case5.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 5:
--echo - Deleting primary key
--echo - using $isolation_level transaction isolation level
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
CREATE TABLE t0(id INT AUTO_INCREMENT PRIMARY KEY, value INT);
# Insert 200,000 rows, breaking it up into inserts of 1000 rows at a time
--echo Inserting 200,000 rows
--disable_query_log
SET @save_rocksdb_bulk_load=@@rocksdb_bulk_load;
SET rocksdb_bulk_load=1;
SET @save_rocksdb_write_disable_wal=@@rocksdb_write_disable_wal;
SET GLOBAL rocksdb_write_disable_wal=1;
let $i = 1;
while ($i <= 200) {
eval BEGIN;
let $j = 1;
while ($j <= 100) {
eval INSERT INTO t0(value) VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
inc $j;
}
eval COMMIT;
inc $i;
}
SET rocksdb_bulk_load=@save_rocksdb_bulk_load;
SET GLOBAL rocksdb_write_disable_wal=@save_rocksdb_write_disable_wal;
--enable_query_log
UPDATE t0 SET value=100 WHERE id=190000;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
let $ID = `SELECT connection_id()`;
send SELECT * FROM t0 WHERE value > 0 FOR UPDATE;
connection con2;
let $wait_condition = SELECT 1 FROM information_schema.processlist
WHERE id = $ID AND state = "Sending data";
--source include/wait_condition.inc
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
DELETE FROM t0 WHERE id=190000;
COMMIT;
connection con1;
--error ER_LOCK_DEADLOCK
reap;
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
#
# Check concurrent locking issues:
# Changing primary key
#
# To call this, set $isolation_level and call this file
#
# let $isolation_level = REPEATABLE READ;
# --source suite/rocksdb/include/locking_issues_case6.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 6:
--echo - Changing primary key
--echo - using $isolation_level transaction isolation level
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t0;
--enable_warnings
CREATE TABLE t0(id INT AUTO_INCREMENT PRIMARY KEY, value INT);
# Insert 200,000 rows, breaking it up into inserts of 1000 rows at a time
--echo Inserting 200,000 rows
--disable_query_log
SET @save_rocksdb_bulk_load=@@rocksdb_bulk_load;
SET rocksdb_bulk_load=1;
SET @save_rocksdb_write_disable_wal=@@rocksdb_write_disable_wal;
SET GLOBAL rocksdb_write_disable_wal=1;
let $i = 1;
while ($i <= 200) {
eval BEGIN;
let $j = 1;
while ($j <= 100) {
eval INSERT INTO t0(value) VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
inc $j;
}
eval COMMIT;
inc $i;
}
SET rocksdb_bulk_load=@save_rocksdb_bulk_load;
SET GLOBAL rocksdb_write_disable_wal=@save_rocksdb_write_disable_wal;
--enable_query_log
UPDATE t0 SET value=100 WHERE id=190000;
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
let $ID = `SELECT connection_id()`;
send SELECT * FROM t0 WHERE value > 0 FOR UPDATE;
connection con2;
let $wait_condition = SELECT 1 FROM information_schema.processlist
WHERE id = $ID AND state = "Sending data";
--source include/wait_condition.inc
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
UPDATE t0 SET id=200001 WHERE id=190000;
COMMIT;
connection con1;
--error ER_LOCK_DEADLOCK
reap;
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t0;
#
# Check concurrent locking issues:
# Rows scanned but are not in the updated table should be locked when
# rocksdb_lock_scanned_rows is on but not locked otherwise.
#
# To call this, set $isolation_level and $lock_scanned_rows and call this file
#
# let $isolation_level = REPEATABLE READ;
# let $lock_scanned_rows = 0 (or 1)
# --source suite/rocksdb/include/locking_issues_case7.inc
#
--echo
--echo -----------------------------------------------------------------------
--echo - Locking issues case 7:
--echo - Rows that are scanned as part of a query but not in the table being
--echo - updated should not be locked unless rocksdb_lock_scanned_rows is on
--echo -----------------------------------------------------------------------
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
SELECT @@global.rocksdb_lock_scanned_rows;
if ($lock_scanned_rows)
{
let $original_val=query_get_value(
select @@global.rocksdb_lock_scanned_rows as val, val, 1);
SET GLOBAL rocksdb_lock_scanned_rows=ON;
}
CREATE TABLE t1(id INT PRIMARY KEY, value INT);
CREATE TABLE t2(id INT PRIMARY KEY, value INT);
INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
INSERT INTO t2 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
connection con2;
eval SET SESSION TRANSACTION ISOLATION LEVEL $isolation_level;
BEGIN;
--echo lock_scanned_rows is $lock_scanned_rows
if ($lock_scanned_rows == 1)
{
connection con1;
# This is expected to leave a lock id=3 in t2;
UPDATE t1 JOIN t2 ON t1.id = t2.id SET t1.value=t1.value+100 WHERE t2.id=3;
connection con2;
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t2 SET value=value+100 WHERE id=3;
# No other row in t2 should be locked;
UPDATE t2 SET value=value+100 WHERE id IN (1,2,4,5);
SELECT * FROM t2;
}
if ($lock_scanned_rows == 0)
{
connection con1;
# This should leave no locks on any row in t2;
UPDATE t1 JOIN t2 ON t1.id = t2.id SET t1.value=t1.value+100 WHERE t2.id=3;
connection con2;
UPDATE t2 SET value=value+100;
SELECT * FROM t2;
}
connection con1;
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t1;
DROP TABLE t2;
if ($lock_scanned_rows == 1)
{
eval SET GLOBAL rocksdb_lock_scanned_rows=$original_val;
}
# Usage:
#
# let $order = ASC; # or DESC
# let $comment = "rev:cf2"; # or ""
# --source suite/rocksdb/include/rocksdb_concurrent_delete.inc
let $first_row = -1; # Error this should never happen
if ($order == 'ASC')
{
let $first_row = 1;
}
if ($order == 'DESC')
{
let $first_row = 3;
}
connect (con, localhost, root,,);
connection default;
--disable_warnings
SET debug_sync='RESET';
DROP TABLE IF EXISTS t1;
--enable_warnings
eval CREATE TABLE t1 (pk INT PRIMARY KEY COMMENT $comment, a INT);
INSERT INTO t1 VALUES(1,1), (2,2), (3,3);
# This will cause the SELECT to block after finding the first row, but
# before locking and reading it.
connection con;
SET debug_sync='rocksdb_concurrent_delete SIGNAL parked WAIT_FOR go';
send_eval SELECT * FROM t1 order by t1.pk $order FOR UPDATE;
# While that connection is waiting, delete the first row (the one con
# is about to lock and read
connection default;
SET debug_sync='now WAIT_FOR parked';
eval DELETE FROM t1 WHERE pk = $first_row;
# Signal the waiting select to continue
SET debug_sync='now SIGNAL go';
# Now get the results from the select. The first entry (1,1) (or (3,3) when
# using reverse ordering) should be missing. Prior to the fix the SELECT
# would have returned: "1815: Internal error: NotFound:"
connection con;
reap;
# Cleanup
connection default;
disconnect con;
set debug_sync='RESET';
drop table t1;
!include include/default_my.cnf
[server]
sql-mode=NO_ENGINE_SUBSTITUTION
explicit-defaults-for-timestamp=1
rocksdb_lock_wait_timeout=1
rocksdb_strict_collation_check=0
#!/usr/bin/perl
die unless($ARGV[0]);
open(my $f, "<", $ARGV[0]) or die $!;
my @sst;
while(my $l = readline($f)) {
chomp($l);
push @sst, int($l);
}
for(my $i= 0; $i < $#sst; $i++) {
printf("checking sst file reduction on optimize table from %d to %d..\n", $i, $i+1);
if($sst[$i] - 1000 < $sst[$i+1]) {
printf("sst file reduction was not enough. %d->%d (minimum 1000kb)\n", $sst[$i], $sst[$i+1]);
die;
}else {
print "ok.\n";
}
}
exit(0);
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (pk INT PRIMARY KEY DEFAULT '0', a INT(11), b CHAR(8)) ENGINE=rocksdb;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL DEFAULT '0',
`a` int(11) DEFAULT NULL,
`b` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
pk int(11) NO PRI 0
a int(11) YES NULL
b char(8) YES NULL
INSERT INTO t1 VALUES (1, 1,'a');
INSERT INTO t1 (a,b) VALUES (2,'b');
SELECT a,b FROM t1;
a b
1 a
2 b
DROP TABLE t1;
This diff is collapsed.
drop table if exists t1;
CREATE TABLE t1(pk CHAR(5) PRIMARY KEY, a char(30), b char(30)) COLLATE 'latin1_bin';
set rocksdb_bulk_load=1;
set rocksdb_bulk_load_size=100000;
LOAD DATA INFILE <input_file> INTO TABLE t1;
set rocksdb_bulk_load=0;
select count(pk) from t1;
count(pk)
3000000
select count(a) from t1;
count(a)
3000000
select count(b) from t1;
count(b)
3000000
ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE;
ALTER TABLE t1 ADD INDEX kb_copy(b), ALGORITHM=COPY;
SELECT COUNT(*) as c FROM
(SELECT COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `b`, CONCAT(ISNULL(`b`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `t1` FORCE INDEX(`kb`)
UNION DISTINCT
SELECT COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#',
`b`, CONCAT(ISNULL(`b`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `t1` FORCE
INDEX(`kb_copy`)) as temp;
c
1
select count(*) from t1 FORCE INDEX(kb);
count(*)
3000000
select count(*) from t1 FORCE INDEX(kb_copy);
count(*)
3000000
select count(*) from t1 FORCE INDEX(PRIMARY);
count(*)
3000000
ALTER TABLE t1 DROP INDEX kb, ALGORITHM=INPLACE;
ALTER TABLE t1 DROP INDEX kb_copy, ALGORITHM=INPLACE;
ALTER TABLE t1 ADD INDEX kb(b), ADD INDEX kab(a,b), ALGORITHM=INPLACE;
SELECT COUNT(*) FROM t1 FORCE INDEX(kab);
COUNT(*)
3000000
SELECT COUNT(*) FROM t1 FORCE INDEX(kb);
COUNT(*)
3000000
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` char(5) COLLATE latin1_bin NOT NULL,
`a` char(30) COLLATE latin1_bin DEFAULT NULL,
`b` char(30) COLLATE latin1_bin DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `kb` (`b`),
KEY `kab` (`a`,`b`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, KEY kab(a,b)) ENGINE=RocksDB;
INSERT INTO t1 (a, b) VALUES (1, 5);
INSERT INTO t1 (a, b) VALUES (2, 6);
INSERT INTO t1 (a, b) VALUES (3, 7);
ALTER TABLE t1 DROP INDEX kab, ALGORITHM=INPLACE;
ALTER TABLE t1 ADD INDEX kb(b) comment 'rev:cf1', ALGORITHM=INPLACE;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`a`),
KEY `kb` (`b`) COMMENT 'rev:cf1'
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t1 FORCE INDEX(kb);
COUNT(*)
3
DROP TABLE t1;
drop table if exists t1;
# Binary must be compiled with debug for this test
CREATE TABLE t1 (a INT) ENGINE=rocksdb;
SELECT COUNT(*) from t1;
COUNT(*)
400
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=rocksdb;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(8) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) YES NULL
b char(8) YES NULL
INSERT INTO t1 (a,b) VALUES (76,'bar');
INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (77,'baz');
SELECT * FROM t1 WHERE a = 35;
a b
35 foo
SELECT * FROM t1 WHERE a = 35 AND b = 'foo';
a b
35 foo
SELECT * FROM t1 WHERE a = 77 OR b = 'bar';
a b
76 bar
77 baz
SELECT * FROM t1 WHERE a > 35;
a b
76 bar
77 baz
SELECT * FROM t1;
a b
35 foo
76 bar
77 baz
UPDATE t1 SET a=a+100;
SELECT * FROM t1;
a b
135 foo
176 bar
177 baz
UPDATE t1 SET a=a-100, b='bbb' WHERE a>100;
SELECT * FROM t1;
a b
35 bbb
76 bbb
77 bbb
UPDATE t1 SET a=300, b='ccc' WHERE a>70;
SELECT * FROM t1;
a b
300 ccc
300 ccc
35 bbb
UPDATE t1 SET a=123 WHERE a=35;
SELECT * FROM t1;
a b
123 bbb
300 ccc
300 ccc
UPDATE t1 SET a=321 WHERE b='ccc';
SELECT * FROM t1;
a b
123 bbb
321 ccc
321 ccc
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
123 bbb
321 ccc
321 ccc
45 bob
DELETE FROM t1 WHERE a=123;
SELECT * FROM t1;
a b
321 ccc
321 ccc
45 bob
DELETE FROM t1 WHERE b > 'bbb' AND a > 100;
SELECT * FROM t1;
a b
45 bob
TRUNCATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT, c CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1,'a'),(5,'z');
ALTER TABLE t1 ADD COLUMN b INT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` char(8) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SELECT * FROM t1;
a c b
1 a NULL
5 z NULL
ALTER TABLE t1 DROP COLUMN b;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`c` char(8) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SELECT * FROM t1;
a c
1 a
5 z
DROP TABLE t1;
CREATE TABLE t1 (a INT, b CHAR(8), pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb;
ALTER TABLE t1 DROP COLUMN pk;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(8) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) YES NULL
b char(8) YES NULL
INSERT INTO t1 (a,b) VALUES (76,'bar');
INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (77,'baz');
SELECT * FROM t1 WHERE a = 35;
a b
35 foo
SELECT * FROM t1 WHERE a = 35 AND b = 'foo';
a b
35 foo
SELECT * FROM t1 WHERE a = 77 OR b = 'bar';
a b
76 bar
77 baz
SELECT * FROM t1 WHERE a > 35;
a b
76 bar
77 baz
SELECT * FROM t1;
a b
35 foo
76 bar
77 baz
UPDATE t1 SET a=a+100;
SELECT * FROM t1;
a b
135 foo
176 bar
177 baz
UPDATE t1 SET a=a-100, b='bbb' WHERE a>100;
SELECT * FROM t1;
a b
35 bbb
76 bbb
77 bbb
UPDATE t1 SET a=300, b='ccc' WHERE a>70;
SELECT * FROM t1;
a b
300 ccc
300 ccc
35 bbb
UPDATE t1 SET a=123 WHERE a=35;
SELECT * FROM t1;
a b
123 bbb
300 ccc
300 ccc
UPDATE t1 SET a=321 WHERE b='ccc';
SELECT * FROM t1;
a b
123 bbb
321 ccc
321 ccc
INSERT INTO t1 (a,b) VALUES (45,'bob');
SELECT * FROM t1;
a b
123 bbb
321 ccc
321 ccc
45 bob
DELETE FROM t1 WHERE a=123;
SELECT * FROM t1;
a b
321 ccc
321 ccc
45 bob
DELETE FROM t1 WHERE b > 'bbb' AND a > 100;
SELECT * FROM t1;
a b
45 bob
TRUNCATE TABLE t1;
DROP TABLE t1;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
CREATE TABLE t2 (a INT, b CHAR(8)) ENGINE=rocksdb;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a,b) VALUES (3,'c');
INSERT INTO t2 (a,b) VALUES (4,'d');
CHECK TABLE t1, t2 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
INSERT INTO t2 (a,b) VALUES (5,'e');
CHECK TABLE t2 QUICK;
Table Op Msg_type Msg_text
test.t2 check status OK
INSERT INTO t1 (a,b) VALUES (6,'f');
CHECK TABLE t1 FAST;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a,b) VALUES (7,'g');
INSERT INTO t2 (a,b) VALUES (8,'h');
CHECK TABLE t2, t1 MEDIUM;
Table Op Msg_type Msg_text
test.t2 check status OK
test.t1 check status OK
INSERT INTO t1 (a,b) VALUES (9,'i');
INSERT INTO t2 (a,b) VALUES (10,'j');
CHECK TABLE t1, t2 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
INSERT INTO t1 (a,b) VALUES (11,'k');
CHECK TABLE t1 CHANGED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1, t2;
CREATE TABLE t1 (a INT, b CHAR(8), UNIQUE INDEX(a)) ENGINE=rocksdb;
ERROR HY000: Unique index support is disabled when the table has no primary key.
CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=rocksdb;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` char(8) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) YES NULL
b char(8) YES NULL
INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (35,'foo');
INSERT INTO t1 (a,b) VALUES (36,'foo');
DELETE FROM t1 WHERE a = 35 AND b = 'foo';
SELECT * FROM t1;
a b
36 foo
DROP TABLE t1;
RocksDB: Can't disable allow_os_buffer if allow_mmap_reads is enabled
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, c CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1,1,'a'),(2,5,'z');
ALTER TABLE t1 ADD COLUMN b INT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`c` char(8) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN a SET DEFAULT '0';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT '0',
`c` char(8) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER a DROP DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 CHANGE COLUMN b b1 CHAR(8) FIRST;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b1` char(8) DEFAULT NULL,
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 CHANGE b1 b INT AFTER c;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 CHANGE b b CHAR(8);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
`b` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 MODIFY COLUMN b INT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 MODIFY COLUMN b CHAR(8) FIRST;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` char(8) DEFAULT NULL,
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 MODIFY COLUMN b INT AFTER a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11),
`b` int(11) DEFAULT NULL,
`c` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 DROP COLUMN b;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 RENAME TO t2;
SHOW CREATE TABLE t1;
ERROR 42S02: Table 'test.t1' doesn't exist
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`pk` int(11) NOT NULL,
`a` int(11),
`c` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, b INT) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1,1,5),(2,2,2),(3,4,3);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
ALTER TABLE t1 ORDER BY b ASC, a DESC, pk DESC;
Warnings:
Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
SELECT * FROM t1;
pk a b
1 1 5
2 2 2
3 4 3
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, b CHAR(8), c CHAR(8)) ENGINE=rocksdb CHARACTER SET latin1 COLLATE latin1_general_cs;
INSERT INTO t1 VALUES (1,5,'z','t');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`b` char(8) COLLATE latin1_general_cs DEFAULT NULL,
`c` char(8) COLLATE latin1_general_cs DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`b` char(8) DEFAULT NULL,
`c` char(8) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=utf8
ALTER TABLE t1 DEFAULT CHARACTER SET = latin1 COLLATE latin1_general_ci;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`b` char(8) CHARACTER SET utf8 DEFAULT NULL,
`c` char(8) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
ALTER TABLE t1 FORCE;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`pk` int(11) NOT NULL,
`a` int(11) DEFAULT NULL,
`b` char(8) CHARACTER SET utf8 DEFAULT NULL,
`c` char(8) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
DROP TABLE t1;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT(11), b CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1,1,'a'),(2,2,'b');
CREATE TABLE t2 (pk INT PRIMARY KEY, a INT(11), b CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (3,3,'c');
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
INSERT INTO t2 VALUES (1,4,'d');
ANALYZE NO_WRITE_TO_BINLOG TABLE t2;
Table Op Msg_type Msg_text
test.t2 analyze status OK
INSERT INTO t1 VALUES (4,5,'e');
INSERT INTO t2 VALUES (2,6,'f');
ANALYZE LOCAL TABLE t1, t2;
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t2 analyze status OK
DROP TABLE t1, t2;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT(11), KEY(a)) ENGINE=rocksdb;
INSERT INTO t1 VALUES (1,1),(2,2),(3,4),(4,7);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
INSERT INTO t1 VALUES (5,8),(6,10),(7,11),(8,12);
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE t1 (
pk INT NOT NULL PRIMARY KEY,
key1 INT NOT NULL,
KEY (key1)
) ENGINE=ROCKSDB;
INSERT INTO t1 VALUES (12,12);
INSERT INTO t1 VALUES (6,6);
BEGIN;
INSERT INTO t1 VALUES (8,8), (10,10);
SELECT * FROM t1 WHERE key1 BETWEEN 4 and 11 ORDER BY KEY1 DESC;
pk key1
10 10
8 8
6 6
SELECT * FROM t1 WHERE key1 BETWEEN 4 and 11 ORDER BY KEY1 ASC;
pk key1
6 6
8 8
10 10
SELECT * FROM t1 IGNORE INDEX(key1) WHERE key1 BETWEEN 4 and 11 ORDER BY key1 DESC;
pk key1
10 10
8 8
6 6
SELECT * FROM t1 IGNORE INDEX(key1) WHERE key1 BETWEEN 4 and 11 ORDER BY key1 ASC;
pk key1
6 6
8 8
10 10
ROLLBACK;
CREATE TABLE t2 (
pk INT NOT NULL PRIMARY KEY,
key1 INT NOT NULL,
KEY (key1) COMMENT 'rev:cf'
) ENGINE=ROCKSDB;
INSERT INTO t2 VALUES (12,12);
INSERT INTO t2 VALUES (6,6);
BEGIN;
INSERT INTO t2 VALUES (8,8), (10,10);
SELECT * FROM t2 WHERE key1 BETWEEN 4 and 11 ORDER BY KEY1 DESC;
pk key1
10 10
8 8
6 6
SELECT * FROM t2 WHERE key1 BETWEEN 4 and 11 ORDER BY KEY1 ASC;
pk key1
6 6
8 8
10 10
SELECT * FROM t2 IGNORE INDEX(key1) WHERE key1 BETWEEN 4 and 11 ORDER BY key1 DESC;
pk key1
10 10
8 8
6 6
SELECT * FROM t2 IGNORE INDEX(key1) WHERE key1 BETWEEN 4 and 11 ORDER BY key1 ASC;
pk key1
6 6
8 8
10 10
ROLLBACK;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT AUTO_INCREMENT, KEY(a)) ENGINE=rocksdb;
INSERT INTO t1 (pk) VALUES (3), (2), (1);
SELECT * FROM t1;
pk a
3 1
2 2
1 3
INSERT INTO t1 (pk) VALUES (4);
SELECT * FROM t1;
pk a
3 1
2 2
1 3
4 4
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
#---------------------------
# auto_increment_offset
#---------------------------
SET auto_increment_offset = 200;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb;
INSERT INTO t1 (a,b) VALUES (NULL,'a'),(NULL,'b'),(NULL,'c');
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
1
SELECT a,b FROM t1 ORDER BY a;
a b
1 a
2 b
3 c
#---------------------------
# auto_increment_increment
#---------------------------
SET auto_increment_increment = 300;
INSERT INTO t1 (a,b) VALUES (NULL,'d'),(NULL,'e'),(NULL,'f');
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
200
SELECT a,b FROM t1 ORDER BY a;
a b
1 a
2 b
3 c
200 d
500 e
800 f
SET auto_increment_increment = 50;
INSERT INTO t1 (a,b) VALUES (NULL,'g'),(NULL,'h'),(NULL,'i');
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
850
SELECT a,b FROM t1 ORDER BY a;
a b
1 a
2 b
3 c
200 d
500 e
800 f
850 g
900 h
950 i
DROP TABLE t1;
#---------------------------
# offset is greater than the max value
#---------------------------
SET auto_increment_increment = 500;
SET auto_increment_offset = 300;
CREATE TABLE t1 (a TINYINT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb;
INSERT INTO t1 (a) VALUES (NULL);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
127
SELECT a FROM t1 ORDER BY a;
a
127
DROP TABLE t1;
# The test checks AUTO_INCREMENT capabilities that are not supported by RocksDB-SE.
This diff is collapsed.
CREATE TABLE t0 (id1 VARCHAR(30), id2 INT, value INT, PRIMARY KEY (id1, id2)) ENGINE=rocksdb collate latin1_bin;
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
SELECT COUNT(*) FROM t0 WHERE id1='X' AND id2>=1;
COUNT(*)
10000
select case when variable_value-@u = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u = 0 then 'true' else 'false' end
true
DROP TABLE t0;
CREATE TABLE t1 (id1 BIGINT, id2 INT, id3 BIGINT, value INT, PRIMARY KEY (id1, id2, id3)) ENGINE=rocksdb;
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2=1 AND id3>=2;
COUNT(*)
9999
select case when variable_value-@u = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u = 0 then 'true' else 'false' end
true
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
SELECT COUNT(*) FROM t1 WHERE id1=1 AND id2>=1 AND id3>=2;
COUNT(*)
9999
select case when variable_value-@u = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u = 0 then 'true' else 'false' end
true
DROP TABLE t1;
CREATE TABLE t2 (id1 INT, id2 VARCHAR(100), id3 BIGINT, value INT, PRIMARY KEY (id1, id2, id3)) ENGINE=rocksdb collate latin1_bin;
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
select count(*) from t2 WHERE id1=100 and id2 IN ('00000000000000000000', '100');
count(*)
1
select case when variable_value-@u > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u > 0 then 'true' else 'false' end
true
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
select count(*) from t2 WHERE id1=200 and id2 IN ('00000000000000000000', '200');
count(*)
1
select case when variable_value-@u > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u > 0 then 'true' else 'false' end
true
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
select count(*) from t2 WHERE id1=200 and id2 IN ('3', '200');
count(*)
1
select case when variable_value-@u = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u = 0 then 'true' else 'false' end
true
DROP TABLE t2;
CREATE TABLE t3 (id1 BIGINT, id2 BIGINT, id3 BIGINT, id4 BIGINT, PRIMARY KEY (id1, id2, id3, id4)) ENGINE=rocksdb collate latin1_bin;
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_useful';
SELECT COUNT(*) FROM t3 WHERE id1=1 AND id2=5000 AND id3=1 AND id4=1;
COUNT(*)
0
select case when variable_value-@u > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_useful';
case when variable_value-@u > 0 then 'true' else 'false' end
true
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
SELECT COUNT(*) FROM t3 WHERE id1=1 AND id2=1 AND id3=1;
COUNT(*)
1
select case when variable_value-@u > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u > 0 then 'true' else 'false' end
true
select variable_value into @u from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
SELECT COUNT(*) FROM t3 WHERE id1=1 AND id2=1 AND id3=1 AND id4 <= 500;
COUNT(*)
1
select case when variable_value-@u > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_useful';
case when variable_value-@u > 0 then 'true' else 'false' end
true
DROP TABLE t3;
CREATE TABLE `linktable` (
`id1` bigint(20) unsigned NOT NULL DEFAULT '0',
`id1_type` int(10) unsigned NOT NULL DEFAULT '0',
`id2` bigint(20) unsigned NOT NULL DEFAULT '0',
`id2_type` int(10) unsigned NOT NULL DEFAULT '0',
`link_type` bigint(20) unsigned NOT NULL DEFAULT '0',
`visibility` tinyint(3) NOT NULL DEFAULT '0',
`data` varchar(255) NOT NULL DEFAULT '',
`time` bigint(20) unsigned NOT NULL DEFAULT '0',
`version` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (link_type, `id1`,`id2`) COMMENT 'cf_link_pk',
KEY `id1_type` (`id1`,`link_type`,`visibility`,`time`,`version`,`data`) COMMENT 'rev:cf_link_id1_type',
KEY `id1_type2` (`id1`,`link_type`,`time`,`version`,`data`,`visibility`) COMMENT 'rev:cf_link_id1_type2',
KEY `id1_type3` (`id1`,`visibility`,`time`,`version`,`data`,`link_type`) COMMENT 'rev:cf_link_id1_type3'
) ENGINE=RocksDB DEFAULT COLLATE=latin1_bin;
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type`) where id1 = 100 and link_type = 1 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c > 0 then 'true' else 'false' end
true
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type2`) where id1 = 100 and link_type = 1 and time >= 0 and time <= 9223372036854775807 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c > 0 then 'true' else 'false' end
true
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type3`) where id1 = 100 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c = 0 then 'true' else 'false' end
true
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type`) where id1 = 100 and link_type = 1 and visibility = 1 and time >= 0 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c > 0 then 'true' else 'false' end
true
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type2`) where id1 = 100 and link_type = 1 and time >= 0 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c = 0 then 'true' else 'false' end
true
## HA_READ_PREFIX_LAST
# BF len 20
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type`) where id1 = 100 and link_type = 1 and visibility = 1 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c > 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c > 0 then 'true' else 'false' end
true
# BF len 19
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type2`) where id1 = 100 and link_type = 1 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c = 0 then 'true' else 'false' end
true
# BF len 12
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select id1, id2, link_type, visibility, data, time, version from linktable FORCE INDEX(`id1_type3`) where id1 = 100 and visibility = 1 order by time desc;
id1 id2 link_type visibility data time version
100 100 1 1 100 100 100
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c = 0 then 'true' else 'false' end
true
DROP TABLE linktable;
#
# bloom filter prefix is 20 byte
# Create a key which is longer than that, so that we see that
# eq_cond_len= slice.size() - 1;
# doesnt work.
#
# indexnr 4
# kp0 + 4 = 8
# kp1 + 8 = 16
# kp2 + 8 = 24 24>20 byte length prefix
# kp3 + 8 = 28
create table t1 (
pk int primary key,
kp0 int not null,
kp1 bigint not null,
kp2 bigint not null,
kp3 bigint not null,
key kp12(kp0, kp1, kp2, kp3) comment 'rev:x1'
) engine=rocksdb;
insert into t1 values (1, 1,1, 1,1);
insert into t1 values (10,1,1,0x12FFFFFFFFFF,1);
insert into t1 values (11,1,1,0x12FFFFFFFFFF,1);
insert into t1 values (20,2,2,0x12FFFFFFFFFF,1);
insert into t1 values (21,2,2,0x12FFFFFFFFFF,1);
explain
select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index kp12 kp12 28 NULL # Using where; Using index
show status like '%rocksdb_bloom_filter_prefix%';
Variable_name Value
rocksdb_bloom_filter_prefix_checked 0
rocksdb_bloom_filter_prefix_useful 0
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
select * from t1 where kp0=1 and kp1=1 and kp2=0x12FFFFFFFFFF order by kp3 desc;
pk kp0 kp1 kp2 kp3
11 1 1 20890720927743 1
10 1 1 20890720927743 1
show status like '%rocksdb_bloom_filter_prefix%';
Variable_name Value
rocksdb_bloom_filter_prefix_checked 0
rocksdb_bloom_filter_prefix_useful 0
# The following MUST show TRUE:
select case when variable_value-@c = 0 then 'true' else 'false' end from information_schema.global_status where variable_name='rocksdb_bloom_filter_prefix_checked';
case when variable_value-@c = 0 then 'true' else 'false' end
true
drop table t1;
CREATE TABLE t1 (
`id1` int unsigned NOT NULL DEFAULT '0',
`id2` int unsigned NOT NULL DEFAULT '0',
`link_type` int unsigned NOT NULL DEFAULT '0',
`visibility` tinyint NOT NULL DEFAULT '0',
`data` varchar(255) NOT NULL DEFAULT '',
`time` int unsigned NOT NULL DEFAULT '0',
`version` int unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (id1, link_type, visibility, id2) COMMENT 'rev:cf_link_pk'
) ENGINE=RocksDB DEFAULT COLLATE=latin1_bin;
CREATE PROCEDURE select_test()
BEGIN
DECLARE id1_cond INT;
SET id1_cond = 1;
WHILE id1_cond <= 20000 DO
SELECT count(*) AS cnt FROM (SELECT id1 FROM t1 FORCE INDEX (PRIMARY) WHERE id1 = id1_cond AND link_type = 1 AND visibility = 1 ORDER BY id2 DESC) AS t INTO @cnt;
IF @cnt < 1 THEN
SELECT id1_cond, @cnt;
END IF;
SET id1_cond = id1_cond + 1;
END WHILE;
END//
"Skipping bloom filter"
SET session rocksdb_skip_bloom_filter_on_read=1;
CALL select_test();
"Using bloom filter"
SET session rocksdb_skip_bloom_filter_on_read=0;
CALL select_test();
DROP PROCEDURE select_test;
drop table t1;
This diff is collapsed.
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1(pk CHAR(5) PRIMARY KEY, a char(30), b char(30), key(a)) COLLATE 'latin1_bin';
CREATE TABLE t2(pk CHAR(5) PRIMARY KEY, a char(30), b char(30), key(a)) COLLATE 'latin1_bin';
CREATE TABLE t3(pk CHAR(5) PRIMARY KEY, a char(30), b char(30), key(a)) COLLATE 'latin1_bin'
PARTITION BY KEY() PARTITIONS 4;
set session transaction isolation level repeatable read;
select * from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
STAT_TYPE VALUE
DB_NUM_SNAPSHOTS 0
start transaction with consistent snapshot;
select * from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
STAT_TYPE VALUE
DB_NUM_SNAPSHOTS 1
set rocksdb_bulk_load=1;
set rocksdb_bulk_load_size=100000;
LOAD DATA INFILE <input_file> INTO TABLE t1;
LOAD DATA INFILE <input_file> INTO TABLE t2;
LOAD DATA INFILE <input_file> INTO TABLE t3;
set rocksdb_bulk_load=0;
select count(pk) from t1;
count(pk)
10000000
select count(a) from t1;
count(a)
10000000
select count(b) from t1;
count(b)
10000000
select count(pk) from t2;
count(pk)
10000000
select count(a) from t2;
count(a)
10000000
select count(b) from t2;
count(b)
10000000
select count(pk) from t3;
count(pk)
10000000
select count(a) from t3;
count(a)
10000000
select count(b) from t3;
count(b)
10000000
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
test.bulk_load.tmp
DROP TABLE t1, t2, t3;
DROP TABLE IF EXISTS t1;
create table t1(
id bigint not null primary key,
i1 bigint, #unique
i2 bigint, #repeating
c1 varchar(20), #unique
c2 varchar(20), #repeating
index t1_1(id, i1),
index t1_2(i1, i2),
index t1_3(i2, i1),
index t1_4(c1, c2),
index t1_5(c2, c1)
) engine=rocksdb;
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
show index in t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 id A 100000 NULL NULL LSMTREE
t1 1 t1_1 1 id A 100000 NULL NULL LSMTREE
t1 1 t1_1 2 i1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_2 1 i1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_2 2 i2 A 100000 NULL NULL YES LSMTREE
t1 1 t1_3 1 i2 A 11111 NULL NULL YES LSMTREE
t1 1 t1_3 2 i1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_4 1 c1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_4 2 c2 A 100000 NULL NULL YES LSMTREE
t1 1 t1_5 1 c2 A 11111 NULL NULL YES LSMTREE
t1 1 t1_5 2 c1 A 100000 NULL NULL YES LSMTREE
SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = DATABASE();
table_name table_rows
t1 100000
restarting...
show index in t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 0 PRIMARY 1 id A 100000 NULL NULL LSMTREE
t1 1 t1_1 1 id A 100000 NULL NULL LSMTREE
t1 1 t1_1 2 i1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_2 1 i1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_2 2 i2 A 100000 NULL NULL YES LSMTREE
t1 1 t1_3 1 i2 A 11111 NULL NULL YES LSMTREE
t1 1 t1_3 2 i1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_4 1 c1 A 100000 NULL NULL YES LSMTREE
t1 1 t1_4 2 c2 A 100000 NULL NULL YES LSMTREE
t1 1 t1_5 1 c2 A 11111 NULL NULL YES LSMTREE
t1 1 t1_5 2 c1 A 100000 NULL NULL YES LSMTREE
SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = DATABASE();
table_name table_rows
t1 100000
drop table t1;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (a INT, b CHAR(8), pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb;
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
CREATE TABLE t2 (a INT, b CHAR(8), pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=rocksdb;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a,b) VALUES (3,'c');
INSERT INTO t2 (a,b) VALUES (4,'d');
CHECK TABLE t1, t2 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
INSERT INTO t2 (a,b) VALUES (5,'e');
CHECK TABLE t2 QUICK;
Table Op Msg_type Msg_text
test.t2 check status OK
INSERT INTO t1 (a,b) VALUES (6,'f');
CHECK TABLE t1 FAST;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a,b) VALUES (7,'g');
INSERT INTO t2 (a,b) VALUES (8,'h');
CHECK TABLE t2, t1 MEDIUM;
Table Op Msg_type Msg_text
test.t2 check status OK
test.t1 check status OK
INSERT INTO t1 (a,b) VALUES (9,'i');
INSERT INTO t2 (a,b) VALUES (10,'j');
CHECK TABLE t1, t2 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
INSERT INTO t1 (a,b) VALUES (11,'k');
CHECK TABLE t1 CHANGED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1, t2;
CREATE TABLE t1 (a INT, b CHAR(8), pk INT AUTO_INCREMENT PRIMARY KEY, KEY(a)) ENGINE=rocksdb;
INSERT INTO t1 (a) VALUES (1),(2),(5);
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a) VALUES (6),(8),(12);
CHECK TABLE t1 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a) VALUES (13),(15),(16);
CHECK TABLE t1 QUICK;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a) VALUES (17),(120),(132);
CHECK TABLE t1 FAST;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a) VALUES (801),(900),(7714);
CHECK TABLE t1 MEDIUM;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a) VALUES (8760),(10023),(12000);
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 (a) VALUES (13345),(24456),(78302),(143028);
CHECK TABLE t1 CHANGED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
CREATE TABLE t1 (
a int not null,
b int not null,
primary key (a,b) comment 'cf1',
key (b) comment 'rev:cf2'
) ENGINE=RocksDB;
CREATE TABLE t2 (
a int not null,
b int not null,
primary key (a,b) comment 'cf1',
key (b) comment 'rev:cf2'
) ENGINE=RocksDB;
CREATE TABLE t3 (
a int not null,
b int not null,
primary key (a,b) comment 'cf1',
key (b) comment 'rev:cf2'
) ENGINE=RocksDB;
CREATE TABLE t4 (
a int not null,
b int not null,
primary key (a,b) comment 'cf1',
key (b) comment 'rev:cf2'
) ENGINE=RocksDB;
DELETE FROM t1;
DELETE FROM t2;
DELETE FROM t3;
DELETE FROM t4;
CREATE TABLE t5 (
a int not null,
b int not null,
primary key (a,b) comment 'cf1',
key (b) comment 'rev:cf2'
) ENGINE=RocksDB;
DELETE FROM t5;
SET GLOBAL ROCKSDB_CREATE_CHECKPOINT = '[CHECKPOINT]';
CURRENT
SET GLOBAL ROCKSDB_CREATE_CHECKPOINT = '[CHECKPOINT]';
CURRENT
truncate table t1;
optimize table t1;
truncate table t2;
optimize table t2;
truncate table t3;
optimize table t3;
truncate table t4;
optimize table t4;
truncate table t5;
optimize table t5;
drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
drop table if exists t4;
drop table if exists t5;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb CHECKSUM=0;
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
CREATE TABLE t2 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb CHECKSUM=0;
CHECKSUM TABLE t1;
Table Checksum
test.t1 4259194219
CHECKSUM TABLE t2, t1;
Table Checksum
test.t2 0
test.t1 4259194219
CHECKSUM TABLE t1, t2 QUICK;
Table Checksum
test.t1 NULL
test.t2 NULL
CHECKSUM TABLE t1, t2 EXTENDED;
Table Checksum
test.t1 4259194219
test.t2 0
DROP TABLE t1, t2;
#
# Issue #110: SQL command checksum returns inconsistent result
#
create table t1 (pk int primary key, col1 varchar(10)) engine=rocksdb;
insert into t1 values (2,'fooo');
insert into t1 values (1,NULL);
checksum table t1;
Table Checksum
test.t1 1303411884
checksum table t1;
Table Checksum
test.t1 1303411884
select * from t1 where pk=2;
pk col1
2 fooo
checksum table t1;
Table Checksum
test.t1 1303411884
checksum table t1;
Table Checksum
test.t1 1303411884
flush tables;
checksum table t1;
Table Checksum
test.t1 1303411884
checksum table t1;
Table Checksum
test.t1 1303411884
drop table t1;
#
# The following test is about making sure MyRocks CHECKSUM TABLE
# values are the same as with InnoDB.
# If you see checksum values changed, make sure their counterparts
# in suite/innodb/r/checksum-matches-myrocks.result match.
#
create table t1 (pk int primary key, col1 varchar(10)) engine=rocksdb;
insert into t1 values (2,'fooo');
insert into t1 values (1,NULL);
checksum table t1;
Table Checksum
test.t1 1303411884
drop table t1;
create table t1 (
pk bigint unsigned primary key,
col1 varchar(10),
col2 tinyint,
col3 double
) engine=rocksdb;
checksum table t1;
Table Checksum
test.t1 0
insert into t1 values (1, NULL, NULL, NULL);
insert into t1 values (2, 'foo', NULL, NULL);
checksum table t1;
Table Checksum
test.t1 3633741545
insert into t1 values (3, NULL, 123, NULL);
insert into t1 values (4, NULL, NULL, 2.78);
checksum table t1;
Table Checksum
test.t1 390004011
insert into t1 values (5, 'xxxYYYzzzT', NULL, 2.78);
insert into t1 values (6, '', NULL, 2.78);
checksum table t1;
Table Checksum
test.t1 3183101003
drop table t1;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb CHECKSUM=1;
INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
CREATE TABLE t2 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb CHECKSUM=1;
CHECKSUM TABLE t1;
Table Checksum
test.t1 4259194219
CHECKSUM TABLE t2, t1;
Table Checksum
test.t2 0
test.t1 4259194219
CHECKSUM TABLE t1, t2 QUICK;
Table Checksum
test.t1 NULL
test.t2 NULL
CHECKSUM TABLE t1, t2 EXTENDED;
Table Checksum
test.t1 4259194219
test.t2 0
DROP TABLE t1, t2;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT PRIMARY KEY DEFAULT '0') ENGINE=rocksdb;
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) NO PRI 0
INSERT INTO t1 (a) VALUES (1);
SELECT a FROM t1;
a
1
ALTER TABLE t1 ADD COLUMN b CHAR(8) DEFAULT '';
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) NO PRI 0
b char(8) YES
INSERT INTO t1 (b) VALUES ('a');
SELECT a,b FROM t1 ORDER BY a,b;
a b
0 a
1
DROP TABLE t1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
SET @start_global_value = @@global.ROCKSDB_STRICT_COLLATION_EXCEPTIONS;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.t1.value Use binary collation (binary, latin1_bin, utf8_bin).
CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value3(50))) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.t1.value3 Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_check=0;
CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value3(50))) engine=rocksdb charset utf8;
DROP TABLE t1;
SET GLOBAL rocksdb_strict_collation_check=1;
CREATE TABLE t1 (id INT primary key, value varchar(50), value2 varbinary(50), value3 text, index(value2)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE t1 (id varchar(20), value varchar(50), value2 varchar(50), value3 text, primary key (id), index(value, value2)) engine=rocksdb charset latin1 collate latin1_bin;
DROP TABLE t1;
CREATE TABLE t1 (id varchar(20), value varchar(50), value2 varchar(50), value3 text, primary key (id), index(value, value2)) engine=rocksdb charset utf8 collate utf8_bin;
DROP TABLE t1;
CREATE TABLE t1 (id varchar(20) collate latin1_bin, value varchar(50) collate utf8_bin, value2 varchar(50) collate latin1_bin, value3 text, primary key (id), index(value, value2)) engine=rocksdb;
DROP TABLE t1;
SET GLOBAL rocksdb_strict_collation_exceptions=t1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE t2 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="t.*";
CREATE TABLE t123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t123;
CREATE TABLE s123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.s123.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions=".t.*";
CREATE TABLE xt123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE xt123;
CREATE TABLE t123 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.t123.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="s.*,t.*";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="s.*|t.*";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="|s.*|t.*";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="s.*,,t.*";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="s.*||t.*";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="s.*,t.*,";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="s.*|t.*|";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="||||,,,,s.*,,|,,||,t.*,,|||,,,";
CREATE TABLE s1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE s1;
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
DROP TABLE t1;
CREATE TABLE u1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.u1.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions='t1';
CREATE TABLE t1 (id INT primary key, value varchar(50), index(value)) engine=rocksdb;
ALTER TABLE t1 AUTO_INCREMENT=1;
DROP TABLE t1;
CREATE TABLE t2 (id INT primary key, value varchar(50), index(value)) engine=rocksdb;
ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (binary, latin1_bin, utf8_bin).
CREATE TABLE t2 (id INT primary key, value varchar(50)) engine=rocksdb;
ALTER TABLE t2 ADD INDEX(value);
ERROR HY000: Unsupported collation on string indexed column test.t2.value Use binary collation (binary, latin1_bin, utf8_bin).
DROP TABLE t2;
SET GLOBAL rocksdb_strict_collation_exceptions="[a-b";
Invalid pattern in strict_collation_exceptions: [a-b
CREATE TABLE a (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.a.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="[a-b]";
CREATE TABLE a (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
CREATE TABLE b (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
CREATE TABLE c (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.c.value Use binary collation (binary, latin1_bin, utf8_bin).
DROP TABLE a, b;
SET GLOBAL rocksdb_strict_collation_exceptions="abc\\";
Invalid pattern in strict_collation_exceptions: abc\
CREATE TABLE abc (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.abc.value Use binary collation (binary, latin1_bin, utf8_bin).
SET GLOBAL rocksdb_strict_collation_exceptions="abc";
CREATE TABLE abc (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
CREATE TABLE abcd (id INT PRIMARY KEY, value varchar(50), index(value)) engine=rocksdb charset utf8;
ERROR HY000: Unsupported collation on string indexed column test.abcd.value Use binary collation (binary, latin1_bin, utf8_bin).
DROP TABLE abc;
SET GLOBAL rocksdb_strict_collation_exceptions=@start_global_value;
CREATE TABLE `r1.lol` (
`c1` int(10) NOT NULL DEFAULT '0',
`c2` int(11) NOT NULL DEFAULT '0',
`c3` int(1) NOT NULL DEFAULT '0',
`c4` int(11) NOT NULL DEFAULT '0',
`c5` int(11) NOT NULL DEFAULT '0',
`c6` varchar(100) NOT NULL DEFAULT '',
`c7` varchar(100) NOT NULL DEFAULT '',
`c8` varchar(255) NOT NULL DEFAULT '',
`c9` int(10) NOT NULL DEFAULT '125',
`c10` int(10) NOT NULL DEFAULT '125',
`c11` text NOT NULL,
`c12` int(11) NOT NULL DEFAULT '0',
`c13` int(10) NOT NULL DEFAULT '0',
`c14` text NOT NULL,
`c15` blob NOT NULL,
`c16` int(11) NOT NULL DEFAULT '0',
`c17` int(11) NOT NULL DEFAULT '0',
`c18` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`c1`),
KEY i1 (`c4`),
KEY i2 (`c7`),
KEY i3 (`c2`)) ENGINE=RocksDB DEFAULT CHARSET=latin1;
DROP INDEX i1 ON `r1.lol`;
DROP TABLE `r1.lol`;
DROP TABLE IF EXISTS r1;
create table r1 (
id1 int,
id2 int,
type int,
value varchar(100),
value2 int,
value3 int,
primary key (type, id1, id2),
index id1_type (id1, type, value2, value, id2)
) engine=rocksdb collate latin1_bin;
select 'loading data';
loading data
loading data
set global rocksdb_force_flush_memtable_now=1;
optimize table r1;
Table Op Msg_type Msg_text
test.r1 optimize status OK
Test 1: Do a bunch of updates without setting the compaction sysvar
Expect: no compaction
set global rocksdb_compaction_sequential_deletes_window=0;
set global rocksdb_compaction_sequential_deletes= 0;
set global rocksdb_compaction_sequential_deletes_file_size=0;
set global rocksdb_force_flush_memtable_now=1;
select sleep(1);
sleep(1)
0
wait_for_delete: 0
There are deletes left
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_file_size= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_window= 0;
Test 2: Do a bunch of updates and set the compaction sysvar
Expect: compaction
set global rocksdb_compaction_sequential_deletes_window=1000;
set global rocksdb_compaction_sequential_deletes= 990;
set global rocksdb_compaction_sequential_deletes_file_size=0;
set global rocksdb_force_flush_memtable_now=1;
select sleep(1);
sleep(1)
0
wait_for_delete: 1
No more deletes left
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_file_size= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_window= 0;
Test 3: Do a bunch of updates and set the compaction sysvar and a file size to something large
Expect: no compaction
set global rocksdb_compaction_sequential_deletes_window=1000;
set global rocksdb_compaction_sequential_deletes= 1000;
set global rocksdb_compaction_sequential_deletes_file_size=1000000;
set global rocksdb_force_flush_memtable_now=1;
select sleep(1);
sleep(1)
0
wait_for_delete: 0
There are deletes left
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_file_size= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_window= 0;
Test 4: Do a bunch of secondary key updates and set the compaction sysvar
Expect: compaction
set global rocksdb_compaction_sequential_deletes_window=1000;
set global rocksdb_compaction_sequential_deletes= 50;
set global rocksdb_compaction_sequential_deletes_file_size=0;
set global rocksdb_force_flush_memtable_now=1;
select sleep(1);
sleep(1)
0
wait_for_delete: 1
No more deletes left
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_file_size= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_window= 0;
Test 5: Do a bunch of secondary key updates and set the compaction sysvar,
and rocksdb_compaction_sequential_deletes_count_sd turned on
Expect: compaction
SET @save_rocksdb_compaction_sequential_deletes_count_sd = @@global.rocksdb_compaction_sequential_deletes_count_sd;
SET GLOBAL rocksdb_compaction_sequential_deletes_count_sd= ON;
set global rocksdb_compaction_sequential_deletes_window=1000;
set global rocksdb_compaction_sequential_deletes= 50;
set global rocksdb_compaction_sequential_deletes_file_size=0;
set global rocksdb_force_flush_memtable_now=1;
select sleep(1);
sleep(1)
0
wait_for_delete: 1
No more deletes left
SET GLOBAL rocksdb_compaction_sequential_deletes= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_file_size= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_window= 0;
SET GLOBAL rocksdb_compaction_sequential_deletes_count_sd= @save_rocksdb_compaction_sequential_deletes_count_sd;
drop table r1;
create table t (id int primary key) engine=rocksdb;
drop table t;
DROP DATABASE IF EXISTS mysqlslap;
CREATE DATABASE mysqlslap;
use mysqlslap;
CREATE TABLE a1 (a int, b int) ENGINE=ROCKSDB;
INSERT INTO a1 VALUES (1, 1);
SHOW CREATE TABLE a1;
Table Create Table
a1 CREATE TABLE `a1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=ROCKSDB DEFAULT CHARSET=latin1
DROP DATABASE mysqlslap;
# -- WARNING ----------------------------------------------------------------
# According to I_S.ENGINES, does not support transactions.
# If it is true, the test will most likely fail; you can
# either create an rdiff file, or add the test to disabled.def.
# If transactions should be supported, check the data in Information Schema.
# ---------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
connect con1,localhost,root,,;
connect con2,localhost,root,,;
connection con1;
CREATE TABLE t1 (a INT, pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=ROCKSDB;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection con2;
INSERT INTO t1 (a) VALUES (1);
connection con1;
# If consistent read works on this isolation level (SERIALIZABLE), the following SELECT should not return the value we inserted (1)
SELECT a FROM t1;
a
COMMIT;
connection default;
disconnect con1;
disconnect con2;
DROP TABLE t1;
This diff is collapsed.
#
# Validate that deadlock errors don't occur with a high level of concurrency
#
# Disable for valgrind because this takes too long
DROP DATABASE IF EXISTS mysqlslap;
CREATE DATABASE mysqlslap;
USE mysqlslap;
CREATE TABLE t1(id1 BIGINT, id2 BIGINT, count INT, PRIMARY KEY(id1, id2), KEY(id2)) ENGINE=rocksdb;
CREATE TABLE t1rev(id1 BIGINT, id2 BIGINT, count INT, PRIMARY KEY(id1, id2) COMMENT "rev:cf2", KEY(id2) COMMENT "rev:cf2") ENGINE=rocksdb;
SET @save = @@global.rocksdb_lock_wait_timeout;
SET GLOBAL rocksdb_lock_wait_timeout = 60;
SELECT count from t1;
count
50000
SELECT count from t1;
count
100000
SELECT count from t1;
count
150000
SELECT count from t1;
count
200000
SELECT count from t1rev;
count
50000
SELECT count from t1rev;
count
100000
SELECT count from t1rev;
count
150000
SELECT count from t1rev;
count
200000
SET GLOBAL rocksdb_lock_wait_timeout = @save;
DROP DATABASE mysqlslap;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
DROP DATABASE IF EXISTS test_drop_database;
CREATE DATABASE test_drop_database;
CREATE TABLE t1 (a int, b int, c int, primary key (a), unique key (b)) ENGINE=ROCKSDB;
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY (a);
DROP TABLE t1;
DROP DATABASE test_drop_database;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (i INT, PRIMARY KEY (i) COMMENT '__system__') ENGINE = ROCKSDB;
ERROR HY000: Incorrect arguments to column family not valid for storing index data
DROP TABLE IF EXISTS t1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment