Commit e6eba17c authored by unknown's avatar unknown

Remove un-used variables

Pure coverage tests (debug only)


include/mysql.h:
  Remove un-used variables
tests/client_test.c:
  Pure coverage tests (debug only)
parent 433307fa
...@@ -516,12 +516,9 @@ typedef struct st_mysql_stmt ...@@ -516,12 +516,9 @@ typedef struct st_mysql_stmt
MYSQL_FIELD *fields; /* prepare meta info */ MYSQL_FIELD *fields; /* prepare meta info */
LIST list; /* list to keep track of all stmts */ LIST list; /* list to keep track of all stmts */
char *query; /* query buffer */ char *query; /* query buffer */
char *buffer; /* buffer to hold results */
MEM_ROOT mem_root; /* root allocations */ MEM_ROOT mem_root; /* root allocations */
MYSQL_RES tmp_result; /* Used by mysql_prepare_result */
unsigned long param_count; /* parameters count */ unsigned long param_count; /* parameters count */
unsigned long field_count; /* fields count */ unsigned long field_count; /* fields count */
unsigned long buffer_length; /* long buffer alloced length */
unsigned long stmt_id; /* Id for prepared statement */ unsigned long stmt_id; /* Id for prepared statement */
unsigned int last_errno; /* error code */ unsigned int last_errno; /* error code */
enum PREP_STMT_STATE state; /* statement state */ enum PREP_STMT_STATE state; /* statement state */
...@@ -552,6 +549,7 @@ my_bool STDCALL mysql_send_long_data(MYSQL_STMT *stmt, ...@@ -552,6 +549,7 @@ my_bool STDCALL mysql_send_long_data(MYSQL_STMT *stmt,
const char *data, const char *data,
unsigned long length); unsigned long length);
MYSQL_RES *STDCALL mysql_prepare_result(MYSQL_STMT *stmt); MYSQL_RES *STDCALL mysql_prepare_result(MYSQL_STMT *stmt);
MYSQL_RES *STDCALL mysql_param_result(MYSQL_STMT *stmt);
my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
my_bool STDCALL mysql_more_results(MYSQL *mysql); my_bool STDCALL mysql_more_results(MYSQL *mysql);
......
...@@ -4967,11 +4967,28 @@ static void test_pure_coverage() ...@@ -4967,11 +4967,28 @@ static void test_pure_coverage()
stmt = mysql_prepare(mysql,"insert into test_pure(c67788) values(10)",100); stmt = mysql_prepare(mysql,"insert into test_pure(c67788) values(10)",100);
mystmt_init_r(stmt); mystmt_init_r(stmt);
#ifndef DBUG_OFF
stmt = mysql_prepare(mysql,(const char *)0,0);
mystmt_init_r(stmt);
stmt = mysql_prepare(mysql,"insert into test_pure(c2) values(10)",100);
mystmt_init(stmt);
verify_param_count(stmt, 0);
rc = mysql_bind_param(stmt, bind);
mystmt_r(stmt, rc);
mysql_stmt_close(stmt);
#endif
stmt = mysql_prepare(mysql,"insert into test_pure(c2) values(?)",100); stmt = mysql_prepare(mysql,"insert into test_pure(c2) values(?)",100);
mystmt_init(stmt); mystmt_init(stmt);
#ifndef DBUG_OFF
rc = mysql_execute(stmt); rc = mysql_execute(stmt);
mystmt_r(stmt, rc);/* No parameters supplied */ mystmt_r(stmt, rc);/* No parameters supplied */
#endif
bind[0].length= &length; bind[0].length= &length;
bind[0].is_null= 0; bind[0].is_null= 0;
...@@ -4999,6 +5016,11 @@ static void test_pure_coverage() ...@@ -4999,6 +5016,11 @@ static void test_pure_coverage()
rc = mysql_execute(stmt); rc = mysql_execute(stmt);
mystmt(stmt, rc); mystmt(stmt, rc);
#ifndef DBUG_OFF
rc = mysql_bind_result(stmt, (MYSQL_BIND *)0);
mystmt_r(stmt, rc);
#endif
rc = mysql_stmt_store_result(stmt); rc = mysql_stmt_store_result(stmt);
mystmt(stmt, rc); mystmt(stmt, rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment