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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1e036fd7
Commit
1e036fd7
authored
Mar 03, 2011
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merging from 5.1
parents
46cd0a20
1c16fd3d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
1 deletion
+45
-1
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+6
-0
mysql-test/r/func_encrypt_ucs2.result
mysql-test/r/func_encrypt_ucs2.result
+19
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+5
-0
mysql-test/t/func_encrypt_ucs2.test
mysql-test/t/func_encrypt_ucs2.test
+12
-0
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-0
No files found.
mysql-test/r/ctype_ucs.result
View file @
1e036fd7
...
...
@@ -1238,6 +1238,12 @@ CREATE VIEW v1 AS SELECT 1 from t1
WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
DROP VIEW v1;
DROP TABLE t1;
#
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
#
SELECT HEX(CHAR(COALESCE(NULL, CHAR(COUNT('%s') USING ucs2), 1, @@global.license, NULL) USING cp850));
HEX(CHAR(COALESCE(NULL, CHAR(COUNT('%s') USING ucs2), 1, @@global.license, NULL) USING cp850))
00
End of 5.0 tests
#
# Start of 5.5 tests
...
...
mysql-test/r/func_encrypt_ucs2.result
0 → 100644
View file @
1e036fd7
#
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
#
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)))
9
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED)
0
Warnings:
Warning 1292 Truncated incorrect INTEGER value: ''
SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)));
CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)))
4
SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED);
CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED)
0
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'test'
mysql-test/t/ctype_ucs.test
View file @
1e036fd7
...
...
@@ -741,6 +741,11 @@ WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
--
echo
#
SELECT
HEX
(
CHAR
(
COALESCE
(
NULL
,
CHAR
(
COUNT
(
'%s'
)
USING
ucs2
),
1
,
@@
global
.
license
,
NULL
)
USING
cp850
));
--
echo
End
of
5.0
tests
...
...
mysql-test/t/func_encrypt_ucs2.test
0 → 100644
View file @
1e036fd7
--
source
include
/
have_ssl_crypto_functs
.
inc
--
source
include
/
have_ucs2
.
inc
--
echo
#
--
echo
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
--
echo
#
SELECT
CHAR_LENGTH
(
DES_ENCRYPT
(
0
,
CHAR
(
'1'
USING
ucs2
)));
SELECT
CONVERT
(
DES_ENCRYPT
(
0
,
CHAR
(
'1'
USING
ucs2
)),
UNSIGNED
);
SELECT
CHAR_LENGTH
(
DES_DECRYPT
(
0xFF0DC9FC9537CA75F4
,
CHAR
(
'1'
USING
ucs2
)));
SELECT
CONVERT
(
DES_DECRYPT
(
0xFF0DC9FC9537CA75F4
,
CHAR
(
'1'
using
ucs2
)),
UNSIGNED
);
sql/item_func.cc
View file @
1e036fd7
...
...
@@ -866,7 +866,7 @@ longlong Item_func_numhybrid::val_int()
return
0
;
char
*
end
=
(
char
*
)
res
->
ptr
()
+
res
->
length
();
CHARSET_INFO
*
cs
=
str_value
.
charset
();
CHARSET_INFO
*
cs
=
res
->
charset
();
return
(
*
(
cs
->
cset
->
strtoll10
))(
cs
,
res
->
ptr
(),
&
end
,
&
err_not_used
);
}
default:
...
...
sql/item_strfunc.cc
View file @
1e036fd7
...
...
@@ -699,6 +699,7 @@ String *Item_func_des_encrypt::val_str(String *str)
tmp_arg
[
res_length
-
1
]
=
tail
;
// save extra length
tmp_value
.
realloc
(
res_length
+
1
);
tmp_value
.
length
(
res_length
+
1
);
tmp_value
.
set_charset
(
&
my_charset_bin
);
tmp_value
[
0
]
=
(
char
)
(
128
|
key_number
);
// Real encryption
bzero
((
char
*
)
&
ivec
,
sizeof
(
ivec
));
...
...
@@ -786,6 +787,7 @@ String *Item_func_des_decrypt::val_str(String *str)
if
((
tail
=
(
uint
)
(
uchar
)
tmp_value
[
length
-
2
])
>
8
)
goto
wrong_key
;
// Wrong key
tmp_value
.
length
(
length
-
1
-
tail
);
tmp_value
.
set_charset
(
&
my_charset_bin
);
return
&
tmp_value
;
error:
...
...
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