Merge lp:~vkolesnikov/pbxt/pbxt-drizzle-merge into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-drizzle-merge
Merge into: lp:pbxt
Diff against target: None lines
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-drizzle-merge
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+4920@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

some comments on changes:

1. I had to extend the scope of _try (b) {} _catch (b) {} section to include the second assignment of "thd" variable as otherwise gcc gives a warning stating that the variable can be clobbered by the longjmp.

2. added check for existence of pbxt.location.[frm|dfe] to xt_create_table_frm()

3. other changes are either Drizzle-specific fixes and don't affect MySQL code or are renames of variables, hiding of unused parameters, etc...

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

Hi Vlad,

This was moved into the try block.

But you did not remove the copy before the try block. I assume you
just forgot...

Was it moved because of clobber warnings?

On Mar 26, 2009, at 9:55 AM, Vladimir Kolesnikov wrote:

> /* Can't do this here yet, because I need a THD! */
> try_(b) {
> + /* {MYSQL QUIRK}
> + * Sometime we have a THD,
> + * sometimes we don't.
> + * So far, I have noticed that during INSTALL PLUGIN,
> + * we have one, otherwize not.
> + */
> + if (!curr_thd) {
> + if (!(thd = (THD *) myxt_create_thread()))
> + xt_throw(self);
> + }
> +

--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com

599. By Paul McCullagh

Merged changes for RN232

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2009-03-23 15:30:52 +0000
+++ ChangeLog 2009-03-25 01:43:40 +0000
@@ -3,6 +3,8 @@
33
4------- 1.0.08 RC - Not yet released4------- 1.0.08 RC - Not yet released
55
6RN232: Merged Drizzle-specific changes into the main tree
7
6RN231: Fixed a bug that caused bad performance as the number of threads increased. This occurred when the number of open table handles exceeded 'table_open_cache', and MySQL started closing open table handlers. PBXT was flushing a table when all table handlers were closed. PBXT will now only do this when the FLUSH TABLES statement is used.8RN231: Fixed a bug that caused bad performance as the number of threads increased. This occurred when the number of open table handles exceeded 'table_open_cache', and MySQL started closing open table handlers. PBXT was flushing a table when all table handlers were closed. PBXT will now only do this when the FLUSH TABLES statement is used.
79
8RN230: Improved efficiency of conflict resolution: Implemented a queue for threads waiting for a lock. Threads no longer poll to take a lock. If a temp lock is granted because of an update, then the thread granted the temp lock will also wait for the transaction that did the update to quit.10RN230: Improved efficiency of conflict resolution: Implemented a queue for threads waiting for a lock. Threads no longer poll to take a lock. If a temp lock is granted because of an update, then the thread granted the temp lock will also wait for the transaction that did the update to quit.
911
=== modified file 'src/cache_xt.cc'
--- src/cache_xt.cc 2009-03-05 13:28:59 +0000
+++ src/cache_xt.cc 2009-03-25 01:43:40 +0000
@@ -357,8 +357,8 @@
357{357{
358 DcHandleSlotPtr hs;358 DcHandleSlotPtr hs;
359 XTIndBlockPtr block = NULL;359 XTIndBlockPtr block = NULL;
360 u_int hash_idx;360 u_int hash_idx = NULL;
361 DcSegmentPtr seg;361 DcSegmentPtr seg = NULL;
362 XTIndBlockPtr xblock;362 XTIndBlockPtr xblock;
363363
364 /* The lock order is:364 /* The lock order is:
365365
=== modified file 'src/datadic_xt.cc'
--- src/datadic_xt.cc 2009-03-25 09:31:29 +0000
+++ src/datadic_xt.cc 2009-03-25 01:43:40 +0000
@@ -1487,13 +1487,13 @@
1487 if (lastColumn && ct_curr_column) {1487 if (lastColumn && ct_curr_column) {
1488 /* This constraint has one column, the current column. */1488 /* This constraint has one column, the current column. */
1489 XTDDColumnRef *cref;1489 XTDDColumnRef *cref;
1490 char *name = xt_dup_string(self, ct_curr_column->dc_name);1490 char *col_name = xt_dup_string(self, ct_curr_column->dc_name);
14911491
1492 if (!(cref = new XTDDColumnRef())) {1492 if (!(cref = new XTDDColumnRef())) {
1493 xt_free(self, name);1493 xt_free(self, col_name);
1494 xt_throw_errno(XT_CONTEXT, XT_ENOMEM);1494 xt_throw_errno(XT_CONTEXT, XT_ENOMEM);
1495 }1495 }
1496 cref->cr_col_name = name;1496 cref->cr_col_name = col_name;
1497 ct_curr_constraint->co_cols.append(self, cref);1497 ct_curr_constraint->co_cols.append(self, cref);
1498 }1498 }
1499 }1499 }
@@ -2645,8 +2645,8 @@
2645 /* Check that all the columns can be set to NULL! */2645 /* Check that all the columns can be set to NULL! */
2646 XTDDColumn *col;2646 XTDDColumn *col;
26472647
2648 for (u_int i=0; i<fk->co_cols.size(); i++) {2648 for (u_int j=0; j<fk->co_cols.size(); j++) {
2649 if ((col = findColumn(fk->co_cols.itemAt(i)->cr_col_name))) {2649 if ((col = findColumn(fk->co_cols.itemAt(j)->cr_col_name))) {
2650 if (!col->dc_null_ok)2650 if (!col->dc_null_ok)
2651 xt_throw_tabcolerr(XT_CONTEXT, XT_ERR_COLUMN_IS_NOT_NULL, fk->fk_ref_tab_name, col->dc_name);2651 xt_throw_tabcolerr(XT_CONTEXT, XT_ERR_COLUMN_IS_NOT_NULL, fk->fk_ref_tab_name, col->dc_name);
2652 }2652 }
26532653
=== modified file 'src/discover_xt.cc'
--- src/discover_xt.cc 2008-10-29 10:45:13 +0000
+++ src/discover_xt.cc 2009-03-25 01:43:40 +0000
@@ -28,10 +28,12 @@
28#include "item_create.h"28#include "item_create.h"
29#include <m_ctype.h>29#include <m_ctype.h>
30#else30#else
31#define DRIZZLE_SERVER 131#include <drizzled/session.h>
32#include <drizzled/server_includes.h>32#include <drizzled/server_includes.h>
33#include <drizzled/sql_base.h>
33#endif34#endif
3435
36#include "strutil_xt.h"
35#include "ha_pbxt.h"37#include "ha_pbxt.h"
36#include "discover_xt.h"38#include "discover_xt.h"
37#include "ha_xtsys.h"39#include "ha_xtsys.h"
@@ -1280,8 +1282,15 @@
1280#endif // LOCK_OPEN_HACK_REQUIRED1282#endif // LOCK_OPEN_HACK_REQUIRED
12811283
1282//------------------------------1284//------------------------------
1283int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys __attribute__((unused)))1285int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys __attribute__((unused)), xtBool skip_existing)
1284{1286{
1287#ifdef DRIZZLED
1288 static const char *ext = ".dfe";
1289 static const int ext_len = 4;
1290#else
1291 static const char *ext = ".frm";
1292 static const int ext_len = 4;
1293#endif
1285 int err = 1;1294 int err = 1;
1286 //HA_CREATE_INFO create_info = {0};1295 //HA_CREATE_INFO create_info = {0};
1287 //Alter_info alter_info;1296 //Alter_info alter_info;
@@ -1295,7 +1304,9 @@
1295 1304
1296 /* setup the create info */1305 /* setup the create info */
1297 mylex.create_info.db_type = hton;1306 mylex.create_info.db_type = hton;
1298 mylex.create_info.frm_only = 1;1307#ifndef DRIZZLED
1308 mylex.create_info.frm_only = 1;
1309#endif
1299 mylex.create_info.default_table_charset = system_charset_info;1310 mylex.create_info.default_table_charset = system_charset_info;
1300 1311
1301 /* setup the column info. */1312 /* setup the column info. */
@@ -1335,6 +1346,22 @@
13351346
1336 info++;1347 info++;
1337 }1348 }
1349
1350 if (skip_existing) {
1351 size_t db_len = strlen(db);
1352 size_t name_len = strlen(name);
1353 size_t len = db_len + 1 + name_len + ext_len + 1;
1354 char *path = (char *)xt_malloc_ns(len);
1355 memcpy(path, db, db_len);
1356 memcpy(path + db_len + 1, name, name_len);
1357 memcpy(path + db_len + 1 + name_len, ext, ext_len);
1358 path[db_len] = XT_DIR_CHAR;
1359 path[len - 1] = '\0';
1360 xtBool exists = xt_fs_exists(path);
1361 xt_free_ns(path);
1362 if (exists)
1363 goto noerror;
1364 }
1338 1365
1339 /* Create an internal temp table */1366 /* Create an internal temp table */
1340#ifdef DRIZZLED1367#ifdef DRIZZLED
@@ -1345,6 +1372,7 @@
1345 goto error;1372 goto error;
1346#endif1373#endif
13471374
1375 noerror:
1348 err = 0;1376 err = 0;
13491377
1350 error:1378 error:
13511379
=== modified file 'src/discover_xt.h'
--- src/discover_xt.h 2008-10-02 14:24:10 +0000
+++ src/discover_xt.h 2009-03-25 01:43:40 +0000
@@ -24,7 +24,7 @@
24#define __DISCOVER_XT_H__24#define __DISCOVER_XT_H__
2525
26#ifdef DRIZZLED26#ifdef DRIZZLED
27#include <drizzled/common_includes.h>27#include <drizzled/common.h>
28#else28#else
29#include "mysql_priv.h"29#include "mysql_priv.h"
30#endif30#endif
@@ -73,7 +73,7 @@
73 const char* key_columns[8]; // The size of this can be set to what ever you need.73 const char* key_columns[8]; // The size of this can be set to what ever you need.
74} DT_KEY_INFO;74} DT_KEY_INFO;
7575
76int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys);76int xt_create_table_frm(handlerton *hton, THD* thd, const char *db, const char *name, DT_FIELD_INFO *info, DT_KEY_INFO *keys, xtBool skip_existing);
7777
78#endif78#endif
7979
8080
=== modified file 'src/ha_pbxt.cc'
--- src/ha_pbxt.cc 2009-03-25 09:31:29 +0000
+++ src/ha_pbxt.cc 2009-03-25 01:43:40 +0000
@@ -37,11 +37,19 @@
37#include <time.h>37#include <time.h>
3838
39#ifdef DRIZZLED39#ifdef DRIZZLED
40#include <drizzled/common_includes.h>40#include <drizzled/common.h>
41#include <drizzled/plugin.h>41#include <drizzled/plugin.h>
42#include <mysys/my_alloc.h>
43#include <mysys/hash.h>
44#include <drizzled/field.h>
45#include <drizzled/current_session.h>
42#include <drizzled/data_home.h>46#include <drizzled/data_home.h>
43#include <drizzled/error.h>47#include <drizzled/error.h>
44extern ulong max_connections;48#include <drizzled/table.h>
49#include <drizzled/field/timestamp.h>
50#include <drizzled/server_includes.h>
51extern "C" char **session_query(Session *session);
52#define my_strdup(a,b) strdup(a)
45#else53#else
46#include "mysql_priv.h"54#include "mysql_priv.h"
47#include <mysql/plugin.h>55#include <mysql/plugin.h>
@@ -1140,12 +1148,23 @@
11401148
1141 /* Can't do this here yet, because I need a THD! */1149 /* Can't do this here yet, because I need a THD! */
1142 try_(b) {1150 try_(b) {
1151 /* {MYSQL QUIRK}
1152 * Sometime we have a THD,
1153 * sometimes we don't.
1154 * So far, I have noticed that during INSTALL PLUGIN,
1155 * we have one, otherwize not.
1156 */
1157 if (!curr_thd) {
1158 if (!(thd = (THD *) myxt_create_thread()))
1159 xt_throw(self);
1160 }
1161
1143 xt_open_database(self, mysql_real_data_home, TRUE);1162 xt_open_database(self, mysql_real_data_home, TRUE);
1144 pbxt_database = self->st_database;1163 pbxt_database = self->st_database;
1145 xt_heap_reference(self, pbxt_database);1164 xt_heap_reference(self, pbxt_database);
1146 }1165 }
1147 catch_(b) {1166 catch_(b) {
1148 if (!curr_thd)1167 if (!curr_thd && thd)
1149 myxt_destroy_thread(thd, FALSE);1168 myxt_destroy_thread(thd, FALSE);
1150#ifndef DRIZZLED1169#ifndef DRIZZLED
1151 myxt_mutex_lock(&LOCK_plugin);1170 myxt_mutex_lock(&LOCK_plugin);
@@ -2213,10 +2232,10 @@
2213 table->timestamp_field->set_time();2232 table->timestamp_field->set_time();
22142233
2215 if (table->next_number_field && buf == table->record[0]) {2234 if (table->next_number_field && buf == table->record[0]) {
2216 int err = update_auto_increment();2235 int update_err = update_auto_increment();
2217 if (err) {2236 if (update_err) {
2218 ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);2237 ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);
2219 return err;2238 return update_err;
2220 }2239 }
2221 set_auto_increment(table->next_number_field);2240 set_auto_increment(table->next_number_field);
2222 }2241 }
@@ -4931,10 +4950,10 @@
4931 xt_throw_errno(XT_CONTEXT, XT_ERR_NO_DICTIONARY);4950 xt_throw_errno(XT_CONTEXT, XT_ERR_NO_DICTIONARY);
49324951
4933 for (int i = 0, sz = table_dic->dt_fkeys.size(); i < sz; i++) {4952 for (int i = 0, sz = table_dic->dt_fkeys.size(); i < sz; i++) {
4934 FOREIGN_KEY_INFO *info= new // assumed that C++ exceptions are disabled4953 FOREIGN_KEY_INFO *fk_info= new // assumed that C++ exceptions are disabled
4935 (thd_alloc(thd, sizeof(FOREIGN_KEY_INFO))) FOREIGN_KEY_INFO;4954 (thd_alloc(thd, sizeof(FOREIGN_KEY_INFO))) FOREIGN_KEY_INFO;
49364955
4937 if (info == NULL)4956 if (fk_info == NULL)
4938 xt_throw_errno(XT_CONTEXT, XT_ENOMEM);4957 xt_throw_errno(XT_CONTEXT, XT_ENOMEM);
49394958
4940 XTDDForeignKey *fk = table_dic->dt_fkeys.itemAt(i);4959 XTDDForeignKey *fk = table_dic->dt_fkeys.itemAt(i);
@@ -4953,16 +4972,16 @@
4953 ref_tbl_name++;4972 ref_tbl_name++;
4954 ref_db_name++;4973 ref_db_name++;
49554974
4956 info->forein_id = thd_make_lex_string(thd, 0,4975 fk_info->forein_id = thd_make_lex_string(thd, 0,
4957 fk->co_name, (uint) strlen(fk->co_name), 1);4976 fk->co_name, (uint) strlen(fk->co_name), 1);
49584977
4959 info->referenced_db = thd_make_lex_string(thd, 0,4978 fk_info->referenced_db = thd_make_lex_string(thd, 0,
4960 ref_db_name, (uint) (ref_tbl_name - ref_db_name - 1), 1);4979 ref_db_name, (uint) (ref_tbl_name - ref_db_name - 1), 1);
49614980
4962 info->referenced_table = thd_make_lex_string(thd, 0,4981 fk_info->referenced_table = thd_make_lex_string(thd, 0,
4963 ref_tbl_name, (uint) strlen(ref_tbl_name), 1);4982 ref_tbl_name, (uint) strlen(ref_tbl_name), 1);
49644983
4965 info->referenced_key_name = NULL; 4984 fk_info->referenced_key_name = NULL;
49664985
4967 XTIndex *ix = fk->getReferenceIndexPtr();4986 XTIndex *ix = fk->getReferenceIndexPtr();
4968 if (ix == NULL) /* can be NULL if another thread changes referenced table at the moment */4987 if (ix == NULL) /* can be NULL if another thread changes referenced table at the moment */
@@ -4983,7 +5002,7 @@
4983 if (ddix->in_index == ix->mi_index_no) {5002 if (ddix->in_index == ix->mi_index_no) {
4984 const char *ix_name = 5003 const char *ix_name =
4985 ddix->co_name ? ddix->co_name : ddix->co_ind_name;5004 ddix->co_name ? ddix->co_name : ddix->co_ind_name;
4986 info->referenced_key_name = thd_make_lex_string(thd, 0,5005 fk_info->referenced_key_name = thd_make_lex_string(thd, 0,
4987 ix_name, (uint) strlen(ix_name), 1);5006 ix_name, (uint) strlen(ix_name), 1);
4988 break;5007 break;
4989 }5008 }
@@ -4991,27 +5010,27 @@
4991 }5010 }
49925011
4993 action = XTDDForeignKey::actionTypeToString(fk->fk_on_delete);5012 action = XTDDForeignKey::actionTypeToString(fk->fk_on_delete);
4994 info->delete_method = thd_make_lex_string(thd, 0,5013 fk_info->delete_method = thd_make_lex_string(thd, 0,
4995 action, (uint) strlen(action), 1);5014 action, (uint) strlen(action), 1);
4996 action = XTDDForeignKey::actionTypeToString(fk->fk_on_update);5015 action = XTDDForeignKey::actionTypeToString(fk->fk_on_update);
4997 info->update_method = thd_make_lex_string(thd, 0,5016 fk_info->update_method = thd_make_lex_string(thd, 0,
4998 action, (uint) strlen(action), 1);5017 action, (uint) strlen(action), 1);
49995018
5000 const XTList<XTDDColumnRef>& cols = fk->co_cols;5019 const XTList<XTDDColumnRef>& cols = fk->co_cols;
5001 for (int j = 0, sz2 = cols.size(); j < sz2; j++) {5020 for (int j = 0, sz2 = cols.size(); j < sz2; j++) {
5002 XTDDColumnRef *col_ref= cols.itemAt(j);5021 XTDDColumnRef *col_ref= cols.itemAt(j);
5003 info->foreign_fields.push_back(thd_make_lex_string(thd, 0,5022 fk_info->foreign_fields.push_back(thd_make_lex_string(thd, 0,
5004 col_ref->cr_col_name, (uint) strlen(col_ref->cr_col_name), 1));5023 col_ref->cr_col_name, (uint) strlen(col_ref->cr_col_name), 1));
5005 }5024 }
50065025
5007 const XTList<XTDDColumnRef>& ref_cols = fk->fk_ref_cols;5026 const XTList<XTDDColumnRef>& ref_cols = fk->fk_ref_cols;
5008 for (int j = 0, sz2 = ref_cols.size(); j < sz2; j++) {5027 for (int j = 0, sz2 = ref_cols.size(); j < sz2; j++) {
5009 XTDDColumnRef *col_ref= ref_cols.itemAt(j);5028 XTDDColumnRef *col_ref= ref_cols.itemAt(j);
5010 info->referenced_fields.push_back(thd_make_lex_string(thd, 0,5029 fk_info->referenced_fields.push_back(thd_make_lex_string(thd, 0,
5011 col_ref->cr_col_name, (uint) strlen(col_ref->cr_col_name), 1));5030 col_ref->cr_col_name, (uint) strlen(col_ref->cr_col_name), 1));
5012 }5031 }
50135032
5014 f_key_list->push_back(info);5033 f_key_list->push_back(fk_info);
5015 }5034 }
5016 }5035 }
5017 catch_(a) {5036 catch_(a) {
@@ -5180,7 +5199,11 @@
5180};5199};
5181#endif5200#endif
51825201
5202#ifdef DRIZZLED
5203drizzle_declare_plugin(pbxt)
5204#else
5183mysql_declare_plugin(pbxt)5205mysql_declare_plugin(pbxt)
5206#endif
5184{5207{
5185 MYSQL_STORAGE_ENGINE_PLUGIN,5208 MYSQL_STORAGE_ENGINE_PLUGIN,
5186#ifndef DRIZZLED5209#ifndef DRIZZLED
@@ -5227,7 +5250,11 @@
5227 NULL, /* system variables */5250 NULL, /* system variables */
5228 NULL /* config options */5251 NULL /* config options */
5229}5252}
5253#ifdef DRIZZLED
5254drizzle_declare_plugin_end;
5255#else
5230mysql_declare_plugin_end;5256mysql_declare_plugin_end;
5257#endif
52315258
5232#if defined(XT_WIN) && defined(XT_COREDUMP)5259#if defined(XT_WIN) && defined(XT_COREDUMP)
52335260
52345261
=== modified file 'src/ha_pbxt.h'
--- src/ha_pbxt.h 2009-03-23 15:30:52 +0000
+++ src/ha_pbxt.h 2009-03-25 01:43:40 +0000
@@ -26,7 +26,10 @@
26#define __ha_pbxt_h__26#define __ha_pbxt_h__
2727
28#ifdef DRIZZLED28#ifdef DRIZZLED
29#include <drizzled/common_includes.h>29#include <drizzled/common.h>
30#include <drizzled/handler.h>
31#include <drizzled/handlerton.h>
32#include <mysys/thr_lock.h>
30#else33#else
31#include "mysql_priv.h"34#include "mysql_priv.h"
32#endif35#endif
@@ -259,6 +262,7 @@
259/*262/*
260 * These hooks are suppossed to only be used by InnoDB:263 * These hooks are suppossed to only be used by InnoDB:
261 */264 */
265#ifndef DRIZZLED
262#ifdef INNODB_COMPATIBILITY_HOOKS266#ifdef INNODB_COMPATIBILITY_HOOKS
263extern "C" struct charset_info_st *thd_charset(MYSQL_THD thd);267extern "C" struct charset_info_st *thd_charset(MYSQL_THD thd);
264extern "C" char **thd_query(MYSQL_THD thd);268extern "C" char **thd_query(MYSQL_THD thd);
@@ -274,6 +278,7 @@
274#define thd_binlog_format(t) (t)->variables.binlog_format278#define thd_binlog_format(t) (t)->variables.binlog_format
275#define thd_mark_transaction_to_rollback(t) mark_transaction_to_rollback(t, all)279#define thd_mark_transaction_to_rollback(t) mark_transaction_to_rollback(t, all)
276#endif // INNODB_COMPATIBILITY_HOOKS */280#endif // INNODB_COMPATIBILITY_HOOKS */
281#endif /* !DRIZZLED */
277282
278/* How to lock MySQL mutexes! */283/* How to lock MySQL mutexes! */
279#ifdef SAFE_MUTEX284#ifdef SAFE_MUTEX
280285
=== modified file 'src/ha_xtsys.cc'
--- src/ha_xtsys.cc 2008-11-21 11:38:54 +0000
+++ src/ha_xtsys.cc 2009-03-25 01:43:40 +0000
@@ -35,6 +35,10 @@
35#include <stdlib.h>35#include <stdlib.h>
36#include <time.h>36#include <time.h>
3737
38#ifdef DRIZZLED
39#include <drizzled/server_includes.h>
40#endif
41
38#include "ha_xtsys.h"42#include "ha_xtsys.h"
39#include "ha_pbxt.h"43#include "ha_pbxt.h"
4044
@@ -42,6 +46,7 @@
42#include "database_xt.h"46#include "database_xt.h"
43#include "discover_xt.h"47#include "discover_xt.h"
44#include "systab_xt.h"48#include "systab_xt.h"
49#include "xt_defs.h"
4550
46/* Note: mysql_priv.h messes with new, which caused a crash. */51/* Note: mysql_priv.h messes with new, which caused a crash. */
47#ifdef new52#ifdef new
4853
=== modified file 'src/ha_xtsys.h'
--- src/ha_xtsys.h 2008-10-02 17:11:30 +0000
+++ src/ha_xtsys.h 2009-03-25 01:43:40 +0000
@@ -29,7 +29,9 @@
29#define __HA_XTSYS_H__29#define __HA_XTSYS_H__
3030
31#ifdef DRIZZLED31#ifdef DRIZZLED
32#include <drizzled/common_includes.h>32#include <drizzled/common.h>
33#include <drizzled/handler.h>
34#include <drizzled/current_session.h>
33#else35#else
34#include "mysql_priv.h"36#include "mysql_priv.h"
35#endif37#endif
3638
=== modified file 'src/heap_xt.cc'
--- src/heap_xt.cc 2009-03-24 16:24:48 +0000
+++ src/heap_xt.cc 2009-03-25 01:43:40 +0000
@@ -75,7 +75,7 @@
75#ifdef DEBUG75#ifdef DEBUG
76xtPublic void xt_mm_heap_reference(XTThreadPtr self, XTHeapPtr hp, u_int line, c_char *file)76xtPublic void xt_mm_heap_reference(XTThreadPtr self, XTHeapPtr hp, u_int line, c_char *file)
77#else77#else
78xtPublic void xt_heap_reference(XTThreadPtr self, XTHeapPtr hp)78xtPublic void xt_heap_reference(XTThreadPtr, XTHeapPtr hp)
79#endif79#endif
80{80{
81 xt_spinlock_lock(&hp->h_lock);81 xt_spinlock_lock(&hp->h_lock);
8282
=== modified file 'src/index_xt.cc'
--- src/index_xt.cc 2009-03-25 09:31:29 +0000
+++ src/index_xt.cc 2009-03-25 01:43:40 +0000
@@ -427,13 +427,14 @@
427 bitem = base + guess * full_item_size;427 bitem = base + guess * full_item_size;
428428
429 switch (ind->mi_single_type) {429 switch (ind->mi_single_type) {
430 case HA_KEYTYPE_LONG_INT:430 case HA_KEYTYPE_LONG_INT: {
431 register xtInt4 a, b;431 register xtInt4 a, b;
432 432
433 a = XT_GET_DISK_4(value->sv_key);433 a = XT_GET_DISK_4(value->sv_key);
434 b = XT_GET_DISK_4(bitem);434 b = XT_GET_DISK_4(bitem);
435 r = (a < b) ? -1 : (a == b ? 0 : 1);435 r = (a < b) ? -1 : (a == b ? 0 : 1);
436 break;436 break;
437 }
437 case HA_KEYTYPE_ULONG_INT: {438 case HA_KEYTYPE_ULONG_INT: {
438 register xtWord4 a, b;439 register xtWord4 a, b;
439 440
@@ -988,7 +989,7 @@
988/*989/*
989 * Remove an item and save to disk.990 * Remove an item and save to disk.
990 */991 */
991static xtBool idx_remove_branch_item_right(XTOpenTablePtr ot, XTIndexPtr ind, xtIndexNodeID address, XTIndReferencePtr iref, register XTIdxItemPtr item)992static xtBool idx_remove_branch_item_right(XTOpenTablePtr ot, XTIndexPtr ind, xtIndexNodeID, XTIndReferencePtr iref, register XTIdxItemPtr item)
992{993{
993 register XTIdxBranchDPtr branch = iref->ir_branch;994 register XTIdxBranchDPtr branch = iref->ir_branch;
994 u_int size = item->i_item_size + item->i_node_ref_size;995 u_int size = item->i_item_size + item->i_node_ref_size;
@@ -1016,7 +1017,7 @@
1016 return OK;1017 return OK;
1017}1018}
10181019
1019static xtBool idx_remove_branch_item_left(XTOpenTablePtr ot, XTIndexPtr ind, xtIndexNodeID address, XTIndReferencePtr iref, register XTIdxItemPtr item)1020static xtBool idx_remove_branch_item_left(XTOpenTablePtr ot, XTIndexPtr ind, xtIndexNodeID, XTIndReferencePtr iref, register XTIdxItemPtr item)
1020{1021{
1021 register XTIdxBranchDPtr branch = iref->ir_branch;1022 register XTIdxBranchDPtr branch = iref->ir_branch;
1022 u_int size = item->i_item_size + item->i_node_ref_size;1023 u_int size = item->i_item_size + item->i_node_ref_size;
@@ -2667,7 +2668,7 @@
26672668
2668static void idx_set_index_selectivity(XTThreadPtr self __attribute__((unused)), XTOpenTablePtr ot, XTIndexPtr ind)2669static void idx_set_index_selectivity(XTThreadPtr self __attribute__((unused)), XTOpenTablePtr ot, XTIndexPtr ind)
2669{2670{
2670 static const int MAX_RECORDS = 100;2671 static const xtRecordID MAX_RECORDS = 100;
26712672
2672 XTIdxSearchKeyRec search_key;2673 XTIdxSearchKeyRec search_key;
2673 XTIndexSegPtr key_seg;2674 XTIndexSegPtr key_seg;
@@ -2680,8 +2681,8 @@
2680 u_int diff;2681 u_int diff;
2681 u_int j, i;2682 u_int j, i;
2682 /* these 2 vars are used to check the overlapping if we have < 200 records */2683 /* these 2 vars are used to check the overlapping if we have < 200 records */
2683 int last_rec = 0; /* last record accounted in this iteration */2684 xtRecordID last_rec = 0; /* last record accounted in this iteration */
2684 int last_iter_rec = 0; /* last record accounted in the previous iteration */2685 xtRecordID last_iter_rec = 0; /* last record accounted in the previous iteration */
26852686
2686 xtBool (* xt_idx_iterator[2])(2687 xtBool (* xt_idx_iterator[2])(
2687 register struct XTOpenTable *ot, register struct XTIndex *ind, register XTIdxSearchKeyPtr search_key) = {2688 register struct XTOpenTable *ot, register struct XTIndex *ind, register XTIdxSearchKeyPtr search_key) = {
@@ -2932,7 +2933,7 @@
2932#endif2933#endif
29332934
2934 ind = tab->tab_dic.dic_keys;2935 ind = tab->tab_dic.dic_keys;
2935 for (u_int i=0; i<tab->tab_dic.dic_key_count; i++, ind++) {2936 for (u_int k=0; k<tab->tab_dic.dic_key_count; k++, ind++) {
2936 ind_count = idx_check_index(ot, *ind, TRUE);2937 ind_count = idx_check_index(ot, *ind, TRUE);
2937 block_count += ind_count;2938 block_count += ind_count;
2938 }2939 }
@@ -2963,10 +2964,10 @@
29632964
2964 current = tab->tab_ind_free;2965 current = tab->tab_ind_free;
2965 if (XT_NODE_ID(current)) {2966 if (XT_NODE_ID(current)) {
2966 u_int i = 0;2967 u_int k = 0;
2967 printf("Disk List:");2968 printf("Disk List:");
2968 while (XT_NODE_ID(current)) {2969 while (XT_NODE_ID(current)) {
2969 if ((i % 40) == 0)2970 if ((k % 40) == 0)
2970 printf("\n");2971 printf("\n");
2971 free_count++;2972 free_count++;
2972#ifdef TRACK_ACTIVITY2973#ifdef TRACK_ACTIVITY
@@ -2978,9 +2979,9 @@
2978 break;2979 break;
2979 }2980 }
2980 XT_NODE_ID(current) = (xtIndexNodeID) XT_GET_DISK_8(free_block.if_next_block_8);2981 XT_NODE_ID(current) = (xtIndexNodeID) XT_GET_DISK_8(free_block.if_next_block_8);
2981 i++;2982 k++;
2982 }2983 }
2983 if ((i % 40) != 0)2984 if ((k % 40) != 0)
2984 printf("\n");2985 printf("\n");
2985 }2986 }
2986 printf("\n-----------------------------\n");2987 printf("\n-----------------------------\n");
29872988
=== modified file 'src/lock_xt.cc'
--- src/lock_xt.cc 2009-03-25 09:31:29 +0000
+++ src/lock_xt.cc 2009-03-25 01:43:40 +0000
@@ -100,7 +100,7 @@
100 return 0;100 return 0;
101}101}
102102
103void XTRowLockList::xt_remove_all_locks(struct XTDatabase *db, XTThreadPtr thread)103void XTRowLockList::xt_remove_all_locks(struct XTDatabase *, XTThreadPtr thread)
104{104{
105#ifdef XT_TRACE_LOCKS105#ifdef XT_TRACE_LOCKS
106 xt_ttracef(xt_get_self(), "remove all locks\n");106 xt_ttracef(xt_get_self(), "remove all locks\n");
@@ -145,7 +145,7 @@
145 copy = group->lg_list;145 copy = group->lg_list;
146 item = group->lg_list;146 item = group->lg_list;
147 new_count = 0;147 new_count = 0;
148 for (int k=0; k<group->lg_list_in_use; k++) {148 for (size_t k=0; k<group->lg_list_in_use; k++) {
149 if (item->li_thread_id != thd_id) {149 if (item->li_thread_id != thd_id) {
150 if (copy != item) {150 if (copy != item) {
151 copy->li_row_id = item->li_row_id;151 copy->li_row_id = item->li_row_id;
@@ -215,7 +215,7 @@
215}215}
216#endif216#endif
217217
218xtBool XTRowLocks::rl_lock_row(XTLockGroupPtr group, XTLockWaitPtr lw, XTRowLockListPtr lock_list, int *result)218xtBool XTRowLocks::rl_lock_row(XTLockGroupPtr group, XTLockWaitPtr lw, XTRowLockListPtr, int *result)
219{219{
220 XTLockItemPtr item;220 XTLockItemPtr item;
221 size_t index;221 size_t index;
@@ -450,7 +450,7 @@
450 XTLockItemPtr item;450 XTLockItemPtr item;
451 size_t index;451 size_t index;
452 xtBool lock_granted = FALSE;452 xtBool lock_granted = FALSE;
453 xtThreadID locking_thread_id;453 xtThreadID locking_thread_id = 0;
454454
455 if (!(row_id = ot->ot_temp_row_lock))455 if (!(row_id = ot->ot_temp_row_lock))
456 return;456 return;
@@ -566,7 +566,7 @@
566566
567 /* Add to the lock list: */567 /* Add to the lock list: */
568 XTPermRowLockPtr locks = (XTPermRowLockPtr) lock_list->bl_data;568 XTPermRowLockPtr locks = (XTPermRowLockPtr) lock_list->bl_data;
569 for (int i=0; i<lock_list->bl_count; i++) {569 for (unsigned i=0; i<lock_list->bl_count; i++) {
570#ifdef XT_USE_TABLE_REF570#ifdef XT_USE_TABLE_REF
571 if (locks->pr_table == ot->ot_table) {571 if (locks->pr_table == ot->ot_table) {
572#else572#else
@@ -1732,7 +1732,7 @@
1732#endif1732#endif
1733}1733}
17341734
1735xtPublic void xt_atomicrwlock_free(struct XTThread *self, XTAtomicRWLockPtr arw)1735xtPublic void xt_atomicrwlock_free(struct XTThread *, XTAtomicRWLockPtr XT_UNUSED(arw))
1736{1736{
1737#ifdef XT_THREAD_LOCK_INFO1737#ifdef XT_THREAD_LOCK_INFO
1738 xt_thread_lock_info_free(&arw->arw_lock_info);1738 xt_thread_lock_info_free(&arw->arw_lock_info);
17391739
=== modified file 'src/lock_xt.h'
--- src/lock_xt.h 2009-03-24 16:26:04 +0000
+++ src/lock_xt.h 2009-03-25 01:43:40 +0000
@@ -630,8 +630,8 @@
630 XTSpinLockRec lg_lock; /* A lock for the list. */630 XTSpinLockRec lg_lock; /* A lock for the list. */
631 XTLockWaitPtr lg_wait_queue; /* A queue of threads waiting for a lock in this group. */631 XTLockWaitPtr lg_wait_queue; /* A queue of threads waiting for a lock in this group. */
632 XTLockWaitPtr lg_wait_queue_end; /* The end of the thread queue. */632 XTLockWaitPtr lg_wait_queue_end; /* The end of the thread queue. */
633 int lg_list_size; /* The size of the list. */633 size_t lg_list_size; /* The size of the list. */
634 int lg_list_in_use; /* Number of slots on the list in use. */634 size_t lg_list_in_use; /* Number of slots on the list in use. */
635 XTLockItemPtr lg_list; /* List of locks. */635 XTLockItemPtr lg_list; /* List of locks. */
636} XTLockGroupRec, *XTLockGroupPtr;636} XTLockGroupRec, *XTLockGroupPtr;
637637
638638
=== modified file 'src/myxt_xt.cc'
--- src/myxt_xt.cc 2009-02-20 14:26:09 +0000
+++ src/myxt_xt.cc 2009-03-25 01:43:40 +0000
@@ -27,10 +27,17 @@
27#include "xt_config.h"27#include "xt_config.h"
2828
29#ifdef DRIZZLED29#ifdef DRIZZLED
30#define DRIZZLE_SERVER 1
31#include <drizzled/server_includes.h>30#include <drizzled/server_includes.h>
32#include <drizzled/plugin.h>31#include <drizzled/plugin.h>
33#include <drizzled/show.h>32#include <drizzled/show.h>
33#include <drizzled/field/blob.h>
34#include <drizzled/field/enum.h>
35#include <drizzled/field/varstring.h>
36#include <drizzled/current_session.h>
37#include <drizzled/sql_lex.h>
38#include <drizzled/session.h>
39extern "C" struct charset_info_st *session_charset(Session *session);
40extern pthread_key_t THR_Session;
34#else41#else
35#include "mysql_priv.h"42#include "mysql_priv.h"
36#include <mysql/plugin.h>43#include <mysql/plugin.h>
@@ -623,7 +630,6 @@
623 case DRIZZLE_TYPE_NULL:630 case DRIZZLE_TYPE_NULL:
624 case DRIZZLE_TYPE_TIMESTAMP:631 case DRIZZLE_TYPE_TIMESTAMP:
625 case DRIZZLE_TYPE_LONGLONG:632 case DRIZZLE_TYPE_LONGLONG:
626 case DRIZZLE_TYPE_TIME:
627 case DRIZZLE_TYPE_DATETIME:633 case DRIZZLE_TYPE_DATETIME:
628 case DRIZZLE_TYPE_DATE:634 case DRIZZLE_TYPE_DATE:
629 case DRIZZLE_TYPE_NEWDECIMAL:635 case DRIZZLE_TYPE_NEWDECIMAL:
@@ -743,7 +749,6 @@
743 case DRIZZLE_TYPE_NULL:749 case DRIZZLE_TYPE_NULL:
744 case DRIZZLE_TYPE_TIMESTAMP:750 case DRIZZLE_TYPE_TIMESTAMP:
745 case DRIZZLE_TYPE_LONGLONG:751 case DRIZZLE_TYPE_LONGLONG:
746 case DRIZZLE_TYPE_TIME:
747 case DRIZZLE_TYPE_DATETIME:752 case DRIZZLE_TYPE_DATETIME:
748 case DRIZZLE_TYPE_DATE:753 case DRIZZLE_TYPE_DATE:
749 case DRIZZLE_TYPE_NEWDECIMAL:754 case DRIZZLE_TYPE_NEWDECIMAL:
@@ -1872,7 +1877,9 @@
18721877
1873static void my_close_table(TABLE *table)1878static void my_close_table(TABLE *table)
1874{1879{
1875 closefrm(table, 1); // TODO: Q, why did Stewart remove this?1880#ifndef DRIZZLED
1881 closefrm(table, 1); // TODO: Q, why did Stewart remove this?
1882#endif
1876 xt_free_ns(table);1883 xt_free_ns(table);
1877}1884}
18781885
@@ -2168,6 +2175,18 @@
2168 seg->bit_start = ((Field_bit *) field)->bit_ofs;2175 seg->bit_start = ((Field_bit *) field)->bit_ofs;
2169 seg->bit_pos = (uint) (((Field_bit *) field)->bit_ptr - (uchar*) table_arg->record[0]);2176 seg->bit_pos = (uint) (((Field_bit *) field)->bit_ptr - (uchar*) table_arg->record[0]);
2170 }2177 }
2178#else
2179 /* Drizzle uses HA_KEYTYPE_ULONG_INT keys for enums > 1 byte, which is not consistent with MySQL, so we fix it here */
2180 else if (field->type() == MYSQL_TYPE_ENUM) {
2181 switch (seg->length) {
2182 case 2:
2183 seg->type = HA_KEYTYPE_USHORT_INT;
2184 break;
2185 case 3:
2186 seg->type = HA_KEYTYPE_UINT24;
2187 break;
2188 }
2189 }
2171#endif2190#endif
21722191
2173 switch (seg->type) {2192 switch (seg->type) {
@@ -2524,7 +2543,7 @@
2524 if (!dic_rec_fixed) {2543 if (!dic_rec_fixed) {
2525 xtWord8 max_rec_size = offsetof(XTTabRecExt, re_data);2544 xtWord8 max_rec_size = offsetof(XTTabRecExt, re_data);
25262545
2527 for (Field **field=my_tab->field; (curr_field = *field); field++) {2546 for (Field **f=my_tab->field; (curr_field = *f); f++) {
2528 max_data_size = curr_field->key_length();2547 max_data_size = curr_field->key_length();
2529 enum_field_types tno = curr_field->type();2548 enum_field_types tno = curr_field->type();
2530 if (tno == MYSQL_TYPE_BLOB)2549 if (tno == MYSQL_TYPE_BLOB)
@@ -3036,7 +3055,7 @@
3036 table->field[column]->store(string, strlen(string), charset);3055 table->field[column]->store(string, strlen(string), charset);
3037}3056}
30383057
3039xtPublic int myxt_statistics_fill_table(XTThreadPtr self, void *th, void *ta, void *co, MX_CONST void *ch)3058xtPublic int myxt_statistics_fill_table(XTThreadPtr self, void *th, void *ta, void *, MX_CONST void *ch)
3040{3059{
3041 THD *thd = (THD *) th;3060 THD *thd = (THD *) th;
3042 TABLE_LIST *tables = (TABLE_LIST *) ta;3061 TABLE_LIST *tables = (TABLE_LIST *) ta;
30433062
=== modified file 'src/restart_xt.cc'
--- src/restart_xt.cc 2009-03-25 09:31:29 +0000
+++ src/restart_xt.cc 2009-03-25 01:43:40 +0000
@@ -1772,15 +1772,15 @@
1772 /* Read the checkpoint data: */1772 /* Read the checkpoint data: */
1773 if (use_buffer) {1773 if (use_buffer) {
1774 u_int no_of_logs;1774 u_int no_of_logs;
1775 xtLogID log_id;1775 xtLogID xt_log_id;
1776 xtTableID tab_id;1776 xtTableID xt_tab_id;
17771777
1778 xres_cp_number = XT_GET_DISK_6(use_buffer->xcp_chkpnt_no_6);1778 xres_cp_number = XT_GET_DISK_6(use_buffer->xcp_chkpnt_no_6);
1779 xres_cp_log_id = XT_GET_DISK_4(use_buffer->xcp_log_id_4);1779 xres_cp_log_id = XT_GET_DISK_4(use_buffer->xcp_log_id_4);
1780 xres_cp_log_offset = XT_GET_DISK_6(use_buffer->xcp_log_offs_6);1780 xres_cp_log_offset = XT_GET_DISK_6(use_buffer->xcp_log_offs_6);
1781 tab_id = XT_GET_DISK_4(use_buffer->xcp_tab_id_4);1781 xt_tab_id = XT_GET_DISK_4(use_buffer->xcp_tab_id_4);
1782 if (tab_id > db->db_curr_tab_id)1782 if (xt_tab_id > db->db_curr_tab_id)
1783 db->db_curr_tab_id = tab_id;1783 db->db_curr_tab_id = xt_tab_id;
1784 db->db_xn_curr_id = XT_GET_DISK_4(use_buffer->xcp_xact_id_4);1784 db->db_xn_curr_id = XT_GET_DISK_4(use_buffer->xcp_xact_id_4);
1785 ind_rec_log_id = XT_GET_DISK_4(use_buffer->xcp_ind_rec_log_id_4);1785 ind_rec_log_id = XT_GET_DISK_4(use_buffer->xcp_ind_rec_log_id_4);
1786 ind_rec_log_offset = XT_GET_DISK_6(use_buffer->xcp_ind_rec_log_offs_6);1786 ind_rec_log_offset = XT_GET_DISK_6(use_buffer->xcp_ind_rec_log_offs_6);
@@ -1808,16 +1808,16 @@
1808 * will be removed.1808 * will be removed.
1809 */1809 */
1810 for (u_int i=0; i<no_of_logs; i++) {1810 for (u_int i=0; i<no_of_logs; i++) {
1811 log_id = (xtLogID) XT_GET_DISK_2(use_buffer->xcp_del_log[i]);1811 xt_log_id = (xtLogID) XT_GET_DISK_2(use_buffer->xcp_del_log[i]);
1812#ifdef DEBUG_PRINT1812#ifdef DEBUG_PRINT
1813 if (i != 0)1813 if (i != 0)
1814 printf(", ");1814 printf(", ");
1815 printf("%d", (int) log_id);1815 printf("%d", (int) xt_log_id);
1816#endif1816#endif
1817#ifdef DEBUG_KEEP_LOGS1817#ifdef DEBUG_KEEP_LOGS
1818 xt_dl_set_to_delete(self, db, log_id);1818 xt_dl_set_to_delete(self, db, xt_log_id);
1819#else1819#else
1820 if (!xres_delete_data_log(db, log_id))1820 if (!xres_delete_data_log(db, xt_log_id))
1821 xt_throw(self);1821 xt_throw(self);
1822#endif1822#endif
1823 }1823 }
18241824
=== modified file 'src/systab_xt.cc'
--- src/systab_xt.cc 2008-12-22 14:29:21 +0000
+++ src/systab_xt.cc 2009-03-25 01:43:40 +0000
@@ -30,6 +30,10 @@
3030
31#include <stdlib.h>31#include <stdlib.h>
32#include <time.h>32#include <time.h>
33#ifdef DRIZZLED
34#include <drizzled/server_includes.h>
35#include <drizzled/current_session.h>
36#endif
3337
34#include "ha_pbxt.h"38#include "ha_pbxt.h"
35#include "systab_xt.h"39#include "systab_xt.h"
@@ -593,7 +597,8 @@
593 current_thd, "pbxt",597 current_thd, "pbxt",
594 strchr(xt_internal_tables[i].sts_path, '.') + 1,598 strchr(xt_internal_tables[i].sts_path, '.') + 1,
595 xt_internal_tables[i].sts_info,599 xt_internal_tables[i].sts_info,
596 xt_internal_tables[i].sts_keys))600 xt_internal_tables[i].sts_keys,
601 TRUE /*do not recreate*/))
597 xt_internal_tables[i].sts_exists = TRUE;602 xt_internal_tables[i].sts_exists = TRUE;
598 i++;603 i++;
599 }604 }
600605
=== modified file 'src/table_xt.cc'
--- src/table_xt.cc 2009-03-25 09:31:29 +0000
+++ src/table_xt.cc 2009-03-25 01:43:40 +0000
@@ -32,7 +32,10 @@
32#include <time.h>32#include <time.h>
3333
34#ifdef DRIZZLED34#ifdef DRIZZLED
35#include <drizzled/common_includes.h>35#include <drizzled/common.h>
36#include <mysys/thr_lock.h>
37#include <drizzled/dtcollation.h>
38#include <drizzled/handlerton.h>
36#else39#else
37#include "mysql_priv.h"40#include "mysql_priv.h"
38#endif41#endif
3942
=== modified file 'src/xaction_xt.cc'
--- src/xaction_xt.cc 2009-03-25 09:31:29 +0000
+++ src/xaction_xt.cc 2009-03-25 01:43:40 +0000
@@ -462,6 +462,7 @@
462 tn_thd_id = wait_xact_ptr->xd_thread_id;462 tn_thd_id = wait_xact_ptr->xd_thread_id;
463 }463 }
464 else {464 else {
465 tn_thd_id = 0;
465 if (!xn_get_xact_details(db, xw->xw_xn_id, thread, &flags, &start, NULL, &tn_thd_id))466 if (!xn_get_xact_details(db, xw->xw_xn_id, thread, &flags, &start, NULL, &tn_thd_id))
466 flags = XT_XN_XAC_ENDED | XT_XN_XAC_SWEEP;467 flags = XT_XN_XAC_ENDED | XT_XN_XAC_SWEEP;
467 }468 }
468469
=== modified file 'src/xt_config.h'
--- src/xt_config.h 2009-02-05 11:30:34 +0000
+++ src/xt_config.h 2009-03-25 01:43:40 +0000
@@ -33,6 +33,7 @@
3333
34#ifdef DRIZZLED34#ifdef DRIZZLED
35#include "drizzled/global.h"35#include "drizzled/global.h"
36const int max_connections = 500;
36#else37#else
37#include <mysql_version.h>38#include <mysql_version.h>
38#include "my_global.h"39#include "my_global.h"
3940
=== modified file 'src/xt_defs.h'
--- src/xt_defs.h 2009-03-25 09:31:29 +0000
+++ src/xt_defs.h 2009-03-25 01:43:40 +0000
@@ -739,6 +739,17 @@
739739
740#define mysql_real_data_home drizzle_real_data_home740#define mysql_real_data_home drizzle_real_data_home
741741
742#define mi_int4store(T,A) { uint32_t def_temp= (uint32_t) (A);\
743 ((unsigned char*) (T))[3]= (unsigned char) (def_temp);\
744 ((unsigned char*) (T))[2]= (unsigned char) (def_temp >> 8);\
745 ((unsigned char*) (T))[1]= (unsigned char) (def_temp >> 16);\
746 ((unsigned char*) (T))[0]= (unsigned char) (def_temp >> 24); }
747
748#define mi_uint4korr(A) ((uint32_t) (((uint32_t) (((const unsigned char*) (A))[3])) +\
749 (((uint32_t) (((const unsigned char*) (A))[2])) << 8) +\
750 (((uint32_t) (((const unsigned char*) (A))[1])) << 16) +\
751 (((uint32_t) (((const unsigned char*) (A))[0])) << 24)))
752
742#else // DRIZZLED753#else // DRIZZLED
743/* The MySQL case: */754/* The MySQL case: */
744#if MYSQL_VERSION_ID >= 60008755#if MYSQL_VERSION_ID >= 60008

Subscribers

People subscribed via source and target branches