summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_isam.cc2
-rw-r--r--sql/ha_isam.h15
-rw-r--r--sql/mini_client.cc15
3 files changed, 15 insertions, 17 deletions
diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc
index b83dabd86b1..55d24f5edb9 100644
--- a/sql/ha_isam.cc
+++ b/sql/ha_isam.cc
@@ -51,6 +51,8 @@ int ha_isam::open(const char *name, int mode, uint test_if_locked)
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
if (!(test_if_locked & HA_OPEN_WAIT_IF_LOCKED))
(void) nisam_extra(file,HA_EXTRA_WAIT_LOCK);
+ if (!table->db_record_offset)
+ int_table_flags|=HA_REC_NOT_IN_SEQ;
return (0);
}
diff --git a/sql/ha_isam.h b/sql/ha_isam.h
index 135424892f5..82a243ef5c0 100644
--- a/sql/ha_isam.h
+++ b/sql/ha_isam.h
@@ -26,20 +26,21 @@
class ha_isam: public handler
{
N_INFO *file;
+ /* We need this as table_flags() may change after open() */
+ ulong int_table_flags;
public:
- ha_isam(TABLE *table): handler(table), file(0)
+ ha_isam(TABLE *table)
+ :handler(table), file(0),
+ int_table_flags(HA_READ_RND_SAME | HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER |
+ HA_KEY_READ_WRONG_STR | HA_DUPP_POS |
+ HA_NOT_DELETE_WITH_CACHE)
{}
~ha_isam() {}
const char *table_type() const { return "ISAM"; }
const char *index_type(uint key_number) { return "BTREE"; }
const char **bas_ext() const;
- ulong table_flags() const
- {
- return (HA_READ_RND_SAME | HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER |
- HA_KEY_READ_WRONG_STR | HA_DUPP_POS | HA_NOT_DELETE_WITH_CACHE |
- ((table->db_record_offset) ? 0 : HA_REC_NOT_IN_SEQ));
- }
+ ulong table_flags() const { return int_table_flags; }
uint max_record_length() const { return HA_MAX_REC_LENGTH; }
uint max_keys() const { return N_MAXKEY; }
uint max_key_parts() const { return N_MAXKEY_SEG; }
diff --git a/sql/mini_client.cc b/sql/mini_client.cc
index 19e94054272..f8c930a2154 100644
--- a/sql/mini_client.cc
+++ b/sql/mini_client.cc
@@ -27,13 +27,12 @@
#define net_write_timeout net_write_timeout1
#endif
-#if defined(__WIN__)
-#include <winsock.h>
-#include <odbcinst.h> /* QQ: Is this really needed ? */
-#define DONT_USE_THR_ALARM
-#endif
-
#include <my_global.h>
+/* my_pthread must be included early to be able to fix things */
+#if defined(THREAD)
+#include <my_pthread.h> /* because of signal() */
+#endif
+#include <thr_alarm.h>
#include <mysql_embed.h>
#include <mysql_com.h>
#include <violite.h>
@@ -75,10 +74,6 @@ extern "C" { // Because of SCO 3.2V4.2
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif
-#if defined(THREAD)
-#include <my_pthread.h> /* because of signal() */
-#endif
-#include <thr_alarm.h>
#ifndef INADDR_NONE
#define INADDR_NONE -1
#endif