summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2007-12-28 00:15:29 +0100
committerunknown <serg@janus.mylan>2007-12-28 00:15:29 +0100
commit4140f76f4e50a0497c8d325fef7e255bb5cf4e68 (patch)
treead7653284333477b8b2d0bcb4d2582cbbcb0e47e
parent7fdbc4230e68171e17e0dd4f6ae2d3fe3acb7549 (diff)
downloadmariadb-git-4140f76f4e50a0497c8d325fef7e255bb5cf4e68.tar.gz
after merge
include/mysql/plugin.h: move declarations after merge mysql-test/r/change_user.result: more tests mysql-test/t/change_user.test: more tests mysys/my_getopt.c: remove wrong code BitKeeper/etc/ignore: Added libmysqld/sql_profile.cc to the ignore list
-rw-r--r--.bzrignore1
-rw-r--r--include/mysql/plugin.h5
-rw-r--r--mysql-test/r/change_user.result6
-rw-r--r--mysql-test/t/change_user.test2
-rw-r--r--mysys/my_getopt.c2
-rw-r--r--sql/lex.h3
-rw-r--r--sql/mysql_priv.h2
-rw-r--r--sql/set_var.cc10
-rw-r--r--storage/maria/ha_maria.cc30
9 files changed, 28 insertions, 33 deletions
diff --git a/.bzrignore b/.bzrignore
index fcafdf8915a..872ea62058e 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -3066,3 +3066,4 @@ win/vs8cache.txt
ylwrap
zlib/*.ds?
zlib/*.vcproj
+libmysqld/sql_profile.cc
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 50ec051d111..41f675ae318 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -676,7 +676,6 @@ int thd_in_lock_tables(const MYSQL_THD thd);
int thd_tablespace_op(const MYSQL_THD thd);
long long thd_test_options(const MYSQL_THD thd, long long test_options);
int thd_sql_command(const MYSQL_THD thd);
-const char *thd_proc_info(MYSQL_THD thd, const char *info);
void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
int thd_tx_isolation(const MYSQL_THD thd);
char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
@@ -684,6 +683,10 @@ char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
/* Increments the row counter, see THD::row_count */
void thd_inc_row_count(MYSQL_THD thd);
+#define thd_proc_info(thd, msg) set_thd_proc_info(thd, msg, __func__, __FILE__, __LINE__)
+const char *set_thd_proc_info(MYSQL_THD, const char * info, const char *func,
+ const char *file, const unsigned int line);
+
/**
Create a temporary file.
diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result
index 28b55dfd5e5..12e86a08f8d 100644
--- a/mysql-test/r/change_user.result
+++ b/mysql-test/r/change_user.result
@@ -24,6 +24,12 @@ change_user
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
+SELECT @@global.max_join_size;
+@@global.max_join_size
+18446744073709551615
+SELECT @@session.max_join_size;
+@@session.max_join_size
+18446744073709551615
Bug#31418
SELECT IS_FREE_LOCK('bug31418');
IS_FREE_LOCK('bug31418')
diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test
index d0cdfc8a741..aac0b3d018c 100644
--- a/mysql-test/t/change_user.test
+++ b/mysql-test/t/change_user.test
@@ -19,6 +19,8 @@ SET @@session.max_join_size = default;
--echo change_user
--change_user
SELECT @@session.sql_big_selects;
+SELECT @@global.max_join_size;
+SELECT @@session.max_join_size;
#
# Bug#31418 User locks misfunctioning after mysql_change_user()
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 63ef57300fa..61716eae2c6 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -892,8 +892,6 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
num= ((ulonglong) ULONG_MAX);
adjusted= TRUE;
}
-#else
- num= min(num, LONG_MAX);
#endif
break;
default:
diff --git a/sql/lex.h b/sql/lex.h
index d97f0718913..c2ee1c020b3 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -387,9 +387,8 @@ static SYMBOL symbols[] = {
{ "PACK_KEYS", SYM(PACK_KEYS_SYM)},
{ "PARSER", SYM(PARSER_SYM)},
{ "PAGE", SYM(PAGE_SYM)},
- { "PAGE_CHECKSUM", SYM(PAGE_CHECKSUM_SYM)},
+ { "PAGE_CHECKSUM", SYM(PAGE_CHECKSUM_SYM)},
{ "PARTIAL", SYM(PARTIAL)},
- { "PAGE", SYM(PAGE_SYM)},
{ "PARTITION", SYM(PARTITION_SYM)},
{ "PARTITIONING", SYM(PARTITIONING_SYM)},
{ "PARTITIONS", SYM(PARTITIONS_SYM)},
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index b1880e4be70..0a4ea977e1c 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -586,7 +586,6 @@ enum enum_parsing_place
struct st_table;
-#define thd_proc_info(thd, msg) set_thd_proc_info(thd, msg, __func__, __FILE__, __LINE__)
class THD;
enum enum_check_fields
@@ -596,7 +595,6 @@ enum enum_check_fields
CHECK_FIELD_ERROR_FOR_NULL
};
-
/** Struct to handle simple linked lists. */
typedef struct st_sql_list {
uint elements;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 905b02cec7a..144abbb9a2d 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -1247,14 +1247,6 @@ uchar *sys_var_enum::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base)
return (uchar*) enum_names->type_names[*value];
}
-
-uchar *sys_var_enum_const::value_ptr(THD *thd, enum_var_type type,
- LEX_STRING *base)
-{
- return (uchar*) enum_names->type_names[global_system_variables.*offset];
-}
-
-
uchar *sys_var_enum_const::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base)
{
@@ -1334,7 +1326,7 @@ bool sys_var_thd_ha_rows::update(THD *thd, set_var *var)
if (var->type == OPT_GLOBAL)
{
/* Lock is needed to make things safe on 32 bit systems */
- pthread_mutex_lock(&LOCK_global_system_variables);
+ pthread_mutex_lock(&LOCK_global_system_variables);
global_system_variables.*offset= (ha_rows) tmp;
pthread_mutex_unlock(&LOCK_global_system_variables);
}
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index cd13f19d646..1dda145e030 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -900,9 +900,8 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
int error;
HA_CHECK param;
MARIA_SHARE *share= file->s;
- const char *old_proc_info= thd->proc_info;
+ const char *old_proc_info= thd_proc_info(thd, "Checking table");
- thd->proc_info= "Checking table";
maria_chk_init(&param);
param.thd= thd;
param.op_name= "check";
@@ -975,7 +974,7 @@ int ha_maria::check(THD * thd, HA_CHECK_OPT * check_opt)
file->update |= HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
}
- thd->proc_info= old_proc_info;
+ thd_proc_info(thd, old_proc_info);
return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK;
}
@@ -1275,16 +1274,16 @@ int ha_maria::repair(THD *thd, HA_CHECK &param, bool do_optimize)
char buf[40];
/* TODO: respect maria_repair_threads variable */
my_snprintf(buf, 40, "Repair with %d threads", my_count_bits(key_map));
- thd->proc_info= buf;
+ thd_proc_info(thd, buf);
param.testflag|= T_REP_PARALLEL;
error= maria_repair_parallel(&param, file, fixed_name,
param.testflag & T_QUICK);
- thd->proc_info= "Repair done"; // to reset proc_info, as
- // it was pointing to local buffer
+ /* to reset proc_info, as it was pointing to local buffer */
+ thd_proc_info(thd, "Repair done");
}
else
{
- thd->proc_info= "Repair by sorting";
+ thd_proc_info(thd, "Repair by sorting");
param.testflag|= T_REP_BY_SORT;
error= maria_repair_by_sort(&param, file, fixed_name,
param.testflag & T_QUICK);
@@ -1292,7 +1291,7 @@ int ha_maria::repair(THD *thd, HA_CHECK &param, bool do_optimize)
}
else
{
- thd->proc_info= "Repair with keycache";
+ thd_proc_info(thd, "Repair with keycache");
param.testflag &= ~(T_REP_BY_SORT | T_REP_PARALLEL);
error= maria_repair(&param, file, fixed_name, param.testflag & T_QUICK);
/**
@@ -1310,7 +1309,7 @@ int ha_maria::repair(THD *thd, HA_CHECK &param, bool do_optimize)
(share->state.changed & STATE_NOT_SORTED_PAGES))
{
optimize_done= 1;
- thd->proc_info= "Sorting index";
+ thd_proc_info(thd, "Sorting index");
error= maria_sort_index(&param, file, fixed_name);
}
if (!statistics_done && (local_testflag & T_STATISTICS))
@@ -1318,14 +1317,14 @@ int ha_maria::repair(THD *thd, HA_CHECK &param, bool do_optimize)
if (share->state.changed & STATE_NOT_ANALYZED)
{
optimize_done= 1;
- thd->proc_info= "Analyzing";
+ thd_proc_info(thd, "Analyzing");
error= maria_chk_key(&param, file);
}
else
local_testflag &= ~T_STATISTICS; // Don't update statistics
}
}
- thd->proc_info= "Saving state";
+ thd_proc_info(thd, "Saving state");
pthread_mutex_lock(&share->intern_lock);
if (!error)
{
@@ -1365,7 +1364,7 @@ int ha_maria::repair(THD *thd, HA_CHECK &param, bool do_optimize)
maria_update_state_info(&param, file, 0);
}
pthread_mutex_unlock(&share->intern_lock);
- thd->proc_info= old_proc_info;
+ thd_proc_info(thd, old_proc_info);
if (!thd->locked_tables)
{
/**
@@ -1592,8 +1591,7 @@ int ha_maria::enable_indexes(uint mode)
{
THD *thd= current_thd;
HA_CHECK param;
- const char *save_proc_info= thd->proc_info;
- thd->proc_info= "Creating index";
+ const char *save_proc_info= thd_proc_info(thd, "Creating index");
maria_chk_init(&param);
param.op_name= "recreating_index";
param.testflag= (T_SILENT | T_REP_BY_SORT | T_QUICK |
@@ -1614,13 +1612,11 @@ int ha_maria::enable_indexes(uint mode)
might have been set by the first repair. They can still be seen
with SHOW WARNINGS then.
*/
-#ifndef EMBEDDED_LIBRARY
if (!error)
thd->clear_error();
-#endif /* EMBEDDED_LIBRARY */
}
info(HA_STATUS_CONST);
- thd->proc_info= save_proc_info;
+ thd_proc_info(thd, save_proc_info);
}
else
{