~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Olaf van der Spek
  • Date: 2011-08-03 10:04:55 UTC
  • mfrom: (2382 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2384.
  • Revision ID: olafvdspek@gmail.com-20110803100455-2oqzyi77v4gykhy0
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
403
403
*/
404
404
static bool _schema_select(Session& session, Select_Lex& sel, const string& schema_table_name)
405
405
{
406
 
  LEX_STRING db, table;
 
406
  lex_string_t db, table;
407
407
  bitset<NUM_OF_TABLE_OPTIONS> table_options;
408
408
  /*
409
409
     We have to make non const db_name & table_name
732
732
  LEX& lex= session->lex();
733
733
  init_select(&lex);
734
734
  lex.sql_command= SQLCOM_SELECT;
735
 
  LEX_STRING tmp;
 
735
  lex_string_t tmp;
736
736
  tmp.str= (char*) var_name;
737
737
  tmp.length=strlen(var_name);
738
 
  LEX_STRING null_lex_string;
 
738
  lex_string_t null_lex_string;
739
739
  memset(&null_lex_string.str, 0, sizeof(null_lex_string));
740
740
  /*
741
741
    We set the name of Item to @@session.var_name because that then is used
806
806
    Return 0 if ok
807
807
*/
808
808
 
809
 
bool add_field_to_list(Session *session, LEX_STRING *field_name, enum_field_types type,
 
809
bool add_field_to_list(Session *session, lex_string_t *field_name, enum_field_types type,
810
810
                       const char *length, const char *decimals,
811
811
                       uint32_t type_modifier,
812
812
                       enum column_format_type column_format,
813
813
                       Item *default_value, Item *on_update_value,
814
 
                       LEX_STRING *comment,
 
814
                       lex_string_t *comment,
815
815
                       const char *change,
816
816
                       List<String> *interval_list, const charset_info_st * const cs)
817
817
{
826
826
  {
827
827
    Key *key;
828
828
    lex->col_list.push_back(new Key_part_spec(*field_name, 0));
829
 
    key= new Key(Key::PRIMARY, null_lex_str,
 
829
    key= new Key(Key::PRIMARY, null_lex_string(),
830
830
                      &default_key_create_info,
831
831
                      0, lex->col_list);
832
832
    statement->alter_info.key_list.push_back(key);
836
836
  {
837
837
    Key *key;
838
838
    lex->col_list.push_back(new Key_part_spec(*field_name, 0));
839
 
    key= new Key(Key::UNIQUE, null_lex_str,
 
839
    key= new Key(Key::UNIQUE, null_lex_string(),
840
840
                 &default_key_create_info, 0,
841
841
                 lex->col_list);
842
842
    statement->alter_info.key_list.push_back(key);
915
915
 
916
916
TableList *Select_Lex::add_table_to_list(Session *session,
917
917
                                         Table_ident *table,
918
 
                                         LEX_STRING *alias,
 
918
                                         lex_string_t *alias,
919
919
                                         const bitset<NUM_OF_TABLE_OPTIONS>& table_options,
920
920
                                         thr_lock_type lock_type,
921
921
                                         List<Index_hint> *index_hints_arg,
922
 
                                         LEX_STRING *option)
 
922
                                         lex_string_t *option)
923
923
{
924
924
  TableList *previous_table_ref; /* The table preceding the current one. */
925
925
  LEX *lex= &session->lex();
1575
1575
*/
1576
1576
 
1577
1577
 
1578
 
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
 
1578
bool check_string_char_length(lex_string_t *str, const char *err_msg,
1579
1579
                              uint32_t max_char_length, const charset_info_st * const cs,
1580
1580
                              bool no_error)
1581
1581
{
1592
1592
}
1593
1593
 
1594
1594
 
1595
 
bool check_identifier_name(LEX_STRING *str, error_t err_code,
 
1595
bool check_identifier_name(lex_string_t *str, error_t err_code,
1596
1596
                           uint32_t max_char_length,
1597
1597
                           const char *param_for_err_msg)
1598
1598
{