Commit 4a618a35 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb2


BitKeeper/deleted/.del-ndb_subquery.result:
  Delete: mysql-test/r/ndb_subquery.result
BitKeeper/deleted/.del-ndb_subquery.test:
  Delete: mysql-test/t/ndb_subquery.test
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/test/run-test/atrt-mysql-test-run:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
parents f77811a2 e82d3d49
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -151,7 +151,12 @@ struct dict_col_struct{
				in some of the functions below */
};

#define DICT_MAX_COL_PREFIX_LEN	512
/* DICT_MAX_COL_PREFIX_LEN is measured in bytes. Starting from 4.1.6, we
set max col prefix len to < 3 * 256, so that one can create a column prefix
index on 255 characters of a TEXT field also in the UTF-8 charset. In that
charset, a character may take at most 3 bytes. */

#define DICT_MAX_COL_PREFIX_LEN	768

/* Data structure for a field in an index */
struct dict_field_struct{
@@ -160,9 +165,12 @@ struct dict_field_struct{
	ulint		order;		/* flags for ordering this field:
					DICT_DESCEND, ... */
	ulint		prefix_len;	/* 0 or the length of the column
					prefix in a MySQL index of type, e.g.,
					INDEX (textcol(25)); must be smaller
					than DICT_MAX_COL_PREFIX_LEN */
					prefix in bytes in a MySQL index of
					type, e.g., INDEX (textcol(25));
					must be smaller than
					DICT_MAX_COL_PREFIX_LEN; NOTE that
					in the UTF-8 charset, MySQL sets this
					to 3 * the prefix len in UTF-8 chars */
};

/* Data structure for an index tree */
+7 −3
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ int
ut_strcmp(const void* str1, const void* str2);

/**************************************************************************
Determine the length of a string when it is quoted with ut_strcpyq(). */
Compute strlen(ut_strcpyq(str, q)). */
UNIV_INLINE
ulint
ut_strlenq(
@@ -127,7 +127,9 @@ ut_strlenq(
	char		q);	/* in: the quote character */

/**************************************************************************
Make a quoted copy of a string. */
Make a quoted copy of a NUL-terminated string.  Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_memcpyq(). */

char*
ut_strcpyq(
@@ -138,7 +140,9 @@ ut_strcpyq(
	const char*	src);	/* in: null-terminated string */

/**************************************************************************
Make a quoted copy of a fixed-length string. */
Make a quoted copy of a fixed-length string.  Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_strcpyq(). */

char*
ut_memcpyq(
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ ut_strcmp(const void* str1, const void* str2)
}

/**************************************************************************
Determine the length of a string when it is quoted with ut_strcpyq(). */
Compute strlen(ut_strcpyq(str, q)). */
UNIV_INLINE
ulint
ut_strlenq(
+13 −4
Original line number Diff line number Diff line
@@ -1630,6 +1630,8 @@ row_create_index_for_mysql(
	
	trx->op_info = "creating index";

	trx_start_if_not_started(trx);

	/* Check that the same column does not appear twice in the index.
	Starting from 4.0.14, InnoDB should be able to cope with that, but
	safer not to allow them. */
@@ -1656,9 +1658,16 @@ row_create_index_for_mysql(
				goto error_handling;
			}
		}
	}
		
	trx_start_if_not_started(trx);
		/* Check also that prefix_len < DICT_MAX_COL_PREFIX_LEN */

		if (dict_index_get_nth_field(index, i)->prefix_len
						>= DICT_MAX_COL_PREFIX_LEN) {
			err = DB_TOO_BIG_RECORD;

			goto error_handling;
		}
	}

	if (row_mysql_is_recovered_tmp_table(index->table_name)) {

@@ -1988,9 +1997,9 @@ row_discard_tablespace_for_mysql(
	"new_id_high INT;\n"
	"table_name CHAR;\n"
	"BEGIN\n"
	"table_name := ";
	"table_name := '";
	static const char discard_tablespace_proc2[] =
	";\n"
	"';\n"
	"new_id_high := %lu;\n"
	"new_id_low := %lu;\n"
   "new_id := CONCAT(TO_BINARY(new_id_high, 4), TO_BINARY(new_id_low, 4));\n"
+6 −2
Original line number Diff line number Diff line
@@ -313,7 +313,9 @@ ut_free_all_mem(void)
}

/**************************************************************************
Make a quoted copy of a string. */
Make a quoted copy of a NUL-terminated string.  Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_memcpyq(). */

char*
ut_strcpyq(
@@ -333,7 +335,9 @@ ut_strcpyq(
}

/**************************************************************************
Make a quoted copy of a fixed-length string. */
Make a quoted copy of a fixed-length string.  Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_strcpyq(). */

char*
ut_memcpyq(
Loading