Loading BUILD/SETUP.sh +9 −1 Original line number Diff line number Diff line Loading @@ -139,9 +139,17 @@ fi # base_configs="--prefix=$prefix --enable-assembler " base_configs="$base_configs --with-extra-charsets=complex " base_configs="$base_configs --enable-thread-safe-client --with-readline " base_configs="$base_configs --enable-thread-safe-client " base_configs="$base_configs --with-big-tables" if test -d "$path/../cmd-line-utils/readline" then base_configs="$base_configs --with-readline" elif test -d "$path/../cmd-line-utils/libedit" then base_configs="$base_configs --with-libedit" fi static_link="--with-mysqld-ldflags=-all-static " static_link="$static_link --with-client-ldflags=-all-static" # we need local-infile in all binaries for rpl000001 Loading client/mysql.cc +3 −3 Original line number Diff line number Diff line Loading @@ -1408,7 +1408,7 @@ static char **new_mysql_completion (const char *text, int start, int end); #if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE) char *no_completion(const char*,int) #else int no_completion() char *no_completion() #endif { return 0; /* No filename completion */ Loading Loading @@ -1496,10 +1496,10 @@ static void initialize_readline (char *name) setlocale(LC_ALL,""); /* so as libedit use isprint */ #endif rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion; rl_completion_entry_function= (Function*)&no_completion; rl_completion_entry_function= &no_completion; #else rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion; rl_completion_entry_function= (Function*)&no_completion; rl_completion_entry_function= &no_completion; #endif } Loading cmd-line-utils/libedit/readline.c +5 −6 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ int rl_attempted_completion_over = 0; char *rl_basic_word_break_characters = break_chars; char *rl_completer_word_break_characters = NULL; char *rl_completer_quote_characters = NULL; Function *rl_completion_entry_function = NULL; CPFunction *rl_completion_entry_function = NULL; CPPFunction *rl_attempted_completion_function = NULL; Function *rl_pre_input_hook = NULL; Function *rl_startup1_hook = NULL; Loading Loading @@ -1724,7 +1724,7 @@ rl_display_match_list (matches, len, max) static int _rl_complete_internal(int what_to_do) { Function *complet_func; CPFunction *complet_func; const LineInfo *li; char *temp, **matches; const char *ctemp; Loading @@ -1737,7 +1737,7 @@ _rl_complete_internal(int what_to_do) complet_func = rl_completion_entry_function; if (!complet_func) complet_func = (Function *)(void *)filename_completion_function; complet_func = filename_completion_function; /* We now look backwards for the start of a filename/variable word */ li = el_line(e); Loading @@ -1764,7 +1764,7 @@ _rl_complete_internal(int what_to_do) } else matches = 0; if (!rl_attempted_completion_function || !matches) matches = completion_matches(temp, (CPFunction *)complet_func); matches = completion_matches(temp, complet_func); if (matches) { int i, retval = CC_REFRESH; Loading @@ -1789,8 +1789,7 @@ _rl_complete_internal(int what_to_do) * object is a directory. */ size_t alen = strlen(matches[0]); if ((complet_func != (Function *)filename_completion_function if ((complet_func != filename_completion_function || (alen > 0 && (matches[0])[alen - 1] != '/')) && rl_completion_append_character) { char buf[2]; Loading cmd-line-utils/libedit/readline/readline.h +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ extern int max_input_history; extern char *rl_basic_word_break_characters; extern char *rl_completer_word_break_characters; extern char *rl_completer_quote_characters; extern Function *rl_completion_entry_function; extern CPFunction *rl_completion_entry_function; extern CPPFunction *rl_attempted_completion_function; extern int rl_completion_type; extern int rl_completion_query_items; Loading configure.in +17 −3 Original line number Diff line number Diff line Loading @@ -2354,6 +2354,7 @@ readline_basedir="" readline_dir="" readline_h_ln_cmd="" readline_link="" want_to_use_readline="no" if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null then Loading @@ -2379,6 +2380,7 @@ then readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a" readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline" compile_readline=yes want_to_use_readline="yes" AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) else # Use system readline library Loading @@ -2388,10 +2390,12 @@ else MYSQL_CHECK_NEW_RL_INTERFACE MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY AC_LANG_RESTORE if [test "$mysql_cv_new_rl_interface" = "yes"] if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "./cmd-line-utils/readline"] then # Use the new readline interface # Use the new readline interface, but only if the package includes a bundled libreadline # this way we avoid linking commercial source with GPL readline readline_link="-lreadline" want_to_use_readline="yes" elif [test "$mysql_cv_libedit_interface" = "yes"] then # Use libedit Loading @@ -2402,6 +2406,15 @@ else versions of libedit or readline]) fi fi # if there is no readline, but we want to build with readline, we fail if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"] then AC_MSG_ERROR([This commercially licensed MySQL source package can't be built with libreadline. Please use --with-libedit to use the bundled version of libedit instead.]) fi # # if either readline or libedit is enabled - generate Makefile's for both # (to make sure both are included in 'make dist') Loading Loading @@ -2531,7 +2544,8 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl sql/sql_builtin.cc sql-common/Makefile dnl dbug/Makefile scripts/Makefile include/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl mysql-test/Makefile dnl mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl include/mysql_version.h plugin/Makefile win/Makefile) Loading Loading
BUILD/SETUP.sh +9 −1 Original line number Diff line number Diff line Loading @@ -139,9 +139,17 @@ fi # base_configs="--prefix=$prefix --enable-assembler " base_configs="$base_configs --with-extra-charsets=complex " base_configs="$base_configs --enable-thread-safe-client --with-readline " base_configs="$base_configs --enable-thread-safe-client " base_configs="$base_configs --with-big-tables" if test -d "$path/../cmd-line-utils/readline" then base_configs="$base_configs --with-readline" elif test -d "$path/../cmd-line-utils/libedit" then base_configs="$base_configs --with-libedit" fi static_link="--with-mysqld-ldflags=-all-static " static_link="$static_link --with-client-ldflags=-all-static" # we need local-infile in all binaries for rpl000001 Loading
client/mysql.cc +3 −3 Original line number Diff line number Diff line Loading @@ -1408,7 +1408,7 @@ static char **new_mysql_completion (const char *text, int start, int end); #if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE) char *no_completion(const char*,int) #else int no_completion() char *no_completion() #endif { return 0; /* No filename completion */ Loading Loading @@ -1496,10 +1496,10 @@ static void initialize_readline (char *name) setlocale(LC_ALL,""); /* so as libedit use isprint */ #endif rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion; rl_completion_entry_function= (Function*)&no_completion; rl_completion_entry_function= &no_completion; #else rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion; rl_completion_entry_function= (Function*)&no_completion; rl_completion_entry_function= &no_completion; #endif } Loading
cmd-line-utils/libedit/readline.c +5 −6 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ int rl_attempted_completion_over = 0; char *rl_basic_word_break_characters = break_chars; char *rl_completer_word_break_characters = NULL; char *rl_completer_quote_characters = NULL; Function *rl_completion_entry_function = NULL; CPFunction *rl_completion_entry_function = NULL; CPPFunction *rl_attempted_completion_function = NULL; Function *rl_pre_input_hook = NULL; Function *rl_startup1_hook = NULL; Loading Loading @@ -1724,7 +1724,7 @@ rl_display_match_list (matches, len, max) static int _rl_complete_internal(int what_to_do) { Function *complet_func; CPFunction *complet_func; const LineInfo *li; char *temp, **matches; const char *ctemp; Loading @@ -1737,7 +1737,7 @@ _rl_complete_internal(int what_to_do) complet_func = rl_completion_entry_function; if (!complet_func) complet_func = (Function *)(void *)filename_completion_function; complet_func = filename_completion_function; /* We now look backwards for the start of a filename/variable word */ li = el_line(e); Loading @@ -1764,7 +1764,7 @@ _rl_complete_internal(int what_to_do) } else matches = 0; if (!rl_attempted_completion_function || !matches) matches = completion_matches(temp, (CPFunction *)complet_func); matches = completion_matches(temp, complet_func); if (matches) { int i, retval = CC_REFRESH; Loading @@ -1789,8 +1789,7 @@ _rl_complete_internal(int what_to_do) * object is a directory. */ size_t alen = strlen(matches[0]); if ((complet_func != (Function *)filename_completion_function if ((complet_func != filename_completion_function || (alen > 0 && (matches[0])[alen - 1] != '/')) && rl_completion_append_character) { char buf[2]; Loading
cmd-line-utils/libedit/readline/readline.h +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ extern int max_input_history; extern char *rl_basic_word_break_characters; extern char *rl_completer_word_break_characters; extern char *rl_completer_quote_characters; extern Function *rl_completion_entry_function; extern CPFunction *rl_completion_entry_function; extern CPPFunction *rl_attempted_completion_function; extern int rl_completion_type; extern int rl_completion_query_items; Loading
configure.in +17 −3 Original line number Diff line number Diff line Loading @@ -2354,6 +2354,7 @@ readline_basedir="" readline_dir="" readline_h_ln_cmd="" readline_link="" want_to_use_readline="no" if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null then Loading @@ -2379,6 +2380,7 @@ then readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a" readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline" compile_readline=yes want_to_use_readline="yes" AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) else # Use system readline library Loading @@ -2388,10 +2390,12 @@ else MYSQL_CHECK_NEW_RL_INTERFACE MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY AC_LANG_RESTORE if [test "$mysql_cv_new_rl_interface" = "yes"] if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "./cmd-line-utils/readline"] then # Use the new readline interface # Use the new readline interface, but only if the package includes a bundled libreadline # this way we avoid linking commercial source with GPL readline readline_link="-lreadline" want_to_use_readline="yes" elif [test "$mysql_cv_libedit_interface" = "yes"] then # Use libedit Loading @@ -2402,6 +2406,15 @@ else versions of libedit or readline]) fi fi # if there is no readline, but we want to build with readline, we fail if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"] then AC_MSG_ERROR([This commercially licensed MySQL source package can't be built with libreadline. Please use --with-libedit to use the bundled version of libedit instead.]) fi # # if either readline or libedit is enabled - generate Makefile's for both # (to make sure both are included in 'make dist') Loading Loading @@ -2531,7 +2544,8 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl sql/sql_builtin.cc sql-common/Makefile dnl dbug/Makefile scripts/Makefile include/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl mysql-test/Makefile dnl mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl include/mysql_version.h plugin/Makefile win/Makefile) Loading