Merge 10.2 into bb-10.2-ext
This commit is contained in:
commit
a82ed92a6a
@ -1938,7 +1938,7 @@ cleanup:
|
|||||||
|
|
||||||
ctxt->ret = ret;
|
ctxt->ret = ret;
|
||||||
|
|
||||||
os_thread_exit(NULL);
|
os_thread_exit();
|
||||||
OS_THREAD_DUMMY_RETURN;
|
OS_THREAD_DUMMY_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -840,7 +840,7 @@ stop_thread:
|
|||||||
|
|
||||||
os_event_set(kill_query_thread_stopped);
|
os_event_set(kill_query_thread_stopped);
|
||||||
|
|
||||||
os_thread_exit(NULL);
|
os_thread_exit();
|
||||||
OS_THREAD_DUMMY_RETURN;
|
OS_THREAD_DUMMY_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,5 +76,6 @@ perl;
|
|||||||
my $res=@matches ? "FOUND " . scalar(@matches) : "NOT FOUND";
|
my $res=@matches ? "FOUND " . scalar(@matches) : "NOT FOUND";
|
||||||
$ENV{SEARCH_FILE} =~ s{^.*?([^/\\]+)$}{$1};
|
$ENV{SEARCH_FILE} =~ s{^.*?([^/\\]+)$}{$1};
|
||||||
print "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n";
|
print "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n";
|
||||||
exit $ENV{SEARCH_ABORT} && $res =~ /^$ENV{SEARCH_ABORT}/;
|
die "$ENV{SEARCH_ABORT}\n"
|
||||||
|
if $ENV{SEARCH_ABORT} && $res =~ /^$ENV{SEARCH_ABORT}/;
|
||||||
EOF
|
EOF
|
||||||
|
@ -5065,6 +5065,11 @@ sub mysqld_start ($$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
|
||||||
|
# Use it to restart the server at testing a failing server start (e.g
|
||||||
|
# due to incompatible options).
|
||||||
|
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
|
||||||
|
|
||||||
if ( $opt_gdb || $opt_manual_gdb )
|
if ( $opt_gdb || $opt_manual_gdb )
|
||||||
{
|
{
|
||||||
gdb_arguments(\$args, \$exe, $mysqld->name());
|
gdb_arguments(\$args, \$exe, $mysqld->name());
|
||||||
@ -5161,11 +5166,6 @@ sub mysqld_start ($$) {
|
|||||||
# Remember options used when starting
|
# Remember options used when starting
|
||||||
$mysqld->{'started_opts'}= $extra_opts;
|
$mysqld->{'started_opts'}= $extra_opts;
|
||||||
|
|
||||||
# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
|
|
||||||
# Use it to restart the server at testing a failing server start (e.g
|
|
||||||
# due to incompatible options).
|
|
||||||
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8088,6 +8088,34 @@ CALL sp1();
|
|||||||
CALL sp1();
|
CALL sp1();
|
||||||
drop user 'foo'@'%';
|
drop user 'foo'@'%';
|
||||||
drop procedure sp1;
|
drop procedure sp1;
|
||||||
|
#
|
||||||
|
# MDEV-10972: Insert from select / view / union --
|
||||||
|
# repeatable crash in 10.1, 10.2 Linux/Mac/Windows
|
||||||
|
#
|
||||||
|
create table t (id int auto_increment primary key);
|
||||||
|
insert into t values (9494),(9495),(9496),(9497),(9498),(9499),(9500),(9501),(9502),(9503);
|
||||||
|
create VIEW v AS
|
||||||
|
select id from t
|
||||||
|
union
|
||||||
|
select id from t
|
||||||
|
;
|
||||||
|
drop procedure if exists p;
|
||||||
|
Warnings:
|
||||||
|
Note 1305 PROCEDURE test.p does not exist
|
||||||
|
create procedure p()
|
||||||
|
insert into tmp_t select t.id from (
|
||||||
|
select id from v
|
||||||
|
union
|
||||||
|
select id from v
|
||||||
|
) sq
|
||||||
|
inner join t on (sq.id = t.id);
|
||||||
|
CALL p();
|
||||||
|
ERROR 42S02: Table 'test.tmp_t' doesn't exist
|
||||||
|
create table tmp_t (id int null);
|
||||||
|
CALL p();
|
||||||
|
drop procedure p;
|
||||||
|
drop view v;
|
||||||
|
drop table t, tmp_t;
|
||||||
#End of 10.1 tests
|
#End of 10.1 tests
|
||||||
#
|
#
|
||||||
# MDEV-11081: CURSOR for query with GROUP BY
|
# MDEV-11081: CURSOR for query with GROUP BY
|
||||||
|
@ -6603,6 +6603,41 @@ use test;
|
|||||||
drop database test_db;
|
drop database test_db;
|
||||||
drop user foo@localhost;
|
drop user foo@localhost;
|
||||||
#
|
#
|
||||||
|
# MDEV-13523: Group By in a View, called within a Stored Routine
|
||||||
|
# causes Error Code 1356 when a non-root user runs the routine for
|
||||||
|
# a second time
|
||||||
|
#
|
||||||
|
CREATE DATABASE bugTest;
|
||||||
|
USE bugTest;
|
||||||
|
CREATE TABLE `procViewTable` (`id` int(10), `someText` varchar(50) NOT NULL);
|
||||||
|
insert into `procViewTable` values (1,'Test'), (2,'Test 2');
|
||||||
|
CREATE USER 'procView'@'%';
|
||||||
|
GRANT ALL PRIVILEGES ON `bugTest`.* TO 'procView'@'%';
|
||||||
|
CREATE DEFINER=`procView`@`%` VIEW `procViewSimple` AS (
|
||||||
|
select * from (
|
||||||
|
select `id` from `bugTest`.`procViewTable`
|
||||||
|
) `innerQuery`
|
||||||
|
group by `innerQuery`.`id`
|
||||||
|
);
|
||||||
|
connect con1,localhost,procView,,;
|
||||||
|
use bugTest;
|
||||||
|
prepare stmt from "SELECT * FROM procViewSimple";
|
||||||
|
execute stmt;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
execute stmt;
|
||||||
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
drop user procView;
|
||||||
|
drop view procViewSimple;
|
||||||
|
drop table procViewTable;
|
||||||
|
use test;
|
||||||
|
drop database bugTest;
|
||||||
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -1,37 +1,17 @@
|
|||||||
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB DEFAULT CHARSET=UTF8 ROW_FORMAT=DYNAMIC;
|
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB ROW_FORMAT=REDUNDANT;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B');
|
INSERT INTO t1 SET a=CONCAT('A', SPACE(8000), 'B');
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
INSERT INTO t1 SELECT a FROM t1;
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
SELECT * from t1;
|
SELECT * from t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB DEFAULT CHARSET=UTF8 ROW_FORMAT=REDUNDANT;
|
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB ROW_FORMAT=DYNAMIC;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B');
|
INSERT INTO t1 SET a=CONCAT('A', SPACE(8000), 'B');
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
INSERT INTO t1 SELECT a FROM t1;
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
SELECT * from t1;
|
SELECT * from t1;
|
||||||
|
@ -181,7 +181,6 @@ a
|
|||||||
SELECT * FROM tp;
|
SELECT * FROM tp;
|
||||||
a
|
a
|
||||||
DROP TABLE tr,tc,td,tz,tp;
|
DROP TABLE tr,tc,td,tz,tp;
|
||||||
ib_buffer_pool
|
|
||||||
ib_logfile0
|
ib_logfile0
|
||||||
ib_logfile1
|
ib_logfile1
|
||||||
ibdata1
|
ibdata1
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
--innodb-file-per-table
|
--innodb-file-per-table
|
||||||
--innodb-file-format='Barracuda'
|
--innodb-file-format='Barracuda'
|
||||||
--innodb-buffer-pool-size=32M
|
--innodb-buffer-pool-size=32M
|
||||||
--innodb-log-file-size=32M
|
--innodb-page-size=64k
|
||||||
--innodb-strict-mode=OFF
|
--innodb-strict-mode=OFF
|
||||||
|
|
||||||
|
@ -1,24 +1,13 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/innodb_page_size.inc
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# MDEV-13227: Assertion failure len < 16384 in file rem0rec.cc line 1285
|
# MDEV-13227: Assertion failure len < 16384 in file rem0rec.cc line 1285
|
||||||
# Crashes with innodb_page_size=64K. Does not crash at <= 32K.
|
# Crashes with innodb_page_size=64K. Does not crash at <= 32K.
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB DEFAULT CHARSET=UTF8 ROW_FORMAT=DYNAMIC;
|
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB ROW_FORMAT=REDUNDANT;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B');
|
INSERT INTO t1 SET a=CONCAT('A', SPACE(8000), 'B');
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
INSERT INTO t1 SELECT a FROM t1;
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
# random data no output we are only interested if fails
|
# random data no output we are only interested if fails
|
||||||
@ -27,20 +16,10 @@ SELECT * from t1;
|
|||||||
--enable_result_log
|
--enable_result_log
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB DEFAULT CHARSET=UTF8 ROW_FORMAT=REDUNDANT;
|
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB ROW_FORMAT=DYNAMIC;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B');
|
INSERT INTO t1 SET a=CONCAT('A', SPACE(8000), 'B');
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
INSERT INTO t1 SELECT a FROM t1;
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
INSERT INTO t1 SELECT CONCAT('A', SPACE(4087), 'B') FROM t1;
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
UPDATE t1 SET a=CONCAT(a, RAND(), a);
|
||||||
# random data no output we are only interested if fails
|
# random data no output we are only interested if fails
|
||||||
|
@ -201,6 +201,11 @@ DROP TABLE tr,tc,td,tz,tp;
|
|||||||
--let $restart_parameters=
|
--let $restart_parameters=
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
|
--error 0,1
|
||||||
|
--remove_file $bugdir/ibtmp1
|
||||||
|
--error 0,1
|
||||||
|
--remove_file $bugdir/ib_buffer_pool
|
||||||
|
|
||||||
--list_files $bugdir
|
--list_files $bugdir
|
||||||
--remove_files_wildcard $bugdir
|
--remove_files_wildcard $bugdir
|
||||||
--rmdir $bugdir
|
--rmdir $bugdir
|
||||||
|
@ -9549,6 +9549,37 @@ CALL sp1();
|
|||||||
drop user 'foo'@'%';
|
drop user 'foo'@'%';
|
||||||
drop procedure sp1;
|
drop procedure sp1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-10972: Insert from select / view / union --
|
||||||
|
--echo # repeatable crash in 10.1, 10.2 Linux/Mac/Windows
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t (id int auto_increment primary key);
|
||||||
|
insert into t values (9494),(9495),(9496),(9497),(9498),(9499),(9500),(9501),(9502),(9503);
|
||||||
|
|
||||||
|
create VIEW v AS
|
||||||
|
select id from t
|
||||||
|
union
|
||||||
|
select id from t
|
||||||
|
;
|
||||||
|
|
||||||
|
drop procedure if exists p;
|
||||||
|
create procedure p()
|
||||||
|
insert into tmp_t select t.id from (
|
||||||
|
select id from v
|
||||||
|
union
|
||||||
|
select id from v
|
||||||
|
) sq
|
||||||
|
inner join t on (sq.id = t.id);
|
||||||
|
|
||||||
|
--error ER_NO_SUCH_TABLE
|
||||||
|
CALL p();
|
||||||
|
create table tmp_t (id int null);
|
||||||
|
CALL p();
|
||||||
|
|
||||||
|
drop procedure p;
|
||||||
|
drop view v;
|
||||||
|
drop table t, tmp_t;
|
||||||
|
|
||||||
--echo #End of 10.1 tests
|
--echo #End of 10.1 tests
|
||||||
|
|
||||||
|
@ -6312,6 +6312,44 @@ use test;
|
|||||||
drop database test_db;
|
drop database test_db;
|
||||||
drop user foo@localhost;
|
drop user foo@localhost;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-13523: Group By in a View, called within a Stored Routine
|
||||||
|
--echo # causes Error Code 1356 when a non-root user runs the routine for
|
||||||
|
--echo # a second time
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE DATABASE bugTest;
|
||||||
|
USE bugTest;
|
||||||
|
|
||||||
|
CREATE TABLE `procViewTable` (`id` int(10), `someText` varchar(50) NOT NULL);
|
||||||
|
insert into `procViewTable` values (1,'Test'), (2,'Test 2');
|
||||||
|
|
||||||
|
CREATE USER 'procView'@'%';
|
||||||
|
GRANT ALL PRIVILEGES ON `bugTest`.* TO 'procView'@'%';
|
||||||
|
|
||||||
|
CREATE DEFINER=`procView`@`%` VIEW `procViewSimple` AS (
|
||||||
|
select * from (
|
||||||
|
select `id` from `bugTest`.`procViewTable`
|
||||||
|
) `innerQuery`
|
||||||
|
group by `innerQuery`.`id`
|
||||||
|
);
|
||||||
|
|
||||||
|
--connect (con1,localhost,procView,,)
|
||||||
|
use bugTest;
|
||||||
|
|
||||||
|
prepare stmt from "SELECT * FROM procViewSimple";
|
||||||
|
execute stmt;
|
||||||
|
execute stmt;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
--disconnect con1
|
||||||
|
--connection default
|
||||||
|
drop user procView;
|
||||||
|
drop view procViewSimple;
|
||||||
|
drop table procViewTable;
|
||||||
|
use test;
|
||||||
|
drop database bugTest;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -1249,6 +1249,7 @@ else
|
|||||||
|
|
||||||
if ((c = *ptr) >= CHAR_8) break;
|
if ((c = *ptr) >= CHAR_8) break;
|
||||||
|
|
||||||
|
/* fall through */
|
||||||
/* Fall through with a digit less than 8 */
|
/* Fall through with a digit less than 8 */
|
||||||
|
|
||||||
/* \0 always starts an octal number, but we may drop through to here with a
|
/* \0 always starts an octal number, but we may drop through to here with a
|
||||||
@ -5097,6 +5098,8 @@ for (;; ptr++)
|
|||||||
either not match or match, depending on whether the class is or is
|
either not match or match, depending on whether the class is or is
|
||||||
not negated. */
|
not negated. */
|
||||||
|
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (local_negate &&
|
if (local_negate &&
|
||||||
(xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
|
(xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
|
||||||
@ -7165,7 +7168,7 @@ for (;; ptr++)
|
|||||||
goto FAILED;
|
goto FAILED;
|
||||||
}
|
}
|
||||||
/* Fall through to handle (?P< as (?< is handled */
|
/* Fall through to handle (?P< as (?< is handled */
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
DEFINE_NAME: /* Come here from (?< handling */
|
DEFINE_NAME: /* Come here from (?< handling */
|
||||||
|
@ -1053,6 +1053,8 @@ for (;;)
|
|||||||
group. At this point, the return is converted into MATCH_NOMATCH so that
|
group. At this point, the return is converted into MATCH_NOMATCH so that
|
||||||
previous backup points can be taken. */
|
previous backup points can be taken. */
|
||||||
|
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
case OP_ONCE:
|
case OP_ONCE:
|
||||||
case OP_BRA:
|
case OP_BRA:
|
||||||
case OP_SBRA:
|
case OP_SBRA:
|
||||||
|
@ -45,12 +45,6 @@ static const LEX_STRING metadata_lock_info_lock_mode[] = {
|
|||||||
{ C_STRING_WITH_LEN("MDL_EXCLUSIVE") },
|
{ C_STRING_WITH_LEN("MDL_EXCLUSIVE") },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const LEX_STRING metadata_lock_info_duration[] = {
|
|
||||||
{ C_STRING_WITH_LEN("MDL_STATEMENT") },
|
|
||||||
{ C_STRING_WITH_LEN("MDL_TRANSACTION") },
|
|
||||||
{ C_STRING_WITH_LEN("MDL_EXPLICIT") },
|
|
||||||
};
|
|
||||||
|
|
||||||
static ST_FIELD_INFO i_s_metadata_lock_info_fields_info[] =
|
static ST_FIELD_INFO i_s_metadata_lock_info_fields_info[] =
|
||||||
{
|
{
|
||||||
{"THREAD_ID", 20, MYSQL_TYPE_LONGLONG, 0,
|
{"THREAD_ID", 20, MYSQL_TYPE_LONGLONG, 0,
|
||||||
@ -129,8 +123,6 @@ static int i_s_metadata_lock_info_init(
|
|||||||
== MDL_key::NAMESPACE_END);
|
== MDL_key::NAMESPACE_END);
|
||||||
compile_time_assert(sizeof(metadata_lock_info_lock_mode)/sizeof(LEX_STRING)
|
compile_time_assert(sizeof(metadata_lock_info_lock_mode)/sizeof(LEX_STRING)
|
||||||
== MDL_TYPE_END);
|
== MDL_TYPE_END);
|
||||||
compile_time_assert(sizeof(metadata_lock_info_duration)/sizeof(LEX_STRING)
|
|
||||||
== MDL_DURATION_END);
|
|
||||||
|
|
||||||
ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;
|
ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;
|
||||||
DBUG_ENTER("i_s_metadata_lock_info_init");
|
DBUG_ENTER("i_s_metadata_lock_info_init");
|
||||||
|
@ -357,18 +357,18 @@ EOF
|
|||||||
|
|
||||||
readonly RSYNC_PORT=${WSREP_SST_OPT_PORT:-4444}
|
readonly RSYNC_PORT=${WSREP_SST_OPT_PORT:-4444}
|
||||||
# If the IP is local listen only in it
|
# If the IP is local listen only in it
|
||||||
if is_local_ip $RSYNC_ADDR
|
if is_local_ip "$RSYNC_ADDR"
|
||||||
then
|
then
|
||||||
rsync --daemon --no-detach --address $RSYNC_ADDR --port $RSYNC_PORT --config "$RSYNC_CONF" &
|
rsync --daemon --no-detach --address "$RSYNC_ADDR" --port "$RSYNC_PORT" --config "$RSYNC_CONF" &
|
||||||
else
|
else
|
||||||
# Not local, possibly a NAT, listen in all interface
|
# Not local, possibly a NAT, listen in all interface
|
||||||
rsync --daemon --no-detach --port $RSYNC_PORT --config "$RSYNC_CONF" &
|
rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" &
|
||||||
# Overwrite address with all
|
# Overwrite address with all
|
||||||
RSYNC_ADDR="*"
|
RSYNC_ADDR="*"
|
||||||
fi
|
fi
|
||||||
RSYNC_REAL_PID=$!
|
RSYNC_REAL_PID=$!
|
||||||
|
|
||||||
until check_pid_and_port $RSYNC_PID $RSYNC_REAL_PID $RSYNC_ADDR $RSYNC_PORT
|
until check_pid_and_port "$RSYNC_PID" "$RSYNC_REAL_PID" "$RSYNC_ADDR" "$RSYNC_PORT"
|
||||||
do
|
do
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
done
|
done
|
||||||
|
@ -7910,7 +7910,7 @@ uint32 ha_partition::calculate_key_hash_value(Field **field_array)
|
|||||||
case MYSQL_TYPE_BLOB:
|
case MYSQL_TYPE_BLOB:
|
||||||
case MYSQL_TYPE_VAR_STRING:
|
case MYSQL_TYPE_VAR_STRING:
|
||||||
case MYSQL_TYPE_GEOMETRY:
|
case MYSQL_TYPE_GEOMETRY:
|
||||||
/* fall through. */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
DBUG_ASSERT(0); // New type?
|
DBUG_ASSERT(0); // New type?
|
||||||
/* Fall through for default hashing (5.5). */
|
/* Fall through for default hashing (5.5). */
|
||||||
|
@ -807,6 +807,7 @@ static sp_head *sp_compile(THD *thd, String *defstr, sql_mode_t sql_mode,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sp= thd->lex->sphead;
|
sp= thd->lex->sphead;
|
||||||
|
sp->set_select_number(thd->select_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
thd->pop_internal_handler();
|
thd->pop_internal_handler();
|
||||||
|
@ -558,7 +558,7 @@ sp_head::sp_head(const Sp_handler *sph)
|
|||||||
m_defstr(null_clex_str),
|
m_defstr(null_clex_str),
|
||||||
m_sp_cache_version(0),
|
m_sp_cache_version(0),
|
||||||
m_creation_ctx(0),
|
m_creation_ctx(0),
|
||||||
unsafe_flags(0),
|
unsafe_flags(0), m_select_number(1),
|
||||||
m_created(0),
|
m_created(0),
|
||||||
m_modified(0),
|
m_modified(0),
|
||||||
m_recursion_level(0),
|
m_recursion_level(0),
|
||||||
@ -2028,8 +2028,26 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
|
|||||||
|
|
||||||
if (!err_status)
|
if (!err_status)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
Normally the counter is not reset between parsing and first execution,
|
||||||
|
but it is possible in case of error to have parsing on one CALL and
|
||||||
|
first execution (where VIEW will be parsed and added). So we store the
|
||||||
|
counter after parsing and restore it before execution just to avoid
|
||||||
|
repeating SELECT numbers.
|
||||||
|
*/
|
||||||
|
thd->select_number= m_select_number;
|
||||||
|
|
||||||
err_status= execute(thd, TRUE);
|
err_status= execute(thd, TRUE);
|
||||||
DBUG_PRINT("info", ("execute returned %d", (int) err_status));
|
DBUG_PRINT("info", ("execute returned %d", (int) err_status));
|
||||||
|
/*
|
||||||
|
This execution of the SP was aborted with an error (e.g. "Table not
|
||||||
|
found"). However it might still have consumed some numbers from the
|
||||||
|
thd->select_number counter. The next sp->exec() call must not use the
|
||||||
|
consumed numbers, so we remember the first free number (We know that
|
||||||
|
nobody will use it as this execution has stopped with an error).
|
||||||
|
*/
|
||||||
|
if (err_status)
|
||||||
|
set_select_number(thd->select_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (save_log_general)
|
if (save_log_general)
|
||||||
|
@ -236,6 +236,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
uint32 unsafe_flags;
|
uint32 unsafe_flags;
|
||||||
|
|
||||||
|
uint m_select_number;
|
||||||
public:
|
public:
|
||||||
inline Stored_program_creation_ctx *get_creation_ctx()
|
inline Stored_program_creation_ctx *get_creation_ctx()
|
||||||
{
|
{
|
||||||
@ -818,6 +819,8 @@ public:
|
|||||||
|
|
||||||
sp_pcontext *get_parse_context() { return m_pcont; }
|
sp_pcontext *get_parse_context() { return m_pcont; }
|
||||||
|
|
||||||
|
void set_select_number(uint num) { m_select_number= num; }
|
||||||
|
|
||||||
bool check_execute_access(THD *thd) const;
|
bool check_execute_access(THD *thd) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -716,6 +716,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
|||||||
/* statement id */ 0),
|
/* statement id */ 0),
|
||||||
rli_fake(0), rgi_fake(0), rgi_slave(NULL),
|
rli_fake(0), rgi_fake(0), rgi_slave(NULL),
|
||||||
protocol_text(this), protocol_binary(this),
|
protocol_text(this), protocol_binary(this),
|
||||||
|
m_current_stage_key(0),
|
||||||
in_sub_stmt(0), log_all_errors(0),
|
in_sub_stmt(0), log_all_errors(0),
|
||||||
binlog_unsafe_warning_flags(0),
|
binlog_unsafe_warning_flags(0),
|
||||||
binlog_table_maps(0),
|
binlog_table_maps(0),
|
||||||
|
@ -1173,6 +1173,7 @@ static int execute_ddl_log_action(THD *thd, DDL_LOG_ENTRY *ddl_log_entry)
|
|||||||
action in the log entry by stepping up the phase.
|
action in the log entry by stepping up the phase.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
/* fall through */
|
||||||
case DDL_LOG_RENAME_ACTION:
|
case DDL_LOG_RENAME_ACTION:
|
||||||
{
|
{
|
||||||
error= TRUE;
|
error= TRUE;
|
||||||
|
@ -1173,28 +1173,20 @@ buf_page_is_corrupted(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef UNIV_INNOCHECKSUM
|
#ifndef UNIV_INNOCHECKSUM
|
||||||
|
/** Dump a page to stderr.
|
||||||
/** Prints a page to stderr.
|
@param[in] read_buf database page
|
||||||
@param[in] read_buf a database page
|
@param[in] page_size page size */
|
||||||
@param[in] page_size page size
|
UNIV_INTERN
|
||||||
@param[in] flags 0 or BUF_PAGE_PRINT_NO_CRASH or
|
|
||||||
BUF_PAGE_PRINT_NO_FULL */
|
|
||||||
void
|
void
|
||||||
buf_page_print(
|
buf_page_print(const byte* read_buf, const page_size_t& page_size)
|
||||||
const byte* read_buf,
|
|
||||||
const page_size_t& page_size,
|
|
||||||
ulint flags)
|
|
||||||
{
|
{
|
||||||
dict_index_t* index;
|
dict_index_t* index;
|
||||||
|
|
||||||
if (!(flags & BUF_PAGE_PRINT_NO_FULL)) {
|
ib::info() << "Page dump in ascii and hex ("
|
||||||
|
<< page_size.physical() << " bytes):";
|
||||||
|
|
||||||
ib::info() << "Page dump in ascii and hex ("
|
ut_print_buf(stderr, read_buf, page_size.physical());
|
||||||
<< page_size.physical() << " bytes):";
|
fputs("\nInnoDB: End of page dump\n", stderr);
|
||||||
|
|
||||||
ut_print_buf(stderr, read_buf, page_size.physical());
|
|
||||||
fputs("\nInnoDB: End of page dump\n", stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (page_size.is_compressed()) {
|
if (page_size.is_compressed()) {
|
||||||
/* Print compressed page. */
|
/* Print compressed page. */
|
||||||
@ -1359,8 +1351,6 @@ buf_page_print(
|
|||||||
stderr);
|
stderr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef PFS_GROUP_BUFFER_SYNC
|
# ifdef PFS_GROUP_BUFFER_SYNC
|
||||||
@ -5984,8 +5974,7 @@ database_corrupted:
|
|||||||
<< ". You may have to recover from "
|
<< ". You may have to recover from "
|
||||||
<< "a backup.";
|
<< "a backup.";
|
||||||
|
|
||||||
buf_page_print(frame, bpage->size,
|
buf_page_print(frame, bpage->size);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
|
|
||||||
ib::info()
|
ib::info()
|
||||||
<< "It is also possible that your"
|
<< "It is also possible that your"
|
||||||
|
@ -827,7 +827,7 @@ buf_dblwr_assert_on_corrupt_block(
|
|||||||
/*==============================*/
|
/*==============================*/
|
||||||
const buf_block_t* block) /*!< in: block to check */
|
const buf_block_t* block) /*!< in: block to check */
|
||||||
{
|
{
|
||||||
buf_page_print(block->frame, univ_page_size, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(block->frame, univ_page_size);
|
||||||
|
|
||||||
ib::fatal() << "Apparent corruption of an index page "
|
ib::fatal() << "Apparent corruption of an index page "
|
||||||
<< block->page.id
|
<< block->page.id
|
||||||
|
@ -698,11 +698,12 @@ fil_space_encrypt(
|
|||||||
fprintf(stderr, "ok %d corrupted %d corrupted1 %d err %d different %d\n",
|
fprintf(stderr, "ok %d corrupted %d corrupted1 %d err %d different %d\n",
|
||||||
ok , corrupted, corrupted1, err, different);
|
ok , corrupted, corrupted1, err, different);
|
||||||
fprintf(stderr, "src_frame\n");
|
fprintf(stderr, "src_frame\n");
|
||||||
buf_page_print(src_frame, page_size, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(src_frame, page_size);
|
||||||
fprintf(stderr, "encrypted_frame\n");
|
fprintf(stderr, "encrypted_frame\n");
|
||||||
buf_page_print(tmp, page_size, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(tmp, page_size);
|
||||||
fprintf(stderr, "decrypted_frame\n");
|
fprintf(stderr, "decrypted_frame\n");
|
||||||
buf_page_print(tmp_mem, page_size, 0);
|
buf_page_print(tmp_mem, page_size);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(tmp_mem);
|
free(tmp_mem);
|
||||||
|
@ -313,7 +313,8 @@ fil_compress_page(
|
|||||||
|
|
||||||
if (buf_page_is_corrupted(false, uncomp_page, univ_page_size,
|
if (buf_page_is_corrupted(false, uncomp_page, univ_page_size,
|
||||||
space)) {
|
space)) {
|
||||||
buf_page_print(uncomp_page, univ_page_size, 0);
|
buf_page_print(uncomp_page, univ_page_size);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_free(comp_page);
|
ut_free(comp_page);
|
||||||
@ -648,6 +649,7 @@ err_exit:
|
|||||||
<< " compression method: "
|
<< " compression method: "
|
||||||
<< fil_get_compression_alg_name(compression_alg) << ".";
|
<< fil_get_compression_alg_name(compression_alg) << ".";
|
||||||
|
|
||||||
buf_page_print(buf, univ_page_size, 0);
|
buf_page_print(buf, univ_page_size);
|
||||||
fil_space_release_for_io(space);
|
fil_space_release_for_io(space);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
@ -893,24 +893,13 @@ buf_print(void);
|
|||||||
/*============*/
|
/*============*/
|
||||||
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
|
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
|
||||||
|
|
||||||
enum buf_page_print_flags {
|
/** Dump a page to stderr.
|
||||||
/** Do not crash at the end of buf_page_print(). */
|
@param[in] read_buf database page
|
||||||
BUF_PAGE_PRINT_NO_CRASH = 1,
|
@param[in] page_size page size */
|
||||||
/** Do not print the full page dump. */
|
UNIV_INTERN
|
||||||
BUF_PAGE_PRINT_NO_FULL = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Prints a page to stderr.
|
|
||||||
@param[in] read_buf a database page
|
|
||||||
@param[in] page_size page size
|
|
||||||
@param[in] flags 0 or BUF_PAGE_PRINT_NO_CRASH or
|
|
||||||
BUF_PAGE_PRINT_NO_FULL */
|
|
||||||
void
|
void
|
||||||
buf_page_print(
|
buf_page_print(const byte* read_buf, const page_size_t& page_size)
|
||||||
const byte* read_buf,
|
ATTRIBUTE_COLD __attribute__((nonnull));
|
||||||
const page_size_t& page_size,
|
|
||||||
ulint flags);
|
|
||||||
|
|
||||||
/********************************************************************//**
|
/********************************************************************//**
|
||||||
Decompress a block.
|
Decompress a block.
|
||||||
@return TRUE if successful */
|
@return TRUE if successful */
|
||||||
|
@ -3461,6 +3461,7 @@ recv_reset_logs(
|
|||||||
log_sys->next_checkpoint_no = 0;
|
log_sys->next_checkpoint_no = 0;
|
||||||
log_sys->last_checkpoint_lsn = 0;
|
log_sys->last_checkpoint_lsn = 0;
|
||||||
|
|
||||||
|
memset(log_sys->buf, 0, log_sys->buf_size);
|
||||||
log_block_init(log_sys->buf, log_sys->lsn);
|
log_block_init(log_sys->buf, log_sys->lsn);
|
||||||
log_block_set_first_rec_group(log_sys->buf, LOG_BLOCK_HDR_SIZE);
|
log_block_set_first_rec_group(log_sys->buf, LOG_BLOCK_HDR_SIZE);
|
||||||
|
|
||||||
|
@ -1796,6 +1796,7 @@ rec_loop:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1856,6 +1857,7 @@ skip_lock:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4606,6 +4608,7 @@ wait_table_again:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4688,6 +4691,7 @@ rec_loop:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4949,6 +4953,7 @@ no_gap_lock:
|
|||||||
prebuilt->new_rec_locks = 1;
|
prebuilt->new_rec_locks = 1;
|
||||||
}
|
}
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
case DB_LOCK_WAIT:
|
case DB_LOCK_WAIT:
|
||||||
|
@ -146,7 +146,10 @@ ADD_CONVENIENCE_LIBRARY(rocksdb_aux_lib
|
|||||||
ADD_DEPENDENCIES(rocksdb_aux_lib GenError)
|
ADD_DEPENDENCIES(rocksdb_aux_lib GenError)
|
||||||
|
|
||||||
# MARIAROCKS-TODO: how to properly depend on -lrt ?
|
# MARIAROCKS-TODO: how to properly depend on -lrt ?
|
||||||
TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY} -lrt)
|
TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY})
|
||||||
|
if (UNIX AND NOT APPLE)
|
||||||
|
TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt)
|
||||||
|
endif()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(rocksdb rocksdb_aux_lib)
|
TARGET_LINK_LIBRARIES(rocksdb rocksdb_aux_lib)
|
||||||
|
|
||||||
@ -182,7 +185,9 @@ ENDIF()
|
|||||||
# ADD_SUBDIRECTORY(unittest)
|
# ADD_SUBDIRECTORY(unittest)
|
||||||
#ENDIF()
|
#ENDIF()
|
||||||
|
|
||||||
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt")
|
if (UNIX AND NOT APPLE)
|
||||||
|
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt")
|
||||||
|
endif()
|
||||||
|
|
||||||
ADD_LIBRARY(rocksdb_tools STATIC
|
ADD_LIBRARY(rocksdb_tools STATIC
|
||||||
rocksdb/tools/ldb_tool.cc
|
rocksdb/tools/ldb_tool.cc
|
||||||
|
@ -173,7 +173,7 @@ Rdb_ddl_manager ddl_manager;
|
|||||||
const char *m_mysql_gtid;
|
const char *m_mysql_gtid;
|
||||||
Rdb_binlog_manager binlog_manager;
|
Rdb_binlog_manager binlog_manager;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
Rdb_io_watchdog *io_watchdog = nullptr;
|
Rdb_io_watchdog *io_watchdog = nullptr;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -554,7 +554,7 @@ static void rocksdb_set_io_write_timeout(
|
|||||||
void *const var_ptr MY_ATTRIBUTE((__unused__)), const void *const save) {
|
void *const var_ptr MY_ATTRIBUTE((__unused__)), const void *const save) {
|
||||||
DBUG_ASSERT(save != nullptr);
|
DBUG_ASSERT(save != nullptr);
|
||||||
DBUG_ASSERT(rdb != nullptr);
|
DBUG_ASSERT(rdb != nullptr);
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
DBUG_ASSERT(io_watchdog != nullptr);
|
DBUG_ASSERT(io_watchdog != nullptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -563,7 +563,7 @@ static void rocksdb_set_io_write_timeout(
|
|||||||
const uint32_t new_val = *static_cast<const uint32_t *>(save);
|
const uint32_t new_val = *static_cast<const uint32_t *>(save);
|
||||||
|
|
||||||
rocksdb_io_write_timeout_secs = new_val;
|
rocksdb_io_write_timeout_secs = new_val;
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
|
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
|
||||||
#endif
|
#endif
|
||||||
RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
|
RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
|
||||||
@ -3984,7 +3984,7 @@ static int rocksdb_init_func(void *const p) {
|
|||||||
directories.push_back(myrocks::rocksdb_wal_dir);
|
directories.push_back(myrocks::rocksdb_wal_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
io_watchdog = new Rdb_io_watchdog(directories);
|
io_watchdog = new Rdb_io_watchdog(directories);
|
||||||
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
|
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
|
||||||
#endif
|
#endif
|
||||||
@ -4076,7 +4076,7 @@ static int rocksdb_done_func(void *const p) {
|
|||||||
delete commit_latency_stats;
|
delete commit_latency_stats;
|
||||||
commit_latency_stats = nullptr;
|
commit_latency_stats = nullptr;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
delete io_watchdog;
|
delete io_watchdog;
|
||||||
io_watchdog = nullptr;
|
io_watchdog = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,6 +21,7 @@ b CHAR(30),
|
|||||||
PRIMARY KEY(pk) COMMENT "rev:cf1",
|
PRIMARY KEY(pk) COMMENT "rev:cf1",
|
||||||
KEY(a)
|
KEY(a)
|
||||||
) COLLATE 'latin1_bin' PARTITION BY KEY() PARTITIONS 4;
|
) COLLATE 'latin1_bin' PARTITION BY KEY() PARTITIONS 4;
|
||||||
|
connect other,localhost,root,,;
|
||||||
set session transaction isolation level repeatable read;
|
set session transaction isolation level repeatable read;
|
||||||
select * from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
|
select * from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
|
||||||
STAT_TYPE VALUE
|
STAT_TYPE VALUE
|
||||||
@ -29,6 +30,7 @@ start transaction with consistent snapshot;
|
|||||||
select * from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
|
select * from information_schema.rocksdb_dbstats where stat_type='DB_NUM_SNAPSHOTS';
|
||||||
STAT_TYPE VALUE
|
STAT_TYPE VALUE
|
||||||
DB_NUM_SNAPSHOTS 1
|
DB_NUM_SNAPSHOTS 1
|
||||||
|
connection default;
|
||||||
set rocksdb_bulk_load=1;
|
set rocksdb_bulk_load=1;
|
||||||
set rocksdb_bulk_load_size=100000;
|
set rocksdb_bulk_load_size=100000;
|
||||||
LOAD DATA INFILE <input_file> INTO TABLE t1;
|
LOAD DATA INFILE <input_file> INTO TABLE t1;
|
||||||
@ -79,4 +81,5 @@ count(b)
|
|||||||
5000000
|
5000000
|
||||||
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
|
longfilenamethatvalidatesthatthiswillgetdeleted.bulk_load.tmp
|
||||||
test.bulk_load.tmp
|
test.bulk_load.tmp
|
||||||
|
disconnect other;
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/* Rdb_io_watchdog doesn't work on Windows [yet] */
|
/* Rdb_io_watchdog doesn't work on Windows [yet] */
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
|
|
||||||
namespace myrocks {
|
namespace myrocks {
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
namespace myrocks {
|
namespace myrocks {
|
||||||
|
|
||||||
// Rdb_io_watchdog does not support Windows ATM.
|
// Rdb_io_watchdog does not support Windows ATM.
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
|
|
||||||
class Rdb_io_watchdog {
|
class Rdb_io_watchdog {
|
||||||
const int RDB_IO_WRITE_BUFFER_SIZE = 4096;
|
const int RDB_IO_WRITE_BUFFER_SIZE = 4096;
|
||||||
|
@ -77,10 +77,9 @@ btr_corruption_report(
|
|||||||
index->name, index->table_name);
|
index->name, index->table_name);
|
||||||
if (block->page.zip.data) {
|
if (block->page.zip.data) {
|
||||||
buf_page_print(block->page.zip.data,
|
buf_page_print(block->page.zip.data,
|
||||||
buf_block_get_zip_size(block),
|
buf_block_get_zip_size(block));
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
buf_page_print(buf_nonnull_block_get_frame(block), 0, 0);
|
buf_page_print(buf_nonnull_block_get_frame(block), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
@ -1601,11 +1600,9 @@ btr_page_get_father_node_ptr_func(
|
|||||||
if (btr_node_ptr_get_child_page_no(node_ptr, offsets) != page_no) {
|
if (btr_node_ptr_get_child_page_no(node_ptr, offsets) != page_no) {
|
||||||
rec_t* print_rec;
|
rec_t* print_rec;
|
||||||
fputs("InnoDB: Dump of the child page:\n", stderr);
|
fputs("InnoDB: Dump of the child page:\n", stderr);
|
||||||
buf_page_print(page_align(user_rec), 0,
|
buf_page_print(page_align(user_rec), 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
fputs("InnoDB: Dump of the parent page:\n", stderr);
|
fputs("InnoDB: Dump of the parent page:\n", stderr);
|
||||||
buf_page_print(page_align(node_ptr), 0,
|
buf_page_print(page_align(node_ptr), 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
|
|
||||||
fputs("InnoDB: Corruption of an index tree: table ", stderr);
|
fputs("InnoDB: Corruption of an index tree: table ", stderr);
|
||||||
ut_print_name(stderr, NULL, TRUE, index->table_name);
|
ut_print_name(stderr, NULL, TRUE, index->table_name);
|
||||||
@ -2080,8 +2077,8 @@ btr_page_reorganize_low(
|
|||||||
max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1);
|
max_ins_size2 = page_get_max_insert_size_after_reorganize(page, 1);
|
||||||
|
|
||||||
if (data_size1 != data_size2 || max_ins_size1 != max_ins_size2) {
|
if (data_size1 != data_size2 || max_ins_size1 != max_ins_size2) {
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(temp_page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(temp_page, 0);
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Error: page old data size %lu"
|
"InnoDB: Error: page old data size %lu"
|
||||||
@ -4609,7 +4606,7 @@ btr_index_rec_validate(
|
|||||||
(ulong) rec_get_n_fields_old(rec), (ulong) n);
|
(ulong) rec_get_n_fields_old(rec), (ulong) n);
|
||||||
|
|
||||||
if (dump_on_error) {
|
if (dump_on_error) {
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
fputs("InnoDB: corrupt record ", stderr);
|
fputs("InnoDB: corrupt record ", stderr);
|
||||||
rec_print_old(stderr, rec);
|
rec_print_old(stderr, rec);
|
||||||
@ -4647,8 +4644,7 @@ btr_index_rec_validate(
|
|||||||
(ulong) i, (ulong) len, (ulong) fixed_size);
|
(ulong) i, (ulong) len, (ulong) fixed_size);
|
||||||
|
|
||||||
if (dump_on_error) {
|
if (dump_on_error) {
|
||||||
buf_page_print(page, 0,
|
buf_page_print(page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
|
|
||||||
fputs("InnoDB: corrupt record ", stderr);
|
fputs("InnoDB: corrupt record ", stderr);
|
||||||
rec_print_new(stderr, rec, offsets);
|
rec_print_new(stderr, rec, offsets);
|
||||||
@ -4925,8 +4921,8 @@ loop:
|
|||||||
btr_validate_report2(index, level, block, right_block);
|
btr_validate_report2(index, level, block, right_block);
|
||||||
fputs("InnoDB: broken FIL_PAGE_NEXT"
|
fputs("InnoDB: broken FIL_PAGE_NEXT"
|
||||||
" or FIL_PAGE_PREV links\n", stderr);
|
" or FIL_PAGE_PREV links\n", stderr);
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(right_page, 0);
|
||||||
|
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
@ -4934,8 +4930,8 @@ loop:
|
|||||||
if (page_is_comp(right_page) != page_is_comp(page)) {
|
if (page_is_comp(right_page) != page_is_comp(page)) {
|
||||||
btr_validate_report2(index, level, block, right_block);
|
btr_validate_report2(index, level, block, right_block);
|
||||||
fputs("InnoDB: 'compact' flag mismatch\n", stderr);
|
fputs("InnoDB: 'compact' flag mismatch\n", stderr);
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(right_page, 0);
|
||||||
|
|
||||||
ret = false;
|
ret = false;
|
||||||
|
|
||||||
@ -4957,8 +4953,8 @@ loop:
|
|||||||
fputs("InnoDB: records in wrong order"
|
fputs("InnoDB: records in wrong order"
|
||||||
" on adjacent pages\n", stderr);
|
" on adjacent pages\n", stderr);
|
||||||
|
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(right_page, 0);
|
||||||
|
|
||||||
fputs("InnoDB: record ", stderr);
|
fputs("InnoDB: record ", stderr);
|
||||||
rec = page_rec_get_prev(page_get_supremum_rec(page));
|
rec = page_rec_get_prev(page_get_supremum_rec(page));
|
||||||
@ -5006,8 +5002,8 @@ loop:
|
|||||||
fputs("InnoDB: node pointer to the page is wrong\n",
|
fputs("InnoDB: node pointer to the page is wrong\n",
|
||||||
stderr);
|
stderr);
|
||||||
|
|
||||||
buf_page_print(father_page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(father_page, 0);
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
fputs("InnoDB: node ptr ", stderr);
|
fputs("InnoDB: node ptr ", stderr);
|
||||||
rec_print(stderr, node_ptr, index);
|
rec_print(stderr, node_ptr, index);
|
||||||
@ -5039,10 +5035,8 @@ loop:
|
|||||||
|
|
||||||
btr_validate_report1(index, level, block);
|
btr_validate_report1(index, level, block);
|
||||||
|
|
||||||
buf_page_print(father_page, 0,
|
buf_page_print(father_page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
|
|
||||||
fputs("InnoDB: Error: node ptrs differ"
|
fputs("InnoDB: Error: node ptrs differ"
|
||||||
" on levels > 0\n"
|
" on levels > 0\n"
|
||||||
@ -5087,15 +5081,9 @@ loop:
|
|||||||
btr_validate_report1(index, level,
|
btr_validate_report1(index, level,
|
||||||
block);
|
block);
|
||||||
|
|
||||||
buf_page_print(
|
buf_page_print(father_page, 0);
|
||||||
father_page, 0,
|
buf_page_print(page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(right_page, 0);
|
||||||
buf_page_print(
|
|
||||||
page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
buf_page_print(
|
|
||||||
right_page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
page_t* right_father_page
|
page_t* right_father_page
|
||||||
@ -5113,18 +5101,10 @@ loop:
|
|||||||
btr_validate_report1(index, level,
|
btr_validate_report1(index, level,
|
||||||
block);
|
block);
|
||||||
|
|
||||||
buf_page_print(
|
buf_page_print(father_page, 0);
|
||||||
father_page, 0,
|
buf_page_print(right_father_page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(
|
buf_page_print(right_page, 0);
|
||||||
right_father_page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
buf_page_print(
|
|
||||||
page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
buf_page_print(
|
|
||||||
right_page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page_get_page_no(right_father_page)
|
if (page_get_page_no(right_father_page)
|
||||||
@ -5138,18 +5118,10 @@ loop:
|
|||||||
btr_validate_report1(index, level,
|
btr_validate_report1(index, level,
|
||||||
block);
|
block);
|
||||||
|
|
||||||
buf_page_print(
|
buf_page_print(father_page, 0);
|
||||||
father_page, 0,
|
buf_page_print(right_father_page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
buf_page_print(
|
buf_page_print(right_page, 0);
|
||||||
right_father_page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
buf_page_print(
|
|
||||||
page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
buf_page_print(
|
|
||||||
right_page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2022,9 +2022,7 @@ btr_search_validate_one_table(
|
|||||||
(ulong) block->curr_left_side);
|
(ulong) block->curr_left_side);
|
||||||
|
|
||||||
if (n_page_dumps < 20) {
|
if (n_page_dumps < 20) {
|
||||||
buf_page_print(
|
buf_page_print(page, 0);
|
||||||
page, 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
n_page_dumps++;
|
n_page_dumps++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -956,19 +956,12 @@ buf_page_is_corrupted(
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************//**
|
/** Dump a page to stderr.
|
||||||
Prints a page to stderr. */
|
@param[in] read_buf database page
|
||||||
|
@param[in] zip_size compressed page size, or 0 for uncompressed */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
void
|
void
|
||||||
buf_page_print(
|
buf_page_print(const byte* read_buf, ulint zip_size)
|
||||||
/*===========*/
|
|
||||||
const byte* read_buf, /*!< in: a database page */
|
|
||||||
ulint zip_size, /*!< in: compressed page size, or
|
|
||||||
0 for uncompressed pages */
|
|
||||||
ulint flags) /*!< in: 0 or
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH or
|
|
||||||
BUF_PAGE_PRINT_NO_FULL */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
dict_index_t* index;
|
dict_index_t* index;
|
||||||
@ -979,14 +972,12 @@ buf_page_print(
|
|||||||
size = UNIV_PAGE_SIZE;
|
size = UNIV_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & BUF_PAGE_PRINT_NO_FULL)) {
|
ut_print_timestamp(stderr);
|
||||||
ut_print_timestamp(stderr);
|
fprintf(stderr,
|
||||||
fprintf(stderr,
|
" InnoDB: Page dump in ascii and hex (%lu bytes):\n",
|
||||||
" InnoDB: Page dump in ascii and hex (%lu bytes):\n",
|
size);
|
||||||
size);
|
ut_print_buf(stderr, read_buf, size);
|
||||||
ut_print_buf(stderr, read_buf, size);
|
fputs("\nInnoDB: End of page dump\n", stderr);
|
||||||
fputs("\nInnoDB: End of page dump\n", stderr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zip_size) {
|
if (zip_size) {
|
||||||
/* Print compressed page. */
|
/* Print compressed page. */
|
||||||
@ -1141,8 +1132,6 @@ buf_page_print(
|
|||||||
stderr);
|
stderr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
@ -4832,8 +4821,8 @@ database_corrupted:
|
|||||||
space->name,
|
space->name,
|
||||||
bpage->space, bpage->offset);
|
bpage->space, bpage->offset);
|
||||||
|
|
||||||
buf_page_print(frame, buf_page_get_zip_size(bpage),
|
buf_page_print(frame,
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_get_zip_size(bpage));
|
||||||
|
|
||||||
ib_logf(IB_LOG_LEVEL_INFO,
|
ib_logf(IB_LOG_LEVEL_INFO,
|
||||||
"It is also possible that your"
|
"It is also possible that your"
|
||||||
|
@ -800,7 +800,7 @@ buf_dblwr_assert_on_corrupt_block(
|
|||||||
/*==============================*/
|
/*==============================*/
|
||||||
const buf_block_t* block) /*!< in: block to check */
|
const buf_block_t* block) /*!< in: block to check */
|
||||||
{
|
{
|
||||||
buf_page_print(block->frame, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(block->frame, 0);
|
||||||
|
|
||||||
ut_print_timestamp(stderr);
|
ut_print_timestamp(stderr);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
@ -742,11 +742,12 @@ fil_space_encrypt(
|
|||||||
fprintf(stderr, "ok %d corrupted %d corrupted1 %d err %d different %d\n",
|
fprintf(stderr, "ok %d corrupted %d corrupted1 %d err %d different %d\n",
|
||||||
ok , corrupted, corrupted1, err, different);
|
ok , corrupted, corrupted1, err, different);
|
||||||
fprintf(stderr, "src_frame\n");
|
fprintf(stderr, "src_frame\n");
|
||||||
buf_page_print(src_frame, zip_size, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(src_frame, zip_size);
|
||||||
fprintf(stderr, "encrypted_frame\n");
|
fprintf(stderr, "encrypted_frame\n");
|
||||||
buf_page_print(tmp, zip_size, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(tmp, zip_size);
|
||||||
fprintf(stderr, "decrypted_frame\n");
|
fprintf(stderr, "decrypted_frame\n");
|
||||||
buf_page_print(tmp_mem, zip_size, 0);
|
buf_page_print(tmp_mem, zip_size);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(tmp_mem);
|
free(tmp_mem);
|
||||||
|
@ -397,7 +397,8 @@ fil_compress_page(
|
|||||||
fil_decompress_page(uncomp_page, comp_page, ulong(len), NULL);
|
fil_decompress_page(uncomp_page, comp_page, ulong(len), NULL);
|
||||||
|
|
||||||
if (buf_page_is_corrupted(false, uncomp_page, 0, space)) {
|
if (buf_page_is_corrupted(false, uncomp_page, 0, space)) {
|
||||||
buf_page_print(uncomp_page, 0, 0);
|
buf_page_print(uncomp_page, 0);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ut_free(comp_page);
|
ut_free(comp_page);
|
||||||
|
@ -4104,7 +4104,7 @@ ibuf_insert_to_index_page(
|
|||||||
"InnoDB: but the number of fields does not match!\n",
|
"InnoDB: but the number of fields does not match!\n",
|
||||||
stderr);
|
stderr);
|
||||||
dump:
|
dump:
|
||||||
buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
dtuple_print(stderr, entry);
|
dtuple_print(stderr, entry);
|
||||||
ut_ad(0);
|
ut_ad(0);
|
||||||
@ -4723,15 +4723,13 @@ ibuf_merge_or_delete_for_page(
|
|||||||
fputs("InnoDB: cannot retrieve bitmap page\n",
|
fputs("InnoDB: cannot retrieve bitmap page\n",
|
||||||
stderr);
|
stderr);
|
||||||
} else {
|
} else {
|
||||||
buf_page_print(bitmap_page, 0,
|
buf_page_print(bitmap_page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
}
|
}
|
||||||
ibuf_mtr_commit(&mtr);
|
ibuf_mtr_commit(&mtr);
|
||||||
|
|
||||||
fputs("\nInnoDB: Dump of the page:\n", stderr);
|
fputs("\nInnoDB: Dump of the page:\n", stderr);
|
||||||
|
|
||||||
buf_page_print(block->frame, 0,
|
buf_page_print(block->frame, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Error: corruption in the tablespace."
|
"InnoDB: Error: corruption in the tablespace."
|
||||||
|
@ -306,7 +306,7 @@ btr_node_ptr_get_child_page_no(
|
|||||||
"InnoDB: a nonsensical page number 0"
|
"InnoDB: a nonsensical page number 0"
|
||||||
" in a node ptr record at offset %lu\n",
|
" in a node ptr record at offset %lu\n",
|
||||||
(ulong) page_offset(rec));
|
(ulong) page_offset(rec));
|
||||||
buf_page_print(page_align(rec), 0, 0);
|
buf_page_print(page_align(rec), 0);
|
||||||
ut_ad(0);
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -758,26 +758,15 @@ buf_print(void);
|
|||||||
/*============*/
|
/*============*/
|
||||||
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
|
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
|
||||||
#endif /* !UNIV_HOTBACKUP */
|
#endif /* !UNIV_HOTBACKUP */
|
||||||
enum buf_page_print_flags {
|
|
||||||
/** Do not crash at the end of buf_page_print(). */
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH = 1,
|
|
||||||
/** Do not print the full page dump. */
|
|
||||||
BUF_PAGE_PRINT_NO_FULL = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
/********************************************************************//**
|
/** Dump a page to stderr.
|
||||||
Prints a page to stderr. */
|
@param[in] read_buf database page
|
||||||
|
@param[in] zip_size compressed page size, or 0 for uncompressed */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
void
|
void
|
||||||
buf_page_print(
|
buf_page_print(const byte* read_buf, ulint zip_size)
|
||||||
/*===========*/
|
|
||||||
const byte* read_buf, /*!< in: a database page */
|
|
||||||
ulint zip_size, /*!< in: compressed page size, or
|
|
||||||
0 for uncompressed pages */
|
|
||||||
ulint flags) /*!< in: 0 or
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH or
|
|
||||||
BUF_PAGE_PRINT_NO_FULL */
|
|
||||||
UNIV_COLD;
|
UNIV_COLD;
|
||||||
|
|
||||||
/********************************************************************//**
|
/********************************************************************//**
|
||||||
Decompress a block.
|
Decompress a block.
|
||||||
@return TRUE if successful */
|
@return TRUE if successful */
|
||||||
|
@ -771,7 +771,7 @@ page_rec_get_next_low(
|
|||||||
(void*) rec,
|
(void*) rec,
|
||||||
(ulong) page_get_space_id(page),
|
(ulong) page_get_space_id(page),
|
||||||
(ulong) page_get_page_no(page));
|
(ulong) page_get_page_no(page));
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
ut_error;
|
ut_error;
|
||||||
} else if (offs == 0) {
|
} else if (offs == 0) {
|
||||||
|
@ -1921,7 +1921,7 @@ lock_sec_rec_some_has_impl(
|
|||||||
|
|
||||||
} else if (!lock_check_trx_id_sanity(max_trx_id, rec, index, offsets)) {
|
} else if (!lock_check_trx_id_sanity(max_trx_id, rec, index, offsets)) {
|
||||||
|
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
/* The page is corrupt: try to avoid a crash by returning 0 */
|
/* The page is corrupt: try to avoid a crash by returning 0 */
|
||||||
trx_id = 0;
|
trx_id = 0;
|
||||||
|
@ -3564,6 +3564,7 @@ recv_reset_logs(
|
|||||||
|
|
||||||
log_sys->tracked_lsn = log_sys->lsn;
|
log_sys->tracked_lsn = log_sys->lsn;
|
||||||
|
|
||||||
|
memset(log_sys->buf, 0, log_sys->buf_size);
|
||||||
log_block_init(log_sys->buf, log_sys->lsn);
|
log_block_init(log_sys->buf, log_sys->lsn);
|
||||||
log_block_set_first_rec_group(log_sys->buf, LOG_BLOCK_HDR_SIZE);
|
log_block_set_first_rec_group(log_sys->buf, LOG_BLOCK_HDR_SIZE);
|
||||||
|
|
||||||
|
@ -903,7 +903,7 @@ page_cur_parse_insert_rec(
|
|||||||
ut_print_buf(stderr, ptr2, 300);
|
ut_print_buf(stderr, ptr2, 300);
|
||||||
putc('\n', stderr);
|
putc('\n', stderr);
|
||||||
|
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
ut_error;
|
ut_error;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ page_dir_find_owner_slot(
|
|||||||
fputs("\n"
|
fputs("\n"
|
||||||
"InnoDB: on that page!\n", stderr);
|
"InnoDB: on that page!\n", stderr);
|
||||||
|
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
|
||||||
ut_error;
|
ut_error;
|
||||||
}
|
}
|
||||||
@ -618,10 +618,8 @@ page_copy_rec_list_end_no_locks(
|
|||||||
/* Track an assertion failure reported on the mailing
|
/* Track an assertion failure reported on the mailing
|
||||||
list on June 18th, 2003 */
|
list on June 18th, 2003 */
|
||||||
|
|
||||||
buf_page_print(new_page, 0,
|
buf_page_print(new_page, 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
buf_page_print(page_align(rec), 0);
|
||||||
buf_page_print(page_align(rec), 0,
|
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
ut_print_timestamp(stderr);
|
ut_print_timestamp(stderr);
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@ -1953,7 +1951,8 @@ page_check_dir(
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Page directory corruption:"
|
"InnoDB: Page directory corruption:"
|
||||||
" infimum not pointed to\n");
|
" infimum not pointed to\n");
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UNIV_UNLIKELY(!page_rec_is_supremum_low(supremum_offs))) {
|
if (UNIV_UNLIKELY(!page_rec_is_supremum_low(supremum_offs))) {
|
||||||
@ -1961,7 +1960,8 @@ page_check_dir(
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Page directory corruption:"
|
"InnoDB: Page directory corruption:"
|
||||||
" supremum not pointed to\n");
|
" supremum not pointed to\n");
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !UNIV_HOTBACKUP */
|
#endif /* !UNIV_HOTBACKUP */
|
||||||
@ -2679,7 +2679,8 @@ func_exit2:
|
|||||||
(ulong) page_get_space_id(page),
|
(ulong) page_get_space_id(page),
|
||||||
(ulong) page_get_page_no(page),
|
(ulong) page_get_page_no(page),
|
||||||
index->name);
|
index->name);
|
||||||
buf_page_print(page, 0, 0);
|
buf_page_print(page, 0);
|
||||||
|
ut_ad(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
|
@ -1545,6 +1545,7 @@ rec_loop:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1603,6 +1604,7 @@ skip_lock:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4186,6 +4188,7 @@ wait_table_again:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4281,6 +4284,7 @@ rec_loop:
|
|||||||
switch (err) {
|
switch (err) {
|
||||||
case DB_SUCCESS_LOCKED_REC:
|
case DB_SUCCESS_LOCKED_REC:
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4323,8 +4327,7 @@ wrong_offs:
|
|||||||
if ((srv_force_recovery == 0 || moves_up == FALSE)
|
if ((srv_force_recovery == 0 || moves_up == FALSE)
|
||||||
&& srv_pass_corrupt_table <= 1) {
|
&& srv_pass_corrupt_table <= 1) {
|
||||||
ut_print_timestamp(stderr);
|
ut_print_timestamp(stderr);
|
||||||
buf_page_print(page_align(rec), 0,
|
buf_page_print(page_align(rec), 0);
|
||||||
BUF_PAGE_PRINT_NO_CRASH);
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\nInnoDB: rec address %p,"
|
"\nInnoDB: rec address %p,"
|
||||||
" buf block fix count %lu\n",
|
" buf block fix count %lu\n",
|
||||||
@ -4569,6 +4572,7 @@ no_gap_lock:
|
|||||||
prebuilt->new_rec_locks = 1;
|
prebuilt->new_rec_locks = 1;
|
||||||
}
|
}
|
||||||
err = DB_SUCCESS;
|
err = DB_SUCCESS;
|
||||||
|
/* fall through */
|
||||||
case DB_SUCCESS:
|
case DB_SUCCESS:
|
||||||
break;
|
break;
|
||||||
case DB_LOCK_WAIT:
|
case DB_LOCK_WAIT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user