Permalink
Browse files

WL#4738 streamline/simplify @@variable creation process

Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
Bug#20415 Output of mysqld --help --verbose is incomplete
Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
Bug#32902 plugin variables don't know their names
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#34829 No default value for variable and setting default does not raise error
Bug#34834 ? Is accepted as a valid sql mode
Bug#34878 Few variables have default value according to documentation but error occurs  
Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
Bug#40988 log_output_basic.test succeeded though syntactically false.
Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations 
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#44797 plugins w/o command-line options have no disabling option in --help
Bug#46314 string system variables don't support expressions
Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
Bug#49417 some complaints about mysqld --help --verbose output
Bug#49540 DEFAULT value of binlog_format isn't the default value
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
Bug#49646 mysql --show-warnings crashes when server dies

--BZR--
revision-id: serg@mysql.com-20091222093556-8aocy9n92pdp0rwr
property-branch-nick: next-mr
property-file-info: ld7:file_id67:sp1f-cmakelists.txt-20060831175236-433hkm7nrqfjbwios4ancgytabw354nr7:message78:Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled4:path14:CMakeLists.txted7:file_id61:sp1f-mysql.cc-19700101030959-5sipizk7ehvbsi3tywrkdords5qy5zdl7:message49:don't crash with --show-warnings when mysqld dies4:path15:client/mysql.cced7:file_id63:sp1f-plugins.m4-20060413204924-cltp6uagmyygsgdno6od3mamfizdhk3m7:message78:Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled4:path27:config/ac-macros/plugins.m4ed7:file_id64:sp1f-my_getopt.h-20020125212018-wxrgonczg7uaw6w5ohby34eicbbwehct7:message8:comments4:path19:include/my_getopt.hed7:file_id65:sp1f-my_pthread.h-19700101030959-z4yp3kljwx5fgmhlyvumtwxuw73xgrjn7:message18:fix double #define4:path20:include/my_pthread.hed7:file_id68:sp1f-mysqltestrun.pl-20041230152716-xjnn5ndv4rr4by6ijmj5a4ysubxc7qh37:message139:run sys_vars suite by default
property-file-info: properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0
property-file-info: escape gdb command line arguments
property-file-info: 4:path28:mysql-test/mysql-test-run.pled7:file_id73:sp1f-rpl_init_slave_func.-20080410131339-djufckm4jdu5xgujdb5qzuy3ivizgxb57:message19:init_slave+utf8 bug4:path54:mysql-test/suite/sys_vars/r/rpl_init_slave_func.resulted7:file_id73:sp1f-rpl_init_slave_func.-20080410131404-csmwductd27vdj4dvuwfrskzeygtmcjm7:message19:init_slave+utf8 bug4:path52:mysql-test/suite/sys_vars/t/rpl_init_slave_func.tested7:file_id64:sp1f-my_getopt.c-20020125212008-5ppwsdqmfhny46gxkjxph22zh3phetir7:message241:Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
property-file-info: Bug#46586 When using the plugin interface the type "set" for options caused a crash.
property-file-info: Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
property-file-info: 
property-file-info: 
property-file-info: 
property-file-info: 4:path17:mysys/my_getopt.ced7:file_id62:sp1f-typelib.c-19700101030959-yks6u7xso4ru4dpd6v7uq7ynmxg6wsgt7:message19:support for flagset4:path15:mysys/typelib.ced7:file_id69:sp1f-ha_ndbcluster.cc-20040414175836-rvqnoxrkqexyhfu3d62s4t345ip7rez27:message24:backport from telco tree4:path20:sql/ha_ndbcluster.cced7:file_id65:sp1f-item_func.cc-19700101030959-3wmsx76yvc25sroqpfrx2n77kqdxxn3y7:message76:Bug#49644 init_connect and \0
property-file-info: Bug#49645 init_slave and multi-byte characters4:path16:sql/item_func.cced7:file_id70:sp1f-sql_builtin.cc.in-20060413204924-2uqxqmqkyuh3wtmodadlo23ag3lchfp67:message78:Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled4:path21:sql/sql_builtin.cc.ined7:file_id66:sp1f-sql_plugin.cc-20051105112032-hrm64p6xfjq33ud6zy3uivpo7azm75a27:message206:Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
property-file-info: Bug#32902 plugin variables don't know their names
property-file-info: Bug#44797 plugins w/o command-line options have no disabling option in --help4:path17:sql/sql_plugin.cced7:file_id48:set_var_new.cc-20090803110928-jyk836zs40b2z8e3-17:message37:all server variables are defined here4:path15:sql/sys_vars.cced7:file_id64:sp1f-ft_parser.c-19700101030959-goim35zn24ujo7rbznobwhhw5r3lemab7:message41:remove unnecessary updates of param->quot4:path26:storage/myisam/ft_parser.ced7:file_id65:sp1f-ha_myisam.cc-19700101030959-7xzssylbn7zfz3nupnsw43wws6xlltsu7:message30:myisam_* variables belong here4:path27:storage/myisam/ha_myisam.cced7:file_id67:sp1f-my_vsnprintf.c-19700101030959-tpt7gim7wclzegsmsqqysncmxhlmjrhp7:message11:%o and %llx4:path22:strings/my_vsnprintf.ced7:file_id49:my_vsnprintft.c-20091103211307-yk0d3oji7urlqwij-17:message17:%o and %llx tests4:path31:unittest/mysys/my_vsnprintf-t.ced7:file_id63:sp1f-viotcpip.c-20010520120437-u3pbzbt3fdfbclbmusalnzmuqh2y4nav7:message74:bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)4:path15:vio/viosocket.cee
testament3-sha1: 64feb1d92f8cf79db094ba97cef901d82ad6bdc0
  • Loading branch information...
Sergei Golubchik
Sergei Golubchik committed Dec 22, 2009
1 parent 4dbc004 commit c0d8d3d853505af0ca9ca330f26be5c08160acf2
Showing 740 changed files with 16,130 additions and 14,786 deletions.
BIN +12.2 KB (100%) .bzrfileids
Binary file not shown.
@@ -3070,3 +3070,5 @@ libmysqld/rpl_handler.cc
libmysqld/debug_sync.cc
libmysqld/rpl_handler.cc
dbug/tests
libmysqld/sys_vars.cc
libmysqld/keycaches.cc
@@ -255,7 +255,11 @@ FOREACH(SUBDIR ${STORAGE_SUBDIRS})
SET(ENGINE_BUILD_TYPE "NONE")
ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${ENGINE_LOWER}_plugin")
IF(MYSQL_PLUGIN_MANDATORY)
SET (mysql_mandatory_plugins "${mysql_mandatory_plugins}builtin_${ENGINE_LOWER}_plugin,")
ELSE(MYSQL_PLUGIN_MANDATORY)
SET (mysql_optional_plugins "${mysql_optional_plugins}builtin_${ENGINE_LOWER}_plugin,")
ENDIF(MYSQL_PLUGIN_MANDATORY)
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${ENGINE_LOWER})
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
@@ -274,12 +278,12 @@ ENDFOREACH(SUBDIR ${STORAGE_SUBDIRS})
# Special handling for partition(not really pluggable)
IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_partition_plugin")
SET (mysql_optional_plugins "${mysql_optional_plugins}builtin_partition_plugin,")
ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)

ADD_DEFINITIONS(${STORAGE_ENGINE_DEFS})

# Now write out our mysql_plugin_defs struct
# Now write out our mysql_mandatory_plugins/mysql_optional_plugins structs
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc @ONLY)

@@ -204,10 +204,6 @@ test-bt-debug:
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \
--skip-ndbcluster --skip-rpl --report-features $(EXP)

test-bt-debug-fast:

test-bt-debug-fast:

# Keep these for a while
test-pl: test
test-full-pl: test-full
@@ -100,7 +100,7 @@ extern "C" {
#define vidattr(A) {} // Can't get this to work
#endif

#ifdef FN_NO_CASE_SENCE
#ifdef FN_NO_CASE_SENSE
#define cmp_database(cs,A,B) my_strcasecmp((cs), (A), (B))
#else
#define cmp_database(cs,A,B) strcmp((A),(B))
@@ -3652,7 +3652,7 @@ static void print_warnings()
mysql_store_result_for_lazy(&result);

/* Bail out when no warnings */
if (!(num_rows= mysql_num_rows(result)))
if (!result || !(num_rows= mysql_num_rows(result)))
goto end;

cur= mysql_fetch_row(result);
@@ -2227,7 +2227,7 @@ do_result_format_version(struct st_command *command)
long version;
static DYNAMIC_STRING ds_version;
const struct command_arg result_format_args[] = {
"version", ARG_STRING, TRUE, &ds_version, "Version to use",
{"version", ARG_STRING, TRUE, &ds_version, "Version to use"}
};

DBUG_ENTER("do_result_format_version");
@@ -6154,6 +6154,8 @@ void init_win_path_patterns()
"$MYSQL_TMP_DIR",
"$MYSQLTEST_VARDIR",
"$MASTER_MYSOCK",
"$MYSQL_SHAREDIR",
"$MYSQL_LIBDIR",
"./test/" };
int num_paths= sizeof(paths)/sizeof(char*);
int i;
@@ -7102,7 +7104,7 @@ int util_query(MYSQL* org_mysql, const char* query){
cur_con->util_mysql= mysql;
}

return mysql_query(mysql, query);
DBUG_RETURN(mysql_query(mysql, query));
}


@@ -7740,6 +7742,7 @@ int main(int argc, char **argv)
cur_file->file_name= my_strdup("<stdin>", MYF(MY_WME));
cur_file->lineno= 1;
}
var_set_string("MYSQLTEST_FILE", cur_file->file_name);
init_re();
ps_protocol_enabled= ps_protocol;
sp_protocol_enabled= sp_protocol;
@@ -460,7 +460,11 @@ dnl Although this is "pretty", it breaks libmysqld build
])
])
])
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
m4_ifdef([$9],[
mysql_mandatory_plugins="$mysql_mandatory_plugins [builtin_]$2[_plugin],"
],[
mysql_optional_plugins="$mysql_optional_plugins [builtin_]$2[_plugin],"
])
[with_plugin_]$2=yes
AC_MSG_RESULT([yes])
m4_ifdef([$11],[
@@ -2875,7 +2875,7 @@ case $SYSTEM_TYPE in
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"]
if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/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
@@ -3015,8 +3015,8 @@ AC_SUBST(server_scripts)

AC_SUBST(mysql_plugin_dirs)
AC_SUBST(mysql_plugin_libs)
AC_SUBST(mysql_plugin_defs)

AC_SUBST(mysql_optional_plugins)
AC_SUBST(mysql_mandatory_plugins)

# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
# We support client-only builds by "--without-server", but not vice versa,
@@ -100,7 +100,7 @@ extern "C" {
#define USE_OLD_FUNCTIONS 1

/* no case sensitivity */
#define FN_NO_CASE_SENCE 1
#define FN_NO_CASE_SENSE 1

/* the thread alarm is not used */
#define DONT_USE_THR_ALARM 1
@@ -318,10 +318,8 @@ inline ulonglong double2ulonglong(double d)
#define strcasecmp stricmp
#define strncasecmp strnicmp

#ifdef NOT_USED
#define HAVE_SNPRINTF /* Gave link error */
#define _snprintf snprintf
#endif
#define snprintf _snprintf

#ifdef _MSC_VER
#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
@@ -360,7 +358,7 @@ inline ulonglong double2ulonglong(double d)
#define FN_ROOTDIR "\\"
#define FN_DEVCHAR ':'
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
#define FN_NO_CASE_SENSE /* Files are not case-sensitive */
#define OS_FILE_LIMIT UINT_MAX /* No limit*/

#define DO_NOT_REMOVE_THREAD_WRAPPERS
@@ -28,6 +28,8 @@ extern "C" {
#define HA_FT_MAXBYTELEN 254
#define HA_FT_MAXCHARLEN (HA_FT_MAXBYTELEN/3)

#define DEFAULT_FTB_SYNTAX "+ -><()~*:\"\"&|"

typedef struct st_ft_info FT_INFO;
struct _ft_vft
{
@@ -51,7 +53,7 @@ extern const char *ft_precompiled_stopwords[];
extern ulong ft_min_word_len;
extern ulong ft_max_word_len;
extern ulong ft_query_expansion_limit;
extern char ft_boolean_syntax[15];
extern const char *ft_boolean_syntax;
extern struct st_mysql_ftparser ft_default_parser;

int ft_init_stopwords(void);
@@ -87,10 +87,10 @@ typedef struct st_key_cache
initializing the key cache.
*/

ulonglong param_buff_size; /* size the memory allocated for the cache */
ulong param_block_size; /* size of the blocks in the key cache */
ulong param_division_limit; /* min. percentage of warm blocks */
ulong param_age_threshold; /* determines when hot block is downgraded */
ulonglong param_buff_size; /* size the memory allocated for the cache */
ulonglong param_block_size; /* size of the blocks in the key cache */
ulonglong param_division_limit; /* min. percentage of warm blocks */
ulonglong param_age_threshold; /* determines when hot block is downgraded */

/* Statistics variables. These are reset in reset_key_cache_counters(). */
ulong global_blocks_changed; /* number of currently dirty blocks */
@@ -215,7 +215,7 @@ extern char *str2int(const char *src,int radix,long lower,long upper,
long *val);
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define longlong2str(A,B,C) int2str((A),(B),(C),1)
#define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
#undef strtoll
#define strtoll(A,B,C) strtol((A),(B),(C))
@@ -228,14 +228,15 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#endif
#else
#ifdef HAVE_LONG_LONG
extern char *longlong2str(longlong val,char *dst,int radix);
extern char *ll2str(longlong val,char *dst,int radix, int upcase);
extern char *longlong10_to_str(longlong val,char *dst,int radix);
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
extern longlong strtoll(const char *str, char **ptr, int base);
extern ulonglong strtoull(const char *str, char **ptr, int base);
#endif
#endif
#endif
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)

/* my_vsnprintf.c */

@@ -260,6 +261,13 @@ typedef struct st_mysql_lex_string LEX_STRING;
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))

struct st_mysql_const_lex_string
{
const char *str;
size_t length;
};
typedef struct st_mysql_const_lex_string LEX_CSTRING;

/* SPACE_INT is a word that contains only spaces */
#if SIZEOF_INT == 4
#define SPACE_INT 0x20202020
@@ -275,17 +275,6 @@ enum ha_base_keytype {
#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */
#define HA_USES_BLOCK_SIZE ((uint) 32768)
#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */
#if MYSQL_VERSION_ID < 0x50200
/*
Key has a part that can have end space. If this is an unique key
we have to handle it differently from other unique keys as we can find
many matching rows for one key (because end space are not compared)
*/
#define HA_END_SPACE_KEY 0 /* was: 4096 */
#else
#error HA_END_SPACE_KEY is obsolete, please remove it
#endif


/* These flags can be added to key-seg-flag */

@@ -32,6 +32,7 @@ C_MODE_START
#define GET_ENUM 12
#define GET_SET 13
#define GET_DOUBLE 14
#define GET_FLAGSET 15

#define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127
@@ -42,24 +43,40 @@ struct st_typelib;

struct my_option
{
const char *name; /* Name of the option */
int id; /* unique id or short option */
const char *comment; /* option comment, for autom. --help */
uchar **value; /* The variable value */
uchar **u_max_value; /* The user def. max variable value */
struct st_typelib *typelib; /* Pointer to possible values */
ulong var_type;
enum get_opt_arg_type arg_type;
longlong def_value; /* Default value */
longlong min_value; /* Min allowed value */
longlong max_value; /* Max allowed value */
longlong sub_size; /* Subtract this from given value */
long block_size; /* Value should be a mult. of this */
void *app_type; /* To be used by an application */
const char *name; /**< Name of the option. name=NULL
marks the end of the my_option[]
array.
*/
int id; /**< For 0<id<255 it's means one
character for a short option
(like -A), if >255 no short option
is created, but a long option still
can be identified uniquely in the
my_get_one_option() callback.
If an opton needs neither special
treatment in the my_get_one_option()
nor one-letter short equivalent
use id=0
*/
const char *comment; /**< option comment, for autom. --help.
if it's NULL the option is not
visible in --help.
*/
uchar **value; /**< A pointer to the variable value */
uchar **u_max_value; /**< The user def. max variable value */
struct st_typelib *typelib; /**< Pointer to possible values */
ulong var_type; /**< GET_BOOL, GET_ULL, etc */
enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */
longlong def_value; /**< Default value */
longlong min_value; /**< Min allowed value (for numbers) */
longlong max_value; /**< Max allowed value (for numbers) */
longlong sub_size; /**< Unused */
long block_size; /**< Value should be a mult. of this (for numbers) */
void *app_type; /**< To be used by an application */
};

typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
typedef my_bool (*my_get_one_option) (int, const struct my_option *, char * );
typedef void (*my_error_reporter) (enum loglevel level, const char *format, ... );

extern char *disabled_my_option;
extern my_bool my_getopt_print_errors;
@@ -78,6 +95,8 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
my_bool *fix);
longlong getopt_ll_limit_value(longlong, const struct my_option *,
my_bool *fix);
double getopt_double_limit_value(double num, const struct my_option *optp,
my_bool *fix);
my_bool getopt_compare_strings(const char *s, const char *t, uint length);

C_MODE_END
Oops, something went wrong.

0 comments on commit c0d8d3d

Please sign in to comment.