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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c8df4ffe
Commit
c8df4ffe
authored
Nov 03, 2009
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge of innodb-zip-ss6129 snapshot.
parents
e11daabf
8247dcee
Changes
23
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
368 additions
and
205 deletions
+368
-205
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+1
-5
mysql-test/suite/innodb/r/innodb-zip.result
mysql-test/suite/innodb/r/innodb-zip.result
+49
-49
mysql-test/suite/innodb/t/disabled.def
mysql-test/suite/innodb/t/disabled.def
+0
-1
mysql-test/suite/innodb/t/innodb-zip.test
mysql-test/suite/innodb/t/innodb-zip.test
+23
-23
mysql-test/suite/innodb/t/innodb_information_schema.test
mysql-test/suite/innodb/t/innodb_information_schema.test
+10
-6
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+85
-5
storage/innodb_plugin/buf/buf0buf.c
storage/innodb_plugin/buf/buf0buf.c
+5
-0
storage/innodb_plugin/buf/buf0flu.c
storage/innodb_plugin/buf/buf0flu.c
+26
-16
storage/innodb_plugin/buf/buf0lru.c
storage/innodb_plugin/buf/buf0lru.c
+40
-29
storage/innodb_plugin/fil/fil0fil.c
storage/innodb_plugin/fil/fil0fil.c
+2
-1
storage/innodb_plugin/handler/ha_innodb.cc
storage/innodb_plugin/handler/ha_innodb.cc
+61
-50
storage/innodb_plugin/handler/ha_innodb.h
storage/innodb_plugin/handler/ha_innodb.h
+18
-0
storage/innodb_plugin/handler/handler0alter.cc
storage/innodb_plugin/handler/handler0alter.cc
+8
-4
storage/innodb_plugin/include/buf0buf.h
storage/innodb_plugin/include/buf0buf.h
+2
-3
storage/innodb_plugin/include/buf0buf.ic
storage/innodb_plugin/include/buf0buf.ic
+13
-4
storage/innodb_plugin/include/page0page.ic
storage/innodb_plugin/include/page0page.ic
+1
-1
storage/innodb_plugin/include/row0mysql.h
storage/innodb_plugin/include/row0mysql.h
+0
-2
storage/innodb_plugin/include/univ.i
storage/innodb_plugin/include/univ.i
+1
-1
storage/innodb_plugin/os/os0file.c
storage/innodb_plugin/os/os0file.c
+17
-0
storage/innodb_plugin/os/os0proc.c
storage/innodb_plugin/os/os0proc.c
+1
-0
storage/innodb_plugin/row/row0ins.c
storage/innodb_plugin/row/row0ins.c
+3
-3
storage/innodb_plugin/row/row0mysql.c
storage/innodb_plugin/row/row0mysql.c
+1
-1
storage/innodb_plugin/srv/srv0start.c
storage/innodb_plugin/srv/srv0start.c
+1
-1
No files found.
mysql-test/lib/mtr_cases.pm
View file @
c8df4ffe
...
...
@@ -518,12 +518,8 @@ sub collect_one_suite($)
next
if
(
$test
->
{'
name
'}
eq
'
sys_vars.innodb_lock_wait_timeout_basic
');
# Diff around innodb_thread_concurrency variable
next
if
(
$test
->
{'
name
'}
eq
'
sys_vars.innodb_thread_concurrency_basic
');
#
Disable for Innodb Plugin until the fix for Plugin is received
#
Can't work with InnoPlug. Test framework needs to be re-designed.
next
if
(
$test
->
{'
name
'}
eq
'
main.innodb_bug46000
');
# Disable for Innodb Plugin until the fix for Plugin is received
next
if
(
$test
->
{'
name
'}
eq
'
main.innodb_bug44369
');
# Disable for Innodb Plugin until the fix for Plugin is received
next
if
(
$test
->
{'
name
'}
eq
'
main.innodb_bug47777
');
# Copy test options
my
$new_test
=
My::
Test
->
new
();
while
(
my
(
$key
,
$value
)
=
each
(
%
$test
))
...
...
mysql-test/suite/innodb/r/innodb-zip.result
View file @
c8df4ffe
This diff is collapsed.
Click to expand it.
mysql-test/suite/innodb/t/disabled.def
View file @
c8df4ffe
innodb-index: InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal
innodb_information_schema: Bug #47808 joro : innodb_information_schema.test fails when run under valgrind
mysql-test/suite/innodb/t/innodb-zip.test
View file @
c8df4ffe
...
...
@@ -175,11 +175,11 @@ set innodb_strict_mode = on;
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
0
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
9
;
show
error
s
;
show
warning
s
;
create
table
t3
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
1
;
...
...
@@ -205,22 +205,22 @@ key_block_size = 8 row_format = compressed;
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
8
row_format
=
redundant
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t3
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
8
row_format
=
compact
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t4
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
8
row_format
=
dynamic
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t5
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
8
row_format
=
default
;
show
error
s
;
show
warning
s
;
SELECT
table_schema
,
table_name
,
row_format
FROM
information_schema
.
tables
WHERE
engine
=
'innodb'
;
...
...
@@ -230,17 +230,17 @@ drop table t1;
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
9
row_format
=
redundant
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
9
row_format
=
compact
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
9
row_format
=
dynamic
;
show
error
s
;
show
warning
s
;
SELECT
table_schema
,
table_name
,
row_format
FROM
information_schema
.
tables
WHERE
engine
=
'innodb'
;
...
...
@@ -250,25 +250,25 @@ set global innodb_file_per_table = off;
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
1
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
2
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t3
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
4
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t4
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
8
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t5
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
16
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t6
(
id
int
primary
key
)
engine
=
innodb
row_format
=
compressed
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t7
(
id
int
primary
key
)
engine
=
innodb
row_format
=
dynamic
;
show
error
s
;
show
warning
s
;
create
table
t8
(
id
int
primary
key
)
engine
=
innodb
row_format
=
compact
;
create
table
t9
(
id
int
primary
key
)
engine
=
innodb
row_format
=
redundant
;
...
...
@@ -282,25 +282,25 @@ set global innodb_file_format = `0`;
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
1
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t2
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
2
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t3
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
4
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t4
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
8
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t5
(
id
int
primary
key
)
engine
=
innodb
key_block_size
=
16
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t6
(
id
int
primary
key
)
engine
=
innodb
row_format
=
compressed
;
show
error
s
;
show
warning
s
;
--
error
ER_CANT_CREATE_TABLE
create
table
t7
(
id
int
primary
key
)
engine
=
innodb
row_format
=
dynamic
;
show
error
s
;
show
warning
s
;
create
table
t8
(
id
int
primary
key
)
engine
=
innodb
row_format
=
compact
;
create
table
t9
(
id
int
primary
key
)
engine
=
innodb
row_format
=
redundant
;
...
...
mysql-test/suite/innodb/t/innodb_information_schema.test
View file @
c8df4ffe
...
...
@@ -110,14 +110,18 @@ SELECT * FROM ```t'\"_str` WHERE c1 = '3' FOR UPDATE;
--
send
SELECT
*
FROM
```t'\"_str`
WHERE
c1
=
'4'
FOR
UPDATE
;
# Give time to the above 2 queries to execute before continuing.
# Without this sleep it sometimes happens that the SELECT from innodb_locks
# executes before some of them, resulting in less than expected number
# of rows being selected from innodb_locks.
--
sleep
0.1
--
enable_result_log
--
connection
con_verify_innodb_locks
# Wait for the above queries to execute before continuing.
# Without this, it sometimes happens that the SELECT from innodb_locks
# executes before some of them, resulting in less than expected number
# of rows being selected from innodb_locks. If there is a bug and there
# are no 14 rows in innodb_locks then this test will fail with timeout.
let
$count
=
14
;
let
$table
=
INFORMATION_SCHEMA
.
INNODB_LOCKS
;
--
source
include
/
wait_until_rows_count
.
inc
# the above enables the query log, re-disable it
--
disable_query_log
SELECT
lock_mode
,
lock_type
,
lock_table
,
lock_index
,
lock_rec
,
lock_data
FROM
INFORMATION_SCHEMA
.
INNODB_LOCKS
ORDER
BY
lock_data
;
...
...
storage/innodb_plugin/ChangeLog
View file @
c8df4ffe
2009-10-29 The InnoDB Team
* handler/ha_innodb.cc, mysql-test/innodb-autoinc.result,
mysql-test/innodb-autoinc.test:
Fix Bug#47125 auto_increment start value is ignored if an index is
created and engine=innodb
2009-10-29 The InnoDB Team
* handler/ha_innodb.cc, mysql-test/innodb_bug47777.result,
mysql-test/innodb_bug47777.test:
Fix Bug#47777 innodb dies with spatial pk: Failing assertion: buf <=
original_buf + buf_len
2009-10-29 The InnoDB Team
* handler/ha_innodb.cc:
Fix Bug#38996 Race condition in ANALYZE TABLE
2009-10-29 The InnoDB Team
* handler/ha_innodb.cc:
Fix bug#42383: Can't create table 'test.bug39438'
2009-10-29 The InnoDB Team
* os/os0proc.c:
Fix Bug#48237 Error handling in os_mem_alloc_large appears to
be incorrect
2009-10-29 The InnoDB Team
* buf/buf0buf.c, buf/buf0lru.c, include/buf0buf.h, include/buf0buf.ic:
Fix corruption of the buf_pool->LRU_old list and improve debug
assertions.
2009-10-28 The InnoDB Team
* srv/srv0start.c:
Fix Bug#41490 After enlargement of InnoDB page size, the error message
become inaccurate
2009-10-26 The InnoDB Team
* row/row0ins.c:
When allocating a data tuple, zero out the system fields in order
to avoid Valgrind warnings about uninitialized fields in
dtuple_validate().
2009-10-22 The InnoDB Team
* handler/ha_innodb.cc, mysql-test/innodb-zip.result,
mysql-test/innodb-zip.test, mysql-test/innodb_bug44369.result,
mysql-test/innodb_bug44369.test:
Fix Bug#47233 Innodb calls push_warning(MYSQL_ERROR::WARN_LEVEL_ERROR)
2009-10-19 The InnoDB Team
* mysql-test/innodb_information_schema.test:
Fix Bug#47808 innodb_information_schema.test fails when run under
valgrind
2009-10-15 The InnoDB Team
* include/page0page.ic:
Fix Bug#47058 Failure to compile innodb_plugin on solaris 10u7 + spro
cc/CC 5.10
2009-10-05 The InnoDB Team
* buf/buf0buf.c:
Do not invalidate buffer pool while an LRU batch is active. Added code
to buf_pool_invalidate() to wait for the running batches to finish.
2009-10-01 The InnoDB Team
* handler/ha_innodb.cc:
Fix Bug#47763 typo in error message: Failed to open table %s after %lu
attemtps.
2009-10-01 The InnoDB Team
* fsp/fsp0fsp.c, row/row0merge.c:
...
...
storage/innodb_plugin/buf/buf0buf.c
View file @
c8df4ffe
...
...
@@ -1163,10 +1163,15 @@ buf_relocate(
#ifdef UNIV_LRU_DEBUG
/* buf_pool->LRU_old must be the first item in the LRU list
whose "old" flag is set. */
ut_a
(
buf_pool
->
LRU_old
->
old
);
ut_a
(
!
UT_LIST_GET_PREV
(
LRU
,
buf_pool
->
LRU_old
)
||
!
UT_LIST_GET_PREV
(
LRU
,
buf_pool
->
LRU_old
)
->
old
);
ut_a
(
!
UT_LIST_GET_NEXT
(
LRU
,
buf_pool
->
LRU_old
)
||
UT_LIST_GET_NEXT
(
LRU
,
buf_pool
->
LRU_old
)
->
old
);
}
else
{
/* Check that the "old" flag is consistent in
the block and its neighbours. */
buf_page_set_old
(
dpage
,
buf_page_is_old
(
dpage
));
#endif
/* UNIV_LRU_DEBUG */
}
...
...
storage/innodb_plugin/buf/buf0flu.c
View file @
c8df4ffe
...
...
@@ -303,6 +303,28 @@ buf_flush_write_complete(
}
}
/********************************************************************//**
Flush a batch of writes to the datafiles that have already been
written by the OS. */
static
void
buf_flush_sync_datafiles
(
void
)
/*==========================*/
{
/* Wake possible simulated aio thread to actually post the
writes to the operating system */
os_aio_simulated_wake_handler_threads
();
/* Wait that all async writes to tablespaces have been posted to
the OS */
os_aio_wait_until_no_pending_writes
();
/* Now we flush the data to disk (for example, with fsync) */
fil_flush_file_spaces
(
FIL_TABLESPACE
);
return
;
}
/********************************************************************//**
Flushes possible buffered writes from the doublewrite memory buffer to disk,
and also wakes up the aio thread if simulated aio is used. It is very
...
...
@@ -320,8 +342,8 @@ buf_flush_buffered_writes(void)
ulint
i
;
if
(
!
srv_use_doublewrite_buf
||
trx_doublewrite
==
NULL
)
{
os_aio_simulated_wake_handler_threads
();
/* Sync the writes to the disk. */
buf_flush_sync_datafiles
();
return
;
}
...
...
@@ -529,22 +551,10 @@ buf_flush_buffered_writes(void)
buf_LRU_stat_inc_io
();
}
/* Wake possible simulated aio thread to actually post the
writes to the operating system */
os_aio_simulated_wake_handler_threads
();
/* Wait that all async writes to tablespaces have been posted to
the OS */
os_aio_wait_until_no_pending_writes
();
/* Now we flush the data to disk (for example, with fsync) */
fil_flush_file_spaces
(
FIL_TABLESPACE
);
/* Sync the writes to the disk. */
buf_flush_sync_datafiles
();
/* We can now reuse the doublewrite memory buffer: */
trx_doublewrite
->
first_free
=
0
;
mutex_exit
(
&
(
trx_doublewrite
->
mutex
));
...
...
storage/innodb_plugin/buf/buf0lru.c
View file @
c8df4ffe
...
...
@@ -978,14 +978,14 @@ buf_LRU_old_adjust_len(void)
#ifdef UNIV_LRU_DEBUG
ut_a
(
!
LRU_old
->
old
);
#endif
/* UNIV_LRU_DEBUG */
buf_page_set_old
(
LRU_old
,
TRUE
);
old_len
=
++
buf_pool
->
LRU_old_len
;
buf_page_set_old
(
LRU_old
,
TRUE
);
}
else
if
(
old_len
>
new_len
+
BUF_LRU_OLD_TOLERANCE
)
{
buf_page_set_old
(
LRU_old
,
FALSE
);
buf_pool
->
LRU_old
=
UT_LIST_GET_NEXT
(
LRU
,
LRU_old
);
old_len
=
--
buf_pool
->
LRU_old_len
;
buf_page_set_old
(
LRU_old
,
FALSE
);
}
else
{
return
;
}
...
...
@@ -1009,13 +1009,13 @@ buf_LRU_old_init(void)
the adjust function to move the LRU_old pointer to the right
position */
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
LRU
);
while
(
bpage
!=
NULL
)
{
for
(
bpage
=
UT_LIST_GET_LAST
(
buf_pool
->
LRU
);
bpage
!=
NULL
;
bpage
=
UT_LIST_GET_PREV
(
LRU
,
bpage
))
{
ut_ad
(
bpage
->
in_LRU_list
);
ut_ad
(
buf_page_in_file
(
bpage
));
buf_page_set_old
(
bpage
,
TRUE
);
bpage
=
UT_LIST_GET_NEXT
(
LRU
,
bpage
);
/* This loop temporarily violates the
assertions of buf_page_set_old(). */
bpage
->
old
=
TRUE
;
}
buf_pool
->
LRU_old
=
UT_LIST_GET_FIRST
(
buf_pool
->
LRU
);
...
...
@@ -1091,10 +1091,19 @@ buf_LRU_remove_block(
buf_unzip_LRU_remove_block_if_needed
(
bpage
);
/* If the LRU list is so short that LRU_old not defined, return */
/* If the LRU list is so short that LRU_old is not defined,
clear the "old" flags and return */
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
<
BUF_LRU_OLD_MIN_LEN
)
{
for
(
bpage
=
UT_LIST_GET_FIRST
(
buf_pool
->
LRU
);
bpage
!=
NULL
;
bpage
=
UT_LIST_GET_NEXT
(
LRU
,
bpage
))
{
/* This loop temporarily violates the
assertions of buf_page_set_old(). */
bpage
->
old
=
FALSE
;
}
buf_pool
->
LRU_old
=
NULL
;
buf_pool
->
LRU_old_len
=
0
;
return
;
}
...
...
@@ -1155,14 +1164,13 @@ buf_LRU_add_block_to_end_low(
UT_LIST_ADD_LAST
(
LRU
,
buf_pool
->
LRU
,
bpage
);
ut_d
(
bpage
->
in_LRU_list
=
TRUE
);
buf_page_set_old
(
bpage
,
TRUE
);
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
>
BUF_LRU_OLD_MIN_LEN
)
{
ut_ad
(
buf_pool
->
LRU_old
);
/* Adjust the length of the old block list if necessary */
buf_page_set_old
(
bpage
,
TRUE
);
buf_pool
->
LRU_old_len
++
;
buf_LRU_old_adjust_len
();
...
...
@@ -1171,8 +1179,9 @@ buf_LRU_add_block_to_end_low(
/* The LRU list is now long enough for LRU_old to become
defined: init it */
buf_pool
->
LRU_old_len
++
;
buf_LRU_old_init
();
}
else
{
buf_page_set_old
(
bpage
,
buf_pool
->
LRU_old
!=
NULL
);
}
/* If this is a zipped block with decompressed frame as well
...
...
@@ -1223,14 +1232,13 @@ buf_LRU_add_block_low(
ut_d
(
bpage
->
in_LRU_list
=
TRUE
);
buf_page_set_old
(
bpage
,
old
);
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
>
BUF_LRU_OLD_MIN_LEN
)
{
ut_ad
(
buf_pool
->
LRU_old
);
/* Adjust the length of the old block list if necessary */
buf_page_set_old
(
bpage
,
old
);
buf_LRU_old_adjust_len
();
}
else
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
==
BUF_LRU_OLD_MIN_LEN
)
{
...
...
@@ -1239,6 +1247,8 @@ buf_LRU_add_block_low(
defined: init it */
buf_LRU_old_init
();
}
else
{
buf_page_set_old
(
bpage
,
buf_pool
->
LRU_old
!=
NULL
);
}
/* If this is a zipped block with decompressed frame as well
...
...
@@ -1436,15 +1446,6 @@ buf_LRU_free_block(
buf_pool
->
LRU_old
=
b
;
}
#ifdef UNIV_LRU_DEBUG
ut_a
(
prev_b
->
old
||
!
UT_LIST_GET_NEXT
(
LRU
,
b
)
||
UT_LIST_GET_NEXT
(
LRU
,
b
)
->
old
);
}
else
{
ut_a
(
!
prev_b
->
old
||
!
UT_LIST_GET_NEXT
(
LRU
,
b
)
||
!
UT_LIST_GET_NEXT
(
LRU
,
b
)
->
old
);
#endif
/* UNIV_LRU_DEBUG */
}
lru_len
=
UT_LIST_GET_LEN
(
buf_pool
->
LRU
);
...
...
@@ -1460,6 +1461,11 @@ buf_LRU_free_block(
defined: init it */
buf_LRU_old_init
();
}
#ifdef UNIV_LRU_DEBUG
/* Check that the "old" flag is consistent
in the block and its neighbours. */
buf_page_set_old
(
b
,
buf_page_is_old
(
b
));
#endif
/* UNIV_LRU_DEBUG */
}
else
{
ut_d
(
b
->
in_LRU_list
=
FALSE
);
buf_LRU_add_block_low
(
b
,
buf_page_is_old
(
b
));
...
...
@@ -1966,19 +1972,24 @@ buf_LRU_validate(void)
}
if
(
buf_page_is_old
(
bpage
))
{
old_len
++
;
}
const
buf_page_t
*
prev
=
UT_LIST_GET_PREV
(
LRU
,
bpage
);
const
buf_page_t
*
next
=
UT_LIST_GET_NEXT
(
LRU
,
bpage
);
if
(
buf_pool
->
LRU_old
&&
(
old_len
==
1
)
)
{
if
(
!
old_len
++
)
{
ut_a
(
buf_pool
->
LRU_old
==
bpage
);
}
else
{
ut_a
(
!
prev
||
buf_page_is_old
(
prev
));
}
ut_a
(
!
next
||
buf_page_is_old
(
next
));
}
bpage
=
UT_LIST_GET_NEXT
(
LRU
,
bpage
);
}
if
(
buf_pool
->
LRU_old
)
{
ut_a
(
buf_pool
->
LRU_old_len
==
old_len
);
}
UT_LIST_VALIDATE
(
list
,
buf_page_t
,
buf_pool
->
free
,
ut_ad
(
ut_list_node_313
->
in_free_list
));
...
...
storage/innodb_plugin/fil/fil0fil.c
View file @
c8df4ffe
...
...
@@ -659,6 +659,7 @@ fil_node_open_file(
#ifdef UNIV_HOTBACKUP
if
(
space
->
id
==
0
)
{
node
->
size
=
(
ulint
)
(
size_bytes
/
UNIV_PAGE_SIZE
);
os_file_close
(
node
->
handle
);
goto
add_size
;
}
#endif
/* UNIV_HOTBACKUP */
...
...
@@ -3244,7 +3245,7 @@ fil_load_single_table_tablespace(
fprintf
(
stderr
,
"InnoDB: Renaming tablespace %s of id %lu,
\n
"
"InnoDB: to %s_ibbackup_old_vers_<timestamp>
\n
"
"InnoDB: because its size %
lld
is too small"
"InnoDB: because its size %
"
PRId64
"
is too small"
" (< 4 pages 16 kB each),
\n
"
"InnoDB: or the space id in the file header"
" is not sensible.
\n
"
...
...
storage/innodb_plugin/handler/ha_innodb.cc
View file @
c8df4ffe
This diff is collapsed.
Click to expand it.
storage/innodb_plugin/handler/ha_innodb.h
View file @
c8df4ffe
...
...
@@ -289,3 +289,21 @@ trx_t*
innobase_trx_allocate
(
/*==================*/
MYSQL_THD
thd
);
/*!< in: user thread handle */
/*********************************************************************//**
This function checks each index name for a table against reserved
system default primary index name 'GEN_CLUST_INDEX'. If a name
matches, this function pushes an warning message to the client,
and returns true. */
extern
"C"
bool
innobase_index_name_is_reserved
(
/*============================*/
/* out: true if the index name
matches the reserved name */
const
trx_t
*
trx
,
/* in: InnoDB transaction handle */
const
KEY
*
key_info
,
/* in: Indexes to be created */
ulint
num_of_keys
);
/* in: Number of indexes to
be created. */
storage/innodb_plugin/handler/handler0alter.cc
View file @
c8df4ffe
...
...
@@ -628,7 +628,7 @@ ha_innobase::add_index(
ulint
num_created
=
0
;
ibool
dict_locked
=
FALSE
;
ulint
new_primary
;
ul
int
error
;
int
error
;
DBUG_ENTER
(
"ha_innobase::add_index"
);
ut_a
(
table
);
...
...
@@ -656,9 +656,13 @@ ha_innobase::add_index(
innodb_table
=
indexed_table
=
dict_table_get
(
prebuilt
->
table
->
name
,
FALSE
);
/* Check if the index name is reserved. */
if
(
innobase_index_name_is_reserved
(
trx
,
key_info
,
num_of_keys
))
{
error
=
-
1
;
}
else
{
/* Check that index keys are sensible */
error
=
innobase_check_index_keys
(
key_info
,
num_of_keys
);
}
if
(
UNIV_UNLIKELY
(
error
))
{
err_exit:
...
...
storage/innodb_plugin/include/buf0buf.h
View file @
c8df4ffe
...
...
@@ -1129,7 +1129,7 @@ struct buf_page_struct{
debugging */
#endif
/* UNIV_DEBUG */
unsigned
old
:
1
;
/*!< TRUE if the block is in the old
blocks in
the LRU list
*/
blocks in
buf_pool->LRU_old
*/
unsigned
freed_page_clock
:
31
;
/*!< the value of
buf_pool->freed_page_clock
when this block was the last
...
...
@@ -1393,8 +1393,7 @@ struct buf_pool_struct{
the block to which LRU_old points
onward, including that block;
see buf0lru.c for the restrictions
on this value; not defined if
LRU_old == NULL;
on this value; 0 if LRU_old == NULL;
NOTE: LRU_old_len must be adjusted
whenever LRU_old shrinks or grows! */
...
...
storage/innodb_plugin/include/buf0buf.ic
View file @
c8df4ffe
...
...
@@ -466,10 +466,19 @@ buf_page_set_old(
ut_ad(bpage->in_LRU_list);
#ifdef UNIV_LRU_DEBUG
if (UT_LIST_GET_PREV(LRU, bpage) && UT_LIST_GET_NEXT(LRU, bpage)
&& UT_LIST_GET_PREV(LRU, bpage)->old
== UT_LIST_GET_NEXT(LRU, bpage)->old) {
ut_a(UT_LIST_GET_PREV(LRU, bpage)->old == old);
ut_a((buf_pool->LRU_old_len == 0) == (buf_pool->LRU_old == NULL));
/* If a block is flagged "old", the LRU_old list must exist. */
ut_a(!old || buf_pool->LRU_old);
if (UT_LIST_GET_PREV(LRU, bpage) && UT_LIST_GET_NEXT(LRU, bpage)) {
const buf_page_t* prev = UT_LIST_GET_PREV(LRU, bpage);
const buf_page_t* next = UT_LIST_GET_NEXT(LRU, bpage);
if (prev->old == next->old) {
ut_a(prev->old == old);
} else {
ut_a(!prev->old);
ut_a(buf_pool->LRU_old == (old ? bpage : next));
}
}
#endif /* UNIV_LRU_DEBUG */
...
...
storage/innodb_plugin/include/page0page.ic
View file @
c8df4ffe
...
...
@@ -907,7 +907,7 @@ page_get_data_size(
/************************************************************//**
Allocates a block of memory from the free list of an index page. */
UNIV_IN
TERN
UNIV_IN
LINE
void
page_mem_alloc_free(
/*================*/
...
...
storage/innodb_plugin/include/row0mysql.h
View file @
c8df4ffe
...
...
@@ -756,8 +756,6 @@ struct row_prebuilt_struct {
store it here so that we can return
it to MySQL */
/*----------------------*/
UT_LIST_NODE_T
(
row_prebuilt_t
)
prebuilts
;
/*!< list node of table->prebuilts */
ulint
magic_n2
;
/*!< this should be the same as
magic_n */
};
...
...
storage/innodb_plugin/include/univ.i
View file @
c8df4ffe
...
...
@@ -237,7 +237,7 @@ by one. */
/* Linkage specifier for non-static InnoDB symbols (variables and functions)
that are only referenced from within InnoDB, not from MySQL */
#
if
defined
(
__GNUC__
)
&
&
(__GNUC__
>=
4
)
&
&
!defined(UNIV_HOTBACKUP
)
#
if
defined
(
__GNUC__
)
&
&
(__GNUC__
>=
4
)
||
defined(__INTEL_COMPILER
)
#
define
UNIV_INTERN
__attribute__
((
visibility
(
"hidden"
)))
#
else
#
define
UNIV_INTERN
...
...
storage/innodb_plugin/os/os0file.c
View file @
c8df4ffe
...
...
@@ -832,6 +832,23 @@ os_file_readdir_next_file(
ret
=
stat
(
full_path
,
&
statinfo
);
if
(
ret
)
{
if
(
errno
==
ENOENT
)
{
/* readdir() returned a file that does not exist,
it must have been deleted in the meantime. Do what
would have happened if the file was deleted before
readdir() - ignore and go to the next entry.
If this is the last entry then info->name will still
contain the name of the deleted file when this
function returns, but this is not an issue since the
caller shouldn't be looking at info when end of
directory is returned. */
ut_free
(
full_path
);
goto
next_file
;
}
os_file_handle_error_no_exit
(
full_path
,
"stat"
);
ut_free
(
full_path
);
...
...
storage/innodb_plugin/os/os0proc.c
View file @
c8df4ffe
...
...
@@ -97,6 +97,7 @@ os_mem_alloc_large(
fprintf
(
stderr
,
"InnoDB: HugeTLB: Warning: Failed to"
" attach shared memory segment, errno %d
\n
"
,
errno
);
ptr
=
NULL
;
}
/* Remove the shared memory segment so that it will be
...
...
storage/innodb_plugin/row/row0ins.c
View file @
c8df4ffe
...
...
@@ -141,7 +141,7 @@ row_ins_alloc_sys_fields(
dfield
=
dtuple_get_nth_field
(
row
,
dict_col_get_no
(
col
));
ptr
=
mem_heap_alloc
(
heap
,
DATA_ROW_ID_LEN
);
ptr
=
mem_heap_
z
alloc
(
heap
,
DATA_ROW_ID_LEN
);
dfield_set_data
(
dfield
,
ptr
,
DATA_ROW_ID_LEN
);
...
...
@@ -152,7 +152,7 @@ row_ins_alloc_sys_fields(
col
=
dict_table_get_sys_col
(
table
,
DATA_TRX_ID
);
dfield
=
dtuple_get_nth_field
(
row
,
dict_col_get_no
(
col
));
ptr
=
mem_heap_alloc
(
heap
,
DATA_TRX_ID_LEN
);
ptr
=
mem_heap_
z
alloc
(
heap
,
DATA_TRX_ID_LEN
);
dfield_set_data
(
dfield
,
ptr
,
DATA_TRX_ID_LEN
);
...
...
@@ -163,7 +163,7 @@ row_ins_alloc_sys_fields(
col
=
dict_table_get_sys_col
(
table
,
DATA_ROLL_PTR
);
dfield
=
dtuple_get_nth_field
(
row
,
dict_col_get_no
(
col
));
ptr
=
mem_heap_alloc
(
heap
,
DATA_ROLL_PTR_LEN
);
ptr
=
mem_heap_
z
alloc
(
heap
,
DATA_ROLL_PTR_LEN
);
dfield_set_data
(
dfield
,
ptr
,
DATA_ROLL_PTR_LEN
);
}
...
...
storage/innodb_plugin/row/row0mysql.c
View file @
c8df4ffe
...
...
@@ -2068,7 +2068,7 @@ Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
should be called after the indexes for a table have been created.
Each foreign key constraint must be accompanied with indexes in
bot participating tables. The indexes are allowed to contain more
bot
h
participating tables. The indexes are allowed to contain more
fields than mentioned in the constraint. Check also that foreign key
constraints which reference this table are ok.
@return error code or DB_SUCCESS */
...
...
storage/innodb_plugin/srv/srv0start.c
View file @
c8df4ffe
...
...
@@ -1376,7 +1376,7 @@ innobase_start_or_create_for_mysql(void)
sum_of_new_sizes
+=
srv_data_file_sizes
[
i
];
}
if
(
sum_of_new_sizes
<
640
)
{
if
(
sum_of_new_sizes
<
10485760
/
UNIV_PAGE_SIZE
)
{
fprintf
(
stderr
,
"InnoDB: Error: tablespace size must be"
" at least 10 MB
\n
"
);
...
...
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