forums › forums › SQLyog › Using SQLyog › Strange Behaviour Querying Mysql.user
- This topic is empty.
-
AuthorPosts
-
-
March 23, 2010 at 1:15 pm #11916larsenParticipant
Hi,
when I execute the following statements (both at the same time), I get a strange result (see below)
Code:SELECT * FROM USER WHERE USER = '456';
SELECT * FROM USER WHERE USER = '456';Code:(0 row(s) returned)
Execution Time : 00:00:00:046
Transfer Time : 00:00:00:000
Total Time : 00:00:00:046Query : SELECT * FROM USER WHERE USER = '456'
Error Code : 1146
Table 'mysql.USER' doesn't exist
Execution Time : 00:00:00:000
Transfer Time : 00:00:00:000
Total Time : 00:00:00:000Using MySQL 5.0.32 and SQLyog 8.3.
I don´t know if this is a MySQL or SQLyog problem. Can anyone reproduce this behaviour?
Lars
-
March 23, 2010 at 5:13 pm #30621larsenParticipant
The problem seems to be caused by copying the first statement and inserting it. SQLyog automatically changes the “user” to “USER” when I enter it (first statement). Then it is copied as “USER”.
I can fix the problem with the second statement by simply overwriting “USER” with “user” (what becomes “USER” automatically again).
-
March 24, 2010 at 5:56 am #30622peterlaursenParticipant
It is not reproducible for me with servers 5.0.90 and 5.1.45 0n Windows and 5.1.32 on Linux.
MESSAGES tab output on Windows (with default 'lower_case_table_names' setting):
Quote:(0 row(s) returned)Execution Time : 00:00:00:000
Transfer Time : 00:00:00:000
Total Time : 00:00:00:000
(0 row(s) returned)
Execution Time : 00:00:00:000
Transfer Time : 00:00:00:000
Total Time : 00:00:00:000
On Linux:
Quote:Query : SELECT * FROM USER WHERE USER = '456'Error Code : 1146
Table 'mysql.USER' doesn't exist
Execution Time : 00:00:00:000
Transfer Time : 00:00:00:000
Total Time : 00:00:00:000
Query : SELECT * FROM USER WHERE USER = '456' LIMIT
Error Code : 1146
Table 'mysql.USER' doesn't exist
Execution Time : 00:00:00:000
Transfer Time : 00:00:00:000
Total Time : 00:00:00:000
(obviously as table names are case sensitive on Linux as default, but not on Windows)
1) Please tell: on what platform is the server running?
2) Could you try a more recent server? 5.0.32 is very old and rather buggy.
3) You may `backquote`the table name `user`. SQLyog will not capitalize inside (back)quoted strings.
4) Also you may turn off the 'auto capitalization' feature from 'preferences'
Also see attached screenshot from autocomplete CTRL+SPACE popup. It tells that 'user' is 1) a keyword 2) a function 3) a table name and 4) a column name. And in your settings you have selected to capitalize functions automatically.
[attachment=1353:user.jpg]
-
March 24, 2010 at 6:13 am #30623peterlaursenParticipant
“The problem seems to be caused by copying the first statement and inserting it”
Also this I tried. I get consistently the same response for both statements
-
March 24, 2010 at 8:56 am #30624larsenParticipant
1) Linux
2) I only have a 5.0.51a server as this is the newest version you get from Debian Lenny.
3) It does work then.
4) works, too
5) Sorrry, no powertools with community version here =)
I still see the problem in SQLyog: When I type in “user”, SQLyog recognizes this as a function instead of a table name and capitalizes it. Internally though, it passes it as “user” to the server. Now, when I copy it, SQLyog inserts it as “USER” and also passes it as such to the server, where this of course is not an existing table.
-
March 24, 2010 at 9:02 am #30625peterlaursenParticipant
This “Internally though, it passes it as “user” to the server. Now, when I copy it, SQLyog inserts it as “USER” and also passes it as such to the server, where this of course is not an existing table.” is what I cannot reproduce. As told I get consistently same response for both queries. But let of testers try fiddle with this.
-
March 24, 2010 at 11:12 am #30626larsenParticipant
I can live with it, now that I know the behaviour, and I don´t regularly use the mysql.user table either. What eventually means that I will forget the behaviour till next time I have to use it 😉
If I can help with testing, please let me know.
-
March 24, 2010 at 3:38 pm #30627peterlaursenParticipant
Please let us consider this again after the weekend. We have scheduled other tasks for the rest of this week (and I do not consider it urgent).
-
March 24, 2010 at 3:55 pm #30628larsenParticipant
No, certainly not urgent. Do as you like =)
And thanks for the quick support! I am repeatedly astonished about the response times 😉
-
-
AuthorPosts
- You must be logged in to reply to this topic.