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
42de9a3e
Commit
42de9a3e
authored
Oct 21, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #1271: Undefined variable in PASSWORD() function is not
handled correctly
parent
14affe7e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
mysql-test/r/func_crypt.result
mysql-test/r/func_crypt.result
+10
-0
mysql-test/t/func_crypt.test
mysql-test/t/func_crypt.test
+9
-0
sql/item_func.cc
sql/item_func.cc
+1
-1
No files found.
mysql-test/r/func_crypt.result
View file @
42de9a3e
...
@@ -7,3 +7,13 @@ old_password('test') password('test')
...
@@ -7,3 +7,13 @@ old_password('test') password('test')
select length(encrypt('test')), encrypt('test','aa');
select length(encrypt('test')), encrypt('test','aa');
length(encrypt('test')) encrypt('test','aa')
length(encrypt('test')) encrypt('test','aa')
13 aaqPiZY5xR5l.
13 aaqPiZY5xR5l.
drop table if exists t1;
create table t1 (name varchar(50), pw varchar(16));
insert into t1 values ('tom', password('my_pass'));
set @pass='my_pass';
select name from t1 where name='tom' and pw=password(@pass);
name
tom
select name from t1 where name='tom' and pw=password(@undefined);
name
drop table t1;
mysql-test/t/func_crypt.test
View file @
42de9a3e
...
@@ -4,3 +4,12 @@ select length(encrypt('foo', 'ff')) <> 0;
...
@@ -4,3 +4,12 @@ select length(encrypt('foo', 'ff')) <> 0;
--
replace_result
$
1
$aa
$
4
OSUA5cjdx0RUQ08opV27
/
aaqPiZY5xR5l
.
--
replace_result
$
1
$aa
$
4
OSUA5cjdx0RUQ08opV27
/
aaqPiZY5xR5l
.
select
old_password
(
'test'
),
password
(
'test'
);
select
old_password
(
'test'
),
password
(
'test'
);
select
length
(
encrypt
(
'test'
)),
encrypt
(
'test'
,
'aa'
);
select
length
(
encrypt
(
'test'
)),
encrypt
(
'test'
,
'aa'
);
drop
table
if
exists
t1
;
create
table
t1
(
name
varchar
(
50
),
pw
varchar
(
16
));
insert
into
t1
values
(
'tom'
,
password
(
'my_pass'
));
set
@
pass
=
'my_pass'
;
select
name
from
t1
where
name
=
'tom'
and
pw
=
password
(
@
pass
);
select
name
from
t1
where
name
=
'tom'
and
pw
=
password
(
@
undefined
);
drop
table
t1
;
sql/item_func.cc
View file @
42de9a3e
...
@@ -2087,7 +2087,7 @@ void Item_func_get_user_var::fix_length_and_dec()
...
@@ -2087,7 +2087,7 @@ void Item_func_get_user_var::fix_length_and_dec()
bool
Item_func_get_user_var
::
const_item
()
const
bool
Item_func_get_user_var
::
const_item
()
const
{
{
return
var_entry
&&
current_thd
->
query_id
!=
var_entry
->
update_query_id
;
return
(
!
var_entry
||
current_thd
->
query_id
!=
var_entry
->
update_query_id
)
;
}
}
...
...
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