Skip to content

Commit

Permalink
Post merge review fixes
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cvicentiu committed Jan 17, 2017
1 parent d807e41 commit 1e192e9
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 239 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ support-files/mysql.spec
support-files/mysqld_multi.server
support-files/wsrep.cnf
support-files/wsrep_notify
support-files/SELinux/centos6-mariadb.pp
support-files/policy/selinux/mysqld-safe.pp
tags
tests/async_queries
tests/bug25714
Expand Down
1 change: 0 additions & 1 deletion mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include/master-slave.inc
[connection master]
---Setup Section --
---Setup Section --
set timestamp=1000000000;
CREATE TABLE t1(word VARCHAR(20));
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

--echo ---Setup Section --

--echo ---Setup Section --

# we need this for getting fixed timestamps inside of this test
set timestamp=1000000000;

Expand Down
4 changes: 0 additions & 4 deletions scripts/mysqld_safe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -975,10 +975,6 @@ cmd="$cmd $args"
# Avoid 'nohup: ignoring input' warning
test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"

# close stdout and stderr, everything goes to $logging now
exec 1>&-
exec 2>&-

log_notice "Starting $MYSQLD daemon with databases from $DATADIR"

# variable to track the current number of "fast" (a.k.a. subsecond) restarts
Expand Down
2 changes: 1 addition & 1 deletion sql/item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ Item *Item_cache::safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
if (conv == example)
return this;
Item_cache *cache;
if (!conv || conv->fix_fields(current_thd, (Item **) NULL) ||
if (!conv || conv->fix_fields(thd, (Item **) NULL) ||
!(cache= new (thd->mem_root) Item_cache_str(thd, conv)))
return NULL; // Safe conversion is not possible, or OEM
cache->setup(thd, conv);
Expand Down
4 changes: 0 additions & 4 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,6 @@ ulong opt_binlog_rows_event_max_size;
my_bool opt_master_verify_checksum= 0;
my_bool opt_slave_sql_verify_checksum= 1;
const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS};
#ifdef WITH_WSREP
const char *wsrep_binlog_format_names[]=
{"MIXED", "STATEMENT", "ROW", "NONE", NullS};
#endif /* WITH_WSREP */
volatile sig_atomic_t calling_initgroups= 0; /**< Used in SIGSEGV handler. */
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
uint mysqld_extra_port;
Expand Down
2 changes: 1 addition & 1 deletion sql/sql_select.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17972,7 +17972,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error= NESTED_LOOP_OK; /* select_limit used */
}

join->thd->limit_found_rows= join->send_records;
join->thd->limit_found_rows= join->send_records - join->duplicate_rows;

if (error == NESTED_LOOP_NO_MORE_ROWS || join->thd->killed == ABORT_QUERY)
error= NESTED_LOOP_OK;
Expand Down
20 changes: 19 additions & 1 deletion support-files/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,28 @@ IF(UNIX)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${script}
DESTINATION ${inst_location} COMPONENT Server_Scripts)
ENDFOREACH()

FIND_PROGRAM(CHECKMODULE checkmodule)
FIND_PROGRAM(SEMODULE_PACKAGE semodule_package)
MARK_AS_ADVANCED(CHECKMODULE SEMODULE_PACKAGE)

# Build pp files in policy/selinux
IF(CHECKMODULE AND SEMODULE_PACKAGE)
FOREACH(pol mysqld-safe)
SET(src ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.te)
SET(mod ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${pol}-pp.dir/${pol}.mod)
SET(out ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.pp)
ADD_CUSTOM_COMMAND(OUTPUT ${out}
COMMAND ${CHECKMODULE} -M -m ${src} -o ${mod}
COMMAND ${SEMODULE_PACKAGE} -m ${mod} -o ${out}
DEPENDS ${src})
ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out})
ENDFOREACH()
ENDIF()

IF(INSTALL_SUPPORTFILESDIR)
INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles)
ADD_SUBDIRECTORY(SELinux)
ENDIF()

CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)
Expand Down
35 changes: 0 additions & 35 deletions support-files/SELinux/CMakeLists.txt

This file was deleted.

41 changes: 0 additions & 41 deletions support-files/SELinux/rhel4-mysql.fc

This file was deleted.

147 changes: 0 additions & 147 deletions support-files/SELinux/rhel4-mysql.te

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion support-files/rpm/server-postin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if [ -f /etc/redhat-release ] ; then
fi
if grep 'CentOS release 6' /etc/redhat-release >/dev/null 2>&1; then
if [ -x /usr/sbin/semodule ] ; then
/usr/sbin/semodule -i /usr/share/mysql/SELinux/centos6-mariadb.pp
/usr/sbin/semodule -i /usr/share/mysql/policy/selinux/mysqld-safe.pp
fi
fi
fi
Expand Down

0 comments on commit 1e192e9

Please sign in to comment.