Permalink
Browse files

[MySQL] Use mysql_real_query instead of the deprecated mysql_query

  • Loading branch information...
1 parent e0faff7 commit de4db04d9b93af735b40a5d90a9cfb39ce7f5c0e @Whiteknight committed Apr 14, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 mysql/pmc/mysqldbcontext.pmc
View
3 mysql/pmc/mysqldbcontext.pmc
@@ -43,9 +43,10 @@ pmclass MySQLDbContext dynpmc auto_attrs {
METHOD query_no_result(STRING * query) {
MYSQL * const conn = GET_CONN(SELF);
+ int len = Parrot_str_byte_length(INTERP, query);
INTVAL stat;
STRING_TO_CSTRING(INTERP, query, cquery,
- stat = mysql_query(conn, cquery);
+ stat = mysql_real_query(conn, cquery, len);
);
if (stat)

0 comments on commit de4db04

Please sign in to comment.