diff options
author | unknown <monty@mysql.com> | 2004-06-18 03:02:29 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-06-18 03:02:29 +0300 |
commit | 7d52eabb39d1733f4f10cac0f8f4d0555346ed9a (patch) | |
tree | bbef0bb6fad673089610709f1981fd9f249b7833 /client | |
parent | 400648ebd0757caf9ef1831aa8de01570f5fb8fe (diff) | |
download | mariadb-git-7d52eabb39d1733f4f10cac0f8f4d0555346ed9a.tar.gz |
Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173)
Fixed problem with NULL and derived tables (Bug #4097)
Cleanup of new pushed code
BitKeeper/etc/ignore:
added mysql-test/ndb/ndbcluster
client/mysqltest.c:
simple cleanup
innobase/os/os0file.c:
fix for netware
libmysql/libmysql.c:
Fixed some byte order bugs with prepared statements on machines with
high-byte-first. (Bug #4173)
myisam/ft_boolean_search.c:
Comment cleanup
myisam/mi_check.c:
Removed not needed check (check is done in check_index())
myisam/mi_unique.c:
crc must be of type ha_checksum.
myisam/myisamchk.c:
Portability fix.
mysql-test/mysql-test-run.sh:
Simple cleanup
mysql-test/r/subselect.result:
Test problem with NULL and derived tables (Bug #4097)
mysql-test/t/subselect.test:
Test problem with NULL and derived tables (Bug #4097)
sql/mysqld.cc:
Remove not used defines
sql/sql_select.cc:
Fixed problem with NULL and derived tables (Bug #4097)
Indentation fixes
sql/sql_string.cc:
Code cleanup
sql/sql_yacc.yy:
Allow one to use DROP PREPARE ...
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index f638053b515..5ff152bd1c9 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -59,6 +59,7 @@ #include <sys/stat.h> #include <violite.h> +#define MAX_VAR_NAME 256 #define MAX_QUERY 65536 #define MAX_COLUMNS 256 #define PAD_SIZE 128 @@ -628,6 +629,7 @@ static int check_result(DYNAMIC_STRING* ds, const char* fname, return error; } + VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw, my_bool ignore_not_existing) { @@ -642,25 +644,26 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw, if (!(digit < 10 && digit >= 0)) { const char* save_var_name = var_name, *end; + uint length; end = (var_name_end) ? *var_name_end : 0; while (my_isvar(charset_info,*var_name) && var_name != end) - ++var_name; + var_name++; if (var_name == save_var_name) { if (ignore_not_existing) DBUG_RETURN(0); die("Empty variable"); } + length= (uint) (var_name - save_var_name); - if (!(v = (VAR*) hash_search(&var_hash, save_var_name, - var_name - save_var_name))) + if (!(v = (VAR*) hash_search(&var_hash, save_var_name, length)) && + length < MAX_VAR_NAME) { - char c=*var_name, *s=(char*)var_name;; - *s=0; - v=var_from_env(save_var_name, ""); - *s=c; + char buff[MAX_VAR_NAME+1]; + strmake(buff, save_var_name, length); + v= var_from_env(buff, ""); } - --var_name; /* Point at last character */ + var_name--; /* Point at last character */ } else v = var_reg + digit; |