Commit 22250790 authored by Aleksandr Kuzminsky's avatar Aleksandr Kuzminsky

sync with rev.96

parent 56bca79f
# Copyright (C) 2006 MySQL AB # Copyright (C) 2009 Oracle/Innobase Oy
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -11,28 +11,64 @@ ...@@ -11,28 +11,64 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") # This is the CMakeLists for InnoDB Plugin
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-D_WIN32 -D_LIB)
# Bug 19424 - InnoDB: Possibly a memory overrun of the buffer being freed (64-bit Visual C) # The dynamic plugin requires CMake 2.6.0 or later. Otherwise, the /DELAYLOAD
# Removing Win64 compiler optimizations for all innodb/mem/* files. # property will not be set
IF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8) CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/storage/innobase/mem/mem0mem.c
${CMAKE_SOURCE_DIR}/storage/innobase/mem/mem0pool.c # When PROJECT is defined, a separate .sln file will be generated.
PROPERTIES COMPILE_FLAGS -Od) # PROJECT (INNODB_PLUGIN)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
MESSAGE(STATUS "Enter InnoDB ...")
MESSAGE(STATUS "INNODB_DYNAMIC_PLUGIN: " ${INNODB_DYNAMIC_PLUGIN})
# Print out CMake info
MESSAGE(STATUS "CMAKE_GENERATOR: " ${CMAKE_GENERATOR})
MESSAGE(STATUS "CMAKE_SOURCE_DIR: " ${CMAKE_SOURCE_DIR})
# Print out system information
MESSAGE(STATUS "CMAKE_SYSTEM: " ${CMAKE_SYSTEM})
MESSAGE(STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR})
MESSAGE(STATUS "UNIX: " ${UNIX})
MESSAGE(STATUS "WIN32: " ${WIN32})
IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
SET(WIN64 TRUE)
ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8)
MESSAGE(STATUS "WIN64: " ${WIN64})
MESSAGE(STATUS "MSVC: " ${MSVC})
# Check type sizes
include(CheckTypeSize)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib # Currently, the checked results are not used.
${CMAKE_SOURCE_DIR}/storage/innobase/include CHECK_TYPE_SIZE(int SIZEOF_INT)
${CMAKE_SOURCE_DIR}/storage/innobase/handler CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE(void* SIZEOF_VOID_P)
# Include directories under innobase
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include
${CMAKE_SOURCE_DIR}/storage/innobase/handler)
# Include directories under mysql
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include) ${CMAKE_SOURCE_DIR}/extra/yassl/include)
SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c # Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
IF(MSVC AND $(WIN64))
SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
PROPERTIES COMPILE_FLAGS -Od)
ENDIF(MSVC AND $(WIN64))
SET(INNODB_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
data/data0data.c data/data0type.c data/data0data.c data/data0type.c
dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c
...@@ -55,43 +91,41 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c ...@@ -55,43 +91,41 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc handler/mysql_addons.cc handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc handler/mysql_addons.cc
read/read0read.c read/read0read.c
rem/rem0cmp.c rem/rem0rec.c rem/rem0cmp.c rem/rem0rec.c
row/row0ext.c row/row0ins.c row/row0merge.c row/row0mysql.c row/row0ext.c row/row0ins.c row/row0merge.c row/row0mysql.c row/row0purge.c row/row0row.c
row/row0purge.c row/row0row.c row/row0sel.c row/row0uins.c row/row0sel.c row/row0uins.c row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c
row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c
srv/srv0que.c srv/srv0srv.c srv/srv0start.c srv/srv0que.c srv/srv0srv.c srv/srv0start.c
sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c
thr/thr0loc.c thr/thr0loc.c
trx/trx0i_s.c trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c trx/trx0i_s.c trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c
trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c
usr/usr0sess.c usr/usr0sess.c
ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c ut/ut0list.c ut/ut0wqueue.c) ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c
ut/ut0list.c ut/ut0wqueue.c)
IF(NOT SOURCE_SUBLIBS) IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(innobase ${INNOBASE_SOURCES}) # INNODB_RW_LOCKS_USE_ATOMICS may be defined only if HAVE_WINDOWS_ATOMICS is defined.
# Windows Interlocked functions require Windows 2000 or newer operating system
ADD_DEFINITIONS(-D_WIN32 -DHAVE_WINDOWS_ATOMICS -DINNODB_RW_LOCKS_USE_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION)
ADD_LIBRARY(innobase STATIC ${INNODB_SOURCES})
# Require mysqld_error.h, which is built as part of the GenError
ADD_DEPENDENCIES(innobase GenError) ADD_DEPENDENCIES(innobase GenError)
# only set MYSQL_SERVER for the builtin engine, not the plugin
SET_TARGET_PROPERTIES(innobase PROPERTIES COMPILE_FLAGS "-DMYSQL_SERVER") SET_TARGET_PROPERTIES(innobase PROPERTIES COMPILE_FLAGS "-DMYSQL_SERVER")
# Dynamic plugin ha_innodb.dll
IF(INNODB_DYNAMIC_PLUGIN) IF(INNODB_DYNAMIC_PLUGIN)
# The dynamic plugin requires CMake 2.6.0 or later. Otherwise, the /DELAYLOAD property ADD_LIBRARY(ha_innodb SHARED ${INNODB_SOURCES} ha_innodb.def handler/win_delay_loader.cc)
# will not be set # Require mysqld_error.h, which is built as part of the GenError
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) # Also require mysqld.lib, which is built as part of the mysqld
ADD_LIBRARY(ha_innodb SHARED ${INNOBASE_SOURCES} ha_innodb.def handler/win_delay_loader.cc)
ADD_DEPENDENCIES(ha_innodb GenError mysqld) ADD_DEPENDENCIES(ha_innodb GenError mysqld)
# If build type is not specified as Release, default to Debug
# This is a workaround to a problem in CMake 2.6, which does not TARGET_LINK_LIBRARIES(ha_innodb ${CMAKE_SOURCE_DIR}/sql/\$\(OutDir\)/mysqld.lib)
# set the path of mysqld.lib correctly
IF(CMAKE_BUILD_TYPE MATCHES Release)
SET(CMAKE_BUILD_TYPE "Release")
ELSE(CMAKE_BUILD_TYPE MATCHES Release)
SET(CMAKE_BUILD_TYPE "Debug")
ENDIF(CMAKE_BUILD_TYPE MATCHES Release)
TARGET_LINK_LIBRARIES(ha_innodb strings zlib)
TARGET_LINK_LIBRARIES(ha_innodb ${CMAKE_SOURCE_DIR}/sql/${CMAKE_BUILD_TYPE}/mysqld.lib)
SET_TARGET_PROPERTIES(ha_innodb PROPERTIES OUTPUT_NAME ha_innodb) SET_TARGET_PROPERTIES(ha_innodb PROPERTIES OUTPUT_NAME ha_innodb)
SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/MAP /MAPINFO:EXPORTS") SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/MAP /MAPINFO:EXPORTS")
SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/ENTRY:\"_DllMainCRTStartup@12\"") SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/ENTRY:\"_DllMainCRTStartup@12\"")
SET_TARGET_PROPERTIES(ha_innodb PROPERTIES COMPILE_FLAGS "-DMYSQL_DYNAMIC_PLUGIN") SET_TARGET_PROPERTIES(ha_innodb PROPERTIES COMPILE_FLAGS "-DMYSQL_DYNAMIC_PLUGIN")
SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/DELAYLOAD:mysqld.exe") SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/DELAYLOAD:mysqld.exe")
ENDIF(INNODB_DYNAMIC_PLUGIN) ENDIF(INNODB_DYNAMIC_PLUGIN)
ENDIF(NOT SOURCE_SUBLIBS) ENDIF(NOT SOURCE_SUBLIBS)
MESSAGE(STATUS "Exit InnoDB ...")
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This is the source of the InnoDB Plugin 1.0.3 for MySQL 5.1 This is the source of the InnoDB Plugin 1.0.4 for MySQL 5.1
=========================================================== ===========================================================
Instructions for compiling the plugin: Instructions for compiling the plugin:
......
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/ *****************************************************************************/
/****************************************************** /**************************************************//**
@file btr/btr0pcur.c
The index tree persistent cursor The index tree persistent cursor
Created 2/23/1996 Heikki Tuuri Created 2/23/1996 Heikki Tuuri
...@@ -32,13 +33,13 @@ Created 2/23/1996 Heikki Tuuri ...@@ -32,13 +33,13 @@ Created 2/23/1996 Heikki Tuuri
#include "rem0cmp.h" #include "rem0cmp.h"
#include "trx0trx.h" #include "trx0trx.h"
/****************************************************************** /**************************************************************//**
Allocates memory for a persistent cursor object and initializes the cursor. */ Allocates memory for a persistent cursor object and initializes the cursor.
@return own: persistent cursor */
UNIV_INTERN UNIV_INTERN
btr_pcur_t* btr_pcur_t*
btr_pcur_create_for_mysql(void) btr_pcur_create_for_mysql(void)
/*============================*/ /*============================*/
/* out, own: persistent cursor */
{ {
btr_pcur_t* pcur; btr_pcur_t* pcur;
...@@ -50,13 +51,13 @@ btr_pcur_create_for_mysql(void) ...@@ -50,13 +51,13 @@ btr_pcur_create_for_mysql(void)
return(pcur); return(pcur);
} }
/****************************************************************** /**************************************************************//**
Frees the memory for a persistent cursor object. */ Frees the memory for a persistent cursor object. */
UNIV_INTERN UNIV_INTERN
void void
btr_pcur_free_for_mysql( btr_pcur_free_for_mysql(
/*====================*/ /*====================*/
btr_pcur_t* cursor) /* in, own: persistent cursor */ btr_pcur_t* cursor) /*!< in, own: persistent cursor */
{ {
if (cursor->old_rec_buf != NULL) { if (cursor->old_rec_buf != NULL) {
...@@ -76,7 +77,7 @@ btr_pcur_free_for_mysql( ...@@ -76,7 +77,7 @@ btr_pcur_free_for_mysql(
mem_free(cursor); mem_free(cursor);
} }
/****************************************************************** /**************************************************************//**
The position of the cursor is stored by taking an initial segment of the The position of the cursor is stored by taking an initial segment of the
record the cursor is positioned on, before, or after, and copying it to the record the cursor is positioned on, before, or after, and copying it to the
cursor data structure, or just setting a flag if the cursor id before the cursor data structure, or just setting a flag if the cursor id before the
...@@ -87,8 +88,8 @@ UNIV_INTERN ...@@ -87,8 +88,8 @@ UNIV_INTERN
void void
btr_pcur_store_position( btr_pcur_store_position(
/*====================*/ /*====================*/
btr_pcur_t* cursor, /* in: persistent cursor */ btr_pcur_t* cursor, /*!< in: persistent cursor */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /*!< in: mtr */
{ {
page_cur_t* page_cursor; page_cur_t* page_cursor;
buf_block_t* block; buf_block_t* block;
...@@ -157,15 +158,15 @@ btr_pcur_store_position( ...@@ -157,15 +158,15 @@ btr_pcur_store_position(
cursor->modify_clock = buf_block_get_modify_clock(block); cursor->modify_clock = buf_block_get_modify_clock(block);
} }
/****************************************************************** /**************************************************************//**
Copies the stored position of a pcur to another pcur. */ Copies the stored position of a pcur to another pcur. */
UNIV_INTERN UNIV_INTERN
void void
btr_pcur_copy_stored_position( btr_pcur_copy_stored_position(
/*==========================*/ /*==========================*/
btr_pcur_t* pcur_receive, /* in: pcur which will receive the btr_pcur_t* pcur_receive, /*!< in: pcur which will receive the
position info */ position info */
btr_pcur_t* pcur_donate) /* in: pcur from which the info is btr_pcur_t* pcur_donate) /*!< in: pcur from which the info is
copied */ copied */
{ {
if (pcur_receive->old_rec_buf) { if (pcur_receive->old_rec_buf) {
...@@ -187,7 +188,7 @@ btr_pcur_copy_stored_position( ...@@ -187,7 +188,7 @@ btr_pcur_copy_stored_position(
pcur_receive->old_n_fields = pcur_donate->old_n_fields; pcur_receive->old_n_fields = pcur_donate->old_n_fields;
} }
/****************************************************************** /**************************************************************//**
Restores the stored position of a persistent cursor bufferfixing the page and Restores the stored position of a persistent cursor bufferfixing the page and
obtaining the specified latches. If the cursor position was saved when the obtaining the specified latches. If the cursor position was saved when the
(1) cursor was positioned on a user record: this function restores the position (1) cursor was positioned on a user record: this function restores the position
...@@ -198,19 +199,17 @@ infimum; ...@@ -198,19 +199,17 @@ infimum;
(3) cursor was positioned on the page supremum: restores to the first record (3) cursor was positioned on the page supremum: restores to the first record
GREATER than the user record which was the predecessor of the supremum. GREATER than the user record which was the predecessor of the supremum.
(4) cursor was positioned before the first or after the last in an empty tree: (4) cursor was positioned before the first or after the last in an empty tree:
restores to before first or after the last in the tree. */ restores to before first or after the last in the tree.
@return TRUE if the cursor position was stored when it was on a user
record and it can be restored on a user record whose ordering fields
are identical to the ones of the original user record */
UNIV_INTERN UNIV_INTERN
ibool ibool
btr_pcur_restore_position( btr_pcur_restore_position(
/*======================*/ /*======================*/
/* out: TRUE if the cursor position ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */
was stored when it was on a user record btr_pcur_t* cursor, /*!< in: detached persistent cursor */
and it can be restored on a user record mtr_t* mtr) /*!< in: mtr */
whose ordering fields are identical to
the ones of the original user record */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */
btr_pcur_t* cursor, /* in: detached persistent cursor */
mtr_t* mtr) /* in: mtr */
{ {
dict_index_t* index; dict_index_t* index;
dtuple_t* tuple; dtuple_t* tuple;
...@@ -351,7 +350,7 @@ btr_pcur_restore_position( ...@@ -351,7 +350,7 @@ btr_pcur_restore_position(
return(FALSE); return(FALSE);
} }
/****************************************************************** /**************************************************************//**
If the latch mode of the cursor is BTR_LEAF_SEARCH or BTR_LEAF_MODIFY, If the latch mode of the cursor is BTR_LEAF_SEARCH or BTR_LEAF_MODIFY,
releases the page latch and bufferfix reserved by the cursor. releases the page latch and bufferfix reserved by the cursor.
NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes NOTE! In the case of BTR_LEAF_MODIFY, there should not exist changes
...@@ -361,8 +360,8 @@ UNIV_INTERN ...@@ -361,8 +360,8 @@ UNIV_INTERN
void void
btr_pcur_release_leaf( btr_pcur_release_leaf(
/*==================*/ /*==================*/
btr_pcur_t* cursor, /* in: persistent cursor */ btr_pcur_t* cursor, /*!< in: persistent cursor */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /*!< in: mtr */
{ {
buf_block_t* block; buf_block_t* block;
...@@ -378,7 +377,7 @@ btr_pcur_release_leaf( ...@@ -378,7 +377,7 @@ btr_pcur_release_leaf(
cursor->pos_state = BTR_PCUR_WAS_POSITIONED; cursor->pos_state = BTR_PCUR_WAS_POSITIONED;
} }
/************************************************************* /*********************************************************//**
Moves the persistent cursor to the first record on the next page. Releases the Moves the persistent cursor to the first record on the next page. Releases the
latch on the current page, and bufferunfixes it. Note that there must not be latch on the current page, and bufferunfixes it. Note that there must not be
modifications on the current page, as then the x-latch can be released only in modifications on the current page, as then the x-latch can be released only in
...@@ -387,9 +386,9 @@ UNIV_INTERN ...@@ -387,9 +386,9 @@ UNIV_INTERN
void void
btr_pcur_move_to_next_page( btr_pcur_move_to_next_page(
/*=======================*/ /*=======================*/
btr_pcur_t* cursor, /* in: persistent cursor; must be on the btr_pcur_t* cursor, /*!< in: persistent cursor; must be on the
last record of the current page */ last record of the current page */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /*!< in: mtr */
{ {
ulint next_page_no; ulint next_page_no;
ulint space; ulint space;
...@@ -429,7 +428,7 @@ btr_pcur_move_to_next_page( ...@@ -429,7 +428,7 @@ btr_pcur_move_to_next_page(
page_check_dir(next_page); page_check_dir(next_page);
} }
/************************************************************* /*********************************************************//**
Moves the persistent cursor backward if it is on the first record of the page. Moves the persistent cursor backward if it is on the first record of the page.
Commits mtr. Note that to prevent a possible deadlock, the operation Commits mtr. Note that to prevent a possible deadlock, the operation
first stores the position of the cursor, commits mtr, acquires the necessary first stores the position of the cursor, commits mtr, acquires the necessary
...@@ -442,9 +441,9 @@ UNIV_INTERN ...@@ -442,9 +441,9 @@ UNIV_INTERN
void void
btr_pcur_move_backward_from_page( btr_pcur_move_backward_from_page(
/*=============================*/ /*=============================*/
btr_pcur_t* cursor, /* in: persistent cursor, must be on the first btr_pcur_t* cursor, /*!< in: persistent cursor, must be on the first
record of the current page */ record of the current page */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /*!< in: mtr */
{ {
ulint prev_page_no; ulint prev_page_no;
ulint space; ulint space;
...@@ -511,18 +510,17 @@ btr_pcur_move_backward_from_page( ...@@ -511,18 +510,17 @@ btr_pcur_move_backward_from_page(
cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
} }
/************************************************************* /*********************************************************//**
Moves the persistent cursor to the previous record in the tree. If no records Moves the persistent cursor to the previous record in the tree. If no records
are left, the cursor stays 'before first in tree'. */ are left, the cursor stays 'before first in tree'.
@return TRUE if the cursor was not before first in tree */
UNIV_INTERN UNIV_INTERN
ibool ibool
btr_pcur_move_to_prev( btr_pcur_move_to_prev(
/*==================*/ /*==================*/
/* out: TRUE if the cursor was not before first btr_pcur_t* cursor, /*!< in: persistent cursor; NOTE that the
in tree */
btr_pcur_t* cursor, /* in: persistent cursor; NOTE that the
function may release the page latch */ function may release the page latch */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /*!< in: mtr */
{ {
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED); ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
ut_ad(cursor->latch_mode != BTR_NO_LATCHES); ut_ad(cursor->latch_mode != BTR_NO_LATCHES);
...@@ -546,7 +544,7 @@ btr_pcur_move_to_prev( ...@@ -546,7 +544,7 @@ btr_pcur_move_to_prev(
return(TRUE); return(TRUE);
} }
/****************************************************************** /**************************************************************//**
If mode is PAGE_CUR_G or PAGE_CUR_GE, opens a persistent cursor on the first If mode is PAGE_CUR_G or PAGE_CUR_GE, opens a persistent cursor on the first
user record satisfying the search condition, in the case PAGE_CUR_L or user record satisfying the search condition, in the case PAGE_CUR_L or
PAGE_CUR_LE, on the last user record. If no such user record exists, then PAGE_CUR_LE, on the last user record. If no such user record exists, then
...@@ -557,14 +555,14 @@ UNIV_INTERN ...@@ -557,14 +555,14 @@ UNIV_INTERN
void void
btr_pcur_open_on_user_rec( btr_pcur_open_on_user_rec(
/*======================*/ /*======================*/
dict_index_t* index, /* in: index */ dict_index_t* index, /*!< in: index */
const dtuple_t* tuple, /* in: tuple on which search done */ const dtuple_t* tuple, /*!< in: tuple on which search done */
ulint mode, /* in: PAGE_CUR_L, ... */ ulint mode, /*!< in: PAGE_CUR_L, ... */
ulint latch_mode, /* in: BTR_SEARCH_LEAF or ulint latch_mode, /*!< in: BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF */ BTR_MODIFY_LEAF */
btr_pcur_t* cursor, /* in: memory buffer for persistent btr_pcur_t* cursor, /*!< in: memory buffer for persistent
cursor */ cursor */
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /*!< in: mtr */
{ {
btr_pcur_open(index, tuple, mode, latch_mode, cursor, mtr); btr_pcur_open(index, tuple, mode, latch_mode, cursor, mtr);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/ *****************************************************************************/
/****************************************************** /**************************************************//**
@file dyn/dyn0dyn.c
The dynamically allocated array The dynamically allocated array
Created 2/5/1996 Heikki Tuuri Created 2/5/1996 Heikki Tuuri
...@@ -27,14 +28,14 @@ Created 2/5/1996 Heikki Tuuri ...@@ -27,14 +28,14 @@ Created 2/5/1996 Heikki Tuuri
#include "dyn0dyn.ic" #include "dyn0dyn.ic"
#endif #endif
/**************************************************************** /************************************************************//**
Adds a new block to a dyn array. */ Adds a new block to a dyn array.
@return created block */
UNIV_INTERN UNIV_INTERN
dyn_block_t* dyn_block_t*
dyn_array_add_block( dyn_array_add_block(
/*================*/ /*================*/
/* out: created block */ dyn_array_t* arr) /*!< in: dyn array */
dyn_array_t* arr) /* in: dyn array */
{ {
mem_heap_t* heap; mem_heap_t* heap;
dyn_block_t* block; dyn_block_t* block;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/ *****************************************************************************/
/********************************************************************** /******************************************************************//**
@file fut/fut0fut.c
File-based utilities File-based utilities
Created 12/13/1995 Heikki Tuuri Created 12/13/1995 Heikki Tuuri
......
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/ *****************************************************************************/
/****************************************************** /**************************************************//**
@file ha/ha0storage.c
Hash storage. Hash storage.
Provides a data structure that stores chunks of data in Provides a data structure that stores chunks of data in
its own storage, avoiding duplicates. its own storage, avoiding duplicates.
...@@ -34,16 +35,16 @@ Created September 22, 2007 Vasil Dimov ...@@ -34,16 +35,16 @@ Created September 22, 2007 Vasil Dimov
#include "ha0storage.ic" #include "ha0storage.ic"
#endif #endif
/*********************************************************************** /*******************************************************************//**
Retrieves a data from a storage. If it is present, a pointer to the Retrieves a data from a storage. If it is present, a pointer to the
stored copy of data is returned, otherwise NULL is returned. */ stored copy of data is returned, otherwise NULL is returned. */
static static
const void* const void*
ha_storage_get( ha_storage_get(
/*===========*/ /*===========*/
ha_storage_t* storage, /* in: hash storage */ ha_storage_t* storage, /*!< in: hash storage */
const void* data, /* in: data to check for */ const void* data, /*!< in: data to check for */
ulint data_len) /* in: data length */ ulint data_len) /*!< in: data length */
{ {
ha_storage_node_t* node; ha_storage_node_t* node;
ulint fold; ulint fold;
...@@ -73,7 +74,7 @@ ha_storage_get( ...@@ -73,7 +74,7 @@ ha_storage_get(
return(node->data); return(node->data);
} }
/*********************************************************************** /*******************************************************************//**
Copies data into the storage and returns a pointer to the copy. If the Copies data into the storage and returns a pointer to the copy. If the
same data chunk is already present, then pointer to it is returned. same data chunk is already present, then pointer to it is returned.
Data chunks are considered to be equal if len1 == len2 and Data chunks are considered to be equal if len1 == len2 and
...@@ -86,10 +87,10 @@ UNIV_INTERN ...@@ -86,10 +87,10 @@ UNIV_INTERN
const void* const void*
ha_storage_put_memlim( ha_storage_put_memlim(
/*==================*/ /*==================*/
ha_storage_t* storage, /* in/out: hash storage */ ha_storage_t* storage, /*!< in/out: hash storage */
const void* data, /* in: data to store */ const void* data, /*!< in: data to store */
ulint data_len, /* in: data length */ ulint data_len, /*!< in: data length */
ulint memlim) /* in: memory limit to obey */ ulint memlim) /*!< in: memory limit to obey */
{ {
void* raw; void* raw;
ha_storage_node_t* node; ha_storage_node_t* node;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -16,7 +16,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/ *****************************************************************************/
/****************************************************** /**************************************************//**
@file handler/i_s.h
InnoDB INFORMATION SCHEMA tables interface to MySQL. InnoDB INFORMATION SCHEMA tables interface to MySQL.
Created July 18, 2007 Vasil Dimov Created July 18, 2007 Vasil Dimov
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment