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
862af4d2
Commit
862af4d2
authored
Nov 07, 2018
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into 10.3
parents
54b2e1c1
e82ebb8f
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
149 additions
and
46 deletions
+149
-46
client/mysqltest.cc
client/mysqltest.cc
+1
-1
mysql-test/lib/v1/mysql-test-run.pl
mysql-test/lib/v1/mysql-test-run.pl
+1
-1
mysql-test/main/auto_increment_ranges_innodb.result
mysql-test/main/auto_increment_ranges_innodb.result
+14
-0
mysql-test/main/auto_increment_ranges_innodb.test
mysql-test/main/auto_increment_ranges_innodb.test
+13
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-1
mysql-test/suite/encryption/r/innodb-encryption-alter.result
mysql-test/suite/encryption/r/innodb-encryption-alter.result
+37
-0
mysql-test/suite/encryption/t/innodb-encryption-alter.test
mysql-test/suite/encryption/t/innodb-encryption-alter.test
+24
-0
mysql-test/suite/rpl/disabled.def
mysql-test/suite/rpl/disabled.def
+1
-0
mysql-test/suite/rpl/r/rpl_old_master.result
mysql-test/suite/rpl/r/rpl_old_master.result
+3
-0
mysql-test/suite/rpl/t/rpl_old_master.test
mysql-test/suite/rpl/t/rpl_old_master.test
+8
-0
mysys/mf_iocache.c
mysys/mf_iocache.c
+4
-0
mysys/my_pread.c
mysys/my_pread.c
+19
-7
sql/slave.cc
sql/slave.cc
+5
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+11
-24
storage/innobase/handler/ha_innodb.h
storage/innobase/handler/ha_innodb.h
+2
-5
storage/rocksdb/mysql-test/rocksdb/t/disabled.def
storage/rocksdb/mysql-test/rocksdb/t/disabled.def
+1
-0
vio/viossl.c
vio/viossl.c
+3
-7
No files found.
client/mysqltest.cc
View file @
862af4d2
...
...
@@ -20,7 +20,7 @@
Tool used for executing a .test file
See the "MySQL Test framework manual" for more information
http
://dev.mysql.com/doc/mysqltest/en/index.html
http
s://mariadb.com/kb/en/library/mysqltest/
Please keep the test framework tools identical in all versions!
...
...
mysql-test/lib/v1/mysql-test-run.pl
View file @
862af4d2
...
...
@@ -23,7 +23,7 @@
# Tool used for executing a suite of .test file
#
# See the "MySQL Test framework manual" for more information
# http
://dev.mysql.com/doc/mysqltest/en/index.html
# http
s://mariadb.com/kb/en/library/mysqltest/
#
# Please keep the test framework tools identical in all versions!
#
...
...
mysql-test/main/auto_increment_ranges_innodb.result
View file @
862af4d2
...
...
@@ -264,3 +264,17 @@ delete from t1 where a=32767;
insert into t1 values(NULL);
ERROR 22003: Out of range value for column 'a' at row 1
drop table t1;
create table t1 (pk int auto_increment primary key, f varchar(20));
insert t1 (f) values ('a'), ('b'), ('c'), ('d');
select null, f into outfile 'load.data' from t1 limit 1;
load data infile 'load.data' into table t1;
insert t1 (f) values ('<===');
select * from t1;
pk f
1 a
2 b
3 c
4 d
5 a
6 <===
drop table t1;
mysql-test/main/auto_increment_ranges_innodb.test
View file @
862af4d2
...
...
@@ -5,3 +5,16 @@
--
source
include
/
have_innodb
.
inc
set
default_storage_engine
=
innodb
;
--
source
auto_increment_ranges
.
inc
#
# MDEV-17377 invalid gap in auto-increment values after LOAD DATA
#
create
table
t1
(
pk
int
auto_increment
primary
key
,
f
varchar
(
20
));
insert
t1
(
f
)
values
(
'a'
),
(
'b'
),
(
'c'
),
(
'd'
);
select
null
,
f
into
outfile
'load.data'
from
t1
limit
1
;
load
data
infile
'load.data'
into
table
t1
;
insert
t1
(
f
)
values
(
'<==='
);
select
*
from
t1
;
drop
table
t1
;
--
let
$datadir
=
`select @@datadir`
--
remove_file
$datadir
/
test
/
load
.
data
mysql-test/mysql-test-run.pl
View file @
862af4d2
...
...
@@ -25,7 +25,7 @@
# Tool used for executing a suite of .test files
#
# See the "MySQL Test framework manual" for more information
# http
://dev.mysql.com/doc/mysqltest/en/index.html
# http
s://mariadb.com/kb/en/library/mysqltest/
#
#
##############################################################################
...
...
mysql-test/suite/encryption/r/innodb-encryption-alter.result
View file @
862af4d2
...
...
@@ -48,3 +48,40 @@ Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
set innodb_default_encryption_key_id = 1;
drop table t1,t2;
SET GLOBAL innodb_encrypt_tables=OFF;
CREATE TABLE t1 (a int not null primary key) engine=innodb;
ALTER TABLE t1 ENCRYPTION_KEY_ID=4;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
SHOW WARNINGS;
Level Code Message
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t2 (a int not null primary key) engine=innodb;
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
ERROR HY000: Can't create table `test`.`t3` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
Error 1005 Can't create table `test`.`t3` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
mysql-test/suite/encryption/t/innodb-encryption-alter.test
View file @
862af4d2
...
...
@@ -81,6 +81,30 @@ connection default;
drop
table
t1
,
t2
;
#
# MDEV-17230: encryption_key_id from alter is ignored by encryption threads
#
SET
GLOBAL
innodb_encrypt_tables
=
OFF
;
CREATE
TABLE
t1
(
a
int
not
null
primary
key
)
engine
=
innodb
;
--
error
ER_ILLEGAL_HA_CREATE_OPTION
ALTER
TABLE
t1
ENCRYPTION_KEY_ID
=
4
;
SHOW
WARNINGS
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t2
(
a
int
not
null
primary
key
)
engine
=
innodb
;
--
replace_regex
/
#sql-[0-9a-f_]*`/#sql-temporary`/
--
error
ER_CANT_CREATE_TABLE
ALTER
TABLE
t2
ENCRYPTION_KEY_ID
=
4
,
ALGORITHM
=
COPY
;
--
replace_regex
/
#sql-[0-9a-f_]*`/#sql-temporary`/
SHOW
WARNINGS
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t2
;
--
error
ER_CANT_CREATE_TABLE
CREATE
TABLE
t3
(
a
int
not
null
primary
key
)
engine
=
innodb
ENCRYPTION_KEY_ID
=
4
;
SHOW
WARNINGS
;
# reset system
--
disable_query_log
EVAL
SET
GLOBAL
innodb_encrypt_tables
=
$encrypt_tables
;
...
...
mysql-test/suite/rpl/disabled.def
View file @
862af4d2
...
...
@@ -17,5 +17,6 @@ rpl_row_binlog_max_cache_size : MDEV-11092
rpl_blackhole : MDEV-11094
rpl_row_mysqlbinlog : MDEV-11095
rpl_row_index_choice : MDEV-11666
rpl_delayed_slave : MDEV-14528
rpl_parallel2 : fails after MDEV-16172
rpl_semi_sync_after_sync : fails after MDEV-16172
mysql-test/suite/rpl/r/rpl_old_master.result
View file @
862af4d2
...
...
@@ -9,7 +9,10 @@ connection slave;
SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET GLOBAL slave_parallel_threads=10;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4;
FLUSH TABLES WITH READ LOCK;
include/start_slave.inc
include/wait_for_slave_param.inc [Seconds_Behind_Master]
UNLOCK TABLES;
connection master;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1);
...
...
mysql-test/suite/rpl/t/rpl_old_master.test
View file @
862af4d2
...
...
@@ -27,7 +27,15 @@ SET @old_parallel= @@GLOBAL.slave_parallel_threads;
SET
GLOBAL
slave_parallel_threads
=
10
;
--
replace_result
$SERVER_MYPORT_1
SERVER_MYPORT_1
eval
CHANGE
MASTER
TO
master_host
=
'127.0.0.1'
,
master_port
=
$SERVER_MYPORT_1
,
master_user
=
'root'
,
master_log_file
=
'master-bin.000001'
,
master_log_pos
=
4
;
# Block execution yet when the blocked query timestamp has been already accounted
FLUSH
TABLES
WITH
READ
LOCK
;
--
source
include
/
start_slave
.
inc
--
let
$slave_param
=
Seconds_Behind_Master
--
let
$slave_param_value
=
1
--
let
$slave_param_comparison
=
>=
--
source
include
/
wait_for_slave_param
.
inc
UNLOCK
TABLES
;
--
connection
master
CREATE
TABLE
t2
(
a
INT
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
...
...
mysys/mf_iocache.c
View file @
862af4d2
...
...
@@ -297,6 +297,10 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
}
info
->
inited
=
info
->
aio_result
.
pending
=
0
;
#endif
if
(
type
==
READ_CACHE
||
type
==
WRITE_CACHE
||
type
==
SEQ_READ_APPEND
)
info
->
myflags
|=
MY_FULL_IO
;
else
info
->
myflags
&=
~
MY_FULL_IO
;
DBUG_RETURN
(
0
);
}
/* init_io_cache */
...
...
mysys/my_pread.c
View file @
862af4d2
...
...
@@ -47,8 +47,7 @@
size_t
my_pread
(
File
Filedes
,
uchar
*
Buffer
,
size_t
Count
,
my_off_t
offset
,
myf
MyFlags
)
{
size_t
readbytes
;
int
error
=
0
;
size_t
readbytes
,
save_count
=
0
;
DBUG_ENTER
(
"my_pread"
);
...
...
@@ -66,11 +65,10 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
#else
readbytes
=
pread
(
Filedes
,
Buffer
,
Count
,
offset
);
#endif
error
=
(
readbytes
!=
Count
);
if
(
error
)
if
(
readbytes
!=
Count
)
{
my_errno
=
errno
?
errno
:
-
1
;
my_errno
=
errno
;
if
(
errno
==
0
||
(
readbytes
!=
(
size_t
)
-
1
&&
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))))
my_errno
=
HA_ERR_FILE_TOO_SHORT
;
...
...
@@ -82,6 +80,18 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
(
int
)
readbytes
));
continue
;
/* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if
(
readbytes
!=
(
size_t
)
-
1
&&
readbytes
!=
0
&&
(
MyFlags
&
MY_FULL_IO
))
{
Buffer
+=
readbytes
;
Count
-=
readbytes
;
save_count
+=
readbytes
;
offset
+=
readbytes
;
continue
;
}
if
(
MyFlags
&
(
MY_WME
|
MY_FAE
|
MY_FNABP
))
{
if
(
readbytes
==
(
size_t
)
-
1
)
...
...
@@ -97,8 +107,10 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
DBUG_RETURN
(
MY_FILE_ERROR
);
/* Return with error */
}
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
DBUG_RETURN
(
0
);
/* Read went ok; Return 0 */
DBUG_RETURN
(
readbytes
);
/* purecov: inspected */
readbytes
=
0
;
/* Read went ok; Return 0 */
else
readbytes
+=
save_count
;
DBUG_RETURN
(
readbytes
);
}
}
/* my_pread */
...
...
sql/slave.cc
View file @
862af4d2
...
...
@@ -4304,6 +4304,11 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
This is the case for pre-10.0 events without GTID, and for handling
slave_skip_counter.
*/
if
(
!
(
ev
->
is_artificial_event
()
||
ev
->
is_relay_log_event
()
||
(
ev
->
when
==
0
)))
{
rli
->
last_master_timestamp
=
ev
->
when
+
(
time_t
)
ev
->
exec_time
;
DBUG_ASSERT
(
rli
->
last_master_timestamp
>=
0
);
}
}
if
(
typ
==
GTID_EVENT
)
...
...
sql/sql_yacc.yy
View file @
862af4d2
...
...
@@ -14564,6 +14564,7 @@ load:
lex->field_list.empty();
lex->update_list.empty();
lex->value_list.empty();
lex->many_values.empty();
}
opt_load_data_charset
{ Lex->exchange->cs= $15; }
...
...
storage/innobase/handler/ha_innodb.cc
View file @
862af4d2
...
...
@@ -10110,16 +10110,6 @@ ha_innobase::ft_read(
return
(
HA_ERR_END_OF_FILE
);
}
/*************************************************************************
*/
void
ha_innobase
::
ft_end
()
{
ib
::
info
()
<<
"ft_end()"
;
rnd_end
();
}
#ifdef WITH_WSREP
extern
dict_index_t
*
wsrep_dict_foreign_find_index
(
...
...
@@ -11602,21 +11592,18 @@ create_table_info_t::check_table_options()
options
->
encryption_key_id
=
FIL_DEFAULT_ENCRYPTION_KEY
;
}
/* If default encryption is used make sure that used kay is found
from key file. */
if
(
encrypt
==
FIL_ENCRYPTION_DEFAULT
&&
!
srv_encrypt_tables
&&
options
->
encryption_key_id
!=
FIL_DEFAULT_ENCRYPTION_KEY
)
{
if
(
!
encryption_key_id_exists
((
unsigned
int
)
options
->
encryption_key_id
))
{
push_warning_printf
(
m_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
HA_WRONG_CREATE_OPTION
,
"InnoDB: ENCRYPTION_KEY_ID %u not available"
,
(
uint
)
options
->
encryption_key_id
/* If default encryption is used and encryption is disabled, you may
not use nondefault encryption_key_id as it is not stored anywhere. */
if
(
encrypt
==
FIL_ENCRYPTION_DEFAULT
&&
!
srv_encrypt_tables
&&
options
->
encryption_key_id
!=
FIL_DEFAULT_ENCRYPTION_KEY
)
{
compile_time_assert
(
FIL_DEFAULT_ENCRYPTION_KEY
==
1
);
push_warning_printf
(
m_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
HA_WRONG_CREATE_OPTION
,
"InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1"
);
return
"ENCRYPTION_KEY_ID"
;
}
return
"ENCRYPTION_KEY_ID"
;
}
return
NULL
;
...
...
storage/innobase/handler/ha_innodb.h
View file @
862af4d2
...
...
@@ -155,11 +155,8 @@ class ha_innobase: public handler
int
rnd_pos
(
uchar
*
buf
,
uchar
*
pos
);
int
ft_init
();
void
ft_end
();
FT_INFO
*
ft_init_ext
(
uint
flags
,
uint
inx
,
String
*
key
);
void
ft_end
()
{
rnd_end
();
}
FT_INFO
*
ft_init_ext
(
uint
flags
,
uint
inx
,
String
*
key
);
int
ft_read
(
uchar
*
buf
);
void
position
(
const
uchar
*
record
);
...
...
storage/rocksdb/mysql-test/rocksdb/t/disabled.def
View file @
862af4d2
...
...
@@ -24,6 +24,7 @@ select_for_update_skip_locked_nowait: MDEV-11481
create_no_primary_key_table: MariaDB doesn't have --block_create_no_primary_key
explicit_snapshot: MariaDB doesn't support Shared/Explicit snapshots
percona_nonflushing_analyze_debug : Requires Percona Server's Non-flushing ANALYZE feature
com_rpc_tx : Requires connection attributes and detached sessions
##
## Tests that do not fit MariaDB's test environment. Upstream seems to test
...
...
vio/viossl.c
View file @
862af4d2
...
...
@@ -124,6 +124,9 @@ static my_bool ssl_should_retry(Vio *vio, int ret, enum enum_vio_io_event *event
default:
should_retry
=
FALSE
;
ssl_set_sys_error
(
ssl_error
);
#ifndef HAVE_YASSL
ERR_clear_error
();
#endif
break
;
}
...
...
@@ -315,21 +318,16 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
{
int
r
;
SSL
*
ssl
;
my_bool
unused
;
my_bool
was_blocking
;
my_socket
sd
=
mysql_socket_getfd
(
vio
->
mysql_socket
);
DBUG_ENTER
(
"ssl_do"
);
DBUG_PRINT
(
"enter"
,
(
"ptr: %p, sd: %d ctx: %p"
,
ptr
,
(
int
)
sd
,
ptr
->
ssl_context
));
/* Set socket to blocking if not already set */
vio_blocking
(
vio
,
1
,
&
was_blocking
);
if
(
!
(
ssl
=
SSL_new
(
ptr
->
ssl_context
)))
{
DBUG_PRINT
(
"error"
,
(
"SSL_new failure"
));
*
errptr
=
ERR_get_error
();
vio_blocking
(
vio
,
was_blocking
,
&
unused
);
DBUG_RETURN
(
1
);
}
DBUG_PRINT
(
"info"
,
(
"ssl: %p timeout: %ld"
,
ssl
,
timeout
));
...
...
@@ -360,7 +358,6 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
DBUG_PRINT
(
"error"
,
(
"SSL_connect/accept failure"
));
*
errptr
=
SSL_errno
(
ssl
,
r
);
SSL_free
(
ssl
);
vio_blocking
(
vio
,
was_blocking
,
&
unused
);
DBUG_RETURN
(
1
);
}
...
...
@@ -371,7 +368,6 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
*/
if
(
vio_reset
(
vio
,
VIO_TYPE_SSL
,
SSL_get_fd
(
ssl
),
ssl
,
0
))
{
vio_blocking
(
vio
,
was_blocking
,
&
unused
);
DBUG_RETURN
(
1
);
}
...
...
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