diff options
author | unknown <monty@donna.mysql.com> | 2000-12-15 16:12:31 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-12-15 16:12:31 +0200 |
commit | 7322a906a860c9aa17ba3bf681f65b2d7f2497ee (patch) | |
tree | 218630fcd3a47db36372c12886c88d38e397f5c3 /client | |
parent | e7fde22e1a2e8e1eb1ea122a6b5f97786453200a (diff) | |
download | mariadb-git-7322a906a860c9aa17ba3bf681f65b2d7f2497ee.tar.gz |
Fixed <=>
Added mysqltest for <=>
Removed use of TAB in output from mysql-test-run
Docs/manual.texi:
Changelog
client/mysqltest.c:
Added missing argument; Changed to use standard defines
mysql-test/README:
Cleaned up
mysql-test/mysql-test-run.sh:
Removed use of TAB in output
(We are now also depening on sed)
sql/item_cmpfunc.cc:
Fixed <=>
sql/item_cmpfunc.h:
Fixed <=>
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 9917a91a9cb..765973060f7 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -42,7 +42,6 @@ #include <errno.h> #define MAX_QUERY 16384 -#define MAX_RECORD_FILE 128 #define PAD_SIZE 128 #define MAX_CONS 1024 #define MAX_INCLUDE_DEPTH 16 @@ -109,7 +108,7 @@ struct query int first_word_len; int abort_on_error; uint expected_errno; - char record_file[MAX_RECORD_FILE]; + char record_file[FN_REFLEN]; enum {Q_CONNECTION, Q_QUERY, Q_CONNECT, Q_SLEEP, Q_INC, Q_DEC,Q_SOURCE, Q_DISCONNECT,Q_LET, Q_ECHO, Q_WHILE, Q_END_BLOCK, @@ -928,6 +927,7 @@ void usage() -P, --port=... Port number to use for connection.\n\ -S, --socket=... Socket file to use for connection.\n\ -r, --record Record output of test_file into result file.\n\ + -R, --result-file=... Store result in this file\n\ -v, --verbose Write more.\n\ -q, --quiet, --silent Suppress all normal output.\n\ -V, --version Output version information and exit.\n\n"); @@ -1024,22 +1024,21 @@ char* safe_str_append(char* buf, const char* str, int size) void str_to_file(const char* fname, char* str, int size) { int fd; - if((fd = my_open(fname, O_WRONLY|O_CREAT, MYF(MY_WME))) < 0) + if((fd = my_open(fname, O_WRONLY|O_CREAT, MYF(MY_WME | MY_FFNF))) < 0) die("Could not open %s: errno = %d", fname, errno); - if(my_write(fd, (byte*)str, size, MYF(MY_WME|MY_NABP))) + if(my_write(fd, (byte*)str, size, MYF(MY_WME|MY_FNABP))) die("write failed"); my_close(fd, MYF(0)); } void reject_dump(const char* record_file, char* buf, int size) { - char reject_file[MAX_RECORD_FILE+16]; + char reject_file[FN_REFLEN]; char* p; - - p = reject_file; - p = safe_str_append(p, record_file, sizeof(reject_file)); - p = safe_str_append(p, (char*)".reject", reject_file - p + - sizeof(reject_file)); + + if (strlen(record_file) >= FN_REFLEN-8) + die("too long path name for reject"); + strmov(strmov(reject_file, record_file),".reject"); str_to_file(reject_file, buf, size); } |