Commit 07da2285 authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.1-new-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


mysql-test/mysql-test-run.pl:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
parents 32f349ed 4f91e9f7
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ sub mtr_tofile ($@);
sub mtr_tonewfile($@);
sub mtr_lastlinefromfile($);
sub mtr_appendfile_to_file ($$);
sub mtr_grab_file($);


##############################################################################
#
@@ -128,6 +130,7 @@ sub unspace {
  return "$quote$string$quote";
}

# Read a whole file, stripping leading and trailing whitespace.
sub mtr_fromfile ($) {
  my $file=  shift;

@@ -181,5 +184,16 @@ sub mtr_appendfile_to_file ($$) {
  close TOFILE;
}

# Read a whole file verbatim.
sub mtr_grab_file($) {
  my $file= shift;
  open(FILE, '<', $file)
    or return undef;
  local $/= undef;
  my $data= scalar(<FILE>);
  close FILE;
  return $data;
}


1;
+9 −1
Original line number Diff line number Diff line
@@ -1630,9 +1630,17 @@ sub environment_setup () {
  # impossible to add correct supressions, that means if "/usr/lib/debug"
  # is available, it should be added to
  # LD_LIBRARY_PATH
  #
  # But pthread is broken in libc6-dbg on Debian <= 3.1 (see Debian
  # bug 399035, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399035),
  # so don't change LD_LIBRARY_PATH on that platform.
  # --------------------------------------------------------------------------
  my $debug_libraries_path= "/usr/lib/debug";
  if (  $opt_valgrind and -d $debug_libraries_path )
  my $deb_version;
  if (  $opt_valgrind and -d $debug_libraries_path and
        (! -e '/etc/debian_version' or
         ($deb_version= mtr_grab_file('/etc/debian_version')) == 0 or
         $deb_version > 3.1 ) )
  {
    push(@ld_library_paths, $debug_libraries_path);
  }
+5 −0
Original line number Diff line number Diff line
@@ -39,6 +39,11 @@ delete t1 from t1,t3 where t1.a=t3.a;
drop table t1;
insert into t1 values(1);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
drop temporary table ttt;
ERROR 42S02: Unknown table 'ttt'
drop temporary table if exists ttt;
Warnings:
Note	1051	Unknown table 'ttt'
drop table t1,t2;
drop user test@localhost;
set global read_only=0;
+12 −0
Original line number Diff line number Diff line
@@ -101,6 +101,18 @@ drop table t1;
--error 1290
insert into t1 values(1);

#
# BUG #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
#
# check if DROP TEMPORARY on a non-existing temporary table returns the right
# error

--error ER_BAD_TABLE_ERROR
drop temporary table ttt;

# check if DROP TEMPORARY TABLE IF EXISTS produces a warning with read_only set
drop temporary table if exists ttt;

connection default;
drop table t1,t2;
drop user test@localhost;
+5 −4
Original line number Diff line number Diff line
@@ -2582,6 +2582,7 @@ mysql_execute_command(THD *thd)
	(sql_command_flags[lex->sql_command] & CF_CHANGES_DATA) &&
        !((lex->sql_command == SQLCOM_CREATE_TABLE) &&
          (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) &&
        !((lex->sql_command == SQLCOM_DROP_TABLE) && lex->drop_temporary) &&
        ((lex->sql_command != SQLCOM_UPDATE_MULTI) &&
          some_non_temp_table_to_be_updated(thd, all_tables)))
    {