summaryrefslogtreecommitdiff
path: root/sql/sql_base.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-03-19 01:35:32 -0700
committerIgor Babaev <igor@askmonty.org>2012-03-19 01:35:32 -0700
commitff3d16fba898efa68677f3b0049668a341f27a06 (patch)
treef56fddecdc49cf5ccd55680c14dc5b27371b2f03 /sql/sql_base.h
parent51c77ec5d406843bb8c8131f0687f4f75839d045 (diff)
parent7b845f551b8f206c886366499e21b790991f5418 (diff)
downloadmariadb-git-ff3d16fba898efa68677f3b0049668a341f27a06.tar.gz
Merge maria-5.3-mwl248 -> 5.5 = maria-5.5-mwl248.
Diffstat (limited to 'sql/sql_base.h')
-rw-r--r--sql/sql_base.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/sql_base.h b/sql/sql_base.h
index e602aba98a9..5b88d53d231 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -275,6 +275,9 @@ bool is_equal(const LEX_STRING *a, const LEX_STRING *b);
/* Functions to work with system tables. */
bool open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
Open_tables_backup *backup);
+bool unlock_tables_n_open_system_tables_for_write(THD *thd,
+ TABLE_LIST *table_list,
+ Open_tables_backup *backup);
void close_system_tables(THD *thd, Open_tables_backup *backup);
void close_mysql_tables(THD *thd);
TABLE *open_system_table_for_update(THD *thd, TABLE_LIST *one_table);
@@ -306,6 +309,18 @@ bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists);
int update_virtual_fields(THD *thd, TABLE *table, bool ignore_stored= FALSE);
int dynamic_column_error_message(enum_dyncol_func_result rc);
+/* open_and_lock_tables with optional derived handling */
+int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived);
+
+int read_statistics_for_table(THD *thd, TABLE *table);
+int collect_statistics_for_table(THD *thd, TABLE *table);
+int update_statistics_for_table(THD *thd, TABLE *table);
+
+extern "C" int simple_raw_key_cmp(void* arg, const void* key1,
+ const void* key2);
+extern "C" int count_distinct_walk(void *elem, element_count count, void *arg);
+int simple_str_key_cmp(void* arg, uchar* key1, uchar* key2);
+
extern TABLE *unused_tables;
extern Item **not_found_item;
extern Field *not_found_field;
@@ -472,7 +487,6 @@ open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags)
return open_tables(thd, tables, counter, flags, &prelocking_strategy);
}
-
inline TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
thr_lock_type lock_type, uint flags)
{