Skip to content

Commit ddd8901

Browse files
author
Jan Lindström
committed
Merge 10.8 into 10.9
2 parents 50d6966 + dee24f3 commit ddd8901

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+514
-2967
lines changed

cmake/os/WindowsCache.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ SET(HAVE_GETHOSTBYADDR_R CACHE INTERNAL "")
6363
SET(HAVE_GETHRTIME CACHE INTERNAL "")
6464
SET(HAVE_GETPAGESIZE CACHE INTERNAL "")
6565
SET(HAVE_GETPASS CACHE INTERNAL "")
66+
SET(HAVE_GETMNTENT CACHE INTERNAL "")
67+
SET(HAVE_GETMNTENT_IN_SYS_MNTAB CACHE INTERNAL "")
68+
SET(HAVE_GETMNTINFO CACHE INTERNAL "")
69+
SET(HAVE_GETMNTINFO64 CACHE INTERNAL "")
6670
SET(HAVE_GETPASSPHRASE CACHE INTERNAL "")
6771
SET(HAVE_GETPWNAM CACHE INTERNAL "")
6872
SET(HAVE_GETPWUID CACHE INTERNAL "")
@@ -145,6 +149,7 @@ SET(HAVE_SELECT 1 CACHE INTERNAL "")
145149
SET(HAVE_SELECT_H CACHE INTERNAL "")
146150
SET(HAVE_SETENV CACHE INTERNAL "")
147151
SET(HAVE_SETLOCALE 1 CACHE INTERNAL "")
152+
SET(HAVE_SETMNTENT CACHE INTERNAL "")
148153
SET(HAVE_SIGACTION CACHE INTERNAL "")
149154
SET(HAVE_SIGINT 1 CACHE INTERNAL "")
150155
SET(HAVE_SIGPIPE CACHE INTERNAL "")

config.h.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
#cmakedefine HAVE_FLOAT_H 1
3535
#cmakedefine HAVE_FNMATCH_H 1
3636
#cmakedefine HAVE_FPU_CONTROL_H 1
37+
#cmakedefine HAVE_GETMNTENT 1
38+
#cmakedefine HAVE_GETMNTENT_IN_SYS_MNTAB 1
39+
#cmakedefine HAVE_GETMNTINFO 1
40+
#cmakedefine HAVE_GETMNTINFO64 1
41+
#cmakedefine HAVE_GETMNTINFO_TAKES_statvfs 1
3742
#cmakedefine HAVE_GRP_H 1
3843
#cmakedefine HAVE_IA64INTRIN_H 1
3944
#cmakedefine HAVE_IEEEFP_H 1
@@ -209,6 +214,7 @@
209214
#cmakedefine HAVE_SELECT 1
210215
#cmakedefine HAVE_SETENV 1
211216
#cmakedefine HAVE_SETLOCALE 1
217+
#cmakedefine HAVE_SETMNTENT 1
212218
#cmakedefine HAVE_SETUPTERM 1
213219
#cmakedefine HAVE_SIGSET 1
214220
#cmakedefine HAVE_SIGACTION 1

include/wsrep.h

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,58 +17,58 @@
1717
#define WSREP_INCLUDED
1818

1919
#include <my_config.h>
20+
#include "log.h"
2021

2122
#ifdef WITH_WSREP
22-
2323
#define IF_WSREP(A,B) A
24-
2524
#define DBUG_ASSERT_IF_WSREP(A) DBUG_ASSERT(A)
2625

27-
#define WSREP_MYSQL_DB (char *)"mysql"
28-
29-
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
30-
if (WSREP_ON && WSREP(thd) && \
31-
wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
32-
goto wsrep_error_label;
33-
34-
#define WSREP_TO_ISOLATION_BEGIN_CREATE(db_, table_, table_list_, create_info_) \
35-
if (WSREP_ON && WSREP(thd) && \
36-
wsrep_to_isolation_begin(thd, db_, table_, \
37-
table_list_, nullptr, nullptr, create_info_)) \
38-
goto wsrep_error_label;
39-
40-
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_, create_info_) \
41-
if (WSREP(thd) && \
42-
wsrep_to_isolation_begin(thd, db_, table_, \
43-
table_list_, alter_info_, \
44-
fk_tables_, create_info_))
45-
46-
/*
47-
Checks if lex->no_write_to_binlog is set for statements that use LOCAL or
48-
NO_WRITE_TO_BINLOG.
49-
*/
50-
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
51-
if (WSREP(thd) && !thd->lex->no_write_to_binlog && \
52-
wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
53-
goto wsrep_error_label;
26+
extern ulong wsrep_debug; // wsrep_mysqld.cc
27+
extern void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...);
28+
29+
#define WSREP_DEBUG(...) \
30+
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
31+
#define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
32+
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
33+
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
34+
#define WSREP_UNKNOWN(fmt, ...) WSREP_ERROR("UNKNOWN: " fmt, ##__VA_ARGS__)
35+
36+
#define WSREP_LOG_CONFLICT_THD(thd, role) \
37+
WSREP_INFO("%s: \n " \
38+
" THD: %lu, mode: %s, state: %s, conflict: %s, seqno: %lld\n " \
39+
" SQL: %s", \
40+
role, \
41+
thd_get_thread_id(thd), \
42+
wsrep_thd_client_mode_str(thd), \
43+
wsrep_thd_client_state_str(thd), \
44+
wsrep_thd_transaction_state_str(thd), \
45+
wsrep_thd_trx_seqno(thd), \
46+
wsrep_thd_query(thd) \
47+
);
48+
49+
#define WSREP_LOG_CONFLICT(bf_thd, victim_thd, bf_abort) \
50+
if (wsrep_debug || wsrep_log_conflicts) \
51+
{ \
52+
WSREP_INFO("cluster conflict due to %s for threads:", \
53+
(bf_abort) ? "high priority abort" : "certification failure" \
54+
); \
55+
if (bf_thd) WSREP_LOG_CONFLICT_THD(bf_thd, "Winning thread"); \
56+
if (victim_thd) WSREP_LOG_CONFLICT_THD(victim_thd, "Victim thread"); \
57+
WSREP_INFO("context: %s:%d", __FILE__, __LINE__); \
58+
}
5459

55-
#define WSREP_SYNC_WAIT(thd_, before_) \
56-
{ if (WSREP_CLIENT(thd_) && \
57-
wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
5860

5961
#else /* !WITH_WSREP */
6062

6163
/* These macros are needed to compile MariaDB without WSREP support
6264
* (e.g. embedded) */
6365

6466
#define IF_WSREP(A,B) B
67+
//#define DBUG_ASSERT_IF_WSREP(A)
6568
#define WSREP_DEBUG(...)
69+
//#define WSREP_INFO(...)
70+
//#define WSREP_WARN(...)
6671
#define WSREP_ERROR(...)
67-
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0)
68-
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_, fk_tables_, create_info_)
69-
#define WSREP_TO_ISOLATION_BEGIN_CREATE(db_, table_, table_list_, create_info_)
70-
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
71-
#define WSREP_SYNC_WAIT(thd_, before_)
7272
#endif /* WITH_WSREP */
7373

7474
#endif /* WSREP_INCLUDED */

mysql-test/suite/encryption/r/innodb-redo-badkey.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed r
88
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
99
call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch");
1010
call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption");
11+
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
1112
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
1213
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
1314
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");

mysql-test/suite/encryption/t/corrupted_during_recovery.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed r
99
call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is compressed or encrypted but uncompress or decrypt failed");
1010
call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted");
1111
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
12+
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
1213
--enable_query_log
1314

1415
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;

mysql-test/suite/encryption/t/innodb-redo-badkey.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed r
1717
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
1818
call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch");
1919
call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption");
20+
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
2021
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
2122
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
2223
# for innodb_checksum_algorithm=full_crc32 only

mysql-test/suite/innodb/r/change_column_collation.result

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,37 +51,62 @@ id msg
5151
DROP TABLE t1;
5252
CREATE TABLE t1 (
5353
id INT PRIMARY KEY,
54+
f1 INT NOT NULL,
55+
f2 INT NOT NULL,
56+
f3 INT NOT NULL,
5457
msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_bin,
55-
unique index(msg)
58+
msg_1 VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_bin,
59+
unique index(f1, msg, f2, msg_1, f3),
60+
unique index(f1, msg_1, f2, msg, f3),
61+
unique index(f1, msg, f3, msg_1, f2),
62+
unique index(f1, msg_1, f3, msg, f2),
63+
unique index(f2, msg_1, f1, msg, f3),
64+
unique index(f2, msg, f3, msg_1, f1),
65+
unique index(f3, f2, msg, msg_1, f1),
66+
unique index(f3, msg, msg_1, f1, f2)
5667
) ENGINE=INNODB;
57-
INSERT INTO t1 VALUES (1, 'aaa');
68+
INSERT INTO t1 VALUES (1, 1, 1, 1, 'aaa', 'aaa');
5869
SET DEBUG_DBUG="+d,create_index_fail";
5970
SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con1_go WAIT_FOR alter_signal";
60-
ALTER TABLE t1 MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, ALGORITHM=NOCOPY;
71+
ALTER TABLE t1 MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY msg_1 VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, ALGORITHM=NOCOPY;
6172
connection con1;
6273
SET DEBUG_SYNC="now WAIT_FOR con1_go";
6374
BEGIN;
6475
SELECT * FROM t1;
65-
id msg
66-
1 aaa
76+
id f1 f2 f3 msg msg_1
77+
1 1 1 1 aaa aaa
6778
SET DEBUG_SYNC="now SIGNAL alter_signal";
6879
connection default;
6980
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
81+
CHECK TABLE t1;
82+
Table Op Msg_type Msg_text
83+
test.t1 check status OK
7084
connection con1;
7185
rollback;
72-
INSERT INTO t1 VALUES(2, 'bbb');
86+
INSERT INTO t1 VALUES(2, 2, 2, 2, 'bbb', 'bbb');
7387
disconnect con1;
7488
connection default;
7589
SET DEBUG_SYNC=reset;
7690
SHOW CREATE TABLE t1;
7791
Table Create Table
7892
t1 CREATE TABLE `t1` (
7993
`id` int(11) NOT NULL,
94+
`f1` int(11) NOT NULL,
95+
`f2` int(11) NOT NULL,
96+
`f3` int(11) NOT NULL,
8097
`msg` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
98+
`msg_1` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
8199
PRIMARY KEY (`id`),
82-
UNIQUE KEY `msg` (`msg`)
100+
UNIQUE KEY `f1` (`f1`,`msg`,`f2`,`msg_1`,`f3`),
101+
UNIQUE KEY `f1_2` (`f1`,`msg_1`,`f2`,`msg`,`f3`),
102+
UNIQUE KEY `f1_3` (`f1`,`msg`,`f3`,`msg_1`,`f2`),
103+
UNIQUE KEY `f1_4` (`f1`,`msg_1`,`f3`,`msg`,`f2`),
104+
UNIQUE KEY `f2` (`f2`,`msg_1`,`f1`,`msg`,`f3`),
105+
UNIQUE KEY `f2_2` (`f2`,`msg`,`f3`,`msg_1`,`f1`),
106+
UNIQUE KEY `f3` (`f3`,`f2`,`msg`,`msg_1`,`f1`),
107+
UNIQUE KEY `f3_2` (`f3`,`msg`,`msg_1`,`f1`,`f2`)
83108
) ENGINE=InnoDB DEFAULT CHARSET=latin1
84-
INSERT INTO t1 VALUES(3, 'ccc');
109+
INSERT INTO t1 VALUES(3, 3, 3, 3, 'ccc', 'ccc');
85110
DROP TABLE t1;
86111
CREATE TABLE t1(id INT PRIMARY KEY, msg VARCHAR(100),
87112
msg_1 VARCHAR(100) AS (msg) VIRTUAL,

mysql-test/suite/innodb/r/leaf_page_corrupted_during_recovery.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ pk c
1717
1 sql
1818
SELECT * FROM t1 WHERE pk = 12;
1919
ERROR HY000: Index for table 't1' is corrupt; try to repair it
20+
CHECK TABLE t1;
21+
Table Op Msg_type Msg_text
22+
test.t1 check Warning InnoDB: The B-tree of index PRIMARY is corrupted.
23+
test.t1 check error Corrupt
2024
DROP TABLE t1;

mysql-test/suite/innodb/t/change_column_collation.test

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,26 @@ DROP TABLE t1;
7878

7979
CREATE TABLE t1 (
8080
id INT PRIMARY KEY,
81+
f1 INT NOT NULL,
82+
f2 INT NOT NULL,
83+
f3 INT NOT NULL,
8184
msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_bin,
82-
unique index(msg)
85+
msg_1 VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_bin,
86+
unique index(f1, msg, f2, msg_1, f3),
87+
unique index(f1, msg_1, f2, msg, f3),
88+
unique index(f1, msg, f3, msg_1, f2),
89+
unique index(f1, msg_1, f3, msg, f2),
90+
unique index(f2, msg_1, f1, msg, f3),
91+
unique index(f2, msg, f3, msg_1, f1),
92+
unique index(f3, f2, msg, msg_1, f1),
93+
unique index(f3, msg, msg_1, f1, f2)
8394
) ENGINE=INNODB;
8495

85-
INSERT INTO t1 VALUES (1, 'aaa');
96+
INSERT INTO t1 VALUES (1, 1, 1, 1, 'aaa', 'aaa');
8697
SET DEBUG_DBUG="+d,create_index_fail";
8798
SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con1_go WAIT_FOR alter_signal";
8899
--send
89-
ALTER TABLE t1 MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, ALGORITHM=NOCOPY;
100+
ALTER TABLE t1 MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, MODIFY msg_1 VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, ALGORITHM=NOCOPY;
90101

91102
connection con1;
92103
SET DEBUG_SYNC="now WAIT_FOR con1_go";
@@ -96,14 +107,15 @@ SET DEBUG_SYNC="now SIGNAL alter_signal";
96107
connection default;
97108
--error ER_DUP_ENTRY
98109
reap;
110+
CHECK TABLE t1;
99111
connection con1;
100112
rollback;
101-
INSERT INTO t1 VALUES(2, 'bbb');
113+
INSERT INTO t1 VALUES(2, 2, 2, 2, 'bbb', 'bbb');
102114
disconnect con1;
103115
connection default;
104116
SET DEBUG_SYNC=reset;
105117
SHOW CREATE TABLE t1;
106-
INSERT INTO t1 VALUES(3, 'ccc');
118+
INSERT INTO t1 VALUES(3, 3, 3, 3, 'ccc', 'ccc');
107119
DROP TABLE t1;
108120

109121
# Inplace Collation change is not supported for virtual column

mysql-test/suite/innodb/t/corrupted_during_recovery.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
66
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
77
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
88
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
9+
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page .*, page number=3\\]");
910
call mtr.add_suppression("Table test/t1 is corrupted. Please drop the table and recreate\\.");
1011
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
1112
call mtr.add_suppression("InnoDB: A long wait .* was observed for dict_sys");

mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
--disable_query_log
55
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
66
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 19 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted\\.");
7+
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page .*, page number=19\\]");
78
call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at srv0start\\.cc.* with error Data structure corruption");
89
call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)");
910
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption");
1011
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't1' is corrupt; try to repair it");
1112
call mtr.add_suppression("InnoDB: btr_pcur_open_low level: 0 table: `test`\\.`t1` index: `PRIMARY`");
1213
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
14+
call mtr.add_suppression("InnoDB: In page .* of index `PRIMARY` of table `test`\\.`t1`");
1315
--enable_query_log
1416
CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0;
1517

@@ -53,6 +55,7 @@ let $restart_parameters=--innodb-force-recovery=2;
5355
SELECT * FROM t1 WHERE PK = 1;
5456
--error ER_NOT_KEYFILE
5557
SELECT * FROM t1 WHERE pk = 12;
58+
CHECK TABLE t1;
5659

5760
DROP TABLE t1;
5861
let $restart_parameters=;

mysys/my_gethwaddr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ my_bool my_gethwaddr(uchar *to)
111111
for (i= 0; res && i < ifc.ifc_len / sizeof(ifr[0]); i++)
112112
{
113113
#if !defined(_AIX) || !defined(__linux__)
114-
#if defined(__linux___)
114+
#if defined(__linux__)
115115
#define HWADDR_DATA ifr[i].ifr_hwaddr.sa_data
116116
#else
117117
#define HWADDR_DATA ifr[i].ifr_hwaddr

plugin/disks/CMakeLists.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
INCLUDE (CheckIncludeFiles)
2-
CHECK_INCLUDE_FILES ("sys/statvfs.h;mntent.h" INFO_HEADERS LANGUAGE CXX)
32

4-
IF (INFO_HEADERS)
3+
CHECK_SYMBOL_EXISTS (getmntent "mntent.h" HAVE_GETMNTENT)
4+
CHECK_SYMBOL_EXISTS (getmntent "sys/mnttab.h" HAVE_GETMNTENT_IN_SYS_MNTAB)
5+
CHECK_SYMBOL_EXISTS (setmntent "mntent.h" HAVE_SETMNTENT)
6+
CHECK_SYMBOL_EXISTS (getmntinfo "sys/types.h;sys/mount.h" HAVE_GETMNTINFO)
7+
CHECK_SYMBOL_EXISTS (getmntinfo64 "sys/types.h;sys/mount.h" HAVE_GETMNTINFO64)
8+
9+
IF (HAVE_GETMNTINFO)
10+
CHECK_CXX_SOURCE_COMPILES("
11+
#include <sys/types.h>
12+
#include <sys/statvfs.h>
13+
int main()
14+
{
15+
struct statvfs *s;
16+
return getmntinfo(&s, ST_WAIT);
17+
}
18+
" HAVE_GETMNTINFO_TAKES_statvfs)
19+
ENDIF()
20+
IF (HAVE_GETMNTENT OR HAVE_GETMNTENT_IN_SYS_MNTAB OR
21+
HAVE_GETMNTINFO OR HAVE_GETMNTINFO64)
522
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
623
MYSQL_ADD_PLUGIN(DISKS information_schema_disks.cc MODULE_ONLY RECOMPILE_FOR_EMBEDDED)
724
ENDIF()

0 commit comments

Comments
 (0)