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
0c69be1f
Commit
0c69be1f
authored
Mar 09, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge
sql/item_strfunc.cc: Auto merged
parents
a595bded
991ed18c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
113 additions
and
0 deletions
+113
-0
Docs/changelog-4.0.xml
Docs/changelog-4.0.xml
+18
-0
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+78
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+16
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-0
No files found.
Docs/changelog-4.0.xml
0 → 100755
View file @
0c69be1f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<!--
This is a dummy changelog file. Don't use it yet.
It merges upward without conflict.
-->
<appendix
id=
"news-4-0-x"
>
<title>
Changes in release 4.0.x
</title>
<para>
This is a dummy changelog file. Don't use it yet.
</para>
</appendix>
mysql-test/r/func_str.result
View file @
0c69be1f
...
...
@@ -277,6 +277,69 @@ SELECT bugdesc, REPLACE(bugdesc, 'xxxxxxxxxxxxxxxxxxxx', 'bbbbbbbbbbbbbbbbbbbb')
bugdesc REPLACE(bugdesc, 'xxxxxxxxxxxxxxxxxxxx', 'bbbbbbbbbbbbbbbbbbbb')
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
drop table t1;
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) TYPE=MyISAM;
INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf');
SELECT 1 FROM t1 WHERE tmp=AES_DECRYPT(tmp,"password");
1
DROP TABLE t1;
CREATE TABLE t1 (
wid int(10) unsigned NOT NULL auto_increment,
data_podp date default NULL,
status_wnio enum('nowy','podp','real','arch') NOT NULL default 'nowy',
PRIMARY KEY(wid)
);
INSERT INTO t1 VALUES (8,NULL,'real');
INSERT INTO t1 VALUES (9,NULL,'nowy');
SELECT elt(status_wnio,data_podp) FROM t1 GROUP BY wid;
elt(status_wnio,data_podp)
NULL
NULL
DROP TABLE t1;
CREATE TABLE t1 (
title text
) TYPE=MyISAM;
INSERT INTO t1 VALUES ('Congress reconvenes in September to debate welfare and adult education');
INSERT INTO t1 VALUES ('House passes the CAREERS bill');
SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1;
CONCAT("</a>",RPAD("",(55 - LENGTH(title)),"."))
NULL
</a>..........................
DROP TABLE t1;
CREATE TABLE t1 (i int, j int);
INSERT INTO t1 VALUES (1,1),(2,2);
SELECT DISTINCT i, ELT(j, '345', '34') FROM t1;
i ELT(j, '345', '34')
1 345
2 34
DROP TABLE t1;
create table t1(a char(4));
insert into t1 values ('one'),(NULL),('two'),('four');
select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1;
a quote(a) isnull(quote(a)) quote(a) is null ifnull(quote(a), 'n')
one 'one' 0 0 'one'
NULL NULL 0 0 NULL
two 'two' 0 0 'two'
four 'four' 0 0 'four'
drop table t1;
select trim(trailing 'foo' from 'foo');
trim(trailing 'foo' from 'foo')
select trim(leading 'foo' from 'foo');
trim(leading 'foo' from 'foo')
select quote(ltrim(concat(' ', 'a')));
quote(ltrim(concat(' ', 'a')))
'a'
select quote(trim(concat(' ', 'a')));
quote(trim(concat(' ', 'a')))
'a'
CREATE TABLE t1 SELECT 1 UNION SELECT 2 UNION SELECT 3;
SELECT QUOTE('A') FROM t1;
QUOTE('A')
'A'
'A'
'A'
DROP TABLE t1;
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf');
SELECT 1 FROM t1 WHERE tmp=AES_DECRYPT(tmp,"password");
...
...
@@ -739,3 +802,18 @@ ySQL
SELECT CHAR_LENGTH(CHAR(NULL,121,83,81,'76')) as my_column;
my_column
4
CREATE TABLE t1 (id int PRIMARY KEY, str char(255) NOT NULL);
CREATE TABLE t2 (id int NOT NULL UNIQUE);
INSERT INTO t2 VALUES (1),(2);
INSERT INTO t1 VALUES (1, aes_encrypt('foo', 'bar'));
INSERT INTO t1 VALUES (2, 'not valid');
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id;
id aes_decrypt(str, 'bar')
1 foo
2 NULL
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
ORDER BY t1.id;
id aes_decrypt(str, 'bar')
1 foo
2 NULL
DROP TABLE t1, t2;
mysql-test/t/func_str.test
View file @
0c69be1f
...
...
@@ -482,3 +482,19 @@ DROP TABLE t1;
#
SELECT
CHAR
(
NULL
,
121
,
83
,
81
,
'76'
)
as
my_column
;
SELECT
CHAR_LENGTH
(
CHAR
(
NULL
,
121
,
83
,
81
,
'76'
))
as
my_column
;
#
# Test case for bug #8669: null aes_decrypt result in order by query
#
CREATE
TABLE
t1
(
id
int
PRIMARY
KEY
,
str
char
(
255
)
NOT
NULL
);
CREATE
TABLE
t2
(
id
int
NOT
NULL
UNIQUE
);
INSERT
INTO
t2
VALUES
(
1
),(
2
);
INSERT
INTO
t1
VALUES
(
1
,
aes_encrypt
(
'foo'
,
'bar'
));
INSERT
INTO
t1
VALUES
(
2
,
'not valid'
);
SELECT
t1
.
id
,
aes_decrypt
(
str
,
'bar'
)
FROM
t1
,
t2
WHERE
t1
.
id
=
t2
.
id
;
SELECT
t1
.
id
,
aes_decrypt
(
str
,
'bar'
)
FROM
t1
,
t2
WHERE
t1
.
id
=
t2
.
id
ORDER
BY
t1
.
id
;
DROP
TABLE
t1
,
t2
;
sql/item_strfunc.cc
View file @
0c69be1f
...
...
@@ -235,6 +235,7 @@ String *Item_func_aes_decrypt::val_str(String *str)
void
Item_func_aes_decrypt
::
fix_length_and_dec
()
{
max_length
=
args
[
0
]
->
max_length
;
maybe_null
=
1
;
}
...
...
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