Fixed compile error with MySQL 5.1

pull/18/head
mitans02 2012-11-10 23:58:00 +09:00
parent 3ad6a1775c
commit b9e947fd5f
1 changed files with 3 additions and 0 deletions

View File

@ -346,6 +346,9 @@ static inline void yajl_add_obj( yajl_gen gen, const char *db,const char* ptype
//will return a pointer to the query and set len with the length of the query //will return a pointer to the query and set len with the length of the query
//starting with MySQL version 5.1.41 thd_query_string is added //starting with MySQL version 5.1.41 thd_query_string is added
#if MYSQL_VERSION_ID > 50140 #if MYSQL_VERSION_ID > 50140
extern "C" {
MYSQL_LEX_STRING *thd_query_string(MYSQL_THD thd);
}
static const char * thd_query_str(THD * thd, size_t * len) static const char * thd_query_str(THD * thd, size_t * len)
{ {
MYSQL_LEX_STRING * str = thd_query_string(thd); MYSQL_LEX_STRING * str = thd_query_string(thd);