diff options
author | unknown <monty@narttu.mysql.fi> | 2003-08-22 04:07:40 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-08-22 04:07:40 +0300 |
commit | 64393d7e24fe90f5badf3f25f25cc5a24f34b70e (patch) | |
tree | 69f51d9d40e937b7da442d9523c0a0a66d5ba847 /client | |
parent | 7b9018920bde4eebd52d272f198c4aec53bdf581 (diff) | |
download | mariadb-git-64393d7e24fe90f5badf3f25f25cc5a24f34b70e.tar.gz |
Move test that uses many tables (in query_cache.test) to separate test so that we can get it 'skipped' instead of 'failed' on system where we can't open many files.
client/mysqltest.c:
Fix that LET can be used with queries that return multiple columns
libmysql/errmsg.c:
Extend socket name to 100 characters in error messages
libmysql/libmysql.c:
Reset some variables to make ensure that we can call mysql_server_init()/mysql_server_end() many times
mysql-test/mysql-test-run.sh:
Set open-files-limit to 1024
mysql-test/r/loaddata.result:
Add test case for LOAD DATA bug report (was not a bug)
mysql-test/r/query_cache.result:
Move test with many tables to separate test
mysql-test/r/select_safe.result:
Make test repeatable
mysql-test/t/loaddata.test:
Add test case for LOAD DATA bug report (was not a bug)
mysql-test/t/query_cache.test:
Move test with many tables to separate test
mysql-test/t/select_safe.test:
Make test repeatable
sql/field.cc:
Portability fix for gcc 3.3
sql/mysqld.cc:
Store in open_files_limit the true number of files we can open (if system supports it)
sql/sql_load.cc:
Safety fix
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index f5afa0fa0df..7a5712cc597 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -42,7 +42,7 @@ **********************************************************************/ -#define MTEST_VERSION "1.27" +#define MTEST_VERSION "1.28" #include <my_global.h> #include <mysql_embed.h> @@ -845,7 +845,28 @@ int var_query_set(VAR* v, const char* p, const char** p_end) } if ((row = mysql_fetch_row(res)) && row[0]) - eval_expr(v, row[0], 0); + { + /* + Concatenate all row results with tab in between to allow us to work + with results from many columns (for example from SHOW VARIABLES) + */ + DYNAMIC_STRING result; + uint i; + ulong *lengths; + char *end; + + init_dynamic_string(&result, "", 16384, 65536); + lengths= mysql_fetch_lengths(res); + for (i=0; i < mysql_num_fields(res); i++) + { + if (row[0]) + dynstr_append_mem(&result, row[i], lengths[i]); + dynstr_append_mem(&result, "\t", 1); + } + end= result.str + result.length-1; + eval_expr(v, result.str, (const char**) &end); + dynstr_free(&result); + } else eval_expr(v, "", 0); @@ -902,8 +923,6 @@ int eval_expr(VAR* v, const char* p, const char** p_end) return 0; } - if (p_end) - *p_end = 0; die("Invalid expr: %s", p); return 1; } @@ -1197,7 +1216,7 @@ static char *get_string(char **to_ptr, char **from_ptr, VAR *var=var_get(start, &end, 0, 1); if (var && to == (char*) end+1) { - DBUG_PRINT("info",("var: %s -> %s", start, var->str_val)); + DBUG_PRINT("info",("var: '%s' -> '%s'", start, var->str_val)); DBUG_RETURN(var->str_val); /* return found variable value */ } } |