summaryrefslogtreecommitdiff
path: root/sql/ha_myisam.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_myisam.cc')
-rw-r--r--sql/ha_myisam.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 67fddf34d5c..0680f13a7df 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -60,11 +60,14 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
DBUG_PRINT(msg_type,("message: %s",msgbuf));
+#ifndef EMBEDDED_LIBRARY
if (thd->net.vio == 0)
{
sql_print_error(msgbuf);
return;
}
+#endif
+
if (param->testflag & (T_CREATE_MISSING_KEYS | T_SAFE_REPAIR |
T_AUTO_REPAIR))
{
@@ -138,6 +141,7 @@ const char *ha_myisam::index_type(uint key_number)
int ha_myisam::net_read_dump(NET* net)
{
+#ifndef EMBEDDED_LIBRARY
int data_fd = file->dfile;
int error = 0;
@@ -160,14 +164,17 @@ int ha_myisam::net_read_dump(NET* net)
goto err;
}
}
-
err:
return error;
+#else
+ return (int)net;
+#endif
}
int ha_myisam::dump(THD* thd, int fd)
{
+#ifndef EMBEDDED_LIBRARY
MYISAM_SHARE* share = file->s;
NET* net = &thd->net;
uint blocksize = share->blocksize;
@@ -216,6 +223,9 @@ int ha_myisam::dump(THD* thd, int fd)
err:
my_free((gptr) buf, MYF(0));
return error;
+#else
+ return (int)thd - fd;
+#endif
}
/* Name is here without an extension */
@@ -1100,7 +1110,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
keydef[i].flag|=HA_AUTO_KEY;
found_auto_increment=1;
}
- if (field->type() == FIELD_TYPE_BLOB)
+ if ((field->type() == FIELD_TYPE_BLOB) || (field->type() == FIELD_TYPE_GEOMETRY))
{
keydef[i].seg[j].flag|=HA_BLOB_PART;
/* save number of bytes used to pack length */