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
2daa0058
Commit
2daa0058
authored
Feb 22, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.1' into 10.2
parents
db0484f3
5d8ac1ec
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
318 additions
and
73 deletions
+318
-73
CMakeLists.txt
CMakeLists.txt
+1
-0
mysql-test/lib/My/SafeProcess/Base.pm
mysql-test/lib/My/SafeProcess/Base.pm
+8
-4
mysql-test/lib/My/Tee.pm
mysql-test/lib/My/Tee.pm
+23
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+8
-1
mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
...te/encryption/r/innodb_encryption-page-compression.result
+15
-3
mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
...uite/encryption/t/innodb_encryption-page-compression.test
+20
-3
mysql-test/suite/galera/disabled.def
mysql-test/suite/galera/disabled.def
+3
-0
mysql-test/suite/parts/t/partition_alter_myisam.test
mysql-test/suite/parts/t/partition_alter_myisam.test
+1
-0
scripts/wsrep_sst_xtrabackup-v2.sh
scripts/wsrep_sst_xtrabackup-v2.sh
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+3
-1
sql/partition_info.cc
sql/partition_info.cc
+16
-17
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+5
-11
storage/maria/ma_bitmap.c
storage/maria/ma_bitmap.c
+209
-32
storage/maria/maria_def.h
storage/maria/maria_def.h
+3
-0
storage/tokudb/CMakeLists.txt
storage/tokudb/CMakeLists.txt
+2
-0
No files found.
CMakeLists.txt
View file @
2daa0058
...
...
@@ -160,6 +160,7 @@ INCLUDE(plugin)
INCLUDE
(
install_macros
)
INCLUDE
(
systemd
)
INCLUDE
(
mysql_add_executable
)
INCLUDE
(
compile_flags
)
INCLUDE
(
crc32-vpmsum
)
# Handle options
...
...
mysql-test/lib/My/SafeProcess/Base.pm
View file @
2daa0058
...
...
@@ -186,8 +186,10 @@ sub create_process {
# it and any childs(that hasn't changed group themself)
setpgrp
(
0
,
0
)
if
$opts
{
setpgrp
};
if
(
$output
and
!
open
(
STDOUT
,
$open_mode
,
$output
)
)
{
croak
("
can't redirect STDOUT to '
$output
': $!
");
if
(
$output
)
{
close
STDOUT
;
open
(
STDOUT
,
$open_mode
,
$output
)
or
croak
"
can't redirect STDOUT to '
$output
': $!
";
}
if
(
$error
)
{
...
...
@@ -196,8 +198,10 @@ sub create_process {
croak
("
can't dup STDOUT: $!
");
}
}
elsif
(
!
open
(
STDERR
,
$open_mode
,
$error
)
)
{
croak
("
can't redirect STDERR to '
$error
': $!
");
else
{
close
STDERR
;
open
(
STDERR
,
$open_mode
,
$error
)
or
croak
"
can't redirect STDERR to '
$error
': $!
";
}
}
...
...
mysql-test/lib/My/Tee.pm
0 → 100644
View file @
2daa0058
package
My::
Tee
;
# see PerlIO::via
our
$copyfh
;
sub
PUSHED
{
open
(
$copyfh
,
'
>
',
"
$::opt_vardir/log/stdout.log
")
or
die
"
open(>$::opt_vardir/log/stdout.log): $!
"
unless
$copyfh
;
bless
{
},
shift
;
}
sub
WRITE
{
my
(
$obj
,
$buf
,
$fh
)
=
@_
;
print
$fh
$buf
;
print
$copyfh
$buf
;
return
length
(
$buf
);
}
1
;
mysql-test/mysql-test-run.pl
View file @
2daa0058
...
...
@@ -91,6 +91,7 @@ use My::Platform;
use
My::
SafeProcess
;
use
My::
ConfigFactory
;
use
My::
Options
;
use
My::
Tee
;
use
My::
Find
;
use
My::
SysInfo
;
use
My::
CoreDump
;
...
...
@@ -384,6 +385,11 @@ sub main {
initialize_servers
();
init_timers
();
unless
(
IS_WINDOWS
)
{
binmode
(
STDOUT
,"
:via(My::Tee)
")
or
die
"
binmode(STDOUT, :via(My::Tee)):$!
";
binmode
(
STDERR
,"
:via(My::Tee)
")
or
die
"
binmode(STDERR, :via(My::Tee)):$!
";
}
mtr_report
("
Checking supported features...
");
executable_setup
();
...
...
@@ -6253,7 +6259,8 @@ sub xterm_stat {
my
$done
=
$num_tests
-
$left
;
my
$spent
=
time
-
$^T
;
printf
"
\
e];mtr: spent %s on %d tests. %s (%d tests) left
\
a
",
syswrite
STDOUT
,
sprintf
"
\
e];mtr: spent %s on %d tests. %s (%d tests) left
\
a
",
time_format
(
$spent
),
$done
,
time_format
(
$spent
/
$done
*
$left
),
$left
;
}
...
...
mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
View file @
2daa0058
...
...
@@ -134,6 +134,13 @@ count(*)
select count(*) from innodb_page_compressed9 where c1 < 500000;
count(*)
2000
flush tables innodb_page_compressed1, innodb_page_compressed2,
innodb_page_compressed3, innodb_page_compressed4,
innodb_page_compressed5, innodb_page_compressed6,
innodb_page_compressed7, innodb_page_compressed8,
innodb_page_compressed9 for export;
unlock tables;
# Wait until dirty pages are compressed and encrypted
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
variable_value > 0
1
...
...
@@ -151,9 +158,14 @@ update innodb_page_compressed6 set c1 = c1 + 1;
update innodb_page_compressed7 set c1 = c1 + 1;
update innodb_page_compressed8 set c1 = c1 + 1;
update innodb_page_compressed9 set c1 = c1 + 1;
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
variable_value > 0
1
flush tables innodb_page_compressed1, innodb_page_compressed2,
innodb_page_compressed3, innodb_page_compressed4,
innodb_page_compressed5, innodb_page_compressed6,
innodb_page_compressed7, innodb_page_compressed8,
innodb_page_compressed9 for export;
unlock tables;
# Wait until dirty pages are compressed and encrypted 2
unlock tables;
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value > 0
1
...
...
mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
View file @
2daa0058
...
...
@@ -73,6 +73,15 @@ select count(*) from innodb_page_compressed7 where c1 < 500000;
select
count
(
*
)
from
innodb_page_compressed8
where
c1
<
500000
;
select
count
(
*
)
from
innodb_page_compressed9
where
c1
<
500000
;
flush
tables
innodb_page_compressed1
,
innodb_page_compressed2
,
innodb_page_compressed3
,
innodb_page_compressed4
,
innodb_page_compressed5
,
innodb_page_compressed6
,
innodb_page_compressed7
,
innodb_page_compressed8
,
innodb_page_compressed9
for
export
;
unlock
tables
;
--
echo
# Wait until dirty pages are compressed and encrypted
let
$wait_condition
=
select
variable_value
>
0
from
information_schema
.
global_status
where
variable_name
=
'INNODB_NUM_PAGES_PAGE_COMPRESSED'
;
--
source
include
/
wait_condition
.
inc
let
$wait_condition
=
select
variable_value
>
0
from
information_schema
.
global_status
where
variable_name
=
'INNODB_NUM_PAGES_ENCRYPTED'
;
...
...
@@ -96,12 +105,20 @@ update innodb_page_compressed7 set c1 = c1 + 1;
update
innodb_page_compressed8
set
c1
=
c1
+
1
;
update
innodb_page_compressed9
set
c1
=
c1
+
1
;
let
$wait_condition
=
select
variable_value
>
0
from
information_schema
.
global_status
where
variable_name
=
'INNODB_NUM_PAGES_ENCRYPTED'
;
--
source
include
/
wait_condition
.
inc
flush
tables
innodb_page_compressed1
,
innodb_page_compressed2
,
innodb_page_compressed3
,
innodb_page_compressed4
,
innodb_page_compressed5
,
innodb_page_compressed6
,
innodb_page_compressed7
,
innodb_page_compressed8
,
innodb_page_compressed9
for
export
;
unlock
tables
;
--
echo
# Wait until dirty pages are compressed and encrypted 2
let
$wait_condition
=
select
variable_value
>
0
from
information_schema
.
global_status
where
variable_name
=
'INNODB_NUM_PAGES_PAGE_COMPRESSED'
;
--
source
include
/
wait_condition
.
inc
unlock
tables
;
let
$wait_condition
=
select
variable_value
>
0
from
information_schema
.
global_status
where
variable_name
=
'INNODB_NUM_PAGES_DECRYPTED'
;
--
source
include
/
wait_condition
.
inc
SELECT
variable_value
>
0
FROM
information_schema
.
global_status
WHERE
variable_name
=
'innodb_num_pages_encrypted'
;
SELECT
variable_value
>
0
FROM
information_schema
.
global_status
WHERE
variable_name
=
'innodb_num_pages_decrypted'
;
SELECT
variable_value
>
0
FROM
information_schema
.
global_status
WHERE
variable_name
=
'innodb_num_pages_page_compressed'
;
SELECT
variable_value
>
0
FROM
information_schema
.
global_status
WHERE
variable_name
=
'innodb_num_pages_page_decompressed'
;
...
...
mysql-test/suite/galera/disabled.def
View file @
2daa0058
...
...
@@ -61,3 +61,6 @@ MW-328B: MDEV-13549 Galera test failures 10.1
MW-328: MDEV-13549 Galera test failures 10.1
galera_suspend_slave: MDEV-13549 Galera test failures 10.1
galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status
galera_gtid : MDEV-13549 Galera test failures 10.1
galera_gtid_slave : MDEV-13549 Galera test failures 10.1
galera_unicode_identifiers : MDEV-13549 Galera test failures 10.1
mysql-test/suite/parts/t/partition_alter_myisam.test
View file @
2daa0058
--
source
include
/
have_partition
.
inc
--
source
include
/
have_symlink
.
inc
--
let
$engine
=
MyISAM
--
source
inc
/
part_alter_values
.
inc
...
...
scripts/wsrep_sst_xtrabackup-v2.sh
View file @
2daa0058
...
...
@@ -644,7 +644,7 @@ wait_for_listen()
for
i
in
{
1..300
}
do
LSOF_OUT
=
$(
lsof
-sTCP
:LISTEN
-i
TCP:
${
PORT
}
-a
-c
nc
-c
socat
-F
c
)
LSOF_OUT
=
$(
lsof
-sTCP
:LISTEN
-i
TCP:
${
PORT
}
-a
-c
nc
-c
socat
-F
c
2> /dev/null
||
:
)
[
-n
"
${
LSOF_OUT
}
"
]
&&
break
sleep
0.2
done
...
...
sql/mysqld.cc
View file @
2daa0058
...
...
@@ -6025,12 +6025,14 @@ int mysqld_main(int argc, char **argv)
mysqld_port
,
MYSQL_COMPILATION_COMMENT
);
}
#ifndef _WIN32
// try to keep fd=0 busy
if
(
!
freopen
(
IF_WIN
(
"NUL"
,
"/dev/null"
)
,
"r"
,
stdin
))
if
(
!
freopen
(
"/dev/null"
,
"r"
,
stdin
))
{
// fall back on failure
fclose
(
stdin
);
}
#endif
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
Service
.
SetRunning
();
...
...
sql/partition_info.cc
View file @
2daa0058
...
...
@@ -2383,23 +2383,6 @@ bool partition_info::fix_column_value_functions(THD *thd,
}
bool
partition_info
::
error_if_requires_values
()
const
{
switch
(
part_type
)
{
case
NOT_A_PARTITION
:
case
HASH_PARTITION
:
break
;
case
RANGE_PARTITION
:
my_error
(
ER_PARTITION_REQUIRES_VALUES_ERROR
,
MYF
(
0
),
"RANGE"
,
"LESS THAN"
);
return
true
;
case
LIST_PARTITION
:
my_error
(
ER_PARTITION_REQUIRES_VALUES_ERROR
,
MYF
(
0
),
"LIST"
,
"IN"
);
return
true
;
}
return
false
;
}
/**
Fix partition data from parser.
...
...
@@ -2893,3 +2876,19 @@ bool check_partition_dirs(partition_info *part_info)
}
#endif
/* WITH_PARTITION_STORAGE_ENGINE */
bool
partition_info
::
error_if_requires_values
()
const
{
switch
(
part_type
)
{
case
NOT_A_PARTITION
:
case
HASH_PARTITION
:
break
;
case
RANGE_PARTITION
:
my_error
(
ER_PARTITION_REQUIRES_VALUES_ERROR
,
MYF
(
0
),
"RANGE"
,
"LESS THAN"
);
return
true
;
case
LIST_PARTITION
:
my_error
(
ER_PARTITION_REQUIRES_VALUES_ERROR
,
MYF
(
0
),
"LIST"
,
"IN"
);
return
true
;
}
return
false
;
}
storage/connect/ha_connect.cc
View file @
2daa0058
...
...
@@ -1754,11 +1754,13 @@ bool ha_connect::CheckVirtualIndex(TABLE_SHARE *s)
bool
ha_connect
::
IsPartitioned
(
void
)
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
tshp
)
return
tshp
->
partition_info_str_len
>
0
;
else
if
(
table
&&
table
->
part_info
)
return
true
;
else
#endif
return
false
;
}
// end of IsPartitioned
...
...
@@ -6165,8 +6167,10 @@ int ha_connect::create(const char *name, TABLE *table_arg,
TABLE
*
st
=
table
;
// Probably unuseful
THD
*
thd
=
ha_thd
();
LEX_STRING
cnc
=
table_arg
->
s
->
connect_string
;
#if
defined(WITH_PARTITION_STORAGE_ENGINE)
#if
def WITH_PARTITION_STORAGE_ENGINE
partition_info
*
part_info
=
table_arg
->
part_info
;
#else
#define part_info 0
#endif // WITH_PARTITION_STORAGE_ENGINE
xp
=
GetUser
(
thd
,
xp
);
PGLOBAL
g
=
xp
->
g
;
...
...
@@ -6268,9 +6272,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
// fall through
case
TAB_MYSQL
:
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
!
part_info
)
#endif // WITH_PARTITION_STORAGE_ENGINE
{
const
char
*
src
=
options
->
srcdef
;
PCSZ
host
,
db
,
tab
=
options
->
tabname
;
int
port
;
...
...
@@ -6534,7 +6536,6 @@ int ha_connect::create(const char *name, TABLE *table_arg,
}
else
lwt
[
i
]
=
tolower
(
options
->
type
[
i
]);
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
part_info
)
{
char
*
p
;
...
...
@@ -6544,7 +6545,6 @@ int ha_connect::create(const char *name, TABLE *table_arg,
strcat
(
strcat
(
strcpy
(
buf
,
p
),
"."
),
lwt
);
*
p
=
0
;
}
else
{
#endif // WITH_PARTITION_STORAGE_ENGINE
strcat
(
strcat
(
strcpy
(
buf
,
GetTableName
()),
"."
),
lwt
);
sprintf
(
g
->
Message
,
"No file name. Table will use %s"
,
buf
);
...
...
@@ -6552,9 +6552,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
g
->
Message
);
strcat
(
strcat
(
strcpy
(
dbpath
,
"./"
),
table
->
s
->
db
.
str
),
"/"
);
#if defined(WITH_PARTITION_STORAGE_ENGINE)
}
// endif part_info
#endif // WITH_PARTITION_STORAGE_ENGINE
PlugSetPath
(
fn
,
buf
,
dbpath
);
...
...
@@ -6619,11 +6617,9 @@ int ha_connect::create(const char *name, TABLE *table_arg,
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
0
,
"Unexpected command in create, please contact CONNECT team"
);
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
part_info
&&
!
inward
)
strncpy
(
partname
,
decode
(
g
,
strrchr
(
name
,
'#'
)
+
1
),
sizeof
(
partname
)
-
1
);
// strcpy(partname, part_info->curr_part_elem->partition_name);
#endif // WITH_PARTITION_STORAGE_ENGINE
if
(
g
->
Alchecked
==
0
&&
(
!
IsFileType
(
type
)
||
FileExists
(
options
->
filename
,
false
)))
{
...
...
@@ -6659,12 +6655,10 @@ int ha_connect::create(const char *name, TABLE *table_arg,
my_message
(
ER_UNKNOWN_ERROR
,
g
->
Message
,
MYF
(
0
));
rc
=
HA_ERR_INTERNAL_ERROR
;
}
else
if
(
cat
)
{
#if defined(WITH_PARTITION_STORAGE_ENGINE)
if
(
part_info
)
strncpy
(
partname
,
decode
(
g
,
strrchr
(
name
,
(
inward
?
slash
:
'#'
))
+
1
),
sizeof
(
partname
)
-
1
);
#endif // WITH_PARTITION_STORAGE_ENGINE
if
((
rc
=
optimize
(
table
->
in_use
,
NULL
)))
{
htrc
(
"Create rc=%d %s
\n
"
,
rc
,
g
->
Message
);
...
...
storage/maria/ma_bitmap.c
View file @
2daa0058
This diff is collapsed.
Click to expand it.
storage/maria/maria_def.h
View file @
2daa0058
...
...
@@ -331,7 +331,10 @@ typedef struct st_maria_file_bitmap
pgcache_page_no_t
last_bitmap_page
;
/* Last possible bitmap page */
my_bool
changed
;
/* 1 if page needs to be written */
my_bool
changed_not_flushed
;
/* 1 if some bitmap is not flushed */
my_bool
return_first_match
;
/* Shortcut find_head() */
uint
used_size
;
/* Size of bitmap head that is not 0 */
uint
full_head_size
;
/* Where to start search for head */
uint
full_tail_size
;
/* Where to start search for tail */
uint
flush_all_requested
;
/**< If _ma_bitmap_flush_all waiting */
uint
waiting_for_flush_all_requested
;
/* If someone is waiting for above */
uint
non_flushable
;
/**< 0 if bitmap and log are in sync */
...
...
storage/tokudb/CMakeLists.txt
View file @
2daa0058
...
...
@@ -4,6 +4,8 @@ IF(CMAKE_VERSION VERSION_LESS "2.8.9")
MESSAGE
(
STATUS
"CMake 2.8.9 or higher is required by TokuDB"
)
ELSEIF
(
NOT HAVE_DLOPEN
)
MESSAGE
(
STATUS
"dlopen is required by TokuDB"
)
ELSEIF
(
NOT TARGET perfschema
)
MESSAGE
(
STATUS
"Performance Schema is required by TokuDB"
)
ELSEIF
(
CMAKE_SYSTEM_PROCESSOR STREQUAL
"x86_64"
OR
CMAKE_SYSTEM_PROCESSOR STREQUAL
"amd64"
)
# tokudb requires F_NOCACHE or O_DIRECT, and designated initializers
...
...
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