summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorV Narayanan <v.narayanan@sun.com>2009-12-03 16:16:49 +0530
committerV Narayanan <v.narayanan@sun.com>2009-12-03 16:16:49 +0530
commit9747c64a30a9d31dfd90a01b3df38a22234300a7 (patch)
tree43b91d9b4090a4d9f8ee0ee9367838242f68881a /sql/ha_ndbcluster.cc
parent187958a9516fd5d1054682590b1925db857168d8 (diff)
downloadmariadb-git-9747c64a30a9d31dfd90a01b3df38a22234300a7.tar.gz
WL#4448 Generalize the handlerton::fill_files_table call with handlerton::fill_is_table
The attached patch adds a method handlerton::fill_is_table that can be used instead of having to create specific handlerton::fill_*_table methods.
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc35
1 files changed, 34 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 83cceb0da76..3bb3c3388e2 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -94,6 +94,11 @@ static bool ndbcluster_show_status(handlerton *hton, THD*,
static int ndbcluster_alter_tablespace(handlerton *hton,
THD* thd,
st_alter_tablespace *info);
+static int ndbcluster_fill_is_table(handlerton *hton,
+ THD *thd,
+ TABLE_LIST *tables,
+ COND *cond,
+ enum enum_schema_tables);
static int ndbcluster_fill_files_table(handlerton *hton,
THD *thd,
TABLE_LIST *tables,
@@ -7403,7 +7408,7 @@ static int ndbcluster_init(void *p)
h->alter_tablespace= ndbcluster_alter_tablespace; /* Show status */
h->partition_flags= ndbcluster_partition_flags; /* Partition flags */
h->alter_table_flags=ndbcluster_alter_table_flags; /* Alter table flags */
- h->fill_files_table= ndbcluster_fill_files_table;
+ h->fill_is_table= ndbcluster_fill_is_table;
#ifdef HAVE_NDB_BINLOG
ndbcluster_binlog_init_handlerton();
#endif
@@ -7539,6 +7544,34 @@ ndbcluster_init_error:
DBUG_RETURN(TRUE);
}
+/**
+ Used to fill in INFORMATION_SCHEMA* tables.
+
+ @param hton handle to the handlerton structure
+ @param thd the thread/connection descriptor
+ @param[in,out] tables the information schema table that is filled up
+ @param cond used for conditional pushdown to storage engine
+ @param schema_table_idx the table id that distinguishes the type of table
+
+ @return Operation status
+ */
+static int ndbcluster_fill_is_table(handlerton *hton,
+ THD *thd,
+ TABLE_LIST *tables,
+ COND *cond,
+ enum enum_schema_tables schema_table_idx)
+{
+ int ret= 0;
+
+ if (schema_table_idx == SCH_FILES)
+ {
+ ret= ndbcluster_fill_files_table(hton, thd, tables, cond);
+ }
+
+ return ret;
+}
+
+
static int ndbcluster_end(handlerton *hton, ha_panic_function type)
{
DBUG_ENTER("ndbcluster_end");