Commit 8d098333 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-19833 Reuse new I_S table definition helper classes for Mronga

parent 1cbbe354
......@@ -1271,37 +1271,15 @@ static struct st_mysql_information_schema i_s_info =
MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
};
namespace Show {
static ST_FIELD_INFO i_s_mrn_stats_fields_info[] =
{
{
"VERSION",
40,
MYSQL_TYPE_STRING,
0,
0,
"",
SKIP_OPEN_TABLE
},
{
"rows_written",
MY_INT32_NUM_DECIMAL_DIGITS,
MYSQL_TYPE_LONG,
0,
0,
"Rows written to Groonga",
SKIP_OPEN_TABLE
},
{
"rows_read",
MY_INT32_NUM_DECIMAL_DIGITS,
MYSQL_TYPE_LONG,
0,
0,
"Rows read from Groonga",
SKIP_OPEN_TABLE
},
{ 0, 0, MYSQL_TYPE_NULL, 0, 0, 0, 0}
Column("VERSION", Varchar(40), NOT_NULL),
Column("rows_written", SLong(), NOT_NULL, "Rows written to Groonga"),
Column("rows_read", SLong(), NOT_NULL, "Rows read from Groonga"),
CEnd()
};
} // namespace Show
static int i_s_mrn_stats_deinit(void* p)
{
......@@ -1330,7 +1308,7 @@ static int i_s_mrn_stats_init(void* p)
{
MRN_DBUG_ENTER_FUNCTION();
ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p;
schema->fields_info = i_s_mrn_stats_fields_info;
schema->fields_info = Show::i_s_mrn_stats_fields_info;
schema->fill_table = i_s_mrn_stats_fill;
DBUG_RETURN(0);
}
......
SHOW CREATE TABLE INFORMATION_SCHEMA.MROONGA_STATS;
Table Create Table
Mroonga_stats CREATE TEMPORARY TABLE `Mroonga_stats` (
`VERSION` varchar(40) NOT NULL DEFAULT '',
`rows_written` int(11) NOT NULL DEFAULT 0,
`rows_read` int(11) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
# Copyright (c) 2019, MariaDB
# Copyright(C) 2014 Naoya Murakami <naoya@createfield.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
--source include/not_embedded.inc
--source ../../include/mroonga/have_mroonga.inc
SHOW CREATE TABLE INFORMATION_SCHEMA.MROONGA_STATS;
--source ../../include/mroonga/have_mroonga_deinit.inc
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