Commit 8b82ebc4 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org
Browse files

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

into sinisa.nasamreza.org:/mnt/work/mysql
parents 90adbe6f ed62ee1c
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ btr_search_check_guess(
/*===================*/
				/* out: TRUE if success */
	btr_cur_t*	cursor,	/* in: guessed cursor position */
	ibool           can_only_compare_to_cursor_rec,
	dtuple_t* 	tuple,	/* in: data tuple */
	ulint		mode,	/* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
				or PAGE_CUR_GE */
@@ -528,6 +529,10 @@ btr_search_check_guess(
		}
	}

	if (can_only_compare_to_cursor_rec) {
	       return(FALSE);
	}

	match = 0;
	bytes = 0;

@@ -632,6 +637,7 @@ btr_search_guess_on_hash(
	ulint		fold;
	ulint		tuple_n_fields;
	dulint		tree_id;
	ibool           can_only_compare_to_cursor_rec = TRUE;
#ifdef notdefined
	btr_cur_t	cursor2;
	btr_pcur_t	pcur;
@@ -706,6 +712,8 @@ btr_search_guess_on_hash(
			goto failure;
		}

		can_only_compare_to_cursor_rec = FALSE;

		buf_page_dbg_add_level(page, SYNC_TREE_NODE_FROM_HASH);
	}

@@ -737,7 +745,9 @@ btr_search_guess_on_hash(
				fold);
*/				
	} else {
		success = btr_search_check_guess(cursor, tuple, mode, mtr);
		success = btr_search_check_guess(cursor,
					   can_only_compare_to_cursor_rec,
						 tuple, mode, mtr);
	}
	
	if (!success) {
+19 −4
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Created 10/21/1995 Heikki Tuuri

#include "os0file.h"
#include "os0sync.h"
#include "os0thread.h"
#include "ut0mem.h"
#include "srv0srv.h"
#include "fil0fil.h"
@@ -1083,6 +1084,7 @@ os_file_write(
	DWORD		low;
	DWORD		high;
	ulint		i;
	ulint		n_retries	= 0;

	ut_a((offset & 0xFFFFFFFF) == offset);

@@ -1091,7 +1093,7 @@ os_file_write(
	ut_ad(file);
	ut_ad(buf);
	ut_ad(n > 0);

retry:
	low = offset;
	high = offset_high;
	
@@ -1135,6 +1137,19 @@ os_file_write(
		return(TRUE);
	}

	/* If some background file system backup tool is running, then, at
	least in Windows 2000, we may get here a specific error. Let us
	retry the operation 100 times, with 1 second waits. */
	
	if (GetLastError() == ERROR_LOCK_VIOLATION && n_retries < 100) {

		os_thread_sleep(1000000);
	
		n_retries++;

		goto retry;
	}	
	
	if (!os_has_said_disk_full) {
	
		ut_print_timestamp(stderr);
@@ -1147,7 +1162,7 @@ os_file_write(
"InnoDB: what the error number means.\n"
"InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
			name, offset_high, offset, n, len,
			name, offset_high, offset, n, (ulint)len,
			(ulint)GetLastError());

		os_has_said_disk_full = TRUE;
@@ -1170,13 +1185,13 @@ os_file_write(

		fprintf(stderr,
"  InnoDB: Error: Write to file %s failed at offset %lu %lu.\n"
"InnoDB: %lu bytes should have been written, only %lu were written.\n"
"InnoDB: %lu bytes should have been written, only %ld were written.\n"
"InnoDB: Operating system error number %lu.\n"
"InnoDB: Look from section 13.2 at http://www.innodb.com/ibman.html\n"
"InnoDB: what the error number means or use the perror program of MySQL.\n"
"InnoDB: Check that your OS and file system support files of this size.\n"
"InnoDB: Check also that the disk is not full or a disk quota exceeded.\n",
			name, offset_high, offset, n, (ulint)ret,
			name, offset_high, offset, n, (long int)ret,
							(ulint)errno);
		os_has_said_disk_full = TRUE;
	}
+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
  share.base.records=ci->max_rows;
  share.base.reloc=  ci->reloc_rows;
  share.base.reclength=real_reclength;
  share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM);;
  share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM);
  share.base.max_pack_length=pack_reclength;
  share.base.min_pack_length=min_pack_length;
  share.base.pack_bits=packed;
+10 −0
Original line number Diff line number Diff line
@@ -3718,6 +3718,16 @@ ha_innobase::store_lock(
      			lock_type = TL_WRITE_ALLOW_WRITE;
      		}

		/* In queries of type INSERT INTO t1 SELECT ... FROM t2 ...
		MySQL would use the lock TL_READ_NO_INSERT on t2, and that
		would conflict with TL_WRITE_ALLOW_WRITE, blocking all inserts
		to t2. Convert the lock to a normal read lock to allow
		concurrent inserts to t2. */
      		
		if (lock_type == TL_READ_NO_INSERT && !thd->in_lock_tables) {
			lock_type = TL_READ;
		}

 		lock.type=lock_type;
  	}

+1 −1
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ net_store_length(char *pkg, ulonglong length)
  }
  *packet++=254;
  int8store(packet,length);
  return (char*) packet+9;
  return (char*) packet+8;
}

char *
Loading