summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-06-18 01:55:42 +0200
committerunknown <jimw@mysql.com>2005-06-18 01:55:42 +0200
commit94d1d88658e5aa75d999c308ac464014f20a3d02 (patch)
tree076bb703eac95ae156980bf3eda38b417ad59e5e /sql/examples
parent0945dea8d08b13189691052b79fe2bd255e0f008 (diff)
downloadmariadb-git-94d1d88658e5aa75d999c308ac464014f20a3d02.tar.gz
Clean up warnings and build problems on Windows. (Bug #11045)
VC++Files/sql/mysqld.dsp: Link debug server against debug yassl sql/examples/ha_archive.cc: Fix type for variables used to store number of rows Add cast when reading current position sql/examples/ha_archive.h: Fix variables used to store rows to ha_rows sql/ha_federated.cc: Remove unused variables, fix type of variable used to store query id sql/item_strfunc.cc: Remove unused variables sql/sql_acl.cc: Remove unused variables sql/sql_lex.cc: Add casts to fix type used for counting number of rows sql/sql_lex.h: Fix size of options to be ulong again sql/sql_insert.cc: Fix type of query id value sql/sql_union.cc: Cast value for number of rows to ha_rows sql/sql_yacc.yy: Remove unused variable sql/table.cc: Add casts for handling key_part lengths
Diffstat (limited to 'sql/examples')
-rw-r--r--sql/examples/ha_archive.cc10
-rw-r--r--sql/examples/ha_archive.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index 93cedcbf251..3bf1441852f 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -259,7 +259,7 @@ error:
This method reads the header of a meta file and returns whether or not it was successful.
*rows will contain the current number of rows in the data file upon success.
*/
-int ha_archive::read_meta_file(File meta_file, ulonglong *rows)
+int ha_archive::read_meta_file(File meta_file, ha_rows *rows)
{
uchar meta_buffer[META_BUFFER_SIZE];
ulonglong check_point;
@@ -273,7 +273,7 @@ int ha_archive::read_meta_file(File meta_file, ulonglong *rows)
/*
Parse out the meta data, we ignore version at the moment
*/
- *rows= uint8korr(meta_buffer + 2);
+ *rows= (ha_rows)uint8korr(meta_buffer + 2);
check_point= uint8korr(meta_buffer + 10);
DBUG_PRINT("ha_archive::read_meta_file", ("Check %d", (uint)meta_buffer[0]));
@@ -296,7 +296,7 @@ int ha_archive::read_meta_file(File meta_file, ulonglong *rows)
By setting dirty you say whether or not the file represents the actual state of the data file.
Upon ::open() we set to dirty, and upon ::close() we set to clean.
*/
-int ha_archive::write_meta_file(File meta_file, ulonglong rows, bool dirty)
+int ha_archive::write_meta_file(File meta_file, ha_rows rows, bool dirty)
{
uchar meta_buffer[META_BUFFER_SIZE];
ulonglong check_point= 0; //Reserved for the future
@@ -787,7 +787,7 @@ int ha_archive::rnd_pos(byte * buf, byte *pos)
DBUG_ENTER("ha_archive::rnd_pos");
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
&LOCK_status);
- current_position= my_get_ptr(pos, ref_length);
+ current_position= (z_off_t)my_get_ptr(pos, ref_length);
(void)gzseek(archive, current_position, SEEK_SET);
DBUG_RETURN(get_row(archive, buf));
@@ -801,7 +801,7 @@ int ha_archive::repair(THD* thd, HA_CHECK_OPT* check_opt)
{
int rc;
byte *buf;
- ulonglong rows_recorded= 0;
+ ha_rows rows_recorded= 0;
gzFile rebuild_file; // Archive file we are working with
File meta_file; // Meta file we use
char data_file_name[FN_REFLEN];
diff --git a/sql/examples/ha_archive.h b/sql/examples/ha_archive.h
index 2f310d8c69b..454d253abe5 100644
--- a/sql/examples/ha_archive.h
+++ b/sql/examples/ha_archive.h
@@ -36,7 +36,7 @@ typedef struct st_archive_share {
gzFile archive_write; /* Archive file we are working with */
bool dirty; /* Flag for if a flush should occur */
bool crashed; /* Meta file is crashed */
- ulonglong rows_recorded; /* Number of rows in tables */
+ ha_rows rows_recorded; /* Number of rows in tables */
} ARCHIVE_SHARE;
/*
@@ -88,8 +88,8 @@ public:
int rnd_next(byte *buf);
int rnd_pos(byte * buf, byte *pos);
int get_row(gzFile file_to_read, byte *buf);
- int read_meta_file(File meta_file, ulonglong *rows);
- int write_meta_file(File meta_file, ulonglong rows, bool dirty);
+ int read_meta_file(File meta_file, ha_rows *rows);
+ int write_meta_file(File meta_file, ha_rows rows, bool dirty);
ARCHIVE_SHARE *get_share(const char *table_name, TABLE *table);
int free_share(ARCHIVE_SHARE *share);
bool auto_repair() const { return 1; } // For the moment we just do this