Below is the list of changes that have just been committed into a local
5.1 repository of mkindahl. When mkindahl 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.2151 06/03/09 03:56:14 mats@stripped +5 -0
WL#3023 (Use locks in statement-like manner):
Post-merge patches.
sql/table.cc
1.215 06/03/09 03:56:06 mats@stripped +2 -2
Using definite constant instead of machine-dependent constant.
sql/sql_class.cc
1.250 06/03/09 03:56:06 mats@stripped +2 -2
Using definite constant instead of machine-dependent constant.
sql/sql_base.cc
1.311 06/03/09 03:56:06 mats@stripped +4 -4
Using definite constant instead of machine-dependent constant.
sql/log_event.cc
1.215 06/03/09 03:56:05 mats@stripped +17 -15
Using definite constant instead of machine-dependent constant.
Handling case where null_bytes can be zero.
mysql-test/t/disabled.def
1.94 06/03/09 03:56:05 mats@stripped +1 -0
Disabling test that fails due to no-error patch.
# 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: mats
# Host: dl145k.mysql.com
# Root: /users/mkindahl/bk/mysql-5.1-new-wl3023
--- 1.214/sql/log_event.cc 2006-03-08 21:49:44 +01:00
+++ 1.215/sql/log_event.cc 2006-03-09 03:56:05 +01:00
@@ -5073,12 +5073,12 @@
{
/*
We allow a special form of dummy event when the table, and cols
- are null and the table id is ULONG_MAX. This is a temporary
+ are null and the table id is ~0UL. This is a temporary
solution, to be able to terminate a started statement in the
binary log: the extreneous events will be removed in the future.
*/
- DBUG_ASSERT(tbl_arg && tbl_arg->s && tid != ULONG_MAX ||
- !tbl_arg && !cols && tid == ULONG_MAX);
+ DBUG_ASSERT(tbl_arg && tbl_arg->s && tid != ~0UL ||
+ !tbl_arg && !cols && tid == ~0UL);
if (thd_arg->options & OPTION_NO_FOREIGN_KEY_CHECKS)
set_flags(NO_FOREIGN_KEY_CHECKS_F);
@@ -5268,12 +5268,12 @@
char const *row_start= (char const *)m_rows_buf;
/*
- If m_table_id == ULONG_MAX, then we have a dummy event that does
+ If m_table_id == ~0UL, then we have a dummy event that does
not contain any data. In that case, we just remove all tables in
the tables_to_lock list, close the thread tables, step the relay
log position, and return with success.
*/
- if (m_table_id == ULONG_MAX)
+ if (m_table_id == ~0UL)
{
/*
This one is supposed to be set: just an extra check so that
@@ -5417,16 +5417,12 @@
DBUG_ASSERT(row_end != NULL); // cannot happen
DBUG_ASSERT(row_end <= (const char*)m_rows_end);
-#if 0
/* in_use can have been set to NULL in close_tables_for_reopen */
THD* old_thd= table->in_use;
if (!table->in_use)
table->in_use= thd;
-#endif
error= do_exec_row(table);
-#if 0
table->in_use = old_thd;
-#endif
switch (error)
{
/* Some recoverable errors */
@@ -5640,7 +5636,7 @@
m_table_id(tid),
m_flags(flags)
{
- DBUG_ASSERT(m_table_id != ULONG_MAX);
+ DBUG_ASSERT(m_table_id != ~0UL);
/*
In TABLE_SHARE, "db" and "table_name" are 0-terminated (see this comment in
table.cc / alloc_table_share():
@@ -5708,7 +5704,7 @@
post_start+= TM_FLAGS_OFFSET;
}
- DBUG_ASSERT(m_table_id != ULONG_MAX);
+ DBUG_ASSERT(m_table_id != ~0UL);
m_flags= uint2korr(post_start);
@@ -5985,7 +5981,7 @@
#ifndef MYSQL_CLIENT
bool Table_map_log_event::write_data_header(IO_CACHE *file)
{
- DBUG_ASSERT(m_table_id != ULONG_MAX);
+ DBUG_ASSERT(m_table_id != ~0UL);
byte buf[TABLE_MAP_HEADER_LEN];
DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
{
@@ -6395,7 +6391,9 @@
just set the necessary bits on the bytes and don't set the
filler bits correctly.
*/
- table->record[1][table->s->null_bytes - 1]= 0xFF;
+ my_ptrdiff_t const pos=
+ table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
+ table->record[1][pos]= 0xFF;
if ((error= table->file->index_read_idx(table->record[1], 0, key,
table->key_info->key_length,
HA_READ_KEY_EXACT)))
@@ -6430,7 +6428,9 @@
just set the necessary bits on the bytes and don't set the
filler bits correctly.
*/
- table->record[1][table->s->null_bytes - 1]= 0xFF;
+ my_ptrdiff_t const pos=
+ table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
+ table->record[1][pos]= 0xFF;
if ((error= table->file->index_next(table->record[1])))
{
table->file->print_error(error, MYF(0));
@@ -6451,7 +6451,9 @@
just set the necessary bits on the bytes and don't set the
filler bits correctly.
*/
- table->record[1][table->s->null_bytes - 1]= 0xFF;
+ my_ptrdiff_t const pos=
+ table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
+ table->record[1][pos]= 0xFF;
error= table->file->rnd_next(table->record[1]);
switch (error)
{
--- 1.310/sql/sql_base.cc 2006-03-08 14:21:56 +01:00
+++ 1.311/sql/sql_base.cc 2006-03-09 03:56:06 +01:00
@@ -2431,11 +2431,11 @@
reused is on wrap-around, which means more than 4 billion table
shares open at the same time).
- share->table_map_id is not ULONG_MAX.
+ share->table_map_id is not ~0UL.
*/
void assign_new_table_id(TABLE_SHARE *share)
{
- static ulong last_table_id= ULONG_MAX;
+ static ulong last_table_id= ~0UL;
DBUG_ENTER("assign_new_table_id");
@@ -2448,13 +2448,13 @@
There is one reserved number that cannot be used. Remember to
change this when 6-byte global table id's are introduced.
*/
- if (unlikely(tid == ULONG_MAX))
+ if (unlikely(tid == ~0UL))
tid= ++last_table_id;
share->table_map_id= tid;
DBUG_PRINT("info", ("table_id=%lu", tid));
/* Post conditions */
- DBUG_ASSERT(share->table_map_id != ULONG_MAX);
+ DBUG_ASSERT(share->table_map_id != ~0UL);
DBUG_VOID_RETURN;
}
--- 1.249/sql/sql_class.cc 2006-03-08 21:49:44 +01:00
+++ 1.250/sql/sql_class.cc 2006-03-09 03:56:06 +01:00
@@ -2194,7 +2194,7 @@
{
DBUG_ENTER("binlog_prepare_pending_rows_event");
/* Pre-conditions */
- DBUG_ASSERT(table->s->table_map_id != ULONG_MAX);
+ DBUG_ASSERT(table->s->table_map_id != ~0UL);
/* Fetch the type code for the RowsEventT template parameter */
int const type_code= RowsEventT::TYPE_CODE;
@@ -2541,7 +2541,7 @@
*/
Rows_log_event *ev=
- new Write_rows_log_event(this, 0, ULONG_MAX, 0, FALSE);
+ new Write_rows_log_event(this, 0, ~0UL, 0, FALSE);
ev->set_flags(Rows_log_event::STMT_END_F);
binlog_set_pending_rows_event(ev);
--- 1.214/sql/table.cc 2006-03-07 20:00:43 +01:00
+++ 1.215/sql/table.cc 2006-03-09 03:56:06 +01:00
@@ -145,7 +145,7 @@
elsewhere, and then assign a table map id inside open_table()
under the protection of the LOCK_open mutex.
*/
- share->table_map_id= ULONG_MAX;
+ share->table_map_id= ~0UL;
#endif
memcpy((char*) &share->mem_root, (char*) &mem_root, sizeof(mem_root));
@@ -204,7 +204,7 @@
anyway to be able to catch errors.
*/
share->table_map_version= ~(ulonglong)0;
- share->table_map_id= ULONG_MAX;
+ share->table_map_id= ~0UL;
#endif
DBUG_VOID_RETURN;
--- 1.93/mysql-test/t/disabled.def 2006-03-08 20:42:04 +01:00
+++ 1.94/mysql-test/t/disabled.def 2006-03-09 03:56:05 +01:00
@@ -37,6 +37,7 @@
rpl_ndb_relay_space : Bug#16993
rpl_ndb_multi_update3 : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_sp007 : Bug #17290
+rpl_row_inexist_tbl : Disabled since patch makes this test wait forever
rpl_sp : Bug#16456
rpl_until : Unstable test case, bug#15886
sp-goto : GOTO is currently is disabled - will be fixed in the future
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.2151) | Mats Kindahl | 9 Mar |