7 messages in com.mysql.lists.gui-toolsRE: Bug in inline editing: only keys ...| From | Sent On | Attachments |
|---|---|---|
| Adam Hooper | 19 Apr 2002 04:41 | |
| Adam Hooper | 19 Apr 2002 08:49 | |
| Jorge del Conde | 19 Apr 2002 09:10 | |
| Jorge del Conde | 19 Apr 2002 09:46 | |
| Adam Hooper | 25 Apr 2002 08:19 | |
| Jorge del Conde | 25 Apr 2002 09:09 | |
| Jorge del Conde | 25 Apr 2002 10:14 |
| Subject: | RE: Bug in inline editing: only keys by visible values![]() |
|---|---|
| From: | Adam Hooper (ada...@densi.com) |
| Date: | 04/25/2002 08:19:36 AM |
| List: | com.mysql.lists.gui-tools |
We *could* do slightly better, though, no?
i.e., If someone did a single-table SELECT which queried all the primary keys of a table, he should be able to edit stuff. This would often be the case for *me* -- I formulate my own single-table SELECT statements as often as not.
This would be simple enough to implement if we could find 3 things: - Is this a single-table SELECT? - Do we have all the primary keys? ("SHOW KEYS"...) - Are there any aggregate functions?
It occurs to me these are all very general questions one could ask about queries, and these functions could be re-used elsewhere :).
Selecting but not displaying the primary keys of a single-table non-aggregate query is another thought, don't know how good an idea that is...
--------------- Adam Hooper ada...@densi.com
-----Original Message----- From: Jorge del Conde [mailto:jor...@mysql.com] Sent: Thursday, April 25, 2002 12:10 PM To: 'Adam Hooper'; my...@lists.mysql.com Subject: RE: Bug in inline editing: only keys by visible values
Hi!
After thinking on the problem a bit, there is no easy way to fix this.
The inline editing features will only work when one double-clicks on a table and keeps the original query unchanged.
We will be able to support this feature to all its extent once mysql supports prepare statements.
Regards, Jorge
-- For technical support contracts, visit https://order.mysql.com/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Jorge del Conde <jor...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer /_/ /_/\_, /___/\___\_\___/ Mexico City, Mexico <___/ www.mysql.com
-----Original Message----- From: Adam Hooper [mailto:ada...@densi.com] Sent: Friday, April 19, 2002 5:41 AM To: my...@lists.mysql.com Subject: Bug in inline editing: only keys by visible values
Editing a field when you have NOT done "select *" but rather "select column1, column2, ..." has a very large chance of updating the wrong columns. It'll do it if: - Not all the primary key columns have been selected - Not all of the multi-key columns have been selected - Not all the fields have been selected (if there are no primary/multi keys)
Also, just about any query that selects from more than one table will fail. Maybe once in a while freaky results would show up if two tables have all the same field names, but it's not likely.
The solution to both these problems: Disable inline editing when it won't work. The second case shouldn't be too hard - maybe simply parsing the query for "JOIN" and making sure there's only one table after "FROM", maybe? For the first, (I think) the CSqlTable::exec() query would need to know table information. That's well beyond my skill :).
Hope this helps,
--------------- Adam Hooper ada...@densi.com
---------------------------------------------------------------------
Before posting please check: http://www.mysql.com/products/mycc/index.html posting. To request this thread, email mycc...@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, email mycc...@lists.mysql.com instead.




