Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6a19058c
Commit
6a19058c
authored
Oct 12, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-13619
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
ab05c75e
77fbc72f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
mysql-test/r/func_crypt.result
mysql-test/r/func_crypt.result
+3
-0
mysql-test/t/func_crypt.test
mysql-test/t/func_crypt.test
+6
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+7
-1
No files found.
mysql-test/r/func_crypt.result
View file @
6a19058c
...
@@ -92,3 +92,6 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -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
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Warnings:
Note 1003 select password(_latin1'idkfa ') AS `password('idkfa ')`,old_password(_latin1'idkfa') AS `old_password('idkfa')`
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
View file @
6a19058c
...
@@ -49,4 +49,10 @@ select old_password(' i d k f a ');
...
@@ -49,4 +49,10 @@ select old_password(' i d k f a ');
explain
extended
select
password
(
'idkfa '
),
old_password
(
'idkfa'
);
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
# End of 4.1 tests
sql/item_strfunc.cc
View file @
6a19058c
...
@@ -1497,7 +1497,13 @@ String *Item_func_encrypt::val_str(String *str)
...
@@ -1497,7 +1497,13 @@ String *Item_func_encrypt::val_str(String *str)
salt_ptr
=
salt_str
->
c_ptr
();
salt_ptr
=
salt_str
->
c_ptr
();
}
}
pthread_mutex_lock
(
&
LOCK_crypt
);
pthread_mutex_lock
(
&
LOCK_crypt
);
char
*
tmp
=
crypt
(
res
->
c_ptr
(),
salt_ptr
);
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
->
set
(
tmp
,(
uint
)
strlen
(
tmp
),
res
->
charset
());
str
->
copy
();
str
->
copy
();
pthread_mutex_unlock
(
&
LOCK_crypt
);
pthread_mutex_unlock
(
&
LOCK_crypt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment