Commit c10f3767 authored by monty@mysql.com's avatar monty@mysql.com

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
parent 3ddc1f99
......@@ -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=
......
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
......@@ -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
......
......@@ -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;
#
......
......@@ -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
-- 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
......@@ -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;
......@@ -19,10 +19,6 @@
#include "event.h"
#include "sp.h"
extern int MYSQLparse(void *thd);
/*
Init all member variables
......
......@@ -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;
......
......@@ -720,6 +720,7 @@ mysql_declare_plugin(heap)
heap_hton_comment,
NULL,
NULL,
0x0100, /* 1.0 */
0
}
mysql_declare_plugin_end;
......@@ -7470,6 +7470,7 @@ mysql_declare_plugin(innobase)
NULL, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
0
}
mysql_declare_plugin_end;
......
......@@ -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;
......@@ -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;
......@@ -10296,6 +10296,7 @@ mysql_declare_plugin(ndbcluster)
NULL, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
0
}
mysql_declare_plugin_end;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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();
......
......@@ -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 lnea %ld"
ER_WARN_DATA_OUT_OF_RANGE 22003
eng "Out of range value adjusted for column '%s' at row %ld"
ger "Daten abgeschnitten, auerhalb des Wertebereichs fr 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 lnea %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 fr 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 krver definition av VALUES %-.64s fr 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 lschen: wird fr einen Fremdschlssel bentigt"
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"
......@@ -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();
......
......@@ -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;
......
......@@ -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);
......
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