[Commits] Rev 4611: after merge: fix mroonga to compile and pass its tests in lp:~maria-captains/maria/10.0

Sergei Golubchik serg at mariadb.org
Thu Feb 19 11:26:52 EET 2015


At lp:~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4611
revision-id: sergii at pisem.net-20150219092652-g0mul1tsytvb9lkn
parent: sergii at pisem.net-20150219085734-z6k4brol2oigjwd6
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 10.0
timestamp: Thu 2015-02-19 10:26:52 +0100
message:
  after merge: fix mroonga to compile and pass its tests
=== modified file 'storage/mroonga/CMakeLists.txt'
--- a/storage/mroonga/CMakeLists.txt	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/CMakeLists.txt	2015-02-19 09:26:52 +0000
@@ -46,6 +46,11 @@ if(MRN_BUNDLED)
   endif()
 endif()
 
+IF(HAVE_WVLA)
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-vla")
+  SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-vla")
+ENDIF()
+
 set(MRN_BUNDLED_GROONGA_RELATIVE_DIR "vendor/groonga")
 set(MRN_BUNDLED_GROONGA_DIR
   "${CMAKE_CURRENT_SOURCE_DIR}/${MRN_BUNDLED_GROONGA_RELATIVE_DIR}")

=== modified file 'storage/mroonga/ha_mroonga.cpp'
--- a/storage/mroonga/ha_mroonga.cpp	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/ha_mroonga.cpp	2015-02-19 09:26:52 +0000
@@ -6467,24 +6467,34 @@ int ha_mroonga::delete_row(const uchar *
   DBUG_RETURN(error);
 }
 
-uint ha_mroonga::wrapper_max_supported_key_parts()
+uint ha_mroonga::wrapper_max_supported_key_parts() const
 {
   MRN_DBUG_ENTER_METHOD();
   DBUG_RETURN(MAX_REF_PARTS);
 }
 
-uint ha_mroonga::storage_max_supported_key_parts()
+uint ha_mroonga::storage_max_supported_key_parts() const
 {
   MRN_DBUG_ENTER_METHOD();
-  DBUG_RETURN(1);
+  DBUG_RETURN(MAX_REF_PARTS);
 }
 
-uint ha_mroonga::max_supported_key_parts()
+uint ha_mroonga::max_supported_key_parts() const
 {
   MRN_DBUG_ENTER_METHOD();
   uint parts;
-  if (share->wrapper_mode)
-  {
+  if (!share && !analyzed_for_create &&
+    (
+      thd_sql_command(ha_thd()) == SQLCOM_CREATE_TABLE ||
+      thd_sql_command(ha_thd()) == SQLCOM_CREATE_INDEX ||
+      thd_sql_command(ha_thd()) == SQLCOM_ALTER_TABLE
+    )
+  ) {
+    create_share_for_create();
+  }
+  if (analyzed_for_create && share_for_create.wrapper_mode) {
+    parts = wrapper_max_supported_key_parts();
+  } else if (wrap_handler && share && share->wrapper_mode) {
     parts = wrapper_max_supported_key_parts();
   } else {
     parts = storage_max_supported_key_parts();

=== modified file 'storage/mroonga/ha_mroonga.hpp'
--- a/storage/mroonga/ha_mroonga.hpp	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/ha_mroonga.hpp	2015-02-19 09:26:52 +0000
@@ -348,7 +348,7 @@ class ha_mroonga: public handler
 
   uint max_supported_record_length()   const;
   uint max_supported_keys()            const;
-  uint max_supported_key_parts();
+  uint max_supported_key_parts()       const;
   uint max_supported_key_length()      const;
   uint max_supported_key_part_length() const;
 
@@ -812,8 +812,8 @@ class ha_mroonga: public handler
   uint storage_max_supported_record_length() const;
   uint wrapper_max_supported_keys() const;
   uint storage_max_supported_keys() const;
-  uint wrapper_max_supported_key_parts();
-  uint storage_max_supported_key_parts();
+  uint wrapper_max_supported_key_parts() const;
+  uint storage_max_supported_key_parts() const;
   uint wrapper_max_supported_key_length() const;
   uint storage_max_supported_key_length() const;
   uint wrapper_max_supported_key_part_length() const;

=== modified file 'storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result'
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_disable_keys_fulltext_table.result	2015-02-19 09:26:52 +0000
@@ -24,4 +24,4 @@ column_create terms term COLUMN_SCALAR S
 table_create memos TABLE_PAT_KEY Int32
 column_create memos content COLUMN_SCALAR LongText
 column_create memos id COLUMN_SCALAR Int32
-DROP TABLE memos;
+DROP TABLE memos, terms;

=== modified file 'storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result'
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_enable_keys_fulltext_table.result	2015-02-19 09:26:52 +0000
@@ -25,4 +25,4 @@ table_create memos TABLE_PAT_KEY Int32
 column_create memos content COLUMN_SCALAR LongText
 column_create memos id COLUMN_SCALAR Int32
 column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content
-DROP TABLE memos;
+DROP TABLE memos, terms;

=== modified file 'storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test'
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_disable_keys_fulltext_table.test	2015-02-19 09:26:52 +0000
@@ -39,7 +39,7 @@ SELECT mroonga_command("dump");
 ALTER TABLE memos DISABLE KEYS;
 SELECT mroonga_command("dump");
 
-DROP TABLE memos;
+DROP TABLE memos, terms;
 
 --source ../../include/mroonga/unload_mroonga_functions.inc
 --source ../../include/mroonga/have_mroonga_deinit.inc

=== modified file 'storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test'
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_enable_keys_fulltext_table.test	2015-02-19 09:26:52 +0000
@@ -40,7 +40,7 @@ SELECT mroonga_command("dump");
 ALTER TABLE memos ENABLE KEYS;
 SELECT mroonga_command("dump");
 
-DROP TABLE memos;
+DROP TABLE memos, terms;
 
 --source ../../include/mroonga/unload_mroonga_functions.inc
 --source ../../include/mroonga/have_mroonga_deinit.inc

=== modified file 'storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/normalizers/CMakeLists.txt'
--- a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/normalizers/CMakeLists.txt	2015-02-17 04:34:27 +0000
+++ b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/normalizers/CMakeLists.txt	2015-02-19 09:26:52 +0000
@@ -18,7 +18,7 @@
 set(NORMALIZERS_DIR "${GROONGA_PLUGINS_DIR}/normalizers")
 read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/mysql_sources.am MYSQL_SOURCES)
 if(GROONGA_NORMALIZER_MYSQL_EMBED)
-  add_library(mysql_normalizer STATIC ${MYSQL_SOURCES})
+  add_convenience_library(mysql_normalizer ${MYSQL_SOURCES})
   set_property(TARGET mysql_normalizer APPEND PROPERTY
     COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_EMBED")
 else()



More information about the commits mailing list