Skip to content

Commit 1e192e9

Browse files
committed
Post merge review fixes
* Remove duplicate lines from tests * Use thd instead of current_thd * Remove extra wsrep_binlog_format_names * Correctly merge union patch from 5.5 wrt duplicate rows. * Correctly merge SELinux changes into 10.1
1 parent d807e41 commit 1e192e9

File tree

13 files changed

+23
-239
lines changed

13 files changed

+23
-239
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ support-files/mysql.spec
218218
support-files/mysqld_multi.server
219219
support-files/wsrep.cnf
220220
support-files/wsrep_notify
221-
support-files/SELinux/centos6-mariadb.pp
221+
support-files/policy/selinux/mysqld-safe.pp
222222
tags
223223
tests/async_queries
224224
tests/bug25714

mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include/master-slave.inc
22
[connection master]
33
---Setup Section --
4-
---Setup Section --
54
set timestamp=1000000000;
65
CREATE TABLE t1(word VARCHAR(20));
76
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);

mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
--echo ---Setup Section --
1313

14-
--echo ---Setup Section --
15-
1614
# we need this for getting fixed timestamps inside of this test
1715
set timestamp=1000000000;
1816

scripts/mysqld_safe.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -975,10 +975,6 @@ cmd="$cmd $args"
975975
# Avoid 'nohup: ignoring input' warning
976976
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"
977977

978-
# close stdout and stderr, everything goes to $logging now
979-
exec 1>&-
980-
exec 2>&-
981-
982978
log_notice "Starting $MYSQLD daemon with databases from $DATADIR"
983979

984980
# variable to track the current number of "fast" (a.k.a. subsecond) restarts

sql/item.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ Item *Item_cache::safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
11331133
if (conv == example)
11341134
return this;
11351135
Item_cache *cache;
1136-
if (!conv || conv->fix_fields(current_thd, (Item **) NULL) ||
1136+
if (!conv || conv->fix_fields(thd, (Item **) NULL) ||
11371137
!(cache= new (thd->mem_root) Item_cache_str(thd, conv)))
11381138
return NULL; // Safe conversion is not possible, or OEM
11391139
cache->setup(thd, conv);

sql/mysqld.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,6 @@ ulong opt_binlog_rows_event_max_size;
480480
my_bool opt_master_verify_checksum= 0;
481481
my_bool opt_slave_sql_verify_checksum= 1;
482482
const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS};
483-
#ifdef WITH_WSREP
484-
const char *wsrep_binlog_format_names[]=
485-
{"MIXED", "STATEMENT", "ROW", "NONE", NullS};
486-
#endif /* WITH_WSREP */
487483
volatile sig_atomic_t calling_initgroups= 0; /**< Used in SIGSEGV handler. */
488484
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
489485
uint mysqld_extra_port;

sql/sql_select.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17972,7 +17972,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
1797217972
error= NESTED_LOOP_OK; /* select_limit used */
1797317973
}
1797417974

17975-
join->thd->limit_found_rows= join->send_records;
17975+
join->thd->limit_found_rows= join->send_records - join->duplicate_rows;
1797617976

1797717977
if (error == NESTED_LOOP_NO_MORE_ROWS || join->thd->killed == ABORT_QUERY)
1797817978
error= NESTED_LOOP_OK;

support-files/CMakeLists.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,28 @@ IF(UNIX)
5656
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script}
5757
DESTINATION ${inst_location} COMPONENT Server_Scripts)
5858
ENDFOREACH()
59+
60+
FIND_PROGRAM(CHECKMODULE checkmodule)
61+
FIND_PROGRAM(SEMODULE_PACKAGE semodule_package)
62+
MARK_AS_ADVANCED(CHECKMODULE SEMODULE_PACKAGE)
63+
64+
# Build pp files in policy/selinux
65+
IF(CHECKMODULE AND SEMODULE_PACKAGE)
66+
FOREACH(pol mysqld-safe)
67+
SET(src ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.te)
68+
SET(mod ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${pol}-pp.dir/${pol}.mod)
69+
SET(out ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.pp)
70+
ADD_CUSTOM_COMMAND(OUTPUT ${out}
71+
COMMAND ${CHECKMODULE} -M -m ${src} -o ${mod}
72+
COMMAND ${SEMODULE_PACKAGE} -m ${mod} -o ${out}
73+
DEPENDS ${src})
74+
ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out})
75+
ENDFOREACH()
76+
ENDIF()
77+
5978
IF(INSTALL_SUPPORTFILESDIR)
6079
INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
6180
INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles)
62-
ADD_SUBDIRECTORY(SELinux)
6381
ENDIF()
6482

6583
CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)

support-files/SELinux/CMakeLists.txt

Lines changed: 0 additions & 35 deletions
This file was deleted.

support-files/SELinux/rhel4-mysql.fc

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)