Commit 16c01c70 authored by Sergei Golubchik's avatar Sergei Golubchik

after merge: fix mroonga to compile and pass its tests

parent da637137
...@@ -46,6 +46,11 @@ if(MRN_BUNDLED) ...@@ -46,6 +46,11 @@ if(MRN_BUNDLED)
endif() endif()
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_RELATIVE_DIR "vendor/groonga")
set(MRN_BUNDLED_GROONGA_DIR set(MRN_BUNDLED_GROONGA_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/${MRN_BUNDLED_GROONGA_RELATIVE_DIR}") "${CMAKE_CURRENT_SOURCE_DIR}/${MRN_BUNDLED_GROONGA_RELATIVE_DIR}")
......
...@@ -6467,24 +6467,34 @@ int ha_mroonga::delete_row(const uchar *buf) ...@@ -6467,24 +6467,34 @@ int ha_mroonga::delete_row(const uchar *buf)
DBUG_RETURN(error); DBUG_RETURN(error);
} }
uint ha_mroonga::wrapper_max_supported_key_parts() uint ha_mroonga::wrapper_max_supported_key_parts() const
{ {
MRN_DBUG_ENTER_METHOD(); MRN_DBUG_ENTER_METHOD();
DBUG_RETURN(MAX_REF_PARTS); 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(); 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(); MRN_DBUG_ENTER_METHOD();
uint parts; 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(); parts = wrapper_max_supported_key_parts();
} else { } else {
parts = storage_max_supported_key_parts(); parts = storage_max_supported_key_parts();
......
...@@ -348,7 +348,7 @@ public: ...@@ -348,7 +348,7 @@ public:
uint max_supported_record_length() const; uint max_supported_record_length() const;
uint max_supported_keys() 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_length() const;
uint max_supported_key_part_length() const; uint max_supported_key_part_length() const;
...@@ -812,8 +812,8 @@ private: ...@@ -812,8 +812,8 @@ private:
uint storage_max_supported_record_length() const; uint storage_max_supported_record_length() const;
uint wrapper_max_supported_keys() const; uint wrapper_max_supported_keys() const;
uint storage_max_supported_keys() const; uint storage_max_supported_keys() const;
uint wrapper_max_supported_key_parts(); uint wrapper_max_supported_key_parts() const;
uint storage_max_supported_key_parts(); uint storage_max_supported_key_parts() const;
uint wrapper_max_supported_key_length() const; uint wrapper_max_supported_key_length() const;
uint storage_max_supported_key_length() const; uint storage_max_supported_key_length() const;
uint wrapper_max_supported_key_part_length() const; uint wrapper_max_supported_key_part_length() const;
......
...@@ -24,4 +24,4 @@ column_create terms term COLUMN_SCALAR ShortText ...@@ -24,4 +24,4 @@ column_create terms term COLUMN_SCALAR ShortText
table_create memos TABLE_PAT_KEY Int32 table_create memos TABLE_PAT_KEY Int32
column_create memos content COLUMN_SCALAR LongText column_create memos content COLUMN_SCALAR LongText
column_create memos id COLUMN_SCALAR Int32 column_create memos id COLUMN_SCALAR Int32
DROP TABLE memos; DROP TABLE memos, terms;
...@@ -25,4 +25,4 @@ table_create memos TABLE_PAT_KEY Int32 ...@@ -25,4 +25,4 @@ table_create memos TABLE_PAT_KEY Int32
column_create memos content COLUMN_SCALAR LongText column_create memos content COLUMN_SCALAR LongText
column_create memos id COLUMN_SCALAR Int32 column_create memos id COLUMN_SCALAR Int32
column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content column_create terms content_index COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos; DROP TABLE memos, terms;
...@@ -39,7 +39,7 @@ SELECT mroonga_command("dump"); ...@@ -39,7 +39,7 @@ SELECT mroonga_command("dump");
ALTER TABLE memos DISABLE KEYS; ALTER TABLE memos DISABLE KEYS;
SELECT mroonga_command("dump"); SELECT mroonga_command("dump");
DROP TABLE memos; DROP TABLE memos, terms;
--source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/unload_mroonga_functions.inc
--source ../../include/mroonga/have_mroonga_deinit.inc --source ../../include/mroonga/have_mroonga_deinit.inc
...@@ -40,7 +40,7 @@ SELECT mroonga_command("dump"); ...@@ -40,7 +40,7 @@ SELECT mroonga_command("dump");
ALTER TABLE memos ENABLE KEYS; ALTER TABLE memos ENABLE KEYS;
SELECT mroonga_command("dump"); SELECT mroonga_command("dump");
DROP TABLE memos; DROP TABLE memos, terms;
--source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/unload_mroonga_functions.inc
--source ../../include/mroonga/have_mroonga_deinit.inc --source ../../include/mroonga/have_mroonga_deinit.inc
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
set(NORMALIZERS_DIR "${GROONGA_PLUGINS_DIR}/normalizers") set(NORMALIZERS_DIR "${GROONGA_PLUGINS_DIR}/normalizers")
read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/mysql_sources.am MYSQL_SOURCES) read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/mysql_sources.am MYSQL_SOURCES)
if(GROONGA_NORMALIZER_MYSQL_EMBED) 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 set_property(TARGET mysql_normalizer APPEND PROPERTY
COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_EMBED") COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_EMBED")
else() else()
......
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