summaryrefslogtreecommitdiff
path: root/storage/example/ha_example.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/example/ha_example.cc')
-rw-r--r--storage/example/ha_example.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index 53af99dee97..06efc727837 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -114,11 +114,11 @@ pthread_mutex_t example_mutex;
Function we use in the creation of our hash to get key.
*/
-static byte* example_get_key(EXAMPLE_SHARE *share,uint *length,
+static uchar* example_get_key(EXAMPLE_SHARE *share, size_t *length,
my_bool not_used __attribute__((unused)))
{
*length=share->table_name_length;
- return (byte*) share->table_name;
+ return (uchar*) share->table_name;
}
@@ -172,7 +172,7 @@ static EXAMPLE_SHARE *get_share(const char *table_name, TABLE *table)
length=(uint) strlen(table_name);
if (!(share=(EXAMPLE_SHARE*) hash_search(&example_open_tables,
- (byte*) table_name,
+ (uchar*) table_name,
length)))
{
if (!(share=(EXAMPLE_SHARE *)
@@ -189,7 +189,7 @@ static EXAMPLE_SHARE *get_share(const char *table_name, TABLE *table)
share->table_name_length=length;
share->table_name=tmp_name;
strmov(share->table_name,table_name);
- if (my_hash_insert(&example_open_tables, (byte*) share))
+ if (my_hash_insert(&example_open_tables, (uchar*) share))
goto error;
thr_lock_init(&share->lock);
pthread_mutex_init(&share->mutex,MY_MUTEX_INIT_FAST);
@@ -201,7 +201,7 @@ static EXAMPLE_SHARE *get_share(const char *table_name, TABLE *table)
error:
pthread_mutex_destroy(&share->mutex);
- my_free((gptr) share, MYF(0));
+ my_free(share, MYF(0));
return NULL;
}
@@ -218,10 +218,10 @@ static int free_share(EXAMPLE_SHARE *share)
pthread_mutex_lock(&example_mutex);
if (!--share->use_count)
{
- hash_delete(&example_open_tables, (byte*) share);
+ hash_delete(&example_open_tables, (uchar*) share);
thr_lock_delete(&share->lock);
pthread_mutex_destroy(&share->mutex);
- my_free((gptr) share, MYF(0));
+ my_free(share, MYF(0));
}
pthread_mutex_unlock(&example_mutex);
@@ -349,7 +349,7 @@ int ha_example::close(void)
sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc and sql_update.cc
*/
-int ha_example::write_row(byte * buf)
+int ha_example::write_row(uchar *buf)
{
DBUG_ENTER("ha_example::write_row");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
@@ -378,7 +378,7 @@ int ha_example::write_row(byte * buf)
@see
sql_select.cc, sql_acl.cc, sql_update.cc and sql_insert.cc
*/
-int ha_example::update_row(const byte * old_data, byte * new_data)
+int ha_example::update_row(const uchar *old_data, uchar *new_data)
{
DBUG_ENTER("ha_example::update_row");
@@ -406,7 +406,7 @@ int ha_example::update_row(const byte * old_data, byte * new_data)
sql_acl.cc, sql_udf.cc, sql_delete.cc, sql_insert.cc and sql_select.cc
*/
-int ha_example::delete_row(const byte * buf)
+int ha_example::delete_row(const uchar *buf)
{
DBUG_ENTER("ha_example::delete_row");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
@@ -420,7 +420,7 @@ int ha_example::delete_row(const byte * buf)
index.
*/
-int ha_example::index_read(byte * buf, const byte * key,
+int ha_example::index_read(uchar *buf, const uchar *key,
key_part_map keypart_map __attribute__((unused)),
enum ha_rkey_function find_flag
__attribute__((unused)))
@@ -435,7 +435,7 @@ int ha_example::index_read(byte * buf, const byte * key,
Used to read forward through the index.
*/
-int ha_example::index_next(byte * buf)
+int ha_example::index_next(uchar *buf)
{
DBUG_ENTER("ha_example::index_next");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
@@ -447,7 +447,7 @@ int ha_example::index_next(byte * buf)
Used to read backwards through the index.
*/
-int ha_example::index_prev(byte * buf)
+int ha_example::index_prev(uchar *buf)
{
DBUG_ENTER("ha_example::index_prev");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
@@ -464,7 +464,7 @@ int ha_example::index_prev(byte * buf)
@see
opt_range.cc, opt_sum.cc, sql_handler.cc and sql_select.cc
*/
-int ha_example::index_first(byte * buf)
+int ha_example::index_first(uchar *buf)
{
DBUG_ENTER("ha_example::index_first");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
@@ -481,7 +481,7 @@ int ha_example::index_first(byte * buf)
@see
opt_range.cc, opt_sum.cc, sql_handler.cc and sql_select.cc
*/
-int ha_example::index_last(byte * buf)
+int ha_example::index_last(uchar *buf)
{
DBUG_ENTER("ha_example::index_last");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
@@ -528,7 +528,7 @@ int ha_example::rnd_end()
@see
filesort.cc, records.cc, sql_handler.cc, sql_select.cc, sql_table.cc and sql_update.cc
*/
-int ha_example::rnd_next(byte *buf)
+int ha_example::rnd_next(uchar *buf)
{
DBUG_ENTER("ha_example::rnd_next");
DBUG_RETURN(HA_ERR_END_OF_FILE);
@@ -556,7 +556,7 @@ int ha_example::rnd_next(byte *buf)
@see
filesort.cc, sql_select.cc, sql_delete.cc and sql_update.cc
*/
-void ha_example::position(const byte *record)
+void ha_example::position(const uchar *record)
{
DBUG_ENTER("ha_example::position");
DBUG_VOID_RETURN;
@@ -576,7 +576,7 @@ void ha_example::position(const byte *record)
@see
filesort.cc, records.cc, sql_insert.cc, sql_select.cc and sql_update.cc
*/
-int ha_example::rnd_pos(byte * buf, byte *pos)
+int ha_example::rnd_pos(uchar *buf, uchar *pos)
{
DBUG_ENTER("ha_example::rnd_pos");
DBUG_RETURN(HA_ERR_WRONG_COMMAND);