Commit d36f9479 authored by unknown's avatar unknown
Browse files

Applied innodb-5.1-ss660 snapshot.

 Changes in SQL parser:
 * Change default mode of SELECT from "lock in share mode"
   to "consistent read".
 * Remove support from SELECT for specifying "consistent read".
 * Add support in SELECT for specifying "lock in share mode".
 * Change all uses of SQL parser to specify "lock in share mode".
 * Modify syntax so that the only valid top-level statement is
   a procedure definition, since it's the only one that actually
   works.
 * Add support for lock waits.


sql/ha_innodb.cc:
  Applied innodb-5.1-ss660 snapshot.
   Document better the "bool table_id" flag.
storage/innobase/btr/btr0cur.c:
  Applied innodb-5.1-ss660 snapshot.
   btr_cur_search_to_nth_level(): Reacquire btr_search_latch after
   inserting to the insert buffer. This was noticed while analysing
   Bug#19801, but this should not fix this bug since, according to
   Heikki, btr_search_latch is not reserved during an insert.
storage/innobase/configure.in:
  Applied innodb-5.1-ss660 snapshot.
   Add -Wpointer-arith to CFLAGS when using GCC.
storage/innobase/data/data0type.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/dict/dict0crea.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/dict/dict0dict.c:
  Applied innodb-5.1-ss660 snapshot.
   Make dict_remove_db_name() non-static.
storage/innobase/ibuf/ibuf0ibuf.c:
  Applied innodb-5.1-ss660 snapshot.
   ibuf_fixed_addr_page(): Add parameter space. As the insert buffer
   B-tree is only located in the system tablespace (space 0),
   IBUF_TREE_ROOT_PAGE_NO is only special in space 0.
storage/innobase/include/data0type.h:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/include/dict0dict.h:
  Applied innodb-5.1-ss660 snapshot.
   Make dict_remove_db_name() non-static.
storage/innobase/include/pars0grm.h:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/include/pars0pars.h:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/include/que0que.h:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/include/sync0rw.ic:
  Applied innodb-5.1-ss660 snapshot.
   rw_lock_s_unlock_func(): Change a debug assertion to a
   production assertion in order to track down Bug#19081.
storage/innobase/include/trx0trx.h:
  Applied innodb-5.1-ss660 snapshot.
   trx_sig_send() always succeeds or asserts.
storage/innobase/include/ut0ut.h:
  Applied innodb-5.1-ss660 snapshot.
   Document better the "bool table_id" flags.
storage/innobase/mem/mem0mem.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/pars/lexyy.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/pars/pars0grm.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/pars/pars0grm.h:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/pars/pars0grm.y:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/pars/pars0lex.l:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/pars/pars0pars.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/que/que0que.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/row/row0mysql.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/row/row0sel.c:
  Applied innodb-5.1-ss660 snapshot.
   * Disable prefetch and adaptive hash index for tables
     with rows over 1024 bytes in InnoDB's SQL parser.
   * row_sel_try_search_shortcut(): Do not return SEL_FOUND
     when the record was not found. This bug was introduced
     in MySQL/InnoDB 5.0.3, but luckily it should never
     manifest itself, given that existing InnoDB SQL code
     never makes use of consistent reads.
   * Don't take unnecesary locks on supremum records when the
     srv_locks_unsafe_for_binlog option is enabled. Fixes an
     assertion failure in the innodb_unsafe_binlog testcase
     when compiled with UNIV_DEBUG.
storage/innobase/row/row0upd.c:
  Applied innodb-5.1-ss660 snapshot.
storage/innobase/trx/trx0roll.c:
  Applied innodb-5.1-ss660 snapshot.
   trx_sig_send() always succeeds or asserts.
storage/innobase/trx/trx0trx.c:
  Applied innodb-5.1-ss660 snapshot.
   trx_sig_send() always succeeds or asserts.
storage/innobase/ut/ut0ut.c:
  Applied innodb-5.1-ss660 snapshot.
   Document better the "bool table_id" flags.
parent 3a409d4a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1174,7 +1174,8 @@ innobase_print_identifier(
/*======================*/
	FILE*		f,	/* in: output stream */
	trx_t*		trx,	/* in: transaction */
	ibool		table_id,/* in: TRUE=decode table name */
	ibool		table_id,/* in: TRUE=print a table name,
				FALSE=print other identifier */
	const char*	name,	/* in: name to print */
	ulint		namelen)/* in: length of name */
{
+2 −1
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ btr_cur_search_to_nth_level(
				if (UNIV_LIKELY_NULL(heap)) {
					mem_heap_free(heap);
				}
				return;
				goto func_exit;
			}

			/* Insert to the insert buffer did not succeed:
@@ -571,6 +571,7 @@ btr_cur_search_to_nth_level(
						|| mode != PAGE_CUR_LE);
	}

func_exit:
	if (has_search_latch) {

		rw_lock_s_lock(&btr_search_latch);
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ fi
# If using gcc, add some extra warning flags.
if test "$ac_cv_prog_gcc" = "yes"
then
  CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
  CFLAGS="$CFLAGS -Werror-implicit-function-declaration -Wpointer-arith"
fi

case "$target_os" in
+1 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ dtype_print(
/***************************************************************************
Returns the maximum size of a data type. Note: types in system tables may be
incomplete and return incorrect information. */

ulint
dtype_get_max_size(
/*===============*/
+2 −2
Original line number Diff line number Diff line
@@ -1193,7 +1193,7 @@ dict_create_or_check_foreign_constraint_tables(void)
	"CREATE UNIQUE CLUSTERED INDEX ID_IND ON SYS_FOREIGN_COLS (ID, POS);\n"
	"COMMIT WORK;\n"
	"END;\n"
		, trx);
		, FALSE, trx);

	if (error != DB_SUCCESS) {
		fprintf(stderr, "InnoDB: error %lu in creation\n",
@@ -1242,7 +1242,7 @@ dict_foreign_eval_sql(
	ulint		error;
	FILE*		ef	= dict_foreign_err_file;

	error = que_eval_sql(info, sql, trx);
	error = que_eval_sql(info, sql, FALSE, trx);

	if (error == DB_DUPLICATE_KEY) {
		mutex_enter(&dict_foreign_err_mutex);
Loading