Commit 9dfe197d authored by unknown's avatar unknown

Merge MariaDB 5.1.39 release, including XtraDB 8 merge, into MariaDB 5.1 trunk.

parents 7d8eadc3 238de23a
...@@ -15,7 +15,7 @@ AC_CANONICAL_SYSTEM ...@@ -15,7 +15,7 @@ AC_CANONICAL_SYSTEM
# MySQL version number. # MySQL version number.
# #
# Note: the following line must be parseable by win/configure.js:GetVersion() # Note: the following line must be parseable by win/configure.js:GetVersion()
AM_INIT_AUTOMAKE(mysql, 5.1.38-maria-beta) AM_INIT_AUTOMAKE(mysql, 5.1.39-maria-beta)
AM_CONFIG_HEADER([include/config.h:config.h.in]) AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10 PROTOCOL_VERSION=10
......
...@@ -122,12 +122,14 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b) ...@@ -122,12 +122,14 @@ insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
analyze table t1; analyze table t1;
select count(*) from t1; select count(*) from t1;
--replace_column 9 REF
explain select count(*) from t1 where explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null; key1a = 2 and key1b is null and key2a = 2 and key2b is null;
select count(*) from t1 where select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null; key1a = 2 and key1b is null and key2a = 2 and key2b is null;
--replace_column 9 REF
explain select count(*) from t1 where explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null; key1a = 2 and key1b is null and key3a = 2 and key3b is null;
......
...@@ -111,7 +111,7 @@ count(*) ...@@ -111,7 +111,7 @@ count(*)
explain select count(*) from t1 where explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null; key1a = 2 and key1b is null and key2a = 2 and key2b is null;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 3 Using intersect(i1,i2); Using where; Using index 1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL REF Using intersect(i1,i2); Using where; Using index
select count(*) from t1 where select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null; key1a = 2 and key1b is null and key2a = 2 and key2b is null;
count(*) count(*)
...@@ -119,7 +119,7 @@ count(*) ...@@ -119,7 +119,7 @@ count(*)
explain select count(*) from t1 where explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null; key1a = 2 and key1b is null and key3a = 2 and key3b is null;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 3 Using intersect(i1,i3); Using where; Using index 1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL REF Using intersect(i1,i3); Using where; Using index
select count(*) from t1 where select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null; key1a = 2 and key1b is null and key3a = 2 and key3b is null;
count(*) count(*)
......
...@@ -945,7 +945,7 @@ count(*) ...@@ -945,7 +945,7 @@ count(*)
explain select count(*) from t1 where explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null; key1a = 2 and key1b is null and key2a = 2 and key2b is null;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 2 Using intersect(i1,i2); Using where; Using index 1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL REF Using intersect(i1,i2); Using where; Using index
select count(*) from t1 where select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null; key1a = 2 and key1b is null and key2a = 2 and key2b is null;
count(*) count(*)
...@@ -953,7 +953,7 @@ count(*) ...@@ -953,7 +953,7 @@ count(*)
explain select count(*) from t1 where explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null; key1a = 2 and key1b is null and key3a = 2 and key3b is null;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 2 Using intersect(i1,i3); Using where; Using index 1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL REF Using intersect(i1,i3); Using where; Using index
select count(*) from t1 where select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null; key1a = 2 and key1b is null and key3a = 2 and key3b is null;
count(*) count(*)
......
...@@ -867,3 +867,25 @@ INSERT INTO t2 SELECT NULL FROM t1; ...@@ -867,3 +867,25 @@ INSERT INTO t2 SELECT NULL FROM t1;
Got one of the listed errors Got one of the listed errors
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (null);
INSERT INTO t1 VALUES (null);
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
SELECT * FROM t1;
d1
1
3
SELECT * FROM t1;
d1
1
3
INSERT INTO t1 VALUES(null);
Got one of the listed errors
ALTER TABLE t1 AUTO_INCREMENT = 3;
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
1
3
4
DROP TABLE t1;
...@@ -1134,4 +1134,40 @@ t2 CREATE TABLE `t2` ( ...@@ -1134,4 +1134,40 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
BEGIN;
SELECT * FROM t1;
a b
3 a
3 b
1 c
0 d
1 e
CREATE INDEX t1a ON t1(a);
SELECT * FROM t1;
a b
3 a
3 b
1 c
0 d
1 e
SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a;
ERROR HY000: Table definition has changed, please retry transaction
SELECT * FROM t1;
a b
3 a
3 b
1 c
0 d
1 e
COMMIT;
SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a;
a b
0 d
1 c
1 e
3 a
3 b
DROP TABLE t1;
SET GLOBAL innodb_file_format_check=@save_innodb_file_format_check; SET GLOBAL innodb_file_format_check=@save_innodb_file_format_check;
...@@ -1738,7 +1738,7 @@ count(*) ...@@ -1738,7 +1738,7 @@ count(*)
drop table t1; drop table t1;
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
variable_value variable_value
511 8191
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
variable_value variable_value
16384 16384
...@@ -1766,9 +1766,10 @@ variable_value - @innodb_row_lock_time_max_orig ...@@ -1766,9 +1766,10 @@ variable_value - @innodb_row_lock_time_max_orig
SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg'; SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
variable_value - @innodb_row_lock_time_avg_orig variable_value - @innodb_row_lock_time_avg_orig
0 0
SET @innodb_sync_spin_loops_orig = @@innodb_sync_spin_loops;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
Variable_name Value Variable_name Value
innodb_sync_spin_loops 20 innodb_sync_spin_loops 30
set global innodb_sync_spin_loops=1000; set global innodb_sync_spin_loops=1000;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
Variable_name Value Variable_name Value
...@@ -1781,6 +1782,7 @@ set global innodb_sync_spin_loops=20; ...@@ -1781,6 +1782,7 @@ set global innodb_sync_spin_loops=20;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
Variable_name Value Variable_name Value
innodb_sync_spin_loops 20 innodb_sync_spin_loops 20
set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency; SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
show variables like "innodb_thread_concurrency"; show variables like "innodb_thread_concurrency";
Variable_name Value Variable_name Value
......
set @old_innodb_file_per_table=@@innodb_file_per_table;
set @old_innodb_file_format=@@innodb_file_format; set @old_innodb_file_format=@@innodb_file_format;
set @old_innodb_file_format_check=@@innodb_file_format_check; set @old_innodb_file_per_table=@@innodb_file_per_table;
SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON; SET GLOBAL innodb_file_per_table=ON;
set @old_innodb_file_format=@@innodb_file_format;
select @@innodb_file_format; select @@innodb_file_format;
@@innodb_file_format @@innodb_file_format
Antelope Antelope
...@@ -42,3 +43,5 @@ ERROR HY000: Incorrect arguments to SET ...@@ -42,3 +43,5 @@ ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check; select @@innodb_file_format_check;
@@innodb_file_format_check @@innodb_file_format_check
Barracuda Barracuda
set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_format_check=Antelope;
...@@ -478,3 +478,23 @@ INSERT INTO t2 SELECT c1 FROM t1; ...@@ -478,3 +478,23 @@ INSERT INTO t2 SELECT c1 FROM t1;
INSERT INTO t2 SELECT NULL FROM t1; INSERT INTO t2 SELECT NULL FROM t1;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
#
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from
# the index (PRIMARY)
# This test requires a restart of the server
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (null);
INSERT INTO t1 VALUES (null);
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
SELECT * FROM t1;
# Restart the server
-- source include/restart_mysqld.inc
# The MySQL and InnoDB data dictionaries should now be out of sync.
# The select should print message to the error log
SELECT * FROM t1;
-- error ER_AUTOINC_READ_FAILED,1467
INSERT INTO t1 VALUES(null);
ALTER TABLE t1 AUTO_INCREMENT = 3;
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
DROP TABLE t1;
...@@ -515,4 +515,28 @@ SHOW CREATE TABLE t2; ...@@ -515,4 +515,28 @@ SHOW CREATE TABLE t2;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t1; DROP TABLE t1;
connect (a,localhost,root,,);
connect (b,localhost,root,,);
connection a;
CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
connection b;
BEGIN;
SELECT * FROM t1;
connection a;
CREATE INDEX t1a ON t1(a);
connection b;
SELECT * FROM t1;
--error ER_TABLE_DEF_CHANGED
SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a;
SELECT * FROM t1;
COMMIT;
SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a;
connection default;
disconnect a;
disconnect b;
DROP TABLE t1;
SET GLOBAL innodb_file_format_check=@save_innodb_file_format_check; SET GLOBAL innodb_file_format_check=@save_innodb_file_format_check;
...@@ -1321,7 +1321,7 @@ drop table t1; ...@@ -1321,7 +1321,7 @@ drop table t1;
# InnoDB aligns the memory for the buffer pool to a page boundary. This may # InnoDB aligns the memory for the buffer pool to a page boundary. This may
# cause actual pool size to be one less than requested depending on exact # cause actual pool size to be one less than requested depending on exact
# alignment of obtained memory. # alignment of obtained memory.
--replace_result 512 511 --replace_result 8192 8191
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted'; SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
...@@ -1336,6 +1336,7 @@ SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.g ...@@ -1336,6 +1336,7 @@ SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.g
SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg'; SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
# Test for innodb_sync_spin_loops variable # Test for innodb_sync_spin_loops variable
SET @innodb_sync_spin_loops_orig = @@innodb_sync_spin_loops;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
set global innodb_sync_spin_loops=1000; set global innodb_sync_spin_loops=1000;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
...@@ -1343,6 +1344,7 @@ set global innodb_sync_spin_loops=0; ...@@ -1343,6 +1344,7 @@ set global innodb_sync_spin_loops=0;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
set global innodb_sync_spin_loops=20; set global innodb_sync_spin_loops=20;
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
# Test for innodb_thread_concurrency variable # Test for innodb_thread_concurrency variable
SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency; SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
...@@ -2555,6 +2557,8 @@ CONNECTION default; ...@@ -2555,6 +2557,8 @@ CONNECTION default;
SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-- enable_query_log
####################################################################### #######################################################################
# # # #
# Please, DO NOT TOUCH this file as well as the innodb.result file. # # Please, DO NOT TOUCH this file as well as the innodb.result file. #
......
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
# #
-- source include/have_innodb.inc -- source include/have_innodb.inc
set @old_innodb_file_per_table=@@innodb_file_per_table;
set @old_innodb_file_format=@@innodb_file_format; set @old_innodb_file_format=@@innodb_file_format;
set @old_innodb_file_format_check=@@innodb_file_format_check; set @old_innodb_file_per_table=@@innodb_file_per_table;
SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON; SET GLOBAL innodb_file_per_table=ON;
...@@ -1156,7 +1155,5 @@ DROP TABLE IF EXISTS table4; ...@@ -1156,7 +1155,5 @@ DROP TABLE IF EXISTS table4;
DROP TABLE IF EXISTS table5; DROP TABLE IF EXISTS table5;
DROP TABLE IF EXISTS table6; DROP TABLE IF EXISTS table6;
set global innodb_file_per_table=@old_innodb_file_per_table;
set global innodb_file_format=@old_innodb_file_format; set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_format_check=@old_innodb_file_format_check; set global innodb_file_per_table=@old_innodb_file_per_table;
...@@ -15,7 +15,6 @@ SET storage_engine=InnoDB; ...@@ -15,7 +15,6 @@ SET storage_engine=InnoDB;
-- disable_result_log -- disable_result_log
set @old_innodb_file_per_table=@@innodb_file_per_table; set @old_innodb_file_per_table=@@innodb_file_per_table;
set @old_innodb_file_format=@@innodb_file_format; set @old_innodb_file_format=@@innodb_file_format;
set @old_innodb_file_format_check=@@innodb_file_format_check;
SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=on; SET GLOBAL innodb_file_per_table=on;
...@@ -30,5 +29,4 @@ CHECK TABLE table0 EXTENDED; ...@@ -30,5 +29,4 @@ CHECK TABLE table0 EXTENDED;
DROP TABLE table0; DROP TABLE table0;
set global innodb_file_per_table=@old_innodb_file_per_table; set global innodb_file_per_table=@old_innodb_file_per_table;
set global innodb_file_format=@old_innodb_file_format; set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_format_check=@old_innodb_file_format_check; set global innodb_file_format_check=Antelope;
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc set @old_innodb_file_format=@@innodb_file_format;
let $format=`select @@innodb_file_format`;
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
select @@innodb_file_format; select @@innodb_file_format;
select @@innodb_file_format_check; select @@innodb_file_format_check;
...@@ -31,11 +28,5 @@ set global innodb_file_format=on; ...@@ -31,11 +28,5 @@ set global innodb_file_format=on;
set global innodb_file_format=off; set global innodb_file_format=off;
select @@innodb_file_format_check; select @@innodb_file_format_check;
# set global innodb_file_format=@old_innodb_file_format;
# restore environment to the state it was before this test execution set global innodb_file_format_check=Antelope;
#
-- disable_query_log
eval set global innodb_file_format=$format;
eval set global innodb_file_format_check=$innodb_file_format_check_orig;
-- enable_query_log
...@@ -22,7 +22,6 @@ pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@ ...@@ -22,7 +22,6 @@ pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@
ha_federatedx_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_federatedx_la_LDFLAGS = -module -rpath $(pkgplugindir)
ha_federatedx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federatedx_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federatedx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federatedx_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
ha_federatedx_la_SOURCES = ha_federatedx.cc
EXTRA_LIBRARIES = libfederatedx.a EXTRA_LIBRARIES = libfederatedx.a
......
...@@ -390,8 +390,8 @@ int federatedx_db_init(void *p) ...@@ -390,8 +390,8 @@ int federatedx_db_init(void *p)
DBUG_ENTER("federatedx_db_init"); DBUG_ENTER("federatedx_db_init");
handlerton *federatedx_hton= (handlerton *)p; handlerton *federatedx_hton= (handlerton *)p;
federatedx_hton->state= SHOW_OPTION_YES; federatedx_hton->state= SHOW_OPTION_YES;
/* This is no longer needed for plugin storage engines */ /* Needed to work with old .frm files */
federatedx_hton->db_type= DB_TYPE_DEFAULT; federatedx_hton->db_type= DB_TYPE_FEDERATED_DB;
federatedx_hton->savepoint_offset= sizeof(ulong); federatedx_hton->savepoint_offset= sizeof(ulong);
federatedx_hton->close_connection= ha_federatedx::disconnect; federatedx_hton->close_connection= ha_federatedx::disconnect;
federatedx_hton->savepoint_set= ha_federatedx::savepoint_set; federatedx_hton->savepoint_set= ha_federatedx::savepoint_set;
......
# 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
# the Free Software Foundation; version 2 of the License. # the Free Software Foundation; version 2 of the License.
...@@ -11,21 +11,25 @@ ...@@ -11,21 +11,25 @@
# #
# 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
IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
SET(WIN64 TRUE)
ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8)
# Check type sizes
include(CheckTypeSize)
# Currently, the checked results are not used.
CHECK_TYPE_SIZE(int SIZEOF_INT)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE(void* SIZEOF_VOID_P)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
ADD_DEFINITIONS(-D_WIN32 -D_LIB -DMYSQL_SERVER) ADD_DEFINITIONS(-D_WIN32 -D_LIB -DMYSQL_SERVER)
# Bug 19424 - InnoDB: Possibly a memory overrun of the buffer being freed (64-bit Visual C)
# Removing Win64 compiler optimizations for all innodb/mem/* files.
IF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/storage/xtradb/mem/mem0mem.c
${CMAKE_SOURCE_DIR}/storage/xtradb/mem/mem0pool.c
PROPERTIES COMPILE_FLAGS -Od)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/storage/xtradb/include ${CMAKE_SOURCE_DIR}/storage/xtradb/include
${CMAKE_SOURCE_DIR}/storage/xtradb/handler ${CMAKE_SOURCE_DIR}/storage/xtradb/handler
...@@ -33,39 +37,45 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib ...@@ -33,39 +37,45 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/regex
${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
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c # due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
data/data0data.c data/data0type.c IF(MSVC AND $(WIN64))
dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
dyn/dyn0dyn.c PROPERTIES COMPILE_FLAGS -Od)
eval/eval0eval.c eval/eval0proc.c ENDIF(MSVC AND $(WIN64))
fil/fil0fil.c
fsp/fsp0fsp.c
fut/fut0fut.c fut/fut0lst.c
ha/ha0ha.c ha/hash0hash.c ha/ha0storage.c
ibuf/ibuf0ibuf.c
pars/lexyy.c pars/pars0grm.c pars/pars0opt.c pars/pars0pars.c pars/pars0sym.c
lock/lock0lock.c lock/lock0iter.c
log/log0log.c log/log0recv.c
mach/mach0data.c
mem/mem0mem.c mem/mem0pool.c
mtr/mtr0log.c mtr/mtr0mtr.c
os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c
page/page0cur.c page/page0page.c page/page0zip.c
que/que0que.c
handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc handler/mysql_addons.cc
read/read0read.c
rem/rem0cmp.c rem/rem0rec.c
row/row0ext.c row/row0ins.c row/row0merge.c row/row0mysql.c
row/row0purge.c row/row0row.c row/row0sel.c row/row0uins.c
row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c
srv/srv0que.c srv/srv0srv.c srv/srv0start.c
sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c
thr/thr0loc.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
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)
MYSQL_STORAGE_ENGINE(INNOBASE) SET(INNOBASE_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
data/data0data.c data/data0type.c
dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c
dyn/dyn0dyn.c
eval/eval0eval.c eval/eval0proc.c
fil/fil0fil.c
fsp/fsp0fsp.c
fut/fut0fut.c fut/fut0lst.c
ha/ha0ha.c ha/hash0hash.c ha/ha0storage.c
ibuf/ibuf0ibuf.c
pars/lexyy.c pars/pars0grm.c pars/pars0opt.c pars/pars0pars.c pars/pars0sym.c
lock/lock0lock.c lock/lock0iter.c
log/log0log.c log/log0recv.c
mach/mach0data.c
mem/mem0mem.c mem/mem0pool.c
mtr/mtr0log.c mtr/mtr0mtr.c
os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c
page/page0cur.c page/page0page.c page/page0zip.c
que/que0que.c
handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc handler/mysql_addons.cc
read/read0read.c
rem/rem0cmp.c rem/rem0rec.c
row/row0ext.c row/row0ins.c row/row0merge.c row/row0mysql.c row/row0purge.c row/row0row.c
row/row0sel.c row/row0uins.c row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c
srv/srv0que.c srv/srv0srv.c srv/srv0start.c
sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c
thr/thr0loc.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
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)
MYSQL_STORAGE_ENGINE(INNOBASE)
Portions of this software contain modifications contributed by Percona, Inc.
These contributions are used with the following license:
Copyright (c) 2008, 2009, Percona Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of the Percona Inc. nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Portions of this software contain modifications contributed by
Sun Microsystems, Inc. These contributions are used with the following
license:
Copyright (c) 2009, Sun Microsystems, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of Sun Microsystems, Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 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.
...@@ -16,12 +16,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -16,12 +16,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/ *****************************************************************************/
/*********************************************************************** /*******************************************************************//**
@file handler/handler0vars.h
This file contains accessor functions for dynamic plugin on Windows. This file contains accessor functions for dynamic plugin on Windows.
***********************************************************************/ ***********************************************************************/
#if defined __WIN__ && defined MYSQL_DYNAMIC_PLUGIN #if defined __WIN__ && defined MYSQL_DYNAMIC_PLUGIN
/*********************************************************************** /*******************************************************************//**
This is a list of externals that can not be resolved by delay loading. This is a list of externals that can not be resolved by delay loading.
They have to be resolved indirectly via their addresses in the .map file. They have to be resolved indirectly via their addresses in the .map file.
All of them are external variables. */ All of them are external variables. */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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