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
c9458e16
Commit
c9458e16
authored
Mar 24, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
parents
f1bd20c4
8848bb89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
sql/item_strfunc.cc
sql/item_strfunc.cc
+17
-2
No files found.
sql/item_strfunc.cc
View file @
c9458e16
...
...
@@ -1587,10 +1587,22 @@ void Item_func_elt::fix_length_and_dec()
{
max_length
=
0
;
decimals
=
0
;
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
{
set_if_bigger
(
max_length
,
args
[
i
]
->
max_length
);
set_if_bigger
(
decimals
,
args
[
i
]
->
decimals
);
if
(
i
==
0
)
set_charset
(
args
[
i
]
->
charset
(),
args
[
i
]
->
coercibility
);
else
{
if
(
set_charset
(
charset
(),
coercibility
,
args
[
i
]
->
charset
(),
args
[
i
]
->
coercibility
))
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
func_name
());
break
;
}
}
}
maybe_null
=
1
;
// NULL if wrong first arg
with_sum_func
=
with_sum_func
||
item
->
with_sum_func
;
...
...
@@ -1651,13 +1663,16 @@ longlong Item_func_elt::val_int()
String
*
Item_func_elt
::
val_str
(
String
*
str
)
{
uint
tmp
;
String
*
res
;
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
{
null_value
=
1
;
return
NULL
;
}
null_value
=
0
;
return
args
[
tmp
-
1
]
->
val_str
(
str
);
res
=
args
[
tmp
-
1
]
->
val_str
(
str
);
res
->
set_charset
(
charset
());
return
res
;
}
...
...
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