Please forgive the convoluted bug report. There are several
things wrong here, but I'm not sure how to split it up into
multiple bugs, since it's all related.
The original problem is that MySQL tables whose names
contain special characters cannot be browsed in current
versions of phpMyAdmin. This is in MySQL 3.22.32 on a PC
under SuSE Linux (7, I think).
I just discovered this in a database created by the web
design company where I work. The database was created
years ago, and as both the web design company and the
client are German, the table names were written in German
-- some using special characters that occur in the German
language, such as ü (u with two dots above) and ß (German
double-S character; what others might call a Beta).
Browsing these tables in phpMyAdmin 2.2.0 (from August
2001) works fine, but using 2.4.0, 2.5.1, 2.5.2-pl1, and
2.5.3-rc3 produces the following errors:
ERROR!
Warning: reset(): Passed variable is not an array or object
in /var/www/vhosts/admin/htdocs/phpMyAdmin-2.5.3-rc3/
libraries/display_tbl.lib.php on line 1647
ERROR!
Warning: Variable passed to each() is not an array or
object in /var/www/vhosts/admin/htdocs/phpMyAdmin-2.5.3-
rc3/libraries/display_tbl.lib.php on line 1648
ERROR!
Warning: reset(): Passed variable is not an array or object
in /var/www/vhosts/admin/htdocs/phpMyAdmin-2.5.3-rc3/
libraries/display_tbl.lib.php on line 927
ERROR!
Warning: Variable passed to each() is not an array or
object in /var/www/vhosts/admin/htdocs/phpMyAdmin-2.5.3-
rc3/libraries/display_tbl.lib.php on line 928
ERROR!
Warning: reset(): Passed variable is not an array or object
in /var/www/vhosts/admin/htdocs/phpMyAdmin-2.5.3-rc3/
libraries/display_tbl.lib.php on line 1170
ERROR!
Warning: Variable passed to each() is not an array or
object in /var/www/vhosts/admin/htdocs/phpMyAdmin-2.5.3-
rc3/libraries/display_tbl.lib.php on line 1171
Notes:
In phpMyAdmin 2.5.3-rc3, there is no problem creating
tables using special characters (like u-with-umlaut) on
MySQL 3.22.32, or renaming tables such that they contain
these characters. Exporting seems to work too. The only
problem seems to be browsing.
There is no problem selecting * from this table when using
the MySQL command line.
Further testing shows that MySQL 4.0.3-log on a PC with Red
Hat (7, I think) has no problems creating, renaming, or
browsing these tables.
Even further testing on MySQL 4.0.14-standard on a G4 with
Mac OS X 10.2.6 shows that it cannot create tables with
these names, nor can it rename tables to be named like
this, so I cannot determine if phpMyAdmin can work with
them on this server version. Don't know if this is a MySQL
4.0.14 issue or a Mac OS X issue.
Finally, in phpMyAdmin 2.5.1 I also got this error when
browsing the tables on MySQL 3.22.32:
There is a chance that you may have found a bug in the SQL
parser. Please examine your query closely, and check that
the quotes are correct and not mis-matched. Other possible
failure causes may be that you are uploading a file with
binary outside of a quoted text area. You can also try your
query on the MySQL command line interface. The MySQL
server error output below, if there is any, may also help you
in diagnosing the problem. If you still have problems or if
the parser fails where the command line interface succeeds,
please reduce your SQL query input to the single query that
causes problems, and submit a bug report with the data
chunk in the CUT section below:
----BEGIN CUT----
eNodjrFugzAURXd/
xR0yReDYBlLyNoTcNJKNiU0zZIMWqUhRSkGp0n/
PUNr5Hp1ztffOE0qJUsHo
iiBTyAwyZ6FZhgdj5SkQVod3wvx1Gdtp7id+GTo+fozRNyR/
ElBCJBux3QgJlZDYUbrF1Ha3Gfo+
YsXsTzgaQsKV4olir8HDhQjFXldNhJNeQrZ9g3XngzEFMi5YbQuC
4hmXrH6p/5jILT9Svkhghuvt
zkxR7Qn9NR7mzzjPs10s2X8naKPLBms8e2fx6PrpF8J/O8I=
----END CUT----
----BEGIN RAW----
ERROR: C1 C2 LEN: 14 15 18
STR: ü
CVS: $Id: sqlparser.lib.php,v 1.70 2003/06/01 23:09:46
rabus Exp $
MySQL: 3.22.32
USR OS, AGENT, VER: Mac MOZILLA 5.0
PMA: 2.5.1
PHP VER,OS: 4.3.2 Linux
LANG: en-iso-8859-1
SQL: SELECT * FROM über
But this error is no longer present in 2.5.2-pl1 or 2.5.3-rc3.
It was probably a mistake for us to have included special
characters in the table names. Therefore I would suggest
that phpMyAdmin should work properly for tables named like
this, but display a warning message recommending to the
user that they choose a name with only legal ASCII
characters.
Logged In: YES
user_id=210714
Just a quick note: in MySQL 3.23.6, quoting of identifiers
with backquotes was introduced:
http://www.mysql.com/doc/en/News-3.23.6.html
so for previous versions (like yours) we cannot use backquotes.
Our parser has problems with those unquoted names, we could
workaround the warnings, but without fixing the parser we
cannot restore the full functionnality of what this code is
doing.
Logged In: YES
user_id=418833
Marc, can we mark this as a dublicate of bug #593598, then?
Logged In: YES
user_id=210714
Alexander,
yes. Done.