Skip to content

Commit

Permalink
[MySQL] Use mysql_real_query instead of the deprecated mysql_query
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Apr 14, 2012
1 parent e0faff7 commit de4db04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mysql/pmc/mysqldbcontext.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit de4db04

Please sign in to comment.