From 8ae5aa3bd81124ed4d3c7e74139b028fd091cefc Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Mar 2008 16:12:23 +0200 Subject: [PATCH] fixes for warnings and compile errors for the fix of bug 26243 --- extra/charset2html.c | 2 ++ sql/ha_berkeley.cc | 8 ++++---- sql/mysqld.cc | 2 +- sql/sql_union.cc | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extra/charset2html.c b/extra/charset2html.c index 8795c82bc34..8dcfa0c8990 100644 --- a/extra/charset2html.c +++ b/extra/charset2html.c @@ -153,7 +153,9 @@ int main(int argc, char **argv) { my_init(); if (argc > argcnt && argv[argcnt][0] == '-' && argv[argcnt][1] == '#') + { DBUG_PUSH(argv[argcnt++]+2); + } if (argc > argcnt) the_set = argv[argcnt++]; diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index fbfd5031656..1de40db2724 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -467,7 +467,7 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key) KEY_PART_INFO *key_part= key->key_part, *end=key_part+key->key_parts; uint key_length=new_key->size; - DBUG_DUMP("key_in_index", saved_key_ptr, saved_key->size); + DBUG_DUMP("key_in_index", (uchar *)saved_key_ptr, saved_key->size); for (; key_part != end && (int) key_length > 0; key_part++) { int cmp; @@ -903,7 +903,7 @@ DBT *ha_berkeley::create_key(DBT *key, uint keynr, char *buff, key_length-=key_part->length; } key->size= (u_int32_t) (buff - (char*) key->data); - DBUG_DUMP("key",(char*) key->data, key->size); + DBUG_DUMP("key",(uchar*) key->data, key->size); DBUG_RETURN(key); } @@ -947,7 +947,7 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff, key_length-=key_part->store_length; } key->size= (u_int32_t) (buff - (char*) key->data); - DBUG_DUMP("key",(char*) key->data, key->size); + DBUG_DUMP("key",(uchar*) key->data, key->size); DBUG_RETURN(key); } @@ -1705,7 +1705,7 @@ DBT *ha_berkeley::get_pos(DBT *to, byte *pos) pos+=key_part->field->packed_col_length((char*) pos,key_part->length); to->size= (uint) (pos- (byte*) to->data); } - DBUG_DUMP("key", (char*) to->data, to->size); + DBUG_DUMP("key", (uchar*) to->data, to->size); return to; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b8f675ff696..c239530f2fc 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6943,7 +6943,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), switch(optid) { case '#': #ifndef DBUG_OFF - DBUG_PUSH(argument ? argument : default_dbug_option); + DBUG_SET_INITIAL(argument ? argument : default_dbug_option); #endif opt_endinfo=1; /* unireg: memory allocation */ break; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 25a0540e4dd..da5e118b069 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -444,7 +444,9 @@ bool st_select_lex_unit::exec() } /* re-enabling indexes for next subselect iteration */ if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL)) + { DBUG_ASSERT(0); + } } for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select()) {