1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-08 00:28:29 +03:00

Add possibility to specify which delimiter to read until in "write_file" and "perl" commands

fix memory leaks reported by valgrind


mysql-test/r/mysqltest.result:
  Update result file
mysql-test/t/mysqltest.test:
  Add tests for specifying delimiter
This commit is contained in:
unknown
2006-09-29 11:32:40 +02:00
parent 5960176833
commit 31cfa6f11b
3 changed files with 84 additions and 20 deletions

View File

@@ -478,3 +478,7 @@ mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
hello
hello
hello
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
End of tests

View File

@@ -1182,6 +1182,18 @@ remove_file non_existing_file;
--error 1
--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp END_DELIMITER;
Content for test_file1 contains EOF
END_DELIMITER
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
# ----------------------------------------------------------------------------
# test for file_exist
# ----------------------------------------------------------------------------
@@ -1226,6 +1238,17 @@ remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
print "hello\n";
EOF
--perl EOF
print "hello\n";
EOF
--perl DELIMITER
print "hello\n";
DELIMITER
--error 1
--exec echo "perl TOO_LONG_DELIMITER ;" | $MYSQL_TEST 2>&1
perl;
print "hello\n";
EOF
@@ -1234,3 +1257,6 @@ perl;
# Print "hello"
print "hello\n";
EOF
--echo End of tests