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
27c67fbf
Commit
27c67fbf
authored
Jun 20, 2003
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #666 (Nice number, yeah?)
parent
10c81fb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
sql/item_strfunc.cc
sql/item_strfunc.cc
+21
-12
No files found.
sql/item_strfunc.cc
View file @
27c67fbf
...
@@ -1539,37 +1539,46 @@ void Item_func_elt::update_used_tables()
...
@@ -1539,37 +1539,46 @@ void Item_func_elt::update_used_tables()
double
Item_func_elt
::
val
()
double
Item_func_elt
::
val
()
{
{
uint
tmp
;
uint
tmp
;
null_value
=
1
;
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
{
null_value
=
1
;
return
0.0
;
return
0.0
;
}
double
result
=
args
[
tmp
-
1
]
->
val
();
if
(
args
[
tmp
-
1
]
->
is_null
())
return
0.0
;
null_value
=
0
;
null_value
=
0
;
return
args
[
tmp
-
1
]
->
val
()
;
return
result
;
}
}
longlong
Item_func_elt
::
val_int
()
longlong
Item_func_elt
::
val_int
()
{
{
uint
tmp
;
uint
tmp
;
null_value
=
1
;
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
{
null_value
=
1
;
return
0
;
return
0
;
}
int
result
=
args
[
tmp
-
1
]
->
val_int
();
if
(
args
[
tmp
-
1
]
->
is_null
())
return
0
;
null_value
=
0
;
null_value
=
0
;
return
args
[
tmp
-
1
]
->
val_int
()
;
return
result
;
}
}
String
*
Item_func_elt
::
val_str
(
String
*
str
)
String
*
Item_func_elt
::
val_str
(
String
*
str
)
{
{
uint
tmp
;
uint
tmp
;
null_value
=
1
;
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
if
((
tmp
=
(
uint
)
item
->
val_int
())
==
0
||
tmp
>
arg_count
)
{
null_value
=
1
;
return
NULL
;
return
NULL
;
}
String
*
result
=
args
[
tmp
-
1
]
->
val_str
(
str
);
if
(
args
[
tmp
-
1
]
->
is_null
())
return
NULL
;
null_value
=
0
;
null_value
=
0
;
return
args
[
tmp
-
1
]
->
val_str
(
str
)
;
return
result
;
}
}
...
...
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