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
d6f11ee9
Commit
d6f11ee9
authored
Aug 26, 2005
by
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge 5.0 -> 5.1
Fixes + Adapted to new name resolution context after WL #2486
parent
9650caaf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
sql/sql_base.cc
sql/sql_base.cc
+2
-2
sql/sql_partition.cc
sql/sql_partition.cc
+14
-4
No files found.
sql/sql_base.cc
View file @
d6f11ee9
...
...
@@ -3609,7 +3609,7 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
TABLE
*
table_2
=
nj_col_2
->
table_ref
->
table
;
/* Mark field_2 used for table cache. */
field_2
->
query_id
=
thd
->
query_id
;
table_2
->
file
->
ha_set_bit_in_read_set
(
field_
1
->
fieldnr
);
table_2
->
file
->
ha_set_bit_in_read_set
(
field_
2
->
fieldnr
);
table_2
->
used_keys
.
intersect
(
field_2
->
part_of_key
);
}
...
...
@@ -4472,7 +4472,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
if
(
field
->
query_id
==
thd
->
query_id
)
thd
->
dupp_field
=
field
;
field
->
query_id
=
thd
->
query_id
;
table
->
file
->
ha_set_bit_in_read_set
(
field
->
fieldnr
);
field
->
table
->
file
->
ha_set_bit_in_read_set
(
field
->
fieldnr
);
if
(
table
)
table
->
used_keys
.
intersect
(
field
->
part_of_key
);
...
...
sql/sql_partition.cc
View file @
d6f11ee9
...
...
@@ -1213,18 +1213,26 @@ static bool fix_fields_part_func(THD *thd, TABLE_LIST *tables,
bool
result
=
TRUE
;
TABLE
*
table
=
tables
->
table
;
TABLE_LIST
*
save_
list
;
TABLE_LIST
*
save_
table_list
,
*
save_first_table
,
*
save_last_table
;
int
error
;
Name_resolution_context
*
context
=
&
thd
->
lex
->
current_select
->
context
;
Name_resolution_context
*
context
;
DBUG_ENTER
(
"fix_fields_part_func"
);
context
=
thd
->
lex
->
current_context
();
table
->
map
=
1
;
//To ensure correct calculation of const item
table
->
get_fields_in_item_tree
=
TRUE
;
save_list
=
context
->
table_list
;
save_table_list
=
context
->
table_list
;
save_first_table
=
context
->
first_name_resolution_table
;
save_last_table
=
context
->
last_name_resolution_table
;
context
->
table_list
=
tables
;
context
->
first_name_resolution_table
=
tables
;
context
->
last_name_resolution_table
=
NULL
;
func_expr
->
walk
(
&
Item
::
change_context_processor
,
(
byte
*
)
context
);
thd
->
where
=
"partition function"
;
error
=
func_expr
->
fix_fields
(
thd
,
(
Item
**
)
0
);
context
->
table_list
=
save_list
;
context
->
table_list
=
save_table_list
;
context
->
first_name_resolution_table
=
save_first_table
;
context
->
last_name_resolution_table
=
save_last_table
;
if
(
unlikely
(
error
))
{
DBUG_PRINT
(
"info"
,
(
"Field in partition function not part of table"
));
...
...
@@ -1630,6 +1638,8 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table)
bzero
((
void
*
)
&
tables
,
sizeof
(
TABLE_LIST
));
tables
.
alias
=
tables
.
table_name
=
(
char
*
)
share
->
table_name
;
tables
.
table
=
table
;
tables
.
next_local
=
0
;
tables
.
next_name_resolution_table
=
0
;
strmov
(
db_name_string
,
name
);
dir_length
=
dirname_length
(
db_name_string
);
db_name_string
[
dir_length
-
1
]
=
0
;
...
...
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