Loading mysql-test/r/func_crypt.result +3 −0 Original line number Diff line number Diff line Loading @@ -92,3 +92,6 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select password(_latin1'idkfa ') AS `password('idkfa ')`,old_password(_latin1'idkfa') AS `old_password('idkfa')` select encrypt('1234','_.'); encrypt('1234','_.') # mysql-test/t/func_crypt.test +6 −0 Original line number Diff line number Diff line Loading @@ -49,4 +49,10 @@ select old_password(' i d k f a '); explain extended select password('idkfa '), old_password('idkfa'); # # Bug #13619: Crash on FreeBSD with salt like '_.' # --replace_column 1 # select encrypt('1234','_.'); # End of 4.1 tests sql/item_strfunc.cc +7 −1 Original line number Diff line number Diff line Loading @@ -1498,6 +1498,12 @@ String *Item_func_encrypt::val_str(String *str) } pthread_mutex_lock(&LOCK_crypt); char *tmp= crypt(res->c_ptr(),salt_ptr); if (!tmp) { pthread_mutex_unlock(&LOCK_crypt); null_value= 1; return 0; } str->set(tmp,(uint) strlen(tmp),res->charset()); str->copy(); pthread_mutex_unlock(&LOCK_crypt); Loading Loading
mysql-test/r/func_crypt.result +3 −0 Original line number Diff line number Diff line Loading @@ -92,3 +92,6 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select password(_latin1'idkfa ') AS `password('idkfa ')`,old_password(_latin1'idkfa') AS `old_password('idkfa')` select encrypt('1234','_.'); encrypt('1234','_.') #
mysql-test/t/func_crypt.test +6 −0 Original line number Diff line number Diff line Loading @@ -49,4 +49,10 @@ select old_password(' i d k f a '); explain extended select password('idkfa '), old_password('idkfa'); # # Bug #13619: Crash on FreeBSD with salt like '_.' # --replace_column 1 # select encrypt('1234','_.'); # End of 4.1 tests
sql/item_strfunc.cc +7 −1 Original line number Diff line number Diff line Loading @@ -1498,6 +1498,12 @@ String *Item_func_encrypt::val_str(String *str) } pthread_mutex_lock(&LOCK_crypt); char *tmp= crypt(res->c_ptr(),salt_ptr); if (!tmp) { pthread_mutex_unlock(&LOCK_crypt); null_value= 1; return 0; } str->set(tmp,(uint) strlen(tmp),res->charset()); str->copy(); pthread_mutex_unlock(&LOCK_crypt); Loading