~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/drop_schema.cc

[patch 112/129] Merge patch for revision 1925 from InnoDB SVN:
revno: 1925
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6169
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6163
committer: calvin
timestamp: Thu 2009-11-12 12:40:43 +0000
message:
  branches/zip: add test case for bug#46676
  
  This crash is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
  But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
  Add test case to catch future regression.
added:
  mysql-test/innodb_bug46676.result 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.result
  mysql-test/innodb_bug46676.test 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.test
diff:
=== added file 'mysql-test/innodb_bug46676.result'

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
  SchemaIdentifier schema_identifier(string(session->lex->name.str, session->lex->name.length));
42
42
  if (not check_db_name(session, schema_identifier))
43
43
  {
44
 
    std::string path;
45
 
    schema_identifier.getSQLPath(path);
46
 
 
47
 
    my_error(ER_WRONG_DB_NAME, MYF(0), path.c_str());
 
44
    my_error(ER_WRONG_DB_NAME, MYF(0), schema_identifier.getSQLPath().c_str());
48
45
    return false;
49
46
  }
50
47
  if (session->inTransaction())
56
53
  }
57
54
  
58
55
  bool res = true;
59
 
  std::string path;
60
 
  schema_identifier.getSQLPath(path);
61
 
  if (unlikely(plugin::EventObserver::beforeDropDatabase(*session, path))) 
 
56
  if (unlikely(plugin::EventObserver::beforeDropDatabase(*session, schema_identifier.getSQLPath()))) 
62
57
  {
63
 
    my_error(ER_EVENT_OBSERVER_PLUGIN, MYF(0), path.c_str());
 
58
    my_error(ER_EVENT_OBSERVER_PLUGIN, MYF(0), schema_identifier.getSQLPath().c_str());
64
59
  }
65
60
  else
66
61
  {
67
62
    res= mysql_rm_db(session, schema_identifier, drop_if_exists);
68
 
    if (unlikely(plugin::EventObserver::afterDropDatabase(*session, path, res)))
 
63
    if (unlikely(plugin::EventObserver::afterDropDatabase(*session, schema_identifier.getSQLPath(), res)))
69
64
    {
70
 
      my_error(ER_EVENT_OBSERVER_PLUGIN, MYF(0), path.c_str());
 
65
      my_error(ER_EVENT_OBSERVER_PLUGIN, MYF(0), schema_identifier.getSQLPath().c_str());
71
66
      res = false;
72
67
    }
73
68