Commit f9fd9247 authored by unknown's avatar unknown
Browse files

Merge trift2.:/MySQL/M41/mysql-4.1

into  trift2.:/MySQL/M41/push-4.1

parents e6c2cba5 af1f49b7
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1817,6 +1817,14 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
      ndbcluster_system_libs=""
      ndb_mgmclient_libs="\$(top_builddir)/ndb/src/mgmclient/libndbmgmclient.la"
      MYSQL_CHECK_NDB_OPTIONS
    
      # libndbclient versioning when linked with GNU ld.
      if $LD --version 2>/dev/null|grep -q GNU; then
        NDB_LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/ndb/src/libndb.ver"
        AC_CONFIG_FILES(ndb/src/libndb.ver)
      fi
      AC_SUBST(NDB_LD_VERSION_SCRIPT)

      ;;
    * )
      AC_MSG_RESULT([Not using NDB Cluster])
+9 −0
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@ DOT_FRM_VERSION=6
SHARED_LIB_MAJOR_VERSION=14
SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0

NDB_SHARED_LIB_MAJOR_VERSION=1
NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0


# ndb version
NDB_VERSION_MAJOR=4
NDB_VERSION_MINOR=1
@@ -73,6 +77,9 @@ AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
                   [Version of .frm files])
AC_SUBST(SHARED_LIB_MAJOR_VERSION)
AC_SUBST(SHARED_LIB_VERSION)
AC_SUBST(NDB_SHARED_LIB_MAJOR_VERSION)
AC_SUBST(NDB_SHARED_LIB_VERSION)

AC_SUBST(AVAILABLE_LANGUAGES)
AC_SUBST(AVAILABLE_LANGUAGES_ERRORS)
AC_SUBST_FILE(AVAILABLE_LANGUAGES_ERRORS_RULES)
@@ -442,6 +449,8 @@ if $LD --version 2>/dev/null|grep -q GNU; then
fi
AC_SUBST(LD_VERSION_SCRIPT)



# Avoid bug in fcntl on some versions of linux
AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os])
# Any wariation of Linux
+4 −1
Original line number Diff line number Diff line
@@ -217,8 +217,11 @@ int main(int argc,char *argv[])
      On some system, like NETWARE, strerror(unknown_error) returns a
      string 'Unknown Error'.  To avoid printing it we try to find the
      error string by asking for an impossible big error message.

      On Solaris 2.8 it might return NULL
    */
    msg= strerror(10000);
    if ((msg= strerror(10000)) == NULL)
      msg= "Unknown Error";

    /*
      Allocate a buffer for unknown_error since strerror always returns
+16 −13
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@ Created 1/8/1996 Heikki Tuuri
#include "que0que.h"
#include "rem0cmp.h"

/* Implement isspace() in a locale-independent way. (Bug #24299) */
#define ib_isspace(c) ((char) (c) && strchr(" \v\f\t\r\n", c))

dict_sys_t*	dict_sys	= NULL;	/* the dictionary system */

rw_lock_t	dict_operation_lock;	/* table create, drop, etc. reserve
@@ -2374,7 +2377,7 @@ dict_accept(

	*success = FALSE;
	
	while (isspace(*ptr)) {
	while (ib_isspace(*ptr)) {
		ptr++;
	}

@@ -2419,7 +2422,7 @@ dict_scan_id(

	*id = NULL;

	while (isspace(*ptr)) {
	while (ib_isspace(*ptr)) {
		ptr++;
	}

@@ -2450,7 +2453,7 @@ dict_scan_id(
			len++;
		}
	} else {
		while (!isspace(*ptr) && *ptr != '(' && *ptr != ')'
		while (!ib_isspace(*ptr) && *ptr != '(' && *ptr != ')'
		       && (accept_also_dot || *ptr != '.')
		       && *ptr != ',' && *ptr != '\0') {

@@ -2480,12 +2483,12 @@ dict_scan_id(
	if (heap && !quote) {
		/* EMS MySQL Manager sometimes adds characters 0xA0 (in
		latin1, a 'non-breakable space') to the end of a table name.
		But isspace(0xA0) is not true, which confuses our foreign key
		parser. After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2
		and 0xA0 are at the end of the string.
		After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2
		and 0xA0 are at the end of the string, and ib_isspace()
		does not work for multi-byte UTF-8 characters.

		TODO: we should lex the string using thd->charset_info, and
		my_isspace(). Only after that, convert id names to UTF-8. */
		In MySQL 5.1 we lex the string using thd->charset_info, and
		my_isspace(). This workaround is not needed there. */

		b = (byte*)(*id);
		id_len = strlen(b);
@@ -2956,11 +2959,11 @@ dict_create_foreign_constraints_low(

		ut_a(success);

		if (!isspace(*ptr) && *ptr != '"' && *ptr != '`') {
		if (!ib_isspace(*ptr) && *ptr != '"' && *ptr != '`') {
	        	goto loop;
		}

		while (isspace(*ptr)) {
		while (ib_isspace(*ptr)) {
			ptr++;
		}

@@ -2990,7 +2993,7 @@ dict_create_foreign_constraints_low(
		goto loop;
	}

	if (!isspace(*ptr)) {
	if (!ib_isspace(*ptr)) {
	        goto loop;
	}

@@ -3078,7 +3081,7 @@ dict_create_foreign_constraints_low(
	}
	ptr = dict_accept(ptr, "REFERENCES", &success);

	if (!success || !isspace(*ptr)) {
	if (!success || !ib_isspace(*ptr)) {
		dict_foreign_report_syntax_err(name, start_of_latest_foreign,
									ptr);
		return(DB_CANNOT_ADD_CONSTRAINT);
@@ -3461,7 +3464,7 @@ dict_foreign_parse_drop_constraints(

	ptr = dict_accept(ptr, "DROP", &success);

	if (!isspace(*ptr)) {
	if (!ib_isspace(*ptr)) {

	        goto loop;
	}
+27 −7
Original line number Diff line number Diff line
@@ -66,6 +66,16 @@ void embedded_get_error(MYSQL *mysql)
  }
}


static void emb_free_rows(THD *thd)
{
  if (thd->current_stmt)
    free_root(&thd->data->alloc,MYF(0));
  else
    free_rows(thd->data);
}


static my_bool
emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
		     const char *header, ulong header_length,
@@ -78,7 +88,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,

  if (thd->data)
  {
    free_rows(thd->data);
    emb_free_rows(thd);
    thd->data= 0;
  }
  /* Check that we are calling the client functions in right order */
@@ -248,13 +258,23 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)

int emb_read_binary_rows(MYSQL_STMT *stmt)
{
  MYSQL_DATA *data;
  if (!(data= emb_read_rows(stmt->mysql, 0, 0)))
  MYSQL *mysql= stmt->mysql;
  embedded_get_error(mysql);
  if (mysql->net.last_errno)
  {
    set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
                    stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate);
    set_stmt_errmsg(stmt, mysql->net.last_error,
                    mysql->net.last_errno, mysql->net.sqlstate);
    return 1;
  }

  if (((THD*)mysql->thd)->data)
  {
    DBUG_ASSERT(((THD*) mysql->thd)->data == &stmt->result);
    stmt->result.prev_ptr= NULL;
    ((THD*)mysql->thd)->data= NULL;
  }
  else
    stmt->result.rows= 0;
  return 0;
}

@@ -269,7 +289,7 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row)
    *row= NULL;
    if (data)
    {
      free_rows(data);
      free_root(&data->alloc,MYF(0));
      ((THD*)mysql->thd)->data= NULL;
    }
  }
@@ -285,7 +305,7 @@ static void emb_free_embedded_thd(MYSQL *mysql)
{
  THD *thd= (THD*)mysql->thd;
  if (thd->data)
    free_rows(thd->data);
    emb_free_rows(thd);
  thread_count--;
  delete thd;
  mysql->thd=0;
Loading