diff options
author | unknown <konstantin@mysql.com> | 2006-06-27 14:56:24 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2006-06-27 14:56:24 +0400 |
commit | e3ef15ea37dbbd0e999fa7f3fb0ca7bddc4a11cf (patch) | |
tree | ab6cc503abd315c5b2523995d5b6a0392fa16cc2 | |
parent | 25652349e9519d85e6df1953050d3f2351225b1d (diff) | |
download | mariadb-git-e3ef15ea37dbbd0e999fa7f3fb0ca7bddc4a11cf.tar.gz |
Fix compilation failures on Windows caused by the patch for Bug#17199.
Fix a minor issue with Bug#16206 (bdb.test failed if the tree is compiled
without blackhole).
include/my_sys.h:
Change declaration of my_strdup_with_length to accept const char *,
not const byte *: in 5 places out of 6 where this function is used,
it's being passed char *, not byte *
mysql-test/r/bdb.result:
Remove dependency on an optional engine (updated test results).
mysql-test/t/bdb.test:
Remove dependency on an optional engine.
mysys/my_malloc.c:
my_strdup_with_length: const byte * -> const char *
mysys/safemalloc.c:
my_strdup_with_length: const byte * -> const char *
sql/ha_federated.cc:
my_strdup_with_length: const byte * -> const char *
sql/log_event.cc:
my_strdup_with_length: const byte * -> const char *
sql/set_var.cc:
my_strdup_with_length: const byte * -> const char *
sql/sql_class.h:
Change db_length type to uint from uint32 (see also table.h)
sql/table.h:
Change the type of db_length to uint from uint32: LEX_STRING uses uint for
length, we need a small and consistent set of types to store length to
minimize cast and compile failures.
-rw-r--r-- | include/my_sys.h | 2 | ||||
-rw-r--r-- | mysql-test/r/bdb.result | 4 | ||||
-rw-r--r-- | mysql-test/t/bdb.test | 2 | ||||
-rw-r--r-- | mysys/my_malloc.c | 2 | ||||
-rw-r--r-- | mysys/safemalloc.c | 2 | ||||
-rw-r--r-- | sql/ha_federated.cc | 3 | ||||
-rw-r--r-- | sql/log_event.cc | 4 | ||||
-rw-r--r-- | sql/set_var.cc | 2 | ||||
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/table.h | 3 |
10 files changed, 13 insertions, 13 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 229389f1ac5..cbd7c79fa11 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -157,7 +157,7 @@ extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags); extern void my_no_flags_free(gptr ptr); extern gptr my_memdup(const byte *from,uint length,myf MyFlags); extern char *my_strdup(const char *from,myf MyFlags); -extern char *my_strdup_with_length(const byte *from, uint length, +extern char *my_strdup_with_length(const char *from, uint length, myf MyFlags); /* we do use FG (as a no-op) in below so that a typo on FG is caught */ #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 588644a6c66..ee7cdceefda 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1930,7 +1930,7 @@ alter table t1 add primary key(a); drop table t1; set autocommit=1; reset master; -create table bug16206 (a int) engine= blackhole; +create table bug16206 (a int); insert into bug16206 values(1); start transaction; insert into bug16206 values(2); @@ -1938,7 +1938,7 @@ commit; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 -f n Query 1 n use `test`; create table bug16206 (a int) engine= blackhole +f n Query 1 n use `test`; create table bug16206 (a int) f n Query 1 n use `test`; insert into bug16206 values(1) f n Query 1 n use `test`; insert into bug16206 values(2) drop table bug16206; diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index d2e3ca5f36e..ec05eeb3c34 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -1028,7 +1028,7 @@ set autocommit=1; let $VERSION=`select version()`; reset master; -create table bug16206 (a int) engine= blackhole; +create table bug16206 (a int); insert into bug16206 values(1); start transaction; insert into bug16206 values(2); diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 3f601a42dc9..f33db2655c4 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -83,7 +83,7 @@ char *my_strdup(const char *from, myf my_flags) } -char *my_strdup_with_length(const byte *from, uint length, myf my_flags) +char *my_strdup_with_length(const char *from, uint length, myf my_flags) { gptr ptr; if ((ptr=my_malloc(length+1,my_flags)) != 0) diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index 6cdf98c5f5f..f6d6644859e 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -525,7 +525,7 @@ char *_my_strdup(const char *from, const char *filename, uint lineno, } /* _my_strdup */ -char *_my_strdup_with_length(const byte *from, uint length, +char *_my_strdup_with_length(const char *from, uint length, const char *filename, uint lineno, myf MyFlags) { diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index c6d5c77803b..02bcde43f11 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -632,8 +632,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, DBUG_PRINT("info", ("Length %d \n", table->s->connect_string.length)); DBUG_PRINT("info", ("String %.*s \n", table->s->connect_string.length, table->s->connect_string.str)); - share->scheme= my_strdup_with_length((const byte*)table->s-> - connect_string.str, + share->scheme= my_strdup_with_length(table->s->connect_string.str, table->s->connect_string.length, MYF(0)); diff --git a/sql/log_event.cc b/sql/log_event.cc index e93c2855199..b4707826205 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -3123,7 +3123,7 @@ Rotate_log_event::Rotate_log_event(THD* thd_arg, llstr(pos_arg, buff), flags)); #endif if (flags & DUP_NAME) - new_log_ident= my_strdup_with_length((const byte*) new_log_ident_arg, + new_log_ident= my_strdup_with_length(new_log_ident_arg, ident_len, MYF(MY_WME)); DBUG_VOID_RETURN; } @@ -3147,7 +3147,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, uint event_len, (header_size+post_header_len)); ident_offset = post_header_len; set_if_smaller(ident_len,FN_REFLEN-1); - new_log_ident= my_strdup_with_length((byte*) buf + ident_offset, + new_log_ident= my_strdup_with_length(buf + ident_offset, (uint) ident_len, MYF(MY_WME)); DBUG_VOID_RETURN; diff --git a/sql/set_var.cc b/sql/set_var.cc index 003dd4a8ab3..aa58f7d41fc 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1133,7 +1133,7 @@ bool update_sys_var_str(sys_var_str *var_str, rw_lock_t *var_mutex, uint new_length= (var ? var->value->str_value.length() : 0); if (!old_value) old_value= (char*) ""; - if (!(res= my_strdup_with_length((byte*)old_value, new_length, MYF(0)))) + if (!(res= my_strdup_with_length(old_value, new_length, MYF(0)))) return 1; /* Replace the old value in such a way that the any thread using diff --git a/sql/sql_class.h b/sql/sql_class.h index 47150912c52..1ba104df2a4 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1300,7 +1300,7 @@ public: pthread_t real_id; uint tmp_table, global_read_lock; uint server_status,open_options,system_thread; - uint32 db_length; + uint db_length; uint select_number; //number of select (used for EXPLAIN) /* variables.transaction_isolation is reset to this after each commit */ enum_tx_isolation session_tx_isolation; diff --git a/sql/table.h b/sql/table.h index 106421d7a17..ebb4481ef3a 100644 --- a/sql/table.h +++ b/sql/table.h @@ -599,7 +599,8 @@ typedef struct st_table_list thr_lock_type lock_type; uint outer_join; /* Which join type */ uint shared; /* Used in multi-upd */ - uint32 db_length, table_name_length; + uint db_length; + uint32 table_name_length; bool updatable; /* VIEW/TABLE can be updated now */ bool straight; /* optimize with prev table */ bool updating; /* for replicate-do/ignore table */ |