~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Lee Bieber
  • Date: 2011-01-05 05:15:02 UTC
  • mfrom: (2055.1.2 build)
  • Revision ID: kalebral@gmail.com-20110105051502-9v4xuoozzpkka8rs
Merge Evan - fix bug 682773 libdrizzle performance: in non-blocking mode don't attempt to read after write
Merge Stewart - add in more tests from the suites directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
    query_id.next();
189
189
  }
190
190
 
191
 
  /* @todo set session->lex->sql_command to SQLCOM_END here */
 
191
  /* TODO: set session->lex->sql_command to SQLCOM_END here */
192
192
 
193
193
  plugin::Logging::preDo(session);
194
194
  if (unlikely(plugin::EventObserver::beforeStatement(*session)))
209
209
 
210
210
    string tmp(packet, packet_length);
211
211
 
212
 
    identifier::Schema identifier(tmp);
 
212
    SchemaIdentifier identifier(tmp);
213
213
 
214
214
    if (not change_db(session, identifier))
215
215
    {
828
828
    */
829
829
    if (default_value->type() == Item::FUNC_ITEM &&
830
830
        !(((Item_func*)default_value)->functype() == Item_func::NOW_FUNC &&
831
 
         (type == DRIZZLE_TYPE_TIMESTAMP or type == DRIZZLE_TYPE_MICROTIME)))
 
831
         type == DRIZZLE_TYPE_TIMESTAMP))
832
832
    {
833
833
      my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str);
834
834
      return true;
836
836
    else if (default_value->type() == Item::NULL_ITEM)
837
837
    {
838
838
      default_value= 0;
839
 
      if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) == NOT_NULL_FLAG)
 
839
      if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) ==
 
840
          NOT_NULL_FLAG)
840
841
      {
841
842
        my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str);
842
843
        return true;
849
850
    }
850
851
  }
851
852
 
852
 
  if (on_update_value && (type != DRIZZLE_TYPE_TIMESTAMP and type != DRIZZLE_TYPE_MICROTIME))
 
853
  if (on_update_value && type != DRIZZLE_TYPE_TIMESTAMP)
853
854
  {
854
855
    my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name->str);
855
856
    return true;
921
922
  {
922
923
    my_casedn_str(files_charset_info, table->db.str);
923
924
 
924
 
    identifier::Schema schema_identifier(string(table->db.str));
 
925
    SchemaIdentifier schema_identifier(string(table->db.str));
925
926
    if (not check_db_name(session, schema_identifier))
926
927
    {
927
928
 
974
975
         tables ;
975
976
         tables=tables->next_local)
976
977
    {
977
 
      if (not my_strcasecmp(table_alias_charset, alias_str, tables->alias) &&
978
 
          not my_strcasecmp(system_charset_info, ptr->getSchemaName(), tables->getSchemaName()))
 
978
      if (!my_strcasecmp(table_alias_charset, alias_str, tables->alias) &&
 
979
          !strcasecmp(ptr->getSchemaName(), tables->getSchemaName()))
979
980
      {
980
981
        my_error(ER_NONUNIQ_TABLE, MYF(0), alias_str);
981
982
        return NULL;