summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2005-07-18 15:33:18 +0300
committerunknown <monty@mishka.local>2005-07-18 15:33:18 +0300
commit2e9d6d7e906f800cc2a357ab4a26302eb05df7b2 (patch)
tree1505fc52926154e1f91d7d822237aa1b9352cb3f /tests
parent3619d50b1fbfbeced03e51ce7faa84ffe3ca7de2 (diff)
downloadmariadb-git-2e9d6d7e906f800cc2a357ab4a26302eb05df7b2.tar.gz
Cleanups during review
Changed defaults option --instance to --defaults-group-suffix Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX mysql_print_defaults now understands --defaults-group-suffix Remove usage of my_tempnam() (not safe function) if( -> if ( and while( to while ( BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f: Delete: mysys/my_tempnam.c VC++Files/client/mysqlclient.dsp: Remove not used file my_tempnam.c VC++Files/client/mysqlclient_ia64.dsp: Remove not used file my_tempnam.c VC++Files/libmysql/libmysql.dsp: Remove not used file my_tempnam.c VC++Files/libmysql/libmysql_ia64.dsp: Remove not used file my_tempnam.c VC++Files/mysys/mysys.dsp: Remove not used file my_tempnam.c VC++Files/mysys/mysys_ia64.dsp: Remove not used file my_tempnam.c client/mysql.cc: Change to use get_defaults_options() Remove compiler warnings client/mysqldump.c: Indentation fixes Use quoted table name for 'primary_key_fields' extra/my_print_defaults.c: Add support for --defaults-group-suffix change to use get_default_options() extra/replace.c: Replace my_tempnam() with create_tmp_file() to allow us to remove my_tempnam.c include/config-win.h: Added DEFAULT_GROUP_SUFFIX_ENV include/my_sys.h: Change defaults_instance -> defaults_group_suffix Change get_defaults_files -> get_defaults_options libmysql/Makefile.shared: Added DEFAULT_GROUP_SUFFIX_ENV mysys/Makefile.am: Added DEFAULT_GROUP_SUFFIX_ENV Remove my_tempnam.c mysys/default.c: Changed --instance to --defaults-group-suffix Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX and moved the name to Makefile.am (mysys shouldn't by MySQL independent) Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order mysys/default_modify.c: Optimized code to use allocated space more efficently Reduce code size Ensure that realloc() works independent of argument size mysys/my_bitmap.c: Added missing return sql/ha_innodb.cc: Change if( -> if ( sql/ha_ndbcluster.cc: Change while( -> while ( sql/item_cmpfunc.cc: Break loop early (simple optimization) sql/item_strfunc.cc: Change if( -> if ( sql/log.cc: Fixed comment sql/mysqld.cc: Change if( -> if ( sql/opt_range.cc: while( -> while ( if( -> if ( sql/parse_file.cc: Change if( -> if ( sql/sql_cache.cc: while( -> while ( sql/sql_parse.cc: Change if( -> if ( sql/sql_prepare.cc: Added comment sql/sql_select.cc: while( -> while ( Removed index variable by incrementing pointer sql/sql_show.cc: Change if( -> if ( sql/sql_yacc.yy: Change if( -> if ( tests/mysql_client_test.c: Added cast to first argument to bzero()
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c142
1 files changed, 71 insertions, 71 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index a80d5e1d1be..1eceb58f6f6 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -1960,7 +1960,7 @@ static void test_fetch_null()
myquery(rc);
/* fetch */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < (int) array_elements(bind); i++)
{
bind[i].buffer_type= MYSQL_TYPE_LONG;
@@ -3401,7 +3401,7 @@ static void test_bind_result()
/* fetch */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *) &nData; /* integer data */
bind[0].is_null= &is_null[0];
@@ -3494,7 +3494,7 @@ static void test_bind_result_ext()
rc= mysql_commit(mysql);
myquery(rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < (int) array_elements(bind); i++)
{
bind[i].length= &length[i];
@@ -3613,7 +3613,7 @@ static void test_bind_result_ext1()
rc= mysql_commit(mysql);
myquery(rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void *) t_data;
bind[0].buffer_length= sizeof(t_data);
@@ -3906,7 +3906,7 @@ static void test_fetch_date()
rc= mysql_commit(mysql);
myquery(rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < array_elements(bind); i++)
{
bind[i].is_null= &is_null[i];
@@ -5623,7 +5623,7 @@ static void test_store_result()
myquery(rc);
/* fetch */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *) &nData; /* integer data */
bind[0].length= &length;
@@ -6337,7 +6337,7 @@ static void test_buffers()
bzero(buffer, sizeof(buffer)); /* Avoid overruns in printf() */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].length= &length;
bind[0].is_null= &is_null;
bind[0].buffer_length= 1;
@@ -6526,7 +6526,7 @@ static void test_fetch_nobuffs()
fprintf(stdout, "\n total rows : %d", rc);
DIE_UNLESS(rc == 1);
- bzero(bind, sizeof(MYSQL_BIND));
+ bzero((char*) bind, sizeof(MYSQL_BIND));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void *)str[0];
bind[0].buffer_length= sizeof(str[0]);
@@ -6596,7 +6596,7 @@ static void test_ushort_bug()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_SHORT;
bind[0].buffer= (void *)&short_value;
bind[0].is_unsigned= TRUE;
@@ -6684,7 +6684,7 @@ static void test_sshort_bug()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_SHORT;
bind[0].buffer= (void *)&short_value;
bind[0].length= &s_length;
@@ -6771,7 +6771,7 @@ static void test_stiny_bug()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_SHORT;
bind[0].buffer= (void *)&short_value;
bind[0].length= &s_length;
@@ -6879,7 +6879,7 @@ static void test_field_misc()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= table_type;
bind[0].length= &type_length;
@@ -7190,7 +7190,7 @@ static void test_frm_bug()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= data_dir;
bind[0].buffer_length= FN_REFLEN;
@@ -7928,7 +7928,7 @@ static void test_fetch_seek()
stmt= mysql_simple_prepare(mysql, "select * from t1");
check_stmt(stmt);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *)&c1;
@@ -8024,7 +8024,7 @@ static void test_fetch_offset()
stmt= mysql_simple_prepare(mysql, "select * from t1");
check_stmt(stmt);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void *)data;
bind[0].buffer_length= 11;
@@ -8111,7 +8111,7 @@ static void test_fetch_column()
stmt= mysql_simple_prepare(mysql, "select * from t1 order by c2 desc");
check_stmt(stmt);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *)&bc1;
bind[0].buffer_length= 0;
@@ -8359,7 +8359,7 @@ static void test_free_result()
stmt= mysql_simple_prepare(mysql, "select * from test_free_result");
check_stmt(stmt);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *)&bc1;
bind[0].length= &bl1;
@@ -8439,7 +8439,7 @@ static void test_free_store_result()
stmt= mysql_simple_prepare(mysql, "select * from test_free_result");
check_stmt(stmt);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *)&bc1;
bind[0].buffer_length= 0;
@@ -9900,7 +9900,7 @@ static void test_bug3035()
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
- bzero(bind_array, sizeof(bind_array));
+ bzero((char*) bind_array, sizeof(bind_array));
for (bind= bind_array; bind < bind_end; bind++)
bind->error= &bind->error_value;
@@ -10107,7 +10107,7 @@ static void test_bug1664()
verify_param_count(stmt, 2);
- bzero(&bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void *)str_data;
@@ -10347,7 +10347,7 @@ static void test_ps_i18n()
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
- bzero(bind_array, sizeof(bind_array));
+ bzero((char*) bind_array, sizeof(bind_array));
bind_array[0].buffer_type= MYSQL_TYPE_STRING;
bind_array[0].buffer= (void *) koi8;
@@ -10531,7 +10531,7 @@ static void test_bug3796()
check_execute(stmt, rc);
/* Bind input buffers */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void *) concat_arg0;
@@ -10598,11 +10598,11 @@ static void test_bug4026()
check_execute(stmt, rc);
/* Bind input buffers */
- bzero(bind, sizeof(bind));
- bzero(&time_in, sizeof(time_in));
- bzero(&time_out, sizeof(time_out));
- bzero(&datetime_in, sizeof(datetime_in));
- bzero(&datetime_out, sizeof(datetime_out));
+ bzero((char*) bind, sizeof(bind));
+ bzero((char*) &time_in, sizeof(time_in));
+ bzero((char*) &time_out, sizeof(time_out));
+ bzero((char*) &datetime_in, sizeof(datetime_in));
+ bzero((char*) &datetime_out, sizeof(datetime_out));
bind[0].buffer_type= MYSQL_TYPE_TIME;
bind[0].buffer= (void *) &time_in;
@@ -10680,7 +10680,7 @@ static void test_bug4079()
check_execute(stmt, rc);
/* Bind input buffers */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void *) &res;
@@ -10749,13 +10749,13 @@ static void test_bug4030()
check_execute(stmt, rc);
/* Bind output buffers */
- bzero(bind, sizeof(bind));
- bzero(&time_canonical, sizeof(time_canonical));
- bzero(&time_out, sizeof(time_out));
- bzero(&date_canonical, sizeof(date_canonical));
- bzero(&date_out, sizeof(date_out));
- bzero(&datetime_canonical, sizeof(datetime_canonical));
- bzero(&datetime_out, sizeof(datetime_out));
+ bzero((char*) bind, sizeof(bind));
+ bzero((char*) &time_canonical, sizeof(time_canonical));
+ bzero((char*) &time_out, sizeof(time_out));
+ bzero((char*) &date_canonical, sizeof(date_canonical));
+ bzero((char*) &date_out, sizeof(date_out));
+ bzero((char*) &datetime_canonical, sizeof(datetime_canonical));
+ bzero((char*) &datetime_out, sizeof(datetime_out));
bind[0].buffer_type= MYSQL_TYPE_TIME;
bind[0].buffer= (void *) &time_out;
@@ -10858,7 +10858,7 @@ static void test_view()
check_execute(stmt, rc);
strmov(str_data, "TEST");
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= FIELD_TYPE_STRING;
bind[0].buffer= (char *)&str_data;
bind[0].buffer_length= 50;
@@ -10977,7 +10977,7 @@ static void test_view_2where()
" AENAME,T0001.DEPENDVARS AS DEPENDVARS,T0001.INACTIVE AS "
" INACTIVE from LTDX T0001 where (T0001.SRTF2 = 0)");
myquery(rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i=0; i < 8; i++) {
strmov(parms[i], "1");
bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
@@ -11026,7 +11026,7 @@ static void test_view_star()
myquery(rc);
rc= mysql_query(mysql, "CREATE VIEW vt1 AS SELECT a FROM t1");
myquery(rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < 2; i++) {
sprintf((char *)&parms[i], "%d", i);
bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
@@ -11092,7 +11092,7 @@ static void test_view_insert()
rc= mysql_stmt_prepare(select_stmt, query, strlen(query));
check_execute(select_stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type = FIELD_TYPE_LONG;
bind[0].buffer = (char *)&my_val;
bind[0].length = &my_length;
@@ -11196,7 +11196,7 @@ static void test_view_insert_fields()
" F7F8 AS F7F8, F6N4 AS F6N4, F5C8 AS F5C8, F9D8 AS F9D8"
" from t1 T0001");
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < 11; i++)
{
l[i]= 20;
@@ -11264,7 +11264,7 @@ static void test_bug5126()
check_execute(stmt, rc);
/* Bind output buffers */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= &c1;
@@ -11310,8 +11310,8 @@ static void test_bug4231()
check_execute(stmt, rc);
/* Bind input buffers */
- bzero(bind, sizeof(bind));
- bzero(tm, sizeof(tm));
+ bzero((char*) bind, sizeof(bind));
+ bzero((char*) tm, sizeof(tm));
bind[0].buffer_type= MYSQL_TYPE_DATE;
bind[0].buffer= &tm[0];
@@ -11371,7 +11371,7 @@ static void test_bug5399()
myheader("test_bug5399");
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= &no;
@@ -11531,7 +11531,7 @@ static void test_bug5194()
param_str_length= strlen(param_str);
/* setup bind array */
- bzero(bind, MAX_PARAM_COUNT * sizeof(MYSQL_BIND));
+ bzero((char*) bind, MAX_PARAM_COUNT * sizeof(MYSQL_BIND));
for (i= 0; i < MAX_PARAM_COUNT; ++i)
{
bind[i].buffer_type= MYSQL_TYPE_FLOAT;
@@ -11649,7 +11649,7 @@ static void test_bug6049()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type = MYSQL_TYPE_STRING;
bind[0].buffer = &buffer;
bind[0].buffer_length = sizeof(buffer);
@@ -11698,7 +11698,7 @@ static void test_bug6058()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type = MYSQL_TYPE_STRING;
bind[0].buffer = &buffer;
bind[0].buffer_length = sizeof(buffer);
@@ -11766,7 +11766,7 @@ static void test_bug6046()
check_execute(stmt, rc);
b= 1;
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer= &b;
bind[0].buffer_type= MYSQL_TYPE_SHORT;
@@ -11945,7 +11945,7 @@ static void test_bug6096()
/* Bind and fetch the data */
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < stmt_field_count; ++i)
{
bind[i].buffer_type= MYSQL_TYPE_STRING;
@@ -12000,7 +12000,7 @@ static void test_datetime_ranges()
check_stmt(stmt);
verify_param_count(stmt, 6);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i= 0; i < 6; i++)
{
bind[i].buffer_type= MYSQL_TYPE_DATETIME;
@@ -12131,7 +12131,7 @@ static void test_bug4172()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= f;
bind[0].buffer_length= sizeof(f);
@@ -12198,7 +12198,7 @@ static void test_conversion()
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer= buff;
bind[0].length= &length;
bind[0].buffer_type= MYSQL_TYPE_STRING;
@@ -12261,7 +12261,7 @@ static void test_rewind(void)
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
- bzero(&bind,sizeof(MYSQL_BIND));
+ bzero((char*) &bind, sizeof(MYSQL_BIND));
bind.buffer_type= MYSQL_TYPE_LONG;
bind.buffer= (void *)&Data; /* this buffer won't be altered */
bind.length= &length;
@@ -12357,7 +12357,7 @@ static void test_truncation()
/*************** Fill in the bind structure and bind it **************/
bind_array= malloc(sizeof(MYSQL_BIND) * bind_count);
- bzero(bind_array, sizeof(MYSQL_BIND) * bind_count);
+ bzero((char*) bind_array, sizeof(MYSQL_BIND) * bind_count);
for (bind= bind_array; bind < bind_array + bind_count; bind++)
bind->error= &bind->error_value;
bind= bind_array;
@@ -12562,7 +12562,7 @@ static void test_truncation_option()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(&bind, sizeof(MYSQL_BIND));
+ bzero((char*) &bind, sizeof(MYSQL_BIND));
bind.buffer= (void*) &buf;
bind.buffer_type= MYSQL_TYPE_TINY;
@@ -12637,7 +12637,7 @@ static void test_bug8330()
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i=0; i < 2; i++)
{
stmt[i]= mysql_stmt_init(mysql);
@@ -12911,7 +12911,7 @@ static void test_bug9520()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (char*) a;
bind[0].buffer_length= sizeof(a);
@@ -12960,7 +12960,7 @@ static void test_bug9478()
stmt= open_cursor("select name from t1 where id=2");
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (char*) a;
bind[0].buffer_length= sizeof(a);
@@ -13138,7 +13138,7 @@ static void test_bug9643()
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void*) &a;
bind[0].buffer_length= sizeof(a);
@@ -13194,7 +13194,7 @@ static void test_bug11111()
mysql_stmt_prepare(stmt, query, strlen(query));
mysql_stmt_execute(stmt);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
for (i=0; i < 2; i++)
{
bind[i].buffer_type= MYSQL_TYPE_STRING;
@@ -13231,7 +13231,7 @@ static void test_bug10729()
int rc;
const char *stmt_text;
int i= 0;
- char *name_array[3]= { "aaa", "bbb", "ccc" };
+ const char *name_array[3]= { "aaa", "bbb", "ccc" };
ulong type;
myheader("test_bug10729");
@@ -13252,7 +13252,7 @@ static void test_bug10729()
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void*) a;
bind[0].buffer_length= sizeof(a);
@@ -13363,7 +13363,7 @@ static void test_bug10736()
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void*) a;
bind[0].buffer_length= sizeof(a);
@@ -13412,7 +13412,7 @@ static void test_bug10794()
stmt_text= "insert into t1 (id, name) values (?, ?)";
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
check_execute(stmt, rc);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_LONG;
bind[0].buffer= (void*) &id_val;
bind[1].buffer_type= MYSQL_TYPE_STRING;
@@ -13434,7 +13434,7 @@ static void test_bug10794()
mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
stmt1= mysql_stmt_init(mysql);
mysql_stmt_attr_set(stmt1, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
- bzero(bind, sizeof(bind));
+ bzero((char*) bind, sizeof(bind));
bind[0].buffer_type= MYSQL_TYPE_STRING;
bind[0].buffer= (void*) a;
bind[0].buffer_length= sizeof(a);
@@ -13507,9 +13507,9 @@ static void test_bug11172()
type= (ulong) CURSOR_TYPE_READ_ONLY;
mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
- bzero(bind_in, sizeof(bind_in));
- bzero(bind_out, sizeof(bind_out));
- bzero(&hired, sizeof(hired));
+ bzero((char*) bind_in, sizeof(bind_in));
+ bzero((char*) bind_out, sizeof(bind_out));
+ bzero((char*) &hired, sizeof(hired));
hired.year= 1965;
hired.month= 1;
hired.day= 1;
@@ -13577,9 +13577,9 @@ static void test_bug11656()
type= (ulong) CURSOR_TYPE_READ_ONLY;
mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type);
- bzero(bind, sizeof(bind));
- strcpy(buf[0], "pcint502_MY2");
- strcpy(buf[1], "*");
+ bzero((char*) bind, sizeof(bind));
+ strmov(buf[0], "pcint502_MY2");
+ strmov(buf[1], "*");
for (i=0; i < 2; i++)
{
bind[i].buffer_type= MYSQL_TYPE_STRING;