summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-04-29 16:07:58 +0300
committerunknown <monty@donna.mysql.fi>2001-04-29 16:07:58 +0300
commit64dcaea40578386ee7a1a8837114b597ee4257cd (patch)
tree2b4e6d2a33bc77c646ddd851a28ad50472df039d /sql
parentd067af6a168860548f31175966bfc830028dd5f6 (diff)
parenteaa2350748beea0aa28bef227e62f4f00377247c (diff)
downloadmariadb-git-64dcaea40578386ee7a1a8837114b597ee4257cd.tar.gz
Merge work:/home/bk/mysql into donna.mysql.fi:/home/my/bk/mysql
sql/log_event.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc2
-rw-r--r--sql/mysqld.cc34
-rw-r--r--sql/sql_select.cc3
3 files changed, 28 insertions, 11 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 17499db4684..ac985c266c8 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -694,7 +694,7 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
}
if((int)skip_lines > 0)
- fprintf(file, " IGNORE %d LINES ", skip_lines);
+ fprintf(file, " IGNORE %ld LINES ", (long) skip_lines);
if (num_fields)
{
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 931a21c9191..3d42f59ff93 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -92,6 +92,11 @@ int deny_severity = LOG_WARNING;
typedef fp_except fp_except_t;
#endif
+#ifdef _AIX41
+extern "C" int initgroups(const char *,int);
+#endif
+
+
/* We can't handle floating point expections with threads, so disable
this on freebsd
*/
@@ -144,7 +149,7 @@ static pthread_cond_t COND_handler_count;
static uint handler_count;
#endif
#ifdef __WIN__
-static bool opt_console=0;
+static bool opt_console=0,start_mode=0;
#endif
#ifdef HAVE_BERKELEY_DB
@@ -1945,12 +1950,24 @@ The server will not act as a slave.");
sql_print_error("After lock_thread_count");
#endif
#else
- // remove the event, because it will not be valid anymore
- Service.SetShutdownEvent(0);
- if(hEventShutdown) CloseHandle(hEventShutdown);
- // if it was started as service on NT try to stop the service
- if(Service.IsNT())
- Service.Stop();
+ if (Service.IsNT())
+ {
+ if(start_mode)
+ {
+ if (WaitForSingleObject(hEventShutdown,INFINITE)==WAIT_OBJECT_0)
+ Service.Stop();
+ }
+ else
+ {
+ Service.SetShutdownEvent(0);
+ if(hEventShutdown) CloseHandle(hEventShutdown);
+ }
+ }
+ else
+ {
+ Service.SetShutdownEvent(0);
+ if(hEventShutdown) CloseHandle(hEventShutdown);
+ }
#endif
/* Wait until cleanup is done */
@@ -2003,6 +2020,7 @@ int main(int argc, char **argv)
else if (argc == 1) // No arguments; start as a service
{
// init service
+ start_mode = 1;
long tmp=Service.Init(MYSQL_SERVICENAME,mysql_service);
return 0;
}
@@ -2477,7 +2495,7 @@ enum options {
OPT_GEMINI_SKIP, OPT_INNODB_SKIP,
OPT_TEMP_POOL, OPT_TX_ISOLATION,
OPT_GEMINI_FLUSH_LOG, OPT_GEMINI_RECOVER,
- OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC,
+ OPT_GEMINI_UNBUFFERED_IO, OPT_SKIP_SAFEMALLOC
};
static struct option long_options[] = {
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index be1444c52e4..aad84cfd1b9 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -210,7 +210,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
{
if (item->with_sum_func)
flag|=1;
- else if (!item->const_item())
+ else if (!(flag & 2) && !item->const_item())
flag|=2;
}
if (flag == 3)
@@ -871,7 +871,6 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds,
s->join=join;
if ((s->on_expr=tables->on_expr))
{
- // table->maybe_null=table->outer_join=1; // Mark for send fields
if (!table->file->records)
{ // Empty table
s->key_dependent=s->dependent=0;