Re: [Sqlrelay-discussion] can not 'use $db' ??
Brought to you by:
mused
|
From: Devananda <kar...@ya...> - 2006-06-21 20:17:21
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> The problem seems to be line 260 in connections/mysql/mysqlconnection.C:<br> <br> <tt>return !mysql_stmt_prepare(stmt,query,length);</tt><br> <br> and the assumption that all queries can be run as prepared statements. I looked briefly in the other connectors, and I see the same treatment of queries (prepare them all). However, according to the MySQL documentation, this can't be done for 5.0 :(<br> <br> See <a class="moz-txt-link-freetext" href="http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html">http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html</a> :<br> <blockquote> The following statements can be used as prepared statements: <code class="literal">CREATE TABLE</code>, <code class="literal">DELETE</code>, <code class="literal">DO</code>, <code class="literal">INSERT</code>, <code class="literal">REPLACE</code>, <code class="literal">SELECT</code>, <code class="literal">SET</code>, <code class="literal">UPDATE</code>, and most <code class="literal">SHOW</code> statements. Other statements are not supported in MySQL 5.0.<br> </blockquote> <br> Regards,<br> Devananda<br> <br> <br> <br> Devananda wrote: <blockquote cite="mid...@ya..." type="cite"> <pre wrap="">This is particularly odd, I think.... I've compiled the latest 0.38pre2 (along with the new rudiments), and my test scripts failed immediately with a strange error... I ran sqlrsh to verify, and sure enough, sqlrsh returns an error when I simply "use $db" </pre> <blockquote type="cite"> <pre wrap="">0> show tables from test; Tables_in_test ============== bin_test fs Rows Returned : 2 Fields Returned : 2 System time : 30000 0> use test; This command is not supported in the prepared statement protocol yet Rows Returned : 0 Fields Returned : 0 System time : 30000 </pre> </blockquote> <pre wrap=""><!----> The same error message is returned for other commands, such as 'show slave status' and 'show create table'. This is all on a Fedora 3 server, talking to MySQL 5.0.18. Please let me know if there is anything I can do to help fix this, I would like to be able to put 0.38 into use on my development server (we need the inputBindBlob support that is lacking in 0.37). Regards, Devananda _______________________________________________ Sqlrelay-discussion mailing list <a class="moz-txt-link-abbreviated" href="mailto:Sql...@li...">Sql...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion">https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion</a> </pre> </blockquote> <br> </body> </html> |