Commit a5553ee8 authored by unknown's avatar unknown
Browse files

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

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-wl2278


BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/triggers/post-commit:
  Auto merged
sql/log.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
parents 538f4d4e e122a103
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,13 @@ BK_STATUS=$BK_STATUS$BK_COMMIT
if [ "$BK_STATUS" = OK ]
then 

HAS_ACTUAL_CHANGES=`bk cset -r+ -d | grep -v "^#"`
if [ "$HAS_ACTUAL_CHANGES" = "" ]
then
  echo ChangeSet had no real changes, not sending emails
  exit
fi

CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ rl_generic_bind (type, keyseq, data, map)
	     mapped to something, `abc' to be mapped to something else,
	     and the function bound  to `a' to be executed when the user
	     types `abx', leaving `bx' in the input queue. */
	  if (k.function /* && k.type == ISFUNC */)
	  if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
	    {
	      map[ANYOTHERKEY] = k;
	      k.function = 0;
+14 −35
Original line number Diff line number Diff line
@@ -45,54 +45,33 @@ dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0, 0, 0};
dtype_t* 	dtype_binary 	= &dtype_binary_val;

/*************************************************************************
Checks if a string type has to be compared by the MySQL comparison functions.
InnoDB internally only handles binary byte string comparisons, as well as
latin1_swedish_ci strings. For example, UTF-8 strings have to be compared
by MySQL. */

ibool
dtype_str_needs_mysql_cmp(
/*======================*/
				/* out: TRUE if a string type that requires
				comparison with MySQL functions */
	dtype_t*	dtype)	/* in: type struct */
{
	if (dtype->mtype == DATA_MYSQL
	    || dtype->mtype == DATA_VARMYSQL
	    || (dtype->mtype == DATA_BLOB
	        && 0 == (dtype->prtype & DATA_BINARY_TYPE)
		&& dtype_get_charset_coll(dtype->prtype) !=
				data_mysql_latin1_swedish_charset_coll)) {
		return(TRUE);
	}

	return(FALSE);
}

/*************************************************************************
For the documentation of this function, see innobase_get_at_most_n_mbchars()
in ha_innodb.cc. */
Determine how many bytes the first n characters of the given string occupy.
If the string is shorter than n characters, returns the number of bytes
the characters in the string occupy. */

ulint
dtype_get_at_most_n_mbchars(
/*========================*/
	dtype_t*	dtype,
	ulint		prefix_len,
	ulint		data_len,
	const char*	str)
					/* out: length of the prefix,
					in bytes */
	const dtype_t*	dtype,		/* in: data type */
	ulint		prefix_len,	/* in: length of the requested
					prefix, in characters, multiplied by
					dtype_get_mbmaxlen(dtype) */
	ulint		data_len,	/* in: length of str (in bytes) */
	const char*	str)		/* in: the string whose prefix
					length is being determined */
{
#ifndef UNIV_HOTBACKUP
	ut_a(data_len != UNIV_SQL_NULL);
	ut_a(!(prefix_len % dtype->mbmaxlen));

	if (dtype_str_needs_mysql_cmp(dtype)) {
	if (dtype->mbminlen != dtype->mbmaxlen) {
		return(innobase_get_at_most_n_mbchars(
				dtype_get_charset_coll(dtype->prtype),
				prefix_len, data_len, str));
	}

	/* We assume here that the string types that InnoDB itself can compare
	are single-byte charsets! */

	if (prefix_len < data_len) {

		return(prefix_len);
+11 −0
Original line number Diff line number Diff line
@@ -220,6 +220,8 @@ dict_build_table_def_step(
	const char*	path_or_name;
	ibool		is_path;
	mtr_t		mtr;
	ulint		i;
	ulint		row_len;

#ifdef UNIV_SYNC_DEBUG
	ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -231,6 +233,15 @@ dict_build_table_def_step(

	thr_get_trx(thr)->table_id = table->id;

	row_len = 0;
	for (i = 0; i < table->n_def; i++) {
		row_len += dtype_get_min_size(dict_col_get_type(
						&table->cols[i]));
	}
	if (row_len > BTR_PAGE_MAX_REC_SIZE) {
		return(DB_TOO_BIG_RECORD);
	}

	if (table->type == DICT_TABLE_CLUSTER_MEMBER) {

		cluster_table = dict_table_get_low(table->cluster_name);
+20 −18
Original line number Diff line number Diff line
@@ -145,28 +145,22 @@ store the charset-collation number; one byte is left unused, though */
#define DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE	6

/*************************************************************************
Checks if a string type has to be compared by the MySQL comparison functions.
InnoDB internally only handles binary byte string comparisons, as well as
latin1_swedish_ci strings. For example, UTF-8 strings have to be compared
by MySQL. */

ibool
dtype_str_needs_mysql_cmp(
/*======================*/
				/* out: TRUE if a string type that requires
				comparison with MySQL functions */
	dtype_t*	dtype);	/* in: type struct */
/*************************************************************************
For the documentation of this function, see innobase_get_at_most_n_mbchars()
in ha_innodb.cc. */
Determine how many bytes the first n characters of the given string occupy.
If the string is shorter than n characters, returns the number of bytes
the characters in the string occupy. */

ulint
dtype_get_at_most_n_mbchars(
/*========================*/
	dtype_t*	dtype,
	ulint		prefix_len,
	ulint		data_len,
	const char*	str);
					/* out: length of the prefix,
					in bytes */
	const dtype_t*	dtype,		/* in: data type */
	ulint		prefix_len,	/* in: length of the requested
					prefix, in characters, multiplied by
					dtype_get_mbmaxlen(dtype) */
	ulint		data_len,	/* in: length of str (in bytes) */
	const char*	str);		/* in: the string whose prefix
					length is being determined */
/*************************************************************************
Checks if a data main type is a string type. Also a BLOB is considered a
string type. */
@@ -306,6 +300,14 @@ dtype_get_fixed_size(
				/* out: fixed size, or 0 */
	dtype_t*	type);	/* in: type */
/***************************************************************************
Returns the minimum size of a data type. */
UNIV_INLINE
ulint
dtype_get_min_size(
/*===============*/
				/* out: minimum size */
	const dtype_t*	type);	/* in: type */
/***************************************************************************
Returns a stored SQL NULL size for a type. For fixed length types it is
the fixed length of the type, otherwise 0. */
UNIV_INLINE
Loading