Commit e3ef15ea authored by unknown's avatar unknown
Browse files

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.
parent 25652349
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))
+2 −2
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
Loading