summaryrefslogtreecommitdiff
path: root/mysql-test/t/windows.test
diff options
context:
space:
mode:
authorArun Kuruvila <arun.kuruvila@oracle.com>2014-10-21 16:25:35 +0530
committerArun Kuruvila <arun.kuruvila@oracle.com>2014-10-21 16:25:35 +0530
commit349ac8c9b3bec7f56922ab55a2504e225b03ba87 (patch)
tree4977740c19be4c5ecc3f3c3d1c049817bf867a68 /mysql-test/t/windows.test
parent5c41d52904be50c77b204a8450829fbeacbf080f (diff)
downloadmariadb-git-349ac8c9b3bec7f56922ab55a2504e225b03ba87.tar.gz
Bug #16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
Description:- Replace, the string replacement utility fails on the windows platform. Analysis:- The utility takes files and multiple string pairs as input. In the windows platform, the utility maps the standard input incorrectly (Considers 0 as the fd for standard input instead of 2048 on windows). Hence when the input file is supplied to the utility due to the incorrect mapping, a bad file descriptor error is generated causing the utility to exit with an error. Fix:- "my_fileno()" is used for getting the correct file despscriptor for standard input.
Diffstat (limited to 'mysql-test/t/windows.test')
-rw-r--r--mysql-test/t/windows.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test
index b7d31948d23..617daba6b8e 100644
--- a/mysql-test/t/windows.test
+++ b/mysql-test/t/windows.test
@@ -98,3 +98,19 @@ deallocate prepare abc;
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME = 'socket';
+
+--echo #
+--echo # Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
+--echo #
+
+# Creating a temporary text file.
+--write_file $MYSQL_TMP_DIR/bug16581605.txt
+abc
+def
+EOF
+
+#REPLACE.EXE UTILITY will work fine after the fix.
+--exec $REPLACE abc xyz < $MYSQL_TMP_DIR/bug16581605.txt
+
+#Cleanup
+remove_file $MYSQL_TMP_DIR/bug16581605.txt;