Re: [vwnc] VW - MySQL - lock tables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW - MySQL - lock tables

Aby Mathew
I tried connecting to MySQL using the ODBC interface and the query works correctly.

But with the MySQLEXDI interface loaded from the public store the query returns the error "This command is not supported in the prepared statement protocol yet"

Any workarounds...?

Aby



Chris wrote:
On Apr 24, 6:08 am, Aby Mathew [hidden email] wrote:
  
Doesn't the SQL "lock tables tablename write" work when given from VW to
   MySQL..?

It works good from the MySQL prompt but not when sending from within VW.

Anybody know something about this.

Thanks in advance..

Aby
    

No real experience with VW and MySQL, but is there a chance that you
have AutoCommit turned on?  Could it be a default?  If so, it would
indeed lock the table - and the unlock it (because of the commit).

-Chris



  

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] VW - MySQL - lock tables

Wallen, David

The short answer is that until vw7.7 ships, you need to use MySQLHybridConnection to handle both DDL (Data Definition Language?) and regular queries. So, try using that class in place of the expected MySQLConnection class. With vw7.7, MySQLConnection itself should work for all query types.

 

The long answer, for anyone curious, is that MySQL exposes two separate apis. The original MySQL api was a bit limited. It didn’t offer bound buffers and prepared statements. But it did offer text-based queries and the full gamut of DDL (think CREATE DATABASE) queries. The newer api added the usual statement handles and bound buffers, just like all the other major DBMs. But it didn’t permit DDL statements. The MySQL folks left DDL to the old api. So, one needs to support both apis in order to have full database capabilities.

 

The first incarnation of MySQLEXDI kept the two apis separate, since they have many architectural differences. But it turns out that the two apis can be blended into a single connection class, which we’re currently working on (AR 54380). This should meet expectations. Sorry about the inconvenience in the meantime, and thanks to Yuwei and Alan for highlighting this issue earlier.

 

In the long run, I expect the MySQL organization itself to go with a single api, which should simplify things a bit more.

 

- Dave W

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Aby Mathew
Sent: Friday, April 24, 2009 11:48 PM
To: Chris; [hidden email]
Subject: Re: [vwnc] VW - MySQL - lock tables

 

I tried connecting to MySQL using the ODBC interface and the query works correctly.

But with the MySQLEXDI interface loaded from the public store the query returns the error "This command is not supported in the prepared statement protocol yet"

Any workarounds...?

Aby



Chris wrote:

On Apr 24, 6:08 am, Aby Mathew [hidden email] wrote:
  
Doesn't the SQL "lock tables tablename write" work when given from VW to
   MySQL..?
 
It works good from the MySQL prompt but not when sending from within VW.
 
Anybody know something about this.
 
Thanks in advance..
 
Aby
    
 
No real experience with VW and MySQL, but is there a chance that you
have AutoCommit turned on?  Could it be a default?  If so, it would
indeed lock the table - and the unlock it (because of the commit).
 
-Chris
 
 
 
  

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc