Commit 7d4ea5cf authored by unknown's avatar unknown
Browse files

Merge


extra/perror.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Merge change in warning message
sql/sql_parse.cc:
  Hand-merge
parents c0cb1faa 87762300
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -245,16 +245,17 @@ int main(int argc,char *argv[])
	msg = strerror(code);

      /*
        Don't print message for not existing error messages or for
        unknown errors.  We test for 'Uknown Errors' just as an
        extra safety for Netware
        We don't print the OS error message if it is the same as the
        unknown_error message we retrieved above, or it starts with
        'Unknown Error' (without regard to case).
      */
      if (msg && strcmp(msg, "Unknown Error") &&
      if (msg &&
          my_strnncoll(&my_charset_latin1, msg, 13, "Unknown Error", 13) &&
          (!unknown_error || strcmp(msg, unknown_error)))
      {
	found=1;
	if (verbose)
	  printf("Error code %3d:  %s\n",code,msg);
	  printf("OS error code %3d:  %s\n",code,msg);
	else
	  puts(msg);
      }
@@ -269,7 +270,7 @@ int main(int argc,char *argv[])
      else
      {
	if (verbose)
	  printf("MySQL error:  %3d = %s\n",code,msg);
	  printf("MySQL error code %3d: %s\n",code,msg);
	else
	  puts(msg);
      }
+17 −0
Original line number Diff line number Diff line
@@ -31,3 +31,20 @@ select 5'abcd'
select 'finish';
finish
finish
flush status;
create table t1 (i int);
insert into t1 values (1);
select * from t1 where i = 1;
insert into t1 values (2),(3),(4);
select * from t1 where i = 2;
select * from t1 where i = 3||||
i
1
i
2
i
3
show status like 'Slow_queries'||||
Variable_name	Value
Slow_queries	2
drop table t1||||
+2 −0
Original line number Diff line number Diff line
--log-slow-queries=slow.log
--log-queries-not-using-indexes
+15 −0
Original line number Diff line number Diff line
@@ -14,3 +14,18 @@ select "abcd'";'abcd'select "'abcd";'abcd'
select 5'abcd'
delimiter ;'abcd'
select 'finish';

# Bug #8475: Make sure every statement that is a slow query in
# a multi-statement query gets logged as a slow query.
flush status;
delimiter ||||;
create table t1 (i int);
insert into t1 values (1);
select * from t1 where i = 1;
insert into t1 values (2),(3),(4);
select * from t1 where i = 2;
select * from t1 where i = 3||||
show status like 'Slow_queries'||||
drop table t1||||

delimiter ;||||
+23 −2
Original line number Diff line number Diff line
@@ -316,12 +316,14 @@ my_bool opt_old_style_user_limits= 0;
volatile bool mqh_used = 0;
my_bool sp_automatic_privileges= 1;

#ifdef HAVE_INITGROUPS
static bool calling_initgroups= FALSE; /* Used in SIGSEGV handler. */
#endif
uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options;
uint delay_key_write_options, protocol_version;
uint lower_case_table_names;
uint tc_heuristic_recover= 0;
uint volatile thread_count, thread_running, kill_cached_threads, wake_thread;

ulong back_log, connect_timeout, concurrency;
ulong server_id, thd_startup_options;
ulong table_cache_size, thread_stack, thread_stack_min, what_to_log;
@@ -1166,7 +1168,15 @@ static void set_user(const char *user, struct passwd *user_info)
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__)
  DBUG_ASSERT(user_info);
#ifdef HAVE_INITGROUPS
  /*
    We can get a SIGSEGV when calling initgroups() on some systems when NSS
    is configured to use LDAP and the server is statically linked.  We set
    calling_initgroups as a flag to the SIGSEGV handler that is then used to
    output a specific message to help the user resolve this problem.
  */
  calling_initgroups= TRUE;
  initgroups((char*) user, user_info->pw_gid);
  calling_initgroups= FALSE;
#endif
  if (setgid(user_info->pw_gid) == -1)
  {
@@ -1921,6 +1931,17 @@ information that should help you find out what is causing the crash.\n");
  fflush(stderr);
#endif /* HAVE_STACKTRACE */

#ifdef HAVE_INITGROUPS
  if (calling_initgroups)
    fprintf(stderr, "\n\
This crash occured while the server was calling initgroups(). This is\n\
often due to the use of a mysqld that is statically linked against glibc\n\
and configured to use LDAP in /etc/nsswitch.conf. You will need to either\n\
upgrade to a version of glibc that does not have this problem (2.3.4 or\n\
later when used with nscd), disable LDAP in your nsswitch.conf, or use a\n\
mysqld that is not statically linked.\n");
#endif

 if (test_flags & TEST_CORE_ON_SIGNAL)
 {
   fprintf(stderr, "Writing a core file\n");
Loading