Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2a1be9cd
Commit
2a1be9cd
authored
Feb 11, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
XtraDB 5.5.41-37.0
parents
d996dc29
13927f87
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
128 additions
and
18 deletions
+128
-18
storage/xtradb/CMakeLists.txt
storage/xtradb/CMakeLists.txt
+8
-0
storage/xtradb/dict/dict0dict.c
storage/xtradb/dict/dict0dict.c
+19
-6
storage/xtradb/handler/ha_innodb.cc
storage/xtradb/handler/ha_innodb.cc
+63
-1
storage/xtradb/include/btr0cur.ic
storage/xtradb/include/btr0cur.ic
+2
-2
storage/xtradb/include/dict0dict.h
storage/xtradb/include/dict0dict.h
+8
-0
storage/xtradb/include/dict0dict.ic
storage/xtradb/include/dict0dict.ic
+12
-0
storage/xtradb/include/univ.i
storage/xtradb/include/univ.i
+6
-2
storage/xtradb/log/log0log.c
storage/xtradb/log/log0log.c
+1
-1
storage/xtradb/log/log0online.c
storage/xtradb/log/log0online.c
+1
-1
storage/xtradb/log/log0recv.c
storage/xtradb/log/log0recv.c
+2
-2
storage/xtradb/row/row0mysql.c
storage/xtradb/row/row0mysql.c
+6
-3
No files found.
storage/xtradb/CMakeLists.txt
View file @
2a1be9cd
...
...
@@ -330,6 +330,14 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c ut/ut0bh.c
)
# These files have unused result errors, so we skip Werror
CHECK_C_COMPILER_FLAG
(
"-Werror"
HAVE_WERROR
)
IF
(
HAVE_WERROR
)
INCLUDE
(
${
MYSQL_CMAKE_SCRIPT_DIR
}
/compile_flags.cmake
)
ADD_COMPILE_FLAGS
(
page/page0zip.c COMPILE_FLAGS
"-Wno-error"
)
ADD_COMPILE_FLAGS
(
ut/ut0ut.c COMPILE_FLAGS
"-Wno-error"
)
ENDIF
()
IF
(
WITH_INNODB
)
# Legacy option
SET
(
WITH_INNOBASE_STORAGE_ENGINE TRUE
)
...
...
storage/xtradb/dict/dict0dict.c
View file @
2a1be9cd
...
...
@@ -42,6 +42,12 @@ UNIV_INTERN dict_index_t* dict_ind_compact;
UNIV_INTERN
uint
ibuf_debug
;
#endif
/* UNIV_DEBUG || UNIV_IBUF_DEBUG */
/**********************************************************************
Issue a warning that the row is too big. */
void
ib_warn_row_too_big
(
const
dict_table_t
*
table
);
#ifndef UNIV_HOTBACKUP
#include "buf0buf.h"
#include "data0type.h"
...
...
@@ -1892,11 +1898,18 @@ dict_index_add_to_cache(
new_index
->
n_fields
=
new_index
->
n_def
;
if
(
strict
&&
dict_index_too_big_for_tree
(
table
,
new_index
))
{
if
(
dict_index_too_big_for_tree
(
table
,
new_index
))
{
if
(
strict
)
{
too_big:
dict_mem_index_free
(
new_index
);
dict_mem_index_free
(
index
);
return
(
DB_TOO_BIG_RECORD
);
dict_mem_index_free
(
new_index
);
dict_mem_index_free
(
index
);
return
(
DB_TOO_BIG_RECORD
);
}
else
{
ib_warn_row_too_big
(
table
);
}
}
if
(
UNIV_UNLIKELY
(
index
->
type
&
DICT_UNIVERSAL
))
{
...
...
@@ -6043,11 +6056,11 @@ dict_set_corrupted(
dict_index_copy_types
(
tuple
,
sys_index
,
2
);
btr_cur_search_to_nth_level
(
sys_index
,
0
,
tuple
,
PAGE_CUR_
G
E
,
btr_cur_search_to_nth_level
(
sys_index
,
0
,
tuple
,
PAGE_CUR_
L
E
,
BTR_MODIFY_LEAF
,
&
cursor
,
0
,
__FILE__
,
__LINE__
,
&
mtr
);
if
(
cursor
.
up
_match
==
dtuple_get_n_fields
(
tuple
))
{
if
(
cursor
.
low
_match
==
dtuple_get_n_fields
(
tuple
))
{
/* UPDATE SYS_INDEXES SET TYPE=index->type
WHERE TABLE_ID=index->table->id AND INDEX_ID=index->id */
ulint
len
;
...
...
storage/xtradb/handler/ha_innodb.cc
View file @
2a1be9cd
...
...
@@ -10457,6 +10457,7 @@ ha_innobase::start_stmt(
thr_lock_type
lock_type
)
{
trx_t
*
trx
;
DBUG_ENTER
(
"ha_innobase::start_stmt"
);
update_thd
(
thd
);
...
...
@@ -10479,6 +10480,28 @@ ha_innobase::start_stmt(
prebuilt
->
hint_need_to_fetch_extra_cols
=
0
;
reset_template
();
if
(
dict_table_is_temporary
(
prebuilt
->
table
)
&&
prebuilt
->
mysql_has_locked
&&
prebuilt
->
select_lock_type
==
LOCK_NONE
)
{
ulint
error
;
switch
(
thd_sql_command
(
thd
))
{
case
SQLCOM_INSERT
:
case
SQLCOM_UPDATE
:
case
SQLCOM_DELETE
:
init_table_handle_for_HANDLER
();
prebuilt
->
select_lock_type
=
LOCK_X
;
error
=
row_lock_table_for_mysql
(
prebuilt
,
NULL
,
1
);
if
(
error
!=
DB_SUCCESS
)
{
error
=
convert_error_code_to_mysql
(
(
int
)
error
,
0
,
thd
);
DBUG_RETURN
((
int
)
error
);
}
break
;
}
}
if
(
!
prebuilt
->
mysql_has_locked
)
{
/* This handle is for a temporary table created inside
this same LOCK TABLES; since MySQL does NOT call external_lock
...
...
@@ -10511,7 +10534,7 @@ ha_innobase::start_stmt(
innobase_register_trx
(
ht
,
thd
,
trx
);
return
(
0
);
DBUG_RETURN
(
0
);
}
/******************************************************************//**
...
...
@@ -13958,6 +13981,45 @@ innobase_convert_to_filename_charset(
}
/**********************************************************************
Issue a warning that the row is too big. */
extern
"C"
void
ib_warn_row_too_big
(
const
dict_table_t
*
table
)
{
/* If prefix is true then a 768-byte prefix is stored
locally for BLOB fields. Refer to dict_table_get_format() */
const
bool
prefix
=
((
table
->
flags
&
DICT_TF_FORMAT_MASK
)
>>
DICT_TF_FORMAT_SHIFT
)
<
UNIV_FORMAT_B
;
const
ulint
free_space
=
page_get_free_space_of_empty
(
table
->
flags
&
DICT_TF_COMPACT
)
/
2
;
THD
*
thd
=
current_thd
;
if
(
thd
)
{
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
HA_ERR_TO_BIG_ROW
,
"Row size too large (> %lu). Changing some columns to TEXT"
" or BLOB %smay help. In current row format, BLOB prefix of"
" %d bytes is stored inline."
,
free_space
,
prefix
?
"or using ROW_FORMAT=DYNAMIC or"
" ROW_FORMAT=COMPRESSED "
:
""
,
prefix
?
DICT_MAX_FIXED_COL_LEN
:
0
);
}
else
{
/* Note that we can't use push_warning_printf here because
e.g. purge thread has no thd */
sql_print_warning
(
"Row size too large (> %lu). Changing some columns to TEXT"
" or BLOB %smay help. In current row format, BLOB prefix of"
" %d bytes is stored inline."
,
free_space
,
prefix
?
"or using ROW_FORMAT=DYNAMIC or"
" ROW_FORMAT=COMPRESSED "
:
""
,
prefix
?
DICT_MAX_FIXED_COL_LEN
:
0
);
}
}
/****************************************************************************
* DS-MRR implementation
***************************************************************************/
...
...
storage/xtradb/include/btr0cur.ic
View file @
2a1be9cd
/*****************************************************************************
Copyright (c) 1994, 201
2
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1994, 201
4
, Oracle and/or its affiliates. All Rights Reserved.
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
...
...
@@ -28,7 +28,7 @@ Created 10/16/1994 Heikki Tuuri
#ifdef UNIV_DEBUG
# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)\
if (btr_cur_limit_optimistic_insert_debug\
if (btr_cur_limit_optimistic_insert_debug
> 1
\
&& (NREC) >= (ulint)btr_cur_limit_optimistic_insert_debug) {\
CODE;\
}
...
...
storage/xtradb/include/dict0dict.h
View file @
2a1be9cd
...
...
@@ -1399,6 +1399,14 @@ dict_table_init_referenced_rbt(
/*===========================*/
dict_table_t
*
table
);
/*!< in: the table object whose
table->referenced_rbt will be initialized */
/********************************************************************//**
Check if it is a temporary table.
@return true if temporary table flag is set. */
UNIV_INLINE
ibool
dict_table_is_temporary
(
/*====================*/
const
dict_table_t
*
table
);
/*!< in: table to check */
#ifndef UNIV_NONINL
#include "dict0dict.ic"
...
...
storage/xtradb/include/dict0dict.ic
View file @
2a1be9cd
...
...
@@ -1017,3 +1017,15 @@ dict_table_init_referenced_rbt(
ut_a(table->referenced_rbt != NULL);
return(table->referenced_rbt);
}
/********************************************************************//**
Check if it is a temporary table.
@return true if temporary table flag is set. */
UNIV_INLINE
ibool
dict_table_is_temporary(
/*====================*/
const dict_table_t* table) /*!< in: table to check */
{
return(table->flags & (DICT_TF2_TEMPORARY << DICT_TF2_SHIFT));
}
storage/xtradb/include/univ.i
View file @
2a1be9cd
...
...
@@ -64,10 +64,10 @@ component, i.e. we show M.N.P as M.N */
(
INNODB_VERSION_MAJOR
<<
8
|
INNODB_VERSION_MINOR
)
#
ifndef
PERCONA_INNODB_VERSION
#
define
PERCONA_INNODB_VERSION
3
6.1
#
define
PERCONA_INNODB_VERSION
3
7.0
#
endif
#
define
INNODB_VERSION_STR
"5.5.4
0
-MariaDB-"
IB_TO_STR
(
PERCONA_INNODB_VERSION
)
#
define
INNODB_VERSION_STR
"5.5.4
1
-MariaDB-"
IB_TO_STR
(
PERCONA_INNODB_VERSION
)
#
define
REFMAN
"http://dev.mysql.com/doc/refman/"
\
IB_TO_STR
(
MYSQL_MAJOR_VERSION
)
"."
\
...
...
@@ -122,6 +122,10 @@ if we are compiling on Windows. */
#
include
<
sched
.
h
>
#
endif
#
ifdef
HAVE_MALLOC_H
#
include
<
malloc
.
h
>
#
endif
/* We only try to do explicit inlining of functions with gcc and
Sun Studio */
...
...
storage/xtradb/log/log0log.c
View file @
2a1be9cd
...
...
@@ -260,7 +260,7 @@ log_buffer_extend(
{
ulint
move_start
;
ulint
move_end
;
byte
*
tmp_buf
=
alloca
(
OS_FILE_LOG_BLOCK_SIZE
);
byte
*
tmp_buf
=
alloca
(
OS_FILE_LOG_BLOCK_SIZE
);
mutex_enter
(
&
(
log_sys
->
mutex
));
...
...
storage/xtradb/log/log0online.c
View file @
2a1be9cd
...
...
@@ -1817,7 +1817,7 @@ log_online_purge_changed_page_bitmaps(
return
TRUE
;
}
if
(
srv_track_changed_pages
&&
lsn
>
=
log_bmp_sys
->
end_lsn
)
{
if
(
srv_track_changed_pages
&&
lsn
>
log_bmp_sys
->
end_lsn
)
{
/* If we have to delete the current output file, close it
first. */
os_file_close
(
log_bmp_sys
->
out
.
file
);
...
...
storage/xtradb/log/log0recv.c
View file @
2a1be9cd
...
...
@@ -2996,10 +2996,10 @@ recv_recovery_from_checkpoint_start_func(
#endif
/* UNIV_LOG_ARCHIVE */
byte
*
buf
;
byte
*
log_hdr_buf
;
byte
*
log_hdr_buf_base
;
byte
*
log_hdr_buf_base
=
alloca
(
LOG_FILE_HDR_SIZE
+
OS_FILE_LOG_BLOCK_SIZE
);
ulint
err
;
log_hdr_buf_base
=
alloca
(
LOG_FILE_HDR_SIZE
+
OS_FILE_LOG_BLOCK_SIZE
);
log_hdr_buf
=
ut_align
(
log_hdr_buf_base
,
OS_FILE_LOG_BLOCK_SIZE
);
#ifdef UNIV_LOG_ARCHIVE
...
...
storage/xtradb/row/row0mysql.c
View file @
2a1be9cd
/*****************************************************************************
Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2000, 201
4
, Oracle and/or its affiliates. All Rights Reserved.
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
...
...
@@ -3227,6 +3227,9 @@ row_drop_table_for_mysql(
ulint
namelen
;
ibool
locked_dictionary
=
FALSE
;
pars_info_t
*
info
=
NULL
;
DBUG_ENTER
(
"row_drop_table_for_mysql"
);
DBUG_PRINT
(
"row_drop_table_for_mysql"
,
(
"table: %s"
,
name
));
ut_a
(
name
!=
NULL
);
...
...
@@ -3237,7 +3240,7 @@ row_drop_table_for_mysql(
"InnoDB: Shut down mysqld and edit my.cnf so that newraw"
" is replaced with raw.
\n
"
,
stderr
);
return
(
DB_ERROR
);
DBUG_RETURN
(
DB_ERROR
);
}
trx
->
op_info
=
"dropping table"
;
...
...
@@ -3644,7 +3647,7 @@ funct_exit:
srv_wake_master_thread
();
return
((
int
)
err
);
DBUG_RETURN
((
int
)
err
);
}
/*********************************************************************//**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment