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.2338 06/04/13 10:48:24 tomas@stripped +3 -0
Merge tulin@stripped:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
mysql-test/t/disabled.def
1.128 06/04/13 10:48:19 tomas@stripped +22 -22
manual merge
sql/ha_ndbcluster.cc
1.296 06/04/13 10:12:40 tomas@stripped +0 -0
Auto merged
client/mysqltest.c
1.205 06/04/13 10:12:39 tomas@stripped +0 -0
Auto merged
# 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/mysql-5.1-new/RESYNC
--- 1.127/mysql-test/t/disabled.def 2006-04-12 20:41:34 +02:00
+++ 1.128/mysql-test/t/disabled.def 2006-04-13 10:48:19 +02:00
@@ -15,31 +15,31 @@
events_logs_tests : BUG#18953 2006-04-12 kent Test is randomly failing
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
-ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent Test fails randomly
-ndb_cache2 : BUG#18597 2006-03-28 brian
-ndb_cache_multi2 : BUG#18974 2006-04-10 kent Test fails randomly
-ndb_gis : BUG#18600 2006-03-28 brian
-ndb_load : BUG#17233 2006-02-16 jmiller
-partition_03ndb : BUG#16385 2006-03-24 mikael
+#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent Test fails randomly
+#ndb_cache2 : BUG#18597 2006-03-28 brian simultaneous drop table and ndb
statistics update triggers node failure
+#ndb_cache_multi2 : BUG#18974 2006-04-10 kent Test fails randomly
+#ndb_gis : BUG#18600 2006-03-28 brian ndb_gis test failure
+#ndb_load : BUG#17233 2006-02-16 jmiller failed load data from infile
causes mysqld dbug_assert, binlog not flushed
+partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a
range partitioned NDB table
ps_7ndb : BUG#18950 2006-02-16 jmiller Dbug assert in RBR mode when
executing test suite
rpl_deadlock_innodb : BUG#16920 2006-04-12 kent fails in show slave status
(randomly)
-rpl_ndb_dd_basic : BUG#18569 2006-03-28 brian
-rpl_row_basic_7ndb : BUG#18923 2006-04-09 brian
-rpl_ndb_dd_advance : BUG#18924 2006-04-09 brian
-rpl_ndb_multi_update2 : BUG#18928 2006-04-09 brian
-rpl_ndb_2innodb : BUG#18945 2006-03-22 tomas Assertion in
get_parts_for_update()
-rpl_ndb_2myisam : BUG#18945 2006-03-22 tomas Assertion in
get_parts_for_update()
-rpl_ndb_auto_inc : BUG#17086 2006-02-16 jmiller
-rpl_ndb_basic : BUG#18592 2006-03-28 brian
-rpl_ndb_ddl : BUG#18946 2006-03-16 mats Master hangs (Probably related to
BUG#17400)
-rpl_ndb_insert_ignore : BUG#18567 2006-03-28 brian
-rpl_ndb_innodb2ndb : BUG#18261 2006-03-16 mats Cluster Replication: tests
rpl_ndb_xxx2ndb fails (BUG#17400)
-rpl_ndb_myisam2ndb : BUG#18261 2006-03-16 mats Cluster Replication: tests
rpl_ndb_xxx2ndb fails (BUG#17400)
-rpl_ndb_multi_update3 : BUG#18627 2006-03-29 monty Cluster Replication:
rpl_ndb_multi_update3 fails on Intel 64 bit
-rpl_ndb_log : BUG#18947 2006-03-21 tomas Result not deterministic, TBD if
should remove
-rpl_ndb_relay_space : BUG#16993 2006-02-16 jmiller
-rpl_ndb_trig004 : BUG#18977 2006-04-10 kent Test fails randomly
+rpl_ndb_2innodb : BUG#19004 2006-03-22 tomas ndb: partition by range and update
hangs
+rpl_ndb_2myisam : BUG#19004 2006-03-22 tomas ndb: partition by range and update
hangs
+rpl_ndb_auto_inc : BUG#17086 2006-02-16 jmiller CR: auto_increment_increment and
auto_increment_offset produce duplicate key er
+#rpl_ndb_basic : BUG#18592 2006-03-28 brian rpl_ndb_basic failure
+#rpl_ndb_dd_advance : BUG#18924 2006-04-09 brian rpl_ndb_dd_advance failure
+#rpl_ndb_dd_basic : BUG#18569 2006-03-28 brian rpl_ndb_dd_basic failure
+rpl_ndb_ddl : result file needs update + test needs to checked
+#rpl_ndb_insert_ignore : BUG#18567 2006-03-28 brian rpl_ndb_insert_ignore failure
+rpl_ndb_innodb2ndb : BUG#18094 2006-03-16 mats Slave caches invalid table
definition after atlters causes select failure
+#rpl_ndb_log : BUG#18947 2006-03-21 tomas Result not deterministic, TBD if
should remove
+#rpl_ndb_multi_update2 : BUG#18928 2006-04-09 brian rpl_ndb_multi_update2 failed
+#rpl_ndb_multi_update3 : BUG#18627 2006-03-29 monty Cluster Replication:
rpl_ndb_multi_update3 fails on Intel 64 bit
+rpl_ndb_myisam2ndb : BUG#18094 2006-03-16 mats Slave caches invalid table
definition after atlters causes select failure
+rpl_ndb_relay_space : BUG#16993 2006-02-16 jmiller RBR: ALTER TABLE ZEROFILL
AUTO_INCREMENT is not replicated correctly
+#rpl_ndb_trig004 : BUG#18977 2006-04-10 kent Test fails randomly
rpl_switch_stm_row_mixed : BUG#18590 2006-03-28 brian
+rpl_row_basic_7ndb : BUG#17400 2006-04-09 brian Cluster Replication: delete &
update of rows in table without pk fails on slave.
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
rpl_row_inexist_tbl : BUG#18948 2006-03-09 mats Disabled since patch makes this
test wait forever
rpl_sp : BUG#16456 2006-02-16 jmiller
--- 1.295/sql/ha_ndbcluster.cc 2006-04-11 14:20:55 +02:00
+++ 1.296/sql/ha_ndbcluster.cc 2006-04-13 10:12:40 +02:00
@@ -4489,6 +4489,21 @@
DBUG_RETURN(my_errno);
}
+#ifdef HAVE_NDB_BINLOG
+ /*
+ Don't allow table creation unless
+ schema distribution table is setup
+ ( unless it is a creation of the schema dist table itself )
+ */
+ if (!schema_share &&
+ !(strcmp(m_dbname, NDB_REP_DB) == 0 &&
+ strcmp(m_tabname, NDB_SCHEMA_TABLE) == 0))
+ {
+ DBUG_PRINT("info", ("Schema distribution table not setup"));
+ DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ }
+#endif /* HAVE_NDB_BINLOG */
+
DBUG_PRINT("table", ("name: %s", m_tabname));
tab.setName(m_tabname);
tab.setLogging(!(info->options & HA_LEX_CREATE_TMP_TABLE));
@@ -5027,7 +5042,8 @@
is_old_table_tmpfile= 0;
String event_name(INJECTOR_EVENT_LEN);
ndb_rep_event_name(&event_name, from + sizeof(share_prefix) - 1, 0);
- ndbcluster_handle_drop_table(ndb, event_name.c_ptr(), share);
+ ndbcluster_handle_drop_table(ndb, event_name.c_ptr(), share,
+ "rename table");
}
if (!result && !IS_TMP_PREFIX(new_tabname))
@@ -5111,6 +5127,15 @@
DBUG_ENTER("ha_ndbcluster::ndbcluster_delete_table");
NDBDICT *dict= ndb->getDictionary();
#ifdef HAVE_NDB_BINLOG
+ /*
+ Don't allow drop table unless
+ schema distribution table is setup
+ */
+ if (!schema_share)
+ {
+ DBUG_PRINT("info", ("Schema distribution table not setup"));
+ DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ }
NDB_SHARE *share= get_share(path, 0, false);
#endif
@@ -5179,7 +5204,7 @@
ndb_rep_event_name(&event_name, path + sizeof(share_prefix) - 1, 0);
ndbcluster_handle_drop_table(ndb,
table_dropped ? event_name.c_ptr() : 0,
- share);
+ share, "delete table");
}
if (share)
@@ -5208,6 +5233,18 @@
set_dbname(name);
set_tabname(name);
+#ifdef HAVE_NDB_BINLOG
+ /*
+ Don't allow drop table unless
+ schema distribution table is setup
+ */
+ if (!schema_share)
+ {
+ DBUG_PRINT("info", ("Schema distribution table not setup"));
+ DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ }
+#endif
+
if (check_ndb_connection())
DBUG_RETURN(HA_ERR_NO_CONNECTION);
@@ -5429,6 +5466,11 @@
if (!res)
info(HA_STATUS_VARIABLE | HA_STATUS_CONST);
+#ifdef HAVE_NDB_BINLOG
+ if (!ndb_binlog_tables_inited && ndb_binlog_running)
+ table->db_stat|= HA_READ_ONLY;
+#endif
+
DBUG_RETURN(res);
}
@@ -5727,6 +5769,19 @@
static void ndbcluster_drop_database(char *path)
{
+ DBUG_ENTER("ndbcluster_drop_database");
+#ifdef HAVE_NDB_BINLOG
+ /*
+ Don't allow drop database unless
+ schema distribution table is setup
+ */
+ if (!schema_share)
+ {
+ DBUG_PRINT("info", ("Schema distribution table not setup"));
+ DBUG_VOID_RETURN;
+ //DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ }
+#endif
ndbcluster_drop_database_impl(path);
#ifdef HAVE_NDB_BINLOG
char db[FN_REFLEN];
@@ -5735,6 +5790,7 @@
current_thd->query, current_thd->query_length,
db, "", 0, 0, SOT_DROP_DB);
#endif
+ DBUG_VOID_RETURN;
}
/*
find all tables in ndb and discover those needed
@@ -5756,36 +5812,37 @@
DBUG_ENTER("ndbcluster_find_all_files");
Ndb* ndb;
char key[FN_REFLEN];
- NdbDictionary::Dictionary::List list;
if (!(ndb= check_ndb_in_thd(thd)))
DBUG_RETURN(HA_ERR_NO_CONNECTION);
NDBDICT *dict= ndb->getDictionary();
- int unhandled, retries= 5;
+ int unhandled, retries= 5, skipped;
do
{
+ NdbDictionary::Dictionary::List list;
if (dict->listObjects(list, NdbDictionary::Object::UserTable) != 0)
ERR_RETURN(dict->getNdbError());
unhandled= 0;
+ skipped= 0;
+ retries--;
for (uint i= 0 ; i < list.count ; i++)
{
NDBDICT::List::Element& elmt= list.elements[i];
- int do_handle_table= 0;
if (IS_TMP_PREFIX(elmt.name) || IS_NDB_BLOB_PREFIX(elmt.name))
{
DBUG_PRINT("info", ("Skipping %s.%s in NDB", elmt.database, elmt.name));
continue;
}
DBUG_PRINT("info", ("Found %s.%s in NDB", elmt.database, elmt.name));
- if (elmt.state == NDBOBJ::StateOnline ||
- elmt.state == NDBOBJ::StateBackup)
- do_handle_table= 1;
- else if (!(elmt.state == NDBOBJ::StateBuilding))
+ if (elmt.state != NDBOBJ::StateOnline &&
+ elmt.state != NDBOBJ::StateBackup &&
+ elmt.state != NDBOBJ::StateBuilding)
{
sql_print_information("NDB: skipping setup table %s.%s, in state %d",
elmt.database, elmt.name, elmt.state);
+ skipped++;
continue;
}
@@ -5794,7 +5851,7 @@
if (!(ndbtab= dict->getTable(elmt.name)))
{
- if (do_handle_table)
+ if (retries == 0)
sql_print_error("NDB: failed to setup table %s.%s, error: %d, %s",
elmt.database, elmt.name,
dict->getNdbError().code,
@@ -5863,9 +5920,9 @@
pthread_mutex_unlock(&LOCK_open);
}
}
- while (unhandled && retries--);
+ while (unhandled && retries);
- DBUG_RETURN(0);
+ DBUG_RETURN(-(skipped + unhandled));
}
int ndbcluster_find_files(THD *thd,const char *db,const char *path,
@@ -7729,6 +7786,8 @@
pthread_cond_wait(&COND_server_started, &LOCK_server_started);
pthread_mutex_unlock(&LOCK_server_started);
+ ndbcluster_util_inited= 1;
+
/*
Wait for cluster to start
*/
@@ -7760,6 +7819,8 @@
}
#ifdef HAVE_NDB_BINLOG
+ if (ndb_extra_logging && ndb_binlog_running)
+ sql_print_information("NDB Binlog: Ndb tables initially read only.");
/* create tables needed by the replication */
ndbcluster_setup_binlog_table_shares(thd);
#else
@@ -7769,17 +7830,9 @@
ndbcluster_find_all_files(thd);
#endif
- ndbcluster_util_inited= 1;
-
-#ifdef HAVE_NDB_BINLOG
- /* Signal injector thread that all is setup */
- pthread_cond_signal(&injector_cond);
-#endif
-
set_timespec(abstime, 0);
for (;!abort_loop;)
{
-
pthread_mutex_lock(&LOCK_ndb_util_thread);
pthread_cond_timedwait(&COND_ndb_util_thread,
&LOCK_ndb_util_thread,
@@ -7797,7 +7850,7 @@
Check that the apply_status_share and schema_share has been created.
If not try to create it
*/
- if (!apply_status_share || !schema_share)
+ if (!ndb_binlog_tables_inited)
ndbcluster_setup_binlog_table_shares(thd);
#endif
@@ -10052,14 +10105,15 @@
}
}
- dict->listObjects(dflist, NdbDictionary::Object::Undofile);
+ NdbDictionary::Dictionary::List uflist;
+ dict->listObjects(uflist, NdbDictionary::Object::Undofile);
ndberr= dict->getNdbError();
if (ndberr.classification != NdbError::NoError)
ERR_RETURN(ndberr);
- for (i= 0; i < dflist.count; i++)
+ for (i= 0; i < uflist.count; i++)
{
- NdbDictionary::Dictionary::List::Element& elt= dflist.elements[i];
+ NdbDictionary::Dictionary::List::Element& elt= uflist.elements[i];
Ndb_cluster_connection_node_iter iter;
unsigned id;
--- 1.204/client/mysqltest.c 2006-04-11 09:53:49 +02:00
+++ 1.205/client/mysqltest.c 2006-04-13 10:12:39 +02:00
@@ -1596,9 +1596,9 @@
It may be that the slave SQL thread has not started yet, though START
SLAVE has been issued ?
*/
- if (tries++ == 3)
+ if (tries++ == 30)
die("could not sync with master ('%s' returned NULL)", query_buf);
- sleep(1); /* So at most we will wait 3 seconds and make 4 tries */
+ sleep(1); /* So at most we will wait 30 seconds and make 31 tries */
mysql_free_result(res);
goto wait_for_position;
}
@@ -1664,14 +1664,14 @@
{
ulonglong epoch=0, tmp_epoch= 0;
int count= 0;
-
- do
+ int do_continue= 1;
+ while (do_continue)
{
const char binlog[]= "binlog";
const char latest_trans_epoch[]=
"latest_trans_epoch=";
- const char latest_applied_binlog_epoch[]=
- "latest_applied_binlog_epoch=";
+ const char latest_handled_binlog_epoch[]=
+ "latest_handled_binlog_epoch=";
if (count)
sleep(1);
if (mysql_query(mysql, query= "show engine ndb status"))
@@ -1701,26 +1701,32 @@
start_lineno, latest_trans_epoch, query);
}
/* latest_applied_binlog_epoch */
- while (*status && strncmp(status, latest_applied_binlog_epoch,
- sizeof(latest_applied_binlog_epoch)-1))
+ while (*status && strncmp(status, latest_handled_binlog_epoch,
+ sizeof(latest_handled_binlog_epoch)-1))
status++;
if (*status)
{
- status+= sizeof(latest_applied_binlog_epoch)-1;
+ status+= sizeof(latest_handled_binlog_epoch)-1;
tmp_epoch= strtoull(status, (char**) 0, 10);
}
else
die("line %u: result does not contain '%s' in '%s'",
- start_lineno, latest_applied_binlog_epoch, query);
+ start_lineno, latest_handled_binlog_epoch, query);
break;
}
}
- mysql_free_result(res);
if (!row)
die("line %u: result does not contain '%s' in '%s'",
start_lineno, binlog, query);
count++;
- } while (tmp_epoch < epoch && count <= 3);
+ if (tmp_epoch >= epoch)
+ do_continue= 0;
+ else if (count > 30)
+ {
+ break;
+ }
+ mysql_free_result(res);
+ }
}
}
#endif
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2338) | tomas | 13 Apr |