diff options
author | unknown <tim@threads.polyesthetic.msg> | 2001-02-19 20:13:17 -0500 |
---|---|---|
committer | unknown <tim@threads.polyesthetic.msg> | 2001-02-19 20:13:17 -0500 |
commit | fc58b42fbfa0f0381efc68e5dd0f5e83f75500c1 (patch) | |
tree | 3e16ad05aae1c1841b1980db8b815b2f3f44ff94 /sql | |
parent | dc7eafea57a321c92716b5b84c574a0347ade74f (diff) | |
download | mariadb-git-fc58b42fbfa0f0381efc68e5dd0f5e83f75500c1.tar.gz |
Portability and bug fixes for Innobase.
Add --with-innobase-db to configure.
acconfig.h:
HAVE_INNOBASE_DB
acinclude.m4:
add MYSQL_CHECK_INNOBASE
configure.in:
use MYSQL_CHECK_INNOBASE and configure innobase directory
innobase/configure.in:
add AM_MAINTAINER_MODE
innobase/include/lock0types.h:
define lock_t
innobase/include/os0file.h:
define S_IRWX[UGO] if needed
innobase/include/os0sync.h:
use pthread_cond_t instead of mutex
innobase/include/sync0types.h:
define mutex_t
innobase/os/os0sync.c:
use pthread_cond_t instead of mutex
sql/Makefile.am:
add @innobase_{includes,libs}@
sql/ha_innobase.cc:
fix casts
Diffstat (limited to 'sql')
-rw-r--r-- | sql/Makefile.am | 8 | ||||
-rw-r--r-- | sql/ha_innobase.cc | 27 |
2 files changed, 21 insertions, 14 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am index a8fe9fc233f..7d4fd86878a 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -20,7 +20,9 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) -INCLUDES = @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include \ +INCLUDES = @MT_INCLUDES@ \ + @bdb_includes@ @innobase_includes@ \ + -I$(srcdir)/../include \ -I$(srcdir)/../regex \ -I$(srcdir) -I../include -I.. -I. WRAPLIBS= @WRAPLIBS@ @@ -37,7 +39,9 @@ LDADD = ../isam/libnisam.a \ ../dbug/libdbug.a \ ../regex/libregex.a \ ../strings/libmystrings.a -mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ @bdb_libs@ $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) +mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ + @bdb_libs@ @innobase_libs@ \ + $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ item_strfunc.h item_timefunc.h item_uniq.h \ item_create.h mysql_priv.h \ diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 4b33c7b87ae..65d12fd9729 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -1288,9 +1288,9 @@ calc_row_difference( uint n_fields; ulint o_len; ulint n_len; - mysql_byte* o_ptr; - mysql_byte* n_ptr; - mysql_byte* buf; + byte* o_ptr; + byte* n_ptr; + byte* buf; upd_field_t* ufield; ulint col_type; ulint is_unsigned; @@ -1300,7 +1300,7 @@ calc_row_difference( n_fields = table->fields; /* We use upd_buff to convert changed fields */ - buf = upd_buff; + buf = (byte*) upd_buff; for (i = 0; i < n_fields; i++) { field = table->field[i]; @@ -1312,8 +1312,8 @@ calc_row_difference( goto skip_field; } - o_ptr = old_row + get_field_offset(table, field); - n_ptr = new_row + get_field_offset(table, field); + o_ptr = (byte*) old_row + get_field_offset(table, field); + n_ptr = (byte*) new_row + get_field_offset(table, field); o_len = field->pack_length(); n_len = field->pack_length(); @@ -1353,8 +1353,10 @@ calc_row_difference( ufield = uvect->fields + n_changed; - buf = innobase_convert_and_store_changed_col(ufield, - buf, n_ptr, n_len, col_type, + buf = (byte*) + innobase_convert_and_store_changed_col(ufield, + (mysql_byte*)buf, + (mysql_byte*)n_ptr, n_len, col_type, is_unsigned); ufield->exp = NULL; ufield->field_no = @@ -1580,7 +1582,7 @@ ha_innobase::index_read( last_match_mode = match_mode; - ret = row_search_for_mysql(buf, mode, prebuilt, match_mode, 0); + ret = row_search_for_mysql((byte*) buf, mode, prebuilt, match_mode, 0); if (ret == DB_SUCCESS) { error = 0; @@ -1690,7 +1692,8 @@ ha_innobase::general_fetch( DBUG_ENTER("general_fetch"); - ret = row_search_for_mysql(buf, 0, prebuilt, match_mode, direction); + ret = row_search_for_mysql((byte*)buf, 0, prebuilt, + match_mode, direction); if (ret == DB_SUCCESS) { error = 0; @@ -2550,11 +2553,11 @@ ha_innobase::update_table_comment( char *str=my_malloc(length + 50,MYF(0)); if (!str) - return comment; + return (char*)comment; sprintf(str,"%s Innobase free: %lu kB", comment,innobase_get_free_space()); - return str; + return((char*) str); } |