From 791a5d94441d37bf6f14d4595893bb0573afcec9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 May 2006 19:39:47 +0300 Subject: [PATCH] Fixed compiler warnings Move plugin declarations after system functions have been checked (Fixes problem with ndb_config failing becasue SHM is not declared) Fixed some memory leaks configure.in: Move plugin declarations after system functions have been checked (Fixes problem with ndb_config failing becasue SHM is not declared) mysql-test/t/disabled.def: Disabled ndb_load, as it is in 5.0 (Fails randomly in binlog_close_connection()) mysql-test/t/log_tables.test: Update error numbers mysql-test/t/ndb_config.test: Moved test depending on SHM to ndb_config2.test mysql-test/t/ndb_partition_error.test: Update error numbers sql/event_timed.cc: Removed not needed line sql/ha_berkeley.cc: Fixed compiler warning sql/ha_heap.cc: Fixed compiler warning sql/ha_innodb.cc: Fixed compiler warning sql/ha_myisam.cc: Fixed compiler warning sql/ha_myisammrg.cc: Fixed compiler warning sql/ha_ndbcluster.cc: Fixed compiler warning sql/ha_partition.cc: Fixed compiler warning sql/mysql_priv.h: After merge fix sql/mysqld.cc: Fixed memory leak in skip_grant.test sql/share/errmsg.txt: Removed wrong error messages sql/sql_lex.cc: More debugging Faster lex_end() sql/sql_partition.cc: Fixed memory leak sql/sql_view.cc: Fixed memory leak mysql-test/r/ndb_config2.result: New BitKeeper file ``mysql-test/r/ndb_config2.result'' mysql-test/t/ndb_config2.test: New BitKeeper file ``mysql-test/t/ndb_config2.test'' --- configure.in | 192 +++++++++++++------------- mysql-test/r/ndb_config2.result | 1 + mysql-test/t/disabled.def | 3 +- mysql-test/t/log_tables.test | 8 +- mysql-test/t/ndb_config.test | 6 - mysql-test/t/ndb_config2.test | 7 + mysql-test/t/ndb_partition_error.test | 2 +- sql/event_timed.cc | 4 - sql/ha_berkeley.cc | 3 +- sql/ha_heap.cc | 1 + sql/ha_innodb.cc | 1 + sql/ha_myisam.cc | 3 +- sql/ha_myisammrg.cc | 3 +- sql/ha_ndbcluster.cc | 1 + sql/ha_partition.cc | 3 +- sql/mysql_priv.h | 2 +- sql/mysqld.cc | 2 +- sql/share/errmsg.txt | 16 +-- sql/sql_lex.cc | 16 ++- sql/sql_partition.cc | 1 + sql/sql_view.cc | 1 + 21 files changed, 142 insertions(+), 134 deletions(-) create mode 100644 mysql-test/r/ndb_config2.result create mode 100644 mysql-test/t/ndb_config2.test diff --git a/configure.in b/configure.in index 162bff48b7f..e159a5803f1 100644 --- a/configure.in +++ b/configure.in @@ -48,92 +48,9 @@ czech danish dutch english estonian french german greek hungarian \ italian japanese korean norwegian norwegian-ny polish portuguese \ romanian russian serbian slovak spanish swedish ukrainian" -#-------------------------------------------------------------------- -# Declare our plugin modules -#-------------------------------------------------------------------- - -MYSQL_STORAGE_ENGINE(archive,, [Archive Storage Engine], - [Archive Storage Engine], [max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(archive, [storage/archive]) -MYSQL_PLUGIN_STATIC(archive, [libarchive.a]) -MYSQL_PLUGIN_DYNAMIC(archive, [ha_archive.la]) - -MYSQL_STORAGE_ENGINE(berkeley, berkeley-db, [BerkeleyDB Storage Engine], - [Transactional Tables using BerkeleyDB], [max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(berkeley,[storage/bdb]) -MYSQL_PLUGIN_STATIC(berkeley, [[\$(bdb_libs_with_path)]]) -MYSQL_PLUGIN_ACTIONS(berkeley, [MYSQL_SETUP_BERKELEY_DB]) - -MYSQL_STORAGE_ENGINE(blackhole,,[Blackhole Storage Engine], - [Basic Write-only Read-never tables], [max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(blackhole, [storage/blackhole]) -MYSQL_PLUGIN_STATIC(blackhole, [libblackhole.a]) -MYSQL_PLUGIN_DYNAMIC(blackhole, [ha_blackhole.la]) - -MYSQL_STORAGE_ENGINE(csv,, [CSV Storage Engine], - [Stores tables in text CSV format]) -MYSQL_PLUGIN_DIRECTORY(csv, [storage/csv]) -MYSQL_PLUGIN_STATIC(csv, [libcsv.a]) -MYSQL_PLUGIN_MANDATORY(csv) dnl Used for logging - -MYSQL_STORAGE_ENGINE(example,, [Example Storage Engine], - [Skeleton for Storage Engines for developers], [max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(example, [storage/example]) -MYSQL_PLUGIN_STATIC(example, [libexample.a]) -MYSQL_PLUGIN_DYNAMIC(example, [ha_example.la]) - -MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], - [Connects to tables on remote MySQL servers], [max,max-no-ndb]) - -MYSQL_PLUGIN(ftexample, [Simple Parser], - [Simple full-text parser plugin]) -MYSQL_PLUGIN_DIRECTORY(ftexample, [plugin/fulltext]) -MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la]) - -MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine], - [Volatile memory based tables]) -MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap]) -MYSQL_PLUGIN_STATIC(heap, [libheap.a]) -MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables - -MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine], - [Transactional Tables using InnoDB], [max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase]) -MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a]) -MYSQL_PLUGIN_ACTIONS(innobase, [ - AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"]) - AC_SUBST(innodb_system_libs) -]) - -MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine], - [Traditional non-transactional MySQL tables]) -MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam]) -MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a]) -MYSQL_PLUGIN_MANDATORY(myisam) dnl Default - -MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine], - [Merge multiple MySQL tables into one]) -MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg]) -MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a]) -MYSQL_PLUGIN_MANDATORY(myisammrg) - -MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine], - [High Availability Clustered tables], [max]) -MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb]) -MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]]) -MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER]) - -MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support], - [MySQL Partitioning Support], [max,max-no-ndb]) - -dnl -- ndbcluster requires partition to be enabled -MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition]) - - ##### ##### - AC_SUBST(MYSQL_NO_DASH_VERSION) AC_SUBST(MYSQL_BASE_VERSION) AC_SUBST(MYSQL_VERSION_ID) @@ -762,16 +679,6 @@ MYSQL_SYS_LARGEFILE # Types that must be checked AFTER large file support is checked AC_TYPE_SIZE_T -#-------------------------------------------------------------------- -# Check for requested features -#-------------------------------------------------------------------- - -MYSQL_CHECK_BIG_TABLES -MYSQL_CHECK_MAX_INDEXES -MYSQL_CHECK_REPLICATION - -MYSQL_CONFIGURE_PLUGINS([none]) - #-------------------------------------------------------------------- # Check for system header files #-------------------------------------------------------------------- @@ -2288,6 +2195,102 @@ then fi AC_MSG_RESULT("$netinet_inc") +#-------------------------------------------------------------------- +# Check for requested features +#-------------------------------------------------------------------- + +MYSQL_CHECK_BIG_TABLES +MYSQL_CHECK_MAX_INDEXES +MYSQL_CHECK_REPLICATION +MYSQL_CHECK_VIO +MYSQL_CHECK_OPENSSL +MYSQL_CHECK_YASSL + +#-------------------------------------------------------------------- +# Declare our plugin modules +# Has to be done late, as the plugin may need to check for existence of +# functions tested above +#-------------------------------------------------------------------- + +MYSQL_STORAGE_ENGINE(archive,, [Archive Storage Engine], + [Archive Storage Engine], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(archive, [storage/archive]) +MYSQL_PLUGIN_STATIC(archive, [libarchive.a]) +MYSQL_PLUGIN_DYNAMIC(archive, [ha_archive.la]) + +MYSQL_STORAGE_ENGINE(berkeley, berkeley-db, [BerkeleyDB Storage Engine], + [Transactional Tables using BerkeleyDB], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(berkeley,[storage/bdb]) +MYSQL_PLUGIN_STATIC(berkeley, [[\$(bdb_libs_with_path)]]) +MYSQL_PLUGIN_ACTIONS(berkeley, [MYSQL_SETUP_BERKELEY_DB]) + +MYSQL_STORAGE_ENGINE(blackhole,,[Blackhole Storage Engine], + [Basic Write-only Read-never tables], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(blackhole, [storage/blackhole]) +MYSQL_PLUGIN_STATIC(blackhole, [libblackhole.a]) +MYSQL_PLUGIN_DYNAMIC(blackhole, [ha_blackhole.la]) + +MYSQL_STORAGE_ENGINE(csv,, [CSV Storage Engine], + [Stores tables in text CSV format]) +MYSQL_PLUGIN_DIRECTORY(csv, [storage/csv]) +MYSQL_PLUGIN_STATIC(csv, [libcsv.a]) +MYSQL_PLUGIN_MANDATORY(csv) dnl Used for logging + +MYSQL_STORAGE_ENGINE(example,, [Example Storage Engine], + [Skeleton for Storage Engines for developers], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(example, [storage/example]) +MYSQL_PLUGIN_STATIC(example, [libexample.a]) +MYSQL_PLUGIN_DYNAMIC(example, [ha_example.la]) + +MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], + [Connects to tables on remote MySQL servers], [max,max-no-ndb]) + +MYSQL_PLUGIN(ftexample, [Simple Parser], + [Simple full-text parser plugin]) +MYSQL_PLUGIN_DIRECTORY(ftexample, [plugin/fulltext]) +MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la]) + +MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine], + [Volatile memory based tables]) +MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap]) +MYSQL_PLUGIN_STATIC(heap, [libheap.a]) +MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables + +MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine], + [Transactional Tables using InnoDB], [max,max-no-ndb]) +MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase]) +MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a]) +MYSQL_PLUGIN_ACTIONS(innobase, [ + AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"]) + AC_SUBST(innodb_system_libs) +]) + +MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine], + [Traditional non-transactional MySQL tables]) +MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam]) +MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a]) +MYSQL_PLUGIN_MANDATORY(myisam) dnl Default + +MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine], + [Merge multiple MySQL tables into one]) +MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg]) +MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a]) +MYSQL_PLUGIN_MANDATORY(myisammrg) + +MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine], + [High Availability Clustered tables], [max]) +MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb]) +MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]]) +MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER]) + +MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support], + [MySQL Partitioning Support], [max,max-no-ndb]) + +dnl -- ndbcluster requires partition to be enabled +MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition]) + +MYSQL_CONFIGURE_PLUGINS([none]) + # Only build client code? AC_ARG_WITH(server, [ --without-server Only build the client.], @@ -2353,9 +2356,6 @@ fi AC_SUBST(tools_dirs) #MYSQL_CHECK_CPU -MYSQL_CHECK_VIO -MYSQL_CHECK_OPENSSL -MYSQL_CHECK_YASSL libmysqld_dirs= linked_libmysqld_targets= diff --git a/mysql-test/r/ndb_config2.result b/mysql-test/r/ndb_config2.result new file mode 100644 index 00000000000..cfd012933c4 --- /dev/null +++ b/mysql-test/r/ndb_config2.result @@ -0,0 +1 @@ +shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 2d7d1b1ca8d..f0d92781a1d 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -18,6 +18,7 @@ ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t ndb_binlog_discover : BUG#19395 2006-04-28 tomas/knielsen mysqld does not always detect cluster shutdown #ndb_cache2 : BUG#18597 2006-03-28 brian simultaneous drop table and ndb statistics update triggers node failure #ndb_cache_multi2 : BUG#18597 2006-04-10 kent simultaneous drop table and ndb statistics update triggers node failure +ndb_load : Bug#17233 (This is also in 5.0) partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated @@ -30,7 +31,7 @@ rpl_ndb_log : BUG#18947 2006-03-21 tomas CRBR: order in binlog of c rpl_ndb_myisam2ndb : BUG#17400 2006-04-19 tomas Cluster Replication: delete & update of rows in table without pk fails on slave. rpl_switch_stm_row_mixed : BUG#18590 2006-03-28 brian rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly -rpl_row_func003 : BUG#19074 2006-13-04 andrei test failed +rpl_row_func003 : BUG#19074 2006-13-04 andrei test failed rpl_row_inexist_tbl : BUG#18948 2006-03-09 mats Disabled since patch makes this test wait forever rpl_sp : BUG#16456 2006-02-16 jmiller udf : BUG#18564 2006-03-27 ian (Permission by Brian) diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 3b412d9e793..048da802d02 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -63,10 +63,10 @@ flush logs; # check locking of the log tables # ---error 1533 +--error ER_CANT_WRITE_LOCK_LOG_TABLE lock tables mysql.general_log WRITE; ---error 1533 +--error ER_CANT_WRITE_LOCK_LOG_TABLE lock tables mysql.slow_log WRITE; # @@ -75,10 +75,10 @@ lock tables mysql.slow_log WRITE; # tables are always opened and locked by the logger. # ---error 1534 +--error ER_CANT_READ_LOCK_LOG_TABLE lock tables mysql.general_log READ; ---error 1534 +--error ER_CANT_READ_LOCK_LOG_TABLE lock tables mysql.slow_log READ; # diff --git a/mysql-test/t/ndb_config.test b/mysql-test/t/ndb_config.test index 3308b914bf1..2fe54cac048 100644 --- a/mysql-test/t/ndb_config.test +++ b/mysql-test/t/ndb_config.test @@ -15,9 +15,3 @@ --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null - -# Following doesn't work in all configurations - ---disable_parsing ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null ---enable_parsing diff --git a/mysql-test/t/ndb_config2.test b/mysql-test/t/ndb_config2.test new file mode 100644 index 00000000000..170f1b2e5e7 --- /dev/null +++ b/mysql-test/t/ndb_config2.test @@ -0,0 +1,7 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +# Following doesn't work in all configurations (if shm is not defined) + +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null diff --git a/mysql-test/t/ndb_partition_error.test b/mysql-test/t/ndb_partition_error.test index 286c2216f70..06581f1270f 100644 --- a/mysql-test/t/ndb_partition_error.test +++ b/mysql-test/t/ndb_partition_error.test @@ -66,6 +66,6 @@ partition by list(a) partitions 2 (partition x123 values in (11, 12), partition x234 values in (5, 1)); ---error 1505 +--error ER_NO_PARTITION_FOR_GIVEN_VALUE insert into t1 values (NULL,1,1); drop table t1; diff --git a/sql/event_timed.cc b/sql/event_timed.cc index ed012ecd399..879f4d6a3c9 100644 --- a/sql/event_timed.cc +++ b/sql/event_timed.cc @@ -19,10 +19,6 @@ #include "event.h" #include "sp.h" - - -extern int MYSQLparse(void *thd); - /* Init all member variables diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index ef1876c0e2e..473fb149871 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -2742,7 +2742,8 @@ mysql_declare_plugin(berkeley) berkeley_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ - 0x0100 /* 1.0 */, + 0x0100, /* 1.0 */ + 0 } mysql_declare_plugin_end; diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index ca33a31de4b..1a7efb42748 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -720,6 +720,7 @@ mysql_declare_plugin(heap) heap_hton_comment, NULL, NULL, + 0x0100, /* 1.0 */ 0 } mysql_declare_plugin_end; diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 3f606cd0b15..0b2f561e8c9 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -7470,6 +7470,7 @@ mysql_declare_plugin(innobase) NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, + 0 } mysql_declare_plugin_end; diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index a1aa6c9b5c6..786d45a4966 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -1807,6 +1807,7 @@ mysql_declare_plugin(myisam) myisam_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ - 0x0100 /* 1.0 */, + 0x0100, /* 1.0 */ + 0 } mysql_declare_plugin_end; diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 89f0f9e3647..1cde37644bc 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -589,6 +589,7 @@ mysql_declare_plugin(myisammrg) myisammrg_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ - 0x0100 /* 1.0 */, + 0x0100, /* 1.0 */ + 0 } mysql_declare_plugin_end; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index a20026c7af9..d0558421952 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -10296,6 +10296,7 @@ mysql_declare_plugin(ndbcluster) NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, + 0 } mysql_declare_plugin_end; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index bff21d6681d..b1a5a447b6f 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5455,7 +5455,8 @@ mysql_declare_plugin(partition) partition_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ - 0x0100 /* 1.0 */, + 0x0100, /* 1.0 */ + 0 } mysql_declare_plugin_end; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 749a968a5af..6385965fa1a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -92,7 +92,7 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); do { \ DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) >= 0); \ push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \ - ER_WARN_DEPRECATED, ER(ER_WARN_DEPRECATED), \ + ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), \ (Old), (Ver), (New)); \ } while(0) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index bab03a7a55b..3014cbf16ed 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1185,8 +1185,8 @@ void clean_up(bool print_message) #ifdef HAVE_DLOPEN udf_free(); #endif - plugin_free(); } + plugin_free(); if (tc_log) tc_log->close(); xid_cache_free(); diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 4639dd1fcb8..a2bc77714bb 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -4898,10 +4898,7 @@ ER_WARN_NULL_TO_NOTNULL 22004 por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld" spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la línea %ld" ER_WARN_DATA_OUT_OF_RANGE 22003 - eng "Out of range value adjusted for column '%s' at row %ld" - ger "Daten abgeschnitten, außerhalb des Wertebereichs für Feld '%s' in Zeile %ld" - por "Dado truncado, fora de alcance para coluna '%s' na linha %ld" - spa "Datos truncados, fuera de gama para columna '%s' en la línea %ld" + eng "Out of range value for column '%s' at row %ld" WARN_DATA_TRUNCATED 01000 eng "Data truncated for column '%s' at row %ld" ger "Daten abgeschnitten für Feld '%s' in Zeile %ld" @@ -5619,11 +5616,8 @@ ER_NON_GROUPING_FIELD_USED 42000 eng "non-grouping field '%-.64s' is used in %-.64s clause" ER_TABLE_CANT_HANDLE_SPKEYS eng "The used table type doesn't support SPATIAL indexes" -ER_WARN_DEPRECATED_SYNTAX - eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead." - ger "'%s' ist veraltet. Bitte benutzen Sie '%s'" - por "'%s' é desatualizado. Use '%s' em seu lugar" - spa "'%s' está desaprobado, use '%s' en su lugar" +ER_ILLEGAL_HA_CREATE_OPTION + eng "Table storage engine '%-.64s' does not support the create option '%.64s'" ER_PARTITION_REQUIRES_VALUES_ERROR eng "%-.64s PARTITIONING requires definition of VALUES %-.64s for each partition" swe "%-.64s PARTITIONering kräver definition av VALUES %-.64s för varje partition" @@ -5820,6 +5814,8 @@ ER_EVENT_DATA_TOO_LONG ER_DROP_INDEX_FK eng "Cannot drop index '%-.64s': needed in a foreign key constraint" ger "Kann Index '%-.64s' nicht löschen: wird für einen Fremdschlüssel benötigt" +ER_WARN_DEPRECATED_SYNTAX + eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead." ER_CANT_WRITE_LOCK_LOG_TABLE eng "You can't write-lock a log table. Only read access is possible." ER_CANT_READ_LOCK_LOG_TABLE @@ -5844,7 +5840,5 @@ ER_NULL_IN_VALUES_LESS_THAN ER_WRONG_PARTITION_NAME eng "Incorrect partition name" swe "Felaktigt partitionsnamn" -ER_ILLEGAL_HA_CREATE_OPTION - eng "Table storage engine '%-.64s' does not support the create option '%.64s'" ER_CANT_CHANGE_TX_ISOLATION 25001 eng "Transaction isolation level can't be changed while a transaction is in progress" diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5a76066af8c..b8ae1e9b5a8 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -168,8 +168,6 @@ void lex_start(THD *thd, const uchar *buf, uint length) lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc; lex->select_lex.group_list.empty(); lex->select_lex.order_list.empty(); - lex->current_select= &lex->select_lex; - lex->yacc_yyss=lex->yacc_yyvs=0; lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE); lex->sql_command= lex->orig_sql_command= SQLCOM_END; lex->duplicates= DUP_ERROR; @@ -197,8 +195,15 @@ void lex_start(THD *thd, const uchar *buf, uint length) void lex_end(LEX *lex) { - x_free(lex->yacc_yyss); - x_free(lex->yacc_yyvs); + DBUG_ENTER("lex_end"); + if (lex->yacc_yyss) + { + my_free(lex->yacc_yyss, MYF(0)); + my_free(lex->yacc_yyvs, MYF(0)); + lex->yacc_yyss= 0; + lex->yacc_yyvs= 0; + } + DBUG_VOID_RETURN; } @@ -1633,7 +1638,8 @@ void st_select_lex::print_limit(THD *thd, String *str) */ st_lex::st_lex() - :result(0), sql_command(SQLCOM_END), query_tables_own_last(0) + :result(0), yacc_yyss(0), yacc_yyvs(0), + sql_command(SQLCOM_END), query_tables_own_last(0) { hash_init(&sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key, 0, 0); sroutines_list.empty(); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 0442ad724d2..71b8e9b1d95 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3430,6 +3430,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf, result= FALSE; end: + lex_end(thd->lex); thd->free_list= thd_free_list; thd->lex= old_lex; thd->variables.character_set_client= old_character_set_client; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 3ef6a234f4e..a193bb66299 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1197,6 +1197,7 @@ ok2: end: if (arena) thd->restore_active_arena(arena, &backup); + lex_end(thd->lex); thd->lex= old_lex; DBUG_RETURN(result);