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
efbf373b
Commit
efbf373b
authored
May 18, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b3756
parents
08d1de2c
f948d7bb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+9
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+9
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-0
No files found.
mysql-test/r/func_str.result
View file @
efbf373b
...
...
@@ -273,3 +273,12 @@ 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 1 1 n
two 'two' 0 0 'two'
four 'four' 0 0 'four'
drop table t1;
mysql-test/t/func_str.test
View file @
efbf373b
...
...
@@ -163,3 +163,12 @@ CREATE TABLE t1 (i int, j int);
INSERT
INTO
t1
VALUES
(
1
,
1
),(
2
,
2
);
SELECT
DISTINCT
i
,
ELT
(
j
,
'345'
,
'34'
)
FROM
t1
;
DROP
TABLE
t1
;
#
# bug #3756: quote and NULL
#
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
;
drop
table
t1
;
sql/item_strfunc.cc
View file @
efbf373b
...
...
@@ -2215,6 +2215,7 @@ String *Item_func_quote::val_str(String *str)
}
*
to
=
'\''
;
str
->
length
(
new_length
);
null_value
=
0
;
return
str
;
null:
...
...
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