Mysql Error: Cannot edit table
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
After set "mark editable" in a result set and try modify a
row (using MySQL) Squirrel shows: "Cannot edit table
because table cannot be found or table name is not
unique in DB" two times (with options "yes" or "no") and
one time with button "OK". There is not a table with
same name. I´m using a JDBC Driver (Mysql). The logs
not showed errors.
Logged In: YES
user_id=1287991
Dear Anonymous,
What version of MySQL ? Are you using the MySQL Connector/J
JDBC driver (formerly known as MM.MySQL) ? Do you have an
exception stack trace at the very end of the log file
(Windows -> View SQuirreL Logs). Is it SQuirreL version
2.0RC1 or a snapshot ?
The reason I'm asking is because I use SQuirreL to access/update
MySQL 4.1 fairly often and haven't seen this issue.
Rob
Logged In: YES
user_id=1287991
I found a way to reproduce this issue with MySQL using the
latest code (2.1 final +). Here is how:
1. Create a user that has access to two catalogs A and B.
2. Login to catalog A using a URL like:
jdbc:mysql://localhost:3306/A
3. Create table in B:
create B.test ( id integer );
4. Insert data into B.test:
insert into B.test values (1);
5. Produce a result set from catalog B:
select * from B.test;
6. Make the result editable and attempt to change id to '2'.
7. Note the exception.
I believe this problem comes from the fact that MySQL
doesn't seem to return B.test from
DatabaseMetaData.getTables when null is specified for both
the catalog and schema. Need to find an alternative way
to get all tables from MySQL.
Rob
Logged In: YES
user_id=1287991
Fixed in CVS. Will be available in the next snapshot/release.