MySQL Forums
Forum List  »  MyISAM

"Odd" behavior with select and limit.
Posted by: Brian Sullivan
Date: May 07, 2010 11:05AM

I'm seeing oddbehavior with a table containing an underscore in its name. Please look at the commands below.

show tables;
+---------------------+
| Tables_in_InDexSql |
+---------------------+
| MasterImageSql |
| MasterImageSql_save |
| Proxy_save |
| commit |
| pfetch_sch |
| sourcexds |
+---------------------+

COMMAND 1
select * from Proxy_save limit 1;
1 row in set (0.00 sec)
Note - This is just a reference to show the table and MySQL are functioning.

COMMAND 2
select * from Proxy limit 1;
1 row in set (0.00 sec)
Note - The table Proxy does not exist! How can I have results?

COMMAND 3
select * from Proxy;
ERROR 1146 (42S02): Table 'InDexSql.Proxy' doesn't exist
Note - Sanity returns, no results. Does "limit" do this?

COMMAND 4
select * from Prox limit 1;
ERROR 1146 (42S02): Table 'InDexSql.Prox' doesn't exist
Note - I add limit back but truncate the wrong table name more, stuff stays normal.

COMMAND 5
select count(*) from Proxy limit 1;
ERROR 1146 (42S02): Table 'InDexSql.Proxy' doesn't exist
Note - Count appears to counteract the craziness of limit in command 2.

COMMAND 6
select * from Proxy limit 1;
1 row in set (0.00 sec)
Note - The weird behavior is still here with limit.

How on earth is limit on my select changing which table I query?
C

Options: ReplyQuote


Subject
Views
Written By
Posted
"Odd" behavior with select and limit.
2573
May 07, 2010 11:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.