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
2dfc05b1
Commit
2dfc05b1
authored
Oct 22, 2004
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-tzfix
parents
0ea8f291
016d5ade
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
sql/item.cc
sql/item.cc
+20
-0
sql/item.h
sql/item.h
+3
-2
sql/sql_union.cc
sql/sql_union.cc
+1
-1
No files found.
sql/item.cc
View file @
2dfc05b1
...
@@ -379,6 +379,12 @@ Item_field::Item_field(THD *thd, Field *f)
...
@@ -379,6 +379,12 @@ Item_field::Item_field(THD *thd, Field *f)
orig_db_name
=
thd
->
strdup
(
db_name
);
orig_db_name
=
thd
->
strdup
(
db_name
);
orig_table_name
=
thd
->
strdup
(
table_name
);
orig_table_name
=
thd
->
strdup
(
table_name
);
orig_field_name
=
thd
->
strdup
(
field_name
);
orig_field_name
=
thd
->
strdup
(
field_name
);
/*
We don't restore 'name' in cleanup because it's not changed
during execution. Still we need it to point to persistent
memory if this item is to be reused.
*/
name
=
(
char
*
)
orig_field_name
;
}
}
set_field
(
f
);
set_field
(
f
);
}
}
...
@@ -406,6 +412,20 @@ void Item_field::set_field(Field *field_par)
...
@@ -406,6 +412,20 @@ void Item_field::set_field(Field *field_par)
fixed
=
1
;
fixed
=
1
;
}
}
/*
Reset this item to point to a field from the new temporary table.
This is used when we create a new temporary table for each execution
of prepared statement.
*/
void
Item_field
::
reset_field
(
Field
*
f
)
{
set_field
(
f
);
/* 'name' is pointing at field->field_name of old field */
name
=
(
char
*
)
f
->
field_name
;
}
const
char
*
Item_ident
::
full_name
()
const
const
char
*
Item_ident
::
full_name
()
const
{
{
char
*
tmp
;
char
*
tmp
;
...
...
sql/item.h
View file @
2dfc05b1
...
@@ -348,6 +348,7 @@ class Item_ident :public Item
...
@@ -348,6 +348,7 @@ class Item_ident :public Item
class
Item_field
:
public
Item_ident
class
Item_field
:
public
Item_ident
{
{
void
set_field
(
Field
*
field
);
public:
public:
Field
*
field
,
*
result_field
;
Field
*
field
,
*
result_field
;
...
@@ -369,7 +370,7 @@ class Item_field :public Item_ident
...
@@ -369,7 +370,7 @@ class Item_field :public Item_ident
/*
/*
If this constructor is used, fix_fields() won't work, because
If this constructor is used, fix_fields() won't work, because
db_name, table_name and column_name are unknown. It's necessary to call
db_name, table_name and column_name are unknown. It's necessary to call
set_field() before fix_fields() for all fields created this way.
re
set_field() before fix_fields() for all fields created this way.
*/
*/
Item_field
(
Field
*
field
);
Item_field
(
Field
*
field
);
enum
Type
type
()
const
{
return
FIELD_ITEM
;
}
enum
Type
type
()
const
{
return
FIELD_ITEM
;
}
...
@@ -381,7 +382,7 @@ class Item_field :public Item_ident
...
@@ -381,7 +382,7 @@ class Item_field :public Item_ident
longlong
val_int_result
();
longlong
val_int_result
();
String
*
str_result
(
String
*
tmp
);
String
*
str_result
(
String
*
tmp
);
bool
send
(
Protocol
*
protocol
,
String
*
str_arg
);
bool
send
(
Protocol
*
protocol
,
String
*
str_arg
);
void
set_field
(
Field
*
field
);
void
reset_field
(
Field
*
f
);
bool
fix_fields
(
THD
*
,
struct
st_table_list
*
,
Item
**
);
bool
fix_fields
(
THD
*
,
struct
st_table_list
*
,
Item
**
);
void
make_field
(
Send_field
*
tmp_field
);
void
make_field
(
Send_field
*
tmp_field
);
int
save_in_field
(
Field
*
field
,
bool
no_conversions
);
int
save_in_field
(
Field
*
field
,
bool
no_conversions
);
...
...
sql/sql_union.cc
View file @
2dfc05b1
...
@@ -360,7 +360,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
...
@@ -360,7 +360,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
{
{
Item_field
*
item_field
=
(
Item_field
*
)
it
++
;
Item_field
*
item_field
=
(
Item_field
*
)
it
++
;
DBUG_ASSERT
(
item_field
);
DBUG_ASSERT
(
item_field
);
item_field
->
set_field
(
*
field
);
item_field
->
re
set_field
(
*
field
);
}
}
}
}
}
}
...
...
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