Commit bd7120f9 authored by unknown's avatar unknown
Browse files

Fix the tree: plugin-related changes, necessary for

CSV storage engine to be statically compiled.
Derived from antony's patch.


config/ac-macros/storage.m4:
  don't add objects to the object list if
  we don't have them
configure.in:
  compile CSV statically
sql/ha_myisam.cc:
  fix prototype to get rid of THD
sql/ha_myisam.h:
  fix prototype to get rid of THD
sql/handler.cc:
  new function for plugins
sql/handler.h:
  fix prototype to get rid of THD
  declare functions used by plugins
sql/item.h:
  Don't include all the types and files when not building mysqld
sql/lock.cc:
  don's assume that handler knows about THD
sql/mysql_priv.h:
  Don't include all the types and files when not building mysqld
  declare new plugin functions
sql/sql_class.cc:
  New plugin functions
sql/sql_class.h:
  Don't include all the types and files when not building mysqld
sql/sql_lex.h:
  Don't include all the types and files when not building mysqld
storage/csv/Makefile.am:
  compile CSV into a static lib to be
  linked into mysqld
storage/csv/ha_tina.cc:
  fix ha_tina to be able to build it static
storage/csv/ha_tina.h:
  fix prototype to get rid of THD
parent 7dbb63fe
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -39,7 +39,10 @@ then
  AC_DEFINE([$5])
  mysql_se_decls="${mysql_se_decls},$6"
  mysql_se_htons="${mysql_se_htons},&$6"
  if test "$8" != "no"
  then
    mysql_se_objs="$mysql_se_objs $8"
  fi
  mysql_se_dirs="$mysql_se_dirs $7"
  mysql_se_libs="$mysql_se_libs $9"
else
+2 −2
Original line number Diff line number Diff line
@@ -2437,8 +2437,8 @@ MYSQL_STORAGE_ENGINE(archive,,,,,,storage/archive,,
 \$(top_builddir)/storage/archive/libarchive.a, [
  AC_CONFIG_FILES(storage/archive/Makefile)
])
MYSQL_STORAGE_ENGINE(csv,,,"yes",,tina_hton,storage/csv,
  ../storage/csv/ha_tina.o,,[
MYSQL_STORAGE_ENGINE(csv,,,"yes",,tina_hton,storage/csv,no,
  \$(top_builddir)/storage/csv/libcsv.a,[
  AC_CONFIG_FILES(storage/csv/Makefile)
])
MYSQL_STORAGE_ENGINE(blackhole)
+4 −1
Original line number Diff line number Diff line
@@ -296,7 +296,10 @@ int ha_myisam::dump(THD* thd, int fd)
#endif /* HAVE_REPLICATION */


bool ha_myisam::check_if_locking_is_allowed(THD *thd, TABLE *table, uint count)
bool ha_myisam::check_if_locking_is_allowed(uint sql_command,
                                            ulong type, TABLE *table,
                                            uint count,
                                            bool called_by_logger_thread)
{
  /*
    To be able to open and lock for reading system tables like 'mysql.proc',
+4 −1
Original line number Diff line number Diff line
@@ -60,7 +60,10 @@ class ha_myisam: public handler
  uint max_supported_key_part_length() const { return MI_MAX_KEY_LENGTH; }
  uint checksum() const;

  virtual bool check_if_locking_is_allowed(THD *thd, TABLE *table, uint count);
  virtual bool check_if_locking_is_allowed(uint sql_command,
                                           ulong type, TABLE *table,
                                           uint count,
                                           bool called_by_logger_thread);
  int open(const char *name, int mode, uint test_if_locked);
  int close(void);
  int write_row(byte * buf);
+6 −0
Original line number Diff line number Diff line
@@ -1425,6 +1425,12 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
** General handler functions
****************************************************************************/


void handler::ha_statistic_increment(ulong SSV::*offset) const
{
  statistic_increment(table->in_use->status_var.*offset, &LOCK_status);
}

/*
  Open database-handler.

Loading