Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Faustin Lammler
mariadb-10.1
Commits
dfc77d19
Commit
dfc77d19
authored
Aug 07, 2015
by
Otto Kekäläinen
Browse files
Imported Upstream version 10.0.21
parent
bbbf51f8
Changes
349
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
dfc77d19
...
...
@@ -15,6 +15,7 @@
*.dat -text -whitespace
storage/connect/mysql-test/connect/std_data/*.txt -text
pcre/testdata/greppatN4 -text
# Denote all files that are truly binary and should not be modified.
*.png binary
...
...
.gitignore
View file @
dfc77d19
...
...
@@ -277,6 +277,10 @@ storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
*.vcproj.*
*.vcproj.*.*
*.vcproj.*.*.*
*.vcxproj
*.vcxproj.*
*.vcxproj.*.*
*.vcxproj.*.*.*
# Build results
[Dd]ebug/
...
...
CMakeLists.txt
View file @
dfc77d19
...
...
@@ -424,7 +424,6 @@ IF(NOT WITHOUT_SERVER)
IF
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/internal/CMakeLists.txt
)
ADD_SUBDIRECTORY
(
internal
)
ENDIF
()
ADD_SUBDIRECTORY
(
packaging/rpm-oel
)
ENDIF
()
IF
(
UNIX
)
...
...
@@ -438,7 +437,6 @@ IF(WIN32)
ADD_SUBDIRECTORY
(
win/upgrade_wizard
)
ADD_SUBDIRECTORY
(
win/packaging
)
ENDIF
()
ADD_SUBDIRECTORY
(
packaging/solaris
)
IF
(
NOT CMAKE_CROSSCOMPILING
)
SET
(
EXPORTED comp_err comp_sql factorial
)
...
...
Docs/INFO_SRC
View file @
dfc77d19
commit:
a6087e7dc1ef3561d8189c8db15e9591d0f9b520
date: 2015-0
6-17 16:13:02
+0200
build-date: 2015-0
6-17 16:54:14
+0200
short:
a6087e7
commit:
0403790722e3941779ccea26e85fcd818e2320b5
date: 2015-0
8-05 20:07:46
+0200
build-date: 2015-0
8-05 20:11:37
+0200
short:
0403790
branch: HEAD
MySQL source 10.0.2
0
MySQL source 10.0.2
1
VERSION
View file @
dfc77d19
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=2
0
MYSQL_VERSION_PATCH=2
1
client/mysql_upgrade.c
View file @
dfc77d19
...
...
@@ -1095,7 +1095,7 @@ int main(int argc, char **argv)
printf
(
"This installation of MySQL is already upgraded to %s, "
"use --force if you still need to run mysql_upgrade
\n
"
,
MYSQL_SERVER_VERSION
);
die
(
NULL
)
;
goto
end
;
}
if
(
opt_version_check
&&
check_version_match
())
...
...
@@ -1124,6 +1124,7 @@ int main(int argc, char **argv)
DBUG_ASSERT
(
phase
==
phases_total
);
end:
free_used_memory
();
my_end
(
my_end_arg
);
exit
(
0
);
...
...
client/mysqlimport.c
View file @
dfc77d19
...
...
@@ -36,7 +36,7 @@
/* Global Thread counter */
uint
counter
;
uint
counter
=
0
;
pthread_mutex_t
counter_mutex
;
pthread_cond_t
count_threshhold
;
...
...
@@ -489,6 +489,11 @@ static void safe_exit(int error, MYSQL *mysql)
{
if
(
error
&&
ignore_errors
)
return
;
/* in multi-threaded mode protect from concurrent safe_exit's */
if
(
counter
)
pthread_mutex_lock
(
&
counter_mutex
);
if
(
mysql
)
mysql_close
(
mysql
);
...
...
client/mysqlslap.c
View file @
dfc77d19
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates.
Copyright (c) 2005, 2015, Oracle and/or its affiliates.
Copyright (c) 2010, 2015, MariaDB
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
...
...
@@ -242,7 +243,7 @@ void print_conclusions_csv(conclusions *con);
void
generate_stats
(
conclusions
*
con
,
option_string
*
eng
,
stats
*
sptr
);
uint
parse_comma
(
const
char
*
string
,
uint
**
range
);
uint
parse_delimiter
(
const
char
*
script
,
statement
**
stmt
,
char
delm
);
u
int
parse_option
(
const
char
*
origin
,
option_string
**
stmt
,
char
delm
);
int
parse_option
(
const
char
*
origin
,
option_string
**
stmt
,
char
delm
);
static
int
drop_schema
(
MYSQL
*
mysql
,
const
char
*
db
);
uint
get_random_string
(
char
*
buf
);
static
statement
*
build_table_string
(
void
);
...
...
@@ -1264,7 +1265,13 @@ get_options(int *argc,char ***argv)
if
(
num_int_cols_opt
)
{
option_string
*
str
;
parse_option
(
num_int_cols_opt
,
&
str
,
','
);
if
(
parse_option
(
num_int_cols_opt
,
&
str
,
','
)
==
-
1
)
{
fprintf
(
stderr
,
"Invalid value specified for the option "
"'number-int-cols'
\n
"
);
option_cleanup
(
str
);
return
1
;
}
num_int_cols
=
atoi
(
str
->
string
);
if
(
str
->
option
)
num_int_cols_index
=
atoi
(
str
->
option
);
...
...
@@ -1275,7 +1282,13 @@ get_options(int *argc,char ***argv)
if
(
num_char_cols_opt
)
{
option_string
*
str
;
parse_option
(
num_char_cols_opt
,
&
str
,
','
);
if
(
parse_option
(
num_char_cols_opt
,
&
str
,
','
)
==
-
1
)
{
fprintf
(
stderr
,
"Invalid value specified for the option "
"'number-char-cols'
\n
"
);
option_cleanup
(
str
);
return
1
;
}
num_char_cols
=
atoi
(
str
->
string
);
if
(
str
->
option
)
num_char_cols_index
=
atoi
(
str
->
option
);
...
...
@@ -1512,7 +1525,13 @@ get_options(int *argc,char ***argv)
printf
(
"Parsing engines to use.
\n
"
);
if
(
default_engine
)
parse_option
(
default_engine
,
&
engine_options
,
','
);
{
if
(
parse_option
(
default_engine
,
&
engine_options
,
','
)
==
-
1
)
{
fprintf
(
stderr
,
"Invalid value specified for the option 'engine'
\n
"
);
return
1
;
}
}
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
...
...
@@ -1989,7 +2008,7 @@ pthread_handler_t run_task(void *p)
DBUG_RETURN
(
0
);
}
u
int
int
parse_option
(
const
char
*
origin
,
option_string
**
stmt
,
char
delm
)
{
char
*
retstr
;
...
...
@@ -2014,6 +2033,13 @@ parse_option(const char *origin, option_string **stmt, char delm)
char
buffer
[
HUGE_STRING_LENGTH
]
=
""
;
char
*
buffer_ptr
;
/*
Return an error if the length of the any of the comma seprated value
exceeds HUGE_STRING_LENGTH.
*/
if
((
size_t
)(
retstr
-
ptr
)
>
HUGE_STRING_LENGTH
)
return
-
1
;
count
++
;
strncpy
(
buffer
,
ptr
,
(
size_t
)(
retstr
-
ptr
));
/*
...
...
@@ -2053,6 +2079,13 @@ parse_option(const char *origin, option_string **stmt, char delm)
{
char
*
origin_ptr
;
/*
Return an error if the length of the any of the comma seprated value
exceeds HUGE_STRING_LENGTH.
*/
if
(
strlen
(
ptr
)
>
HUGE_STRING_LENGTH
)
return
-
1
;
if
((
origin_ptr
=
strchr
(
ptr
,
':'
)))
{
char
*
option_ptr
;
...
...
@@ -2063,13 +2096,13 @@ parse_option(const char *origin, option_string **stmt, char delm)
option_ptr
=
(
char
*
)
ptr
+
1
+
tmp
->
length
;
/* Move past the : and the first string */
tmp
->
option_length
=
(
size_t
)((
ptr
+
length
)
-
option_ptr
);
tmp
->
option_length
=
strlen
(
option_ptr
);
tmp
->
option
=
my_strndup
(
option_ptr
,
tmp
->
option_length
,
MYF
(
MY_FAE
));
}
else
{
tmp
->
length
=
(
size_t
)((
ptr
+
length
)
-
ptr
);
tmp
->
length
=
strlen
(
ptr
);
tmp
->
string
=
my_strndup
(
ptr
,
tmp
->
length
,
MYF
(
MY_FAE
));
}
...
...
debian/additions/mysqld_safe_syslog.cnf
View file @
dfc77d19
[mysqld_safe]
skip_log_error
syslog
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
View file @
dfc77d19
...
...
@@ -228,7 +228,7 @@ rollback;
create
table
t0
(
n
int
);
insert
t0
select
*
from
t1
;
set
autocommit
=
1
;
insert
into
t0
select
GET_LOCK
(
"lock1"
,
null
);
insert
into
t0
select
GET_LOCK
(
"lock1"
,
0
);
set
autocommit
=
0
;
create
table
t2
(
n
int
)
engine
=
innodb
;
insert
into
t2
values
(
3
);
...
...
mysql-test/mysql-test-run.pl
View file @
dfc77d19
...
...
@@ -2686,15 +2686,18 @@ sub setup_vardir() {
{
$plugindir
=
"
$opt_vardir
/plugins
";
mkpath
(
$plugindir
);
if
(
IS_WINDOWS
&&
!
$opt_embedded_server
)
if
(
IS_WINDOWS
)
{
for
(
<
$bindir
/storage/
*$opt_vs_config
/*.
dll
>
,
<
$bindir
/plugin/
*$opt_vs_config
/*.
dll
>
,
<
$bindir
/sql$opt_vs_config/
*.
dll
>
)
if
(
!
$opt_embedded_server
)
{
my
$pname
=
basename
(
$_
);
copy
rel2abs
(
$_
),
"
$plugindir
/
$pname
";
set_plugin_var
(
$pname
);
for
(
<
$bindir
/storage/
*$opt_vs_config
/*.
dll
>
,
<
$bindir
/plugin/
*$opt_vs_config
/*.
dll
>
,
<
$bindir
/sql$opt_vs_config/
*.
dll
>
)
{
my
$pname
=
basename
(
$_
);
copy
rel2abs
(
$_
),
"
$plugindir
/
$pname
";
set_plugin_var
(
$pname
);
}
}
}
else
...
...
@@ -4859,6 +4862,7 @@ sub extract_warning_lines ($$) {
qr|InnoDB: Setting thread \d+ nice to \d+ failed, current nice \d+, errno 13|
,
# setpriority() fails under valgrind
qr|Failed to setup SSL|
,
qr|SSL error: Failed to set ciphers to use|
,
qr/Plugin 'InnoDB' will be forced to shutdown/
,
);
my
$matched_lines
=
[]
;
...
...
mysql-test/r/alter_table.result
View file @
dfc77d19
...
...
@@ -1773,8 +1773,8 @@ ALTER TABLE tm1 DROP INDEX im3;
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
ALTER TABLE ti1 DROP COLUMN d2;
affected rows:
2
info: Records:
2
Duplicates: 0 Warnings: 0
affected rows:
0
info: Records:
0
Duplicates: 0 Warnings: 0
ALTER TABLE tm1 DROP COLUMN d2;
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
...
...
mysql-test/r/blackhole_plugin.result
View file @
dfc77d19
...
...
@@ -5,7 +5,7 @@ Warning 1266 Using storage engine MyISAM for table 't1'
DROP TABLE t1;
INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
INSTALL PLUGIN BLACKHOLE SONAME 'ha_blackhole.so';
ERROR HY000:
Functio
n 'BLACKHOLE' already
exists
ERROR HY000:
Plugi
n 'BLACKHOLE' already
installed
UNINSTALL PLUGIN blackhole;
INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
...
...
mysql-test/r/func_gconcat.result
View file @
dfc77d19
...
...
@@ -1103,3 +1103,19 @@ ORDER BY field;
field
c,c
drop table t3, t2, t1;
#
# MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd
# execution of PS
#
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(1),(2);
PREPARE stmt FROM "SELECT GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0) FROM t1 AS t1a, t1 AS t1b GROUP BY t1a.a";
EXECUTE stmt;
GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0)
1,1
2,2
EXECUTE stmt;
GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0)
1,1
2,2
DROP TABLE t1;
mysql-test/r/func_misc.result
View file @
dfc77d19
...
...
@@ -361,6 +361,19 @@ set optimizer_switch=@optimizer_switch_save;
drop view v_merge, vm;
drop table t1,tv;
#
# MDEV-4017 - GET_LOCK() with negative timeouts has strange behavior
#
SELECT GET_LOCK('ul1', NULL);
GET_LOCK('ul1', NULL)
NULL
Warnings:
Warning 1411 Incorrect timeout value: 'NULL' for function get_lock
SELECT GET_LOCK('ul1', -1);
GET_LOCK('ul1', -1)
NULL
Warnings:
Warning 1411 Incorrect timeout value: '-1' for function get_lock
#
# GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
#
# IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired
...
...
mysql-test/r/grant.result
View file @
dfc77d19
...
...
@@ -1689,6 +1689,7 @@ Assigning privileges without procs_priv table.
CREATE DATABASE mysqltest1;
CREATE PROCEDURE mysqltest1.test() SQL SECURITY DEFINER
SELECT 1;
CREATE FUNCTION mysqltest1.test() RETURNS INT RETURN 1;
GRANT EXECUTE ON FUNCTION mysqltest1.test TO mysqltest_1@localhost;
ERROR 42S02: Table 'mysql.procs_priv' doesn't exist
GRANT ALL PRIVILEGES ON test.* TO mysqltest_1@localhost;
...
...
@@ -2551,3 +2552,25 @@ ERROR 42000: Access denied for user 'untrusted'@'localhost' to database 'secret'
# Connection default
DROP USER untrusted@localhost;
DROP DATABASE secret;
#
# BUG#11759114 - '51401: GRANT TREATS NONEXISTENT FUNCTIONS/PRIVILEGES
# DIFFERENTLY'.
#
drop database if exists mysqltest_db1;
create database mysqltest_db1;
create user mysqltest_u1;
# Both GRANT statements below should fail with the same error.
grant execute on function mysqltest_db1.f1 to mysqltest_u1;
ERROR 42000: FUNCTION or PROCEDURE f1 does not exist
grant execute on procedure mysqltest_db1.p1 to mysqltest_u1;
ERROR 42000: FUNCTION or PROCEDURE p1 does not exist
# Let us show that GRANT behaviour for routines is consistent
# with GRANT behaviour for tables. Attempt to grant privilege
# on non-existent table also results in an error.
grant select on mysqltest_db1.t1 to mysqltest_u1;
ERROR 42S02: Table 'mysqltest_db1.t1' doesn't exist
show grants for mysqltest_u1;
Grants for mysqltest_u1@%
GRANT USAGE ON *.* TO 'mysqltest_u1'@'%'
drop database mysqltest_db1;
drop user mysqltest_u1;
mysql-test/r/innodb_load_xa.result
View file @
dfc77d19
...
...
@@ -19,3 +19,5 @@ mysqld-bin.000001 # Query # # use `test`; insert t1 values (2)
mysqld-bin.000001 # Query # # COMMIT
drop table t1;
uninstall plugin innodb;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
mysql-test/r/m
erge
_recover.result
→
mysql-test/r/m
yisam
_recover.result
View file @
dfc77d19
#
# Test of MyISAM MRG tables with corrupted children.
# Tests for corrupted MyISAM tables and MyISAMMRG tables with corrupted
# children..
#
# Run with --myisam-recover=force option.
#
# Preparation: we need to make sure that the merge parent
...
...
@@ -44,20 +46,20 @@ drop procedure p_create;
# Switching to connection 'default'
#
#
# We have to disable the ps-protocol, to avoid
# We have to disable the ps-protocol, to avoid
# "Prepared statement needs to be re-prepared" errors
# -- table def versions change all the time with full table cache.
#
#
drop table if exists t1, t1_mrg, t1_copy;
#
# Prepare a MERGE engine table, that refers to a corrupted
# child.
#
#
create table t1 (a int, key(a)) engine=myisam;
create table t1_mrg (a int) union (t1) engine=merge;
#
# Create a table with a corrupted index file:
# save an old index file, insert more rows,
# save an old index file, insert more rows,
# overwrite the new index file with the old one.
#
insert into t1 (a) values (1), (2), (3);
...
...
@@ -101,3 +103,48 @@ execute stmt;
deallocate prepare stmt;
set @@global.table_definition_cache=default;
set @@global.table_open_cache=default;
#
# 18075170 - sql node restart required to avoid deadlock after
# restore
#
# Check that auto-repair for MyISAM tables can now happen in the
# middle of transaction, without aborting it.
create table t1 (a int, key(a)) engine=myisam;
create table t2 (a int);
insert into t2 values (1);
# Create a table with a corrupted index file:
# save an old index file, insert more rows,
# overwrite the new index file with the old one.
insert into t1 (a) values (1);
flush table t1;
insert into t1 (a) values (4);
flush table t1;
# Check table is needed to mark the table as crashed.
check table t1;
Table Op Msg_type Msg_text
test.t1 check warning Size of datafile is: 14 Should be: 7
test.t1 check error Record-count is not ok; is 2 Should be: 1
test.t1 check warning Found 2 key parts. Should be: 1
test.t1 check error Corrupt
# At this point we have a corrupt t1
set autocommit = 0;
select * from t2;
a
1
# Without fix select from t1 will break the transaction. After the fix
# transaction should be active and should hold lock on table t2. Alter
# table from con2 will wait only if the transaction is not broken.
select * from t1;
a
1
4
Warnings:
Error 145 Table 't1' is marked as crashed and should be repaired
Error 1194 Table 't1' is marked as crashed and should be repaired
Error 1034 Number of rows changed from 1 to 2
ALTER TABLE t2 ADD val INT;
# With fix we should have alter table waiting for t2 lock here.
ROLLBACK;
SET autocommit = 1;
# Cleanup
drop table t1, t2;
mysql-test/r/mysqld--help.result
View file @
dfc77d19
...
...
@@ -634,6 +634,9 @@ The following options may be given as the first argument:
--performance-schema-max-cond-instances=#
Maximum number of instrumented condition objects. Use 0
to disable, -1 for automated sizing.
--performance-schema-max-digest-length=#
Maximum length considered for digest text, when stored in
performance_schema tables.
--performance-schema-max-file-classes=#
Maximum number of file instruments.
--performance-schema-max-file-handles=#
...
...
@@ -1242,6 +1245,7 @@ performance-schema-hosts-size -1
performance-schema-instrument
performance-schema-max-cond-classes 80
performance-schema-max-cond-instances -1
performance-schema-max-digest-length 1024
performance-schema-max-file-classes 50
performance-schema-max-file-handles 32768
performance-schema-max-file-instances -1
...
...
mysql-test/r/plugin.result
View file @
dfc77d19
...
...
@@ -5,7 +5,7 @@ Warning 1266 Using storage engine MyISAM for table 't1'
DROP TABLE t1;
INSTALL PLUGIN example SONAME 'ha_example';
INSTALL PLUGIN EXAMPLE SONAME 'ha_example';
ERROR HY000:
Functio
n 'EXAMPLE' already
exists
ERROR HY000:
Plugi
n 'EXAMPLE' already
installed
UNINSTALL PLUGIN example;
INSTALL SONAME 'ha_example';
select * from information_schema.plugins where plugin_library like 'ha_example%';
...
...
Prev
1
2
3
4
5
…
18
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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