diff --git a/configure.in b/configure.in index e529da3c149..917ba9254a4 100644 --- a/configure.in +++ b/configure.in @@ -14,12 +14,9 @@ SHARED_LIB_VERSION=14:0:0 # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 -MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` -F_PART=`echo $MYSQL_BASE_VERSION | sed -e "s|\.||g"| sed -e "s|[a-zA-Z]\+||"|sed -e "s|^\(..\)$|\\10|"` -L_PART=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|^[[0-9]]\.[[0-9]]*\.||" | sed -e "s|^\(.\)$|0\\1|" | sed -e "s|[[a-z]]||"` -MYSQL_VERSION_ID=${F_PART}${L_PART} +MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` # The port should be constant for a LONG time MYSQL_TCP_PORT_DEFAULT=3306 diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index cb43d4aa539..4ec37e12325 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -1155,6 +1155,12 @@ mysql_get_server_info(MYSQL *mysql __attribute__((unused))) } +ulong STDCALL +mysql_get_server_version(MYSQL *mysql __attribute__((unused))) +{ + return MYSQL_VERSION_ID; +} + const char * STDCALL mysql_get_host_info(MYSQL *mysql __attribute__((unused))) { diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 12666e26295..ba5862a7fde 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1601,7 +1601,7 @@ mysql_execute_command(THD *thd) } if ((&lex->select_lex != lex->all_selects_list && lex->unit.create_total_list(thd, lex, &tables, 0)) -#ifndef HAVE_REPLICATION +#ifdef HAVE_REPLICATION || (table_rules_on && tables && thd->slave_thread && !tables_ok(thd,tables)) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index bc1e61377a9..fdf8014f876 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2816,7 +2816,7 @@ order_clause: ORDER_SYM BY { LEX *lex=Lex; - if (lex->current_select->linkage != GLOBAL_OPTIONS_TYPE) && + if (lex->current_select->linkage != GLOBAL_OPTIONS_TYPE && lex->current_select->select_lex()->olap != UNSPECIFIED_OLAP_TYPE) {