On Mar 25, 2010, at 6:57 PM, Paul B. Davis wrote:
> In the windows build of the mysql command line client (mysql.exe, v
> 5.1.45), it appears as though the rehash function is disabled.
> I'd like to help the project by fixing this, if possible.
> Can anybody comment on the history behind this decision, and what they
> think needs to happen to get it working again?
It has never worked on Windows generally speaking. There used to be a
mysqlc client from a long time ago (3.22 era) that had it, but it used
cygwin libraries to make it work so it wasn't continued.
> At a high level, it
> looks like the "readline" library needs to get working in the Windows
> build again.
Correct. The readline and/or libedit libraries have never worked on
Windows without some odd emulation layer. I know there have been
discussions regarding it, but not sure of the current state.
So the first step would be ensure that there is a readline that works
on Windows (without other external bad dependencies) and then go from
there trying to get it to work by changing defines and trying to
compile with it and test it.
> Here's what I know so far:
> On windows, HAVE_READLINE is intentionally not defined, which blocks
> access to build_completion_hash():
> Line 91, MySQL.cc:
> #undef bcmp // Fix problem with new readline
> #if defined(__WIN__)
> #include <conio.h>
> #elif !defined(__NETWARE__)
> #include <readline/readline.h>
> #define HAVE_READLINE
> Line 3883, MySQL.cc:
> static int
> com_rehash(String *buffer __attribute__((unused)),
> char *line __attribute__((unused)))
> #ifdef HAVE_READLINE
> build_completion_hash(1, 0);
> return 0;
> Your thoughts and feedback are greatly appreciated.
> -Paul B. Davis
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals?unsub=1
Harrison C. Fisk, Senior Principal Technical Support Engineer
MySQL @ Oracle, Inc., http://www.mysql.com/