Skip to content

Commit

Permalink
MDEV-6066: Merge new defaults from 5.6 and 5.7
Browse files Browse the repository at this point in the history
cosmetic fixes. test fixes.
  • Loading branch information
vuvova committed Sep 4, 2015
1 parent e3982ce commit bc12d5f
Show file tree
Hide file tree
Showing 20 changed files with 81 additions and 79 deletions.
6 changes: 3 additions & 3 deletions include/my_getopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ C_MODE_START
#define GET_DOUBLE 14
#define GET_FLAGSET 15

#define GET_ASK_ADDR 128
#define GET_AUTO 64
#define GET_TYPE_MASK 63
#define GET_ASK_ADDR 128
#define GET_AUTO 64
#define GET_TYPE_MASK 63

/**
Enumeration of the my_option::arg_type attributes.
Expand Down
1 change: 1 addition & 0 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4434,6 +4434,7 @@ ($$)
qr|Failed to setup SSL|,
qr|SSL error: Failed to set ciphers to use|,
qr/Plugin 'InnoDB' will be forced to shutdown/,
qr|Could not increase number of max_open_files to more than|,
);

my $matched_lines= [];
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/r/grant_lowercase_fs.result
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
create database db1;
create user user_1@localhost;
create user USER_1@localhost;
GRANT CREATE ON db1.* to user_1@localhost;
GRANT SELECT ON db1.* to USER_1@localhost;
CREATE TABLE t1(f1 int);
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/r/mysqld--help.result
Original file line number Diff line number Diff line change
Expand Up @@ -1415,9 +1415,9 @@ sync-master-info 10000
sync-relay-log 10000
sync-relay-log-info 10000
sysdate-is-now FALSE
table-cache 2000
table-cache 431
table-definition-cache 400
table-open-cache 2000
table-open-cache 431
tc-heuristic-recover COMMIT
thread-cache-size 0
thread-pool-idle-timeout 60
Expand Down
14 changes: 7 additions & 7 deletions mysql-test/r/mysqldump.result
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

set global sql_mode='';
set global sql_mode=default;
drop table t1;
#
# Bug#2705 mysqldump --tab extra output
Expand Down Expand Up @@ -2717,7 +2717,7 @@ a2
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
testref INSERT test1 BEGIN
INSERT INTO test2 SET a2 = NEW.a1; END BEFORE NULL root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
INSERT INTO test2 SET a2 = NEW.a1; END BEFORE NULL NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
SELECT * FROM `test1`;
a1
1
Expand Down Expand Up @@ -2789,7 +2789,7 @@ UNLOCK TABLES;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11)
RETURN a+b ;;
Expand All @@ -2806,7 +2806,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1) CHARSET latin1
begin
Expand Down Expand Up @@ -2843,7 +2843,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT)
BEGIN SELECT a+b INTO c; end ;;
Expand All @@ -2860,7 +2860,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc2`(OUT a INT)
BEGIN
Expand Down Expand Up @@ -3849,7 +3849,7 @@ create procedure mysqldump_test_db.sp1() select 'hello';
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`user1`@`%` PROCEDURE `sp1`()
select 'hello' ;;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/roles/grant_role_auto_create_user.result
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ ERROR 42000: You are not allowed to create a user with GRANT
drop user foo@localhost;
drop user bar@localhost;
drop role auto_create;
drop user auto_create;
drop database db;
2 changes: 1 addition & 1 deletion mysql-test/suite/roles/grant_role_auto_create_user.test
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ grant auto_create to foo2@localhost identified by 'pass';
drop user foo@localhost;
drop user bar@localhost;
drop role auto_create;
drop user auto_create;
drop database db;

23 changes: 16 additions & 7 deletions mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 65535
@@ -85,7 +85,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN AUTO
DEFAULT_VALUE 150
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 1
VARIABLE_COMMENT The number of outstanding connection requests MariaDB can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 65535
@@ -144,7 +144,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
Expand Down Expand Up @@ -243,7 +243,7 @@
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
@@ -1275,7 +1275,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN AUTO
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
Expand Down Expand Up @@ -278,6 +278,15 @@
VARIABLE_COMMENT Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 8
@@ -1474,7 +1474,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -1695,7 +1695,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 31536000
Expand Down Expand Up @@ -307,7 +316,7 @@
NUMERIC_MAX_VALUE 4294967295
@@ -1919,7 +1919,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
DEFAULT_VALUE 4194304
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
Expand Down Expand Up @@ -1162,7 +1171,7 @@
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
@@ -4467,7 +4467,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN AUTO
DEFAULT_VALUE 400
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
Expand All @@ -1172,7 +1181,7 @@
NUMERIC_MAX_VALUE 524288
@@ -4481,7 +4481,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 400
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/t/grant_lowercase_fs.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Bug#41049 does syntax "grant" case insensitive?
#
create database db1;
create user user_1@localhost;
create user USER_1@localhost;
GRANT CREATE ON db1.* to user_1@localhost;
GRANT SELECT ON db1.* to USER_1@localhost;

Expand Down
7 changes: 5 additions & 2 deletions mysql-test/t/mysqldump.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
call mtr.add_suppression("@003f.frm' \\(errno: 22\\)");

#select * from mysql.user;
#checksum table mysql.user;
# Embedded server doesn't support external clients
--source include/not_embedded.inc

Expand Down Expand Up @@ -139,7 +140,7 @@ create table t1(a int);
set global sql_mode='ANSI_QUOTES';
--exec $MYSQL_DUMP --comments=0 test
--exec $MYSQL_DUMP --comments=0 --compatible=ansi test
set global sql_mode='';
set global sql_mode=default;
drop table t1;

--echo #
Expand Down Expand Up @@ -2488,3 +2489,5 @@ drop table t1;
select * from t1;
drop table t1;
--remove_file $MYSQLTEST_VARDIR/tmp/mysqldump-test.out
#select * from mysql.user;
#checksum table mysql.user;
4 changes: 2 additions & 2 deletions mysys/my_getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ enum enum_special_opt

char *disabled_my_option= (char*) "0";
char *enabled_my_option= (char*) "1";
char *autoset_my_option= (char*) "";
char *autoset_my_option= (char*) "auto";

/*
This is a flag that can be set in client programs. 0 means that
Expand Down Expand Up @@ -467,7 +467,7 @@ int handle_options(int *argc, char ***argv,
if (optend)
{
my_getopt_error_reporter(ERROR_LEVEL,
"%s: automatic setup request of "
"%s: automatically set "
"option '--%s' cannot take an argument",
my_progname, optp->name);

Expand Down
2 changes: 1 addition & 1 deletion sql/set_var.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
option.value= (uchar **)global_var_ptr();
option.def_value= def_val;
option.app_type= this;
option.var_type= flags & AUTO_SET ? GET_AUTO : 0;

if (chain->last)
chain->last->next= this;
else
chain->first= this;
chain->last= this;
fix_auto_flag();
}

bool sys_var::update(THD *thd, set_var *var)
Expand Down
6 changes: 0 additions & 6 deletions sql/set_var.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ class sys_var
const char *const deprecation_substitute;
bool is_os_charset; ///< true if the value is in character_set_filesystem

inline void fix_auto_flag()
{
if (flags & AUTO_SET)
option.var_type|= GET_AUTO;
}

public:
sys_var(sys_var_chain *chain, const char *name_arg, const char *comment,
int flag_args, ptrdiff_t off, int getopt_id,
Expand Down
Loading

0 comments on commit bc12d5f

Please sign in to comment.