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
34da30e5
Commit
34da30e5
authored
Mar 31, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
parents
9657dfe6
9f86ed8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+3
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+1
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-2
No files found.
mysql-test/r/func_str.result
View file @
34da30e5
...
...
@@ -225,6 +225,9 @@ CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugstatus,submitter), '"'
SELECT CONCAT_WS('";"',title,prio,category,program,bugdesc,created,modified,bugstatus,submitter) FROM t1;
CONCAT_WS('";"',title,prio,category,program,bugdesc,created,modified,bugstatus,submitter)
Link";"1";"1";"1";"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";"2001-02-28 08:40:16";"20010228084016";"0";"4
SELECT bugdesc, REPLACE(bugdesc, 'xxxxxxxxxxxxxxxxxxxx', 'bbbbbbbbbbbbbbbbbbbb') from t1 group by bugdesc;
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');
...
...
mysql-test/t/func_str.test
View file @
34da30e5
...
...
@@ -114,6 +114,7 @@ INSERT INTO t1 VALUES (1,'Link',1,1,1,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SELECT
CONCAT
(
'"'
,
CONCAT_WS
(
'";"'
,
title
,
prio
,
category
,
program
,
bugdesc
,
created
,
modified
,
bugstatus
,
submitter
),
'"'
)
FROM
t1
;
SELECT
CONCAT
(
'"'
,
CONCAT_WS
(
'";"'
,
title
,
prio
,
category
,
program
,
bugstatus
,
submitter
),
'"'
)
FROM
t1
;
SELECT
CONCAT_WS
(
'";"'
,
title
,
prio
,
category
,
program
,
bugdesc
,
created
,
modified
,
bugstatus
,
submitter
)
FROM
t1
;
SELECT
bugdesc
,
REPLACE
(
bugdesc
,
'xxxxxxxxxxxxxxxxxxxx'
,
'bbbbbbbbbbbbbbbbbbbb'
)
from
t1
group
by
bugdesc
;
drop
table
t1
;
#
...
...
sql/item_strfunc.cc
View file @
34da30e5
...
...
@@ -780,8 +780,8 @@ void Item_func_replace::fix_length_and_dec()
int
diff
=
(
int
)
(
args
[
2
]
->
max_length
-
args
[
1
]
->
max_length
);
if
(
diff
>
0
&&
args
[
1
]
->
max_length
)
{
// Calculate of maxreplaces
max_length
=
max_length
/
args
[
1
]
->
max_length
;
max_length
=
(
max_length
+
1
)
*
(
uint
)
diff
;
uint
max_substrs
=
max_length
/
args
[
1
]
->
max_length
;
max_length
+=
max_substrs
*
(
uint
)
diff
;
}
if
(
max_length
>
MAX_BLOB_WIDTH
)
{
...
...
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