diff --git a/client/mysqldump.c b/client/mysqldump.c index eb814c267ed..2ec1dd28f73 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1460,6 +1460,8 @@ static uint get_table_structure(char *table, char *db, char *table_type, { fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n", opt_quoted_table); + fprintf(sql_file, "/*!50001 DROP TABLE IF EXISTS %s*/;\n", + opt_quoted_table); check_io(sql_file); } @@ -1471,7 +1473,8 @@ static uint get_table_structure(char *table, char *db, char *table_type, */ row= mysql_fetch_row(result); - fprintf(sql_file, " %s %s", quote_name(row[0], name_buff, 0), row[1]); + fprintf(sql_file, " %s %s", quote_name(row[0], name_buff, 0), + row[1]); while((row= mysql_fetch_row(result))) { diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index 0bfb2bc7470..e5e7283e0e6 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -1,5 +1,4 @@ -source include/have_geometry.inc; ---source include/have_ndb.inc +--source include/have_geometry.inc # # Spatial objects diff --git a/mysql-test/include/have_archive.inc b/mysql-test/include/have_archive.inc index f7fb942e83e..262f66076a8 100644 --- a/mysql-test/include/have_archive.inc +++ b/mysql-test/include/have_archive.inc @@ -1,4 +1,4 @@ --- require r/have_archive.require -disable_query_log; +--require r/have_archive.require +--disable_query_log show variables like "have_archive"; -enable_query_log; +--enable_query_log diff --git a/mysql-test/include/have_geometry.inc b/mysql-test/include/have_geometry.inc index 169c3a41ee7..f0ec22af172 100644 --- a/mysql-test/include/have_geometry.inc +++ b/mysql-test/include/have_geometry.inc @@ -1,4 +1,4 @@ --- require r/have_geometry.require -disable_query_log; +--require r/have_geometry.require +--disable_query_log show variables like "have_geometry"; -enable_query_log; +--enable_query_log diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 99efde39614..756a830ebc0 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1458,6 +1458,7 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `t2` ENABLE KEYS */; DROP TABLE IF EXISTS `v2`; /*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 DROP TABLE IF EXISTS `v2`*/; /*!50001 CREATE TABLE `v2` ( `a` varchar(30) ) */; @@ -1701,6 +1702,7 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `v1`; /*!50001 DROP VIEW IF EXISTS `v1`*/; +/*!50001 DROP TABLE IF EXISTS `v1`*/; /*!50001 CREATE TABLE `v1` ( `a` int(11) ) */; @@ -1756,6 +1758,7 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `t2` ENABLE KEYS */; DROP TABLE IF EXISTS `v2`; /*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 DROP TABLE IF EXISTS `v2`*/; /*!50001 CREATE TABLE `v2` ( `a` varchar(30) ) */; @@ -1845,6 +1848,7 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `v1`; /*!50001 DROP VIEW IF EXISTS `v1`*/; +/*!50001 DROP TABLE IF EXISTS `v1`*/; /*!50001 CREATE TABLE `v1` ( `a` int(11), `b` int(11), @@ -1852,11 +1856,13 @@ DROP TABLE IF EXISTS `v1`; ) */; DROP TABLE IF EXISTS `v2`; /*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 DROP TABLE IF EXISTS `v2`*/; /*!50001 CREATE TABLE `v2` ( `a` int(11) ) */; DROP TABLE IF EXISTS `v3`; /*!50001 DROP VIEW IF EXISTS `v3`*/; +/*!50001 DROP TABLE IF EXISTS `v3`*/; /*!50001 CREATE TABLE `v3` ( `a` int(11), `b` int(11), @@ -2417,6 +2423,7 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `v0`; /*!50001 DROP VIEW IF EXISTS `v0`*/; +/*!50001 DROP TABLE IF EXISTS `v0`*/; /*!50001 CREATE TABLE `v0` ( `a` int(11), `b` varchar(32), @@ -2424,6 +2431,7 @@ DROP TABLE IF EXISTS `v0`; ) */; DROP TABLE IF EXISTS `v1`; /*!50001 DROP VIEW IF EXISTS `v1`*/; +/*!50001 DROP TABLE IF EXISTS `v1`*/; /*!50001 CREATE TABLE `v1` ( `a` int(11), `b` varchar(32), @@ -2431,6 +2439,7 @@ DROP TABLE IF EXISTS `v1`; ) */; DROP TABLE IF EXISTS `v2`; /*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 DROP TABLE IF EXISTS `v2`*/; /*!50001 CREATE TABLE `v2` ( `a` int(11), `b` varchar(32), diff --git a/mysql-test/t/archive_gis.test b/mysql-test/t/archive_gis.test index feb3fb22f00..ffbad923173 100644 --- a/mysql-test/t/archive_gis.test +++ b/mysql-test/t/archive_gis.test @@ -1,4 +1,3 @@ -source include/have_geometry.inc; -source include/have_archive.inc; +--source include/have_archive.inc SET storage_engine=archive; --- source include/gis_generic.inc +--source include/gis_generic.inc diff --git a/mysql-test/t/bdb_gis.test b/mysql-test/t/bdb_gis.test index 76fa5d9015f..88dcbb7cbe9 100644 --- a/mysql-test/t/bdb_gis.test +++ b/mysql-test/t/bdb_gis.test @@ -1,4 +1,3 @@ -source include/have_geometry.inc; -- source include/have_bdb.inc SET storage_engine=bdb; --source include/gis_generic.inc diff --git a/mysql-test/t/innodb_gis.test b/mysql-test/t/innodb_gis.test index c79e0278d16..142b526af92 100644 --- a/mysql-test/t/innodb_gis.test +++ b/mysql-test/t/innodb_gis.test @@ -1,4 +1,3 @@ -source include/have_geometry.inc; --- source include/have_innodb.inc +--source include/have_innodb.inc SET storage_engine=innodb; --source include/gis_generic.inc diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test index f14bf546363..e14f462c32d 100644 --- a/mysql-test/t/ndb_gis.test +++ b/mysql-test/t/ndb_gis.test @@ -1,4 +1,3 @@ -source include/have_geometry.inc; --source include/have_ndb.inc SET storage_engine=ndbcluster; --source include/gis_generic.inc diff --git a/sql/item_func.cc b/sql/item_func.cc index 92d57d826a5..a5e1c37cd18 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1386,9 +1386,9 @@ double Item_func_ln::val_real() { DBUG_ASSERT(fixed == 1); double value= args[0]->val_real(); - if ((null_value=args[0]->null_value)) + if ((null_value= args[0]->null_value)) return 0.0; - if ((null_value= value <=0.0)) + if (value <= 0.0) { signal_divide_by_null(); return 0.0; @@ -1405,9 +1405,9 @@ double Item_func_log::val_real() { DBUG_ASSERT(fixed == 1); double value= args[0]->val_real(); - if ((null_value=args[0]->null_value)) + if ((null_value= args[0]->null_value)) return 0.0; - if ((null_value= value <=0.0)) + if (value <= 0.0) { signal_divide_by_null(); return 0.0; @@ -1415,9 +1415,9 @@ double Item_func_log::val_real() if (arg_count == 2) { double value2= args[1]->val_real(); - if ((null_value=args[1]->null_value)) + if ((null_value= args[1]->null_value)) return 0.0; - if ((null_value= value2 <=0.0) || (value == 1.0)) + if (value2 <= 0.0 || value == 1.0) { signal_divide_by_null(); return 0.0; @@ -1434,7 +1434,7 @@ double Item_func_log2::val_real() if ((null_value=args[0]->null_value)) return 0.0; - if ((null_value= value <=0.0)) + if (value <= 0.0) { signal_divide_by_null(); return 0.0; @@ -1446,9 +1446,9 @@ double Item_func_log10::val_real() { DBUG_ASSERT(fixed == 1); double value= args[0]->val_real(); - if ((null_value=args[0]->null_value)) + if ((null_value= args[0]->null_value)) return 0.0; - if ((null_value= value <=0.0)) + if (value <= 0.0) { signal_divide_by_null(); return 0.0;