diff options
author | unknown <monty@mishka.local> | 2005-06-27 20:31:00 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-06-27 20:31:00 +0300 |
commit | 8732136285760c6545ecede93e52f442db87858b (patch) | |
tree | 11c3f63ec13344e241e69b6178f65e8bd56e71b1 /sql/item_strfunc.cc | |
parent | 9712bb4cdefc93a79a841ab6878d7a4a20bfea11 (diff) | |
download | mariadb-git-8732136285760c6545ecede93e52f442db87858b.tar.gz |
Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning
client/mysqldump.c:
Cleanup
Ensure we free allocated memory
Portability fixes
client/mysqltest.c:
Cleanup of code during review
Portability fixes (Don't use 'bool')
mysql-test/r/func_encrypt.result:
NULL as argument to encrypt/decrypt should return NULL without a warning
mysql-test/r/func_encrypt_nossl.result:
Added test of NULL argument
mysql-test/t/func_encrypt_nossl.test:
Added test of NULL argument
sql/handler.cc:
Cleanup during code review
sql/item_strfunc.cc:
NULL as argument to encrypt/decrypt should return NULL without a warning
sql/sql_parse.cc:
Fix wrong merge (fix was not needed as the previous code was reverted)
sql/sql_table.cc:
Removed extra new line
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index ceb925be4d2..881a8a7c915 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -381,8 +381,8 @@ String *Item_func_des_encrypt::val_str(String *str) uint key_number, res_length, tail; String *res= args[0]->val_str(str); - if ((null_value=args[0]->null_value)) - goto error; + if ((null_value= args[0]->null_value)) + return 0; // ENCRYPT(NULL) == NULL if ((res_length=res->length()) == 0) return &my_empty_string; @@ -474,7 +474,7 @@ String *Item_func_des_decrypt::val_str(String *str) uint length=res->length(),tail; if ((null_value=args[0]->null_value)) - goto error; + return 0; length=res->length(); if (length < 9 || (length % 8) != 1 || !((*res)[0] & 128)) return res; // Skip decryption if not encrypted |