Commit e11b82f8 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.5 into 10.6

parents 77b3959b a9d0bb12
......@@ -1997,11 +1997,10 @@ static void DBUGOpenFile(CODE_STATE *cs,
static void DBUGCloseFile(CODE_STATE *cs, sFILE *new_value)
{
sFILE *fp;
if (!cs || !cs->stack || !cs->stack->out_file)
if (!cs || !cs->stack || !(fp= cs->stack->out_file))
return;
fp= cs->stack->out_file;
if (--fp->used == 0)
if (fp != sstdout && fp != sstderr && --fp->used == 0)
{
if (fclose(fp->file) == EOF)
{
......
......@@ -18,7 +18,7 @@
.\" SQL scripts
.\" batch SQL files
.SH "NAME"
mysql \- the MariaDB command\-line tool
mariadb \- the MariaDB command\-line tool (mysql is now a symlink to mariadb)
.SH "SYNOPSIS"
.HP \w'\fBmysql\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
\fBmysql [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
......
......@@ -14,9 +14,9 @@
.\" mysql_client_test
.\" mysql_client_test_embedded
.SH "NAME"
mysql_client_test \- test client API
mariadb-client-test \- test client API (mysql_client_test is now a symlink to mariadb-client-test)
.br
mysql_client_test_embedded \- test client API for embedded server
mariadb-client-test-embedded \- test client API for embedded server (mysql_client_test_embedded is now a symlink to mariadb-client-test-embedded)
.SH "SYNOPSIS"
.HP \w'\fBmysql_client_test\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
\fBmysql_client_test [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_convert_table_format
.SH "NAME"
mysql_convert_table_format \- convert tables to use a given storage engine
mariadb-convert-table-format \- convert tables to use a given storage engine (mysql_convert_table_format is now a symlink to mariadb-convert-table-format)
.SH "SYNOPSIS"
.HP \w'\fBmysql_convert_table_format\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
\fBmysql_convert_table_format [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_find_rows
.SH "NAME"
mysql_find_rows \- extract SQL statements from files
mariadb-find-rows \- extract SQL statements from files (mysql_find_rows is now a symlink to mariadb-find-rows)
.SH "SYNOPSIS"
.HP \w'\fBmysql_find_rows\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIfile_name\fR\fR\fB\ \&.\&.\&.]\fR\ 'u
\fBmysql_find_rows [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIfile_name\fR\fR\fB \&.\&.\&.]\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_fix_extensions
.SH "NAME"
mysql_fix_extensions \- normalize table file name extensions
mariadb-fix-extensions \- normalize table file name extensions (mysql_fix_extensions is now a symlink to mariadb-fix-extensions)
.SH "SYNOPSIS"
.HP \w'\fBmysql_fix_extensions\ \fR\fB\fIdata_dir\fR\fR\ 'u
\fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_install_db
.SH "NAME"
mysql_install_db \- initialize MariaDB data directory
mariadb-install-db \- initialize MariaDB data directory (mysql_install_db is now a symlink to mariadb-install-db)
.SH "SYNOPSIS"
.HP \w'\fBmysql_install_db\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
......
......@@ -9,7 +9,7 @@
.\" disable justification (adjust text to left margin only)
.ad l
.SH NAME
mysql_ldb \- RocksDB tool
mariadb-ldb \- RocksDB tool (mysql_ldb is now a symlink to mariadb-ldb)
.SH DESCRIPTION
Use \fBmysql_ldb \-\-help\fR for details on usage\.
.PP
......
......@@ -22,7 +22,7 @@
.\" -----------------------------------------------------------------
.\" mysql_plugin
.SH "NAME"
mysql_plugin \- configure MariaDB server plugins
mariadb-plugin \- configure MariaDB server plugins (mysql_plugin is now a symlink to mariadb-plugin)
.SH "SYNOPSIS"
.HP \w'\fBmysql_plugin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIplugin\fR\fR\fB\ {ENABLE|DISABLE}\fR\ 'u
\fBmysql_plugin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIplugin\fR\fR\fB {ENABLE|DISABLE}\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_secure_installation
.SH "NAME"
mysql_secure_installation \- improve MariaDB installation security
mariadb-secure-installation \- improve MariaDB installation security (mysql_secure_installation is now a symlink to mariadb-secure-installation)
.SH "SYNOPSIS"
.HP \w'\fBmysql_secure_installation\fR\ 'u
\fBmysql_secure_installation\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_setpermission
.SH "NAME"
mysql_setpermission \- interactively set permissions in grant tables
mariadb-setpermission \- interactively set permissions in grant tables (mysql_setpermission is now a symlink to mariadb-setpermission)
.SH "SYNOPSIS"
.HP \w'\fBmysql_setpermission\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql_setpermission [\fR\fB\fIoptions\fR\fR\fB]\fR
......
......@@ -14,7 +14,7 @@
.\" mysql_tzinfo_to_sql
.\" time zone tables
.SH "NAME"
mysql_tzinfo_to_sql \- load the time zone tables
mariadb-tzinfo-to-sql \- load the time zone tables (mysql_tzinfo_to_sql is now a symlink to mariadb-tzinfo-to-sql)
.SH "SYNOPSIS"
.HP \w'\fBmysql_tzinfo_to_sql\ \fR\fB\fIarguments\fR\fR\ 'u
\fBmysql_tzinfo_to_sql \fR\fB\fIarguments\fR\fR
......
......@@ -15,7 +15,7 @@
.\" upgrading MySQL
.\" MySQL: upgrading
.SH "NAME"
mysql_upgrade \- check tables for MariaDB upgrade
mariadb-upgrade \- check tables for MariaDB upgrade (mysql_upgrade is now a symlink to mariadb-upgrade)
.SH "SYNOPSIS"
.HP \w'\fBmysql_upgrade\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql_upgrade [\fR\fB\fIoptions\fR\fR\fB]\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql_waitpid
.SH "NAME"
mysql_waitpid \- kill process and wait for its termination
mariadb-waitpid \- kill process and wait for its termination (mysql_waitpid is now a symlink to mariadb-waitpid)
.SH "SYNOPSIS"
.HP \w'\fBmysql_waitpid\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIpid\fR\fR\fB\ \fR\fB\fIwait_time\fR\fR\ 'u
\fBmysql_waitpid [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIpid\fR\fR\fB \fR\fB\fIwait_time\fR\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysqlaccess
.SH "NAME"
mysqlaccess \- client for checking access privileges
mariadb-access \- client for checking access privileges (mysqlaccess is now a symlink to mariadb-access)
.SH "SYNOPSIS"
.HP \w'\fBmysqlaccess\ [\fR\fB\fIhost_name\fR\fR\fB\ [\fR\fB\fIuser_name\fR\fR\fB\ [\fR\fB\fIdb_name\fR\fR\fB]]]\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB [\fR\fB\fIdb_name\fR\fR\fB]]] [\fR\fB\fIoptions\fR\fR\fB]\fR
......
......@@ -15,7 +15,7 @@
.\" administration: server
.\" server administration
.SH "NAME"
mysqladmin \- client for administering a MariaDB server
mariadb-admin \- client for administering a MariaDB server (mysqladmin is now a symlink to mariadb-admin)
.SH "SYNOPSIS"
.HP \w'\fBmysqladmin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]\ [\fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]]\ \&.\&.\&.\fR\ 'u
\fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB]] \&.\&.\&.\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysqlbinlog
.SH "NAME"
mysqlbinlog \- utility for processing binary log files
mariadb-binlog \- utility for processing binary log files (mysqlbinlog is now a symlink to mariadb-binlog)
.SH "SYNOPSIS"
.HP \w'\fBmysqlbinlog\ [\fR\fBoptions\fR\fB]\ \fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.\fR\ 'u
\fBmysqlbinlog [\fR\fBoptions\fR\fB] \fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.\fR
......
......@@ -17,7 +17,7 @@
.\" tables: maintenance
.\" tables: repair
.SH "NAME"
mysqlcheck \- a table maintenance program
mariadb-check \- a table maintenance program (mysqlcheck is now a symlink to mariadb-check)
.SH "SYNOPSIS"
.HP \w'\fBmysqlcheck\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u
\fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR
......
......@@ -14,7 +14,7 @@
.\" mysqld: MariaDB server
.\" MariaDB server: mysqld
.SH "NAME"
mysqld \- the MariaDB server
mariadbd \- the MariaDB server (mysqld is now a symlink to mariadbd)
.SH "SYNOPSIS"
.HP \w'\fBmysqld\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysqld [\fR\fB\fIoptions\fR\fR\fB]\fR
......
'\" t
.\"
.TH "\FBMARIADB-MULTI\FR" "1" "15 May 2020" "MariaDB 10\&.6" "MariaDB Database System"
.TH "\FBMARIADBD-MULTI\FR" "1" "15 May 2020" "MariaDB 10\&.6" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -16,7 +16,7 @@
.\" scripts
.\" multi mysqld
.SH "NAME"
mysqld_multi \- manage multiple MariaDB servers
mariadbd-multi \- manage multiple MariaDB servers (mysqld_multi is now a symlink to mariadbd-multi)
.SH "SYNOPSIS"
.HP \w'\fBmysqld_multi\ [\fR\fB\fIoptions\fR\fR\fB]\ {start|stop|report}\ [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB]\ \&.\&.\&.]\fR\ 'u
\fBmysqld_multi [\fR\fB\fIoptions\fR\fR\fB] {start|stop|report} [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB] \&.\&.\&.]\fR
......
'\" t
.\"
.TH "\FBMARIADB-SAFE\FR" "1" "15 May 2020" "MariaDB 10\&.6" "MariaDB Database System"
.TH "\FBMARIADBD-SAFE\FR" "1" "15 May 2020" "MariaDB 10\&.6" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -15,7 +15,7 @@
.\" tools: mysqld_safe
.\" scripts
.SH "NAME"
mysqld_safe \- MariaDB server startup script
mariadbd-safe \- MariaDB server startup script (mysqld_safe is now a symlink to mariadbd-safe)
.SH "SYNOPSIS"
.HP \w'\fBmysqld_safe\ \fR\fB\fIoptions\fR\fR\ 'u
\fBmysqld_safe \fR\fB\fIoptions\fR\fR
......
'\" t
.\"
.TH "\FBMARIADB-SAFE-HELPER\FR" "1" "15 May 2020" "MariaDB 10\&.6" "MariaDB Database System"
.TH "\FBMARIADBD-SAFE-HELPER\FR" "1" "15 May 2020" "MariaDB 10\&.6" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -9,7 +9,7 @@
.\" disable justification (adjust text to left margin only)
.ad l
.SH NAME
mysqld_safe_helper \- helper script
mariadbd-safe-helper \- helper script (mysqld_safe_helper is now a symlink to mariadbd-safe-helper)
.SH DESCRIPTION
Use: Helper script\.
.PP
......
......@@ -17,7 +17,7 @@
.\" databases: dumping
.\" tables: dumping
.SH "NAME"
mysqldump \- a database backup program
mariadb-dump \- a database backup program (mysqldump is now a symlink to mariadb-dump)
.SH "SYNOPSIS"
.HP \w'\fBmysqldump\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u
\fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR
......
......@@ -13,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysqldumpslow
.SH "NAME"
mysqldumpslow \- Summarize slow query log files
mariadb-dumpslow \- Summarize slow query log files (mysqldumpslow is now a symlink to mariadb-dumpslow)
.SH "SYNOPSIS"
.HP \w'\fBmysqldumpslow\ [\fR\fBoptions\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.]\fR\ 'u
\fBmysqldumpslow [\fR\fBoptions\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR
......
......@@ -17,7 +17,7 @@
.\" databases: dumping
.\" tables: dumping
.SH "NAME"
mysqlhotcopy \- a database backup program
mariadb-hotcopy \- a database backup program (mysqlhotcopy is now a symlink to mariadb-hotcopy)
.SH "SYNOPSIS"
.HP \w'\fBmysqlhotcopy\ \fR\fB\fIarguments\fR\fR\ 'u
\fBmysqlhotcopy \fR\fB\fIarguments\fR\fR
......
......@@ -17,7 +17,7 @@
.\" files: text
.\" text files: importing
.SH "NAME"
mysqlimport \- a data import program
mariadb-import \- a data import program (mysqlimport is now a symlink to mariadb-import)
.SH "SYNOPSIS"
.HP \w'\fBmysqlimport\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItextfile1\fR\fR\fB\ \&.\&.\&.\fR\ 'u
\fBmysqlimport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItextfile1\fR\fR\fB \&.\&.\&.\fR
......
......@@ -18,7 +18,7 @@
.\" columns: displaying
.\" showing: database information
.SH "NAME"
mysqlshow \- display database, table, and column information
mariadb-show \- display database, table, and column information (mysqlshow is now a symlink to mariadb-show)
.SH "SYNOPSIS"
.HP \w'\fBmysqlshow\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ [\fR\fB\fIcol_name\fR\fR\fB]]]\fR\ 'u
\fBmysqlshow [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB [\fR\fB\fIcol_name\fR\fR\fB]]]\fR
......
......@@ -14,7 +14,7 @@
.\" mysqlslap
.\" load emulation
.SH "NAME"
mysqlslap \- load emulation client
mariadb-slap \- load emulation client (mysqlslap is now a symlink to mariadb-slap)
.SH "SYNOPSIS"
.HP \w'\fBmysqlslap\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysqlslap [\fR\fB\fIoptions\fR\fR\fB]\fR
......
......@@ -14,7 +14,7 @@
.\" mysqltest
.\" mysqltest_embedded
.SH "NAME"
mysqltest \- program to run test cases
mariadb-test \- program to run test cases (mysqltest is now a symlink to mariadb-test)
.br
mysqltest_embedded \- program to run embedded test cases
.SH "SYNOPSIS"
......
......@@ -274,12 +274,16 @@ delete from mysql.help_relation where help_keyword_id=@keyword1_id and help_topi
delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topic_id=@topic1_id;
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
End of 4.1 tests.
DROP TABLE IF EXISTS t1;
flush tables;
#
# End of 4.1 tests.
#
CREATE TABLE t1 (i INT);
LOCK TABLES t1 WRITE;
HELP no_such_topic;
name is_it_category
UNLOCK TABLES;
DROP TABLE t1;
End of 5.1 tests.
#
# End of 5.1 tests.
#
......@@ -122,25 +122,22 @@ delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topi
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
--echo End of 4.1 tests.
flush tables;
--echo #
--echo # End of 4.1 tests.
--echo #
#
# Test that we can use HELP even under LOCK TABLES. See bug#9953:
# CONVERT_TZ requires mysql.time_zone_name to be locked.
#
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (i INT);
LOCK TABLES t1 WRITE;
HELP no_such_topic;
UNLOCK TABLES;
DROP TABLE t1;
--echo End of 5.1 tests.
--echo #
--echo # End of 5.1 tests.
--echo #
......@@ -3,7 +3,7 @@
#
# restart
FOUND 1 /InnoDB: New log file created, LSN=175964\d{8}/ in mysqld.1.err
CREATE TABLE t(i INT) ENGINE INNODB;
CREATE TABLE t(i INT) ENGINE=INNODB ENCRYPTED=YES;
INSERT INTO t VALUES(1);
# xtrabackup backup
SET GLOBAL innodb_flush_log_at_trx_commit=1;
......@@ -16,6 +16,14 @@ INSERT INTO t VALUES(2);
SELECT * FROM t;
i
1
FLUSH TABLE t FOR EXPORT;
UNLOCK TABLES;
ALTER TABLE t DISCARD TABLESPACE;
ALTER TABLE t IMPORT TABLESPACE;
FLUSH TABLE t FOR EXPORT;
UNLOCK TABLES;
ALTER TABLE t DISCARD TABLESPACE;
ALTER TABLE t IMPORT TABLESPACE;
DROP TABLE t;
# shutdown server
# remove datadir
......
......@@ -42,7 +42,7 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--let SEARCH_PATTERN= InnoDB: New log file created, LSN=175964\d{8}
--source include/search_pattern_in_file.inc
CREATE TABLE t(i INT) ENGINE INNODB;
CREATE TABLE t(i INT) ENGINE=INNODB ENCRYPTED=YES;
INSERT INTO t VALUES(1);
echo # xtrabackup backup;
......@@ -58,6 +58,22 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir;
--source include/restart_and_restore.inc
--enable_result_log
SELECT * FROM t;
FLUSH TABLE t FOR EXPORT;
copy_file $_datadir/test/t.ibd $_datadir/test/t_copy.ibd;
copy_file $_datadir/test/t.cfg $_datadir/test/t_copy.cfg;
UNLOCK TABLES;
ALTER TABLE t DISCARD TABLESPACE;
move_file $_datadir/test/t_copy.ibd $_datadir/test/t.ibd;
move_file $_datadir/test/t_copy.cfg $_datadir/test/t.cfg;
ALTER TABLE t IMPORT TABLESPACE;
FLUSH TABLE t FOR EXPORT;
copy_file $_datadir/test/t.ibd $_datadir/test/t_copy.ibd;
copy_file $_datadir/test/t.cfg $_datadir/test/t_copy.cfg;
UNLOCK TABLES;
ALTER TABLE t DISCARD TABLESPACE;
move_file $_datadir/test/t_copy.ibd $_datadir/test/t.ibd;
move_file $_datadir/test/t_copy.cfg $_datadir/test/t.cfg;
ALTER TABLE t IMPORT TABLESPACE;
DROP TABLE t;
rmdir $targetdir;
let $targetdir= $targetdir_old;
......
......@@ -23,7 +23,7 @@
#ifndef MAIN
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(__sun) || defined(_WIN32)
#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__) || defined(__sun) || defined(_WIN32)
static my_bool memcpy_and_test(uchar *to, uchar *from, uint len)
{
uint i, res= 1;
......@@ -74,7 +74,7 @@ my_bool my_gethwaddr(uchar *to)
return res;
}
#elif defined(__linux__) || defined(__sun)
#elif defined(_AIX) || defined(__linux__) || defined(__sun)
#include <net/if.h>
#include <sys/ioctl.h>
#include <net/if_arp.h>
......@@ -87,11 +87,15 @@ my_bool my_gethwaddr(uchar *to)
my_bool my_gethwaddr(uchar *to)
{
int fd, res= 1;
#ifdef _AIX
struct ifhwaddr_req ifr[32];
#else
struct ifreq ifr[32];
#endif
struct ifconf ifc;
DBUG_ENTER("my_gethwaddr");
ifc.ifc_req= ifr;
ifc.ifc_req= (struct ifreq *) ifr;
ifc.ifc_len= sizeof(ifr);
fd = socket(AF_INET, SOCK_DGRAM, 0);
......@@ -106,9 +110,14 @@ my_bool my_gethwaddr(uchar *to)
uint i;
for (i= 0; res && i < ifc.ifc_len / sizeof(ifr[0]); i++)
{
#ifdef __linux__
#if !defined(_AIX) || !defined(__linux__)
#if defined(__linux___)
#define HWADDR_DATA ifr[i].ifr_hwaddr.sa_data
#else
#define HWADDR_DATA ifr[i].ifr_hwaddr
#endif
if (ioctl(fd, SIOCGIFHWADDR, &ifr[i]) >= 0)
res= memcpy_and_test(to, (uchar *)&ifr[i].ifr_hwaddr.sa_data,
res= memcpy_and_test(to, (uchar *)&HWADDR_DATA,
ETHER_ADDR_LEN);
#else
/*
......
......@@ -842,7 +842,7 @@ EOF
fi
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]; then
if grep -m1 -qE "^$BYPASS_TAG([[space]]+.*)?\$" -- "$MAGIC_FILE"; then
if grep -m1 -qE "^$BYPASS_TAG([[:space:]]+.*)?\$" -- "$MAGIC_FILE"; then
readonly WSREP_SST_OPT_BYPASS=1
readonly WSREP_TRANSFER_TYPE='IST'
fi
......
......@@ -9444,7 +9444,7 @@ ER_JSON_ESCAPING
spa "Incorrecta escapatoria en texto JSON en argumento %d a función '%s' en la posicón %d"
ER_JSON_DEPTH
chi "超过JSON嵌套深度的%d限制 参数%d 函数'%s' 位置%d的"
eng "Limit of %d on JSON nested strucures depth is reached in argument %d to function '%s' at position %d"
eng "Limit of %d on JSON nested structures depth is reached in argument %d to function '%s' at position %d"
spa "El límite de %d en profundidad de estructuras JSON anidadas se ha alcanzado en argumento %d a función '%s' en la posición %d"
ER_JSON_PATH_EOS
chi "JSON文本路径错误 参数%d 函数'%s'"
......
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
Copyright (c) 2009, 2021, MariaDB Corporation.
Copyright (c) 2009, 2022, MariaDB Corporation
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
......@@ -6718,8 +6718,8 @@ static int queue_event(Master_info* mi, const uchar *buf, ulong event_len)
can be satisfied only with the strict mode that ensures
against "genuine" gtid duplicates.
*/
rpl_gtid *gtid_in_slave_state __attribute__((unused))=
mi->gtid_current_pos.find(mi->last_queued_gtid.domain_id);
IF_DBUG(rpl_gtid *gtid_in_slave_state=
mi->gtid_current_pos.find(mi->last_queued_gtid.domain_id),);
// Slave gtid state must not have updated yet to the last received gtid.
DBUG_ASSERT((mi->using_gtid == Master_info::USE_GTID_NO ||
......
......@@ -2488,15 +2488,6 @@ MEM_ROOT tz_storage;
char fullname[FN_REFLEN + 1];
char *root_name_end;
/*
known file types that exist in the zoneinfo directory that are safe to
silently skip
*/
const char *known_extensions[]= {
".tab",
NullS
};
/*
Recursively scan zoneinfo directory and print all found time zone
......@@ -2593,20 +2584,19 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose)
else
{
/*
Some systems (like debian, opensuse etc) have description
files (.tab). We skip these silently if verbose is > 0
Some systems (like Debian, openSUSE, etc) have non-timezone files:
* iso3166.tab
* leap-seconds.list
* leapseconds
* tzdata.zi
* zone.tab
* zone1970.tab
We skip these silently unless verbose > 0.
*/
const char *current_ext= fn_ext(fullname);
my_bool known_ext= 0;
my_bool known_ext= strlen(current_ext) ||
!strcmp(my_basename(fullname), "leapseconds");
for (const char **ext= known_extensions ; *ext ; ext++)
{
if (!strcmp(*ext, current_ext))
{
known_ext= 1;
break;
}
}
if (verbose > 0 || !known_ext)
{
fflush(stdout);
......
......@@ -824,7 +824,8 @@ dict_sys_tables_rec_read(
high bit set in n_cols, and flags would be zero.
MySQL 4.1 was the first version to support innodb_file_per_table,
that is, *space_id != 0. */
if (not_redundant || *space_id != 0 || *n_cols & DICT_N_COLS_COMPACT) {
if (not_redundant || *space_id != 0 || *n_cols & DICT_N_COLS_COMPACT
|| fil_system.sys_space->full_crc32()) {
/* Get flags2 from SYS_TABLES.MIX_LEN */
field = rec_get_nth_field_old(
......
......@@ -7464,9 +7464,12 @@ ha_innobase::build_template(
ulint num_v = 0;
if ((active_index != MAX_KEY
&& active_index == pushed_idx_cond_keyno)
|| (pushed_rowid_filter && rowid_filter_is_active)) {
if (active_index != MAX_KEY
&& active_index == pushed_idx_cond_keyno) {
m_prebuilt->idx_cond = this;
goto icp;
} else if (pushed_rowid_filter && rowid_filter_is_active) {
icp:
/* Push down an index condition or an end_range check. */
for (ulint i = 0; i < n_fields; i++) {
const Field* field = table->field[i];
......@@ -7647,9 +7650,6 @@ ha_innobase::build_template(
}
}
}
if (active_index == pushed_idx_cond_keyno) {
m_prebuilt->idx_cond = this;
}
} else {
no_icp:
/* No index condition pushdown */
......
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2021, MariaDB Corporation.
Copyright (c) 2015, 2022, MariaDB Corporation.
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
......@@ -141,9 +141,6 @@ enum dberr_t {
DB_IO_PARTIAL_FAILED, /*!< Partial IO request failed */
DB_FORCED_ABORT, /*!< Transaction was forced to rollback
by a higher priority transaction */
DB_TABLE_CORRUPT, /*!< Table/clustered index is
corrupted */
......
......@@ -449,9 +449,6 @@ ut_strerr(
return("Table is encrypted but decrypt failed.");
case DB_IO_PARTIAL_FAILED:
return("Partial IO failed");
case DB_FORCED_ABORT:
return("Transaction aborted by another higher priority "
"transaction");
case DB_COMPUTE_VALUE_FAILED:
return("Compute generated column failed");
case DB_NO_FK_ON_S_BASE_COL:
......
......@@ -179,21 +179,21 @@ if ($USE_CHILD_GROUP2)
--connection child2_1
if ($USE_GENERAL_LOG)
{
--replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/
--replace_regex /tmp_spider_bka_(0x)?[0-9a-f]*/tmp_spider_bka_xxxx/
eval $CHILD2_1_SELECT_ARGUMENT1;
}
eval $CHILD2_1_SELECT_TABLES;
--connection child2_2
if ($USE_GENERAL_LOG)
{
--replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/
--replace_regex /tmp_spider_bka_(0x)?[0-9a-f]*/tmp_spider_bka_xxxx/
eval $CHILD2_2_SELECT_ARGUMENT1;
}
eval $CHILD2_2_SELECT_TABLES;
--connection child2_3
if ($USE_GENERAL_LOG)
{
--replace_regex /tmp_spider_bka_0x[0-9a-f]*/tmp_spider_bka_xxxx/
--replace_regex /tmp_spider_bka_(0x)?[0-9a-f]*/tmp_spider_bka_xxxx/
eval $CHILD2_3_SELECT_ARGUMENT1;
}
eval $CHILD2_3_SELECT_TABLES;
......
......@@ -9,7 +9,7 @@
# When this is done the mysql server will be started when the machine is
# started and shut down when the systems goes down.
# Comments to support chkconfig on RedHat Linux
# Comments to support chkconfig on Red Hat Linux
# chkconfig: 2345 64 36
# description: A very fast and reliable SQL database engine.
......@@ -52,7 +52,7 @@ datadir=
# Negative numbers mean to wait indefinitely
service_startup_timeout=900
# Lock directory for RedHat / SuSE.
# Lock directory for Red Hat / SuSE.
lockdir='/var/lock/subsys'
lock_file_path="$lockdir/mysql"
......@@ -91,7 +91,7 @@ datadir_set=
#
# Use LSB init script functions for printing messages, if possible
# Include non-LSB RedHat init functions to make systemctl redirect work
# Include non-LSB Red Hat init functions to make systemctl redirect work
init_functions="/etc/init.d/functions"
lsb_functions="/lib/lsb/init-functions"
if test -f $lsb_functions; then
......@@ -100,6 +100,7 @@ fi
if test -f $init_functions; then
. $init_functions
else
log_success_msg()
{
echo " SUCCESS! $@"
......@@ -309,7 +310,7 @@ case "$mode" in
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mariadbd_pid_file_path" "$@" &
wait_for_ready; return_value=$?
# Make lock for RedHat / SuSE
# Make lock for Red Hat / SuSE
if test -w "$lockdir"
then
touch "$lock_file_path"
......@@ -339,7 +340,7 @@ case "$mode" in
rm "$mariadbd_pid_file_path"
fi
# Delete lock for RedHat / SuSE
# Delete lock for Red Hat / SuSE
if test -f "$lock_file_path"
then
rm -f "$lock_file_path"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment