From 0a10f78f1245fef3b2a3f5ca9a413ab830ea088e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Feb 2003 23:17:22 +0200 Subject: [PATCH] Updated configure script to handle 1 digit numbers in MySQL version Fixed a few typos from last patch configure.in: Updated script to handle 1 digit numbers in MySQL version libmysqld/libmysqld.c: Added mysql_get_server_version sql/sql_parse.cc: Fixed typo in last patch sql/sql_yacc.yy: Fixed typo in last patch --- configure.in | 5 +---- libmysqld/libmysqld.c | 6 ++++++ sql/sql_parse.cc | 2 +- sql/sql_yacc.yy | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) 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) {