19
#include <drizzled/internal/my_bit.h>
19
#include "drizzled/internal/my_bit.h"
20
20
#include "myisampack.h"
21
21
#include "ha_myisam.h"
22
22
#include "myisam_priv.h"
23
#include <drizzled/option.h>
24
#include <drizzled/internal/my_bit.h>
25
#include <drizzled/internal/m_string.h>
26
#include <drizzled/util/test.h>
27
#include <drizzled/error.h>
28
#include <drizzled/errmsg_print.h>
29
#include <drizzled/gettext.h>
30
#include <drizzled/session.h>
31
#include <drizzled/plugin.h>
32
#include <drizzled/plugin/client.h>
33
#include <drizzled/table.h>
34
#include <drizzled/memory/multi_malloc.h>
35
#include <drizzled/plugin/daemon.h>
36
#include <drizzled/session/table_messages.h>
37
#include <drizzled/plugin/storage_engine.h>
38
#include <drizzled/key.h>
39
#include <drizzled/statistics_variables.h>
40
#include <drizzled/system_variables.h>
23
#include "drizzled/option.h"
24
#include "drizzled/internal/my_bit.h"
25
#include "drizzled/internal/m_string.h"
26
#include "drizzled/util/test.h"
27
#include "drizzled/error.h"
28
#include "drizzled/errmsg_print.h"
29
#include "drizzled/gettext.h"
30
#include "drizzled/session.h"
31
#include "drizzled/plugin.h"
32
#include "drizzled/plugin/client.h"
33
#include "drizzled/table.h"
34
#include "drizzled/memory/multi_malloc.h"
35
#include "drizzled/plugin/daemon.h"
42
37
#include <boost/algorithm/string.hpp>
43
38
#include <boost/scoped_ptr.hpp>
122
117
int doCreateTable(Session&,
123
118
Table& table_arg,
124
119
const identifier::Table &identifier,
125
const message::Table&);
127
122
int doRenameTable(Session&, const identifier::Table &from, const identifier::Table &to);
149
144
void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
150
145
const drizzled::identifier::Schema &schema_identifier,
151
drizzled::identifier::table::vector &set_of_identifiers);
146
drizzled::identifier::Table::vector &set_of_identifiers);
152
147
bool validateCreateTableOption(const std::string &key, const std::string &state)
164
159
void MyisamEngine::doGetTableIdentifiers(drizzled::CachedDirectory&,
165
160
const drizzled::identifier::Schema&,
166
drizzled::identifier::table::vector&)
161
drizzled::identifier::Table::vector&)
299
294
record= table_arg->getInsertRecord();
301
296
recinfo_pos= recinfo;
303
while (recpos < (uint) share->sizeStoredRecord())
297
while (recpos < (uint) share->stored_rec_length)
305
299
Field **field, *found= 0;
306
300
minpos= share->getRecordLength();
537
530
Session *cur_session;
538
531
if ((cur_session= file->in_use))
540
errmsg_printf(error::ERROR, _("Got an error from thread_id=%"PRIu64", %s:%d"),
532
errmsg_printf(ERRMSG_LVL_ERROR, _("Got an error from thread_id=%"PRIu64", %s:%d"),
541
533
cur_session->thread_id,
546
errmsg_printf(error::ERROR, _("Got an error from unknown thread, %s:%d"), sfile, sline);
536
errmsg_printf(ERRMSG_LVL_ERROR, _("Got an error from unknown thread, %s:%d"), sfile, sline);
550
errmsg_printf(error::ERROR, "%s", message);
538
errmsg_printf(ERRMSG_LVL_ERROR, "%s", message);
552
539
list<Session *>::iterator it= file->s->in_use->begin();
553
540
while (it != file->s->in_use->end())
555
errmsg_printf(error::ERROR, "%s", _("Unknown thread accessing table"));
542
errmsg_printf(ERRMSG_LVL_ERROR, "%s", _("Unknown thread accessing table"));
704
691
if (file->dfile == -1)
706
errmsg_printf(error::INFO, "Retrying repair of: '%s' failed. "
707
"Please try REPAIR EXTENDED or myisamchk",
708
getTable()->getShare()->getPath());
693
errmsg_printf(ERRMSG_LVL_INFO, "Retrying repair of: '%s' failed. "
694
"Please try REPAIR EXTENDED or myisamchk",
695
getTable()->getShare()->getPath());
709
696
return(HA_ADMIN_FAILED);
930
917
param.stats_method= MI_STATS_METHOD_NULLS_NOT_EQUAL;
931
918
if ((error= (repair(session,param,0) != HA_ADMIN_OK)) && param.retry_repair)
933
errmsg_printf(error::WARN, "Warning: Enabling keys got errno %d on %s.%s, retrying",
920
errmsg_printf(ERRMSG_LVL_WARN, "Warning: Enabling keys got errno %d on %s.%s, retrying",
934
921
errno, param.db_name, param.table_name);
935
922
/* Repairing by sort failed. Now try standard repair method. */
936
923
param.testflag&= ~(T_REP_BY_SORT | T_QUICK);
1360
1347
int MyisamEngine::doCreateTable(Session &session,
1361
1348
Table& table_arg,
1362
1349
const identifier::Table &identifier,
1363
const message::Table& create_proto)
1350
message::Table& create_proto)
1366
1353
uint32_t create_flags= 0, create_records;