1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Applied all changes from Igor and Sanja

This commit is contained in:
Michael Widenius
2013-06-15 18:32:08 +03:00
parent 3143ad589a
commit 5f1f2fc0e4
162 changed files with 11704 additions and 6298 deletions

View File

@@ -42,15 +42,20 @@
#include "my_base.h" /* ha_rows */
/** @brief
EXAMPLE_SHARE is a structure that will be shared among all open handlers.
Example_share is a class that will be shared among all open handlers.
This example implements the minimum of what you will probably need.
*/
typedef struct st_example_share {
char *table_name;
uint table_name_length,use_count;
class Example_share : public Handler_share {
public:
mysql_mutex_t mutex;
THR_LOCK lock;
} EXAMPLE_SHARE;
Example_share();
~Example_share()
{
thr_lock_delete(&lock);
mysql_mutex_destroy(&mutex);
}
};
/** @brief
Class definition for the storage engine
@@ -58,7 +63,8 @@ typedef struct st_example_share {
class ha_example: public handler
{
THR_LOCK_DATA lock; ///< MySQL lock
EXAMPLE_SHARE *share; ///< Shared lock info
Example_share *share; ///< Shared lock info
Example_share *get_share(); ///< Get the share
public:
ha_example(handlerton *hton, TABLE_SHARE *table_arg);
@@ -246,8 +252,6 @@ public:
int delete_table(const char *from);
int create(const char *name, TABLE *form,
HA_CREATE_INFO *create_info); ///< required
bool check_if_incompatible_data(HA_CREATE_INFO *info,
uint table_changes);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); ///< required