summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-07 15:27:23 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-07 15:27:23 +0300
commit165eb1186cb6f8e9a9595ffd7c172c54a6dfb6dc (patch)
tree1af90462d850c2e61b2b5770bf8621d890095a5a /storage
parent569c37163e0e7afb8f9da37f5d67a2b52e610146 (diff)
downloadmariadb-git-165eb1186cb6f8e9a9595ffd7c172c54a6dfb6dc.tar.gz
Added extra argument to longlong2str() to make it have same prototype is int2str()
Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit. client/mysqltest.cc: longlong2str() -> longlong10_to_str() include/m_string.h: Added extra argument to longlong2str() to make it have same prototype is int2str() mysys/charset.c: Fixed compiler warning mysys/mf_soundex.c: Fixed compiler warning mysys/my_getopt.c: longlong2str() -> longlong10_to_str() sql/create_options.cc: Fixed compiler warning sql/item_strfunc.cc: Added extra argument to longlong2str sql/opt_range.cc: longlong2str() -> longlong10_to_str() sql/partition_info.cc: longlong2str() -> longlong10_to_str() sql/slave.cc: longlong2str() -> longlong10_to_str() sql/sql_bitmap.h: Added extra argument to longlong2str sql/sql_partition.cc: Added extra argument to longlong2str sql/sql_select.cc: longlong2str() -> longlong10_to_str() sql/sql_show.cc: Added extra argument to longlong2str storage/innodb_plugin/handler/ha_innodb.cc: Update to new parameters for longlong2str() storage/maria/ma_dbug.c: longlong2str() -> longlong10_to_str() storage/maria/maria_chk.c: Added extra argument to longlong2str storage/myisam/mi_dbug.c: longlong2str() -> longlong10_to_str() storage/myisam/myisamchk.c: Added extra argument to longlong2str storage/xtradb/handler/ha_innodb.cc: Update to new parameters for longlong2str() strings/longlong2str.c: Added extra argument to longlong2str() to make it have same prototype is int2str() strings/my_vsnprintf.c: Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit. Added cast to get rid of compiler warnings
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/handler/ha_innodb.cc6
-rw-r--r--storage/maria/ma_dbug.c4
-rw-r--r--storage/maria/maria_chk.c2
-rw-r--r--storage/myisam/mi_dbug.c4
-rw-r--r--storage/myisam/myisamchk.c2
-rw-r--r--storage/xtradb/handler/ha_innodb.cc10
6 files changed, 14 insertions, 14 deletions
diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
index 1c2a880c070..4d4fd185567 100644
--- a/storage/innodb_plugin/handler/ha_innodb.cc
+++ b/storage/innodb_plugin/handler/ha_innodb.cc
@@ -2672,7 +2672,7 @@ innobase_rollback_to_savepoint(
/* TODO: use provided savepoint data area to store savepoint data */
- longlong2str((ulint)savepoint, name, 36);
+ longlong2str((ulint)savepoint, name, 36, 1);
error = (int) trx_rollback_to_savepoint_for_mysql(trx, name,
&mysql_binlog_cache_pos);
@@ -2703,7 +2703,7 @@ innobase_release_savepoint(
/* TODO: use provided savepoint data area to store savepoint data */
- longlong2str((ulint)savepoint, name, 36);
+ longlong2str((ulint)savepoint, name, 36, 1);
error = (int) trx_release_savepoint_for_mysql(trx, name);
@@ -2750,7 +2750,7 @@ innobase_savepoint(
/* TODO: use provided savepoint data area to store savepoint data */
char name[64];
- longlong2str((ulint)savepoint,name,36);
+ longlong2str((ulint)savepoint,name,36,1);
error = (int) trx_savepoint_for_mysql(trx, name, (ib_int64_t)0);
diff --git a/storage/maria/ma_dbug.c b/storage/maria/ma_dbug.c
index ea69975ad4b..0d2db0d4f4b 100644
--- a/storage/maria/ma_dbug.c
+++ b/storage/maria/ma_dbug.c
@@ -124,7 +124,7 @@ void _ma_print_keydata(FILE *stream, register HA_KEYSEG *keyseg,
case HA_KEYTYPE_LONGLONG:
{
char buff[21];
- longlong2str(mi_sint8korr(key),buff,-10);
+ longlong10_to_str(mi_sint8korr(key),buff,-10);
VOID(fprintf(stream,"%s",buff));
key=end;
break;
@@ -132,7 +132,7 @@ void _ma_print_keydata(FILE *stream, register HA_KEYSEG *keyseg,
case HA_KEYTYPE_ULONGLONG:
{
char buff[21];
- longlong2str(mi_sint8korr(key),buff,10);
+ longlong10_to_str(mi_sint8korr(key),buff,10);
VOID(fprintf(stream,"%s",buff));
key=end;
break;
diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c
index 985e9d2bc85..35f7f0f6c29 100644
--- a/storage/maria/maria_chk.c
+++ b/storage/maria/maria_chk.c
@@ -1512,7 +1512,7 @@ static void descript(HA_CHECK *param, register MARIA_HA *info, char *name)
printf("Recordlength: %16d\n",(int) share->base.pack_reclength);
if (! maria_is_all_keys_active(share->state.key_map, share->base.keys))
{
- longlong2str(share->state.key_map,buff,2);
+ longlong2str(share->state.key_map,buff,2,1);
printf("Using only keys '%s' of %d possibly keys\n",
buff, share->base.keys);
}
diff --git a/storage/myisam/mi_dbug.c b/storage/myisam/mi_dbug.c
index 659abdce131..1a61d4823b5 100644
--- a/storage/myisam/mi_dbug.c
+++ b/storage/myisam/mi_dbug.c
@@ -118,7 +118,7 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
case HA_KEYTYPE_LONGLONG:
{
char buff[21];
- longlong2str(mi_sint8korr(key),buff,-10);
+ longlong10_to_str(mi_sint8korr(key),buff,-10);
VOID(fprintf(stream,"%s",buff));
key=end;
break;
@@ -126,7 +126,7 @@ void _mi_print_key(FILE *stream, register HA_KEYSEG *keyseg,
case HA_KEYTYPE_ULONGLONG:
{
char buff[21];
- longlong2str(mi_sint8korr(key),buff,10);
+ longlong10_to_str(mi_sint8korr(key),buff,10);
VOID(fprintf(stream,"%s",buff));
key=end;
break;
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index c7ab2baa87c..592426a3690 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -1314,7 +1314,7 @@ static void descript(HA_CHECK *param, register MI_INFO *info, char * name)
printf("Recordlength: %13d\n",(int) share->base.pack_reclength);
if (! mi_is_all_keys_active(share->state.key_map, share->base.keys))
{
- longlong2str(share->state.key_map,buff,2);
+ longlong2str(share->state.key_map,buff,2,1);
printf("Using only keys '%s' of %d possibly keys\n",
buff, share->base.keys);
}
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index ad4a1f8d3bd..68da379b841 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -2459,11 +2459,11 @@ innobase_change_buffering_inited_ok:
my_b_seek(&info_file, 0L);
pos=strmov(buff, trx_sys_mysql_relay_log_name);
*pos++='\n';
- pos=longlong2str(trx_sys_mysql_relay_log_pos, pos, 10);
+ pos=longlong10_to_str(trx_sys_mysql_relay_log_pos, pos, 10);
*pos++='\n';
pos=strmov(pos, trx_sys_mysql_master_log_name);
*pos++='\n';
- pos=longlong2str(trx_sys_mysql_master_log_pos, pos, 10);
+ pos=longlong10_to_str(trx_sys_mysql_master_log_pos, pos, 10);
*pos='\n';
if (my_b_write(&info_file, (uchar*) buff, (size_t) (pos-buff)+1))
@@ -2931,7 +2931,7 @@ innobase_rollback_to_savepoint(
/* TODO: use provided savepoint data area to store savepoint data */
- longlong2str((ulint)savepoint, name, 36);
+ longlong2str((ulint)savepoint, name, 36, 1);
error = (int) trx_rollback_to_savepoint_for_mysql(trx, name,
&mysql_binlog_cache_pos);
@@ -2962,7 +2962,7 @@ innobase_release_savepoint(
/* TODO: use provided savepoint data area to store savepoint data */
- longlong2str((ulint)savepoint, name, 36);
+ longlong2str((ulint)savepoint, name, 36, 1);
error = (int) trx_release_savepoint_for_mysql(trx, name);
@@ -3009,7 +3009,7 @@ innobase_savepoint(
/* TODO: use provided savepoint data area to store savepoint data */
char name[64];
- longlong2str((ulint)savepoint,name,36);
+ longlong2str((ulint)savepoint,name,36,1);
error = (int) trx_savepoint_for_mysql(trx, name, (ib_int64_t)0);