diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2004-03-06 03:00:21 +0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2004-03-06 03:00:21 +0400 |
commit | 17c4d7f36182e58047231472dbeb1a9f2af60560 (patch) | |
tree | 6f0b14624710df2135208a6cedc7fc3e19db1752 /client/mysqltest.c | |
parent | c8bfc2324b14584f39dd271fa0dd34b0f181d167 (diff) | |
download | mariadb-git-17c4d7f36182e58047231472dbeb1a9f2af60560.tar.gz |
- added commands --query_vertical and --query_horisontal to client/mysqltest.cc
- get my_strtod to return inf
- get Field_float::store(double) and Field_double::store(float) to set null for
nan value
(as extra serg's recomendations to fix for patch on
Bug #2082 'mysqldump converts "inf" to null')
client/mysqltest.c:
added commands --query_vertical and --query_horisontal
mysql-test/r/insert.result:
converted testcase so as my_strtod can return inf now
mysql-test/r/mysqldump.result:
converted testcase so as my_strtod can return inf now
mysql-test/t/insert.test:
corrected tests to using --query_vertical instead of
pair (vertical_results,horisontal_results)
sql/field.cc:
corrected Field_float::store(double) and Field_double::store(double)
to set null for nan value
strings/strtod.c:
get my_strtod to return inf
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r-- | client/mysqltest.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 823b4d8df1b..178e4b11697 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -216,6 +216,7 @@ Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS, Q_ENABLE_INFO, Q_DISABLE_INFO, Q_EXEC, Q_DELIMITER, Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORISONTAL_RESULTS, +Q_QUERY_VERTICAL, Q_QUERY_HORISONTAL, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ @@ -291,6 +292,8 @@ const char *command_names[]= "delimiter", "vertical_results", "horisontal_results", + "query_vertical", + "query_horisontal", 0 }; @@ -2586,6 +2589,28 @@ int main(int argc, char **argv) if (q->query == q->query_buf) q->query= q->first_argument; /* fall through */ + case Q_QUERY_VERTICAL: + case Q_QUERY_HORISONTAL: + { + my_bool old_display_result_vertically= display_result_vertically; + if (!q->query[q->first_word_len]) + { + /* This happens when we use 'query_..' on it's own line */ + q_send_flag=1; + break; + } + /* fix up query pointer if this is * first iteration for this line */ + if (q->query == q->query_buf) + q->query += q->first_word_len + 1; + switch(q->type) + { + case Q_QUERY_VERTICAL: display_result_vertically= TRUE; break; + case Q_QUERY_HORISONTAL: display_result_vertically= FALSE; break; + } + error |= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND); + display_result_vertically= old_display_result_vertically; + break; + } case Q_QUERY: case Q_REAP: { |