1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Minor prepared statement fixes for time/date/datetime/timestamp types

Added flag MADB_BIND_DUMMY which allows binding empty buffers
This commit is contained in:
holzboote@googlemail.com
2013-10-26 18:55:24 +02:00
parent daf291349f
commit 9552507348
7 changed files with 110 additions and 38 deletions

View File

@@ -24,6 +24,31 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "my_test.h"
#include "ma_common.h"
static int test_conc60(MYSQL *mysql)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
char *stmtstr= "SELECT * FROM agendas";
int rc;
rc= mysql_stmt_prepare(stmt, stmtstr, strlen(stmtstr));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
rc= mysql_stmt_store_result(stmt);
check_stmt_rc(rc, stmt);
diag("rows: %u", mysql_stmt_num_rows(stmt));
while (mysql_stmt_fetch(stmt));
mysql_stmt_close(stmt);
return(OK);
}
/*
Bug#28075 "COM_DEBUG crashes mysqld"
*/
@@ -949,6 +974,7 @@ static int test_connect_attrs(MYSQL *my)
struct my_tests_st my_tests[] = {
{"test_connect_attrs", test_connect_attrs, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc60", test_conc60, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc49", test_conc49, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_bug28075", test_bug28075, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_bug28505", test_bug28505, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},