Merge remote-tracking branch 'mysql/5.5' into 5.5
This commit is contained in:
commit
663068c6ee
@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2006, 2014, Oracle and/or its affiliates.
|
# Copyright (c) 2006, 2017, Oracle and/or its affiliates.
|
||||||
# Copyright (c) 2008, 2014, Monty Program Ab
|
# Copyright (c) 2008, 2017, MariaDB
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -239,12 +239,9 @@ IF (WITH_ASAN)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# Always enable debug sync for debug builds.
|
||||||
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
||||||
IF(ENABLE_DEBUG_SYNC)
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_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()
|
|
||||||
|
|
||||||
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
|
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
|
||||||
IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
|
IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
|
||||||
|
@ -114,4 +114,3 @@ enum options_client
|
|||||||
Name of the performance schema database.
|
Name of the performance schema database.
|
||||||
*/
|
*/
|
||||||
#define PERFORMANCE_SCHEMA_DB_NAME "performance_schema"
|
#define PERFORMANCE_SCHEMA_DB_NAME "performance_schema"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
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
|
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
|
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) 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -1095,4 +1095,3 @@ end:
|
|||||||
my_end(my_end_arg);
|
my_end(my_end_arg);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2010, 2016, Monty Program Ab.
|
Copyright (c) 2010, 2017, Monty Program Ab.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2001, 2011, Oracle and/or its affiliates.
|
Copyright (c) 2001, 2011, 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
|
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
|
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) 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -2049,7 +2049,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);
|
print_xml_comment(sql_file, strlen(comment_buff), comment_buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
create_delimiter
|
create_delimiter
|
||||||
Generate a new (null-terminated) string that does not exist in query
|
Generate a new (null-terminated) string that does not exist in query
|
||||||
@ -2391,7 +2390,7 @@ static uint dump_routines_for_db(char *db)
|
|||||||
query_buff);
|
query_buff);
|
||||||
print_comment(sql_file, 1,
|
print_comment(sql_file, 1,
|
||||||
"-- does %s have permissions on mysql.proc?\n\n",
|
"-- 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);
|
maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!", current_user, query_buff);
|
||||||
}
|
}
|
||||||
else if (strlen(row[2]))
|
else if (strlen(row[2]))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
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
|
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
|
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) 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
|
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
|
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) 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
|
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
|
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) 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2011, 2016, Oracle and/or its affiliates.
|
/* Copyright (c) 2011, 2017, 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#ifndef _welcome_copyright_notice_h_
|
#ifndef _welcome_copyright_notice_h_
|
||||||
#define _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
|
This define specifies copyright notice which is displayed by every MySQL
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
tablespace : disabled in MariaDB (no TABLESPACE table attribute)
|
tablespace : disabled in MariaDB (no TABLESPACE table attribute)
|
||||||
events_time_zone : Test is not predictable as it depends on precise timing.
|
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
|
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
|
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
|
||||||
file_contents : MDEV-6526 these files are not installed anymore
|
file_contents : MDEV-6526 these files are not installed anymore
|
||||||
lowercase_fs_on : lower_case_table_names=0 is not an error until 10.1
|
lowercase_fs_on : lower_case_table_names=0 is not an error until 10.1
|
||||||
|
@ -3188,13 +3188,10 @@ sub mysql_server_start($) {
|
|||||||
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
|
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
|
||||||
{
|
{
|
||||||
# Copy datadir from installed system db
|
# Copy datadir from installed system db
|
||||||
for my $path ( "$opt_vardir", "$opt_vardir/..") {
|
my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/..";
|
||||||
my $install_db= "$path/install.db";
|
my $install_db= "$path/install.db";
|
||||||
copytree($install_db, $datadir)
|
copytree($install_db, $datadir) if -d $install_db;
|
||||||
if -d $install_db;
|
mtr_error("Failed to copy system db to '$datadir'") unless -d $datadir;
|
||||||
}
|
|
||||||
mtr_error("Failed to copy system db to '$datadir'")
|
|
||||||
unless -d $datadir;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
drop database if exists events_test;
|
drop database if exists events_test;
|
||||||
create database events_test;
|
create database events_test;
|
||||||
use 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;
|
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
|
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;
|
drop event e_26;
|
||||||
create event e_26 on schedule at NULL disable do set @a = 5;
|
create event e_26 on schedule at NULL disable do set @a = 5;
|
||||||
ERROR HY000: Incorrect AT value: 'NULL'
|
ERROR HY000: Incorrect AT value: 'NULL'
|
||||||
|
@ -316,7 +316,7 @@ FIELDS ESCAPED BY '\\'
|
|||||||
TERMINATED BY ','
|
TERMINATED BY ','
|
||||||
ENCLOSED BY '"'
|
ENCLOSED BY '"'
|
||||||
LINES TERMINATED BY '\n' (c0, c2);
|
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
|
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v3
|
||||||
FIELDS ESCAPED BY '\\'
|
FIELDS ESCAPED BY '\\'
|
||||||
|
@ -1,29 +1,31 @@
|
|||||||
|
set @@global.log_output = 'TABLE';
|
||||||
set session long_query_time=10;
|
set session long_query_time=10;
|
||||||
select get_lock('bug27638', 1);
|
select get_lock('bug27638', 1);
|
||||||
get_lock('bug27638', 1)
|
get_lock('bug27638', 1)
|
||||||
1
|
1
|
||||||
set session long_query_time=1;
|
set session long_query_time=1;
|
||||||
truncate table mysql.slow_log;
|
|
||||||
select get_lock('bug27638', 2);
|
select get_lock('bug27638', 2);
|
||||||
get_lock('bug27638', 2)
|
get_lock('bug27638', 2)
|
||||||
0
|
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
|
qt sql_text
|
||||||
OK select get_lock('bug27638', 2)
|
OK select get_lock('bug27638', 2)
|
||||||
truncate table mysql.slow_log;
|
|
||||||
select get_lock('bug27638', 60);
|
select get_lock('bug27638', 60);
|
||||||
get_lock('bug27638', 60)
|
get_lock('bug27638', 60)
|
||||||
0
|
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
|
qt sql_text
|
||||||
OK select get_lock('bug27638', 60)
|
OK select get_lock('bug27638', 60)
|
||||||
truncate table mysql.slow_log;
|
|
||||||
select get_lock('bug27638', 101);
|
select get_lock('bug27638', 101);
|
||||||
get_lock('bug27638', 101)
|
get_lock('bug27638', 101)
|
||||||
0
|
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
|
qt sql_text
|
||||||
OK select get_lock('bug27638', 101)
|
OK select get_lock('bug27638', 101)
|
||||||
select release_lock('bug27638');
|
select release_lock('bug27638');
|
||||||
release_lock('bug27638')
|
release_lock('bug27638')
|
||||||
1
|
1
|
||||||
|
set @@global.log_output=default;
|
||||||
|
@ -5308,6 +5308,69 @@ a
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP DATABASE db_20772273;
|
DROP DATABASE db_20772273;
|
||||||
|
#
|
||||||
|
# Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERY
|
||||||
|
#
|
||||||
|
CREATE DATABASE bug25717383;
|
||||||
|
use bug25717383;
|
||||||
|
CREATE TABLE `tab
|
||||||
|
one` (a int);
|
||||||
|
CREATE VIEW `view
|
||||||
|
one` as SELECT * FROM `tab
|
||||||
|
one`;
|
||||||
|
CREATE PROCEDURE `proc
|
||||||
|
one`() SELECT * from `tab
|
||||||
|
one`;
|
||||||
|
CREATE TEMPORARY TABLE `temp
|
||||||
|
one` (id INT);
|
||||||
|
CREATE TRIGGER `trig
|
||||||
|
one` BEFORE INSERT ON `tab
|
||||||
|
one` FOR EACH ROW SET NEW.a = 1;
|
||||||
|
CREATE EVENT `event
|
||||||
|
one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5;
|
||||||
|
SHOW TABLES FROM bug25717383;
|
||||||
|
Tables_in_bug25717383
|
||||||
|
tab
|
||||||
|
one
|
||||||
|
view
|
||||||
|
one
|
||||||
|
SHOW TRIGGERS FROM bug25717383;
|
||||||
|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||||
|
trig
|
||||||
|
one INSERT tab
|
||||||
|
one SET NEW.a = 1 BEFORE NULL root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
|
SHOW EVENTS FROM bug25717383;
|
||||||
|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||||
|
bug25717383 event
|
||||||
|
one root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci latin1_swedish_ci
|
||||||
|
SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
|
||||||
|
WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
|
||||||
|
ORDER BY ROUTINE_NAME;
|
||||||
|
ROUTINE_NAME
|
||||||
|
proc
|
||||||
|
one
|
||||||
|
SHOW TABLES FROM bug25717383;
|
||||||
|
Tables_in_bug25717383
|
||||||
|
tab
|
||||||
|
one
|
||||||
|
view
|
||||||
|
one
|
||||||
|
SHOW TRIGGERS FROM bug25717383;
|
||||||
|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||||
|
trig
|
||||||
|
one INSERT tab
|
||||||
|
one SET NEW.a = 1 BEFORE NULL root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||||
|
SHOW EVENTS FROM bug25717383;
|
||||||
|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||||
|
bug25717383 event
|
||||||
|
one root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci latin1_swedish_ci
|
||||||
|
SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
|
||||||
|
WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
|
||||||
|
ORDER BY ROUTINE_NAME;
|
||||||
|
ROUTINE_NAME
|
||||||
|
proc
|
||||||
|
one
|
||||||
|
DROP DATABASE bug25717383;
|
||||||
Usage: mysqldump [OPTIONS] database [tables]
|
Usage: mysqldump [OPTIONS] database [tables]
|
||||||
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
|
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
|
||||||
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
|
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
|
||||||
|
@ -213,3 +213,14 @@ t2 CREATE TABLE `t2` (
|
|||||||
PRIMARY KEY (`a`)
|
PRIMARY KEY (`a`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
drop tables t1, t2;
|
drop tables t1, t2;
|
||||||
|
#
|
||||||
|
# Test for bug #25514146 DB_NAME IS IGNORED WHEN CREATING TABLE
|
||||||
|
# WITH DATA DIRECTORY
|
||||||
|
#
|
||||||
|
# Make sure we have no current database
|
||||||
|
CREATE DATABASE x;
|
||||||
|
USE x;
|
||||||
|
DROP DATABASE x;
|
||||||
|
CREATE TABLE test.t1(id INT(11)) ENGINE MYISAM
|
||||||
|
DATA DIRECTORY "MYSQLTEST_VARDIR/tmp";
|
||||||
|
DROP TABLE test.t1;
|
||||||
|
@ -13,7 +13,7 @@ use events_test;
|
|||||||
# mysql.event intact checking end
|
# mysql.event intact checking end
|
||||||
#
|
#
|
||||||
|
|
||||||
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;
|
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
|
||||||
drop event e_26;
|
drop event e_26;
|
||||||
--error ER_WRONG_VALUE
|
--error ER_WRONG_VALUE
|
||||||
|
@ -294,7 +294,7 @@ SELECT * FROM v2;
|
|||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--error ER_LOAD_DATA_INVALID_COLUMN
|
--error ER_NONUPDATEABLE_COLUMN
|
||||||
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
|
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
|
||||||
FIELDS ESCAPED BY '\\'
|
FIELDS ESCAPED BY '\\'
|
||||||
TERMINATED BY ','
|
TERMINATED BY ','
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
# check that CSV engine was compiled in
|
# check that CSV engine was compiled in
|
||||||
--source include/have_csv.inc
|
--source include/have_csv.inc
|
||||||
|
|
||||||
|
set @@global.log_output = 'TABLE';
|
||||||
|
|
||||||
connect (con1,localhost,root,,);
|
connect (con1,localhost,root,,);
|
||||||
connect (con2,localhost,root,,);
|
connect (con2,localhost,root,,);
|
||||||
|
|
||||||
@ -18,18 +20,20 @@ set session long_query_time=10;
|
|||||||
select get_lock('bug27638', 1);
|
select get_lock('bug27638', 1);
|
||||||
connection con2;
|
connection con2;
|
||||||
set session long_query_time=1;
|
set session long_query_time=1;
|
||||||
truncate table mysql.slow_log;
|
|
||||||
select get_lock('bug27638', 2);
|
select get_lock('bug27638', 2);
|
||||||
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
|
||||||
truncate table mysql.slow_log;
|
where sql_text = 'select get_lock(\'bug27638\', 2)';
|
||||||
select get_lock('bug27638', 60);
|
select get_lock('bug27638', 60);
|
||||||
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
|
||||||
truncate table mysql.slow_log;
|
where sql_text = 'select get_lock(\'bug27638\', 60)';
|
||||||
select get_lock('bug27638', 101);
|
select get_lock('bug27638', 101);
|
||||||
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)';
|
||||||
connection con1;
|
connection con1;
|
||||||
select release_lock('bug27638');
|
select release_lock('bug27638');
|
||||||
connection default;
|
connection default;
|
||||||
|
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
disconnect con2;
|
disconnect con2;
|
||||||
|
|
||||||
|
set @@global.log_output=default;
|
||||||
|
@ -2480,6 +2480,56 @@ DROP TABLE t1;
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP DATABASE db_20772273;
|
DROP DATABASE db_20772273;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERY
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
|
||||||
|
CREATE DATABASE bug25717383;
|
||||||
|
use bug25717383;
|
||||||
|
|
||||||
|
CREATE TABLE `tab
|
||||||
|
one` (a int);
|
||||||
|
CREATE VIEW `view
|
||||||
|
one` as SELECT * FROM `tab
|
||||||
|
one`;
|
||||||
|
|
||||||
|
CREATE PROCEDURE `proc
|
||||||
|
one`() SELECT * from `tab
|
||||||
|
one`;
|
||||||
|
|
||||||
|
CREATE TEMPORARY TABLE `temp
|
||||||
|
one` (id INT);
|
||||||
|
|
||||||
|
CREATE TRIGGER `trig
|
||||||
|
one` BEFORE INSERT ON `tab
|
||||||
|
one` FOR EACH ROW SET NEW.a = 1;
|
||||||
|
|
||||||
|
CREATE EVENT `event
|
||||||
|
one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5;
|
||||||
|
|
||||||
|
SHOW TABLES FROM bug25717383;
|
||||||
|
SHOW TRIGGERS FROM bug25717383;
|
||||||
|
--replace_column 6 #
|
||||||
|
SHOW EVENTS FROM bug25717383;
|
||||||
|
|
||||||
|
SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
|
||||||
|
WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
|
||||||
|
ORDER BY ROUTINE_NAME;
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --triggers --events --routines --add-drop-database --databases bug25717383 > $MYSQLTEST_VARDIR/tmp/bug25717383.sql
|
||||||
|
|
||||||
|
SHOW TABLES FROM bug25717383;
|
||||||
|
SHOW TRIGGERS FROM bug25717383;
|
||||||
|
--replace_column 6 #
|
||||||
|
SHOW EVENTS FROM bug25717383;
|
||||||
|
|
||||||
|
SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES
|
||||||
|
WHERE ROUTINE_SCHEMA='bug25717383' AND ROUTINE_TYPE= 'PROCEDURE'
|
||||||
|
ORDER BY ROUTINE_NAME;
|
||||||
|
|
||||||
|
DROP DATABASE bug25717383;
|
||||||
|
|
||||||
#
|
#
|
||||||
# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
|
# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
|
||||||
#
|
#
|
||||||
|
@ -298,3 +298,19 @@ show create table t1;
|
|||||||
create table t2 like t1;
|
create table t2 like t1;
|
||||||
show create table t2;
|
show create table t2;
|
||||||
drop tables t1, t2;
|
drop tables t1, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Test for bug #25514146 DB_NAME IS IGNORED WHEN CREATING TABLE
|
||||||
|
--echo # WITH DATA DIRECTORY
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo # Make sure we have no current database
|
||||||
|
CREATE DATABASE x;
|
||||||
|
USE x;
|
||||||
|
DROP DATABASE x;
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
eval CREATE TABLE test.t1(id INT(11)) ENGINE MYISAM
|
||||||
|
DATA DIRECTORY "$MYSQLTEST_VARDIR/tmp";
|
||||||
|
|
||||||
|
DROP TABLE test.t1;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2005, 2015, Oracle and/or its affiliates.
|
# Copyright (c) 2005, 2015, Oracle and/or its affiliates.
|
||||||
# Copyright (c) 2008, 2016, MariaDB
|
# Copyright (c) 2008, 2017, MariaDB
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Library General Public
|
# modify it under the terms of the GNU Library General Public
|
||||||
@ -525,6 +525,15 @@
|
|||||||
fun:dl_open_worker
|
fun:dl_open_worker
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
libc pthread_exit 9
|
||||||
|
Memcheck:Leak
|
||||||
|
fun:malloc
|
||||||
|
fun:_dl_close_worker
|
||||||
|
fun:_dl_close
|
||||||
|
fun:_dl_catch_error
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is seen internally in the system libraries on 64-bit RHAS3.
|
# This is seen internally in the system libraries on 64-bit RHAS3.
|
||||||
#
|
#
|
||||||
|
@ -23,31 +23,37 @@ prog="mysqld"
|
|||||||
STARTTIMEOUT=120
|
STARTTIMEOUT=120
|
||||||
STOPTIMEOUT=60
|
STOPTIMEOUT=60
|
||||||
|
|
||||||
|
# Set in /etc/sysconfig/mysqld, will be passed to mysqld_safe
|
||||||
|
MYSQLD_OPTS=
|
||||||
|
|
||||||
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||||
|
|
||||||
lockfile=/var/lock/subsys/$prog
|
lockfile=/var/lock/subsys/$prog
|
||||||
|
|
||||||
|
|
||||||
# extract value of a MySQL option from config files
|
# Extract value of a MySQL option from config files
|
||||||
# Usage: get_mysql_option SECTION VARNAME DEFAULT
|
# Usage: get_mysql_option OPTION DEFAULT SECTION1 SECTION2 SECTIONN
|
||||||
# result is returned in $result
|
# Result is returned in $result
|
||||||
# We use my_print_defaults which prints all options from multiple files,
|
# We use my_print_defaults which prints all options from multiple files,
|
||||||
# with the more specific ones later; hence take the last match.
|
# with the more specific ones later; hence take the last match.
|
||||||
get_mysql_option(){
|
get_mysql_option () {
|
||||||
result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1`
|
option=$1
|
||||||
if [ -z "$result" ]; then
|
default=$2
|
||||||
# not found, use default
|
shift 2
|
||||||
result="$3"
|
result=$(/usr/bin/my_print_defaults "$@" | sed -n "s/^--${option}=//p" | tail -n 1)
|
||||||
fi
|
if [ -z "$result" ]; then
|
||||||
|
# not found, use default
|
||||||
|
result="${default}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_mysql_option mysqld datadir "/var/lib/mysql"
|
get_mysql_option datadir "/var/lib/mysql" mysqld
|
||||||
datadir="$result"
|
datadir="$result"
|
||||||
get_mysql_option mysqld socket "$datadir/mysql.sock"
|
get_mysql_option socket "$datadir/mysql.sock" mysqld
|
||||||
socketfile="$result"
|
socketfile="$result"
|
||||||
get_mysql_option mysqld_safe log-error "/var/log/mysqld.log"
|
get_mysql_option log-error "/var/log/mysqld.log" mysqld mysqld_safe
|
||||||
errlogfile="$result"
|
errlogfile="$result"
|
||||||
get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
|
get_mysql_option pid-file "/var/run/mysqld/mysqld.pid" mysqld mysqld_safe
|
||||||
mypidfile="$result"
|
mypidfile="$result"
|
||||||
|
|
||||||
case $socketfile in
|
case $socketfile in
|
||||||
@ -100,7 +106,7 @@ start(){
|
|||||||
# and some users might prefer to configure logging to syslog.)
|
# and some users might prefer to configure logging to syslog.)
|
||||||
# Note: set --basedir to prevent probes that might trigger SELinux
|
# Note: set --basedir to prevent probes that might trigger SELinux
|
||||||
# alarms, per bug #547485
|
# alarms, per bug #547485
|
||||||
$exec --datadir="$datadir" --socket="$socketfile" \
|
$exec $MYSQLD_OPTS --datadir="$datadir" --socket="$socketfile" \
|
||||||
--pid-file="$mypidfile" \
|
--pid-file="$mypidfile" \
|
||||||
--basedir=/usr --user=mysql >/dev/null 2>&1 &
|
--basedir=/usr --user=mysql >/dev/null 2>&1 &
|
||||||
safe_pid=$!
|
safe_pid=$!
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
This file was modified by Oracle on 2015-05-18 for 32-bit compatibility.
|
This file was modified by Oracle on 2015-05-18 for 32-bit compatibility.
|
||||||
|
|
||||||
Modifications copyright (c) 2015, Oracle and/or its affiliates. All rights
|
Modifications copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights
|
||||||
reserved. */
|
reserved. */
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
@ -551,6 +551,8 @@ int starordinary; /* is a leading * an ordinary character? */
|
|||||||
assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
|
assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
|
||||||
assert(OP(p->strip[p->pend[i]]) == ORPAREN);
|
assert(OP(p->strip[p->pend[i]]) == ORPAREN);
|
||||||
(void) dupl(p, p->pbegin[i]+1, p->pend[i]);
|
(void) dupl(p, p->pbegin[i]+1, p->pend[i]);
|
||||||
|
if (p->error != 0)
|
||||||
|
break; /* purecov: inspected */
|
||||||
EMIT(O_BACK, i);
|
EMIT(O_BACK, i);
|
||||||
} else
|
} else
|
||||||
SETERROR(REG_ESUBREG);
|
SETERROR(REG_ESUBREG);
|
||||||
@ -1031,6 +1033,8 @@ int to; /* to this number of times (maybe RE_INFINITY) */
|
|||||||
AHEAD(THERE()); /* ...so fix it */
|
AHEAD(THERE()); /* ...so fix it */
|
||||||
ASTERN(O_CH, THERETHERE());
|
ASTERN(O_CH, THERETHERE());
|
||||||
copy = dupl(p, start+1, finish+1);
|
copy = dupl(p, start+1, finish+1);
|
||||||
|
if (p->error != 0)
|
||||||
|
return; /* purecov: inspected */
|
||||||
assert(copy == finish+4);
|
assert(copy == finish+4);
|
||||||
repeat(p, copy, 1, to-1);
|
repeat(p, copy, 1, to-1);
|
||||||
break;
|
break;
|
||||||
@ -1040,10 +1044,14 @@ int to; /* to this number of times (maybe RE_INFINITY) */
|
|||||||
break;
|
break;
|
||||||
case REP(N, N): /* as xx{m-1,n-1} */
|
case REP(N, N): /* as xx{m-1,n-1} */
|
||||||
copy = dupl(p, start, finish);
|
copy = dupl(p, start, finish);
|
||||||
|
if (p->error != 0)
|
||||||
|
return;
|
||||||
repeat(p, copy, from-1, to-1);
|
repeat(p, copy, from-1, to-1);
|
||||||
break;
|
break;
|
||||||
case REP(N, INF): /* as xx{n-1,INF} */
|
case REP(N, INF): /* as xx{n-1,INF} */
|
||||||
copy = dupl(p, start, finish);
|
copy = dupl(p, start, finish);
|
||||||
|
if (p->error != 0)
|
||||||
|
return; /* purecov: inspected */
|
||||||
repeat(p, copy, from-1, to);
|
repeat(p, copy, from-1, to);
|
||||||
break;
|
break;
|
||||||
default: /* "can't happen" */
|
default: /* "can't happen" */
|
||||||
@ -1366,6 +1374,9 @@ sopno finish; /* to this less one */
|
|||||||
if (len == 0)
|
if (len == 0)
|
||||||
return(ret);
|
return(ret);
|
||||||
enlarge(p, p->ssize + len); /* this many unexpected additions */
|
enlarge(p, p->ssize + len); /* this many unexpected additions */
|
||||||
|
if (p->error != 0)
|
||||||
|
return(p->error);
|
||||||
|
|
||||||
assert(p->ssize >= p->slen + len);
|
assert(p->ssize >= p->slen + len);
|
||||||
(void) memcpy((char *)(p->strip + p->slen),
|
(void) memcpy((char *)(p->strip + p->slen),
|
||||||
(char *)(p->strip + start), (size_t)len*sizeof(sop));
|
(char *)(p->strip + start), (size_t)len*sizeof(sop));
|
||||||
@ -1438,7 +1449,7 @@ sopno pos;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
int length=(HERE()-pos-1)*sizeof(sop);
|
size_t length=(HERE()-pos-1)*sizeof(sop);
|
||||||
bmove_upp((uchar *) &p->strip[pos+1]+length,
|
bmove_upp((uchar *) &p->strip[pos+1]+length,
|
||||||
(uchar *) &p->strip[pos]+length,
|
(uchar *) &p->strip[pos]+length,
|
||||||
length);
|
length);
|
||||||
@ -1482,6 +1493,15 @@ register sopno size;
|
|||||||
if (p->ssize >= size)
|
if (p->ssize >= size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
DBUG_EXECUTE_IF("bug24449090_simulate_oom",
|
||||||
|
{
|
||||||
|
free(p->strip);
|
||||||
|
p->strip= NULL;
|
||||||
|
p->ssize= 0;
|
||||||
|
SETERROR(REG_ESPACE);
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
sp = (sop *)realloc(p->strip, size*sizeof(sop));
|
sp = (sop *)realloc(p->strip, size*sizeof(sop));
|
||||||
if (sp == NULL) {
|
if (sp == NULL) {
|
||||||
SETERROR(REG_ESPACE);
|
SETERROR(REG_ESPACE);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (c) 2002, 2012, Oracle and/or its affiliates.
|
# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -196,6 +196,20 @@ set_echo_compat() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validate_reply () {
|
||||||
|
ret=0
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
reply=y
|
||||||
|
return $ret
|
||||||
|
fi
|
||||||
|
case $1 in
|
||||||
|
y|Y|yes|Yes|YES) reply=y ;;
|
||||||
|
n|N|no|No|NO) reply=n ;;
|
||||||
|
*) ret=1 ;;
|
||||||
|
esac
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
touch $config $command
|
touch $config $command
|
||||||
chmod 600 $config $command
|
chmod 600 $config $command
|
||||||
@ -400,15 +414,18 @@ echo "Setting the root password ensures that nobody can log into the MariaDB"
|
|||||||
echo "root user without the proper authorisation."
|
echo "root user without the proper authorisation."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ $hadpass -eq 0 ]; then
|
while true ; do
|
||||||
echo $echo_n "Set root password? [Y/n] $echo_c"
|
if [ $hadpass -eq 0 ]; then
|
||||||
else
|
echo $echo_n "Set root password? [Y/n] $echo_c"
|
||||||
echo "You already have a root password set, so you can safely answer 'n'."
|
else
|
||||||
echo
|
echo "You already have a root password set, so you can safely answer 'n'."
|
||||||
echo $echo_n "Change the root password? [Y/n] $echo_c"
|
echo
|
||||||
fi
|
echo $echo_n "Change the root password? [Y/n] $echo_c"
|
||||||
|
fi
|
||||||
|
read reply
|
||||||
|
validate_reply $reply && break
|
||||||
|
done
|
||||||
|
|
||||||
read reply
|
|
||||||
if [ "$reply" = "n" ]; then
|
if [ "$reply" = "n" ]; then
|
||||||
echo " ... skipping."
|
echo " ... skipping."
|
||||||
else
|
else
|
||||||
@ -432,9 +449,11 @@ echo "go a bit smoother. You should remove them before moving into a"
|
|||||||
echo "production environment."
|
echo "production environment."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo $echo_n "Remove anonymous users? [Y/n] $echo_c"
|
while true ; do
|
||||||
|
echo $echo_n "Remove anonymous users? [Y/n] $echo_c"
|
||||||
read reply
|
read reply
|
||||||
|
validate_reply $reply && break
|
||||||
|
done
|
||||||
if [ "$reply" = "n" ]; then
|
if [ "$reply" = "n" ]; then
|
||||||
echo " ... skipping."
|
echo " ... skipping."
|
||||||
else
|
else
|
||||||
@ -450,9 +469,11 @@ echo
|
|||||||
echo "Normally, root should only be allowed to connect from 'localhost'. This"
|
echo "Normally, root should only be allowed to connect from 'localhost'. This"
|
||||||
echo "ensures that someone cannot guess at the root password from the network."
|
echo "ensures that someone cannot guess at the root password from the network."
|
||||||
echo
|
echo
|
||||||
|
while true ; do
|
||||||
echo $echo_n "Disallow root login remotely? [Y/n] $echo_c"
|
echo $echo_n "Disallow root login remotely? [Y/n] $echo_c"
|
||||||
read reply
|
read reply
|
||||||
|
validate_reply $reply && break
|
||||||
|
done
|
||||||
if [ "$reply" = "n" ]; then
|
if [ "$reply" = "n" ]; then
|
||||||
echo " ... skipping."
|
echo " ... skipping."
|
||||||
else
|
else
|
||||||
@ -470,8 +491,12 @@ echo "access. This is also intended only for testing, and should be removed"
|
|||||||
echo "before moving into a production environment."
|
echo "before moving into a production environment."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo $echo_n "Remove test database and access to it? [Y/n] $echo_c"
|
while true ; do
|
||||||
read reply
|
echo $echo_n "Remove test database and access to it? [Y/n] $echo_c"
|
||||||
|
read reply
|
||||||
|
validate_reply $reply && break
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$reply" = "n" ]; then
|
if [ "$reply" = "n" ]; then
|
||||||
echo " ... skipping."
|
echo " ... skipping."
|
||||||
else
|
else
|
||||||
@ -488,8 +513,12 @@ echo "Reloading the privilege tables will ensure that all changes made so far"
|
|||||||
echo "will take effect immediately."
|
echo "will take effect immediately."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo $echo_n "Reload privilege tables now? [Y/n] $echo_c"
|
while true ; do
|
||||||
read reply
|
echo $echo_n "Reload privilege tables now? [Y/n] $echo_c"
|
||||||
|
read reply
|
||||||
|
validate_reply $reply && break
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$reply" = "n" ]; then
|
if [ "$reply" = "n" ]; then
|
||||||
echo " ... skipping."
|
echo " ... skipping."
|
||||||
else
|
else
|
||||||
|
@ -950,4 +950,3 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
log_notice "mysqld from pid file $pid_file ended"
|
log_notice "mysqld from pid file $pid_file ended"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
Copyright (c) 2000, 2017, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
Copyright (c) 2009, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -3449,6 +3449,7 @@ String *Item_func_quote::val_str(String *str)
|
|||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ulong max_allowed_packet= current_thd->variables.max_allowed_packet;
|
||||||
char *from, *to, *end, *start;
|
char *from, *to, *end, *start;
|
||||||
String *arg= args[0]->val_str(str);
|
String *arg= args[0]->val_str(str);
|
||||||
uint arg_length, new_length;
|
uint arg_length, new_length;
|
||||||
@ -3467,11 +3468,14 @@ String *Item_func_quote::val_str(String *str)
|
|||||||
new_length= arg_length + 2; /* for beginning and ending ' signs */
|
new_length= arg_length + 2; /* for beginning and ending ' signs */
|
||||||
for (from= (char*) arg->ptr(), end= from + arg_length; from < end; from++)
|
for (from= (char*) arg->ptr(), end= from + arg_length; from < end; from++)
|
||||||
new_length+= get_esc_bit(escmask, (uchar) *from);
|
new_length+= get_esc_bit(escmask, (uchar) *from);
|
||||||
|
if (new_length > max_allowed_packet)
|
||||||
|
goto toolong;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_length= (arg_length * 2) + /* For string characters */
|
new_length= (arg_length * 2) + /* For string characters */
|
||||||
(2 * collation.collation->mbmaxlen); /* For quotes */
|
(2 * collation.collation->mbmaxlen); /* For quotes */
|
||||||
|
set_if_smaller(new_length, max_allowed_packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp_value.alloc(new_length))
|
if (tmp_value.alloc(new_length))
|
||||||
@ -3487,7 +3491,7 @@ String *Item_func_quote::val_str(String *str)
|
|||||||
|
|
||||||
/* Put leading quote */
|
/* Put leading quote */
|
||||||
if ((mblen= cs->cset->wc_mb(cs, '\'', (uchar *) to, to_end)) <= 0)
|
if ((mblen= cs->cset->wc_mb(cs, '\'', (uchar *) to, to_end)) <= 0)
|
||||||
goto null;
|
goto toolong;
|
||||||
to+= mblen;
|
to+= mblen;
|
||||||
|
|
||||||
for (start= (char*) arg->ptr(), end= start + arg_length; start < end; )
|
for (start= (char*) arg->ptr(), end= start + arg_length; start < end; )
|
||||||
@ -3507,17 +3511,17 @@ String *Item_func_quote::val_str(String *str)
|
|||||||
if (escape)
|
if (escape)
|
||||||
{
|
{
|
||||||
if ((mblen= cs->cset->wc_mb(cs, '\\', (uchar*) to, to_end)) <= 0)
|
if ((mblen= cs->cset->wc_mb(cs, '\\', (uchar*) to, to_end)) <= 0)
|
||||||
goto null;
|
goto toolong;
|
||||||
to+= mblen;
|
to+= mblen;
|
||||||
}
|
}
|
||||||
if ((mblen= cs->cset->wc_mb(cs, wc, (uchar*) to, to_end)) <= 0)
|
if ((mblen= cs->cset->wc_mb(cs, wc, (uchar*) to, to_end)) <= 0)
|
||||||
goto null;
|
goto toolong;
|
||||||
to+= mblen;
|
to+= mblen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Put trailing quote */
|
/* Put trailing quote */
|
||||||
if ((mblen= cs->cset->wc_mb(cs, '\'', (uchar *) to, to_end)) <= 0)
|
if ((mblen= cs->cset->wc_mb(cs, '\'', (uchar *) to, to_end)) <= 0)
|
||||||
goto null;
|
goto toolong;
|
||||||
to+= mblen;
|
to+= mblen;
|
||||||
new_length= to - tmp_value.ptr();
|
new_length= to - tmp_value.ptr();
|
||||||
goto ret;
|
goto ret;
|
||||||
@ -3561,6 +3565,11 @@ ret:
|
|||||||
null_value= 0;
|
null_value= 0;
|
||||||
return &tmp_value;
|
return &tmp_value;
|
||||||
|
|
||||||
|
toolong:
|
||||||
|
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
|
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
|
||||||
|
ER_THD(current_thd, ER_WARN_ALLOWED_PACKET_OVERFLOWED),
|
||||||
|
func_name(), max_allowed_packet);
|
||||||
null:
|
null:
|
||||||
null_value= 1;
|
null_value= 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (c) 2005, 2013, Oracle and/or its affiliates.
|
/* Copyright (c) 2005, 2016, Oracle and/or its affiliates.
|
||||||
|
Copyright (c) 2009, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -2706,9 +2707,9 @@ int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len)
|
|||||||
|
|
||||||
node.parent= data->parent; // Set parent for the new node to old parent
|
node.parent= data->parent; // Set parent for the new node to old parent
|
||||||
data->parent= numnodes; // Remember current node as new parent
|
data->parent= numnodes; // Remember current node as new parent
|
||||||
DBUG_ASSERT(data->level <= MAX_LEVEL);
|
DBUG_ASSERT(data->level < MAX_LEVEL);
|
||||||
data->pos[data->level]= numnodes;
|
data->pos[data->level]= numnodes;
|
||||||
if (data->level < MAX_LEVEL)
|
if (data->level < MAX_LEVEL - 1)
|
||||||
node.level= data->level++;
|
node.level= data->level++;
|
||||||
else
|
else
|
||||||
return MY_XML_ERROR;
|
return MY_XML_ERROR;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2002, 2015, Oracle and/or its affiliates.
|
Copyright (c) 2002, 2016, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2009, 2015, MariaDB
|
Copyright (c) 2009, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -375,7 +375,7 @@ void Proc_table_intact::report_error(uint code, const char *fmt, ...)
|
|||||||
my_vsnprintf(buf, sizeof(buf), fmt, args);
|
my_vsnprintf(buf, sizeof(buf), fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
if (code)
|
if (code == ER_COL_COUNT_DOESNT_MATCH_CORRUPTED)
|
||||||
my_message(code, buf, MYF(0));
|
my_message(code, buf, MYF(0));
|
||||||
else
|
else
|
||||||
my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "proc");
|
my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "proc");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2008, 2016, MariaDB
|
Copyright (c) 2008, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
#define RAND_TABLE_BIT (((table_map) 1) << (sizeof(table_map)*8-1))
|
#define RAND_TABLE_BIT (((table_map) 1) << (sizeof(table_map)*8-1))
|
||||||
#define PSEUDO_TABLE_BITS (PARAM_TABLE_BIT | OUTER_REF_TABLE_BIT | \
|
#define PSEUDO_TABLE_BITS (PARAM_TABLE_BIT | OUTER_REF_TABLE_BIT | \
|
||||||
RAND_TABLE_BIT)
|
RAND_TABLE_BIT)
|
||||||
|
#define CONNECT_STRING_MAXLEN 65535 /* stored in 2 bytes in .frm */
|
||||||
#define MAX_FIELDS 4096 /* Limit in the .frm file */
|
#define MAX_FIELDS 4096 /* Limit in the .frm file */
|
||||||
#define MAX_PARTITIONS 1024
|
#define MAX_PARTITIONS 1024
|
||||||
|
|
||||||
|
@ -979,7 +979,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
|||||||
{
|
{
|
||||||
uint length;
|
uint length;
|
||||||
uchar *pos;
|
uchar *pos;
|
||||||
Item *real_item;
|
Item_field *real_item;
|
||||||
|
|
||||||
if (read_info.read_field())
|
if (read_info.read_field())
|
||||||
break;
|
break;
|
||||||
@ -991,16 +991,26 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
|||||||
pos=read_info.row_start;
|
pos=read_info.row_start;
|
||||||
length=(uint) (read_info.row_end-pos);
|
length=(uint) (read_info.row_end-pos);
|
||||||
|
|
||||||
real_item= item->real_item();
|
real_item= item->filed_for_view_update();
|
||||||
|
|
||||||
if ((!read_info.enclosed &&
|
if ((!read_info.enclosed &&
|
||||||
(enclosed_length && length == 4 &&
|
(enclosed_length && length == 4 &&
|
||||||
!memcmp(pos, STRING_WITH_LEN("NULL")))) ||
|
!memcmp(pos, STRING_WITH_LEN("NULL")))) ||
|
||||||
(length == 1 && read_info.found_null))
|
(length == 1 && read_info.found_null))
|
||||||
{
|
{
|
||||||
if (real_item->type() == Item::FIELD_ITEM)
|
if (item->type() == Item::STRING_ITEM)
|
||||||
{
|
{
|
||||||
Field *field= ((Item_field *)real_item)->field;
|
((Item_user_var_as_out_param *)item)->set_null_value(
|
||||||
|
read_info.read_charset);
|
||||||
|
}
|
||||||
|
else if (!real_item)
|
||||||
|
{
|
||||||
|
my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), item->name);
|
||||||
|
DBUG_RETURN(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Field *field= real_item->field;
|
||||||
if (field->reset())
|
if (field->reset())
|
||||||
{
|
{
|
||||||
my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name,
|
my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name,
|
||||||
@ -1017,39 +1027,29 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
|||||||
ER_WARN_NULL_TO_NOTNULL, 1);
|
ER_WARN_NULL_TO_NOTNULL, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (item->type() == Item::STRING_ITEM)
|
|
||||||
{
|
|
||||||
((Item_user_var_as_out_param *)item)->set_null_value(
|
|
||||||
read_info.read_charset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name());
|
|
||||||
DBUG_RETURN(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (real_item->type() == Item::FIELD_ITEM)
|
if (item->type() == Item::STRING_ITEM)
|
||||||
{
|
{
|
||||||
Field *field= ((Item_field *)real_item)->field;
|
((Item_user_var_as_out_param *)item)->set_value((char*) pos, length,
|
||||||
|
read_info.read_charset);
|
||||||
|
}
|
||||||
|
else if (!real_item)
|
||||||
|
{
|
||||||
|
my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), item->name);
|
||||||
|
DBUG_RETURN(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Field *field= real_item->field;
|
||||||
field->set_notnull();
|
field->set_notnull();
|
||||||
read_info.row_end[0]=0; // Safe to change end marker
|
read_info.row_end[0]=0; // Safe to change end marker
|
||||||
if (field == table->next_number_field)
|
if (field == table->next_number_field)
|
||||||
table->auto_increment_field_not_null= TRUE;
|
table->auto_increment_field_not_null= TRUE;
|
||||||
field->store((char*) pos, length, read_info.read_charset);
|
field->store((char*) pos, length, read_info.read_charset);
|
||||||
}
|
}
|
||||||
else if (item->type() == Item::STRING_ITEM)
|
|
||||||
{
|
|
||||||
((Item_user_var_as_out_param *)item)->set_value((char*) pos, length,
|
|
||||||
read_info.read_charset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name());
|
|
||||||
DBUG_RETURN(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thd->is_error())
|
if (thd->is_error())
|
||||||
@ -1069,10 +1069,20 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
|||||||
break;
|
break;
|
||||||
for (; item ; item= it++)
|
for (; item ; item= it++)
|
||||||
{
|
{
|
||||||
Item *real_item= item->real_item();
|
Item_field *real_item= item->filed_for_view_update();
|
||||||
if (real_item->type() == Item::FIELD_ITEM)
|
if (item->type() == Item::STRING_ITEM)
|
||||||
{
|
{
|
||||||
Field *field= ((Item_field *)real_item)->field;
|
((Item_user_var_as_out_param *)item)->set_null_value(
|
||||||
|
read_info.read_charset);
|
||||||
|
}
|
||||||
|
else if (!real_item)
|
||||||
|
{
|
||||||
|
my_error(ER_NONUPDATEABLE_COLUMN, MYF(0), item->name);
|
||||||
|
DBUG_RETURN(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Field *field= real_item->field;
|
||||||
if (field->reset())
|
if (field->reset())
|
||||||
{
|
{
|
||||||
my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name,
|
my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name,
|
||||||
@ -1093,16 +1103,6 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
|||||||
ER(ER_WARN_TOO_FEW_RECORDS),
|
ER(ER_WARN_TOO_FEW_RECORDS),
|
||||||
thd->warning_info->current_row_for_warning());
|
thd->warning_info->current_row_for_warning());
|
||||||
}
|
}
|
||||||
else if (item->type() == Item::STRING_ITEM)
|
|
||||||
{
|
|
||||||
((Item_user_var_as_out_param *)item)->set_null_value(
|
|
||||||
read_info.read_charset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name());
|
|
||||||
DBUG_RETURN(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2008, 2015, MariaDB
|
Copyright (c) 2008, 2017, MariaDB
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -2904,6 +2904,21 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||||||
uint total_uneven_bit_length= 0;
|
uint total_uneven_bit_length= 0;
|
||||||
DBUG_ENTER("mysql_prepare_create_table");
|
DBUG_ENTER("mysql_prepare_create_table");
|
||||||
|
|
||||||
|
LEX_STRING* connect_string = &create_info->connect_string;
|
||||||
|
if (connect_string->length != 0 &&
|
||||||
|
connect_string->length > CONNECT_STRING_MAXLEN &&
|
||||||
|
(system_charset_info->cset->charpos(system_charset_info,
|
||||||
|
connect_string->str,
|
||||||
|
(connect_string->str +
|
||||||
|
connect_string->length),
|
||||||
|
CONNECT_STRING_MAXLEN)
|
||||||
|
< connect_string->length))
|
||||||
|
{
|
||||||
|
my_error(ER_WRONG_STRING_LENGTH, MYF(0),
|
||||||
|
connect_string->str, "CONNECTION", CONNECT_STRING_MAXLEN);
|
||||||
|
DBUG_RETURN(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
select_field_pos= alter_info->create_list.elements - select_field_count;
|
select_field_pos= alter_info->create_list.elements - select_field_count;
|
||||||
null_fields=blob_columns=0;
|
null_fields=blob_columns=0;
|
||||||
create_info->varchar= 0;
|
create_info->varchar= 0;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2008, 2009 Google Inc.
|
Copyright (c) 2008, 2009 Google Inc.
|
||||||
Copyright (c) 2009, Percona Inc.
|
Copyright (c) 2009, Percona Inc.
|
||||||
Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
|
Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
|
||||||
@ -2787,6 +2787,7 @@ srv_master_thread(
|
|||||||
ulint i;
|
ulint i;
|
||||||
ib_time_t last_print_time;
|
ib_time_t last_print_time;
|
||||||
|
|
||||||
|
my_thread_init();
|
||||||
#ifdef UNIV_DEBUG_THREAD_CREATION
|
#ifdef UNIV_DEBUG_THREAD_CREATION
|
||||||
fprintf(stderr, "Master thread starts, id %lu\n",
|
fprintf(stderr, "Master thread starts, id %lu\n",
|
||||||
os_thread_pf(os_thread_get_curr_id()));
|
os_thread_pf(os_thread_get_curr_id()));
|
||||||
@ -3242,6 +3243,7 @@ suspend_thread:
|
|||||||
os_event_wait(slot->event);
|
os_event_wait(slot->event);
|
||||||
|
|
||||||
if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) {
|
if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) {
|
||||||
|
my_thread_end();
|
||||||
os_thread_exit(NULL);
|
os_thread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3265,6 +3267,7 @@ srv_purge_thread(
|
|||||||
ulint retries = 0;
|
ulint retries = 0;
|
||||||
ulint n_total_purged = ULINT_UNDEFINED;
|
ulint n_total_purged = ULINT_UNDEFINED;
|
||||||
|
|
||||||
|
my_thread_init();
|
||||||
ut_a(srv_n_purge_threads == 1);
|
ut_a(srv_n_purge_threads == 1);
|
||||||
|
|
||||||
#ifdef UNIV_PFS_THREAD
|
#ifdef UNIV_PFS_THREAD
|
||||||
@ -3349,6 +3352,8 @@ srv_purge_thread(
|
|||||||
os_thread_pf(os_thread_get_curr_id()));
|
os_thread_pf(os_thread_get_curr_id()));
|
||||||
#endif /* UNIV_DEBUG_THREAD_CREATION */
|
#endif /* UNIV_DEBUG_THREAD_CREATION */
|
||||||
|
|
||||||
|
my_thread_end();
|
||||||
|
|
||||||
/* We count the number of threads in os_thread_exit(). A created
|
/* We count the number of threads in os_thread_exit(). A created
|
||||||
thread should always use that to exit and not use return() to exit. */
|
thread should always use that to exit and not use return() to exit. */
|
||||||
os_thread_exit(NULL);
|
os_thread_exit(NULL);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
|
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
|
||||||
|
Copyright (c) 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
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 the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -610,12 +611,15 @@ trx_rollback_or_clean_all_recovered(
|
|||||||
/*!< in: a dummy parameter required by
|
/*!< in: a dummy parameter required by
|
||||||
os_thread_create */
|
os_thread_create */
|
||||||
{
|
{
|
||||||
|
my_thread_init();
|
||||||
|
|
||||||
#ifdef UNIV_PFS_THREAD
|
#ifdef UNIV_PFS_THREAD
|
||||||
pfs_register_thread(trx_rollback_clean_thread_key);
|
pfs_register_thread(trx_rollback_clean_thread_key);
|
||||||
#endif /* UNIV_PFS_THREAD */
|
#endif /* UNIV_PFS_THREAD */
|
||||||
|
|
||||||
trx_rollback_or_clean_recovered(TRUE);
|
trx_rollback_or_clean_recovered(TRUE);
|
||||||
|
|
||||||
|
my_thread_end();
|
||||||
/* We count the number of threads in os_thread_exit(). A created
|
/* We count the number of threads in os_thread_exit(). A created
|
||||||
thread should always use that to exit and not use return() to exit. */
|
thread should always use that to exit and not use return() to exit. */
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2006, 2014, Oracle and/or its affiliates.
|
# Copyright (c) 2006, 2016, Oracle and/or its affiliates.
|
||||||
# Copyright (c) 2012, 2014, SkySQL Ab.
|
# Copyright (c) 2012, 2017, MariaDB
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -157,8 +157,7 @@ parse_server_arguments() {
|
|||||||
|
|
||||||
# Get arguments from the my.cnf file,
|
# Get arguments from the my.cnf file,
|
||||||
# the only group, which is read from now on is [mysqld]
|
# the only group, which is read from now on is [mysqld]
|
||||||
if test -x $bindir/my_print_defaults
|
if test -x "$bindir/my_print_defaults"; then
|
||||||
then
|
|
||||||
print_defaults="$bindir/my_print_defaults"
|
print_defaults="$bindir/my_print_defaults"
|
||||||
else
|
else
|
||||||
# Try to find basedir in /etc/my.cnf
|
# Try to find basedir in /etc/my.cnf
|
||||||
@ -176,11 +175,6 @@ else
|
|||||||
print_defaults="$d/bin/my_print_defaults"
|
print_defaults="$d/bin/my_print_defaults"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if test -x "$d/bin/mysql_print_defaults"
|
|
||||||
then
|
|
||||||
print_defaults="$d/bin/mysql_print_defaults"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -381,7 +375,7 @@ case "$mode" in
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Try to find appropriate mysqld process
|
# Try to find appropriate mysqld process
|
||||||
mysqld_pid=`pidof $libexecdir/mysqld`
|
mysqld_pid=`pgrep $libexecdir/mysqld`
|
||||||
|
|
||||||
# test if multiple pids exist
|
# test if multiple pids exist
|
||||||
pid_count=`echo $mysqld_pid | wc -w`
|
pid_count=`echo $mysqld_pid | wc -w`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user