3593 Marc Alff 2011-02-04 [merge]
Local merge
modified:
config.h.cmake
configure.cmake
include/my_sys.h
include/my_time.h
mysql-test/include/gis_keys.inc
mysql-test/include/mtr_warnings.sql
mysql-test/include/order_by.inc
mysql-test/include/subquery_sj.inc
mysql-test/include/subquery_sj_innodb.inc
mysql-test/r/filesort_debug.result
mysql-test/r/func_in_all.result
mysql-test/r/func_time.result
mysql-test/r/gis.result
mysql-test/r/innodb_icp_all.result
mysql-test/r/myisam_icp_all.result
mysql-test/r/not_embedded_server.result
mysql-test/r/optimizer_switch.result
mysql-test/r/order_by_all.result
mysql-test/r/order_by_icp_mrr.result
mysql-test/r/order_by_none.result
mysql-test/r/subquery_all.result
mysql-test/r/subquery_all_jcl6.result
mysql-test/r/subquery_nomat_nosj_jcl6.result
mysql-test/r/subquery_none_jcl6.result
mysql-test/r/subquery_sj_all.result
mysql-test/r/subquery_sj_all_jcl6.result
mysql-test/r/subquery_sj_all_jcl7.result
mysql-test/r/subquery_sj_dupsweed.result
mysql-test/r/subquery_sj_dupsweed_jcl6.result
mysql-test/r/subquery_sj_dupsweed_jcl7.result
mysql-test/r/subquery_sj_firstmatch.result
mysql-test/r/subquery_sj_firstmatch_jcl6.result
mysql-test/r/subquery_sj_firstmatch_jcl7.result
mysql-test/r/subquery_sj_innodb_all.result
mysql-test/r/subquery_sj_innodb_all_jcl6.result
mysql-test/r/subquery_sj_innodb_all_jcl7.result
mysql-test/r/subquery_sj_innodb_none.result
mysql-test/r/subquery_sj_innodb_none_jcl6.result
mysql-test/r/subquery_sj_innodb_none_jcl7.result
mysql-test/r/subquery_sj_loosescan.result
mysql-test/r/subquery_sj_loosescan_jcl6.result
mysql-test/r/subquery_sj_loosescan_jcl7.result
mysql-test/r/subquery_sj_mat.result
mysql-test/r/subquery_sj_mat_jcl6.result
mysql-test/r/subquery_sj_mat_jcl7.result
mysql-test/r/subquery_sj_mat_nosj.result
mysql-test/r/subquery_sj_none.result
mysql-test/r/subquery_sj_none_jcl6.result
mysql-test/r/subquery_sj_none_jcl7.result
mysql-test/suite/innodb/r/innodb_gis.result
mysql-test/t/filesort_debug.test
mysql-test/t/func_time.test
mysql-test/t/not_embedded_server.test
mysql-test/t/optimizer_switch.test
mysql-test/t/variables.test
regex/my_regex.h
regex/regcomp.c
regex/reginit.c
sql-common/my_time.c
sql/field.cc
sql/filesort.cc
sql/gcalc_slicescan.cc
sql/gcalc_slicescan.h
sql/item.cc
sql/item.h
sql/item_subselect.h
sql/mysqld.cc
sql/protocol.cc
sql/rpl_slave.cc
sql/share/errmsg-utf8.txt
sql/sql_class.cc
sql/sql_class.h
sql/sql_lex.cc
sql/sql_select.cc
sql/sql_yacc.yy
sql/sys_vars.cc
sql/unireg.h
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc 2011-01-21 10:50:31 +0000
+++ b/sql/handler.cc 2011-02-04 11:55:17 +0000
@@ -705,7 +705,7 @@ void ha_close_connection(THD* thd)
end. Such nested transaction was internally referred to as
a "statement transaction" and gave birth to the term.
- <Historical note ends>
+ (Historical note ends)
Since then a statement transaction is started for each statement
that accesses transactional tables or uses the binary log. If
=== modified file 'sql/rpl_info_handler.h'
--- a/sql/rpl_info_handler.h 2010-10-25 10:39:01 +0000
+++ b/sql/rpl_info_handler.h 2011-02-04 11:55:17 +0000
@@ -55,13 +55,13 @@ public:
/**
Flushes and syncs in-memory information into a stable storage (i.e.
repository). Usually, syncing after flushing depends on other options
- such as @code relay-log-info-sync, master-info-sync. These options
+ such as @c relay-log-info-sync, @c master-info-sync. These options
dictate after how many events or transactions the information
should be synced. We can ignore them and always sync by setting the
- parameter @code force, which is by default false, to @code true.
+ parameter @c force, which is by default @c false, to @c true.
So if the number of events is below a threshold, the parameter
- @code force is FALSE and we are using a file system as a storage
+ @c force is FALSE and we are using a file system as a storage
system, it may happen that the changes will only end up in the
operating system's cache and a crash may lead to inconsistencies.
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2011-02-02 13:23:58 +0000
+++ b/sql/sql_select.cc 2011-02-04 12:21:31 +0000
@@ -9236,7 +9236,7 @@ inline void add_cond_and_fix(Item **e1,
@code
SELECT A.f2 FROM t1 LEFT JOIN t2 A ON A.f2 = f1
WHERE A.f3=(SELECT MIN(f3) FROM t2 C WHERE A.f4 = C.f4) OR A.f3 IS NULL;
- @endocde
+ @endcode
Here condition A.f3 IS NOT NULL is going to be added to the WHERE
condition of the embedding query.
Another example:
=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc 2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs.cc 2011-02-04 11:55:17 +0000
@@ -899,19 +899,30 @@ static inline int mysql_mutex_lock(...)
@ingroup Performance_schema_implementation
*/
+/** TIMED bit in the state flags bitfield. */
#define STATE_FLAG_TIMED (1<<0)
+/** THREAD bit in the state flags bitfield. */
#define STATE_FLAG_THREAD (1<<1)
+/** EVENT bit in the state flags bitfield. */
#define STATE_FLAG_WAIT (1<<2)
pthread_key(PFS_thread*, THR_PFS);
bool THR_PFS_initialized= false;
+/**
+ Conversion map from PSI_mutex_operation to enum_operation_type.
+ Indexed by enum PSI_mutex_operation.
+*/
static enum_operation_type mutex_operation_map[]=
{
OPERATION_TYPE_LOCK,
OPERATION_TYPE_TRYLOCK
};
+/**
+ Conversion map from PSI_rwlock_operation to enum_operation_type.
+ Indexed by enum PSI_rwlock_operation.
+*/
static enum_operation_type rwlock_operation_map[]=
{
OPERATION_TYPE_READLOCK,
@@ -920,6 +931,10 @@ static enum_operation_type rwlock_operat
OPERATION_TYPE_TRYWRITELOCK
};
+/**
+ Conversion map from PSI_cond_operation to enum_operation_type.
+ Indexed by enum PSI_cond_operation.
+*/
static enum_operation_type cond_operation_map[]=
{
OPERATION_TYPE_WAIT,
@@ -1072,6 +1087,10 @@ static int build_prefix(const LEX_STRING
C_MODE_START
+/**
+ Implementation of the mutex instrumentation interface.
+ @sa PSI_v1::register_mutex.
+*/
static void register_mutex_v1(const char *category,
PSI_mutex_info_v1 *info,
int count)
@@ -1081,6 +1100,10 @@ static void register_mutex_v1(const char
register_mutex_class)
}
+/**
+ Implementation of the rwlock instrumentation interface.
+ @sa PSI_v1::register_rwlock.
+*/
static void register_rwlock_v1(const char *category,
PSI_rwlock_info_v1 *info,
int count)
@@ -1090,6 +1113,10 @@ static void register_rwlock_v1(const cha
register_rwlock_class)
}
+/**
+ Implementation of the cond instrumentation interface.
+ @sa PSI_v1::register_cond.
+*/
static void register_cond_v1(const char *category,
PSI_cond_info_v1 *info,
int count)
@@ -1099,6 +1126,10 @@ static void register_cond_v1(const char
register_cond_class)
}
+/**
+ Implementation of the thread instrumentation interface.
+ @sa PSI_v1::register_thread.
+*/
static void register_thread_v1(const char *category,
PSI_thread_info_v1 *info,
int count)
@@ -1108,6 +1139,10 @@ static void register_thread_v1(const cha
register_thread_class)
}
+/**
+ Implementation of the file instrumentation interface.
+ @sa PSI_v1::register_file.
+*/
static void register_file_v1(const char *category,
PSI_file_info_v1 *info,
int count)
@@ -1304,6 +1339,11 @@ static void create_file_v1(PSI_file_key
file_handle_array[index]= pfs_file;
}
+/**
+ Arguments given from a parent to a child thread, packaged in one structure.
+ This data is used when spawning a new instrumented thread.
+ @sa pfs_spawn_thread.
+*/
struct PFS_spawn_thread_arg
{
PFS_thread *m_parent_thread;
@@ -1619,12 +1659,20 @@ static void set_thread_info_v1(const cha
}
}
+/**
+ Implementation of the thread instrumentation interface.
+ @sa PSI_v1::set_thread.
+*/
static void set_thread_v1(PSI_thread* thread)
{
PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
my_pthread_setspecific_ptr(THR_PFS, pfs);
}
+/**
+ Implementation of the thread instrumentation interface.
+ @sa PSI_v1::delete_current_thread.
+*/
static void delete_current_thread_v1(void)
{
PFS_thread *thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
@@ -1636,6 +1684,10 @@ static void delete_current_thread_v1(voi
}
}
+/**
+ Implementation of the thread instrumentation interface.
+ @sa PSI_v1::delete_thread.
+*/
static void delete_thread_v1(PSI_thread *thread)
{
PFS_thread *pfs= reinterpret_cast<PFS_thread*> (thread);
@@ -2471,6 +2523,10 @@ get_thread_file_descriptor_locker_v1(PSI
return reinterpret_cast<PSI_file_locker*> (state);
}
+/**
+ Implementation of the mutex instrumentation interface.
+ @sa PSI_v1::unlock_mutex.
+*/
static void unlock_mutex_v1(PSI_mutex *mutex)
{
PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
@@ -2510,6 +2566,10 @@ static void unlock_mutex_v1(PSI_mutex *m
#endif
}
+/**
+ Implementation of the rwlock instrumentation interface.
+ @sa PSI_v1::unlock_rwlock.
+*/
static void unlock_rwlock_v1(PSI_rwlock *rwlock)
{
PFS_rwlock *pfs_rwlock= reinterpret_cast<PFS_rwlock*> (rwlock);
@@ -2586,6 +2646,10 @@ static void unlock_rwlock_v1(PSI_rwlock
#endif
}
+/**
+ Implementation of the cond instrumentation interface.
+ @sa PSI_v1::signal_cond.
+*/
static void signal_cond_v1(PSI_cond* cond)
{
PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
@@ -2594,6 +2658,10 @@ static void signal_cond_v1(PSI_cond* con
pfs_cond->m_cond_stat.m_signal_count++;
}
+/**
+ Implementation of the cond instrumentation interface.
+ @sa PSI_v1::broadcast_cond.
+*/
static void broadcast_cond_v1(PSI_cond* cond)
{
PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc 2011-01-03 13:39:18 +0000
+++ b/storage/perfschema/pfs_engine_table.cc 2011-02-04 11:55:17 +0000
@@ -100,6 +100,7 @@ void PFS_engine_table_share::check_all_t
(*current)->check_one_table(thd);
}
+/** Error reporting for schema integrity checks. */
class PFS_check_intact : public Table_check_intact
{
protected:
@@ -465,6 +466,7 @@ int PFS_engine_table::update_row_values(
return HA_ERR_WRONG_COMMAND;
}
+/** Implementation of internal ACL checks, for the performance schema. */
class PFS_internal_schema_access : public ACL_internal_schema_access
{
public:
=== modified file 'storage/perfschema/pfs_engine_table.h'
--- a/storage/perfschema/pfs_engine_table.h 2010-07-30 09:02:32 +0000
+++ b/storage/perfschema/pfs_engine_table.h 2011-02-04 11:55:17 +0000
@@ -140,7 +140,9 @@ struct PFS_engine_table_share
void check_one_table(THD *thd);
static void init_all_locks(void);
static void delete_all_locks(void);
+ /** Get the row count. */
ha_rows get_row_count(void) const;
+ /** Write a row. */
int write_row(TABLE *table, unsigned char *buf, Field **fields) const;
/** Table name. */
@@ -172,6 +174,10 @@ struct PFS_engine_table_share
bool m_checked;
};
+/**
+ Privileges for read only tables.
+ The only operation allowed is SELECT.
+*/
class PFS_readonly_acl : public ACL_internal_table_access
{
public:
@@ -184,8 +190,13 @@ public:
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
};
+/** Singleton instance of PFS_readonly_acl. */
extern PFS_readonly_acl pfs_readonly_acl;
+/**
+ Privileges for truncatable tables.
+ Operations allowed are SELECT and TRUNCATE.
+*/
class PFS_truncatable_acl : public ACL_internal_table_access
{
public:
@@ -198,8 +209,13 @@ public:
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
};
+/** Singleton instance of PFS_truncatable_acl. */
extern PFS_truncatable_acl pfs_truncatable_acl;
+/**
+ Privileges for updatable tables.
+ Operations allowed are SELECT and UPDATE.
+*/
class PFS_updatable_acl : public ACL_internal_table_access
{
public:
@@ -212,8 +228,13 @@ public:
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
};
+/** Singleton instance of PFS_updatable_acl. */
extern PFS_updatable_acl pfs_updatable_acl;
+/**
+ Privileges for editable tables.
+ Operations allowed are SELECT, INSERT, UPDATE, DELETE and TRUNCATE.
+*/
class PFS_editable_acl : public ACL_internal_table_access
{
public:
@@ -226,8 +247,12 @@ public:
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
};
+/** Singleton instance of PFS_editable_acl. */
extern PFS_editable_acl pfs_editable_acl;
+/**
+ Privileges for unknown tables.
+*/
class PFS_unknown_acl : public ACL_internal_table_access
{
public:
@@ -240,6 +265,7 @@ public:
ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
};
+/** Singleton instance of PFS_unknown_acl. */
extern PFS_unknown_acl pfs_unknown_acl;
/** Position of a cursor, for simple iterations. */
@@ -262,6 +288,7 @@ struct PFS_simple_index
{ m_index++; }
};
+/** Position of a double cursor, for iterations using 2 nested loops. */
struct PFS_double_index
{
/** Outer index. */
@@ -286,6 +313,7 @@ struct PFS_double_index
}
};
+/** Position of a triple cursor, for iterations using 3 nested loops. */
struct PFS_triple_index
{
/** Outer index. */
=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h 2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs_instr.h 2011-02-04 11:55:17 +0000
@@ -42,6 +42,7 @@ struct PFS_thread_class;
struct PFS_thread;
+/** Base structure for wait instruments. */
struct PFS_instr
{
/** Internal lock. */
=== modified file 'storage/perfschema/pfs_instr_class.cc'
--- a/storage/perfschema/pfs_instr_class.cc 2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs_instr_class.cc 2011-02-04 11:55:17 +0000
@@ -335,7 +335,7 @@ void cleanup_table_share_hash(void)
}
/**
- Get the hash pins for @table_share_hash.
+ Get the hash pins for @sa table_share_hash.
@param thread The running thread.
@returns The LF_HASH pins for the thread.
*/
@@ -1004,7 +1004,7 @@ void purge_table_share(PFS_thread *threa
@param schema_name The table schema name
@param schema_name_length The table schema name length
@param table_name The table name
- @parem table_name_length The table name length
+ @param table_name_length The table name length
*/
void drop_table_share(PFS_thread *thread,
bool temporary,
=== modified file 'storage/perfschema/pfs_setup_actor.h'
--- a/storage/perfschema/pfs_setup_actor.h 2010-07-10 03:31:35 +0000
+++ b/storage/perfschema/pfs_setup_actor.h 2011-02-04 11:55:17 +0000
@@ -35,6 +35,7 @@ struct PFS_global_param;
@{
*/
+/** Hash key for @sa PFS_setup_actor. */
struct PFS_setup_actor_key
{
/**
@@ -47,6 +48,7 @@ struct PFS_setup_actor_key
uint m_key_length;
};
+/** A setup_actor record. */
struct PFS_setup_actor
{
/** Internal lock. */
=== modified file 'storage/perfschema/pfs_setup_object.h'
--- a/storage/perfschema/pfs_setup_object.h 2010-09-23 16:08:54 +0000
+++ b/storage/perfschema/pfs_setup_object.h 2011-02-04 11:55:17 +0000
@@ -32,6 +32,7 @@ struct PFS_global_param;
@{
*/
+/** Hash key for @sa PFS_setup_object. */
struct PFS_setup_object_key
{
/**
@@ -43,6 +44,7 @@ struct PFS_setup_object_key
uint m_key_length;
};
+/** A setup_object record. */
struct PFS_setup_object
{
enum_object_type get_object_type()
=== modified file 'storage/perfschema/pfs_stat.h'
--- a/storage/perfschema/pfs_stat.h 2010-12-09 16:17:13 +0000
+++ b/storage/perfschema/pfs_stat.h 2011-02-04 11:55:17 +0000
@@ -199,6 +199,7 @@ enum PFS_TL_LOCK_TYPE
#define COUNT_PFS_TL_LOCK_TYPE 11
+/** Statistics for table locks. */
struct PFS_table_lock_stat
{
PFS_single_stat m_stat[COUNT_PFS_TL_LOCK_TYPE];
=== modified file 'storage/perfschema/pfs_timer.h'
--- a/storage/perfschema/pfs_timer.h 2010-09-23 16:08:54 +0000
+++ b/storage/perfschema/pfs_timer.h 2011-02-04 11:55:17 +0000
@@ -23,6 +23,12 @@
#include <my_rdtsc.h>
#include "pfs_column_types.h"
+/**
+ A time normalizer.
+ A time normalizer consist of a transformation that
+ converts raw timer values (expressed in the timer unit)
+ to normalized values, expressed in picoseconds.
+*/
struct time_normalizer
{
static time_normalizer* get(enum_timer_name timer_name);
=== modified file 'storage/perfschema/table_helper.h'
--- a/storage/perfschema/table_helper.h 2011-01-07 16:20:19 +0000
+++ b/storage/perfschema/table_helper.h 2011-02-04 11:55:17 +0000
@@ -32,6 +32,7 @@
@{
*/
+/** Namespace, internal views used within table setup_instruments. */
struct PFS_instrument_view_constants
{
static const uint FIRST_VIEW= 1;
@@ -43,6 +44,7 @@ struct PFS_instrument_view_constants
static const uint LAST_VIEW= 5;
};
+/** Namespace, internal views used within object summaries. */
struct PFS_object_view_constants
{
static const uint FIRST_VIEW= 1;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (marc.alff:3593) | Marc Alff | 4 Feb |