Commit 1f409baf authored by monty@tik.mysql.fi's avatar monty@tik.mysql.fi
Browse files

Changed compare in MyISAM to use my_pread()

Fixed that @VAR shows all decimals
Fixed problem with FLUSH TABLES and LOCK TABLE
CREATE ... SELECT now creates keys later
Reset AUTO_INCREMENT order if droping AUTO_INCREMENT key
parent b79da888
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -284,3 +284,4 @@ support-files/mysql.spec
tags
tmp/*
sql-bench/gif/*
sql-bench/graph-compare-results
+1 −1
Original line number Diff line number Diff line
monty@hundin.mysql.fi
monty@tik.mysql.fi
+544 −50

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -954,7 +954,7 @@ static int _nisam_cmp_buffer(File file, const byte *buff, ulong filepos, uint le
  {
    if (my_read(file,temp_buff,next_length,MYF(MY_NABP)))
      goto err;
    if (memcmp((byte*) buff,temp_buff,IO_SIZE))
    if (memcmp((byte*) buff,temp_buff,next_length))
      DBUG_RETURN(1);
    buff+=next_length;
    length-= next_length;
+4 −5
Original line number Diff line number Diff line
@@ -1221,20 +1221,19 @@ static int _mi_cmp_buffer(File file, const byte *buff, my_off_t filepos,
  char temp_buff[IO_SIZE*2];
  DBUG_ENTER("_mi_cmp_buffer");

  VOID(my_seek(file,filepos,MY_SEEK_SET,MYF(0)));
  next_length= IO_SIZE*2 - (uint) (filepos & (IO_SIZE-1));

  while (length > IO_SIZE*2)
  {
    if (my_read(file,temp_buff,next_length,MYF(MY_NABP)))
    if (my_pread(file,temp_buff,next_length,filepos, MYF(MY_NABP)) ||
	memcmp((byte*) buff,temp_buff,next_length))
      goto err;
    if (memcmp((byte*) buff,temp_buff,IO_SIZE))
      DBUG_RETURN(1);
    filepos+=next_length;
    buff+=next_length;
    length-= next_length;
    next_length=IO_SIZE*2;
  }
  if (my_read(file,temp_buff,length,MYF(MY_NABP)))
  if (my_pread(file,temp_buff,length,filepos,MYF(MY_NABP)))
    goto err;
  DBUG_RETURN(memcmp((byte*) buff,temp_buff,length));
err:
Loading