Rewrite temporary table test

Use stack allocated test class and use const char pointers for const
functions. Simplify the test and improve error messages.
This commit is contained in:
Markus Mäkelä
2017-06-06 22:45:19 +03:00
parent de23297944
commit 943662d2b5
3 changed files with 40 additions and 77 deletions

View File

@ -6,7 +6,7 @@ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static char** sql = NULL;
static size_t sql_size = 0;
int execute_select_query_and_check(MYSQL *conn, char *sql, unsigned long long int rows)
int execute_select_query_and_check(MYSQL *conn, const char *sql, unsigned long long int rows)
{
MYSQL_RES *res;
MYSQL_ROW row;