dbTalk Databases Forums  

Tab Completion in mysql CLI on Windows

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss Tab Completion in mysql CLI on Windows in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul B. Davis
 
Posts: n/a

Default Tab Completion in mysql CLI on Windows - 03-25-2010 , 04:57 PM






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? At a high level, it
looks like the "readline" library needs to get working in the Windows
build again.

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
#endif


Line 3883, MySQL.cc:

static int
com_rehash(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
#ifdef HAVE_READLINE
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: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw

Reply With Quote
  #2  
Old   
Harrison Fisk
 
Posts: n/a

Default Re: Tab Completion in mysql CLI on Windows - 03-25-2010 , 05:29 PM






Hi,

On Mar 25, 2010, at 6:57 PM, Paul B. Davis wrote:

Quote:
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.

Quote:
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.

Quote:
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
#endif


Line 3883, MySQL.cc:

static int
com_rehash(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{
#ifdef HAVE_READLINE
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: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ysql (DOT) com

Regards,

Harrison
--
Harrison C. Fisk, Senior Principal Technical Support Engineer
MySQL @ Oracle, Inc., http://www.mysql.com/







--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.