Commit f57e0d8e authored by unknown's avatar unknown
Browse files

WL#1359 NDB: Add table handler and table information available from SQL commands

add a FILES table that allows the user to run SQL queries on the files used
to store their tables.

Currently supports NDB


sql/ha_berkeley.cc:
  Add fill_files_table
sql/ha_blackhole.cc:
  Add fill_files_table
sql/ha_federated.cc:
  Add fill_files_table
sql/ha_heap.cc:
  Add fill_files_table
sql/ha_innodb.cc:
  Add fill_files_table
sql/ha_myisam.cc:
  Add fill_files_table
sql/ha_myisammrg.cc:
  Add fill_files_table
sql/ha_ndbcluster.cc:
  Add fill_files_table and implementation for NDB disk data DATAFILES and UNDOFILES
sql/ha_partition.cc:
  Add fill_files_table
sql/handler.h:
  Add fill_files_table to handlerton
sql/log.cc:
  Add fill_files_table
sql/mysql_priv.h:
  Add schema_table_store_record as a function that handlertons can call to store rows in INFORMATION_SCHEMA.FILES
sql/sql_show.cc:
  implement the INFORMATION_SCHEMA.FILES table.
  
  Eventually this may move to PERFORMANCE_SCHEMA.
  
  It currently exists to allow users to query disk usage for NDB disk data tables.
storage/csv/ha_tina.cc:
  Add fill_files_table
parent 43f6f1b9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ handlerton berkeley_hton = {
  NULL, /* Partition flags */
  NULL, /* Alter table flags */
  NULL, /* Alter Tablespace */
  NULL, /* Fill Files Table */
  HTON_CLOSE_CURSORS_AT_COMMIT | HTON_FLUSH_AFTER_RENAME
};

+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ handlerton blackhole_hton= {
  NULL,    /* Partition flags */
  NULL,    /* Alter table flags */
  NULL,    /* Alter Tablespace */
  NULL,    /* Fill FILES table */
  HTON_CAN_RECREATE
};

+1 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@ handlerton federated_hton= {
  NULL,    /* Partition flags */
  NULL,    /* Alter table flags */
  NULL,    /* Alter Tablespace */
  NULL,    /* Fill FILES table */
  HTON_ALTER_NOT_SUPPORTED
};

+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ handlerton heap_hton= {
  NULL,    /* Partition flags */
  NULL,    /* Alter table flags */
  NULL,    /* Alter Tablespace */
  NULL,    /* Fill Files Table */
  HTON_CAN_RECREATE
};

+1 −0
Original line number Diff line number Diff line
@@ -237,6 +237,7 @@ handlerton innobase_hton = {
  innobase_show_status,		/* Show status */
  NULL,                         /* Partition flags */
  NULL,                         /* Alter table flags */
  NULL,                         /* Fill FILES table */
  HTON_NO_FLAGS
};

Loading