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
b1195383
Commit
b1195383
authored
Aug 25, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0 sql/sql_base.cc: Auto merged
parents
44ac51af
d2aa6e78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
sql/sql_base.cc
sql/sql_base.cc
+15
-10
No files found.
sql/sql_base.cc
View file @
b1195383
...
@@ -2945,9 +2945,15 @@ find_field_in_tables(THD *thd, Item_ident *item,
...
@@ -2945,9 +2945,15 @@ find_field_in_tables(THD *thd, Item_ident *item,
char
name_buff
[
NAME_LEN
+
1
];
char
name_buff
[
NAME_LEN
+
1
];
TABLE_LIST
*
cur_table
=
first_table
;
TABLE_LIST
*
cur_table
=
first_table
;
TABLE_LIST
*
actual_table
;
TABLE_LIST
*
actual_table
;
bool
is_qualified
=
table_name
&&
table_name
[
0
];
bool
allow_rowid
;
bool
allow_rowid
=
is_qualified
?
TRUE
:
(
cur_table
&&
!
cur_table
->
next_local
);
if
(
!
table_name
||
!
table_name
[
0
])
{
table_name
=
0
;
// For easier test
db
=
0
;
}
allow_rowid
=
table_name
||
(
cur_table
&&
!
cur_table
->
next_local
);
if
(
item
->
cached_table
)
if
(
item
->
cached_table
)
{
{
...
@@ -3022,8 +3028,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
...
@@ -3022,8 +3028,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
cur_table
=
cur_table
->
next_name_resolution_table
)
cur_table
=
cur_table
->
next_name_resolution_table
)
{
{
Field
*
cur_field
=
find_field_in_table_ref
(
thd
,
cur_table
,
name
,
item
->
name
,
Field
*
cur_field
=
find_field_in_table_ref
(
thd
,
cur_table
,
name
,
item
->
name
,
is_qualified
?
table_name
:
NULL
,
table_name
,
db
,
is_qualified
?
db
:
NULL
,
length
,
ref
,
length
,
ref
,
(
cur_table
->
table
&&
(
cur_table
->
table
&&
test
(
cur_table
->
table
->
grant
.
test
(
cur_table
->
table
->
grant
.
...
@@ -3053,7 +3058,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
...
@@ -3053,7 +3058,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
If we found a fully qualified field we return it directly as it can't
If we found a fully qualified field we return it directly as it can't
have duplicates.
have duplicates.
*/
*/
if
(
is_qualified
&&
db
)
if
(
db
)
return
cur_field
;
return
cur_field
;
if
(
found
)
if
(
found
)
...
@@ -3061,7 +3066,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
...
@@ -3061,7 +3066,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
if
(
report_error
==
REPORT_ALL_ERRORS
||
if
(
report_error
==
REPORT_ALL_ERRORS
||
report_error
==
IGNORE_EXCEPT_NON_UNIQUE
)
report_error
==
IGNORE_EXCEPT_NON_UNIQUE
)
my_error
(
ER_NON_UNIQ_ERROR
,
MYF
(
0
),
my_error
(
ER_NON_UNIQ_ERROR
,
MYF
(
0
),
is_qualified
?
item
->
full_name
()
:
name
,
thd
->
where
);
table_name
?
item
->
full_name
()
:
name
,
thd
->
where
);
return
(
Field
*
)
0
;
return
(
Field
*
)
0
;
}
}
found
=
cur_field
;
found
=
cur_field
;
...
@@ -3078,7 +3083,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
...
@@ -3078,7 +3083,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
and cur_table wouldn't be updated by the loop increment part, so it
and cur_table wouldn't be updated by the loop increment part, so it
will be equal to the first table.
will be equal to the first table.
*/
*/
if
(
is_qualified
&&
(
cur_table
==
first_table
)
&&
if
(
table_name
&&
(
cur_table
==
first_table
)
&&
(
report_error
==
REPORT_ALL_ERRORS
||
(
report_error
==
REPORT_ALL_ERRORS
||
report_error
==
REPORT_EXCEPT_NON_UNIQUE
))
report_error
==
REPORT_EXCEPT_NON_UNIQUE
))
{
{
...
@@ -3091,13 +3096,13 @@ find_field_in_tables(THD *thd, Item_ident *item,
...
@@ -3091,13 +3096,13 @@ find_field_in_tables(THD *thd, Item_ident *item,
my_error
(
ER_UNKNOWN_TABLE
,
MYF
(
0
),
table_name
,
thd
->
where
);
my_error
(
ER_UNKNOWN_TABLE
,
MYF
(
0
),
table_name
,
thd
->
where
);
}
}
else
else
{
if
(
report_error
==
REPORT_ALL_ERRORS
||
if
(
report_error
==
REPORT_ALL_ERRORS
||
report_error
==
REPORT_EXCEPT_NON_UNIQUE
)
report_error
==
REPORT_EXCEPT_NON_UNIQUE
)
my_error
(
ER_BAD_FIELD_ERROR
,
MYF
(
0
),
item
->
full_name
(),
thd
->
where
);
my_error
(
ER_BAD_FIELD_ERROR
,
MYF
(
0
),
item
->
full_name
(),
thd
->
where
);
else
else
found
=
not_found_field
;
found
=
not_found_field
;
}
DBUG_ASSERT
(
!
found
||
found
==
not_found_field
);
return
found
;
return
found
;
}
}
...
...
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