From 765940cb3abccdbfe9e43f2c1116d1e96eb27ae9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Jun 2001 15:01:28 +0300 Subject: 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 Docs/manual.texi: Added MySQL/PostgreSQL comparison isam/_dynrec.c: Fixed wrong compare (not used in MySQL) myisam/mi_dynrec.c: Fixed wrong compare (not used in MySQL). Changed compare to use my_pread() myisam/mi_packrec.c: cleanup mysql-test/r/alter_table.result: Added test for ALTER TABLE mysql-test/r/variables.result: Added test for variables with REAL values. mysql-test/t/alter_table.test: Added test for ALTER TABLE mysql-test/t/variables.test: Added test for variables with REAL values. mysys/my_pread.c: Cleanup sql-bench/Makefile.am: removed extra \ sql-bench/README: Fixed typo. sql/item_func.cc: Fixed that @VAR shows all decimals sql/share/swedish/errmsg.OLD: update sql/sql_base.cc: Fixed problem with FLUSH TABLES and LOCK TABLE sql/sql_insert.cc: CREATE ... SELECT now creates keys later sql/sql_table.cc: Reset AUTO_INCREMENT order if droping AUTO_INCREMENT key. BitKeeper/etc/ignore: Added sql-bench/graph-compare-results to the ignore list BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- myisam/mi_dynrec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'myisam/mi_dynrec.c') diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 4c05f6c737d..e090498f3fe 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -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: -- cgit v1.2.1