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
be6307c0
Commit
be6307c0
authored
Feb 08, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.1 into 10.2
parents
5c057b3f
871f2a6e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
119 additions
and
20 deletions
+119
-20
mysql-test/r/dyncol.result
mysql-test/r/dyncol.result
+10
-0
mysql-test/suite/innodb/r/mvcc.result
mysql-test/suite/innodb/r/mvcc.result
+31
-0
mysql-test/suite/innodb/r/recovery_shutdown.result
mysql-test/suite/innodb/r/recovery_shutdown.result
+1
-0
mysql-test/suite/innodb/t/mvcc.test
mysql-test/suite/innodb/t/mvcc.test
+52
-0
mysql-test/suite/innodb/t/recovery_shutdown.test
mysql-test/suite/innodb/t/recovery_shutdown.test
+2
-0
mysql-test/t/dyncol.test
mysql-test/t/dyncol.test
+9
-0
mysys/ma_dyncol.c
mysys/ma_dyncol.c
+1
-1
storage/innobase/include/row0upd.h
storage/innobase/include/row0upd.h
+2
-2
storage/innobase/include/row0upd.ic
storage/innobase/include/row0upd.ic
+2
-3
storage/innobase/row/row0import.cc
storage/innobase/row/row0import.cc
+4
-9
storage/xtradb/include/row0upd.h
storage/xtradb/include/row0upd.h
+2
-2
storage/xtradb/include/row0upd.ic
storage/xtradb/include/row0upd.ic
+2
-2
storage/xtradb/row/row0import.cc
storage/xtradb/row/row0import.cc
+1
-1
No files found.
mysql-test/r/dyncol.result
View file @
be6307c0
...
...
@@ -1883,6 +1883,16 @@ SELECT COLUMN_JSON(COLUMN_CREATE('test','First line\nSecond line')) AS json;
json
{"test":"First line\u000ASecond line"}
#
# MDEV-15230: column_json breaks cyrillic in 10.1.31
#
set names utf8;
create table t1 (b blob);
insert into t1 values (column_create('description',column_create('title','Описание')));
select column_json(b) from t1;
column_json(b)
{"description":{"title":"Описание"}}
drop table t1;
#
# end of 10.0 tests
#
#
...
...
mysql-test/suite/innodb/r/mvcc.result
0 → 100644
View file @
be6307c0
SET @save_per_table= @@GLOBAL.innodb_file_per_table;
SET GLOBAL innodb_file_per_table= 1;
#
# MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES(0);
FLUSH TABLES t1 WITH READ LOCK;
UNLOCK TABLES;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connect con1,localhost,root,,;
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
connection default;
SELECT * FROM t1;
ERROR HY000: Table definition has changed, please retry transaction
COMMIT;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection con1;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 IMPORT TABLESPACE;
disconnect con1;
connection default;
# FIXME: Block this with ER_TABLE_DEF_CHANGED
SELECT * FROM t1;
a
COMMIT;
SELECT * FROM t1;
a
0
DROP TABLE t1;
SET GLOBAL innodb_file_per_table= @save_per_table;
mysql-test/suite/innodb/r/recovery_shutdown.result
View file @
be6307c0
...
...
@@ -61,4 +61,5 @@ INSERT INTO t1(a) SELECT NULL FROM t1;
connection default;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
CREATE TABLE u(a SERIAL) ENGINE=INNODB;
FLUSH TABLES;
DROP TABLE t,u;
mysql-test/suite/innodb/t/mvcc.test
0 → 100644
View file @
be6307c0
--
source
include
/
have_innodb
.
inc
SET
@
save_per_table
=
@@
GLOBAL
.
innodb_file_per_table
;
SET
GLOBAL
innodb_file_per_table
=
1
;
let
MYSQLD_DATADIR
=
`SELECT @@datadir`
;
--
echo
#
--
echo
# MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE
--
echo
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
0
);
FLUSH
TABLES
t1
WITH
READ
LOCK
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/innodb-util.pl"
;
ib_backup_tablespace
(
"test"
,
"t1"
);
EOF
UNLOCK
TABLES
;
START
TRANSACTION
WITH
CONSISTENT
SNAPSHOT
;
connect
(
con1
,
localhost
,
root
,,);
ALTER
TABLE
t1
FORCE
,
ALGORITHM
=
COPY
;
connection
default
;
--
error
ER_TABLE_DEF_CHANGED
SELECT
*
FROM
t1
;
COMMIT
;
START
TRANSACTION
WITH
CONSISTENT
SNAPSHOT
;
connection
con1
;
ALTER
TABLE
t1
DISCARD
TABLESPACE
;
perl
;
do
"
$ENV
{
MTR_SUITE_DIR
}
/include/innodb-util.pl"
;
ib_restore_tablespace
(
"test"
,
"t1"
);
EOF
ALTER
TABLE
t1
IMPORT
TABLESPACE
;
disconnect
con1
;
connection
default
;
--
echo
# FIXME: Block this with ER_TABLE_DEF_CHANGED
SELECT
*
FROM
t1
;
COMMIT
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
SET
GLOBAL
innodb_file_per_table
=
@
save_per_table
;
mysql-test/suite/innodb/t/recovery_shutdown.test
View file @
be6307c0
...
...
@@ -41,6 +41,8 @@ INSERT INTO t1(a) SELECT NULL FROM t1;
SET
GLOBAL
innodb_flush_log_at_trx_commit
=
1
;
CREATE
TABLE
u
(
a
SERIAL
)
ENGINE
=
INNODB
;
FLUSH
TABLES
;
--
let
$shutdown_timeout
=
0
--
source
include
/
restart_mysqld
.
inc
--
let
$shutdown_timeout
=
60
...
...
mysql-test/t/dyncol.test
View file @
be6307c0
...
...
@@ -928,6 +928,15 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
SELECT
COLUMN_JSON
(
COLUMN_CREATE
(
'test'
,
'"\\\t\n\Z'
))
AS
json
;
SELECT
COLUMN_JSON
(
COLUMN_CREATE
(
'test'
,
'First line\nSecond line'
))
AS
json
;
--
echo
#
--
echo
# MDEV-15230: column_json breaks cyrillic in 10.1.31
--
echo
#
set
names
utf8
;
create
table
t1
(
b
blob
);
insert
into
t1
values
(
column_create
(
'description'
,
column_create
(
'title'
,
'Описание'
)));
select
column_json
(
b
)
from
t1
;
drop
table
t1
;
--
echo
#
--
echo
# end of 10.0 tests
--
echo
#
...
...
mysys/ma_dyncol.c
View file @
be6307c0
...
...
@@ -3833,7 +3833,7 @@ my_bool dynstr_append_json_quoted(DYNAMIC_STRING *str,
for
(
i
=
0
;
i
<
len
;
i
++
)
{
register
char
c
=
append
[
i
];
if
(
unlikely
(
c
<=
0x1F
))
if
(
unlikely
(
((
uchar
)
c
)
<=
0x1F
))
{
if
(
lim
<
5
)
{
...
...
storage/innobase/include/row0upd.h
View file @
be6307c0
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2018, MariaDB Corporation.
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
...
...
@@ -126,8 +127,7 @@ row_upd_rec_sys_fields(
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
,
/*!< in: rec_get_offsets(rec, index) */
const
trx_t
*
trx
,
/*!< in: transaction */
roll_ptr_t
roll_ptr
);
/*!< in: roll ptr of the undo log record,
can be 0 during IMPORT */
roll_ptr_t
roll_ptr
);
/*!< in: DB_ROLL_PTR to the undo log */
/*********************************************************************//**
Sets the trx id or roll ptr field of a clustered index entry. */
void
...
...
storage/innobase/include/row0upd.ic
View file @
be6307c0
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
Copyright (c) 2017,
2018,
MariaDB Corporation.
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
...
...
@@ -165,8 +165,7 @@ row_upd_rec_sys_fields(
dict_index_t* index, /*!< in: clustered index */
const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */
const trx_t* trx, /*!< in: transaction */
roll_ptr_t roll_ptr)/*!< in: roll ptr of the undo log record,
can be 0 during IMPORT */
roll_ptr_t roll_ptr)/*!< in: DB_ROLL_PTR to the undo log */
{
ut_ad(dict_index_is_clust(index));
ut_ad(rec_offs_validate(rec, index, offsets));
...
...
storage/innobase/row/row0import.cc
View file @
be6307c0
...
...
@@ -897,13 +897,11 @@ class PageConverter : public AbstractCallback {
@param index the index being converted
@param rec record to update
@param offsets column offsets for the record
@param deleted true if row is delete marked
@return DB_SUCCESS or error code. */
dberr_t
adjust_cluster_record
(
const
dict_index_t
*
index
,
rec_t
*
rec
,
const
ulint
*
offsets
,
bool
deleted
)
UNIV_NOTHROW
;
const
ulint
*
offsets
)
UNIV_NOTHROW
;
/** Find an index with the matching id.
@return row_index_t* instance or 0 */
...
...
@@ -1675,14 +1673,12 @@ PageConverter::purge(const ulint* offsets) UNIV_NOTHROW
/** Adjust the BLOB references and sys fields for the current record.
@param rec record to update
@param offsets column offsets for the record
@param deleted true if row is delete marked
@return DB_SUCCESS or error code. */
dberr_t
PageConverter
::
adjust_cluster_record
(
const
dict_index_t
*
index
,
rec_t
*
rec
,
const
ulint
*
offsets
,
bool
deleted
)
UNIV_NOTHROW
const
ulint
*
offsets
)
UNIV_NOTHROW
{
dberr_t
err
;
...
...
@@ -1694,7 +1690,7 @@ PageConverter::adjust_cluster_record(
row_upd_rec_sys_fields
(
rec
,
m_page_zip_ptr
,
m_cluster_index
,
m_offsets
,
m_trx
,
0
);
m_trx
,
roll_ptr_t
(
1
)
<<
ROLL_PTR_INSERT_FLAG_POS
);
}
return
(
err
);
...
...
@@ -1737,8 +1733,7 @@ PageConverter::update_records(
if
(
clust_index
)
{
dberr_t
err
=
adjust_cluster_record
(
m_index
->
m_srv_index
,
rec
,
m_offsets
,
deleted
);
m_index
->
m_srv_index
,
rec
,
m_offsets
);
if
(
err
!=
DB_SUCCESS
)
{
return
(
err
);
...
...
storage/xtradb/include/row0upd.h
View file @
be6307c0
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2018, MariaDB Corporation.
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
...
...
@@ -119,8 +120,7 @@ row_upd_rec_sys_fields(
dict_index_t
*
index
,
/*!< in: clustered index */
const
ulint
*
offsets
,
/*!< in: rec_get_offsets(rec, index) */
const
trx_t
*
trx
,
/*!< in: transaction */
roll_ptr_t
roll_ptr
);
/*!< in: roll ptr of the undo log record,
can be 0 during IMPORT */
roll_ptr_t
roll_ptr
);
/*!< in: DB_ROLL_PTR to the undo log */
/*********************************************************************//**
Sets the trx id or roll ptr field of a clustered index entry. */
UNIV_INTERN
...
...
storage/xtradb/include/row0upd.ic
View file @
be6307c0
/*****************************************************************************
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2018, MariaDB Corporation.
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
...
...
@@ -153,8 +154,7 @@ row_upd_rec_sys_fields(
dict_index_t* index, /*!< in: clustered index */
const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */
const trx_t* trx, /*!< in: transaction */
roll_ptr_t roll_ptr)/*!< in: roll ptr of the undo log record,
can be 0 during IMPORT */
roll_ptr_t roll_ptr)/*!< in: DB_ROLL_PTR to the undo log */
{
ut_ad(dict_index_is_clust(index));
ut_ad(rec_offs_validate(rec, index, offsets));
...
...
storage/xtradb/row/row0import.cc
View file @
be6307c0
...
...
@@ -1770,7 +1770,7 @@ PageConverter::adjust_cluster_record(
row_upd_rec_sys_fields
(
rec
,
m_page_zip_ptr
,
m_cluster_index
,
m_offsets
,
m_trx
,
0
);
m_trx
,
roll_ptr_t
(
1
)
<<
55
);
}
return
(
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