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
f085e458
Commit
f085e458
authored
Jan 16, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove un-used code
sql/sql_prepare.cc: Remove uun-used code
parent
6e89e181
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
62 deletions
+0
-62
sql/sql_prepare.cc
sql/sql_prepare.cc
+0
-62
No files found.
sql/sql_prepare.cc
View file @
f085e458
...
...
@@ -333,53 +333,6 @@ static bool setup_params_data(PREP_STMT *stmt)
DBUG_RETURN
(
0
);
}
/*
Validates insert fields
*/
static
int
check_prepare_fields
(
THD
*
thd
,
TABLE
*
table
,
List
<
Item
>
&
fields
,
List
<
Item
>
&
values
,
ulong
counter
)
{
if
(
fields
.
elements
==
0
&&
values
.
elements
!=
0
)
{
if
(
values
.
elements
!=
table
->
fields
)
{
my_printf_error
(
ER_WRONG_VALUE_COUNT_ON_ROW
,
ER
(
ER_WRONG_VALUE_COUNT_ON_ROW
),
MYF
(
0
),
counter
);
return
-
1
;
}
}
else
{
if
(
fields
.
elements
!=
values
.
elements
)
{
my_printf_error
(
ER_WRONG_VALUE_COUNT_ON_ROW
,
ER
(
ER_WRONG_VALUE_COUNT_ON_ROW
),
MYF
(
0
),
counter
);
return
-
1
;
}
TABLE_LIST
table_list
;
bzero
((
char
*
)
&
table_list
,
sizeof
(
table_list
));
table_list
.
db
=
table
->
table_cache_key
;
table_list
.
real_name
=
table_list
.
alias
=
table
->
table_name
;
table_list
.
table
=
table
;
table_list
.
grant
=
table
->
grant
;
thd
->
dupp_field
=
0
;
if
(
setup_tables
(
&
table_list
)
||
setup_fields
(
thd
,
&
table_list
,
fields
,
1
,
0
,
0
))
return
-
1
;
if
(
thd
->
dupp_field
)
{
my_error
(
ER_FIELD_SPECIFIED_TWICE
,
MYF
(
0
),
thd
->
dupp_field
->
field_name
);
return
-
1
;
}
}
return
0
;
}
/*
Validate the following information for INSERT statement:
- field existance
...
...
@@ -519,21 +472,6 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
DBUG_RETURN
(
0
);
}
/*
Check the access privileges
*/
static
bool
check_prepare_access
(
THD
*
thd
,
TABLE_LIST
*
tables
,
uint
type
)
{
if
(
check_access
(
thd
,
type
,
tables
->
db
,
&
tables
->
grant
.
privilege
))
return
1
;
if
(
grant_option
&&
check_grant
(
thd
,
type
,
tables
))
return
1
;
return
0
;
}
/*
Send the prepare query results back to client
*/
...
...
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