Below is the list of changes that have just been committed into a local
5.1 repository of marty. When marty 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@stripped, 2006-09-22 21:14:58+02:00, mskold@stripped +5 -0
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1
MERGE: 1.2300.25.29
mysql-test/t/disabled.def@stripped, 2006-09-22 21:14:52+02:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.196.2.1
sql/ha_ndbcluster.cc@stripped, 2006-09-22 21:14:52+02:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.358.1.3
sql/ha_ndbcluster_binlog.cc@stripped, 2006-09-22 21:14:52+02:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.80.1.1
sql/ha_ndbcluster_binlog.h@stripped, 2006-09-22 21:14:52+02:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.15.1.1
sql/sql_show.cc@stripped, 2006-09-22 21:14:52+02:00, mskold@stripped +0 -0
Auto merged
MERGE: 1.360.1.1
# 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: mskold
# Host: linux.site
# Root: /windows/Linux_space/MySQL/mysql-5.1/RESYNC
--- 1.361/sql/sql_show.cc 2006-09-22 21:15:07 +02:00
+++ 1.362/sql/sql_show.cc 2006-09-22 21:15:07 +02:00
@@ -5378,29 +5378,29 @@ ST_FIELD_INFO plugin_fields_info[]=
ST_FIELD_INFO files_fields_info[]=
{
{"FILE_ID", 4, MYSQL_TYPE_LONG, 0, 0, 0},
- {"FILE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"FILE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
{"FILE_TYPE", 20, MYSQL_TYPE_STRING, 0, 0, 0},
- {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"TABLE_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"LOGFILE_GROUP_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"LOGFILE_GROUP_NUMBER", 4, MYSQL_TYPE_LONG, 0, 0, 0},
+ {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"TABLE_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"LOGFILE_GROUP_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"LOGFILE_GROUP_NUMBER", 4, MYSQL_TYPE_LONG, 0, 1, 0},
{"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"FULLTEXT_KEYS", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
- {"DELETED_ROWS", 4, MYSQL_TYPE_LONG, 0, 0, 0},
- {"UPDATE_COUNT", 4, MYSQL_TYPE_LONG, 0, 0, 0},
- {"FREE_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 0, 0},
- {"TOTAL_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 0, 0},
+ {"FULLTEXT_KEYS", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"DELETED_ROWS", 4, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"UPDATE_COUNT", 4, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"FREE_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"TOTAL_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 1, 0},
{"EXTENT_SIZE", 4, MYSQL_TYPE_LONG, 0, 0, 0},
- {"INITIAL_SIZE", 21, MYSQL_TYPE_LONG, 0, 0, 0},
- {"MAXIMUM_SIZE", 21, MYSQL_TYPE_LONG, 0, 0, 0},
- {"AUTOEXTEND_SIZE", 21, MYSQL_TYPE_LONG, 0, 0, 0},
- {"CREATION_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
- {"LAST_UPDATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
- {"LAST_ACCESS_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
- {"RECOVER_TIME", 4, MYSQL_TYPE_LONG, 0, 0, 0},
- {"TRANSACTION_COUNTER", 4, MYSQL_TYPE_LONG, 0, 0, 0},
+ {"INITIAL_SIZE", 21, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"MAXIMUM_SIZE", 21, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"AUTOEXTEND_SIZE", 21, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"CREATION_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
+ {"LAST_UPDATE_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
+ {"LAST_ACCESS_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
+ {"RECOVER_TIME", 4, MYSQL_TYPE_LONG, 0, 1, 0},
+ {"TRANSACTION_COUNTER", 4, MYSQL_TYPE_LONG, 0, 1, 0},
{"VERSION", 21 , MYSQL_TYPE_LONG, 0, 1, "Version"},
{"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format"},
{"TABLE_ROWS", 21 , MYSQL_TYPE_LONG, 0, 1, "Rows"},
@@ -5414,7 +5414,7 @@ ST_FIELD_INFO files_fields_info[]=
{"CHECK_TIME", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Check_time"},
{"CHECKSUM", 21 , MYSQL_TYPE_LONG, 0, 1, "Checksum"},
{"STATUS", 20, MYSQL_TYPE_STRING, 0, 0, 0},
- {"EXTRA", 255, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"EXTRA", 255, MYSQL_TYPE_STRING, 0, 1, 0},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
};
--- 1.204/mysql-test/t/disabled.def 2006-09-22 21:15:07 +02:00
+++ 1.205/mysql-test/t/disabled.def 2006-09-22 21:15:07 +02:00
@@ -42,7 +42,6 @@ rpl_sp : BUG#16456 200
#rpl_row_basic_7ndb : BUG#21298 2006-07-27 msvensson
#rpl_truncate_7ndb : BUG#21298 2006-07-27 msvensson
crash_commit_before : 2006-08-02 msvensson
-rpl_ndb_dd_advance : BUG#18679 2006-07-28 jimw (Test fails randomly)
func_group : BUG#21924 2006-08-30 reggie
func_in : BUG#21925 2006-08-30 reggie
ndb_binlog_discover : bug#21806 2006-08-24
--- 1.362/sql/ha_ndbcluster.cc 2006-09-22 21:15:07 +02:00
+++ 1.363/sql/ha_ndbcluster.cc 2006-09-22 21:15:07 +02:00
@@ -74,13 +74,13 @@ static const int max_transactions= 3; //
static uint ndbcluster_partition_flags();
static uint ndbcluster_alter_table_flags(uint flags);
-static int ndbcluster_init(void);
+static int ndbcluster_init(void *);
static int ndbcluster_end(ha_panic_function flag);
static bool ndbcluster_show_status(THD*,stat_print_fn *,enum ha_stat_type);
static int ndbcluster_alter_tablespace(THD* thd, st_alter_tablespace *info);
static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond);
-handlerton ndbcluster_hton;
+handlerton *ndbcluster_hton;
static handler *ndbcluster_create_handler(TABLE_SHARE *table,
MEM_ROOT *mem_root)
@@ -2486,9 +2486,11 @@ int ha_ndbcluster::write_row(byte *recor
if (has_auto_increment)
{
THD *thd= table->in_use;
+ int error;
m_skip_auto_increment= FALSE;
- update_auto_increment();
+ if ((error= update_auto_increment()))
+ DBUG_RETURN(error);
m_skip_auto_increment= (insert_id_for_cur_row == 0);
}
}
@@ -4012,7 +4014,7 @@ int ha_ndbcluster::external_lock(THD *th
thd_ndb->init_open_tables();
thd_ndb->stmt= trans;
thd_ndb->query_state&= NDB_QUERY_NORMAL;
- trans_register_ha(thd, FALSE, &ndbcluster_hton);
+ trans_register_ha(thd, FALSE, ndbcluster_hton);
}
else
{
@@ -4028,7 +4030,7 @@ int ha_ndbcluster::external_lock(THD *th
thd_ndb->init_open_tables();
thd_ndb->all= trans;
thd_ndb->query_state&= NDB_QUERY_NORMAL;
- trans_register_ha(thd, TRUE, &ndbcluster_hton);
+ trans_register_ha(thd, TRUE, ndbcluster_hton);
/*
If this is the start of a LOCK TABLE, a table look
@@ -4182,7 +4184,7 @@ int ha_ndbcluster::start_stmt(THD *thd,
ERR_RETURN(ndb->getNdbError());
no_uncommitted_rows_reset(thd);
thd_ndb->stmt= trans;
- trans_register_ha(thd, FALSE, &ndbcluster_hton);
+ trans_register_ha(thd, FALSE, ndbcluster_hton);
}
thd_ndb->query_state&= NDB_QUERY_NORMAL;
m_active_trans= trans;
@@ -5551,7 +5553,7 @@ void ha_ndbcluster::get_auto_increment(u
HA_HAS_RECORDS
ha_ndbcluster::ha_ndbcluster(TABLE_SHARE *table_arg):
- handler(&ndbcluster_hton, table_arg),
+ handler(ndbcluster_hton, table_arg),
m_active_trans(NULL),
m_active_cursor(NULL),
m_table(NULL),
@@ -6394,35 +6396,36 @@ static int connect_callback()
extern int ndb_dictionary_is_mysqld;
-static int ndbcluster_init()
+static int ndbcluster_init(void *p)
{
int res;
DBUG_ENTER("ndbcluster_init");
ndb_dictionary_is_mysqld= 1;
+ ndbcluster_hton= (handlerton *)p;
{
- handlerton &h= ndbcluster_hton;
- h.state= have_ndbcluster;
- h.db_type= DB_TYPE_NDBCLUSTER;
- h.close_connection= ndbcluster_close_connection;
- h.commit= ndbcluster_commit;
- h.rollback= ndbcluster_rollback;
- h.create= ndbcluster_create_handler; /* Create a new handler */
- h.drop_database= ndbcluster_drop_database; /* Drop a database */
- h.panic= ndbcluster_end; /* Panic call */
- h.show_status= ndbcluster_show_status; /* Show status */
- 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;
+ handlerton *h= ndbcluster_hton;
+ h->state= have_ndbcluster;
+ h->db_type= DB_TYPE_NDBCLUSTER;
+ h->close_connection= ndbcluster_close_connection;
+ h->commit= ndbcluster_commit;
+ h->rollback= ndbcluster_rollback;
+ h->create= ndbcluster_create_handler; /* Create a new handler */
+ h->drop_database= ndbcluster_drop_database; /* Drop a database */
+ h->panic= ndbcluster_end; /* Panic call */
+ h->show_status= ndbcluster_show_status; /* Show status */
+ 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;
#ifdef HAVE_NDB_BINLOG
ndbcluster_binlog_init_handlerton();
#endif
- h.flags= HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
- h.discover= ndbcluster_discover;
- h.find_files= ndbcluster_find_files;
- h.table_exists_in_engine= ndbcluster_table_exists_in_engine;
+ h->flags= HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
+ h->discover= ndbcluster_discover;
+ h->find_files= ndbcluster_find_files;
+ h->table_exists_in_engine= ndbcluster_table_exists_in_engine;
}
if (have_ndbcluster != SHOW_OPTION_YES)
@@ -6531,6 +6534,8 @@ ndbcluster_init_error:
delete g_ndb_cluster_connection;
g_ndb_cluster_connection= NULL;
have_ndbcluster= SHOW_OPTION_DISABLED; // If we couldn't use handler
+ ndbcluster_hton->state= SHOW_OPTION_DISABLED; // If we couldn't use
handler
+
DBUG_RETURN(TRUE);
}
@@ -8135,7 +8140,7 @@ pthread_handler_t ndb_util_thread_func(v
Wait for cluster to start
*/
pthread_mutex_lock(&LOCK_ndb_util_thread);
- while (!ndb_cluster_node_id && (ndbcluster_hton.slot != ~(uint)0))
+ while (!ndb_cluster_node_id && (ndbcluster_hton->slot != ~(uint)0))
{
/* ndb not connected yet */
set_timespec(abstime, 1);
@@ -10744,7 +10749,7 @@ SHOW_VAR ndb_status_variables_export[]=
};
struct st_mysql_storage_engine ndbcluster_storage_engine=
-{ MYSQL_HANDLERTON_INTERFACE_VERSION, &ndbcluster_hton };
+{ MYSQL_HANDLERTON_INTERFACE_VERSION, ndbcluster_hton };
mysql_declare_plugin(ndbcluster)
{
--- 1.82/sql/ha_ndbcluster_binlog.cc 2006-09-22 21:15:07 +02:00
+++ 1.83/sql/ha_ndbcluster_binlog.cc 2006-09-22 21:15:07 +02:00
@@ -662,9 +662,9 @@ static int ndbcluster_binlog_func(THD *t
void ndbcluster_binlog_init_handlerton()
{
- handlerton &h= ndbcluster_hton;
- h.binlog_func= ndbcluster_binlog_func;
- h.binlog_log_query= ndbcluster_binlog_log_query;
+ handlerton *h= ndbcluster_hton;
+ h->binlog_func= ndbcluster_binlog_func;
+ h->binlog_log_query= ndbcluster_binlog_log_query;
}
@@ -3473,7 +3473,7 @@ restart:
if (thd_ndb == NULL)
{
- DBUG_ASSERT(ndbcluster_hton.slot != ~(uint)0);
+ DBUG_ASSERT(ndbcluster_hton->slot != ~(uint)0);
if (!(thd_ndb= ha_ndbcluster::seize_thd_ndb()))
{
sql_print_error("Could not allocate Thd_ndb object");
--- 1.16/sql/ha_ndbcluster_binlog.h 2006-09-22 21:15:07 +02:00
+++ 1.17/sql/ha_ndbcluster_binlog.h 2006-09-22 21:15:07 +02:00
@@ -103,7 +103,7 @@ extern pthread_mutex_t injector_mutex;
extern pthread_cond_t injector_cond;
extern unsigned char g_node_id_map[max_ndb_nodes];
-extern handlerton ndbcluster_hton;
+extern handlerton *ndbcluster_hton;
extern pthread_t ndb_util_thread;
extern pthread_mutex_t LOCK_ndb_util_thread;
extern pthread_cond_t COND_ndb_util_thread;
@@ -214,10 +214,10 @@ inline void real_free_share(NDB_SHARE **
inline
Thd_ndb *
-get_thd_ndb(THD *thd) { return (Thd_ndb *) thd->ha_data[ndbcluster_hton.slot]; }
+get_thd_ndb(THD *thd) { return (Thd_ndb *) thd->ha_data[ndbcluster_hton->slot]; }
inline
void
-set_thd_ndb(THD *thd, Thd_ndb *thd_ndb) { thd->ha_data[ndbcluster_hton.slot]= thd_ndb;
}
+set_thd_ndb(THD *thd, Thd_ndb *thd_ndb) { thd->ha_data[ndbcluster_hton->slot]=
thd_ndb; }
Ndb* check_ndb_in_thd(THD* thd);
| Thread |
|---|
| • bk commit into 5.1 tree (mskold:1.2318) | Martin Skold | 22 Sep |