mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
78cf07c8ea
Fixed bug in REPLACE with BDB tables Prepare for write lock on read for BDB Inform the handler when we want to use IGNORE / REPLACE New manual pages Docs/manual.texi: Updates for BDB tables and new changes client/mysql.cc: Cleanup configure.in: Added sys/ioctl.h heap/hp_rkey.c: Fixed bug when reading next on not unique key include/my_base.h: Added new extra options man/mysql.1: Added example mysys/my_write.c: Safety fix scripts/mysqlaccess.sh: Removed debug output scripts/safe_mysqld.sh: Added --open-files-limit sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686: Updated to new benchmark sql-bench/bench-init.pl.sh: Updated to new benchmark sql-bench/server-cfg.sh: Fixes for HEAP tables sql-bench/test-ATIS.sh: Fix for heap tables sql-bench/test-insert.sh: Added some ORDER BY benchmarks to test more things sql/ha_berkeley.cc: Fix a bug in REPLACE sql/ha_berkeley.h: Fix to handle lock_on_read sql/mysql_priv.h: Prepare for internal subtransactions in BDB sql/mysqld.cc: Added -O open_files_limit=# sql/sql_insert.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_load.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_parse.cc: Cleanup sql/sql_show.cc: Cleanup sql/sql_table.cc: Inform the handler when we want to use IGNORE / REPLACE sql/sql_update.cc: Inform the handler when we want to use IGNORE / REPLACE support-files/binary-configure.sh: Better message
51 lines
1.6 KiB
C
51 lines
1.6 KiB
C
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
#include "heapdef.h"
|
|
|
|
int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key)
|
|
{
|
|
byte *pos;
|
|
HP_SHARE *share=info->s;
|
|
DBUG_ENTER("hp_rkey");
|
|
DBUG_PRINT("enter",("base: %lx inx: %d",info,inx));
|
|
|
|
if ((uint) inx >= share->keys)
|
|
{
|
|
DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX);
|
|
}
|
|
info->lastinx=inx;
|
|
info->current_record = (ulong) ~0L; /* For heap_rrnd() */
|
|
|
|
if (!(pos=_hp_search(info,share->keydef+inx,key,0)))
|
|
{
|
|
info->update=0;
|
|
DBUG_RETURN(my_errno);
|
|
}
|
|
memcpy(record,pos,(size_t) share->reclength);
|
|
info->update=HA_STATE_AKTIV;
|
|
if (!(share->keydef[inx].flag & HA_NOSAME))
|
|
memcpy(info->lastkey,key,(size_t) share->keydef[inx].length);
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
|
|
/* Quick find of record */
|
|
|
|
gptr heap_find(HP_INFO *info, int inx, const byte *key)
|
|
{
|
|
return _hp_search(info,info->s->keydef+inx,key,0);
|
|
}
|