List:Internals« Previous MessageNext Message »
From:Harrison Fisk Date:March 25 2010 11:29pm
Subject:Re: Tab Completion in mysql CLI on Windows
View as plain text  

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,
> #undef bcmp				// Fix problem with new readline
> #if defined(__WIN__)
> #include <conio.h>
> #elif !defined(__NETWARE__)
> #include <readline/readline.h>
> #endif
> Line 3883,
> static int
> com_rehash(String *buffer __attribute__((unused)),
> 	 char *line __attribute__((unused)))
> {
>  build_completion_hash(1, 0);
> #endif
>  return 0;
> }
> Your thoughts and feedback are greatly appreciated.
> -Paul B. Davis
> --
> MySQL Internals Mailing List
> For list archives:
> To unsubscribe:


Harrison C. Fisk, Senior Principal Technical Support Engineer
MySQL @ Oracle, Inc.,

Tab Completion in mysql CLI on WindowsPaul B. Davis25 Mar
Re: Tab Completion in mysql CLI on WindowsHarrison Fisk26 Mar