Description:
Tab key statement completion is completely nonfunctional on Windows.
This has been tested on Windows 7 amd64 and Windows Server 2003 x86.
The following console session dump outlines the problem. At the end of the session dump, after typing SELECT * FROM te<tab>, the final <tab> keystroke should result in a statement autocompletion action that prints the rest of the table name "test2." The completed statement would appear as:
SELECT * FROM test2
Instead, the client merely prints a tab character to the console and the cursor jumps a few character positions. No auto completion ever happens, and the client never posts any messages about rehashing the database information.
Additionally, there is no observable delay in connecting to mysql servers, even geographically distant servers with complicated schema. (The help printout of the -A switch implies that this delay might be observable).
The console session dump:
D:\source>mysql -h bpdsql -u root -p --auto-rehash
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.1.45-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \#
mysql> use test
Database changed
mysql> \#
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| innodbt |
| t |
| test2 |
+----------------+
3 rows in set (0.00 sec)
mysql> SELECT * FROM te<tab>
Abbreviated --help printout from my instance of mysql.exe:
D:\source>mysql -h bpdsql -u root -p --auto-rehash --help
mysql Ver 14.14 Distrib 5.1.45, for Win64 (unknown)
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
...
Default options are read from the following files in the given order:
C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.1\my.ini C:\Program Files\MySQL\MySQL Server 5.1\my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
auto-rehash TRUE
character-sets-dir (No default value)
column-type-info FALSE
comments FALSE
compress FALSE
debug-check FALSE
debug-info FALSE
database (No default value)
default-character-set latin1
delimiter ;
vertical FALSE
force FALSE
named-commands FALSE
ignore-spaces FALSE
local-infile FALSE
no-beep FALSE
host bpdsql
html FALSE
xml FALSE
line-numbers TRUE
unbuffered FALSE
column-names TRUE
sigint-ignore FALSE
port 0
prompt mysql>
quick FALSE
raw FALSE
reconnect TRUE
shared-memory-base-name (No default value)
socket (No default value)
ssl FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-verify-server-cert FALSE
table FALSE
user root
safe-updates FALSE
i-am-a-dummy FALSE
connect_timeout 0
max_allowed_packet 16777216
net_buffer_length 16384
select_limit 1000
max_join_size 1000000
secure-auth FALSE
show-warnings FALSE
How to repeat:
To Repro:
Download the 5.1.45 version of mySQL, and install it on your Windows workstation.
Open a command prompt by type "cmd" at the "Run" dialog in Windows.
Use "mysql.exe" to open a connection to a mysql server.
Ex: mysql -h YourServer -u YourUser -p --auto-rehash
Type your password when prompted.
Once connected, type the "use" command to switch to an example database.
Ex: use test;
Type "\#" and press enter to ensure that database rehashing occurs.
(Note that no informational printout follows execution of this statement)
Test statement completion by typing a simple SQL query with an incomplete table name.
Ex: SELECT * FROM te
Type a TAB keystroke after "te," and observe that tab completion does not occur as explained in the MySQL Documentation.
Suggested fix:
Fix tab completion on Windows, and ensure that it is part of your release testing cycle going forward.
This is basic functionality that brings a major usability impact to the table for Windows users.