Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2106 06/01/31 18:46:44 tomas@stripped +4 -0
Bug #16466 DD: SHOW CREATE TABLE does not show TABLESPACE table_space1 STORAGE DISK
sql/sql_show.cc
1.295 06/01/31 18:46:37 tomas@stripped +11 -0
Bug #16466 DD: SHOW CREATE TABLE does not show TABLESPACE table_space1 STORAGE DISK
sql/handler.h
1.185 06/01/31 18:46:37 tomas@stripped +2 -0
Bug #16466 DD: SHOW CREATE TABLE does not show TABLESPACE table_space1 STORAGE DISK
sql/ha_ndbcluster.h
1.112 06/01/31 18:46:37 tomas@stripped +1 -0
Bug #16466 DD: SHOW CREATE TABLE does not show TABLESPACE table_space1 STORAGE DISK
sql/ha_ndbcluster.cc
1.248 06/01/31 18:46:36 tomas@stripped +27 -0
Bug #16466 DD: SHOW CREATE TABLE does not show TABLESPACE table_space1 STORAGE DISK
# 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: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql51
--- 1.184/sql/handler.h 2006-01-30 17:54:11 +01:00
+++ 1.185/sql/handler.h 2006-01-31 18:46:37 +01:00
@@ -1713,6 +1713,8 @@
{ return FALSE; }
virtual char* get_foreign_key_create_info()
{ return(NULL);} /* gets foreign key create string from InnoDB */
+ virtual char* get_tablespace_create_info()
+ { return(NULL);} /* gets tablespace create string from handler */
/* used in ALTER TABLE; 1 if changing storage engine is allowed */
virtual bool can_switch_engines() { return 1; }
/* used in REPLACE; is > 0 if table is referred by a FOREIGN KEY */
--- 1.294/sql/sql_show.cc 2006-01-30 13:15:05 +01:00
+++ 1.295/sql/sql_show.cc 2006-01-31 18:46:37 +01:00
@@ -1136,6 +1136,17 @@
if (!(thd->variables.sql_mode & MODE_NO_TABLE_OPTIONS) && !foreign_db_mode)
{
/*
+ Get possible table space definitions and append them
+ to the CREATE TABLE statement
+ */
+
+ if ((for_str= file->get_tablespace_create_info()))
+ {
+ packet->append(for_str, strlen(for_str));
+ my_free(for_str, MYF(0));
+ }
+
+ /*
IF check_create_info
THEN add ENGINE only if it was used when creating the table
*/
--- 1.247/sql/ha_ndbcluster.cc 2006-01-31 15:40:18 +01:00
+++ 1.248/sql/ha_ndbcluster.cc 2006-01-31 18:46:36 +01:00
@@ -8858,6 +8858,33 @@
}
/*
+ get table space info for SHOW CREATE TABLE
+*/
+char* ha_ndbcluster::get_tablespace_create_info()
+{
+ const char tablespace_key[]= " TABLESPACE ";
+ const char storage_key[]= " STORAGE DISK";
+ char* str= 0;
+
+ Ndb *ndb= get_ndb();
+ NDBDICT *ndbdict= ndb->getDictionary();
+ ndb->setDatabaseName(m_dbname);
+ const NDBTAB *ndbtab= ndbdict->getTable(m_tabname);
+ if (ndbtab == 0)
+ return 0;
+
+ // TODO retrieve table space name if there is one
+ return 0;
+
+ const char *tablespace_name= "<name>";
+
+ uint len= sizeof(tablespace_key) + strlen(tablespace_name) + sizeof(storage_key);
+ str= my_malloc(len, MYF(0));
+ strxnmov(str, len, tablespace_key, tablespace_name, storage_key, NullS);
+ return(str);
+}
+
+/*
Implements the SHOW NDB STATUS command.
*/
bool
--- 1.111/sql/ha_ndbcluster.h 2006-01-25 22:00:26 +01:00
+++ 1.112/sql/ha_ndbcluster.h 2006-01-31 18:46:37 +01:00
@@ -700,6 +700,7 @@
uint set_up_partition_info(partition_info *part_info,
TABLE *table,
void *tab);
+ char* get_tablespace_create_info();
int set_range_data(void *tab, partition_info* part_info);
int set_list_data(void *tab, partition_info* part_info);
int complemented_pk_read(const byte *old_data, byte *new_data,
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2106) BUG#16466 | tomas | 31 Jan |