summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2006-11-30 23:27:16 +0200
committerunknown <monty@narttu.mysql.fi>2006-11-30 23:27:16 +0200
commit9b1336fec9072cab46ab237c0f94c85808b52be4 (patch)
tree5ce45a92708629c661c7e1815428098713fb496c /storage
parentf8d8b3db916d71697a6d5f00eba4f0da6f522959 (diff)
parente0aeba21a5b58038d38c92f750c1684ccb2a72d4 (diff)
downloadmariadb-git-9b1336fec9072cab46ab237c0f94c85808b52be4.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/my/mysql-5.1 configure.in: Auto merged include/my_pthread.h: Auto merged libmysql/libmysql.c: Auto merged server-tools/instance-manager/guardian.cc: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_sum.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged storage/archive/ha_archive.cc: Auto merged storage/csv/ha_tina.cc: Auto merged storage/federated/ha_federated.cc: Auto merged sql/item_create.cc: manual merge
Diffstat (limited to 'storage')
-rw-r--r--storage/archive/azio.c4
-rw-r--r--storage/csv/ha_tina.cc3
-rw-r--r--storage/federated/ha_federated.cc4
-rw-r--r--storage/heap/ha_heap.cc2
-rw-r--r--storage/heap/hp_clear.c3
-rw-r--r--storage/myisam/ft_boolean_search.c1
-rw-r--r--storage/myisam/mi_create.c6
-rw-r--r--storage/myisam/mi_unique.c2
-rw-r--r--storage/myisam/myisamchk.c1
-rw-r--r--storage/myisam/myisampack.c8
-rw-r--r--storage/myisam/sort.c1
-rw-r--r--storage/myisammrg/myrg_rkey.c4
-rw-r--r--storage/ndb/include/util/OutputStream.hpp2
-rw-r--r--storage/ndb/include/util/SocketAuthenticator.hpp1
-rw-r--r--storage/ndb/src/kernel/vm/Pool.hpp1
-rw-r--r--storage/ndb/src/mgmapi/mgmapi.cpp6
-rw-r--r--storage/ndb/src/ndbapi/NdbTransaction.cpp2
-rw-r--r--storage/ndb/src/ndbapi/Ndblist.cpp2
18 files changed, 27 insertions, 26 deletions
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index 7cbe6a2a17d..4cec83c9518 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -503,7 +503,7 @@ int azrewind (s)
if (!s->transparent) (void)inflateReset(&s->stream);
s->in = 0;
s->out = 0;
- return my_seek(s->file, (int)s->start, MY_SEEK_SET, MYF(0));
+ return my_seek(s->file, (int)s->start, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR;
}
/* ===========================================================================
@@ -568,7 +568,7 @@ my_off_t azseek (s, offset, whence)
/* For a negative seek, rewind and use positive seek */
if (offset >= s->out) {
offset -= s->out;
- } else if (azrewind(s) < 0) {
+ } else if (azrewind(s)) {
return -1L;
}
/* offset is now the number of bytes to skip. */
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 7051bd41cb1..676bfffbc39 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -250,9 +250,6 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
return share;
-error2:
- thr_lock_delete(&share->lock);
- pthread_mutex_destroy(&share->mutex);
error:
pthread_mutex_unlock(&tina_mutex);
my_free((gptr) share, MYF(0));
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 693544dde36..7330a19b791 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -2012,8 +2012,8 @@ int ha_federated::delete_row(const byte *buf)
{
DBUG_RETURN(stash_remote_error());
}
- stats.deleted+= (ha_rows)mysql->affected_rows;
- stats.records-= (ha_rows)mysql->affected_rows;
+ stats.deleted+= (ha_rows) mysql->affected_rows;
+ stats.records-= (ha_rows) mysql->affected_rows;
DBUG_PRINT("info",
("rows deleted %ld rows deleted for all time %ld",
(long) mysql->affected_rows, (long) stats.deleted));
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index dc49e8978c0..eb2723f10ac 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -654,7 +654,7 @@ int ha_heap::create(const char *name, TABLE *table_arg,
}
mem_per_row+= MY_ALIGN(share->reclength + 1, sizeof(char*));
max_rows = (ha_rows) (table_arg->in_use->variables.max_heap_table_size /
- mem_per_row);
+ (ulonglong) mem_per_row);
if (table_arg->found_next_number_field)
{
keydef[share->next_number_index].flag|= HA_AUTO_KEY;
diff --git a/storage/heap/hp_clear.c b/storage/heap/hp_clear.c
index 596d71ebe9c..b491f8eba15 100644
--- a/storage/heap/hp_clear.c
+++ b/storage/heap/hp_clear.c
@@ -36,7 +36,8 @@ void hp_clear(HP_SHARE *info)
(byte*) 0));
info->block.levels=0;
hp_clear_keys(info);
- info->records=info->deleted=info->data_length=0;
+ info->records= info->deleted= 0;
+ info->data_length= 0;
info->blength=1;
info->changed=0;
info->del_link=0;
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index cb4005d5c84..6ef2149b5da 100644
--- a/storage/myisam/ft_boolean_search.c
+++ b/storage/myisam/ft_boolean_search.c
@@ -333,7 +333,6 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
MI_INFO *info=ftb->info;
uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
byte *lastkey_buf=ftbw->word+ftbw->off;
- LINT_INIT(off);
LINT_INIT(off);
if (ftbw->flags & FTB_FLAG_TRUNC)
diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c
index f8fad493a91..3cdc42c85bc 100644
--- a/storage/myisam/mi_create.c
+++ b/storage/myisam/mi_create.c
@@ -438,9 +438,9 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
block_length= max(block_length, MI_MIN_KEY_BLOCK_LENGTH);
block_length= min(block_length, MI_MAX_KEY_BLOCK_LENGTH);
- keydef->block_length= MI_BLOCK_SIZE(length-real_length_diff,
- pointer,MI_MAX_KEYPTR_SIZE,
- block_length);
+ keydef->block_length= (uint16) MI_BLOCK_SIZE(length-real_length_diff,
+ pointer,MI_MAX_KEYPTR_SIZE,
+ block_length);
if (keydef->block_length > MI_MAX_KEY_BLOCK_LENGTH ||
length >= MI_MAX_KEY_BUFF)
{
diff --git a/storage/myisam/mi_unique.c b/storage/myisam/mi_unique.c
index b698968127b..62aa4166793 100644
--- a/storage/myisam/mi_unique.c
+++ b/storage/myisam/mi_unique.c
@@ -57,7 +57,7 @@ my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, byte *record,
if (_mi_search_next(info,info->s->keyinfo+def->key, info->lastkey,
MI_UNIQUE_HASH_LENGTH, SEARCH_BIGGER,
info->s->state.key_root[def->key]) ||
- bcmp(info->lastkey, key_buff, MI_UNIQUE_HASH_LENGTH))
+ bcmp((char*) info->lastkey, (char*) key_buff, MI_UNIQUE_HASH_LENGTH))
{
info->page_changed=1; /* Can't optimize read next */
info->lastpos=lastpos;
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 7fcfb8fc65a..eb7e4deca96 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -697,6 +697,7 @@ get_one_option(int optid,
{
int method;
enum_mi_stats_method method_conv;
+ LINT_INIT(method_conv);
myisam_stats_method_str= argument;
if ((method=find_type(argument, &myisam_stats_method_typelib, 2)) <= 0)
{
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 98121cc6d90..d16821d3cda 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -1105,9 +1105,9 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
my_off_t total_count;
char llbuf[32];
- DBUG_PRINT("info", ("column: %3u", (uint) (count - huff_counts) + 1));
+ DBUG_PRINT("info", ("column: %3u", (uint) (count - huff_counts + 1)));
if (verbose >= 2)
- VOID(printf("column: %3u\n", (uint) (count - huff_counts) + 1));
+ VOID(printf("column: %3u\n", (uint) (count - huff_counts + 1)));
if (count->tree_buff)
{
DBUG_PRINT("info", ("number of distinct values: %u",
@@ -2279,8 +2279,8 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
if (bits > 8 * sizeof(code))
{
VOID(fflush(stdout));
- VOID(fprintf(stderr, "error: Huffman code too long: %u/%lu\n",
- bits, (ulong) (8 * sizeof(code))));
+ VOID(fprintf(stderr, "error: Huffman code too long: %u/%u\n",
+ bits, (uint) (8 * sizeof(code))));
errors++;
break;
}
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index a6bf3934959..950d32617b4 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -899,7 +899,6 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
BUFFPEK *buffpek,**refpek;
QUEUE queue;
volatile int *killed= killed_ptr(info->sort_info->param);
-
DBUG_ENTER("merge_buffers");
count=error=0;
diff --git a/storage/myisammrg/myrg_rkey.c b/storage/myisammrg/myrg_rkey.c
index 8d3c0a4699a..85464374d5d 100644
--- a/storage/myisammrg/myrg_rkey.c
+++ b/storage/myisammrg/myrg_rkey.c
@@ -87,8 +87,8 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table;
mi->once_flags|= RRND_PRESERVE_LASTINX;
- DBUG_PRINT("info", ("using table no: %u",
- (uint) (info->current_table - info->open_tables) + 1));
+ DBUG_PRINT("info", ("using table no: %d",
+ (int) (info->current_table - info->open_tables + 1)));
DBUG_DUMP("result key", (byte*) mi->lastkey, mi->lastkey_length);
DBUG_RETURN(_myrg_mi_read_record(mi,buf));
}
diff --git a/storage/ndb/include/util/OutputStream.hpp b/storage/ndb/include/util/OutputStream.hpp
index 66adb549da0..8f168525cb4 100644
--- a/storage/ndb/include/util/OutputStream.hpp
+++ b/storage/ndb/include/util/OutputStream.hpp
@@ -25,6 +25,7 @@
*/
class OutputStream {
public:
+ OutputStream() {}
virtual ~OutputStream() {}
virtual int print(const char * fmt, ...) = 0;
virtual int println(const char * fmt, ...) = 0;
@@ -64,6 +65,7 @@ public:
class NullOutputStream : public OutputStream {
public:
+ NullOutputStream() {}
virtual ~NullOutputStream() {}
int print(const char * /* unused */, ...) { return 1;}
int println(const char * /* unused */, ...) { return 1;}
diff --git a/storage/ndb/include/util/SocketAuthenticator.hpp b/storage/ndb/include/util/SocketAuthenticator.hpp
index 1b82567feaa..0c3de073b1e 100644
--- a/storage/ndb/include/util/SocketAuthenticator.hpp
+++ b/storage/ndb/include/util/SocketAuthenticator.hpp
@@ -20,6 +20,7 @@
class SocketAuthenticator
{
public:
+ SocketAuthenticator() {}
virtual ~SocketAuthenticator() {};
virtual bool client_authenticate(int sockfd) = 0;
virtual bool server_authenticate(int sockfd) = 0;
diff --git a/storage/ndb/src/kernel/vm/Pool.hpp b/storage/ndb/src/kernel/vm/Pool.hpp
index fe3a50e127b..4b3bfe50def 100644
--- a/storage/ndb/src/kernel/vm/Pool.hpp
+++ b/storage/ndb/src/kernel/vm/Pool.hpp
@@ -65,6 +65,7 @@ struct Resource_limit
struct Pool_context
{
+ Pool_context() {}
class SimulatedBlock* m_block;
/**
diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp
index b64b24aa3cf..1a08453ccff 100644
--- a/storage/ndb/src/mgmapi/mgmapi.cpp
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp
@@ -184,7 +184,7 @@ ndb_mgm_create_handle()
h->mgmd_version_minor= -1;
h->mgmd_version_build= -1;
- DBUG_PRINT("info", ("handle: 0x%lx", (ulong) h));
+ DBUG_PRINT("info", ("handle: 0x%lx", (long) h));
DBUG_RETURN(h);
}
@@ -201,7 +201,7 @@ int
ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv)
{
DBUG_ENTER("ndb_mgm_set_connectstring");
- DBUG_PRINT("info", ("handle: 0x%lx", (ulong) handle));
+ DBUG_PRINT("info", ("handle: 0x%lx", (long) handle));
handle->cfg.~LocalConfig();
new (&(handle->cfg)) LocalConfig;
if (!handle->cfg.init(mgmsrv, 0) ||
@@ -243,7 +243,7 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle)
DBUG_ENTER("ndb_mgm_destroy_handle");
if(!handle)
DBUG_VOID_RETURN;
- DBUG_PRINT("info", ("handle: 0x%lx", (ulong) (* handle)));
+ DBUG_PRINT("info", ("handle: 0x%lx", (long) (* handle)));
/**
* important! only disconnect if connected
* other code relies on this
diff --git a/storage/ndb/src/ndbapi/NdbTransaction.cpp b/storage/ndb/src/ndbapi/NdbTransaction.cpp
index 0c59746c1e9..09b41b8a781 100644
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp
@@ -1010,7 +1010,7 @@ void
NdbTransaction::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp)
{
DBUG_ENTER("NdbTransaction::releaseExecutedScanOperation");
- DBUG_PRINT("enter", ("this: 0x%lx op: 0x%lx", (ulong) this, (ulong) cursorOp));
+ DBUG_PRINT("enter", ("this: 0x%lx op: 0x%lx", (long) this, (long) cursorOp));
releaseScanOperation(&m_firstExecutedScanOp, 0, cursorOp);
diff --git a/storage/ndb/src/ndbapi/Ndblist.cpp b/storage/ndb/src/ndbapi/Ndblist.cpp
index a0d22466db4..270745c9013 100644
--- a/storage/ndb/src/ndbapi/Ndblist.cpp
+++ b/storage/ndb/src/ndbapi/Ndblist.cpp
@@ -361,7 +361,7 @@ void
Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation)
{
DBUG_ENTER("Ndb::releaseScanOperation");
- DBUG_PRINT("enter", ("op: 0x%lx", (ulong) aScanOperation));
+ DBUG_PRINT("enter", ("op: 0x%lx", (long) aScanOperation));
#ifdef ndb_release_check_dup
{ NdbIndexScanOperation* tOp = theScanOpIdleList;
while (tOp != NULL) {