Commit 8fd06541 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  neptunus.(none):/home/msvensson/mysql/mysql-5.0

parents 72a8049b 8acd0fa4
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -561,12 +561,12 @@ dtuple_convert_big_rec(
		}
	
		/* We do not store externally fields which are smaller than
		DICT_MAX_COL_PREFIX_LEN */
		DICT_MAX_INDEX_COL_LEN */

		ut_a(DICT_MAX_COL_PREFIX_LEN > REC_1BYTE_OFFS_LIMIT);
		ut_a(DICT_MAX_INDEX_COL_LEN > REC_1BYTE_OFFS_LIMIT);

		if (longest < BTR_EXTERN_FIELD_REF_SIZE + 10
						+ DICT_MAX_COL_PREFIX_LEN) {
						+ DICT_MAX_INDEX_COL_LEN) {
			/* Cannot shorten more */

			mem_heap_free(heap);
@@ -588,10 +588,10 @@ dtuple_convert_big_rec(
		dfield = dtuple_get_nth_field(entry, longest_i);
		vector->fields[n_fields].field_no = longest_i;

		ut_a(dfield->len > DICT_MAX_COL_PREFIX_LEN);
		ut_a(dfield->len > DICT_MAX_INDEX_COL_LEN);
		
		vector->fields[n_fields].len = dfield->len
						- DICT_MAX_COL_PREFIX_LEN;
						- DICT_MAX_INDEX_COL_LEN;

		vector->fields[n_fields].data = mem_heap_alloc(heap,
						vector->fields[n_fields].len);
+1 −1
Original line number Diff line number Diff line
@@ -1625,7 +1625,7 @@ dict_index_add_col(
	variable-length fields, so that the extern flag can be embedded in
	the length word. */

	if (field->fixed_len > DICT_MAX_COL_PREFIX_LEN) {
	if (field->fixed_len > DICT_MAX_INDEX_COL_LEN) {
		field->fixed_len = 0;
	}

+7 −7
Original line number Diff line number Diff line
@@ -152,12 +152,12 @@ struct dict_col_struct{
				in some of the functions below */
};

/* 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. */
/* DICT_MAX_INDEX_COL_LEN is measured in bytes and is the max index column
length + 1. Starting from 4.1.6, we set it 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
#define DICT_MAX_INDEX_COL_LEN		768

/* Data structure for a field in an index */
struct dict_field_struct{
@@ -169,12 +169,12 @@ struct dict_field_struct{
					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
					DICT_MAX_INDEX_COL_LEN; NOTE that
					in the UTF-8 charset, MySQL sets this
					to 3 * the prefix len in UTF-8 chars */
	ulint		fixed_len;	/* 0 or the fixed length of the
					column if smaller than
					DICT_MAX_COL_PREFIX_LEN */
					DICT_MAX_INDEX_COL_LEN */
	ulint		fixed_offs;	/* offset to the field, or
					ULINT_UNDEFINED if it is not fixed
					within the record (due to preceding
+8 −2
Original line number Diff line number Diff line
@@ -335,8 +335,14 @@ int
row_create_index_for_mysql(
/*=======================*/
					/* out: error number or DB_SUCCESS */
	dict_index_t*	index,		/* in: index defintion */
	trx_t*		trx);		/* in: transaction handle */
	dict_index_t*	index,		/* in: index definition */
	trx_t*		trx,		/* in: transaction handle */
	const ulint*	field_lengths); /* in: if not NULL, must contain
					dict_index_get_n_fields(index)
					actual field lengths for the
					index columns, which are
					then checked for not being too
					large. */
/*************************************************************************
Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ trx_recover_for_mysql(
	XID*    xid_list, 	/* in/out: prepared transactions */
	ulint	len);		/* in: number of slots in xid_list */
/***********************************************************************
This function is used to commit one X/Open XA distributed transaction
This function is used to find one X/Open XA distributed transaction
which is in the prepared state */
trx_t *
trx_get_trx_by_xid(
Loading