Commit 54e36baf authored by tim@threads.polyesthetic.msg's avatar tim@threads.polyesthetic.msg
Browse files

Merge work.mysql.com:/home/bk/mysql

into threads.polyesthetic.msg:/usr/local/src/my/3
parents a37b9715 2f990484
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
mwagner@evoq.mwagner.org
tim@threads.polyesthetic.msg
tim@work.mysql.com
heikki@donna.mysql.fi
paul@central.snake.net
monty@donna.mysql.fi
+378 −317

File changed.

Preview size limit exceeded, changes collapsed.

+5 −5
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
AM_INIT_AUTOMAKE(mysql, 3.23.38)
AM_INIT_AUTOMAKE(mysql, 3.23.39)
AM_CONFIG_HEADER(config.h)

PROTOCOL_VERSION=10
@@ -751,8 +751,8 @@ case $SYSTEM_TYPE in
    ;;
  *hpux10.20*)
    echo "Enabling snprintf workaround for hpux 10.20"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG"
    CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ"
    CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ"
    ;;
  *hpux11.*)
    echo "Enabling pread/pwrite workaround for hpux 11"
@@ -806,8 +806,8 @@ case $SYSTEM_TYPE in
    ;;
    *aix4.3*)
      echo "Adding defines for AIX"
      CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
      CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS"
      CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
      CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ"
    ;;
dnl Is this the right match for DEC OSF on alpha?
    *dec-osf*)
+67 −0
Original line number Diff line number Diff line
@@ -235,6 +235,71 @@ dict_table_get_index_noninline(
	return(dict_table_get_index(table, name));
}
	
/************************************************************************
Initializes the autoinc counter. It is not an error to initialize already
initialized counter. */

void
dict_table_autoinc_initialize(
/*==========================*/
	dict_table_t*	table,	/* in: table */
	ib_longlong	value)	/* in: value which was assigned to a row */
{
	mutex_enter(&(table->autoinc_mutex));

	table->autoinc_inited = TRUE;
	table->autoinc = value;

	mutex_exit(&(table->autoinc_mutex));
}

/************************************************************************
Gets the next autoinc value, 0 if not yet initialized. */

ib_longlong
dict_table_autoinc_get(
/*===================*/
				/* out: value for a new row, or 0 */
	dict_table_t*	table)	/* in: table */
{
	ib_longlong	value;

	mutex_enter(&(table->autoinc_mutex));

	if (!table->autoinc_inited) {

		value = 0;
	} else {
		table->autoinc = table->autoinc + 1;
		value = table->autoinc;
	}
	
	mutex_exit(&(table->autoinc_mutex));

	return(value);
}

/************************************************************************
Updates the autoinc counter if the value supplied is bigger than the
current value. If not inited, does nothing. */

void
dict_table_autoinc_update(
/*======================*/
	dict_table_t*	table,	/* in: table */
	ib_longlong	value)	/* in: value which was assigned to a row */
{
	mutex_enter(&(table->autoinc_mutex));

	if (table->autoinc_inited) {
		if (value > table->autoinc) {
			table->autoinc = value;
		}
	}	

	mutex_exit(&(table->autoinc_mutex));
}

/************************************************************************
Looks for column n in an index. */

@@ -568,6 +633,8 @@ dict_table_remove_from_cache(
	/* Remove table from LRU list of tables */
	UT_LIST_REMOVE(table_LRU, dict_sys->table_LRU, table);

	mutex_free(&(table->autoinc_mutex));

	size = mem_heap_get_size(table->heap);

	ut_ad(dict_sys->size >= size);
+5 −0
Original line number Diff line number Diff line
@@ -71,6 +71,11 @@ dict_mem_table_create(

	table->stat_modif_counter = 0;
	
	mutex_create(&(table->autoinc_mutex));
	mutex_set_level(&(table->autoinc_mutex), SYNC_DICT_AUTOINC_MUTEX);

	table->autoinc_inited = FALSE;

	table->magic_n = DICT_TABLE_MAGIC_N;
	
	return(table);
Loading