1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-3628 Move I_S tables into main handler lib

The I_S tables are all now in ha_columnstore.so
This commit is contained in:
Andrew Hutchings
2019-11-25 14:17:17 +00:00
parent efe829784d
commit e072bf9e9b
7 changed files with 106 additions and 148 deletions

View File

@ -23,7 +23,11 @@ SET ( libcalmysql_SRCS
ha_view.cpp sm.cpp ha_view.cpp sm.cpp
ha_window_function.cpp ha_window_function.cpp
ha_mcs_partition.cpp ha_mcs_partition.cpp
ha_pseudocolumn.cpp) ha_pseudocolumn.cpp
is_columnstore_tables.cpp
is_columnstore_columns.cpp
is_columnstore_files.cpp
is_columnstore_extents.cpp)
add_definitions(-DMYSQL_DYNAMIC_PLUGIN) add_definitions(-DMYSQL_DYNAMIC_PLUGIN)
@ -36,56 +40,7 @@ target_link_libraries(ha_columnstore ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NE
set_target_properties(ha_columnstore PROPERTIES VERSION 1.0.0 SOVERSION 1) set_target_properties(ha_columnstore PROPERTIES VERSION 1.0.0 SOVERSION 1)
SET ( is_columnstore_tables_SRCS install(TARGETS ha_columnstore DESTINATION ${MARIADB_PLUGINDIR} COMPONENT storage-engine)
is_columnstore_tables.cpp
sm.cpp
)
add_library(is_columnstore_tables SHARED ${is_columnstore_tables_SRCS})
target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
# Don't prepend .so file with 'lib'
set_target_properties(is_columnstore_tables PROPERTIES PREFIX "")
set_target_properties(is_columnstore_tables PROPERTIES VERSION 1.0.0 SOVERSION 1)
SET ( is_columnstore_columns_SRCS
is_columnstore_columns.cpp
sm.cpp
)
add_library(is_columnstore_columns SHARED ${is_columnstore_columns_SRCS})
target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
# Don't prepend .so file with 'lib'
set_target_properties(is_columnstore_columns PROPERTIES PREFIX "")
set_target_properties(is_columnstore_columns PROPERTIES VERSION 1.0.0 SOVERSION 1)
SET ( is_columnstore_extents_SRCS
is_columnstore_extents.cpp
sm.cpp
)
add_library(is_columnstore_extents SHARED ${is_columnstore_extents_SRCS})
target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
# Don't prepend .so file with 'lib'
set_target_properties(is_columnstore_extents PROPERTIES PREFIX "")
set_target_properties(is_columnstore_extents PROPERTIES VERSION 1.0.0 SOVERSION 1)
SET ( is_columnstore_files_SRCS
is_columnstore_files.cpp
sm.cpp
)
add_library(is_columnstore_files SHARED ${is_columnstore_files_SRCS})
target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_DIR}/libservices/libmysqlservices.a threadpool)
# Don't prepend .so file with 'lib'
set_target_properties(is_columnstore_files PROPERTIES PREFIX "")
set_target_properties(is_columnstore_files PROPERTIES VERSION 1.0.0 SOVERSION 1)
install(TARGETS ha_columnstore is_columnstore_tables is_columnstore_columns is_columnstore_extents is_columnstore_files DESTINATION ${MARIADB_PLUGINDIR} COMPONENT storage-engine)
install(FILES syscatalog_mysql.sql install(FILES syscatalog_mysql.sql
dumpcat_mysql.sql dumpcat_mysql.sql
calsetuserpriority.sql calsetuserpriority.sql

View File

@ -23,6 +23,7 @@
#include "ha_mcs_pushdown.h" #include "ha_mcs_pushdown.h"
#define NEED_CALPONT_EXTERNS #define NEED_CALPONT_EXTERNS
#include "ha_mcs_impl.h" #include "ha_mcs_impl.h"
#include "is_columnstore.h"
static handler* calpont_create_handler(handlerton* hton, static handler* calpont_create_handler(handlerton* hton,
TABLE_SHARE* table, TABLE_SHARE* table,
@ -911,6 +912,10 @@ const COND* ha_mcs::cond_push(const COND* cond)
struct st_mysql_storage_engine columnstore_storage_engine = struct st_mysql_storage_engine columnstore_storage_engine =
{ MYSQL_HANDLERTON_INTERFACE_VERSION }; { MYSQL_HANDLERTON_INTERFACE_VERSION };
static struct st_mysql_information_schema is_columnstore_plugin_version =
{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
mysql_declare_plugin(columnstore) mysql_declare_plugin(columnstore)
{ {
MYSQL_STORAGE_ENGINE_PLUGIN, MYSQL_STORAGE_ENGINE_PLUGIN,
@ -943,6 +948,70 @@ maria_declare_plugin(columnstore)
mcs_system_variables, /* system variables */ mcs_system_variables, /* system variables */
"1.0", /* string version */ "1.0", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_plugin_version,
"COLUMNSTORE_COLUMNS",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore columns",
PLUGIN_LICENSE_GPL,
is_columnstore_columns_plugin_init,
//is_columnstore_tables_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_plugin_version,
"COLUMNSTORE_TABLES",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore tables",
PLUGIN_LICENSE_GPL,
is_columnstore_tables_plugin_init,
//is_columnstore_tables_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_plugin_version,
"COLUMNSTORE_FILES",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore filess",
PLUGIN_LICENSE_GPL,
is_columnstore_files_plugin_init,
//is_columnstore_files_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_plugin_version,
"COLUMNSTORE_EXTENTS",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore extents",
PLUGIN_LICENSE_GPL,
is_columnstore_extents_plugin_init,
//is_columnstore_extents_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
} }
maria_declare_plugin_end; maria_declare_plugin_end;

View File

@ -0,0 +1,23 @@
/* Copyright (C) 2019 MariaDB Corporation
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., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#pragma once
int is_columnstore_extents_plugin_init(void* p);
int is_columnstore_files_plugin_init(void* p);
int is_columnstore_tables_plugin_init(void* p);
int is_columnstore_columns_plugin_init(void* p);

View File

@ -28,6 +28,7 @@
#include "calpontsystemcatalog.h" #include "calpontsystemcatalog.h"
#include "dataconvert.h" #include "dataconvert.h"
#include "exceptclasses.h" #include "exceptclasses.h"
#include "is_columnstore.h"
using namespace logging; using namespace logging;
@ -260,7 +261,7 @@ static int is_columnstore_columns_fill(THD* thd, TABLE_LIST* tables, COND* cond)
return 0; return 0;
} }
static int is_columnstore_columns_plugin_init(void* p) int is_columnstore_columns_plugin_init(void* p)
{ {
ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p; ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p;
schema->fields_info = is_columnstore_columns_fields; schema->fields_info = is_columnstore_columns_fields;
@ -268,26 +269,3 @@ static int is_columnstore_columns_plugin_init(void* p)
return 0; return 0;
} }
static struct st_mysql_information_schema is_columnstore_columns_plugin_version =
{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
maria_declare_plugin(is_columnstore_columns_plugin)
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_columns_plugin_version,
"COLUMNSTORE_COLUMNS",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore columns",
PLUGIN_LICENSE_GPL,
is_columnstore_columns_plugin_init,
//is_columnstore_tables_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;

View File

@ -26,7 +26,7 @@
#include "dbrm.h" #include "dbrm.h"
#include "objectidmanager.h" #include "objectidmanager.h"
#include "is_columnstore.h"
// Required declaration as it isn't in a MairaDB include // Required declaration as it isn't in a MairaDB include
bool schema_table_store_record(THD* thd, TABLE* table); bool schema_table_store_record(THD* thd, TABLE* table);
@ -278,34 +278,10 @@ static int is_columnstore_extents_fill(THD* thd, TABLE_LIST* tables, COND* cond)
return 0; return 0;
} }
static int is_columnstore_extents_plugin_init(void* p) int is_columnstore_extents_plugin_init(void* p)
{ {
ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p; ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p;
schema->fields_info = is_columnstore_extents_fields; schema->fields_info = is_columnstore_extents_fields;
schema->fill_table = is_columnstore_extents_fill; schema->fill_table = is_columnstore_extents_fill;
return 0; return 0;
} }
static struct st_mysql_information_schema is_columnstore_extents_plugin_version =
{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
maria_declare_plugin(is_columnstore_extents_plugin)
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_extents_plugin_version,
"COLUMNSTORE_EXTENTS",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore extents",
PLUGIN_LICENSE_GPL,
is_columnstore_extents_plugin_init,
//is_columnstore_extents_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;

View File

@ -35,6 +35,7 @@
#include "messagequeue.h" #include "messagequeue.h"
#include "messagequeuepool.h" #include "messagequeuepool.h"
#include "we_messages.h" #include "we_messages.h"
#include "is_columnstore.h"
// Required declaration as it isn't in a MairaDB include // Required declaration as it isn't in a MairaDB include
bool schema_table_store_record(THD* thd, TABLE* table); bool schema_table_store_record(THD* thd, TABLE* table);
@ -289,7 +290,7 @@ static int is_columnstore_files_fill(THD* thd, TABLE_LIST* tables, COND* cond)
return 0; return 0;
} }
static int is_columnstore_files_plugin_init(void* p) int is_columnstore_files_plugin_init(void* p)
{ {
ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p; ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p;
schema->fields_info = is_columnstore_files_fields; schema->fields_info = is_columnstore_files_fields;
@ -297,24 +298,3 @@ static int is_columnstore_files_plugin_init(void* p)
return 0; return 0;
} }
static struct st_mysql_information_schema is_columnstore_files_plugin_version =
{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
maria_declare_plugin(is_columnstore_files_plugin)
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_files_plugin_version,
"COLUMNSTORE_FILES",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore filess",
PLUGIN_LICENSE_GPL,
is_columnstore_files_plugin_init,
//is_columnstore_files_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;

View File

@ -26,7 +26,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include "calpontsystemcatalog.h" #include "calpontsystemcatalog.h"
#include "dataconvert.h" #include "dataconvert.h"
#include "is_columnstore.h"
// Required declaration as it isn't in a MairaDB include // Required declaration as it isn't in a MairaDB include
bool schema_table_store_record(THD* thd, TABLE* table); bool schema_table_store_record(THD* thd, TABLE* table);
@ -158,7 +158,7 @@ static int is_columnstore_tables_fill(THD* thd, TABLE_LIST* tables, COND* cond)
return 0; return 0;
} }
static int is_columnstore_tables_plugin_init(void* p) int is_columnstore_tables_plugin_init(void* p)
{ {
ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p; ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p;
schema->fields_info = is_columnstore_tables_fields; schema->fields_info = is_columnstore_tables_fields;
@ -166,26 +166,3 @@ static int is_columnstore_tables_plugin_init(void* p)
return 0; return 0;
} }
static struct st_mysql_information_schema is_columnstore_tables_plugin_version =
{ MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
maria_declare_plugin(is_columnstore_tables_plugin)
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&is_columnstore_tables_plugin_version,
"COLUMNSTORE_TABLES",
"MariaDB Corporation",
"An information schema plugin to list ColumnStore tables",
PLUGIN_LICENSE_GPL,
is_columnstore_tables_plugin_init,
//is_columnstore_tables_plugin_deinit,
NULL,
0x0100,
NULL,
NULL,
"1.0",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;