diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-05-08 11:20:43 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-05-08 11:20:43 +0200 |
commit | ac286a9bc7dfffa9837ffc8807735f978a7f4192 (patch) | |
tree | 9fbabfe9d0e2207c640564b34b8c32865ed5f63f | |
parent | a1ad712152f3dcdbefe022dca8babab8c14d8817 (diff) | |
parent | 0014bdc7eef141dcd66930e853242b3be4960831 (diff) | |
download | mariadb-git-ac286a9bc7dfffa9837ffc8807735f978a7f4192.tar.gz |
Merge branch '5.5' into 10.0
-rw-r--r-- | mysql-test/r/repair.result | 7 | ||||
-rw-r--r-- | mysql-test/t/repair.test | 9 | ||||
-rw-r--r-- | sql/sql_admin.cc | 2 | ||||
-rw-r--r-- | storage/innobase/CMakeLists.txt | 2 | ||||
-rw-r--r-- | storage/innobase/handler/i_s.cc | 7 | ||||
-rw-r--r-- | storage/xtradb/CMakeLists.txt | 2 | ||||
-rw-r--r-- | storage/xtradb/handler/i_s.cc | 7 |
7 files changed, 31 insertions, 5 deletions
diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index c5faa27085e..79bc6d55c55 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -207,3 +207,10 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +create table t1 (a blob); +create view v1 as select * from t1; +repair view v1; +Table Op Msg_type Msg_text +test.v1 repair status OK +drop view v1; +drop table t1; diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 5b78a352863..a6df0dc5979 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -210,3 +210,12 @@ repair table t1 use_frm; select count(*) from t1; check table t1; drop table t1; + +# +# MDEV-8115 mysql_upgrade crashes the server with REPAIR VIEW +# +create table t1 (a blob); +create view v1 as select * from t1; +repair view v1; +drop view v1; +drop table t1; diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index afce7794dd7..a6b97ce31fa 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -1012,7 +1012,7 @@ send_result_message: break; } } - if (table->table) + if (table->table && !table->view) { if (table->table->s->tmp_table) { diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 425d0bd0f1c..c24f1cda59e 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -199,6 +199,8 @@ IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC) ADD_DEFINITIONS(-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1) ENDIF() +CHECK_C_SOURCE_COMPILES("struct t1{ int a; char *b; }; struct t1 c= { .a=1, .b=0 }; main() { }" HAVE_C99_INITIALIZERS) + ENDIF(NOT MSVC) CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF) diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index c111cea5c13..6168ce0f0d2 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -157,9 +157,12 @@ do { \ } \ } while (0) -#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && \ - !defined __INTEL_COMPILER && !defined __clang__ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER && !defined __clang__ +#ifdef HAVE_C99_INITIALIZERS +#define STRUCT_FLD(name, value) .name = value +#else #define STRUCT_FLD(name, value) name: value +#endif /* HAVE_C99_INITIALIZERS */ #else #define STRUCT_FLD(name, value) value #endif diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt index 28849f5914d..2f74456e7a7 100644 --- a/storage/xtradb/CMakeLists.txt +++ b/storage/xtradb/CMakeLists.txt @@ -206,6 +206,8 @@ IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC) ADD_DEFINITIONS(-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1) ENDIF() +CHECK_C_SOURCE_COMPILES("struct t1{ int a; char *b; }; struct t1 c= { .a=1, .b=0 }; main() { }" HAVE_C99_INITIALIZERS) + ENDIF(NOT MSVC) CHECK_FUNCTION_EXISTS(asprintf HAVE_ASPRINTF) diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc index 3a0c8576be6..ac4c92e8c37 100644 --- a/storage/xtradb/handler/i_s.cc +++ b/storage/xtradb/handler/i_s.cc @@ -169,9 +169,12 @@ do { \ } \ } while (0) -#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && \ - !defined __INTEL_COMPILER && !defined __clang__ +#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER && !defined __clang__ +#ifdef HAVE_C99_INITIALIZERS +#define STRUCT_FLD(name, value) .name = value +#else #define STRUCT_FLD(name, value) name: value +#endif /* HAVE_C99_INITIALIZERS */ #else #define STRUCT_FLD(name, value) value #endif |