diff options
author | unknown <serg@serg.mylan> | 2006-01-04 10:36:49 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2006-01-04 10:36:49 +0100 |
commit | 88469c807ea8e4a7a45a4e47604f45c211a34d11 (patch) | |
tree | 6b50b0a3eb23eed5ff9c6d15baa6035567eaf858 | |
parent | c81a379c5b8e25aab55a090627f65a5b72ddef4d (diff) | |
download | mariadb-git-88469c807ea8e4a7a45a4e47604f45c211a34d11.tar.gz |
cleanup
include/my_sys.h:
sort_dynamic()
mysys/my_once.c:
MY_ZEROFILL support in my_once_alloc
plugin/fulltext/Makefile.am:
no lib prefix for modules. really build .so
scripts/mysql_create_system_tables.sh:
remove obsolete syntax (and warnings)
sql/sql_parse.cc:
don't call add_to_status/bzero in a loop
-rw-r--r-- | include/my_sys.h | 3 | ||||
-rw-r--r-- | mysys/my_once.c | 2 | ||||
-rw-r--r-- | plugin/fulltext/Makefile.am | 6 | ||||
-rw-r--r-- | scripts/mysql_create_system_tables.sh | 8 | ||||
-rw-r--r-- | sql/sql_parse.cc | 17 |
5 files changed, 18 insertions, 18 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index d76098b8c29..39810e61de3 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -755,8 +755,9 @@ extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index); extern void freeze_size(DYNAMIC_ARRAY *array); #define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element) #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index)) -#define push_dynamic(A,B) insert_dynamic(A,B) +#define push_dynamic(A,B) insert_dynamic((A),(B)) #define reset_dynamic(array) ((array)->elements= 0) +#define sort_dynamic(A,cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp)) extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, uint init_alloc,uint alloc_increment); diff --git a/mysys/my_once.c b/mysys/my_once.c index ab5fcc51c0e..52f8c4309d5 100644 --- a/mysys/my_once.c +++ b/mysys/my_once.c @@ -75,6 +75,8 @@ gptr my_once_alloc(unsigned int Size, myf MyFlags) point= (gptr) ((char*) next+ (next->size-next->left)); next->left-= Size; + if (MyFlags & MY_ZEROFILL) + bzero(point, Size); return(point); } /* my_once_alloc */ diff --git a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am index 70c207a992f..0a3186829da 100644 --- a/plugin/fulltext/Makefile.am +++ b/plugin/fulltext/Makefile.am @@ -1,4 +1,4 @@ INCLUDES= -I$(top_builddir)/include -noinst_LTLIBRARIES= libmypluglib.la -libmypluglib_la_SOURCES= plugin_example.c -libmypluglib_la_LDFLAGS= -module +noinst_LTLIBRARIES= mypluglib.la +mypluglib_la_SOURCES= plugin_example.c +mypluglib_la_LDFLAGS= -module -rpath $(pkglibdir) diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index c6deb642edf..2529eaf1937 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -229,7 +229,7 @@ then c_t="$c_t User char(16) binary DEFAULT '' NOT NULL," c_t="$c_t Table_name char(64) binary DEFAULT '' NOT NULL," c_t="$c_t Grantor char(77) DEFAULT '' NOT NULL," - c_t="$c_t Timestamp timestamp(14)," + c_t="$c_t Timestamp timestamp," c_t="$c_t Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL," c_t="$c_t Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL," c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name)," @@ -251,7 +251,7 @@ then c_c="$c_c User char(16) binary DEFAULT '' NOT NULL," c_c="$c_c Table_name char(64) binary DEFAULT '' NOT NULL," c_c="$c_c Column_name char(64) binary DEFAULT '' NOT NULL," - c_c="$c_c Timestamp timestamp(14)," + c_c="$c_c Timestamp timestamp," c_c="$c_c Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL," c_c="$c_c PRIMARY KEY (Host,Db,User,Table_name,Column_name)" c_c="$c_c ) engine=MyISAM" @@ -273,7 +273,7 @@ then c_pp="$c_pp Routine_type enum('FUNCTION','PROCEDURE') NOT NULL," c_pp="$c_pp Grantor char(77) DEFAULT '' NOT NULL," c_pp="$c_pp Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL," - c_pp="$c_pp Timestamp timestamp(14)," + c_pp="$c_pp Timestamp timestamp," c_pp="$c_pp PRIMARY KEY (Host,Db,User,Routine_name,Routine_type)," c_pp="$c_pp KEY Grantor (Grantor)" c_pp="$c_pp ) engine=MyISAM" @@ -743,7 +743,7 @@ fi cat << END_OF_DATA use mysql; -set table_type=myisam; +set storage_engine=myisam; $c_d $i_d diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 483a3540e47..2c72c52a05b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6642,17 +6642,14 @@ static void refresh_status(void) { pthread_mutex_lock(&LOCK_status); for (struct show_var_st *ptr=status_vars; ptr->name; ptr++) - { - if (ptr->type == SHOW_LONG) + if (ptr->type == SHOW_LONG) // note that SHOW_LONG_NOFLUSH variables are not reset *(ulong*) ptr->value= 0; - else if (ptr->type == SHOW_LONG_STATUS) - { - THD *thd= current_thd; - /* We must update the global status before cleaning up the thread */ - add_to_status(&global_status_var, &thd->status_var); - bzero((char*) &thd->status_var, sizeof(thd->status_var)); - } - } + + /* We must update the global status before cleaning up the thread */ + THD *thd= current_thd; + add_to_status(&global_status_var, &thd->status_var); + bzero((char*) &thd->status_var, sizeof(thd->status_var)); + /* Reset the counters of all key caches (default and named). */ process_key_caches(reset_key_cache_counters); pthread_mutex_unlock(&LOCK_status); |