Skip to content
Permalink
Browse files

Merge branch '5.5' into 10.0

  • Loading branch information...
vuvova committed Apr 21, 2017
2 parents e056d1f + c6ee3fe commit 8d75a7533ee80efa5275a058dfadf8947e5857a6
Showing with 670 additions and 173 deletions.
  1. +5 −8 CMakeLists.txt
  2. +0 −1 client/client_priv.h
  3. +1 −1 client/mysql.cc
  4. +1 −2 client/mysql_upgrade.c
  5. +1 −1 client/mysqladmin.cc
  6. +1 −1 client/mysqlcheck.c
  7. +2 −3 client/mysqldump.c
  8. +1 −1 client/mysqlimport.c
  9. +1 −1 client/mysqlshow.c
  10. +1 −1 client/mysqlslap.c
  11. +11 −11 client/mysqltest.cc
  12. +0 −1 include/mysql/psi/mysql_file.h
  13. +3 −3 include/welcome_copyright_notice.h
  14. +0 −1 mysql-test/disabled.def
  15. +4 −7 mysql-test/mysql-test-run.pl
  16. +2 −2 mysql-test/r/events_2.result
  17. +1 −1 mysql-test/r/innodb_icp.result
  18. +1 −1 mysql-test/r/join_outer.result
  19. +1 −1 mysql-test/r/join_outer_jcl6.result
  20. +1 −1 mysql-test/r/loaddata.result
  21. +8 −6 mysql-test/r/log_tables-big.result
  22. +2 −2 mysql-test/r/myisam_icp.result
  23. +63 −0 mysql-test/r/mysqldump.result
  24. +4 −4 mysql-test/r/subselect3.result
  25. +4 −4 mysql-test/r/subselect3_jcl6.result
  26. +5 −3 mysql-test/r/subselect4.result
  27. +1 −1 mysql-test/r/subselect_innodb.result
  28. +111 −0 mysql-test/r/subselect_mat.result
  29. +1 −1 mysql-test/r/subselect_sj.result
  30. +1 −1 mysql-test/r/subselect_sj_jcl6.result
  31. +111 −0 mysql-test/r/subselect_sj_mat.result
  32. +11 −0 mysql-test/r/symlink.result
  33. +2 −2 mysql-test/suite/maria/icp.result
  34. +1 −1 mysql-test/t/events_2.test
  35. +1 −1 mysql-test/t/loaddata.test
  36. +10 −6 mysql-test/t/log_tables-big.test
  37. +50 −0 mysql-test/t/mysqldump.test
  38. +89 −0 mysql-test/t/subselect_sj_mat.test
  39. +16 −0 mysql-test/t/symlink.test
  40. +1 −2 mysql-test/valgrind.supp
  41. +5 −1 mysys/mysys_priv.h
  42. +48 −19 scripts/mysql_secure_installation.sh
  43. +0 −1 scripts/mysqld_safe.sh
  44. +2 −2 sql-common/client.c
  45. +15 −6 sql/item_strfunc.cc
  46. +1 −1 sql/item_sum.cc
  47. +4 −3 sql/item_xmlfunc.cc
  48. +2 −2 sql/sp.cc
  49. +1 −1 sql/sql_class.cc
  50. +1 −0 sql/sql_const.h
  51. +39 −39 sql/sql_load.cc
  52. +2 −2 sql/sql_parse.cc
  53. +1 −1 sql/sql_select.cc
  54. +15 −0 sql/sql_table.cc
  55. +0 −2 storage/myisam/mi_delete_table.c
  56. +2 −2 support-files/CMakeLists.txt
  57. +2 −8 support-files/mysql.server.sh
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2014, Oracle and/or its affiliates.
# Copyright (c) 2008, 2014, Monty Program Ab
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
# Copyright (c) 2008, 2017, 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
@@ -241,12 +241,9 @@ IF (WITH_ASAN)
ENDIF()
ENDIF()


OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
IF(ENABLE_DEBUG_SYNC)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
ENDIF()
# Always enable debug sync for debug builds.
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")

OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
@@ -117,4 +117,3 @@ enum options_client
Name of the performance schema database.
*/
#define PERFORMANCE_SCHEMA_DB_NAME "performance_schema"

@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, MariaDB
Copyright (c) 2009, 2017, 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
@@ -1,6 +1,6 @@
/*
Copyright (c) 2006, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 2017, 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
@@ -1140,4 +1140,3 @@ int main(int argc, char **argv)
my_end(my_end_arg);
exit(0);
}

@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 2017, 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
@@ -1,6 +1,6 @@
/*
Copyright (c) 2001, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 2017, 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
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 2017, 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
@@ -2179,7 +2179,6 @@ static void print_comment(FILE *sql_file, my_bool is_error, const char *format,
print_xml_comment(sql_file, strlen(comment_buff), comment_buff);
}


/*
create_delimiter
Generate a new (null-terminated) string that does not exist in query
@@ -2524,7 +2523,7 @@ static uint dump_routines_for_db(char *db)
query_buff);
print_comment(sql_file, 1,
"-- does %s have permissions on mysql.proc?\n\n",
current_user);
fix_for_comment(current_user));
maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!",
current_user, query_buff);
}
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2011, 2016, MariaDB
Copyright (c) 2011, 2017, 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
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 2017, 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
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005, 2015, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
Copyright (c) 2010, 2017, 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
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, Monty Program Ab.
Copyright (c) 2009, 2017, 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
@@ -1062,7 +1062,7 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query,
if (!(v= var_get(p, &p, 0, 0)))
{
report_or_die( "Bad variable in eval");
return;
DBUG_VOID_RETURN;
}
dynstr_append_mem(query_eval, v->str_val, v->str_val_len);
}
@@ -1777,7 +1777,7 @@ static int run_command(char* cmd,
if (!(res_file= popen(cmd, "r")))
{
report_or_die("popen(\"%s\", \"r\") failed", cmd);
return -1;
DBUG_RETURN(-1);
}

while (fgets(buf, sizeof(buf), res_file))
@@ -2685,7 +2685,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
report_or_die("Query '%s' didn't return a result set", ds_query.str);
dynstr_free(&ds_query);
eval_expr(var, "", 0);
return;
DBUG_VOID_RETURN;
}
dynstr_free(&ds_query);

@@ -2876,7 +2876,7 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
dynstr_free(&ds_query);
dynstr_free(&ds_col);
eval_expr(var, "", 0);
return;
DBUG_VOID_RETURN;
}

{
@@ -2901,7 +2901,7 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
ds_col.str, ds_query.str);
dynstr_free(&ds_query);
dynstr_free(&ds_col);
return;
DBUG_VOID_RETURN;
}
DBUG_PRINT("info", ("Found column %d with name '%s'",
i, fields[i].name));
@@ -3349,7 +3349,7 @@ void do_exec(struct st_command *command)
if (!*cmd)
{
report_or_die("Missing argument in exec");
return;
DBUG_VOID_RETURN;
}
command->last_argument= command->end;

@@ -3383,7 +3383,7 @@ void do_exec(struct st_command *command)
dynstr_free(&ds_cmd);
if (command->abort_on_error)
report_or_die("popen(\"%s\", \"r\") failed", command->first_argument);
return;
DBUG_VOID_RETURN;
}

ds_result= &ds_res;
@@ -3441,7 +3441,7 @@ void do_exec(struct st_command *command)
ds_cmd.str, error, status, errno,
ds_res.str);
dynstr_free(&ds_cmd);
return;
DBUG_VOID_RETURN;
}

DBUG_PRINT("info",
@@ -3574,7 +3574,7 @@ void do_system(struct st_command *command)
if (strlen(command->first_argument) == 0)
{
report_or_die("Missing arguments to system, nothing to do!");
return;
DBUG_VOID_RETURN;
}

init_dynamic_string(&ds_cmd, 0, command->query_len + 64, 256);
@@ -4561,7 +4561,7 @@ void do_perl(struct st_command *command)
if (command->abort_on_error)
die("popen(\"%s\", \"r\") failed", buf);
dynstr_free(&ds_delimiter);
return;
DBUG_VOID_RETURN;
}

while (fgets(buf, sizeof(buf), res_file))
@@ -1423,4 +1423,3 @@ inline_mysql_file_sync(
/** @} (end of group File_instrumentation) */

#endif

@@ -1,5 +1,5 @@
/* Copyright (c) 2011, 2016, Oracle and/or its affiliates.
Copyright (c) 2011, 2016, MariaDB
/* Copyright (c) 2011, 2017, Oracle and/or its affiliates.
Copyright (c) 2011, 2017, 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
@@ -17,7 +17,7 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_

#define COPYRIGHT_NOTICE_CURRENT_YEAR "2016"
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2017"

/*
This define specifies copyright notice which is displayed by every MySQL
@@ -12,7 +12,6 @@
tablespace : disabled in MariaDB (no TABLESPACE table attribute)
events_time_zone : Test is not predictable as it depends on precise timing.
read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists
log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
#show_explain : Psergey: random timeout in range-checked-for-each record query.
ssl_crl_clients_valid : broken upstream
@@ -3222,13 +3222,10 @@ ($)
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
{
# Copy datadir from installed system db
for my $path ( "$opt_vardir", "$opt_vardir/..") {
my $install_db= "$path/install.db";
copytree($install_db, $datadir)
if -d $install_db;
}
mtr_error("Failed to copy system db to '$datadir'")
unless -d $datadir;
my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/..";
my $install_db= "$path/install.db";
copytree($install_db, $datadir) if -d $install_db;
mtr_error("Failed to copy system db to '$datadir'") unless -d $datadir;
}
}
else
@@ -1,10 +1,10 @@
drop database if exists events_test;
create database events_test;
use events_test;
create event e_26 on schedule at '2027-01-01 00:00:00' disable do set @a = 5;
create event e_26 on schedule at '2037-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
events_test e_26 set @a = 5 root@localhost 2027-01-01 00:00:00 DROP
events_test e_26 set @a = 5 root@localhost 2037-01-01 00:00:00 DROP
drop event e_26;
create event e_26 on schedule at NULL disable do set @a = 5;
ERROR HY000: Incorrect AT value: 'NULL'
@@ -432,7 +432,7 @@ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using where
2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -1745,7 +1745,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
Warnings:
Note 1276 Field or reference 'test.t2.pk' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`pk` AS `pk`,<expr_cache><`test`.`t2`.`pk`>((select (`test`.`t3`.`pk` + if(isnull(`test`.`t4`.`pk`),0,`test`.`t4`.`pk`)) from `test`.`t3` left join `test`.`t4` on((`test`.`t4`.`pk` = `test`.`t3`.`pk`)) where (`test`.`t3`.`pk` = (`test`.`t2`.`pk` + 1000)) limit 1)) AS `t` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`pk` = (`test`.`t1`.`pk` + 1000)) and (`test`.`t1`.`pk` > 1000)) group by `test`.`t2`.`pk`
@@ -1756,7 +1756,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t4 eq_ref PRIMARY PRIMARY 4 test.t3.pk 1 100.00 Using index
Warnings:
Note 1276 Field or reference 'test.t2.pk' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`pk` AS `pk`,<expr_cache><`test`.`t2`.`pk`>((select (`test`.`t3`.`pk` + if(isnull(`test`.`t4`.`pk`),0,`test`.`t4`.`pk`)) from `test`.`t3` left join `test`.`t4` on((`test`.`t4`.`pk` = `test`.`t3`.`pk`)) where (`test`.`t3`.`pk` = (`test`.`t2`.`pk` + 1000)) limit 1)) AS `t` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`pk` = (`test`.`t1`.`pk` + 1000)) and (`test`.`t1`.`pk` > 1000)) group by `test`.`t2`.`pk`
@@ -316,7 +316,7 @@ FIELDS ESCAPED BY '\\'
TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n' (c0, c2);
ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA
ERROR HY000: Column 'c0' is not updatable

LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v3
FIELDS ESCAPED BY '\\'
@@ -1,29 +1,31 @@
set @@global.log_output = 'TABLE';
set session long_query_time=10;
select get_lock('bug27638', 1);
get_lock('bug27638', 1)
1
set session long_query_time=1;
truncate table mysql.slow_log;
select get_lock('bug27638', 2);
get_lock('bug27638', 2)
0
select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
select if (query_time >= '00:00:01', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
where sql_text = 'select get_lock(\'bug27638\', 2)';
qt sql_text
OK select get_lock('bug27638', 2)
truncate table mysql.slow_log;
select get_lock('bug27638', 60);
get_lock('bug27638', 60)
0
select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
select if (query_time >= '00:00:59', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
where sql_text = 'select get_lock(\'bug27638\', 60)';
qt sql_text
OK select get_lock('bug27638', 60)
truncate table mysql.slow_log;
select get_lock('bug27638', 101);
get_lock('bug27638', 101)
0
select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
select if (query_time >= '00:01:40', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
where sql_text = 'select get_lock(\'bug27638\', 101)';
qt sql_text
OK select get_lock('bug27638', 101)
select release_lock('bug27638');
release_lock('bug27638')
1
set @@global.log_output=default;
@@ -436,7 +436,7 @@ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
@@ -800,7 +800,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where
1 PRIMARY t2 ref g g 5 test.t.c 19 Using where
2 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 64 Using where; Using index
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index condition; Using where
2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where
SELECT COUNT(*) FROM t1 AS t, t2
WHERE c = g
AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b)

0 comments on commit 8d75a75

Please sign in to comment.
You can’t perform that action at this time.