Commit 3fc4a67a authored by unknown's avatar unknown

Merge hezx.(none):/media/hda5/work/mysql/bkwork/bug#30998/mysql-5.0-rpl

into  hezx.(none):/media/hda5/work/mysql/bkwork/bug#30998/merge-mysql-5.1-new-rpl


sql/sql_string.cc:
  Auto merged
BitKeeper/deleted/.del-compile-solaris-amd64:
  Auto merged
sql/sql_view.cc:
  Manual merged
parents 127ef561 77f4d912
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
amd64_cflags="-m64 -mtune=athlon64"
extra_flags="$amd64_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$amd64_configs $debug_configs $max_configs --enable-thread-safe-client"
. "$path/FINISH.sh"
#! /bin/sh
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
path=`dirname $0`
. "$path/autorun.sh"
# For "optimal" code for this computer add -fast to EXTRA
# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT
EXTRA_64_BIT="-xarch=amd64"
EXTRA="-fast"
#
# The following should not need to be touched
#
export CC CXX CFLAGS CXXFLAGS
STD="-g -mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT"
ASFLAGS="$EXTRA_64_BIT"
CC=cc-5.0
CFLAGS="-Xa -xstrconst $STD"
CXX=CC
CXXFLAGS="-noex $STD"
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--enable-local-infile \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--with-archive-storage-engine \
--with-named-curses=-lcurses \
--with-big-tables \
--with-innodb \
--with-example-storage-engine \
--with-blackhole-storage-engine \
--with-federated-storage-engine \
--with-csv-storage-engine \
--with-ssl \
--enable-assembler
# Not including:
# --with-ndbcluster
# --with-berkeley-db
gmake -j4
test $? = 0 && make test
#! /bin/sh
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
path=`dirname $0`
. "$path/autorun.sh"
# To compile 64 bit, add -xarch=amd64 to EXTRA_64_BIT
EXTRA_64_BIT="-xarch=amd64"
# For "optimal" code for this computer add -fast to EXTRA. Note that
# this causes problem with debugging the program since -fast implies
# -xO5.
EXTRA=""
#
# The following should not need to be touched
#
export CC CXX CFLAGS CXXFLAGS
STD="-g -mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT $debug_cflags"
ASFLAGS="$EXTRA_64_BIT"
CC=cc-5.0
CFLAGS="-Xa -xstrconst $STD"
CXX=CC
CXXFLAGS="-noex $STD"
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--enable-local-infile \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--with-archive-storage-engine \
--with-named-curses=-lcurses \
--with-big-tables \
--with-innodb \
--with-example-storage-engine \
--with-blackhole-storage-engine \
--with-federated-storage-engine \
--with-csv-storage-engine \
--with-ssl \
--with-debug \
--enable-assembler
# Not including:
# --with-ndbcluster
# --with-berkeley-db
gmake -j4
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
drop table if exists t1, t2;
drop view if exists v1, v2, v3, not_exist_view;
create table t1 (a int);
create table t2 (b int);
create table t3 (c int);
create view v1 as select * from t1;
create view v2 as select * from t2;
create view v3 as select * from t3;
drop view not_exist_view;
ERROR 42S02: Unknown table 'not_exist_view'
drop view v1, not_exist_view;
ERROR 42S02: Unknown table 'not_exist_view'
select * from v1;
ERROR 42S02: Table 'test.v1' doesn't exist
drop view v2, v3;
select * from v1;
ERROR 42S02: Table 'test.v1' doesn't exist
select * from v2;
ERROR 42S02: Table 'test.v2' doesn't exist
select * from v3;
ERROR 42S02: Table 'test.v3' doesn't exist
# test case for bug#30998
# Drop View breaks replication if view does not exist
#
source include/master-slave.inc;
--disable_warnings
drop table if exists t1, t2;
drop view if exists v1, v2, v3, not_exist_view;
--enable_warnings
create table t1 (a int);
create table t2 (b int);
create table t3 (c int);
create view v1 as select * from t1;
create view v2 as select * from t2;
create view v3 as select * from t3;
--error 1051
drop view not_exist_view;
--error 1051
drop view v1, not_exist_view;
--error 1146
select * from v1;
drop view v2, v3;
save_master_pos;
connection slave;
sync_with_master;
--error 1146
select * from v1;
--error 1146
select * from v2;
--error 1146
select * from v3;
......@@ -297,8 +297,8 @@ bool String::copy_aligned(const char *str,uint32 arg_length, uint32 offset,
return TRUE;
/*
Note, this is only safe for little-endian UCS-2.
If we add big-endian UCS-2 sometimes, this code
Note, this is only safe for big-endian UCS-2.
If we add little-endian UCS-2 sometimes, this code
will be more complicated. But it's OK for now.
*/
bzero((char*) Ptr, offset);
......
......@@ -1540,6 +1540,8 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
something_wrong= error || wrong_object_name || non_existant_views.length();
if (some_views_deleted || !something_wrong)
{
DBUG_RETURN(TRUE);
}
/* if something goes wrong, bin-log with possible error code,
otherwise bin-log with error code cleared.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment