diff options
-rw-r--r-- | BUILD/compile-solaris-amd64-debug | 10 | ||||
-rw-r--r-- | BUILD/compile-solaris-amd64-forte | 52 | ||||
-rw-r--r-- | BUILD/compile-solaris-amd64-forte-debug | 54 | ||||
-rw-r--r-- | mysql-test/r/rpl_drop_view.result | 27 | ||||
-rw-r--r-- | mysql-test/t/rpl_drop_view.test | 31 | ||||
-rw-r--r-- | sql/sql_string.cc | 4 | ||||
-rw-r--r-- | sql/sql_view.cc | 2 |
7 files changed, 178 insertions, 2 deletions
diff --git a/BUILD/compile-solaris-amd64-debug b/BUILD/compile-solaris-amd64-debug new file mode 100644 index 00000000000..ad1c298907f --- /dev/null +++ b/BUILD/compile-solaris-amd64-debug @@ -0,0 +1,10 @@ +#! /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" diff --git a/BUILD/compile-solaris-amd64-forte b/BUILD/compile-solaris-amd64-forte new file mode 100644 index 00000000000..63aceb16c04 --- /dev/null +++ b/BUILD/compile-solaris-amd64-forte @@ -0,0 +1,52 @@ +#! /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 diff --git a/BUILD/compile-solaris-amd64-forte-debug b/BUILD/compile-solaris-amd64-forte-debug new file mode 100644 index 00000000000..8e3ade9b429 --- /dev/null +++ b/BUILD/compile-solaris-amd64-forte-debug @@ -0,0 +1,54 @@ +#! /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 diff --git a/mysql-test/r/rpl_drop_view.result b/mysql-test/r/rpl_drop_view.result new file mode 100644 index 00000000000..ef625464881 --- /dev/null +++ b/mysql-test/r/rpl_drop_view.result @@ -0,0 +1,27 @@ +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 diff --git a/mysql-test/t/rpl_drop_view.test b/mysql-test/t/rpl_drop_view.test new file mode 100644 index 00000000000..8d826b8214d --- /dev/null +++ b/mysql-test/t/rpl_drop_view.test @@ -0,0 +1,31 @@ +# 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; diff --git a/sql/sql_string.cc b/sql/sql_string.cc index a8eb7360339..f97180474d1 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -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); diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 362bab2d700..41c0aff0cd1 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -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. */ |