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
6f81b7e0
Commit
6f81b7e0
authored
Jun 26, 2003
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Item::str_value can't be used for storing value
(fixed error in Item_cache_str)
parent
e8b1e216
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
sql/item.cc
sql/item.cc
+6
-6
sql/item.h
sql/item.h
+1
-1
No files found.
sql/item.cc
View file @
6f81b7e0
...
@@ -1630,11 +1630,11 @@ Item_cache* Item_cache::get_cache(Item_result type)
...
@@ -1630,11 +1630,11 @@ Item_cache* Item_cache::get_cache(Item_result type)
void
Item_cache_str
::
store
(
Item
*
item
)
void
Item_cache_str
::
store
(
Item
*
item
)
{
{
str_value
.
set
(
buffer
,
sizeof
(
buffer
),
item
->
charset
());
value_buff
.
set
(
buffer
,
sizeof
(
buffer
),
item
->
charset
());
value
=
item
->
str_result
(
&
str_value
);
value
=
item
->
str_result
(
&
value_buff
);
if
((
null_value
=
item
->
null_value
))
if
((
null_value
=
item
->
null_value
))
value
=
0
;
value
=
0
;
else
if
(
value
!=
&
str_value
)
else
if
(
value
!=
&
value_buff
)
{
{
/*
/*
We copy string value to avoid changing value if 'item' is table field
We copy string value to avoid changing value if 'item' is table field
...
@@ -1644,10 +1644,10 @@ void Item_cache_str::store(Item *item)
...
@@ -1644,10 +1644,10 @@ void Item_cache_str::store(Item *item)
(select c from t1 where a=t2.a)
(select c from t1 where a=t2.a)
from t2;
from t2;
*/
*/
str_value
.
copy
(
*
value
);
value_buff
.
copy
(
*
value
);
value
=
&
str_value
;
value
=
&
value_buff
;
}
}
set_charset
(
&
item
->
collation
);
}
}
double
Item_cache_str
::
val
()
double
Item_cache_str
::
val
()
{
{
...
...
sql/item.h
View file @
6f81b7e0
...
@@ -920,7 +920,7 @@ class Item_cache_real: public Item_cache
...
@@ -920,7 +920,7 @@ class Item_cache_real: public Item_cache
class
Item_cache_str
:
public
Item_cache
class
Item_cache_str
:
public
Item_cache
{
{
char
buffer
[
80
];
char
buffer
[
80
];
String
*
value
;
String
*
value
,
value_buff
;
public:
public:
Item_cache_str
()
:
Item_cache
()
{
}
Item_cache_str
()
:
Item_cache
()
{
}
...
...
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