~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Monty Taylor
  • Date: 2009-12-23 08:01:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1253.
  • Revision ID: mordred@inaugust.com-20091223080121-iveugdrewkp7iqyi
Oy. Bigger change than I normally like - but this stuff is all intertwined.
Moved a bunch of things to public drizzled/ area. Split some files. Made some
convenience libs. EVENTUALLY, some of this will be able to be re-factored, but
for now I'm ok with erring on the side of too many files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <drizzled/gettext.h>
23
23
#include <drizzled/data_home.h>
24
24
#include <drizzled/sql_parse.h>
25
 
#include <mysys/hash.h>
 
25
#include <drizzled/my_hash.h>
26
26
#include <drizzled/sql_lex.h>
27
27
#include <drizzled/session.h>
28
28
#include <drizzled/sql_base.h>
38
38
#include <drizzled/table_identifier.h>
39
39
#include "mystrings/m_string.h"
40
40
#include "drizzled/global_charset_info.h"
 
41
#include "drizzled/charset.h"
41
42
 
42
43
 
43
44
#include "drizzled/statement/alter_table.h"
1872
1873
    if (base->check_flag(HTON_BIT_HAS_DATA_DICTIONARY) == 0
1873
1874
       && rename_table_proto_file(from_base, to_base))
1874
1875
    {
1875
 
      error= my_errno;
 
1876
      error= errno;
1876
1877
      base->renameTable(session, to_base, from_base);
1877
1878
    }
1878
1879
  }
2349
2350
 
2350
2351
    if (protoerr)
2351
2352
    {
2352
 
      if (my_errno == ENOENT)
 
2353
      if (errno == ENOENT)
2353
2354
        my_error(ER_BAD_DB_ERROR,MYF(0),db);
2354
2355
      else
2355
 
        my_error(ER_CANT_CREATE_FILE, MYF(0), destination_identifier.getPath(), my_errno);
 
2356
        my_error(ER_CANT_CREATE_FILE, MYF(0), destination_identifier.getPath(), errno);
2356
2357
      pthread_mutex_unlock(&LOCK_open);
2357
2358
      goto err;
2358
2359
    }