Skip to content
Permalink
Browse files

MDEV-11901 : MariaRocks on Windows

fixed compilation, disabled unix-only tests (the ones that use bash
etc).

Changed plugin library name to ha_rocksdb.dll/so
  • Loading branch information...
vaintroub committed Feb 1, 2017
1 parent 13c7839 commit 5875633c2a78fdb2db4ac621b093730962bc1f4d
Showing with 756 additions and 344 deletions.
  1. +78 −78 include/m_ctype.h
  2. +19 −25 include/my_bit.h
  3. +17 −0 include/mysql/plugin.h
  4. +0 −18 mysys/my_bit.c
  5. +135 −96 storage/rocksdb/CMakeLists.txt
  6. +337 −0 storage/rocksdb/build_rocksdb.cmake
  7. +56 −56 storage/rocksdb/ha_rocksdb.cc
  8. +8 −0 storage/rocksdb/ha_rocksdb.h
  9. +0 −42 storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
  10. +5 −5 storage/rocksdb/mysql-test/rocksdb/r/partition.result
  11. +1 −1 storage/rocksdb/mysql-test/rocksdb/suite.opt
  12. +3 −0 storage/rocksdb/mysql-test/rocksdb/t/checkpoint.test
  13. +4 −0 storage/rocksdb/mysql-test/rocksdb/t/collation.test
  14. +1 −0 storage/rocksdb/mysql-test/rocksdb/t/compact_deletes.test
  15. +3 −0 storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
  16. +2 −0 storage/rocksdb/mysql-test/rocksdb/t/drop_table.test
  17. +3 −0 storage/rocksdb/mysql-test/rocksdb/t/drop_table2.test
  18. +3 −3 storage/rocksdb/mysql-test/rocksdb/t/duplicate_table.test
  19. +8 −0 storage/rocksdb/mysql-test/rocksdb/t/innodb_i_s_tables_disabled.test
  20. +2 −1 storage/rocksdb/mysql-test/rocksdb/t/partition.test
  21. +2 −0 storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test
  22. +2 −1 storage/rocksdb/mysql-test/rocksdb/t/rocksdb_datadir.test
  23. +1 −0 storage/rocksdb/mysql-test/rocksdb/t/rocksdb_parts.test
  24. +2 −1 storage/rocksdb/mysql-test/rocksdb/t/rqg.inc
  25. +3 −0 storage/rocksdb/mysql-test/rocksdb/t/slow_query_log.test
  26. +1 −1 storage/rocksdb/mysql-test/rocksdb/t/statistics.test
  27. +2 −0 storage/rocksdb/mysql-test/rocksdb/t/unique_sec.test
  28. +8 −5 storage/rocksdb/properties_collector.cc
  29. +10 −0 storage/rocksdb/rdb_buff.h
  30. +6 −6 storage/rocksdb/rdb_datadic.cc
  31. +3 −0 storage/rocksdb/rdb_datadic.h
  32. +3 −3 storage/rocksdb/rdb_i_s.cc
  33. +1 −1 storage/rocksdb/rdb_mariadb_server_port.cc
  34. +1 −1 storage/rocksdb/rdb_sst_info.h
  35. +26 −0 storage/rocksdb/rdb_threads.h
@@ -360,7 +360,7 @@ struct my_collation_handler_st
};

extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
extern MYSQL_PLUGIN_IMPORT MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler;
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
@@ -586,83 +586,83 @@ extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1_nopad;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_general_ci;

extern struct charset_info_st my_charset_big5_bin;
extern struct charset_info_st my_charset_big5_chinese_ci;
extern struct charset_info_st my_charset_big5_nopad_bin;
extern struct charset_info_st my_charset_big5_chinese_nopad_ci;
extern struct charset_info_st my_charset_cp1250_czech_ci;
extern struct charset_info_st my_charset_cp932_bin;
extern struct charset_info_st my_charset_cp932_japanese_ci;
extern struct charset_info_st my_charset_cp932_nopad_bin;
extern struct charset_info_st my_charset_cp932_japanese_nopad_ci;
extern struct charset_info_st my_charset_eucjpms_bin;
extern struct charset_info_st my_charset_eucjpms_japanese_ci;
extern struct charset_info_st my_charset_eucjpms_nopad_bin;
extern struct charset_info_st my_charset_eucjpms_japanese_nopad_ci;
extern struct charset_info_st my_charset_euckr_bin;
extern struct charset_info_st my_charset_euckr_korean_ci;
extern struct charset_info_st my_charset_euckr_nopad_bin;
extern struct charset_info_st my_charset_euckr_korean_nopad_ci;
extern struct charset_info_st my_charset_gb2312_bin;
extern struct charset_info_st my_charset_gb2312_chinese_ci;
extern struct charset_info_st my_charset_gb2312_nopad_bin;
extern struct charset_info_st my_charset_gb2312_chinese_nopad_ci;
extern struct charset_info_st my_charset_gbk_bin;
extern struct charset_info_st my_charset_gbk_chinese_ci;
extern struct charset_info_st my_charset_gbk_nopad_bin;
extern struct charset_info_st my_charset_gbk_chinese_nopad_ci;
extern struct charset_info_st my_charset_latin1_bin;
extern struct charset_info_st my_charset_latin1_nopad_bin;
extern struct charset_info_st my_charset_latin1_german2_ci;
extern struct charset_info_st my_charset_latin2_czech_ci;
extern struct charset_info_st my_charset_sjis_bin;
extern struct charset_info_st my_charset_sjis_japanese_ci;
extern struct charset_info_st my_charset_sjis_nopad_bin;
extern struct charset_info_st my_charset_sjis_japanese_nopad_ci;
extern struct charset_info_st my_charset_tis620_bin;
extern struct charset_info_st my_charset_tis620_thai_ci;
extern struct charset_info_st my_charset_tis620_nopad_bin;
extern struct charset_info_st my_charset_tis620_thai_nopad_ci;
extern struct charset_info_st my_charset_ucs2_bin;
extern struct charset_info_st my_charset_ucs2_general_ci;
extern struct charset_info_st my_charset_ucs2_nopad_bin;
extern struct charset_info_st my_charset_ucs2_general_nopad_ci;
extern struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern struct charset_info_st my_charset_ucs2_unicode_ci;
extern struct charset_info_st my_charset_ucs2_unicode_nopad_ci;
extern struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern struct charset_info_st my_charset_ujis_bin;
extern struct charset_info_st my_charset_ujis_japanese_ci;
extern struct charset_info_st my_charset_ujis_nopad_bin;
extern struct charset_info_st my_charset_ujis_japanese_nopad_ci;
extern struct charset_info_st my_charset_utf16_bin;
extern struct charset_info_st my_charset_utf16_general_ci;
extern struct charset_info_st my_charset_utf16_unicode_ci;
extern struct charset_info_st my_charset_utf16_unicode_nopad_ci;
extern struct charset_info_st my_charset_utf16le_bin;
extern struct charset_info_st my_charset_utf16le_general_ci;
extern struct charset_info_st my_charset_utf16_general_nopad_ci;
extern struct charset_info_st my_charset_utf16_nopad_bin;
extern struct charset_info_st my_charset_utf16le_nopad_bin;
extern struct charset_info_st my_charset_utf16le_general_nopad_ci;
extern struct charset_info_st my_charset_utf32_bin;
extern struct charset_info_st my_charset_utf32_general_ci;
extern struct charset_info_st my_charset_utf32_unicode_ci;
extern struct charset_info_st my_charset_utf32_unicode_nopad_ci;
extern struct charset_info_st my_charset_utf32_nopad_bin;
extern struct charset_info_st my_charset_utf32_general_nopad_ci;
extern struct charset_info_st my_charset_utf8_bin;
extern struct charset_info_st my_charset_utf8_nopad_bin;
extern struct charset_info_st my_charset_utf8_general_nopad_ci;
extern struct charset_info_st my_charset_utf8_general_mysql500_ci;
extern struct charset_info_st my_charset_utf8_unicode_ci;
extern struct charset_info_st my_charset_utf8_unicode_nopad_ci;
extern struct charset_info_st my_charset_utf8mb4_bin;
extern struct charset_info_st my_charset_utf8mb4_general_ci;
extern struct charset_info_st my_charset_utf8mb4_nopad_bin;
extern struct charset_info_st my_charset_utf8mb4_general_nopad_ci;
extern struct charset_info_st my_charset_utf8mb4_unicode_ci;
extern struct charset_info_st my_charset_utf8mb4_unicode_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_big5_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_big5_chinese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_big5_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_big5_chinese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_cp1250_czech_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_cp932_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_cp932_japanese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_cp932_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_cp932_japanese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_eucjpms_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_eucjpms_japanese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_eucjpms_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_eucjpms_japanese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_euckr_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_euckr_korean_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_euckr_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_euckr_korean_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gb2312_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gb2312_chinese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gb2312_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gb2312_chinese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gbk_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gbk_chinese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gbk_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_gbk_chinese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1_german2_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin2_czech_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_sjis_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_sjis_japanese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_sjis_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_sjis_japanese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_tis620_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_tis620_thai_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_tis620_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_tis620_thai_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_general_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_general_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_unicode_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_unicode_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ujis_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ujis_japanese_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ujis_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_ujis_japanese_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16_general_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16_unicode_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16_unicode_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16le_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16le_general_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16_general_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16le_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf16le_general_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf32_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf32_general_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf32_unicode_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf32_unicode_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf32_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf32_general_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_general_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_general_mysql500_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_unicode_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_unicode_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8mb4_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8mb4_general_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8mb4_nopad_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8mb4_general_nopad_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8mb4_unicode_ci;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8mb4_unicode_nopad_ci;

#define MY_UTF8MB3 "utf8"
#define MY_UTF8MB4 "utf8mb4"
@@ -25,7 +25,6 @@

C_MODE_START

extern const char _my_bits_nbits[256];
extern const uchar _my_bits_reverse_table[256];

/*
@@ -40,37 +39,32 @@ static inline uint my_bit_log2(ulong value)
return bit;
}

static inline uint my_count_bits(ulonglong v)

/*
Count bits in 32bit integer
Algorithm by Sean Anderson, according to:
http://graphics.stanford.edu/~seander/bithacks.html
under "Counting bits set, in parallel"
(Orignal code public domain).
*/
static inline uint my_count_bits_uint32(uint32 v)
{
#if SIZEOF_LONG_LONG > 4
/* The following code is a bit faster on 16 bit machines than if we would
only shift v */
ulong v2=(ulong) (v >> 32);
return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
_my_bits_nbits[(uchar) (v >> 8)] +
_my_bits_nbits[(uchar) (v >> 16)] +
_my_bits_nbits[(uchar) (v >> 24)] +
_my_bits_nbits[(uchar) (v2)] +
_my_bits_nbits[(uchar) (v2 >> 8)] +
_my_bits_nbits[(uchar) (v2 >> 16)] +
_my_bits_nbits[(uchar) (v2 >> 24)]);
#else
return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
_my_bits_nbits[(uchar) (v >> 8)] +
_my_bits_nbits[(uchar) (v >> 16)] +
_my_bits_nbits[(uchar) (v >> 24)]);
#endif
v = v - ((v >> 1) & 0x55555555);
v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
return (((v + (v >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
}

static inline uint my_count_bits_uint32(uint32 v)

static inline uint my_count_bits(ulonglong x)
{
return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
_my_bits_nbits[(uchar) (v >> 8)] +
_my_bits_nbits[(uchar) (v >> 16)] +
_my_bits_nbits[(uchar) (v >> 24)]);
return my_count_bits_uint32((uint32)x) + my_count_bits_uint32((uint32)(x >> 32));
}




/*
Next highest power of two
@@ -393,6 +393,23 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, min, max, blk }

#define MYSQL_SYSVAR_UINT64_T(name, varname, opt, comment, check, update, def, min, max, blk) \
DECLARE_MYSQL_SYSVAR_SIMPLE(name, uint64_t) = { \
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, min, max, blk }

#ifdef _WIN64
#define MYSQL_SYSVAR_SIZE_T(name, varname, opt, comment, check, update, def, min, max, blk) \
DECLARE_MYSQL_SYSVAR_SIMPLE(name, size_t) = { \
PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, min, max, blk }
#else
#define MYSQL_SYSVAR_SIZE_T(name, varname, opt, comment, check, update, def, min, max, blk) \
DECLARE_MYSQL_SYSVAR_SIMPLE(name, size_t) = { \
PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def, min, max, blk }
#endif

#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \
DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \
PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \
@@ -17,24 +17,6 @@

#include <my_bit.h>

const char _my_bits_nbits[256] = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8,
};

/*
perl -e 'print map{", 0x".unpack H2,pack B8,unpack b8,chr$_}(0..255)'

0 comments on commit 5875633

Please sign in to comment.
You can’t perform that action at this time.