~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <drizzled/server_includes.h>
21
 
 
22
 
#include CSTDINT_H
 
20
#include "config.h"
 
21
 
 
22
#include <fcntl.h>
 
23
#include <unistd.h>
 
24
 
23
25
#include <string>
24
26
#include <vector>
25
27
#include <set>
44
46
#include <drizzled/data_home.h>
45
47
#include "drizzled/errmsg_print.h"
46
48
#include "drizzled/xid.h"
 
49
#include "drizzled/sql_table.h"
 
50
#include "drizzled/global_charset_info.h"
 
51
 
47
52
 
48
53
#include <drizzled/table_proto.h>
49
54
 
98
103
 
99
104
void plugin::StorageEngine::setTransactionReadWrite(Session& session)
100
105
{
101
 
  Ha_trx_info *ha_info= &session.ha_data[getSlot()].ha_info[0];
 
106
  Ha_trx_info *ha_info= session.getEngineInfo(this);
 
107
 
102
108
  /*
103
109
    When a storage engine method is called, the transaction must
104
110
    have been started, unless it's a DDL call, for which the
297
303
  */
298
304
  inline result_type operator() (argument_type engine)
299
305
  {
300
 
    if (engine->is_enabled() && 
301
 
        session_get_ha_data(session, engine))
302
 
    engine->close_connection(session);
 
306
    if (engine->is_enabled() && (*session->getEngineData(engine)))
 
307
      engine->close_connection(session);
303
308
  }
304
309
};
305
310
 
873
878
    const char *ext= strchr(filename->c_str(), '.');
874
879
 
875
880
    if (ext == NULL || my_strcasecmp(system_charset_info, ext, DEFAULT_DEFINITION_FILE_EXT.c_str()) ||
876
 
        is_prefix(filename->c_str(), TMP_FILE_PREFIX))
 
881
        (filename->compare(0, strlen(TMP_FILE_PREFIX), TMP_FILE_PREFIX) == 0))
877
882
    { }
878
883
    else
879
884
    {