diff options
author | venu@myvenu.com <> | 2003-01-16 14:57:49 -0800 |
---|---|---|
committer | venu@myvenu.com <> | 2003-01-16 14:57:49 -0800 |
commit | c2ddffb4a204b037084bbc9d5c586bac080e6440 (patch) | |
tree | cd471af498c9ee4546bd81f083aec5469c72883c /sql/sql_prepare.cc | |
parent | 0d294e1b64745051c14f17d017f44a9ea005f3ab (diff) | |
download | mariadb-git-c2ddffb4a204b037084bbc9d5c586bac080e6440.tar.gz |
Remove un-used code
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 3907995676f..69228c6ec4c 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -334,53 +334,6 @@ static bool setup_params_data(PREP_STMT *stmt) } /* - 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 - fields count @@ -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 */ |