Below is the list of changes that have just been committed into a local
5.1 repository of stewart. When stewart does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2031 05/09/29 16:31:17 stewart@stripped +11 -0
WL#2076 Add more statistics for ndbd processes
Preliminary implementation of INFORMATION_SCHEMA.DATAFILES.
Only NDB at present.
sql/sql_show.cc
1.272 05/09/29 16:31:13 stewart@stripped +6 -0
Complete fill_schema_datafiles
sql/handler.h
1.147 05/09/29 16:31:13 stewart@stripped +1 -0
Add fill_schema_datafiles to handlerton for filling out INFORMATION_SCHEMA.DATAFILES
sql/ha_partition.cc
1.6 05/09/29 16:31:13 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_ndbcluster.cc
1.153 05/09/29 16:31:13 stewart@stripped +30 -0
Add and implement handlerton fill_schema_datafiles.
sql/ha_myisammrg.cc
1.69 05/09/29 16:31:13 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_myisam.cc
1.155 05/09/29 16:31:13 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_innodb.cc
1.219 05/09/29 16:31:12 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_heap.cc
1.74 05/09/29 16:31:12 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_federated.cc
1.33 05/09/29 16:31:12 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_blackhole.cc
1.20 05/09/29 16:31:12 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
sql/ha_berkeley.cc
1.158 05/09/29 16:31:12 stewart@stripped +1 -0
Add NULL for handlerton fill_schema_datafiles
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: stewart
# Host: willster.(none)
# Root: /home/stewart/Documents/MySQL/5.1/ndb-dd
--- 1.157/sql/ha_berkeley.cc 2005-09-29 16:08:17 +10:00
+++ 1.158/sql/ha_berkeley.cc 2005-09-29 16:31:12 +10:00
@@ -125,6 +125,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_CLOSE_CURSORS_AT_COMMIT
};
--- 1.73/sql/ha_heap.cc 2005-09-29 16:08:18 +10:00
+++ 1.74/sql/ha_heap.cc 2005-09-29 16:31:12 +10:00
@@ -41,6 +41,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_NO_FLAGS
};
--- 1.154/sql/ha_myisam.cc 2005-09-29 16:08:18 +10:00
+++ 1.155/sql/ha_myisam.cc 2005-09-29 16:31:13 +10:00
@@ -64,6 +64,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
/*
MyISAM doesn't support transactions and doesn't have
transaction-dependent context: cursors can survive a commit.
--- 1.68/sql/ha_myisammrg.cc 2005-09-29 16:08:18 +10:00
+++ 1.69/sql/ha_myisammrg.cc 2005-09-29 16:31:13 +10:00
@@ -52,6 +52,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_NO_FLAGS
};
--- 1.146/sql/handler.h 2005-09-29 16:08:18 +10:00
+++ 1.147/sql/handler.h 2005-09-29 16:31:13 +10:00
@@ -374,6 +374,7 @@
void (*set_cursor_read_view)(void *);
void (*close_cursor_read_view)(void *);
int (*fill_schema_tablespaces)(THD *thd, struct st_table_list *tables, class Item *cond);
+ int (*fill_schema_datafiles)(THD *thd, struct st_table_list *tables, class Item *cond);
uint32 flags; /* global handler flags */
} handlerton;
--- 1.271/sql/sql_show.cc 2005-09-29 16:08:19 +10:00
+++ 1.272/sql/sql_show.cc 2005-09-29 16:31:13 +10:00
@@ -3814,7 +3814,13 @@
int fill_schema_datafiles(THD *thd, TABLE_LIST *tables, COND *cond)
{
+ int i;
+ TABLE *table= tables->table;
DBUG_ENTER("fill_schema_datafiles");
+
+ for(i=0;i<total_ha;i++)
+ if(handlertons[i]->fill_schema_datafiles)
+ handlertons[i]->fill_schema_datafiles(thd,tables,cond);
DBUG_RETURN(0);
}
--- 1.19/sql/ha_blackhole.cc 2005-09-29 16:08:17 +10:00
+++ 1.20/sql/ha_blackhole.cc 2005-09-29 16:31:12 +10:00
@@ -44,6 +44,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_NO_FLAGS
};
--- 1.152/sql/ha_ndbcluster.cc 2005-09-29 16:08:18 +10:00
+++ 1.153/sql/ha_ndbcluster.cc 2005-09-29 16:31:13 +10:00
@@ -52,6 +52,7 @@
static int ndbcluster_commit(THD *thd, bool all);
static int ndbcluster_rollback(THD *thd, bool all);
static int ndbcluster_fill_schema_tablespaces(THD *thd, TABLE_LIST *tables, COND *cond);
+static int ndbcluster_fill_schema_datafiles(THD *thd, TABLE_LIST *tables, COND *cond);
static handlerton ndbcluster_hton = {
"ndbcluster",
@@ -71,6 +72,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
ndbcluster_fill_schema_tablespaces,
+ ndbcluster_fill_schema_datafiles,
HTON_NO_FLAGS
};
@@ -7913,4 +7915,32 @@
schema_table_store_record(thd, table);
}
}
+
+static int ndbcluster_fill_schema_datafiles(THD *thd, TABLE_LIST *tables, COND *cond)
+{
+ TABLE* table= tables->table;
+ Thd_ndb *thd_ndb= get_thd_ndb(thd);
+ Ndb *ndb= thd_ndb->ndb;
+ NdbDictionary::Dictionary* dict= ndb->getDictionary();
+ NdbDictionary::Dictionary::List tslist;
+
+ dict->listObjects(tslist,NdbDictionary::Object::Datafile);
+
+ for(unsigned i= 0;i < tslist.count;i++)
+ {
+ NdbDictionary::Dictionary::List::Element& elt = tslist.elements[i];
+ NdbDictionary::Datafile df= dict->getDatafile(0,elt.name);
+
+ table->field[0]->store(elt.name,strlen(elt.name),system_charset_info);
+ table->field[1]->store("NDB",3,system_charset_info);
+ table->field[2]->store(df.getPath(),strlen(df.getPath()),
+ system_charset_info);
+ table->field[3]->store(df.getSize());
+ table->field[4]->store(df.getFree());
+ table->field[5]->store(df.getTablespace(),strlen(df.getTablespace()),
+ system_charset_info);
+ schema_table_store_record(thd, table);
+ }
+}
+
#endif /* HAVE_NDBCLUSTER_DB */
--- 1.218/sql/ha_innodb.cc 2005-09-29 16:08:18 +10:00
+++ 1.219/sql/ha_innodb.cc 2005-09-29 16:31:12 +10:00
@@ -224,6 +224,7 @@
innobase_set_cursor_view,
innobase_close_cursor_view,
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_NO_FLAGS
};
--- 1.5/sql/ha_partition.cc 2005-09-29 16:08:18 +10:00
+++ 1.6/sql/ha_partition.cc 2005-09-29 16:31:13 +10:00
@@ -85,6 +85,7 @@
NULL,
NULL,
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_NO_FLAGS
};
--- 1.32/sql/ha_federated.cc 2005-09-29 16:08:18 +10:00
+++ 1.33/sql/ha_federated.cc 2005-09-29 16:31:12 +10:00
@@ -711,6 +711,7 @@
NULL, /* set_cursor_read_view */
NULL, /* close_cursor_read_view */
NULL, /* fill_schema_tablespaces */
+ NULL, /* fill_schema_datafiles */
HTON_NO_FLAGS
};
| Thread |
|---|
| • bk commit into 5.1 tree (stewart:1.2031) | Stewart Smith | 29 Sep |