Commit 381fdf1a authored by unknown's avatar unknown

Merge gbichot3.local:/home/mysql_src/mysql-5.1-2

into  gbichot3.local:/home/mysql_src/mysql-maria; I'll fix manually.


BitKeeper/etc/ignore:
  auto-union
configure.in:
  Auto merged
include/Makefile.am:
  Auto merged
include/my_base.h:
  Auto merged
include/myisam.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/ha_myisammrg.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/myisam/ft_static.c:
  Auto merged
storage/myisam/ft_update.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test2.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/rt_index.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
include/my_handler.h:
  these ones I'll remove right away
mysys/my_handler.c:
  merge
sql/mysql_priv.h:
  merge
sql/set_var.cc:
  merge
storage/csv/ha_tina.cc:
  merge
storage/myisam/myisamdef.h:
  merge
parents b6897efb e6efa27c
...@@ -1394,6 +1394,19 @@ storage/innobase/ib_config.h ...@@ -1394,6 +1394,19 @@ storage/innobase/ib_config.h
storage/innobase/ib_config.h.in storage/innobase/ib_config.h.in
storage/innobase/mkinstalldirs storage/innobase/mkinstalldirs
storage/innobase/stamp-h1 storage/innobase/stamp-h1
storage/maria/*.MAD
storage/maria/*.MAI
storage/maria/ma_rt_test
storage/maria/ma_sp_test
storage/maria/ma_test1
storage/maria/ma_test2
storage/maria/ma_test3
storage/maria/ma_test_all
storage/maria/maria.log
storage/maria/maria_chk
storage/maria/maria_ftdump
storage/maria/maria_log
storage/maria/maria_pack
storage/myisam/FT1.MYD storage/myisam/FT1.MYD
storage/myisam/FT1.MYI storage/myisam/FT1.MYI
storage/myisam/ft_dump storage/myisam/ft_dump
......
...@@ -142,8 +142,6 @@ base_configs="$base_configs --with-extra-charsets=complex " ...@@ -142,8 +142,6 @@ base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client --with-readline " base_configs="$base_configs --enable-thread-safe-client --with-readline "
base_configs="$base_configs --with-big-tables" base_configs="$base_configs --with-big-tables"
static_link="--with-mysqld-ldflags=-all-static "
static_link="$static_link --with-client-ldflags=-all-static"
# we need local-infile in all binaries for rpl000001 # we need local-infile in all binaries for rpl000001
# if you need to disable local-infile in the client, write a build script # if you need to disable local-infile in the client, write a build script
# and unset local_infile_configs # and unset local_infile_configs
......
...@@ -5,7 +5,7 @@ FROM=$USER@mysql.com ...@@ -5,7 +5,7 @@ FROM=$USER@mysql.com
COMMITS=commits@lists.mysql.com COMMITS=commits@lists.mysql.com
DOCS=docs-commit@mysql.com DOCS=docs-commit@mysql.com
LIMIT=10000 LIMIT=10000
VERSION="5.1" VERSION="maria"
if [ "$REAL_EMAIL" = "" ] if [ "$REAL_EMAIL" = "" ]
then then
...@@ -66,51 +66,6 @@ EOF ...@@ -66,51 +66,6 @@ EOF
bk cset -r+ -d bk cset -r+ -d
) | $SENDMAIL -t ) | $SENDMAIL -t
#++
# commits@ mail
#--
echo "Notifying commits list at $COMMITS"
(
cat <<EOF
List-ID: <bk.mysql-$VERSION>
From: $FROM
To: $COMMITS
Subject: bk commit into $VERSION tree ($CHANGESET)$BS
X-CSetKey: <$CSETKEY>
$BH
Below is the list of changes that have just been committed into a local
$VERSION repository of $USER. When $USER does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
EOF
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT | $SENDMAIL -t
#++
# docs-commit@ mail
# Picks up anything under the Docs subdirectory (relevant for docs team).
#--
bk changes -v -r+ | grep -q " Docs/"
if [ $? -eq 0 ]
then
echo "Notifying docs list at $DOCS"
(
cat <<EOF
List-ID: <bk.mysql-$VERSION>
From: $FROM
To: $DOCS
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS
EOF
bk changes -v -r+
bk cset -r+ -d
) | $SENDMAIL -t
fi
else else
echo "commit failed because '$BK_STATUS', you may need to re-clone..." echo "commit failed because '$BK_STATUS', you may need to re-clone..."
fi fi
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_MARIA
dnl Sets HAVE_MARIA_DB if --with-maria-storage-engine is used
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_MARIA], [
AC_ARG_WITH([maria-storage-engine],
[
--with-maria-storage-engine
Enable the Maria Storage Engine],
[mariadb="$withval"],
[mariadb=no])
AC_MSG_CHECKING([for Maria storage engine])
case "$mariadb" in
yes )
AC_DEFINE([HAVE_MARIA_DB], [1], [Builds Maria Storage Engine])
AC_MSG_RESULT([yes])
[mariadb=yes]
;;
* )
AC_MSG_RESULT([no])
[mariadb=no]
;;
esac
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_MARIA SECTION
dnl ---------------------------------------------------------------------------
...@@ -2200,6 +2200,11 @@ MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER]) ...@@ -2200,6 +2200,11 @@ MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER])
MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support], MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support],
[MySQL Partitioning Support], [max,max-no-ndb]) [MySQL Partitioning Support], [max,max-no-ndb])
MYSQL_STORAGE_ENGINE(maria,maria, [Maria Storage Engine],
[Traditional transactional MySQL tables])
MYSQL_PLUGIN_DIRECTORY(maria, [storage/maria])
MYSQL_PLUGIN_STATIC(maria, [libmaria.a])
MYSQL_PLUGIN_MANDATORY(maria)
dnl -- ndbcluster requires partition to be enabled dnl -- ndbcluster requires partition to be enabled
MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition]) MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition])
...@@ -2435,7 +2440,6 @@ AC_SUBST(readline_basedir) ...@@ -2435,7 +2440,6 @@ AC_SUBST(readline_basedir)
AC_SUBST(readline_link) AC_SUBST(readline_link)
AC_SUBST(readline_h_ln_cmd) AC_SUBST(readline_h_ln_cmd)
# If we have threads generate some library functions and test programs # If we have threads generate some library functions and test programs
sql_server_dirs= sql_server_dirs=
sql_server= sql_server=
......
...@@ -24,7 +24,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \ ...@@ -24,7 +24,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
mysql_time.h mysql/plugin.h $(BUILT_SOURCES) mysql_time.h mysql/plugin.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-netware.h \ noinst_HEADERS = config-win.h config-netware.h \
heap.h my_bitmap.h my_uctype.h \ heap.h maria.h myisamchk.h my_bitmap.h my_uctype.h \
myisam.h myisampack.h myisammrg.h ft_global.h\ myisam.h myisampack.h myisammrg.h ft_global.h\
mysys_err.h my_base.h help_start.h help_end.h \ mysys_err.h my_base.h help_start.h help_end.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
......
...@@ -66,6 +66,17 @@ void ft_free_stopwords(void); ...@@ -66,6 +66,17 @@ void ft_free_stopwords(void);
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *); FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *);
my_bool ft_boolean_check_syntax_string(const byte *); my_bool ft_boolean_check_syntax_string(const byte *);
/* Internal symbols for fulltext between maria and MyISAM */
#define HA_FT_WTYPE HA_KEYTYPE_FLOAT
#define HA_FT_WLEN 4
#define FT_SEGS 2
#define ft_sintXkorr(A) mi_sint4korr(A)
#define ft_intXstore(T,A) mi_int4store(T,A)
extern const HA_KEYSEG ft_keysegs[FT_SEGS];
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -128,7 +128,8 @@ extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup); ...@@ -128,7 +128,8 @@ extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
/* Functions to handle multiple key caches */ /* Functions to handle multiple key caches */
extern my_bool multi_keycache_init(void); extern my_bool multi_keycache_init(void);
extern void multi_keycache_free(void); extern void multi_keycache_free(void);
extern KEY_CACHE *multi_key_cache_search(byte *key, uint length); extern KEY_CACHE *multi_key_cache_search(byte *key, uint length,
KEY_CACHE *def);
extern my_bool multi_key_cache_set(const byte *key, uint length, extern my_bool multi_key_cache_set(const byte *key, uint length,
KEY_CACHE *key_cache); KEY_CACHE *key_cache);
extern void multi_key_cache_change(KEY_CACHE *old_data, extern void multi_key_cache_change(KEY_CACHE *old_data,
......
This diff is collapsed.
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file includes constants used with all databases */ /* This file includes constants used with all databases */
/* Author: Michael Widenius */
#ifndef _my_base_h #ifndef _my_base_h
#define _my_base_h #define _my_base_h
...@@ -485,4 +484,7 @@ typedef ulong ha_rows; ...@@ -485,4 +484,7 @@ typedef ulong ha_rows;
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2) #define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
/* invalidator function reference for Query Cache */
typedef void (* invalidator_by_filename)(const char * filename);
#endif /* _my_base_h */ #endif /* _my_base_h */
...@@ -22,6 +22,28 @@ ...@@ -22,6 +22,28 @@
#include "m_ctype.h" #include "m_ctype.h"
#include "myisampack.h" #include "myisampack.h"
/*
There is a hard limit for the maximum number of keys as there are only
8 bits in the index file header for the number of keys in a table.
This means that 0..255 keys can exist for a table. The idea of
HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
a MyISAM table for which one has more keys than MyISAM is normally
compiled for. If you don't have this, you will get a core dump when
running myisamchk compiled for 128 keys on a table with 255 keys.
*/
#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
/*
The following defines can be increased if necessary.
But beware the dependency of HA_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
*/
#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
typedef struct st_HA_KEYSEG /* Key-portion */ typedef struct st_HA_KEYSEG /* Key-portion */
{ {
CHARSET_INFO *charset; CHARSET_INFO *charset;
...@@ -81,7 +103,7 @@ typedef struct st_HA_KEYSEG /* Key-portion */ ...@@ -81,7 +103,7 @@ typedef struct st_HA_KEYSEG /* Key-portion */
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \ #define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
set_rec_bits(0, bit_ptr, bit_ofs, bit_len) set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
extern int mi_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint , extern int ha_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
my_bool, my_bool); my_bool, my_bool);
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
register uchar *b, uint key_length, uint nextflag, register uchar *b, uint key_length, uint nextflag,
......
This diff is collapsed.
/* Copyright (C) 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Definitions needed for myisamchk/mariachk.c */
/*
Entries marked as "QQ to be removed" are NOT used to
pass check/repair options to xxx_check.c. They are used
internally by xxxchk.c or/and ha_xxxx.cc and should NOT
be stored together with other flags. They should be removed
from the following list to make addition of new flags possible.
*/
#ifndef _myisamchk_h
#define _myisamchk_h
#define T_AUTO_INC 1
#define T_AUTO_REPAIR 2 /* QQ to be removed */
#define T_BACKUP_DATA 4
#define T_CALC_CHECKSUM 8
#define T_CHECK 16 /* QQ to be removed */
#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */
#define T_CREATE_MISSING_KEYS 64
#define T_DESCRIPT 128
#define T_DONT_CHECK_CHECKSUM 256
#define T_EXTEND 512
#define T_FAST (1L << 10) /* QQ to be removed */
#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */
#define T_FORCE_UNIQUENESS (1L << 12)
#define T_INFO (1L << 13)
#define T_MEDIUM (1L << 14)
#define T_QUICK (1L << 15) /* QQ to be removed */
#define T_READONLY (1L << 16) /* QQ to be removed */
#define T_REP (1L << 17)
#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */
#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */
#define T_RETRY_WITHOUT_QUICK (1L << 20)
#define T_SAFE_REPAIR (1L << 21)
#define T_SILENT (1L << 22)
#define T_SORT_INDEX (1L << 23) /* QQ to be removed */
#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */
#define T_STATISTICS (1L << 25)
#define T_UNPACK (1L << 26)
#define T_UPDATE_STATE (1L << 27)
#define T_VERBOSE (1L << 28)
#define T_VERY_SILENT (1L << 29)
#define T_WAIT_FOREVER (1L << 30)
#define T_WRITE_LOOP ((ulong) 1L << 31)
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
/*
Flags used by xxxxchk.c or/and ha_xxxx.cc that are NOT passed
to xxxcheck.c follows:
*/
#define TT_USEFRM 1
#define TT_FOR_UPGRADE 2
#define O_NEW_INDEX 1 /* Bits set in out_flag */
#define O_NEW_DATA 2
#define O_DATA_LOST 4
typedef struct st_sort_key_blocks /* Used when sorting */
{
uchar *buff, *end_pos;
uchar lastkey[HA_MAX_POSSIBLE_KEY_BUFF];
uint last_length;
int inited;
} SORT_KEY_BLOCKS;
/*
MARIA/MYISAM supports several statistics collection
methods. Currently statistics collection method is not stored in
MARIA file and has to be specified for each table analyze/repair
operation in MI_CHECK::stats_method.
*/
typedef enum
{
/* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */
MI_STATS_METHOD_NULLS_NOT_EQUAL,
/* Treat NULLs as equal when collecting statistics (like 4.0 did) */
MI_STATS_METHOD_NULLS_EQUAL,
/* Ignore NULLs - count only tuples without NULLs in the index components */
MI_STATS_METHOD_IGNORE_NULLS
} enum_handler_stats_method;
typedef struct st_handler_check_param
{
char *isam_file_name;
MY_TMPDIR *tmpdir;
void *thd;
const char *db_name, *table_name, *op_name;
ulonglong auto_increment_value;
ulonglong max_data_file_length;
ulonglong keys_in_use;
ulonglong max_record_length;
/*
The next two are used to collect statistics, see update_key_parts for
description.
*/
ulonglong unique_count[HA_MAX_KEY_SEG + 1];
ulonglong notnull_count[HA_MAX_KEY_SEG + 1];
my_off_t search_after_block;
my_off_t new_file_pos, key_file_blocks;
my_off_t keydata, totaldata, key_blocks, start_check_pos;
ha_rows total_records, total_deleted;
ha_checksum record_checksum, glob_crc;
ha_checksum key_crc[HA_MAX_POSSIBLE_KEY];
ulong use_buffers, read_buffer_length, write_buffer_length;
ulong sort_buffer_length, sort_key_blocks;
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
uint out_flag, warning_printed, error_printed, verbose;
uint opt_sort_key, total_files, max_level;
uint testflag, key_cache_block_size;
int tmpfile_createflag;
myf myf_rw;
uint8 language;
my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
my_bool retry_repair, force_sort, calc_checksum;
char temp_filename[FN_REFLEN];
IO_CACHE read_cache;
enum_handler_stats_method stats_method;
} HA_CHECK;
typedef struct st_sort_ftbuf
{
uchar *buf, *end;
int count;
uchar lastkey[HA_MAX_KEY_BUFF];
} SORT_FT_BUF;
typedef struct st_buffpek {
my_off_t file_pos; /* Where we are in the sort file */
uchar *base,*key; /* Key pointers */
ha_rows count; /* Number of rows in table */
ulong mem_count; /* numbers of keys in memory */
ulong max_keys; /* Max keys in buffert */
} BUFFPEK;
#endif /* _myisamchk_h */
...@@ -46,7 +46,7 @@ noinst_HEADERS = embedded_priv.h emb_qcache.h ...@@ -46,7 +46,7 @@ noinst_HEADERS = embedded_priv.h emb_qcache.h
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
ha_heap.cc ha_myisam.cc ha_myisammrg.cc \ ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
ha_innodb.cc ha_berkeley.cc ha_federated.cc ha_ndbcluster.cc \ ha_innodb.cc ha_berkeley.cc ha_federated.cc ha_ndbcluster.cc \
ha_ndbcluster_binlog.cc ha_partition.cc \ ha_ndbcluster_binlog.cc ha_partition.cc ha_maria.cc\
handler.cc sql_handler.cc \ handler.cc sql_handler.cc \
hostname.cc init.cc password.c \ hostname.cc init.cc password.c \
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \ item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
......
-- require r/have_maria.require
disable_query_log;
show variables like "have_maria";
enable_query_log;
Variable_name Value
have_maria YES
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
###############################################
# #
# Prepared Statements test on MARIA tables #
# #
###############################################
#
# NOTE: PLEASE SEE ps_1general.test (bottom)
# BEFORE ADDING NEW TEST CASES HERE !!!
use test;
-- source include/have_maria.inc
let $type= 'MARIA' ;
-- source include/ps_create.inc
-- source include/ps_renew.inc
-- source include/ps_query.inc
# parameter in SELECT ... MATCH/AGAINST
# case derived from client_test.c: test_bug1500()
--disable_warnings
drop table if exists t2 ;
--enable_warnings
eval create table t2 (s varchar(25), fulltext(s))
ENGINE = $type ;
insert into t2 values ('Gravedigger'), ('Greed'),('Hollow Dogs') ;
commit ;
prepare stmt1 from ' select s from t2 where match (s) against (?) ' ;
set @arg00='Dogs' ;
execute stmt1 using @arg00 ;
prepare stmt1 from ' SELECT s FROM t2
where match (s) against (concat(?,''digger'')) ';
set @arg00='Grave' ;
execute stmt1 using @arg00 ;
drop table t2 ;
-- source include/ps_modify.inc
-- source include/ps_modify1.inc
-- source include/ps_conv.inc
drop table t1, t9;
# End of 4.1 tests
...@@ -148,7 +148,8 @@ static void safe_hash_free(SAFE_HASH *hash) ...@@ -148,7 +148,8 @@ static void safe_hash_free(SAFE_HASH *hash)
Return the value stored for a key or default value if no key Return the value stored for a key or default value if no key
*/ */
static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length) static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length,
byte *def)
{ {
byte *result; byte *result;
DBUG_ENTER("safe_hash_search"); DBUG_ENTER("safe_hash_search");
...@@ -156,7 +157,7 @@ static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length) ...@@ -156,7 +157,7 @@ static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length)
result= hash_search(&hash->hash, key, length); result= hash_search(&hash->hash, key, length);
rw_unlock(&hash->mutex); rw_unlock(&hash->mutex);
if (!result) if (!result)
result= hash->default_value; result= def;
else else
result= ((SAFE_HASH_ENTRY*) result)->data; result= ((SAFE_HASH_ENTRY*) result)->data;
DBUG_PRINT("exit",("data: 0x%lx", result)); DBUG_PRINT("exit",("data: 0x%lx", result));
...@@ -316,6 +317,7 @@ void multi_keycache_free(void) ...@@ -316,6 +317,7 @@ void multi_keycache_free(void)
multi_key_cache_search() multi_key_cache_search()
key key to find (usually table path) key key to find (usually table path)
uint length Length of key. uint length Length of key.
def Default value if no key cache
NOTES NOTES
This function is coded in such a way that we will return the This function is coded in such a way that we will return the
...@@ -326,11 +328,13 @@ void multi_keycache_free(void) ...@@ -326,11 +328,13 @@ void multi_keycache_free(void)
key cache to use key cache to use
*/ */
KEY_CACHE *multi_key_cache_search(byte *key, uint length) KEY_CACHE *multi_key_cache_search(byte *key, uint length,
KEY_CACHE *def)
{ {
if (!key_cache_hash.hash.records) if (!key_cache_hash.hash.records)
return dflt_key_cache; return def;
return (KEY_CACHE*) safe_hash_search(&key_cache_hash, key, length); return (KEY_CACHE*) safe_hash_search(&key_cache_hash, key, length,
(void*) def);
} }
......
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
MA 02111-1307, USA */ MA 02111-1307, USA */
#include <my_global.h> #include <my_global.h>
#include "my_handler.h" #include <m_ctype.h>
#include <my_base.h>
#include <my_handler.h>
int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, int ha_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
uchar *b, uint b_length, my_bool part_key, uchar *b, uint b_length, my_bool part_key,
my_bool skip_end_space) my_bool skip_end_space)
{ {
...@@ -174,7 +176,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, ...@@ -174,7 +176,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
next_key_length=key_length-b_length-pack_length; next_key_length=key_length-b_length-pack_length;
if (piks && if (piks &&
(flag=mi_compare_text(keyseg->charset,a,a_length,b,b_length, (flag=ha_compare_text(keyseg->charset,a,a_length,b,b_length,
(my_bool) ((nextflag & SEARCH_PREFIX) && (my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0), next_key_length <= 0),
(my_bool)!(nextflag & SEARCH_PREFIX)))) (my_bool)!(nextflag & SEARCH_PREFIX))))
...@@ -187,7 +189,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, ...@@ -187,7 +189,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
{ {
uint length=(uint) (end-a), a_length=length, b_length=length; uint length=(uint) (end-a), a_length=length, b_length=length;
if (piks && if (piks &&
(flag= mi_compare_text(keyseg->charset, a, a_length, b, b_length, (flag= ha_compare_text(keyseg->charset, a, a_length, b, b_length,
(my_bool) ((nextflag & SEARCH_PREFIX) && (my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0), next_key_length <= 0),
(my_bool)!(nextflag & SEARCH_PREFIX)))) (my_bool)!(nextflag & SEARCH_PREFIX))))
...@@ -235,7 +237,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, ...@@ -235,7 +237,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
next_key_length=key_length-b_length-pack_length; next_key_length=key_length-b_length-pack_length;
if (piks && if (piks &&
(flag= mi_compare_text(keyseg->charset,a,a_length,b,b_length, (flag= ha_compare_text(keyseg->charset,a,a_length,b,b_length,
(my_bool) ((nextflag & SEARCH_PREFIX) && (my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0), next_key_length <= 0),
(my_bool) ((nextflag & (SEARCH_FIND | (my_bool) ((nextflag & (SEARCH_FIND |
...@@ -482,12 +484,15 @@ end: ...@@ -482,12 +484,15 @@ end:
DESCRIPTION DESCRIPTION
Find the first NULL value in index-suffix values tuple. Find the first NULL value in index-suffix values tuple.
TODO Consider optimizing this fuction or its use so we don't search for
TODO
Consider optimizing this function or its use so we don't search for
NULL values in completely NOT NULL index suffixes. NULL values in completely NOT NULL index suffixes.
RETURN RETURN
First key part that has NULL as value in values tuple, or the last key part First key part that has NULL as value in values tuple, or the last key
(with keyseg->type==HA_TYPE_END) if values tuple doesn't contain NULLs. part (with keyseg->type==HA_TYPE_END) if values tuple doesn't contain
NULLs.
*/ */
HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
...@@ -519,6 +524,7 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) ...@@ -519,6 +524,7 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
case HA_KEYTYPE_VARTEXT1: case HA_KEYTYPE_VARTEXT1:
case HA_KEYTYPE_VARTEXT2: case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY1: case HA_KEYTYPE_VARBINARY1:
case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY2: case HA_KEYTYPE_VARBINARY2:
{ {
int a_length; int a_length;
......
...@@ -52,7 +52,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ ...@@ -52,7 +52,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \ ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
ha_innodb.h ha_berkeley.h ha_federated.h \ ha_innodb.h ha_berkeley.h ha_federated.h \
ha_ndbcluster.h ha_ndbcluster_binlog.h \ ha_ndbcluster.h ha_ndbcluster_binlog.h \
ha_ndbcluster_tables.h \ ha_ndbcluster_tables.h ha_maria.h\
opt_range.h protocol.h rpl_tblmap.h \ opt_range.h protocol.h rpl_tblmap.h \
log.h sql_show.h rpl_rli.h \ log.h sql_show.h rpl_rli.h \
sql_select.h structs.h table.h sql_udf.h hash_filo.h \ sql_select.h structs.h table.h sql_udf.h hash_filo.h \
...@@ -89,7 +89,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ ...@@ -89,7 +89,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
records.cc filesort.cc handler.cc \ records.cc filesort.cc handler.cc \
ha_heap.cc ha_myisam.cc ha_myisammrg.cc \ ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
ha_partition.cc ha_innodb.cc ha_berkeley.cc \ ha_partition.cc ha_innodb.cc ha_berkeley.cc \
ha_federated.cc \ ha_federated.cc ha_maria.cc\
ha_ndbcluster.cc ha_ndbcluster_binlog.cc \ ha_ndbcluster.cc ha_ndbcluster_binlog.cc \
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \ sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \ sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
......
This diff is collapsed.
/* Copyright (C) 2006,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif
/* class for the the maria handler */
#include <maria.h>
#define HA_RECOVER_NONE 0 /* No automatic recover */
#define HA_RECOVER_DEFAULT 1 /* Automatic recover active */
#define HA_RECOVER_BACKUP 2 /* Make a backupfile on recover */
#define HA_RECOVER_FORCE 4 /* Recover even if we loose rows */
#define HA_RECOVER_QUICK 8 /* Don't check rows in data file */
extern ulong maria_sort_buffer_size;
extern TYPELIB maria_recover_typelib;
extern ulong maria_recover_options;
class ha_maria :public handler
{
MARIA_HA *file;
ulong int_table_flags;
char *data_file_name, *index_file_name;
bool can_enable_indexes;
int repair(THD * thd, HA_CHECK &param, bool optimize);
public:
ha_maria(TABLE_SHARE * table_arg);
~ha_maria()
{}
const char *table_type() const
{ return "MARIA"; }
const char *index_type(uint key_number);
const char **bas_ext() const;
ulong table_flags() const
{ return int_table_flags; }
ulong index_flags(uint inx, uint part, bool all_parts) const
{
return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT) ?
0 : HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
HA_READ_ORDER | HA_KEYREAD_ONLY);
}
uint max_supported_keys() const
{ return MARIA_MAX_KEY; }
uint max_supported_key_length() const
{ return HA_MAX_KEY_LENGTH; }
uint max_supported_key_part_length() const
{ return HA_MAX_KEY_LENGTH; }
uint checksum() const;
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);
int update_row(const byte * old_data, byte * new_data);
int delete_row(const byte * buf);
int index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_idx(byte * buf, uint idx, const byte * key,
uint key_len, enum ha_rkey_function find_flag);
int index_read_last(byte * buf, const byte * key, uint key_len);
int index_next(byte * buf);
int index_prev(byte * buf);
int index_first(byte * buf);
int index_last(byte * buf);
int index_next_same(byte * buf, const byte * key, uint keylen);
int ft_init()
{
if (!ft_handler)
return 1;
ft_handler->please->reinit_search(ft_handler);
return 0;
}
FT_INFO *ft_init_ext(uint flags, uint inx, String * key)
{
return maria_ft_init_search(flags, file, inx,
(byte *) key->ptr(), key->length(),
key->charset(), table->record[0]);
}
int ft_read(byte * buf);
int rnd_init(bool scan);
int rnd_next(byte * buf);
int rnd_pos(byte * buf, byte * pos);
int restart_rnd_next(byte * buf, byte * pos);
void position(const byte * record);
void info(uint);
int extra(enum ha_extra_function operation);
int extra_opt(enum ha_extra_function operation, ulong cache_size);
int external_lock(THD * thd, int lock_type);
int delete_all_rows(void);
int disable_indexes(uint mode);
int enable_indexes(uint mode);
int indexes_are_disabled(void);
void start_bulk_insert(ha_rows rows);
int end_bulk_insert();
ha_rows records_in_range(uint inx, key_range * min_key, key_range * max_key);
void update_create_info(HA_CREATE_INFO * create_info);
int create(const char *name, TABLE * form, HA_CREATE_INFO * create_info);
THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to,
enum thr_lock_type lock_type);
ulonglong get_auto_increment();
int rename_table(const char *from, const char *to);
int delete_table(const char *name);
int check(THD * thd, HA_CHECK_OPT * check_opt);
int analyze(THD * thd, HA_CHECK_OPT * check_opt);
int repair(THD * thd, HA_CHECK_OPT * check_opt);
bool check_and_repair(THD * thd);
bool is_crashed() const;
bool auto_repair() const
{ return maria_recover_options != 0; }
int optimize(THD * thd, HA_CHECK_OPT * check_opt);
int restore(THD * thd, HA_CHECK_OPT * check_opt);
int backup(THD * thd, HA_CHECK_OPT * check_opt);
int assign_to_keycache(THD * thd, HA_CHECK_OPT * check_opt);
int preload_keys(THD * thd, HA_CHECK_OPT * check_opt);
bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes);
#ifdef HAVE_REPLICATION
int dump(THD * thd, int fd);
int net_read_dump(NET * net);
#endif
};
...@@ -59,7 +59,7 @@ static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root) ...@@ -59,7 +59,7 @@ static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
// collect errors printed by mi_check routines // collect errors printed by mi_check routines
static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, static void mi_check_print_msg(HA_CHECK *param, const char* msg_type,
const char *fmt, va_list args) const char *fmt, va_list args)
{ {
THD* thd = (THD*)param->thd; THD* thd = (THD*)param->thd;
...@@ -100,13 +100,13 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, ...@@ -100,13 +100,13 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
extern "C" { extern "C" {
volatile int *killed_ptr(MI_CHECK *param) volatile int *killed_ptr(HA_CHECK *param)
{ {
/* In theory Unsafe conversion, but should be ok for now */ /* In theory Unsafe conversion, but should be ok for now */
return (int*) &(((THD *)(param->thd))->killed); return (int*) &(((THD *)(param->thd))->killed);
} }
void mi_check_print_error(MI_CHECK *param, const char *fmt,...) void mi_check_print_error(HA_CHECK *param, const char *fmt,...)
{ {
param->error_printed|=1; param->error_printed|=1;
param->out_flag|= O_DATA_LOST; param->out_flag|= O_DATA_LOST;
...@@ -116,7 +116,7 @@ void mi_check_print_error(MI_CHECK *param, const char *fmt,...) ...@@ -116,7 +116,7 @@ void mi_check_print_error(MI_CHECK *param, const char *fmt,...)
va_end(args); va_end(args);
} }
void mi_check_print_info(MI_CHECK *param, const char *fmt,...) void mi_check_print_info(HA_CHECK *param, const char *fmt,...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
...@@ -124,7 +124,7 @@ void mi_check_print_info(MI_CHECK *param, const char *fmt,...) ...@@ -124,7 +124,7 @@ void mi_check_print_info(MI_CHECK *param, const char *fmt,...)
va_end(args); va_end(args);
} }
void mi_check_print_warning(MI_CHECK *param, const char *fmt,...) void mi_check_print_warning(HA_CHECK *param, const char *fmt,...)
{ {
param->warning_printed=1; param->warning_printed=1;
param->out_flag|= O_DATA_LOST; param->out_flag|= O_DATA_LOST;
...@@ -338,7 +338,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -338,7 +338,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
{ {
if (!file) return HA_ADMIN_INTERNAL_ERROR; if (!file) return HA_ADMIN_INTERNAL_ERROR;
int error; int error;
MI_CHECK param; HA_CHECK param;
MYISAM_SHARE* share = file->s; MYISAM_SHARE* share = file->s;
const char *old_proc_info=thd->proc_info; const char *old_proc_info=thd->proc_info;
...@@ -349,7 +349,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -349,7 +349,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
param.db_name= table->s->db.str; param.db_name= table->s->db.str;
param.table_name= table->alias; param.table_name= table->alias;
param.testflag = check_opt->flags | T_CHECK | T_SILENT; param.testflag = check_opt->flags | T_CHECK | T_SILENT;
param.stats_method= (enum_mi_stats_method)thd->variables.myisam_stats_method; param.stats_method= (enum_handler_stats_method)thd->variables.myisam_stats_method;
if (!(table->db_stat & HA_READ_ONLY)) if (!(table->db_stat & HA_READ_ONLY))
param.testflag|= T_STATISTICS; param.testflag|= T_STATISTICS;
...@@ -430,7 +430,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -430,7 +430,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt)
{ {
int error=0; int error=0;
MI_CHECK param; HA_CHECK param;
MYISAM_SHARE* share = file->s; MYISAM_SHARE* share = file->s;
myisamchk_init(&param); myisamchk_init(&param);
...@@ -441,7 +441,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) ...@@ -441,7 +441,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt)
param.testflag= (T_FAST | T_CHECK | T_SILENT | T_STATISTICS | param.testflag= (T_FAST | T_CHECK | T_SILENT | T_STATISTICS |
T_DONT_CHECK_CHECKSUM); T_DONT_CHECK_CHECKSUM);
param.using_global_keycache = 1; param.using_global_keycache = 1;
param.stats_method= (enum_mi_stats_method)thd->variables.myisam_stats_method; param.stats_method= (enum_handler_stats_method)thd->variables.myisam_stats_method;
if (!(share->state.changed & STATE_NOT_ANALYZED)) if (!(share->state.changed & STATE_NOT_ANALYZED))
return HA_ADMIN_ALREADY_DONE; return HA_ADMIN_ALREADY_DONE;
...@@ -487,7 +487,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -487,7 +487,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
err: err:
{ {
MI_CHECK param; HA_CHECK param;
myisamchk_init(&param); myisamchk_init(&param);
param.thd= thd; param.thd= thd;
param.op_name= "restore"; param.op_name= "restore";
...@@ -547,7 +547,7 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -547,7 +547,7 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
err: err:
{ {
MI_CHECK param; HA_CHECK param;
myisamchk_init(&param); myisamchk_init(&param);
param.thd= thd; param.thd= thd;
param.op_name= "backup"; param.op_name= "backup";
...@@ -563,7 +563,7 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -563,7 +563,7 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
{ {
int error; int error;
MI_CHECK param; HA_CHECK param;
ha_rows start_records; ha_rows start_records;
if (!file) return HA_ADMIN_INTERNAL_ERROR; if (!file) return HA_ADMIN_INTERNAL_ERROR;
...@@ -613,7 +613,7 @@ int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -613,7 +613,7 @@ int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt)
{ {
int error; int error;
if (!file) return HA_ADMIN_INTERNAL_ERROR; if (!file) return HA_ADMIN_INTERNAL_ERROR;
MI_CHECK param; HA_CHECK param;
myisamchk_init(&param); myisamchk_init(&param);
param.thd = thd; param.thd = thd;
...@@ -632,7 +632,7 @@ int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -632,7 +632,7 @@ int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt)
} }
int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize) int ha_myisam::repair(THD *thd, HA_CHECK &param, bool optimize)
{ {
int error=0; int error=0;
uint local_testflag=param.testflag; uint local_testflag=param.testflag;
...@@ -810,7 +810,7 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -810,7 +810,7 @@ int ha_myisam::assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt)
if (error != HA_ADMIN_OK) if (error != HA_ADMIN_OK)
{ {
/* Send error to user */ /* Send error to user */
MI_CHECK param; HA_CHECK param;
myisamchk_init(&param); myisamchk_init(&param);
param.thd= thd; param.thd= thd;
param.op_name= "assign_to_keycache"; param.op_name= "assign_to_keycache";
...@@ -878,7 +878,7 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt) ...@@ -878,7 +878,7 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt)
err: err:
{ {
MI_CHECK param; HA_CHECK param;
myisamchk_init(&param); myisamchk_init(&param);
param.thd= thd; param.thd= thd;
param.op_name= "preload_keys"; param.op_name= "preload_keys";
...@@ -985,7 +985,7 @@ int ha_myisam::enable_indexes(uint mode) ...@@ -985,7 +985,7 @@ int ha_myisam::enable_indexes(uint mode)
else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
{ {
THD *thd=current_thd; THD *thd=current_thd;
MI_CHECK param; HA_CHECK param;
const char *save_proc_info=thd->proc_info; const char *save_proc_info=thd->proc_info;
thd->proc_info="Creating index"; thd->proc_info="Creating index";
myisamchk_init(&param); myisamchk_init(&param);
...@@ -994,7 +994,7 @@ int ha_myisam::enable_indexes(uint mode) ...@@ -994,7 +994,7 @@ int ha_myisam::enable_indexes(uint mode)
T_CREATE_MISSING_KEYS); T_CREATE_MISSING_KEYS);
param.myf_rw&= ~MY_WAIT_IF_FULL; param.myf_rw&= ~MY_WAIT_IF_FULL;
param.sort_buffer_length= thd->variables.myisam_sort_buff_size; param.sort_buffer_length= thd->variables.myisam_sort_buff_size;
param.stats_method= (enum_mi_stats_method)thd->variables.myisam_stats_method; param.stats_method= (enum_handler_stats_method)thd->variables.myisam_stats_method;
param.tmpdir=&mysql_tmpdir_list; param.tmpdir=&mysql_tmpdir_list;
if ((error= (repair(thd,param,0) != HA_ADMIN_OK)) && param.retry_repair) if ((error= (repair(thd,param,0) != HA_ADMIN_OK)) && param.retry_repair)
{ {
...@@ -1650,7 +1650,7 @@ void ha_myisam::get_auto_increment(ulonglong offset, ulonglong increment, ...@@ -1650,7 +1650,7 @@ void ha_myisam::get_auto_increment(ulonglong offset, ulonglong increment,
{ {
ulonglong nr; ulonglong nr;
int error; int error;
byte key[MI_MAX_KEY_LENGTH]; byte key[HA_MAX_KEY_LENGTH];
if (!table->s->next_number_key_offset) if (!table->s->next_number_key_offset)
{ // Autoincrement at key-start { // Autoincrement at key-start
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
/* class for the the myisam handler */ /* class for the the myisam handler */
#include <myisam.h> #include <myisam.h>
#include <myisamchk.h>
#include <ft_global.h> #include <ft_global.h>
#define HA_RECOVER_NONE 0 /* No automatic recover */ #define HA_RECOVER_NONE 0 /* No automatic recover */
...@@ -40,7 +41,7 @@ class ha_myisam: public handler ...@@ -40,7 +41,7 @@ class ha_myisam: public handler
ulong int_table_flags; ulong int_table_flags;
char *data_file_name, *index_file_name; char *data_file_name, *index_file_name;
bool can_enable_indexes; bool can_enable_indexes;
int repair(THD *thd, MI_CHECK &param, bool optimize); int repair(THD *thd, HA_CHECK &param, bool optimize);
public: public:
ha_myisam(TABLE_SHARE *table_arg); ha_myisam(TABLE_SHARE *table_arg);
...@@ -56,8 +57,8 @@ class ha_myisam: public handler ...@@ -56,8 +57,8 @@ class ha_myisam: public handler
HA_READ_ORDER | HA_KEYREAD_ONLY); HA_READ_ORDER | HA_KEYREAD_ONLY);
} }
uint max_supported_keys() const { return MI_MAX_KEY; } uint max_supported_keys() const { return MI_MAX_KEY; }
uint max_supported_key_length() const { return MI_MAX_KEY_LENGTH; } uint max_supported_key_length() const { return HA_MAX_KEY_LENGTH; }
uint max_supported_key_part_length() const { return MI_MAX_KEY_LENGTH; } uint max_supported_key_part_length() const { return HA_MAX_KEY_LENGTH; }
uint checksum() const; uint checksum() const;
virtual bool check_if_locking_is_allowed(uint sql_command, virtual bool check_if_locking_is_allowed(uint sql_command,
......
...@@ -47,8 +47,8 @@ class ha_myisammrg: public handler ...@@ -47,8 +47,8 @@ class ha_myisammrg: public handler
HA_READ_ORDER | HA_KEYREAD_ONLY); HA_READ_ORDER | HA_KEYREAD_ONLY);
} }
uint max_supported_keys() const { return MI_MAX_KEY; } uint max_supported_keys() const { return MI_MAX_KEY; }
uint max_supported_key_length() const { return MI_MAX_KEY_LENGTH; } uint max_supported_key_length() const { return HA_MAX_KEY_LENGTH; }
uint max_supported_key_part_length() const { return MI_MAX_KEY_LENGTH; } uint max_supported_key_part_length() const { return HA_MAX_KEY_LENGTH; }
double scan_time() double scan_time()
{ return ulonglong2double(stats.data_file_length) / IO_SIZE + file->tables; } { return ulonglong2double(stats.data_file_length) / IO_SIZE + file->tables; }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#pragma interface /* gcc class implementation */ #pragma interface /* gcc class implementation */
#endif #endif
#include <my_handler.h>
#include <ft_global.h> #include <ft_global.h>
#include <keycache.h> #include <keycache.h>
...@@ -255,6 +256,7 @@ enum legacy_db_type ...@@ -255,6 +256,7 @@ enum legacy_db_type
DB_TYPE_BLACKHOLE_DB, DB_TYPE_BLACKHOLE_DB,
DB_TYPE_PARTITION_DB, DB_TYPE_PARTITION_DB,
DB_TYPE_BINLOG, DB_TYPE_BINLOG,
DB_TYPE_MARIA,
DB_TYPE_FIRST_DYNAMIC=32, DB_TYPE_FIRST_DYNAMIC=32,
DB_TYPE_DEFAULT=127 // Must be last DB_TYPE_DEFAULT=127 // Must be last
}; };
......
...@@ -1321,7 +1321,6 @@ public: ...@@ -1321,7 +1321,6 @@ public:
/* for fulltext search */ /* for fulltext search */
#include <ft_global.h>
class Item_func_match :public Item_real_func class Item_func_match :public Item_real_func
{ {
......
...@@ -1673,6 +1673,13 @@ extern handlerton myisammrg_hton; ...@@ -1673,6 +1673,13 @@ extern handlerton myisammrg_hton;
/* MRG_MYISAM handler is always built, but may be skipped */ /* MRG_MYISAM handler is always built, but may be skipped */
#define have_merge_db myisammrg_hton.state #define have_merge_db myisammrg_hton.state
#ifdef WITH_MARIA_STORAGE_ENGINE
extern handlerton maria_hton;
#define have_maria maria_hton.state
#else
extern SHOW_COMP_OPTION have_maria;
#endif
extern handlerton myisam_hton; extern handlerton myisam_hton;
extern handlerton myisammrg_hton; extern handlerton myisammrg_hton;
extern handlerton heap_hton; extern handlerton heap_hton;
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#include "events.h" #include "events.h"
#include "ha_myisam.h" #include "ha_myisam.h"
#ifdef WITH_MARIA_STORAGE_ENGINE
#include "ha_maria.h"
#endif
#ifdef HAVE_ROW_BASED_REPLICATION #ifdef HAVE_ROW_BASED_REPLICATION
#include "rpl_injector.h" #include "rpl_injector.h"
...@@ -543,6 +546,7 @@ char *mysqld_unix_port, *opt_mysql_tmpdir; ...@@ -543,6 +546,7 @@ char *mysqld_unix_port, *opt_mysql_tmpdir;
const char **errmesg; /* Error messages */ const char **errmesg; /* Error messages */
const char *myisam_recover_options_str="OFF"; const char *myisam_recover_options_str="OFF";
const char *myisam_stats_method_str="nulls_unequal"; const char *myisam_stats_method_str="nulls_unequal";
const char *maria_stats_method_str="nulls_unequal";
/* name of reference on left espression in rewritten IN subquery */ /* name of reference on left espression in rewritten IN subquery */
const char *in_left_expr_name= "<left expr>"; const char *in_left_expr_name= "<left expr>";
/* name of additional condition */ /* name of additional condition */
...@@ -4750,10 +4754,17 @@ enum options_mysqld ...@@ -4750,10 +4754,17 @@ enum options_mysqld
OPT_MAX_LENGTH_FOR_SORT_DATA, OPT_MAX_LENGTH_FOR_SORT_DATA,
OPT_MAX_WRITE_LOCK_COUNT, OPT_BULK_INSERT_BUFFER_SIZE, OPT_MAX_WRITE_LOCK_COUNT, OPT_BULK_INSERT_BUFFER_SIZE,
OPT_MAX_ERROR_COUNT, OPT_MULTI_RANGE_COUNT, OPT_MYISAM_DATA_POINTER_SIZE, OPT_MAX_ERROR_COUNT, OPT_MULTI_RANGE_COUNT, OPT_MYISAM_DATA_POINTER_SIZE,
OPT_MYISAM_BLOCK_SIZE, OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE, OPT_MYISAM_BLOCK_SIZE, OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
OPT_MYISAM_MAX_SORT_FILE_SIZE, OPT_MYISAM_SORT_BUFFER_SIZE, OPT_MYISAM_MAX_SORT_FILE_SIZE, OPT_MYISAM_SORT_BUFFER_SIZE,
OPT_MYISAM_USE_MMAP, OPT_MYISAM_USE_MMAP, OPT_MYISAM_REPAIR_THREADS,
OPT_MYISAM_STATS_METHOD, OPT_MYISAM_STATS_METHOD,
OPT_MARIA_BLOCK_SIZE,
OPT_MARIA_MAX_SORT_FILE_SIZE, OPT_MARIA_SORT_BUFFER_SIZE,
OPT_MARIA_USE_MMAP, OPT_MARIA_REPAIR_THREADS,
OPT_MARIA_STATS_METHOD,
OPT_NET_BUFFER_LENGTH, OPT_NET_RETRY_COUNT, OPT_NET_BUFFER_LENGTH, OPT_NET_RETRY_COUNT,
OPT_NET_READ_TIMEOUT, OPT_NET_WRITE_TIMEOUT, OPT_NET_READ_TIMEOUT, OPT_NET_WRITE_TIMEOUT,
OPT_OPEN_FILES_LIMIT, OPT_OPEN_FILES_LIMIT,
...@@ -4767,7 +4778,7 @@ enum options_mysqld ...@@ -4767,7 +4778,7 @@ enum options_mysqld
OPT_SORT_BUFFER, OPT_TABLE_OPEN_CACHE, OPT_TABLE_DEF_CACHE, OPT_SORT_BUFFER, OPT_TABLE_OPEN_CACHE, OPT_TABLE_DEF_CACHE,
OPT_THREAD_CONCURRENCY, OPT_THREAD_CACHE_SIZE, OPT_THREAD_CONCURRENCY, OPT_THREAD_CACHE_SIZE,
OPT_TMP_TABLE_SIZE, OPT_THREAD_STACK, OPT_TMP_TABLE_SIZE, OPT_THREAD_STACK,
OPT_WAIT_TIMEOUT, OPT_MYISAM_REPAIR_THREADS, OPT_WAIT_TIMEOUT,
OPT_INNODB_MIRRORED_LOG_GROUPS, OPT_INNODB_MIRRORED_LOG_GROUPS,
OPT_INNODB_LOG_FILES_IN_GROUP, OPT_INNODB_LOG_FILES_IN_GROUP,
OPT_INNODB_LOG_FILE_SIZE, OPT_INNODB_LOG_FILE_SIZE,
...@@ -5967,6 +5978,50 @@ log and this option does nothing anymore.", ...@@ -5967,6 +5978,50 @@ log and this option does nothing anymore.",
0 0
#endif #endif
, 0, 2, 0, 1, 0}, , 0, 2, 0, 1, 0},
#ifdef WITH_MARIA_STORAGE_ENGINE
{"maria_block_size", OPT_MARIA_BLOCK_SIZE,
"Block size to be used for MARIA index pages.",
(gptr*) &maria_block_size,
(gptr*) &maria_block_size, 0, GET_ULONG, REQUIRED_ARG,
MARIA_KEY_BLOCK_LENGTH, MARIA_MIN_KEY_BLOCK_LENGTH,
MARIA_MAX_KEY_BLOCK_LENGTH,
0, MARIA_MIN_KEY_BLOCK_LENGTH, 0},
{"maria_key_buffer_size", OPT_KEY_BUFFER_SIZE,
"The size of the buffer used for index blocks for Maria tables. Increase "
"this to get better index handling (for all reads and multiple writes) to "
"as much as you can afford; 64M on a 256M machine that mainly runs MySQL "
"is quite common.",
(gptr*) &maria_key_cache_var.param_buff_size, (gptr*) 0,
0, (GET_ULL | GET_ASK_ADDR),
REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, MALLOC_OVERHEAD,
IO_SIZE, 0},
{"maria_max_sort_file_size", OPT_MARIA_MAX_SORT_FILE_SIZE,
"Don't use the fast sort index method to created index if the temporary "
"file would get bigger than this.",
(gptr*) &global_system_variables.maria_max_sort_file_size,
(gptr*) &max_system_variables.maria_max_sort_file_size, 0,
GET_ULL, REQUIRED_ARG, (longlong) LONG_MAX, 0, (ulonglong) MAX_FILE_SIZE,
0, 1024*1024, 0},
{"maria_repair_threads", OPT_MARIA_REPAIR_THREADS,
"Number of threads to use when repairing maria tables. The value of 1 "
"disables parallel repair.",
(gptr*) &global_system_variables.maria_repair_threads,
(gptr*) &max_system_variables.maria_repair_threads, 0,
GET_ULONG, REQUIRED_ARG, 1, 1, ~0L, 0, 1, 0},
{"maria_sort_buffer_size", OPT_MARIA_SORT_BUFFER_SIZE,
"The buffer that is allocated when sorting the index when doing a REPAIR "
"or when creating indexes with CREATE INDEX or ALTER TABLE.",
(gptr*) &global_system_variables.maria_sort_buff_size,
(gptr*) &max_system_variables.maria_sort_buff_size, 0,
GET_ULONG, REQUIRED_ARG, 8192*1024, 4, ~0L, 0, 1, 0},
{"maria_stats_method", OPT_MARIA_STATS_METHOD,
"Specifies how maria index statistics collection code should threat NULLs. "
"Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
"\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
(gptr*) &maria_stats_method_str, (gptr*) &maria_stats_method_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
"Max packetlength to send/receive from to server.", "Max packetlength to send/receive from to server.",
(gptr*) &global_system_variables.max_allowed_packet, (gptr*) &global_system_variables.max_allowed_packet,
...@@ -6067,12 +6122,6 @@ The minimum value for this variable is 4096.", ...@@ -6067,12 +6122,6 @@ The minimum value for this variable is 4096.",
(gptr*) &myisam_data_pointer_size, (gptr*) &myisam_data_pointer_size,
(gptr*) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG, (gptr*) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG,
6, 2, 7, 0, 1, 0}, 6, 2, 7, 0, 1, 0},
{"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
"Deprecated option",
(gptr*) &global_system_variables.myisam_max_extra_sort_file_size,
(gptr*) &max_system_variables.myisam_max_extra_sort_file_size,
0, GET_ULL, REQUIRED_ARG, (ulonglong) MI_MAX_TEMP_LENGTH,
0, (ulonglong) MAX_FILE_SIZE, 0, 1, 0},
{"myisam_max_sort_file_size", OPT_MYISAM_MAX_SORT_FILE_SIZE, {"myisam_max_sort_file_size", OPT_MYISAM_MAX_SORT_FILE_SIZE,
"Don't use the fast sort index method to created index if the temporary file would get bigger than this.", "Don't use the fast sort index method to created index if the temporary file would get bigger than this.",
(gptr*) &global_system_variables.myisam_max_sort_file_size, (gptr*) &global_system_variables.myisam_max_sort_file_size,
...@@ -7026,7 +7075,7 @@ static void mysql_init_variables(void) ...@@ -7026,7 +7075,7 @@ static void mysql_init_variables(void)
query_id= thread_id= 1L; query_id= thread_id= 1L;
strmov(server_version, MYSQL_SERVER_VERSION); strmov(server_version, MYSQL_SERVER_VERSION);
myisam_recover_options_str= sql_mode_str= "OFF"; myisam_recover_options_str= sql_mode_str= "OFF";
myisam_stats_method_str= "nulls_unequal"; myisam_stats_method_str= maria_stats_method_str= "nulls_unequal";
my_bind_addr = htonl(INADDR_ANY); my_bind_addr = htonl(INADDR_ANY);
threads.empty(); threads.empty();
thread_cache.empty(); thread_cache.empty();
...@@ -7034,7 +7083,16 @@ static void mysql_init_variables(void) ...@@ -7034,7 +7083,16 @@ static void mysql_init_variables(void)
if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str, if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str,
default_key_cache_base.length))) default_key_cache_base.length)))
exit(1); exit(1);
multi_keycache_init(); /* set key_cache_hash.default_value = dflt_key_cache */ #ifdef WITH_MARIA_STORAGE_ENGINE
if (!(maria_key_cache= get_or_create_key_cache(maria_key_cache_base.str,
maria_key_cache_base.length)))
exit(1);
maria_key_cache->param_buff_size= maria_key_cache_var.param_buff_size;
maria_key_cache->param_block_size= maria_block_size;
#endif
/* set key_cache_hash.default_value = dflt_key_cache */
multi_keycache_init();
/* Set directory paths */ /* Set directory paths */
strmake(language, LANGUAGE, sizeof(language)-1); strmake(language, LANGUAGE, sizeof(language)-1);
...@@ -7734,7 +7792,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -7734,7 +7792,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int method; int method;
LINT_INIT(method_conv); LINT_INIT(method_conv);
myisam_stats_method_str= argument;
if ((method=find_type(argument, &myisam_stats_method_typelib, 2)) <= 0) if ((method=find_type(argument, &myisam_stats_method_typelib, 2)) <= 0)
{ {
fprintf(stderr, "Invalid value of myisam_stats_method: %s.\n", argument); fprintf(stderr, "Invalid value of myisam_stats_method: %s.\n", argument);
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
#include <thr_alarm.h> #include <thr_alarm.h>
#include <myisam.h> #include <myisam.h>
#include <my_dir.h> #include <my_dir.h>
#ifdef WITH_MARIA_STORAGE_ENGINE
#include <maria.h>
#endif
#include "event_scheduler.h" #include "event_scheduler.h"
...@@ -152,6 +155,7 @@ static void fix_max_join_size(THD *thd, enum_var_type type); ...@@ -152,6 +155,7 @@ static void fix_max_join_size(THD *thd, enum_var_type type);
static void fix_query_cache_size(THD *thd, enum_var_type type); static void fix_query_cache_size(THD *thd, enum_var_type type);
static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type); static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type);
static void fix_myisam_max_sort_file_size(THD *thd, enum_var_type type); static void fix_myisam_max_sort_file_size(THD *thd, enum_var_type type);
static void fix_maria_max_sort_file_size(THD *thd, enum_var_type type);
static void fix_max_binlog_size(THD *thd, enum_var_type type); static void fix_max_binlog_size(THD *thd, enum_var_type type);
static void fix_max_relay_log_size(THD *thd, enum_var_type type); static void fix_max_relay_log_size(THD *thd, enum_var_type type);
static void fix_max_connections(THD *thd, enum_var_type type); static void fix_max_connections(THD *thd, enum_var_type type);
...@@ -355,6 +359,14 @@ sys_var_thd_enum sys_myisam_stats_method("myisam_stats_method", ...@@ -355,6 +359,14 @@ sys_var_thd_enum sys_myisam_stats_method("myisam_stats_method",
&myisam_stats_method_typelib, &myisam_stats_method_typelib,
NULL); NULL);
sys_var_thd_ulonglong sys_maria_max_sort_file_size("maria_max_sort_file_size", &SV::maria_max_sort_file_size, fix_maria_max_sort_file_size, 1);
sys_var_thd_ulong sys_maria_repair_threads("maria_repair_threads", &SV::maria_repair_threads);
sys_var_thd_ulong sys_maria_sort_buffer_size("maria_sort_buffer_size", &SV::maria_sort_buff_size);
sys_var_thd_enum sys_maria_stats_method("maria_stats_method",
&SV::maria_stats_method,
&myisam_stats_method_typelib,
NULL);
sys_var_thd_ulong sys_net_buffer_length("net_buffer_length", sys_var_thd_ulong sys_net_buffer_length("net_buffer_length",
&SV::net_buffer_length); &SV::net_buffer_length);
sys_var_thd_ulong sys_net_read_timeout("net_read_timeout", sys_var_thd_ulong sys_net_read_timeout("net_read_timeout",
...@@ -681,6 +693,7 @@ sys_var_have_variable sys_have_federated_db("have_federated_engine", ...@@ -681,6 +693,7 @@ sys_var_have_variable sys_have_federated_db("have_federated_engine",
&have_federated_db); &have_federated_db);
sys_var_have_variable sys_have_geometry("have_geometry", &have_geometry); sys_var_have_variable sys_have_geometry("have_geometry", &have_geometry);
sys_var_have_variable sys_have_innodb("have_innodb", &have_innodb); sys_var_have_variable sys_have_innodb("have_innodb", &have_innodb);
sys_var_have_variable sys_have_maria("have_maria", &have_maria);
sys_var_have_variable sys_have_merge_db("have_merge", &have_merge_db); sys_var_have_variable sys_have_merge_db("have_merge", &have_merge_db);
sys_var_have_variable sys_have_ndbcluster("have_ndbcluster", &have_ndbcluster); sys_var_have_variable sys_have_ndbcluster("have_ndbcluster", &have_ndbcluster);
sys_var_have_variable sys_have_openssl("have_openssl", &have_openssl); sys_var_have_variable sys_have_openssl("have_openssl", &have_openssl);
...@@ -822,6 +835,7 @@ SHOW_VAR init_vars[]= { ...@@ -822,6 +835,7 @@ SHOW_VAR init_vars[]= {
{sys_have_federated_db.name,(char*) &have_federated_db, SHOW_HAVE}, {sys_have_federated_db.name,(char*) &have_federated_db, SHOW_HAVE},
{sys_have_geometry.name, (char*) &have_geometry, SHOW_HAVE}, {sys_have_geometry.name, (char*) &have_geometry, SHOW_HAVE},
{sys_have_innodb.name, (char*) &have_innodb, SHOW_HAVE}, {sys_have_innodb.name, (char*) &have_innodb, SHOW_HAVE},
{sys_have_maria.name, (char*) &have_maria, SHOW_HAVE},
{sys_have_merge_db.name, (char*) &have_merge_db, SHOW_HAVE}, {sys_have_merge_db.name, (char*) &have_merge_db, SHOW_HAVE},
{sys_have_ndbcluster.name, (char*) &have_ndbcluster, SHOW_HAVE}, {sys_have_ndbcluster.name, (char*) &have_ndbcluster, SHOW_HAVE},
{sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE}, {sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE},
...@@ -901,6 +915,15 @@ SHOW_VAR init_vars[]= { ...@@ -901,6 +915,15 @@ SHOW_VAR init_vars[]= {
{sys_low_priority_updates.name, (char*) &sys_low_priority_updates, SHOW_SYS}, {sys_low_priority_updates.name, (char*) &sys_low_priority_updates, SHOW_SYS},
{"lower_case_file_system", (char*) &lower_case_file_system, SHOW_MY_BOOL}, {"lower_case_file_system", (char*) &lower_case_file_system, SHOW_MY_BOOL},
{"lower_case_table_names", (char*) &lower_case_table_names, SHOW_INT}, {"lower_case_table_names", (char*) &lower_case_table_names, SHOW_INT},
{sys_maria_max_sort_file_size.name, (char*) &sys_maria_max_sort_file_size,
SHOW_SYS},
{sys_maria_repair_threads.name, (char*) &sys_maria_repair_threads,
SHOW_SYS},
{sys_maria_sort_buffer_size.name, (char*) &sys_maria_sort_buffer_size,
SHOW_SYS},
{sys_maria_stats_method.name, (char*) &sys_maria_stats_method, SHOW_SYS},
{sys_max_allowed_packet.name,(char*) &sys_max_allowed_packet, SHOW_SYS}, {sys_max_allowed_packet.name,(char*) &sys_max_allowed_packet, SHOW_SYS},
{sys_max_binlog_cache_size.name,(char*) &sys_max_binlog_cache_size, SHOW_SYS}, {sys_max_binlog_cache_size.name,(char*) &sys_max_binlog_cache_size, SHOW_SYS},
{sys_max_binlog_size.name, (char*) &sys_max_binlog_size, SHOW_SYS}, {sys_max_binlog_size.name, (char*) &sys_max_binlog_size, SHOW_SYS},
...@@ -1192,6 +1215,16 @@ fix_myisam_max_sort_file_size(THD *thd, enum_var_type type) ...@@ -1192,6 +1215,16 @@ fix_myisam_max_sort_file_size(THD *thd, enum_var_type type)
(my_off_t) global_system_variables.myisam_max_sort_file_size; (my_off_t) global_system_variables.myisam_max_sort_file_size;
} }
static void
fix_maria_max_sort_file_size(THD *thd, enum_var_type type)
{
#ifdef WITH_MARIA_STORAGE_ENGINE
maria_max_temp_length=
(my_off_t) global_system_variables.myisam_max_sort_file_size;
#endif
}
/* /*
Set the OPTION_BIG_SELECTS flag if max_join_size == HA_POS_ERROR Set the OPTION_BIG_SELECTS flag if max_join_size == HA_POS_ERROR
*/ */
...@@ -2398,6 +2431,7 @@ void sys_var_collation_server::set_default(THD *thd, enum_var_type type) ...@@ -2398,6 +2431,7 @@ void sys_var_collation_server::set_default(THD *thd, enum_var_type type)
LEX_STRING default_key_cache_base= {(char *) "default", 7 }; LEX_STRING default_key_cache_base= {(char *) "default", 7 };
LEX_STRING maria_key_cache_base= {(char *) "maria", 5 };
static KEY_CACHE zero_key_cache; static KEY_CACHE zero_key_cache;
......
...@@ -1099,6 +1099,7 @@ public: ...@@ -1099,6 +1099,7 @@ public:
extern sys_var_thd_bool sys_old_alter_table; extern sys_var_thd_bool sys_old_alter_table;
extern sys_var_thd_bool sys_old_passwords; extern sys_var_thd_bool sys_old_passwords;
extern LEX_STRING default_key_cache_base; extern LEX_STRING default_key_cache_base;
extern LEX_STRING maria_key_cache_base;
/* For sql_yacc */ /* For sql_yacc */
struct sys_var_with_base struct sys_var_with_base
......
...@@ -180,7 +180,7 @@ class Time_zone; ...@@ -180,7 +180,7 @@ class Time_zone;
struct system_variables struct system_variables
{ {
ulonglong myisam_max_extra_sort_file_size; ulonglong maria_max_sort_file_size;
ulonglong myisam_max_sort_file_size; ulonglong myisam_max_sort_file_size;
ha_rows select_limit; ha_rows select_limit;
ha_rows max_join_size; ha_rows max_join_size;
...@@ -195,6 +195,9 @@ struct system_variables ...@@ -195,6 +195,9 @@ struct system_variables
ulong max_sort_length; ulong max_sort_length;
ulong max_tmp_tables; ulong max_tmp_tables;
ulong max_insert_delayed_threads; ulong max_insert_delayed_threads;
ulong maria_repair_threads;
ulong maria_sort_buff_size;
ulong maria_stats_method;
ulong multi_range_count; ulong multi_range_count;
ulong myisam_repair_threads; ulong myisam_repair_threads;
ulong myisam_sort_buff_size; ulong myisam_sort_buff_size;
......
...@@ -35,7 +35,9 @@ ...@@ -35,7 +35,9 @@
the callback function 'unpack_addon_fields'. the callback function 'unpack_addon_fields'.
*/ */
typedef struct st_sort_addon_field { /* Sort addon packed field */ typedef struct st_sort_addon_field
{
/* Sort addon packed field */
Field *field; /* Original field */ Field *field; /* Original field */
uint offset; /* Offset from the last sorted field */ uint offset; /* Offset from the last sorted field */
uint null_offset; /* Offset to to null bit from the last sorted field */ uint null_offset; /* Offset to to null bit from the last sorted field */
...@@ -43,13 +45,6 @@ typedef struct st_sort_addon_field { /* Sort addon packed field */ ...@@ -43,13 +45,6 @@ typedef struct st_sort_addon_field { /* Sort addon packed field */
uint8 null_bit; /* Null bit mask for the field */ uint8 null_bit; /* Null bit mask for the field */
} SORT_ADDON_FIELD; } SORT_ADDON_FIELD;
typedef struct st_buffpek { /* Struktur om sorteringsbuffrarna */
my_off_t file_pos; /* Where we are in the sort file */
uchar *base,*key; /* key pointers */
ha_rows count; /* Number of rows in table */
ulong mem_count; /* numbers of keys in memory */
ulong max_keys; /* Max keys in buffert */
} BUFFPEK;
typedef struct st_sort_param { typedef struct st_sort_param {
uint rec_length; /* Length of sorted records */ uint rec_length; /* Length of sorted records */
......
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
EXTRA_DIST = ma_test_all.sh ma_test_all.res ma_ft_stem.c cmakelists.txt
pkgdata_DATA = ma_test_all ma_test_all.res
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LDADD = @CLIENT_EXTRA_LDFLAGS@ libmaria.a \
$(top_builddir)/storage/myisam/libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
pkglib_LIBRARIES = libmaria.a
bin_PROGRAMS = maria_chk maria_pack maria_ftdump
maria_chk_DEPENDENCIES= $(LIBRARIES)
maria_pack_DEPENDENCIES=$(LIBRARIES)
noinst_PROGRAMS = ma_test1 ma_test2 ma_test3 ma_rt_test ma_sp_test
noinst_HEADERS = maria_def.h ma_rt_index.h ma_rt_key.h ma_rt_mbr.h ma_sp_defs.h ma_fulltext.h ma_ftdefs.h ma_ft_test1.h ma_ft_eval.h
ma_test1_DEPENDENCIES= $(LIBRARIES)
ma_test2_DEPENDENCIES= $(LIBRARIES)
ma_test3_DEPENDENCIES= $(LIBRARIES)
#ma_ft_test1_DEPENDENCIES= $(LIBRARIES)
#ma_ft_eval_DEPENDENCIES= $(LIBRARIES)
maria_ftdump_DEPENDENCIES= $(LIBRARIES)
ma_rt_test_DEPENDENCIES= $(LIBRARIES)
ma_sp_test_DEPENDENCIES= $(LIBRARIES)
libmaria_a_SOURCES = ma_init.c ma_open.c ma_extra.c ma_info.c ma_rkey.c \
ma_rnext.c ma_rnext_same.c \
ma_search.c ma_page.c ma_key.c ma_locking.c \
ma_rrnd.c ma_scan.c ma_cache.c \
ma_statrec.c ma_packrec.c ma_dynrec.c \
ma_update.c ma_write.c ma_unique.c \
ma_delete.c \
ma_rprev.c ma_rfirst.c ma_rlast.c ma_rsame.c \
ma_rsamepos.c ma_panic.c ma_close.c ma_create.c\
ma_range.c ma_dbug.c ma_checksum.c \
ma_changed.c ma_static.c ma_delete_all.c \
ma_delete_table.c ma_rename.c ma_check.c \
ma_keycache.c ma_preload.c ma_ft_parser.c \
ma_ft_update.c ma_ft_boolean_search.c \
ma_ft_nlq_search.c ft_maria.c ma_sort.c \
ma_rt_index.c ma_rt_key.c ma_rt_mbr.c ma_rt_split.c \
ma_sp_key.c
CLEANFILES = test?.MA? FT?.MA? isam.log ma_test_all ma_rt_test.MA? sp_test.MA?
DEFS =
SUFFIXES = .sh
.sh:
@RM@ -f $@ $@-t
@SED@ \
-e 's!@''bindir''@!$(bindir)!g' \
-e 's!@''scriptdir''@!$(bindir)!g' \
-e 's!@''prefix''@!$(prefix)!g' \
-e 's!@''datadir''@!$(datadir)!g' \
-e 's!@''localstatedir''@!$(localstatedir)!g' \
-e 's!@''libexecdir''@!$(libexecdir)!g' \
-e 's!@''CC''@!@CC@!'\
-e 's!@''CXX''@!@CXX@!'\
-e 's!@''GXX''@!@GXX@!'\
-e 's!@''PERL''@!@PERL@!' \
-e 's!@''CFLAGS''@!@SAVE_CFLAGS@!'\
-e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\
-e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\
-e 's!@''VERSION''@!@VERSION@!' \
-e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
-e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \
-e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \
-e 's!@''HOSTNAME''@!@HOSTNAME@!' \
-e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \
-e 's!@''CHECK_PID''@!@CHECK_PID@!' \
-e 's!@''FIND_PROC''@!@FIND_PROC@!' \
-e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
-e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \
-e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
-e 's!@''sysconfdir''@!@sysconfdir@!' \
-e 's!@''SHORT_MYSQL_INTRO''@!@SHORT_MYSQL_INTRO@!' \
-e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
-e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \
-e 's!@''PERL_DBD_VERSION''@!@PERL_DBD_VERSION@!' \
-e 's!@''PERL_DATA_DUMPER''@!@PERL_DATA_DUMPER@!' \
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
# Don't update the files from bitkeeper
%::SCCS/s.%
This diff is collapsed.
/*
WL#3071 Maria checkpoint
First version written by Guilhem Bichot on 2006-04-27.
Does not compile yet.
*/
/* This is the interface of this module. */
typedef enum enum_checkpoint_level {
NONE=-1,
INDIRECT, /* just write dirty_pages, transactions table and sync files */
MEDIUM, /* also flush all dirty pages which were already dirty at prev checkpoint*/
FULL /* also flush all dirty pages */
} CHECKPOINT_LEVEL;
void request_asynchronous_checkpoint(CHECKPOINT_LEVEL level);
my_bool execute_synchronous_checkpoint(CHECKPOINT_LEVEL level);
my_bool execute_asynchronous_checkpoint_if_any();
/* that's all that's needed in the interface */
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c
ft_stopwords.c ft_update.c mi_cache.c mi_changed.c mi_check.c
mi_checksum.c mi_close.c mi_create.c mi_dbug.c mi_delete.c
mi_delete_all.c mi_delete_table.c mi_dynrec.c mi_extra.c mi_info.c
mi_key.c mi_keycache.c mi_locking.c mi_log.c mi_open.c
mi_packrec.c mi_page.c mi_panic.c mi_preload.c mi_range.c mi_rename.c
mi_rfirst.c mi_rlast.c mi_rnext.c mi_rnext_same.c mi_rprev.c mi_rrnd.c
mi_rsame.c mi_rsamepos.c mi_scan.c mi_search.c mi_static.c mi_statrec.c
mi_unique.c mi_update.c mi_write.c rt_index.c rt_key.c rt_mbr.c
rt_split.c sort.c sp_key.c ft_eval.h myisamdef.h rt_index.h mi_rkey.c)
ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(myisamchk myisamchk.c)
TARGET_LINK_LIBRARIES(myisamchk myisam mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(myisamlog myisamlog.c)
TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(myisampack myisampack.c)
TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib wsock32)
/*
WL#3234 Maria control file
First version written by Guilhem Bichot on 2006-04-27.
Does not compile yet.
*/
/* Here is the implementation of this module */
/* Control file is 512 bytes (a disk sector), to be as atomic as possible */
int control_file_fd;
/*
Looks for the control file. If absent, it's a fresh start, create file.
If present, read it to find out last checkpoint's LSN and last log.
Called at engine's start.
*/
int control_file_create_or_open()
{
char buffer[4];
/* name is concatenation of Maria's home dir and "control" */
if ((control_file_fd= my_open(name, O_RDWR)) < 0)
{
/* failure, try to create it */
if ((control_file_fd= my_create(name, O_RDWR)) < 0)
return 1;
/*
So this is a start from scratch, to be safer we should make sure that
there are no logs or data/index files around (indeed it could be that
the control file alone was deleted or not restored, and we should not
go on with life at this point.
For now we trust (this is alpha version), but for beta if would be great
to verify.
We could have a tool which can rebuild the control file, by reading the
directory of logs, finding the newest log, reading it to find last
checkpoint... Slow but can save your db.
*/
last_checkpoint_lsn_at_startup= 0;
last_log_name_at_startup= NULL;
return 0;
}
/* Already existing file, read it */
if (my_read(control_file_fd, buffer, 8, MYF(MY_FNABP)))
return 1;
last_checkpoint_lsn_at_startup= uint8korr(buffer);
if (last_log_name_at_startup= my_malloc(512-8+1))
return 1;
if (my_read(control_file_fd, last_log_name_at_startup, 512-8), MYF(MY_FNABP))
return 1;
last_log_name[512-8]= 0; /* end zero to be nice */
return 0;
}
/*
Write information durably to the control file.
Called when we have created a new log (after syncing this log's creation)
and when we have written a checkpoint (after syncing this log record).
*/
int control_file_write_and_force(LSN lsn, char *log_name)
{
char buffer[512];
uint start=8,end=8;
if (lsn != 0) /* LSN was specified */
{
start= 0;
int8store(buffer, lsn);
}
if (log_name != NULL) /* log name was specified */
{
end= 512;
memcpy(buffer+8, log_name, 512-8);
}
DBUG_ASSERT(start != end);
return (my_pwrite(control_file_fd, buffer, end-start, start, MYF(MY_FNABP)) ||
my_sync(control_file_fd))
}
/*
WL#3234 Maria control file
First version written by Guilhem Bichot on 2006-04-27.
Does not compile yet.
*/
/* Here is the interface of this module */
extern LSN last_checkpoint_lsn_at_startup;
extern char *last_log_name_at_startup;
/*
Looks for the control file. If absent, it's a fresh start, create file.
If present, read it to find out last checkpoint's LSN and last log.
Called at engine's start.
*/
int control_file_create_or_open();
/*
Write information durably to the control file.
Called when we have created a new log (after syncing this log's creation)
and when we have written a checkpoint (after syncing this log record).
*/
int control_file_write_and_force(LSN lsn, char *log_name);
/* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
/*
This function is for interface functions between fulltext and maria
*/
#include "ma_ftdefs.h"
FT_INFO *maria_ft_init_search(uint flags, void *info, uint keynr,
byte *query, uint query_len, CHARSET_INFO *cs,
byte *record)
{
FT_INFO *res;
if (flags & FT_BOOL)
res= maria_ft_init_boolean_search((MARIA_HA *) info, keynr, query,
query_len, cs);
else
res= maria_ft_init_nlq_search((MARIA_HA *) info, keynr, query, query_len,
flags, record);
return res;
}
const struct _ft_vft _ma_ft_vft_nlq = {
maria_ft_nlq_read_next, maria_ft_nlq_find_relevance,
maria_ft_nlq_close_search, maria_ft_nlq_get_relevance,
maria_ft_nlq_reinit_search
};
const struct _ft_vft _ma_ft_vft_boolean = {
maria_ft_boolean_read_next, maria_ft_boolean_find_relevance,
maria_ft_boolean_close_search, maria_ft_boolean_get_relevance,
maria_ft_boolean_reinit_search
};
This diff is collapsed.
/*
WL#3261 Maria - background flushing of the least-recently-dirtied pages
First version written by Guilhem Bichot on 2006-04-27.
Does not compile yet.
*/
/* This is the interface of this module. */
/* flushes all page from LRD up to approximately rec_lsn>=max_lsn */
int flush_all_LRD_to_lsn(LSN max_lsn);
/* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
Functions for read record cacheing with maria
Used for reading dynamic/compressed records from datafile.
Can fetch data directly from file (outside cache),
if reading a small chunk straight before the cached part (with possible
overlap).
Can be explicitly asked not to use cache (by not setting READING_NEXT in
flag) - useful for occasional out-of-cache reads, when the next read is
expected to hit the cache again.
Allows "partial read" errors in the record header (when READING_HEADER flag
is set) - unread part is bzero'ed
Note: out-of-cache reads are enabled for shared IO_CACHE's too,
as these reads will be cached by OS cache (and my_pread is always atomic)
*/
#include "maria_def.h"
int _ma_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length,
int flag)
{
uint read_length,in_buff_length;
my_off_t offset;
char *in_buff_pos;
DBUG_ENTER("_ma_read_cache");
if (pos < info->pos_in_file)
{
read_length=length;
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
read_length=(uint) (info->pos_in_file-pos);
info->seek_not_done=1;
if (my_pread(info->file,buff,read_length,pos,MYF(MY_NABP)))
DBUG_RETURN(1);
if (!(length-=read_length))
DBUG_RETURN(0);
pos+=read_length;
buff+=read_length;
}
if (pos >= info->pos_in_file &&
(offset= (my_off_t) (pos - info->pos_in_file)) <
(my_off_t) (info->read_end - info->request_pos))
{
in_buff_pos=info->request_pos+(uint) offset;
in_buff_length= min(length,(uint) (info->read_end-in_buff_pos));
memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length);
if (!(length-=in_buff_length))
DBUG_RETURN(0);
pos+=in_buff_length;
buff+=in_buff_length;
}
else
in_buff_length=0;
if (flag & READING_NEXT)
{
if (pos != (info->pos_in_file +
(uint) (info->read_end - info->request_pos)))
{
info->pos_in_file=pos; /* Force start here */
info->read_pos=info->read_end=info->request_pos; /* Everything used */
info->seek_not_done=1;
}
else
info->read_pos=info->read_end; /* All block used */
if (!(*info->read_function)(info,buff,length))
DBUG_RETURN(0);
read_length=info->error;
}
else
{
info->seek_not_done=1;
if ((read_length=my_pread(info->file,buff,length,pos,MYF(0))) == length)
DBUG_RETURN(0);
}
if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3)
{
DBUG_PRINT("error",
("Error %d reading next-multi-part block (Got %d bytes)",
my_errno, (int) read_length));
if (!my_errno || my_errno == -1)
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length -
read_length);
DBUG_RETURN(0);
} /* _ma_read_cache */
/* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Check if somebody has changed table since last check. */
#include "maria_def.h"
/* Return 0 if table isn't changed */
int maria_is_changed(MARIA_HA *info)
{
int result;
DBUG_ENTER("maria_is_changed");
if (fast_ma_readinfo(info))
DBUG_RETURN(-1);
VOID(_ma_writeinfo(info,0));
result=(int) info->data_changed;
info->data_changed=0;
DBUG_PRINT("exit",("result: %d",result));
DBUG_RETURN(result);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
/* mulitingual stem */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment