Re: [Sqlrelay-discussion] can not 'use $db' ??
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2006-06-22 03:25:16
|
I recently (since the last prerelease) updated the mysql code to only use mysql_stmt_prepare for certain queries and use the older style code for others. So far, it only uses the older style code for create/drop procedures statements, but I'll update the list. Dave On Wed, 2006-06-21 at 13:17 -0700, Devananda wrote: > The problem seems to be line 260 in > connections/mysql/mysqlconnection.C: > > return !mysql_stmt_prepare(stmt,query,length); > > 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 :( > > See > http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html : > The following statements can be used as prepared statements: > CREATE TABLE, DELETE, DO, INSERT, REPLACE, SELECT, SET, > UPDATE, and most SHOW statements. Other statements are not > supported in MySQL 5.0. > > Regards, > Devananda > > > > Devananda wrote: > > 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" > > > > > > > 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 > > > > > > > > > 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 > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > |