Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-20 22:42:06+02:00, monty@stripped +179 -0
Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
BUILD/SETUP.sh@stripped, 2006-11-20 22:41:35+02:00, monty@stripped +3 -3
Don't build with BDB as default
BitKeeper/etc/ignore@stripped, 2006-11-20 18:12:45+02:00, monty@stripped +1 -0
added mysql-test/r/*.warnings
client/client_priv.h@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +2 -1
Added OPT_DEBUG_INFO
client/mysqlbinlog.cc@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +1 -1
Fixed compiler warning
client/mysqldump.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +82 -59
Removed compiler warnings
Added option --debug-info to detect memory leaks
Fixed memory leak
Don't backup cluster replication tables (if used with 5.1)
cmd-line-utils/readline/bind.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +18 -22
Fixed compiler warning
cmd-line-utils/readline/chardefs.h@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +4 -0
Fixed compiler warning
cmd-line-utils/readline/complete.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +9 -13
Fixed compiler warning
cmd-line-utils/readline/display.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +9 -8
Fixed compiler warning
cmd-line-utils/readline/histexpand.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +3 -3
Fixed compiler warning
cmd-line-utils/readline/input.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +1 -1
Fixed compiler warning
cmd-line-utils/readline/isearch.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +4 -6
Fixed compiler warning
cmd-line-utils/readline/kill.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +13 -18
Fixed compiler warning
cmd-line-utils/readline/macro.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +4 -6
Fixed compiler warning
cmd-line-utils/readline/misc.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +12 -19
Fixed compiler warning
cmd-line-utils/readline/nls.c@stripped, 2006-11-20 22:41:36+02:00, monty@stripped +1 -1
Fixed compiler warning
cmd-line-utils/readline/readline.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +4 -0
Fixed compiler warning
cmd-line-utils/readline/rltty.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +2 -5
Fixed compiler warning
cmd-line-utils/readline/search.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +6 -8
Fixed compiler warning
cmd-line-utils/readline/terminal.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +5 -5
Fixed compiler warning
cmd-line-utils/readline/text.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +23 -38
Fixed compiler warning
cmd-line-utils/readline/tilde.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +1 -1
Fixed compiler warning
cmd-line-utils/readline/undo.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +3 -5
Fixed compiler warning
cmd-line-utils/readline/util.c@stripped, 2006-11-20 22:41:37+02:00, monty@stripped +3 -6
Fixed compiler warning
cmd-line-utils/readline/vi_mode.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +28 -55
Fixed compiler warning
dbug/dbug_analyze.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +7 -7
Fixed compiler warning
extra/yassl/src/ssl.cpp@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +1 -1
Fixed compiler warning
extra/yassl/testsuite/testsuite.cpp@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +2 -2
Fixed compiler warning
heap/_check.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +15 -12
Fixed compiler warning
heap/hp_delete.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +2 -2
Fixed compiler warning
heap/hp_hash.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +1 -1
Fixed compiler warning
heap/hp_open.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +3 -2
Fixed compiler warning
heap/hp_rkey.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +1 -1
Fixed compiler warning
heap/hp_rrnd.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +2 -2
Fixed compiler warning
heap/hp_write.c@stripped, 2006-11-20 22:41:38+02:00, monty@stripped +4 -4
Fixed compiler warning
libmysql/libmysql.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +7 -7
Fixed compiler warning
libmysqld/libmysqld.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +1 -1
Fixed compiler warning
myisam/mi_close.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +3 -2
Fixed compiler warning
myisam/mi_delete.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +5 -4
Fixed compiler warning
myisam/mi_dynrec.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +2 -2
Fixed compiler warning
myisam/mi_keycache.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +2 -2
Fixed compiler warning
myisam/mi_page.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +2 -2
Fixed compiler warning
myisam/mi_statrec.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +2 -2
Fixed compiler warning
myisam/mi_test2.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +1 -1
Fixed compiler warning
myisam/mi_write.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +10 -8
Fixed compiler warning
myisam/myisampack.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +8 -7
Fixed compiler warning
myisammrg/myrg_extra.c@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +1 -1
Fixed compiler warning
mysql-test/include/federated.inc@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/include/sp-vars.inc@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +8 -8
Remove mysqltest warnings
mysql-test/mysql-test-run.pl@stripped, 2006-11-20 22:41:39+02:00, monty@stripped +10 -4
Remove .reject, .progress, .log and .warnings flag at start
cluster -> mysql database (for 5.1)
mysql-test/mysql-test-run.sh@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +9 -11
Fix so that 'make test' works again
Remove .reject, .progress .log and .warnings files at startup
mysql-test/r/ctype_cp1250_ch.result@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +1 -0
Drop used tables at startup
mysql-test/t/create.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +10 -10
Remove mysqltest warnings
mysql-test/t/csv.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +6 -6
Remove mysqltest warnings
mysql-test/t/ctype_collate.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +18 -19
Remove mysqltest warnings
mysql-test/t/ctype_cp1250_ch.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +4 -0
Drop used tables at startup
mysql-test/t/ctype_ucs.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/func_sapdb.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/func_str.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +14 -6
Remove mysqltest warnings
mysql-test/t/grant.test@stripped, 2006-11-20 22:41:40+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/greedy_optimizer.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +31 -31
Remove mysqltest warnings
mysql-test/t/group_min_max.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +78 -78
Remove mysqltest warnings
mysql-test/t/innodb.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/join.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +29 -29
Remove mysqltest warnings
mysql-test/t/limit.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/null.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/select.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +2 -2
Remove mysqltest warnings
mysql-test/t/sp-prelocking.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysql-test/t/strict.test@stripped, 2006-11-20 22:41:41+02:00, monty@stripped +10 -10
Remove mysqltest warnings
mysql-test/t/subselect.test@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +3 -3
Remove mysqltest warnings
mysql-test/t/type_newdecimal.test@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +2 -2
Remove mysqltest warnings
mysql-test/t/view_grant.test@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +1 -1
Remove mysqltest warnings
mysys/default.c@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +3 -3
Fixed compiler warning
mysys/hash.c@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +7 -6
Fixed compiler warning
mysys/list.c@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +1 -1
Fixed compiler warning
mysys/mf_iocache.c@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +5 -4
Fixed compiler warning
mysys/mf_keycache.c@stripped, 2006-11-20 22:41:43+02:00, monty@stripped +16 -16
Fixed compiler warning
mysys/mf_keycaches.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +2 -2
Fixed compiler warning
mysys/my_alloc.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +7 -6
Fixed compiler warning
mysys/my_dup.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +1 -1
Fixed compiler warning
mysys/my_fopen.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +3 -3
Fixed compiler warning
mysys/my_fstream.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +4 -4
Fixed compiler warning
mysys/my_getwd.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +1 -1
Fixed compiler warning
mysys/my_handler.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +7 -0
Fixed compiler warning
Added missing enums in switch
mysys/my_lib.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +1 -1
Fixed compiler warning
mysys/my_lread.c@stripped, 2006-11-20 22:41:44+02:00, monty@stripped +2 -2
Fixed compiler warning
mysys/my_lwrite.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +2 -2
Fixed compiler warning
mysys/my_malloc.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +2 -2
Fixed compiler warning
mysys/my_pread.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +4 -4
Fixed compiler warning
mysys/my_read.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +3 -3
Fixed compiler warning
mysys/my_realloc.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +2 -2
Fixed compiler warning
mysys/my_seek.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +1 -1
Fixed compiler warning
mysys/my_write.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +1 -1
Fixed compiler warning
mysys/safemalloc.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +5 -5
Fixed compiler warning
mysys/thr_lock.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +8 -7
Fixed compiler warning
mysys/tree.c@stripped, 2006-11-20 22:41:45+02:00, monty@stripped +2 -2
Fixed compiler warning
mysys/typelib.c@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/include/logger/LogHandler.hpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +1 -1
Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/include/ndb_global.h.in@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +6 -0
Added LINT_SET_PTR macro to be able to remove some compiler warnings
ndb/include/util/InputStream.hpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +1 -0
Fixed compiler warning
ndb/include/util/OutputStream.hpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +1 -0
Fixed compiler warning
ndb/include/util/SimpleProperties.hpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +7 -0
Fixed compiler warning
ndb/src/common/debugger/EventLogger.cpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +1 -2
remove if on 'signal' as this is a function pointer and is always true
ndb/src/common/debugger/signaldata/BackupSignalData.cpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +3 -0
Add missing enums
ndb/src/common/logger/LogHandler.cpp@stripped, 2006-11-20 22:41:46+02:00, monty@stripped +2 -2
Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/src/common/portlib/NdbMutex.c@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/common/portlib/NdbThread.c@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/common/transporter/Transporter.cpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +2 -2
Swapped arguments to remove compiler warnings
ndb/src/cw/cpcd/CPCD.hpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +1 -0
Fixed compiler warning
ndb/src/kernel/blocks/backup/Backup.cpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +67 -61
Fixed compiler warning
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +4 -4
Fixed compiler warning
ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +3 -3
Fixed compiler warning
ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2006-11-20 22:41:47+02:00, monty@stripped +6 -1
Added missing enums
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +4 -3
Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +1 -0
Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.hpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/src/kernel/error/ndbd_exit_codes.c@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +1 -0
Fixed compiler warning
ndb/src/kernel/vm/TransporterCallback.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/src/mgmapi/mgmapi.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +4 -4
Fixed compiler warning
ndb/src/mgmsrv/Services.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/src/ndbapi/ClusterMgr.cpp@stripped, 2006-11-20 22:41:48+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/src/ndbapi/DictCache.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +2 -1
Fixed compiler warning
ndb/src/ndbapi/Ndb.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +10 -7
Fixed compiler warning
ndb/src/ndbapi/NdbOperationDefine.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/ndbapi/NdbOperationExec.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/src/ndbapi/NdbOperationInt.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/ndbapi/NdbOperationSearch.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/ndbapi/NdbTransaction.cpp@stripped, 2006-11-20 22:41:49+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/ndbapi/Ndbif.cpp@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/ndbapi/Ndbinit.cpp@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +2 -2
Fixed compiler warning
ndb/src/ndbapi/ndb_cluster_connection.cpp@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +1 -1
Fixed compiler warning
ndb/tools/drop_index.cpp@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +0 -3
Fixed compiler warning
ndb/tools/drop_tab.cpp@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +0 -3
Fixed compiler warning
ndb/tools/ndb_config.cpp@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +2 -0
Fixed compiler warning
regex/regexec.c@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +2 -1
Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +10 -10
Fixed compiler warning
sql-common/client.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +5 -5
Fixed compiler warning
sql-common/my_time.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/Makefile.am@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +2 -0
Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse
sql/filesort.cc@stripped, 2006-11-20 22:41:50+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/ha_archive.cc@stripped, 2006-11-20 22:41:51+02:00, monty@stripped +4 -2
Fixed compiler warning
sql/ha_federated.cc@stripped, 2006-11-20 22:41:51+02:00, monty@stripped +6 -6
Fixed compiler warning
sql/ha_federated.h@stripped, 2006-11-20 22:41:51+02:00, monty@stripped +1 -2
Fixed compiler warning
sql/ha_innodb.cc@stripped, 2006-11-20 22:41:51+02:00, monty@stripped +2 -2
Fixed compiler warning
sql/ha_myisam.cc@stripped, 2006-11-20 22:41:51+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/ha_myisammrg.cc@stripped, 2006-11-20 22:41:51+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/ha_ndbcluster.cc@stripped, 2006-11-20 22:41:52+02:00, monty@stripped +21 -20
Fixed compiler warning
sql/handler.cc@stripped, 2006-11-20 22:41:52+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/item_cmpfunc.cc@stripped, 2006-11-20 22:41:52+02:00, monty@stripped +2 -2
Fixed compiler warning
sql/item_subselect.cc@stripped, 2006-11-20 22:41:52+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/item_timefunc.cc@stripped, 2006-11-20 22:41:52+02:00, monty@stripped +2 -1
Fixed compiler warning
sql/log_event.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +8 -7
Fixed compiler warning
sql/mysqld.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +5 -5
Fixed compiler warning
sql/net_serv.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/opt_range.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +10 -10
Fixed compiler warning
Formated DBUG statements to be as rest of code
sql/slave.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +9 -8
Fixed compiler warning
sql/sql_acl.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/sql_cache.cc@stripped, 2006-11-20 22:41:53+02:00, monty@stripped +30 -37
Fixed compiler warning
Fixed bug in query cache when used with DBUG traceing
sql/sql_class.cc@stripped, 2006-11-20 22:41:54+02:00, monty@stripped +3 -3
Fixed compiler warning
sql/sql_class.h@stripped, 2006-11-20 22:41:54+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/sql_delete.cc@stripped, 2006-11-20 22:41:54+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/sql_parse.cc@stripped, 2006-11-20 22:41:54+02:00, monty@stripped +7 -5
Fixed compiler warning
Hack to fix my_sprintf() strings with %b
sql/sql_prepare.cc@stripped, 2006-11-20 22:41:54+02:00, monty@stripped +9 -3
Fixed compiler warning
Hack to fix my_sprintf() strings with %b
sql/sql_repl.cc@stripped, 2006-11-20 22:41:54+02:00, monty@stripped +2 -2
Fixed compiler warning
sql/sql_select.cc@stripped, 2006-11-20 22:41:55+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/sql_update.cc@stripped, 2006-11-20 22:41:55+02:00, monty@stripped +2 -2
Fixed compiler warning
sql/sql_view.cc@stripped, 2006-11-20 22:41:55+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/strfunc.cc@stripped, 2006-11-20 22:41:55+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/table.cc@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +1 -1
Fixed compiler warning
sql/tztime.cc@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +3 -4
Fixed compiler warning
sql/unireg.cc@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +4 -4
Fixed compiler warning
strings/decimal.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +1 -1
Fixed compiler warning
tests/mysql_client_test.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +6 -1
Fixed compiler warning
vio/viosocket.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +8 -8
Fixed compiler warning
vio/viossl.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +10 -10
Fixed compiler warning
vio/viosslfactories.c@stripped, 2006-11-20 22:41:56+02:00, monty@stripped +4 -4
Fixed compiler warning
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: nosik.monty.fi
# Root: /home/my/mysql-5.0
--- 1.248/client/mysqldump.c 2006-11-20 22:42:21 +02:00
+++ 1.249/client/mysqldump.c 2006-11-20 22:42:21 +02:00
@@ -30,14 +30,14 @@
** master/autocommit code by Brian Aker <brian@stripped>
** SSL by
** Andrei Errapart <andreie@stripped>
-** Tõnu Samuel <tonu@stripped>
+** Tõnu Samuel <tonu@stripped>
** XML by Gary Huntress <ghuntress@stripped> 10/10/01, cleaned up
** and adapted to mysqldump 05/11/01 by Jani Tolonen
** Added --single-transaction option 06/06/2002 by Peter Zaitsev
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
*/
-#define DUMP_VERSION "10.10"
+#define DUMP_VERSION "10.11"
#include <my_global.h>
#include <my_sys.h>
@@ -99,7 +99,7 @@
opt_dump_triggers= 0, opt_routines=0, opt_tz_utc=1;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static MYSQL mysql_connection,*mysql=0;
-static my_bool insert_pat_inited=0;
+static my_bool insert_pat_inited= 0, info_flag;
static DYNAMIC_STRING insert_pat;
static char *opt_password=0,*current_user=0,
*current_host=0,*path=0,*fields_terminated=0,
@@ -107,6 +107,7 @@
*where=0, *order_by=0,
*opt_compatible_mode_str= 0,
*err_ptr= 0;
+static char **defaults_argv= 0;
static char compatible_mode_normal_str[255];
static ulong opt_compatible_mode= 0;
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
@@ -116,7 +117,7 @@
static int first_error=0;
static DYNAMIC_STRING extended_row;
#include <sslopt-vars.h>
-FILE *md_result_file;
+FILE *md_result_file= 0;
#ifdef HAVE_SMEM
static char *shared_memory_base_name=0;
#endif
@@ -215,6 +216,8 @@
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag,
+ (gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (gptr*) &default_charset,
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -628,14 +631,6 @@
}
-void init_table_rule_hash(HASH* h)
-{
- if (hash_init(h, charset_info, 16, 0, 0,
- (hash_get_key) get_table_key,
- (hash_free_key) free_table_ent, 0))
- exit(EX_EOM);
-}
-
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
@@ -678,6 +673,7 @@
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
+ info_flag= 1;
break;
#include <sslopt-case.h>
case 'V': print_version(); exit(0);
@@ -718,9 +714,6 @@
fprintf(stderr, "Illegal use of option --ignore-table=<database>.<table>\n");
exit(1);
}
- if (!hash_inited(&ignore_table))
- init_table_rule_hash(&ignore_table);
-
if (my_hash_insert(&ignore_table, (byte*)my_strdup(argument, MYF(0))))
exit(EX_EOM);
break;
@@ -796,9 +789,21 @@
md_result_file= stdout;
load_defaults("my",load_default_groups,argc,argv);
+ defaults_argv= *argv;
- if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
- exit(ho_error);
+ if (hash_init(&ignore_table, charset_info, 16, 0, 0,
+ (hash_get_key) get_table_key,
+ (hash_free_key) free_table_ent, 0))
+ return(EX_EOM);
+ /* Don't copy cluster internal log tables */
+ if (my_hash_insert(&ignore_table,
+ (byte*) my_strdup("mysql.apply_status", MYF(MY_WME))) ||
+ my_hash_insert(&ignore_table,
+ (byte*) my_strdup("mysql.schema", MYF(MY_WME))))
+ return(EX_EOM);
+
+ if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
+ return(ho_error);
*mysql_params->p_max_allowed_packet= opt_max_allowed_packet;
*mysql_params->p_net_buffer_length= opt_net_buffer_length;
@@ -810,7 +815,7 @@
{
fprintf(stderr,
"%s: You must use option --tab with --fields-...\n", my_progname);
- return(1);
+ return(EX_USAGE);
}
/* Ensure consistency of the set of binlog & locking options */
@@ -820,7 +825,7 @@
{
fprintf(stderr, "%s: You can't use --single-transaction and "
"--lock-all-tables at the same time.\n", my_progname);
- return(1);
+ return(EX_USAGE);
}
if (opt_master_data)
opt_lock_all_tables= !opt_single_transaction;
@@ -829,14 +834,14 @@
if (enclosed && opt_enclosed)
{
fprintf(stderr, "%s: You can't use ..enclosed.. and ..optionally-enclosed.. at the same time.\n", my_progname);
- return(1);
+ return(EX_USAGE);
}
if ((opt_databases || opt_alldbs) && path)
{
fprintf(stderr,
"%s: --databases or --all-databases can't be used with --tab.\n",
my_progname);
- return(1);
+ return(EX_USAGE);
}
if (strcmp(default_charset, charset_info->csname) &&
!(charset_info= get_charset_by_csname(default_charset,
@@ -845,7 +850,7 @@
if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs))
{
short_usage();
- return 1;
+ return EX_USAGE;
}
if (tty_password)
opt_password=get_tty_password(NullS);
@@ -920,6 +925,23 @@
}
+static void free_resources()
+{
+ if (md_result_file && md_result_file != stdout)
+ my_fclose(md_result_file, MYF(0));
+ my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
+ if (hash_inited(&ignore_table))
+ hash_free(&ignore_table);
+ if (extended_insert)
+ dynstr_free(&extended_row);
+ if (insert_pat_inited)
+ dynstr_free(&insert_pat);
+ if (defaults_argv)
+ free_defaults(defaults_argv);
+ my_end(info_flag ? MY_CHECK_ERROR : 0);
+}
+
+
static void safe_exit(int error)
{
if (!first_error)
@@ -928,18 +950,19 @@
return;
if (mysql)
mysql_close(mysql);
+ free_resources();
exit(error);
}
-/* safe_exit */
/*
-** dbConnect -- connects to the host and selects DB.
+ db_connect -- connects to the host and selects DB.
*/
-static int dbConnect(char *host, char *user,char *passwd)
+
+static int connect_to_db(char *host, char *user,char *passwd)
{
char buff[20+FN_REFLEN];
- DBUG_ENTER("dbConnect");
+ DBUG_ENTER("connect_to_db");
verbose_msg("-- Connecting to %s...\n", host ? host : "localhost");
mysql_init(&mysql_connection);
@@ -960,11 +983,11 @@
#endif
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
if (!(mysql= mysql_real_connect(&mysql_connection,host,user,passwd,
- NULL,opt_mysql_port,opt_mysql_unix_port,
- 0)))
+ NULL,opt_mysql_port,opt_mysql_unix_port,
+ 0)))
{
DB_error(&mysql_connection, "when trying to connect");
- return 1;
+ DBUG_RETURN(1);
}
/*
Don't dump SET NAMES with a pre-4.1 server (bug#7997).
@@ -981,7 +1004,7 @@
if (mysql_query_with_error_report(mysql, 0, buff))
{
safe_exit(EX_MYSQLERR);
- return 1;
+ DBUG_RETURN(1);
}
/*
set time_zone to UTC to allow dumping date types between servers with
@@ -993,11 +1016,11 @@
if (mysql_query_with_error_report(mysql, 0, buff))
{
safe_exit(EX_MYSQLERR);
- return 1;
+ DBUG_RETURN(1);
}
}
- return 0;
-} /* dbConnect */
+ DBUG_RETURN(0);
+} /* connect_to_db */
/*
@@ -1519,7 +1542,11 @@
{
complete_insert= opt_complete_insert;
if (!insert_pat_inited)
- insert_pat_inited= init_dynamic_string(&insert_pat, "", 1024, 1024);
+ {
+ insert_pat_inited= 1;
+ if (init_dynamic_string(&insert_pat, "", 1024, 1024))
+ safe_exit(EX_MYSQLERR);
+ }
else
dynstr_set(&insert_pat, "");
}
@@ -1988,7 +2015,7 @@
*/
-static void dump_triggers_for_table (char *table, char *db)
+static void dump_triggers_for_table(char *table, char *db)
{
char *result_table;
char name_buff[NAME_LEN*4+3], table_buff[NAME_LEN*2+3];
@@ -2693,6 +2720,8 @@
{
int result=0;
char **db;
+ DBUG_ENTER("dump_databases");
+
for (db= db_names ; *db ; db++)
{
if (dump_all_tables_in_db(*db))
@@ -2706,7 +2735,7 @@
result=1;
}
}
- return result;
+ DBUG_RETURN(result);
} /* dump_databases */
@@ -2721,7 +2750,7 @@
0 Success.
1 Failure.
*/
-int init_dumping_views(char *qdatabase)
+int init_dumping_views(char *qdatabase __attribute__((unused)))
{
return 0;
} /* init_dumping_views */
@@ -2818,12 +2847,11 @@
} /* init_dumping */
+/* Return 1 if we should copy the table */
+
my_bool include_table(byte* hash_key, uint len)
{
- if (hash_search(&ignore_table, (byte*) hash_key, len))
- return FALSE;
-
- return TRUE;
+ return !hash_search(&ignore_table, (byte*) hash_key, len);
}
@@ -2832,10 +2860,10 @@
char *table;
uint numrows;
char table_buff[NAME_LEN*2+3];
-
char hash_key[2*NAME_LEN+2]; /* "db.tablename" */
char *afterdot;
int using_mysql_db= my_strcasecmp(&my_charset_latin1, database, "mysql");
+ DBUG_ENTER("dump_all_tables_in_db");
afterdot= strmov(hash_key, database);
*afterdot++= '.';
@@ -3257,7 +3285,6 @@
/*
-
SYNOPSIS
Check if we the table is one of the table types that should be ignored:
@@ -3297,8 +3324,8 @@
{
if (mysql_errno(mysql) != ER_PARSE_ERROR)
{ /* If old MySQL version */
- verbose_msg("-- Warning: Couldn't get status information for " \
- "table %s (%s)\n", table_name,mysql_error(mysql));
+ verbose_msg("-- Warning: Couldn't get status information for "
+ "table %s (%s)\n", table_name, mysql_error(mysql));
DBUG_RETURN(result); /* assume table is ok */
}
}
@@ -3653,19 +3680,24 @@
int main(int argc, char **argv)
{
+ int exit_code;
MY_INIT("mysqldump");
compatible_mode_normal_str[0]= 0;
default_charset= (char *)mysql_universal_client_charset;
bzero((char*) &ignore_table, sizeof(ignore_table));
- if (get_options(&argc, &argv))
+ exit_code= get_options(&argc, &argv);
+ if (exit_code)
{
- my_end(0);
- exit(EX_USAGE);
+ free_resources(0);
+ exit(exit_code);
}
- if (dbConnect(current_host, current_user, opt_password))
+ if (connect_to_db(current_host, current_user, opt_password))
+ {
+ free_resources(0);
exit(EX_MYSQLERR);
+ }
if (!path)
write_header(md_result_file, *argv);
@@ -3712,15 +3744,6 @@
dbDisconnect(current_host);
if (!path)
write_footer(md_result_file);
- if (md_result_file != stdout)
- my_fclose(md_result_file, MYF(0));
- my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
- if (hash_inited(&ignore_table))
- hash_free(&ignore_table);
- if (extended_insert)
- dynstr_free(&extended_row);
- if (insert_pat_inited)
- dynstr_free(&insert_pat);
- my_end(0);
+ free_resources();
return(first_error);
} /* main */
--- 1.5/dbug/dbug_analyze.c 2006-11-20 22:42:21 +02:00
+++ 1.6/dbug/dbug_analyze.c 2006-11-20 22:42:21 +02:00
@@ -169,7 +169,7 @@
*name_pos = temp->pos;
*time_entered = temp->time;
*child_time = temp->children;
- DBUG_PRINT ("pop", ("%d %d %d",*name_pos,*time_entered,*child_time));
+ DBUG_PRINT ("pop", ("%d %lu %lu",*name_pos,*time_entered,*child_time));
rtnval = stacktop--;
}
DBUG_RETURN (rtnval);
@@ -334,12 +334,12 @@
* function is found on the stack.
*/
while (pop (&oldpos, &oldtime, &oldchild)) {
- DBUG_PRINT ("popped", ("%d %d", oldtime, oldchild));
+ DBUG_PRINT ("popped", ("%lu %lu", oldtime, oldchild));
time = fn_time - oldtime;
t = top ();
t -> children += time;
DBUG_PRINT ("update", ("%s", modules[t -> pos].name));
- DBUG_PRINT ("update", ("%d", t -> children));
+ DBUG_PRINT ("update", ("%lu", t -> children));
time -= oldchild;
modules[oldpos].m_time += time;
modules[oldpos].m_calls++;
@@ -520,19 +520,19 @@
unsigned long int calls, time;
DBUG_ENTER ("out_body");
- DBUG_PRINT ("out_body", ("%d,%d",*s_calls,*s_time));
+ DBUG_PRINT ("out_body", ("%lu,%lu",*s_calls,*s_time));
if (root == MAXPROCS) {
- DBUG_PRINT ("out_body", ("%d,%d",*s_calls,*s_time));
+ DBUG_PRINT ("out_body", ("%lu,%lu",*s_calls,*s_time));
} else {
while (root != MAXPROCS) {
out_body (outf, s_table[root].lchild,s_calls,s_time);
out_item (outf, &modules[s_table[root].pos],&calls,&time);
- DBUG_PRINT ("out_body", ("-- %d -- %d --", calls, time));
+ DBUG_PRINT ("out_body", ("-- %lu -- %lu --", calls, time));
*s_calls += calls;
*s_time += time;
root = s_table[root].rchild;
}
- DBUG_PRINT ("out_body", ("%d,%d", *s_calls, *s_time));
+ DBUG_PRINT ("out_body", ("%lu,%lu", *s_calls, *s_time));
}
DBUG_VOID_RETURN;
}
--- 1.18/heap/_check.c 2006-11-20 22:42:21 +02:00
+++ 1.19/heap/_check.c 2006-11-20 22:42:21 +02:00
@@ -88,7 +88,8 @@
if (records != share->records || deleted != share->deleted)
{
DBUG_PRINT("error",("Found rows: %lu (%lu) deleted %lu (%lu)",
- records, share->records, deleted, share->deleted));
+ records, (ulong) share->records,
+ deleted, (ulong) share->deleted));
error= 1;
}
*info= save_info;
@@ -100,9 +101,9 @@
ulong blength, my_bool print_status)
{
int error;
- uint i,found,max_links,seek,links;
- uint rec_link; /* Only used with debugging */
- uint hash_buckets_found;
+ ulong i,found,max_links,seek,links;
+ ulong rec_link; /* Only used with debugging */
+ ulong hash_buckets_found;
HASH_INFO *hash_info;
error=0;
@@ -123,7 +124,9 @@
blength, records))
!= i)
{
- DBUG_PRINT("error",("Record in wrong link: Link %d Record: 0x%lx Record-link %d", i,hash_info->ptr_to_rec,rec_link));
+ DBUG_PRINT("error",
+ ("Record in wrong link: Link %lu Record: 0x%lx Record-link %lu",
+ i, (long) hash_info->ptr_to_rec, rec_link));
error=1;
}
else
@@ -141,18 +144,18 @@
if (keydef->hash_buckets != hash_buckets_found)
{
DBUG_PRINT("error",("Found %ld buckets, stats shows %ld buckets",
- hash_buckets_found, keydef->hash_buckets));
+ hash_buckets_found, (long) keydef->hash_buckets));
error=1;
}
DBUG_PRINT("info",
- ("records: %ld seeks: %d max links: %d hitrate: %.2f "
- "buckets: %d",
+ ("records: %ld seeks: %lu max links: %lu hitrate: %.2f "
+ "buckets: %lu",
records,seek,max_links,
(float) seek / (float) (records ? records : 1),
hash_buckets_found));
if (print_status)
- printf("Key: %d records: %ld seeks: %d max links: %d "
- "hitrate: %.2f buckets: %d\n",
+ printf("Key: %d records: %ld seeks: %lu max links: %lu "
+ "hitrate: %.2f buckets: %lu\n",
keynr, records, seek, max_links,
(float) seek / (float) (records ? records : 1),
hash_buckets_found);
@@ -180,8 +183,8 @@
key_length, SEARCH_FIND | SEARCH_SAME, not_used))
{
error= 1;
- DBUG_PRINT("error",("Record in wrong link: key: %d Record: 0x%lx\n",
- keynr, recpos));
+ DBUG_PRINT("error",("Record in wrong link: key: %u Record: 0x%lx\n",
+ keynr, (long) recpos));
}
else
found++;
--- 1.17/heap/hp_delete.c 2006-11-20 22:42:21 +02:00
+++ 1.18/heap/hp_delete.c 2006-11-20 22:42:21 +02:00
@@ -24,7 +24,7 @@
HP_SHARE *share=info->s;
HP_KEYDEF *keydef, *end, *p_lastinx;
DBUG_ENTER("heap_delete");
- DBUG_PRINT("enter",("info: %lx record: 0x%lx",info,record));
+ DBUG_PRINT("enter",("info: 0x%lx record: 0x%lx", (long) info, (long) record));
test_active(info);
@@ -144,7 +144,7 @@
info->current_hash_ptr=last_ptr;
info->current_ptr = last_ptr ? last_ptr->ptr_to_rec : 0;
DBUG_PRINT("info",("Corrected current_ptr to point at: 0x%lx",
- info->current_ptr));
+ (long) info->current_ptr));
}
empty=pos;
if (gpos)
--- 1.43/heap/hp_hash.c 2006-11-20 22:42:21 +02:00
+++ 1.44/heap/hp_hash.c 2006-11-20 22:42:21 +02:00
@@ -120,7 +120,7 @@
{
switch (nextflag) {
case 0: /* Search after key */
- DBUG_PRINT("exit",("found key at %d",pos->ptr_to_rec));
+ DBUG_PRINT("exit", ("found key at 0x%lx", (long) pos->ptr_to_rec));
info->current_hash_ptr=pos;
DBUG_RETURN(info->current_ptr= pos->ptr_to_rec);
case 1: /* Search next */
--- 1.21/heap/hp_open.c 2006-11-20 22:42:21 +02:00
+++ 1.22/heap/hp_open.c 2006-11-20 22:42:21 +02:00
@@ -64,7 +64,8 @@
info->opt_flag= READ_CHECK_USED; /* Check when changing */
#endif
DBUG_PRINT("exit",("heap: 0x%lx reclength: %d records_in_block: %d",
- info,share->reclength,share->block.records_in_block));
+ (long) info, share->reclength,
+ share->block.records_in_block));
DBUG_RETURN(info);
}
@@ -82,7 +83,7 @@
info= (HP_SHARE*) pos->data;
if (!strcmp(name, info->name))
{
- DBUG_PRINT("exit", ("Old heap_database: 0x%lx",info));
+ DBUG_PRINT("exit", ("Old heap_database: 0x%lx", (long) info));
DBUG_RETURN(info);
}
}
--- 1.15/heap/hp_rkey.c 2006-11-20 22:42:21 +02:00
+++ 1.16/heap/hp_rkey.c 2006-11-20 22:42:21 +02:00
@@ -23,7 +23,7 @@
HP_SHARE *share= info->s;
HP_KEYDEF *keyinfo= share->keydef + inx;
DBUG_ENTER("heap_rkey");
- DBUG_PRINT("enter",("base: 0x%lx inx: %d",info,inx));
+ DBUG_PRINT("enter",("info: 0x%lx inx: %d", (long) info, inx));
if ((uint) inx >= share->keys)
{
--- 1.8/heap/hp_rrnd.c 2006-11-20 22:42:21 +02:00
+++ 1.9/heap/hp_rrnd.c 2006-11-20 22:42:21 +02:00
@@ -29,7 +29,7 @@
{
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rrnd");
- DBUG_PRINT("enter",("info: 0x%lx pos: %lx",info,pos));
+ DBUG_PRINT("enter",("info: 0x%lx pos: %lx",(long) info, (long) pos));
info->lastinx= -1;
if (!(info->current_ptr= pos))
@@ -44,7 +44,7 @@
}
info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
memcpy(record,info->current_ptr,(size_t) share->reclength);
- DBUG_PRINT("exit",("found record at 0x%lx",info->current_ptr));
+ DBUG_PRINT("exit", ("found record at 0x%lx", (long) info->current_ptr));
info->current_hash_ptr=0; /* Can't use rnext */
DBUG_RETURN(0);
} /* heap_rrnd */
--- 1.23/heap/hp_write.c 2006-11-20 22:42:21 +02:00
+++ 1.24/heap/hp_write.c 2006-11-20 22:42:21 +02:00
@@ -138,7 +138,7 @@
pos=info->del_link;
info->del_link= *((byte**) pos);
info->deleted--;
- DBUG_PRINT("exit",("Used old position: 0x%lx",pos));
+ DBUG_PRINT("exit",("Used old position: 0x%lx",(long) pos));
DBUG_RETURN(pos);
}
if (!(block_pos=(info->records % info->block.records_in_block)))
@@ -153,9 +153,9 @@
DBUG_RETURN(NULL);
info->data_length+=length;
}
- DBUG_PRINT("exit",("Used new position: %lx",
- (byte*) info->block.level_info[0].last_blocks+block_pos*
- info->block.recbuffer));
+ DBUG_PRINT("exit",("Used new position: 0x%lx",
+ (long) ((byte*) info->block.level_info[0].last_blocks+
+ block_pos * info->block.recbuffer)));
DBUG_RETURN((byte*) info->block.level_info[0].last_blocks+
block_pos*info->block.recbuffer);
}
--- 1.247/libmysql/libmysql.c 2006-11-20 22:42:21 +02:00
+++ 1.248/libmysql/libmysql.c 2006-11-20 22:42:21 +02:00
@@ -2100,7 +2100,7 @@
}
stmt->bind= stmt->params + stmt->param_count;
stmt->state= MYSQL_STMT_PREPARE_DONE;
- DBUG_PRINT("info", ("Parameter count: %ld", stmt->param_count));
+ DBUG_PRINT("info", ("Parameter count: %u", stmt->param_count));
DBUG_RETURN(0);
}
@@ -2443,10 +2443,10 @@
{
NET *net= &stmt->mysql->net;
DBUG_ENTER("store_param");
- DBUG_PRINT("enter",("type: %d, buffer:%lx, length: %lu is_null: %d",
+ DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d",
param->buffer_type,
- param->buffer ? param->buffer : "0", *param->length,
- *param->is_null));
+ (long) (param->buffer ? param->buffer : NullS),
+ *param->length, *param->is_null));
if (*param->is_null)
store_param_null(net, param);
@@ -3325,8 +3325,8 @@
MYSQL_BIND *param;
DBUG_ENTER("mysql_stmt_send_long_data");
DBUG_ASSERT(stmt != 0);
- DBUG_PRINT("enter",("param no : %d, data : %lx, length : %ld",
- param_number, data, length));
+ DBUG_PRINT("enter",("param no: %d data: 0x%lx, length : %ld",
+ param_number, (long) data, length));
/*
We only need to check for stmt->param_count, if it's not null
@@ -4409,7 +4409,7 @@
ulong bind_count= stmt->field_count;
uint param_count= 0;
DBUG_ENTER("mysql_stmt_bind_result");
- DBUG_PRINT("enter",("field_count: %d", bind_count));
+ DBUG_PRINT("enter",("field_count: %lu", bind_count));
if (!bind_count)
{
--- 1.18/myisam/mi_close.c 2006-11-20 22:42:22 +02:00
+++ 1.19/myisam/mi_close.c 2006-11-20 22:42:22 +02:00
@@ -28,8 +28,9 @@
int error=0,flag;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_close");
- DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
- info,(uint) share->reopen, (uint) share->tot_locks));
+ DBUG_PRINT("enter",("base: 0x%lx reopen: %u locks: %u",
+ (long) info, (uint) share->reopen,
+ (uint) share->tot_locks));
pthread_mutex_lock(&THR_LOCK_myisam);
if (info->lock_type == F_EXTRA_LCK)
--- 1.40/myisam/mi_delete.c 2006-11-20 22:42:22 +02:00
+++ 1.41/myisam/mi_delete.c 2006-11-20 22:42:22 +02:00
@@ -165,7 +165,7 @@
DBUG_PRINT("error",("Couldn't allocate memory"));
DBUG_RETURN(my_errno=ENOMEM);
}
- DBUG_PRINT("info",("root_page: %ld",old_root));
+ DBUG_PRINT("info",("root_page: %ld", (long) old_root));
if (!_mi_fetch_keypage(info,keyinfo,old_root,DFLT_INIT_HITS,root_buff,0))
{
error= -1;
@@ -410,7 +410,7 @@
MYISAM_SHARE *share=info->s;
MI_KEY_PARAM s_temp;
DBUG_ENTER("del");
- DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", leaf_page,
+ DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", (long) leaf_page,
(ulong) keypos));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff));
@@ -597,7 +597,8 @@
else
{ /* Page is full */
endpos=anc_buff+anc_length;
- DBUG_PRINT("test",("anc_buff: %lx endpos: %lx",anc_buff,endpos));
+ DBUG_PRINT("test",("anc_buff: 0x%lx endpos: 0x%lx",
+ (long) anc_buff, (long) endpos));
if (keypos != anc_buff+2+key_reflength &&
!_mi_get_last_key(info,keyinfo,anc_buff,anc_key,keypos,&length))
goto err;
@@ -775,7 +776,7 @@
int s_length;
uchar *start;
DBUG_ENTER("remove_key");
- DBUG_PRINT("enter",("keypos: %lx page_end: %lx",keypos,page_end));
+ DBUG_PRINT("enter",("keypos: 0x%lx page_end: 0x%lx",(long) keypos, (long) page_end));
start=keypos;
if (!(keyinfo->flag &
--- 1.43/myisam/mi_dynrec.c 2006-11-20 22:42:22 +02:00
+++ 1.44/myisam/mi_dynrec.c 2006-11-20 22:42:22 +02:00
@@ -1066,8 +1066,8 @@
err:
my_errno= HA_ERR_WRONG_IN_RECORD;
- DBUG_PRINT("error",("to_end: %lx -> %lx from_end: %lx -> %lx",
- to,to_end,from,from_end));
+ DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx",
+ (long) to, (long) to_end, (long) from, (long) from_end));
DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
} /* _mi_rec_unpack */
--- 1.22/myisam/mi_page.c 2006-11-20 22:42:22 +02:00
+++ 1.23/myisam/mi_page.c 2006-11-20 22:42:22 +02:00
@@ -27,7 +27,7 @@
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
- DBUG_PRINT("enter",("page: %ld",page));
+ DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (byte*) buff,
@@ -80,7 +80,7 @@
my_errno=EINVAL;
DBUG_RETURN((-1));
}
- DBUG_PRINT("page",("write page at: %lu",(long) page,buff));
+ DBUG_PRINT("page",("write page at: %lu",(long) page));
DBUG_DUMP("buff",(byte*) buff,mi_getint(buff));
#endif
--- 1.11/myisam/mi_statrec.c 2006-11-20 22:42:22 +02:00
+++ 1.12/myisam/mi_statrec.c 2006-11-20 22:42:22 +02:00
@@ -255,8 +255,8 @@
if (filepos >= info->state->data_file_length)
{
DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld",
- filepos/share->base.reclength,filepos,
- info->state->records, info->state->del));
+ (long) filepos/share->base.reclength, (long) filepos,
+ (long) info->state->records, (long) info->state->del));
fast_mi_writeinfo(info);
DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE);
}
--- 1.29/myisam/mi_test2.c 2006-11-20 22:42:22 +02:00
+++ 1.30/myisam/mi_test2.c 2006-11-20 22:42:22 +02:00
@@ -813,7 +813,7 @@
printf("Write records: %d\nUpdate records: %d\nSame-key-read: %d\nDelete records: %d\n", write_count,update,dupp_keys,opt_delete);
if (rec_pointer_size)
printf("Record pointer size: %d\n",rec_pointer_size);
- printf("myisam_block_size: %u\n", myisam_block_size);
+ printf("myisam_block_size: %lu\n", myisam_block_size);
if (key_cacheing)
{
puts("Key cache used");
--- 1.57/myisam/mi_write.c 2006-11-20 22:42:22 +02:00
+++ 1.58/myisam/mi_write.c 2006-11-20 22:42:22 +02:00
@@ -339,7 +339,7 @@
my_bool was_last_key;
my_off_t next_page, dupp_key_pos;
DBUG_ENTER("w_search");
- DBUG_PRINT("enter",("page: %ld",page));
+ DBUG_PRINT("enter",("page: %ld", (long) page));
search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY;
if (!(temp_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
@@ -462,7 +462,7 @@
uchar *endpos, *prev_key;
MI_KEY_PARAM s_temp;
DBUG_ENTER("_mi_insert");
- DBUG_PRINT("enter",("key_pos: %lx",key_pos));
+ DBUG_PRINT("enter",("key_pos: 0x%lx", (long) key_pos));
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,USE_WHOLE_KEY););
nod_flag=mi_test_if_nod(anc_buff);
@@ -483,8 +483,8 @@
{
DBUG_PRINT("test",("t_length: %d ref_len: %d",
t_length,s_temp.ref_length));
- DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: %lx",
- s_temp.n_ref_length,s_temp.n_length,s_temp.key));
+ DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: 0x%lx",
+ s_temp.n_ref_length,s_temp.n_length, (long) s_temp.key));
}
#endif
if (t_length > 0)
@@ -677,7 +677,8 @@
} while (page < end);
*return_key_length=length;
*after_key=page;
- DBUG_PRINT("exit",("returns: %lx page: %lx half: %lx",lastpos,page,end));
+ DBUG_PRINT("exit",("returns: 0x%lx page: 0x%lx half: 0x%lx",
+ (long) lastpos, (long) page, (long) end));
DBUG_RETURN(lastpos);
} /* _mi_find_half_pos */
@@ -732,7 +733,8 @@
}
*return_key_length=last_length;
*after_key=lastpos;
- DBUG_PRINT("exit",("returns: %lx page: %lx end: %lx",prevpos,page,end));
+ DBUG_PRINT("exit",("returns: 0x%lx page: 0x%lx end: 0x%lx",
+ (long) prevpos,(long) page,(long) end));
DBUG_RETURN(prevpos);
} /* _mi_find_last_pos */
@@ -768,7 +770,7 @@
next_page= _mi_kpos(info->s->base.key_reflength,
father_key_pos+father_keylength);
buff=info->buff;
- DBUG_PRINT("test",("use right page: %lu",next_page));
+ DBUG_PRINT("test",("use right page: %lu", (ulong) next_page));
}
else
{
@@ -777,7 +779,7 @@
next_page= _mi_kpos(info->s->base.key_reflength,father_key_pos);
/* Fix that curr_buff is to left */
buff=curr_buff; curr_buff=info->buff;
- DBUG_PRINT("test",("use left page: %lu",next_page));
+ DBUG_PRINT("test",("use left page: %lu", (ulong) next_page));
} /* father_key_pos ptr to parting key */
if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,info->buff,0))
--- 1.52/myisam/myisampack.c 2006-11-20 22:42:22 +02:00
+++ 1.53/myisam/myisampack.c 2006-11-20 22:42:22 +02:00
@@ -2036,7 +2036,7 @@
uint huff_tree_bits;
huff_tree_bits=max_bit(trees ? trees-1 : 0);
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
DBUG_PRINT("info", ("column types:"));
DBUG_PRINT("info", ("FIELD_NORMAL 0"));
DBUG_PRINT("info", ("FIELD_SKIP_ENDSPACE 1"));
@@ -2048,12 +2048,12 @@
DBUG_PRINT("info", ("FIELD_ZERO 7"));
DBUG_PRINT("info", ("FIELD_VARCHAR 8"));
DBUG_PRINT("info", ("FIELD_CHECK 9"));
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
DBUG_PRINT("info", ("pack type as a set of flags:"));
DBUG_PRINT("info", ("PACK_TYPE_SELECTED 1"));
DBUG_PRINT("info", ("PACK_TYPE_SPACE_FIELDS 2"));
DBUG_PRINT("info", ("PACK_TYPE_ZERO_FILL 4"));
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 2)
{
VOID(printf("\n"));
@@ -2126,7 +2126,7 @@
return 0;
}
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 2)
VOID(printf("\n"));
tree_no= 0;
@@ -2137,7 +2137,7 @@
if (huff_tree->tree_number == 0)
continue; /* Deleted tree */
tree_no++;
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 3)
VOID(printf("\n"));
/* Count the total number of elements (byte codes or column values). */
@@ -2329,7 +2329,7 @@
}
flush_bits();
}
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 2)
VOID(printf("\n"));
my_afree((gptr) packed_tree);
@@ -2507,7 +2507,7 @@
end_pos-=count->max_zero_fill;
field_length-=count->max_zero_fill;
- switch(count->field_type) {
+ switch (count->field_type) {
case FIELD_SKIP_ZERO:
if (!memcmp((byte*) start_pos,zero_string,field_length))
{
@@ -2726,6 +2726,7 @@
break;
}
case FIELD_LAST:
+ case FIELD_enum_val_count:
abort(); /* Impossible */
}
start_pos+=count->max_zero_fill;
--- 1.12/myisammrg/myrg_extra.c 2006-11-20 22:42:22 +02:00
+++ 1.13/myisammrg/myrg_extra.c 2006-11-20 22:42:22 +02:00
@@ -28,7 +28,7 @@
int error,save_error=0;
MYRG_TABLE *file;
DBUG_ENTER("myrg_extra");
- DBUG_PRINT("info",("function: %d",(ulong) function));
+ DBUG_PRINT("info",("function: %lu", (ulong) function));
if (function == HA_EXTRA_CACHE)
{
--- 1.311/mysql-test/mysql-test-run.sh 2006-11-20 22:42:22 +02:00
+++ 1.312/mysql-test/mysql-test-run.sh 2006-11-20 22:42:22 +02:00
@@ -182,19 +182,14 @@
SOURCE_DIST=1
else
BINARY_DIST=1
-fi
-# ... one level for tar.gz, two levels for a RPM installation
-if [ -d ./bin ] ; then
- # this is not perfect: we have
- # /usr/share/mysql/ # mysql-test-run is here, so this is "$MYSQL_TEST_DIR"
- # /usr/bin/ # with MySQL client programs
- # so the existence of "/usr/share/bin/" would make this test fail.
- BASEDIR=`pwd`
-else
- cd ..
- BASEDIR=`pwd`
+ # ... one level for tar.gz, two levels for a RPM installation
+ if [ ! -f ./bin/mysql_upgrade ] ; then
+ # Has to be RPM installation
+ cd ..
+ fi
fi
+BASEDIR=`pwd`
cd $MYSQL_TEST_DIR
MYSQL_TEST_WINDIR=$MYSQL_TEST_DIR
@@ -2097,6 +2092,9 @@
# Remove old berkeley db log files that can confuse the server
$RM -f $MASTER_MYDDIR/log.*
$RM -f $MASTER_MYDDIR"1"/log.*
+
+ # Remove old log and reject files
+ $RM -f r/*.reject r/*.progress r/*.log r/*.warnings
wait_for_master=$SLEEP_TIME_FOR_FIRST_MASTER
wait_for_slave=$SLEEP_TIME_FOR_FIRST_SLAVE
--- 1.82/mysys/default.c 2006-11-20 22:42:22 +02:00
+++ 1.83/mysys/default.c 2006-11-20 22:42:22 +02:00
@@ -484,7 +484,7 @@
my_bool have_ext= fn_ext(config_file)[0] != 0;
const char **exts_to_use= have_ext ? empty_list : f_extensions;
- for (ext= (char**) exts_to_use; *ext; *ext++)
+ for (ext= (char**) exts_to_use; *ext; ext++)
{
int error;
if ((error= search_default_file_with_ext(opt_handler, handler_ctx,
@@ -672,7 +672,7 @@
ext= fn_ext(search_file->name);
/* check extension */
- for (tmp_ext= (char**) f_extensions; *tmp_ext; *tmp_ext++)
+ for (tmp_ext= (char**) f_extensions; *tmp_ext; tmp_ext++)
{
if (!strcmp(ext, *tmp_ext))
break;
@@ -861,7 +861,7 @@
{
for (dirs=default_directories ; *dirs; dirs++)
{
- for (ext= (char**) exts_to_use; *ext; *ext++)
+ for (ext= (char**) exts_to_use; *ext; ext++)
{
const char *pos;
char *end;
--- 1.47/mysys/hash.c 2006-11-20 22:42:22 +02:00
+++ 1.48/mysys/hash.c 2006-11-20 22:42:22 +02:00
@@ -53,7 +53,7 @@
void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
DBUG_ENTER("hash_init");
- DBUG_PRINT("enter",("hash: 0x%lx size: %d",hash,size));
+ DBUG_PRINT("enter",("hash: 0x%lx size: %d", (long) hash, size));
hash->records=0;
if (my_init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0))
@@ -109,7 +109,7 @@
void hash_free(HASH *hash)
{
DBUG_ENTER("hash_free");
- DBUG_PRINT("enter",("hash: 0x%lxd",hash));
+ DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
hash_free_elements(hash);
hash->free= 0;
@@ -129,7 +129,7 @@
void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
- DBUG_PRINT("enter",("hash: 0x%lxd",hash));
+ DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
hash_free_elements(hash);
reset_dynamic(&hash->array);
@@ -644,7 +644,8 @@
if ((rec_link=hash_rec_mask(hash,hash_info,blength,records)) != i)
{
DBUG_PRINT("error",
- ("Record in wrong link at %d: Start %d Record: 0x%lx Record-link %d", idx,i,hash_info->data,rec_link));
+ ("Record in wrong link at %d: Start %d Record: 0x%lx Record-link %d",
+ idx, i, (long) hash_info->data, rec_link));
error=1;
}
else
@@ -655,12 +656,12 @@
}
if (found != records)
{
- DBUG_PRINT("error",("Found %ld of %ld records"));
+ DBUG_PRINT("error",("Found %u of %u records", found, records));
error=1;
}
if (records)
DBUG_PRINT("info",
- ("records: %ld seeks: %d max links: %d hitrate: %.2f",
+ ("records: %u seeks: %d max links: %d hitrate: %.2f",
records,seek,max_links,(float) seek / (float) records));
return error;
}
--- 1.10/mysys/list.c 2006-11-20 22:42:22 +02:00
+++ 1.11/mysys/list.c 2006-11-20 22:42:22 +02:00
@@ -28,7 +28,7 @@
LIST *list_add(LIST *root, LIST *element)
{
DBUG_ENTER("list_add");
- DBUG_PRINT("enter",("root: 0x%lx element: 0x%lx", root, element));
+ DBUG_PRINT("enter",("root: 0x%lx element: 0x%lx", (long) root, (long) element));
if (root)
{
if (root->prev) /* If add in mid of list */
--- 1.59/mysys/mf_iocache.c 2006-11-20 22:42:22 +02:00
+++ 1.60/mysys/mf_iocache.c 2006-11-20 22:42:22 +02:00
@@ -594,7 +594,8 @@
DBUG_ENTER("init_io_cache_share");
DBUG_PRINT("io_cache_share", ("read_cache: 0x%lx share: 0x%lx "
"write_cache: 0x%lx threads: %u",
- read_cache, cshare, write_cache, num_threads));
+ (long) read_cache, (long) cshare,
+ (long) write_cache, num_threads));
DBUG_ASSERT(num_threads > 1);
DBUG_ASSERT(read_cache->type == READ_CACHE);
@@ -656,7 +657,7 @@
pthread_mutex_lock(&cshare->mutex);
DBUG_PRINT("io_cache_share", ("%s: 0x%lx",
(cache == cshare->source_cache) ?
- "writer" : "reader", cache));
+ "writer" : "reader", (long) cache));
/* Remove from share. */
total= --cshare->total_threads;
@@ -732,7 +733,7 @@
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
(cache == cshare->source_cache) ?
- "writer" : "reader", cache, (ulong) pos,
+ "writer" : "reader", (long) cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
@@ -871,7 +872,7 @@
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader",
- cache, (ulong) cshare->pos_in_file,
+ (long) cache, (ulong) cshare->pos_in_file,
cshare->total_threads));
cshare->running_threads= cshare->total_threads;
--- 1.56/mysys/mf_keycache.c 2006-11-20 22:42:22 +02:00
+++ 1.57/mysys/mf_keycache.c 2006-11-20 22:42:22 +02:00
@@ -418,9 +418,9 @@
DBUG_PRINT("exit",
("disk_blocks: %d block_root: 0x%lx hash_entries: %d\
hash_root: 0x%lx hash_links: %d hash_link_root: 0x%lx",
- keycache->disk_blocks, keycache->block_root,
- keycache->hash_entries, keycache->hash_root,
- keycache->hash_links, keycache->hash_link_root));
+ keycache->disk_blocks, (long) keycache->block_root,
+ keycache->hash_entries, (long) keycache->hash_root,
+ keycache->hash_links, (long) keycache->hash_link_root));
bzero((gptr) keycache->changed_blocks,
sizeof(keycache->changed_blocks[0]) * CHANGED_BLOCKS_HASH);
bzero((gptr) keycache->file_blocks,
@@ -633,7 +633,7 @@
void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
{
DBUG_ENTER("end_key_cache");
- DBUG_PRINT("enter", ("key_cache: 0x%lx", keycache));
+ DBUG_PRINT("enter", ("key_cache: 0x%lx", (long) keycache));
if (!keycache->key_cache_inited)
DBUG_VOID_RETURN;
@@ -652,7 +652,7 @@
keycache->blocks_changed= 0;
}
- DBUG_PRINT("status", ("used: %d changed: %d w_requests: %lu "
+ DBUG_PRINT("status", ("used: %lu changed: %lu w_requests: %lu "
"writes: %lu r_requests: %lu reads: %lu",
keycache->blocks_used, keycache->global_blocks_changed,
(ulong) keycache->global_cache_w_requests,
@@ -1085,7 +1085,7 @@
if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--;
block->temperature= BLOCK_HOT;
- KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks=%u",
+ KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu",
keycache->warm_blocks));
}
link_block(keycache, block, hot, (my_bool)at_end);
@@ -1104,7 +1104,7 @@
keycache->warm_blocks++;
block->temperature= BLOCK_WARM;
}
- KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks=%u",
+ KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu",
keycache->warm_blocks));
}
}
@@ -1352,11 +1352,11 @@
DBUG_ENTER("find_key_block");
KEYCACHE_THREAD_TRACE("find_key_block:begin");
- DBUG_PRINT("enter", ("fd: %u pos %lu wrmode: %lu",
- (uint) file, (ulong) filepos, (uint) wrmode));
- KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %u pos: %lu wrmode: %lu",
- (uint) file, (ulong) filepos,
- (uint) wrmode));
+ DBUG_PRINT("enter", ("fd: %d pos: %lu wrmode: %d",
+ file, (ulong) filepos, wrmode));
+ KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %d pos: %lu wrmode: %d",
+ file, (ulong) filepos,
+ wrmode));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache2",
test_key_cache(keycache, "start of find_key_block", 0););
@@ -1646,8 +1646,8 @@
KEYCACHE_DBUG_ASSERT(page_status != -1);
*page_st=page_status;
KEYCACHE_DBUG_PRINT("find_key_block",
- ("fd: %u pos %lu block->status %u page_status %lu",
- (uint) file, (ulong) filepos, block->status,
+ ("fd: %d pos: %lu block->status: %u page_status: %u",
+ file, (ulong) filepos, block->status,
(uint) page_status));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
@@ -2338,7 +2338,7 @@
BLOCK_LINK *cache_buff[FLUSH_CACHE],**cache;
int last_errno= 0;
DBUG_ENTER("flush_key_blocks_int");
- DBUG_PRINT("enter",("file: %d blocks_used: %d blocks_changed: %d",
+ DBUG_PRINT("enter",("file: %d blocks_used: %lu blocks_changed: %lu",
file, keycache->blocks_used, keycache->blocks_changed));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
@@ -2543,7 +2543,7 @@
{
int res;
DBUG_ENTER("flush_key_blocks");
- DBUG_PRINT("enter", ("keycache: 0x%lx", keycache));
+ DBUG_PRINT("enter", ("keycache: 0x%lx", (long) keycache));
if (keycache->disk_blocks <= 0)
DBUG_RETURN(0);
--- 1.32/mysys/my_alloc.c 2006-11-20 22:42:22 +02:00
+++ 1.33/mysys/my_alloc.c 2006-11-20 22:42:22 +02:00
@@ -48,7 +48,8 @@
uint pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("init_alloc_root");
- DBUG_PRINT("enter",("root: 0x%lx", mem_root));
+ DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
+
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc= 32;
mem_root->block_size= block_size - ALLOC_ROOT_MIN_BLOCK_SIZE;
@@ -146,7 +147,7 @@
#if defined(HAVE_purify) && defined(EXTRA_DEBUG)
reg1 USED_MEM *next;
DBUG_ENTER("alloc_root");
- DBUG_PRINT("enter",("root: 0x%lx", mem_root));
+ DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
@@ -160,8 +161,8 @@
next->next= mem_root->used;
next->size= Size;
mem_root->used= next;
- DBUG_PRINT("exit",("ptr: 0x%lx", (((char*) next)+
- ALIGN_SIZE(sizeof(USED_MEM)))));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) (((char*) next)+
+ ALIGN_SIZE(sizeof(USED_MEM)))));
DBUG_RETURN((gptr) (((char*) next)+ALIGN_SIZE(sizeof(USED_MEM))));
#else
uint get_size, block_size;
@@ -169,7 +170,7 @@
reg1 USED_MEM *next= 0;
reg2 USED_MEM **prev;
DBUG_ENTER("alloc_root");
- DBUG_PRINT("enter",("root: 0x%lx", mem_root));
+ DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
Size= ALIGN_SIZE(Size);
@@ -328,7 +329,7 @@
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("free_root");
- DBUG_PRINT("enter",("root: 0x%lx flags: %u", root, (uint) MyFlags));
+ DBUG_PRINT("enter",("root: 0x%lx flags: %u", (long) root, (uint) MyFlags));
if (!root) /* QQ: Should be deleted */
DBUG_VOID_RETURN; /* purecov: inspected */
--- 1.15/mysys/my_fopen.c 2006-11-20 22:42:22 +02:00
+++ 1.16/mysys/my_fopen.c 2006-11-20 22:42:22 +02:00
@@ -79,7 +79,7 @@
my_stream_opened++;
my_file_info[fileno(fd)].type = STREAM_BY_FOPEN;
pthread_mutex_unlock(&THR_LOCK_open);
- DBUG_PRINT("exit",("stream: 0x%lx",fd));
+ DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
DBUG_RETURN(fd);
}
pthread_mutex_unlock(&THR_LOCK_open);
@@ -103,7 +103,7 @@
{
int err,file;
DBUG_ENTER("my_fclose");
- DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",fd, MyFlags));
+ DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d", (long) fd, MyFlags));
pthread_mutex_lock(&THR_LOCK_open);
file=fileno(fd);
@@ -163,7 +163,7 @@
pthread_mutex_unlock(&THR_LOCK_open);
}
- DBUG_PRINT("exit",("stream: 0x%lx",fd));
+ DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
DBUG_RETURN(fd);
} /* my_fdopen */
--- 1.8/mysys/my_fstream.c 2006-11-20 22:42:22 +02:00
+++ 1.9/mysys/my_fstream.c 2006-11-20 22:42:22 +02:00
@@ -40,7 +40,7 @@
uint readbytes;
DBUG_ENTER("my_fread");
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d",
- stream, Buffer, Count, MyFlags));
+ (long) stream, (long) Buffer, Count, MyFlags));
if ((readbytes = (uint) fread(Buffer,sizeof(char),(size_t) Count,stream))
!= Count)
@@ -81,7 +81,7 @@
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d",
- stream, Buffer, Count, MyFlags));
+ (long) stream, (long) Buffer, Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
@@ -153,7 +153,7 @@
{
DBUG_ENTER("my_fseek");
DBUG_PRINT("my",("stream: 0x%lx pos: %lu whence: %d MyFlags: %d",
- stream, pos, whence, MyFlags));
+ (long) stream, (long) pos, whence, MyFlags));
DBUG_RETURN(fseek(stream, (off_t) pos, whence) ?
MY_FILEPOS_ERROR : (my_off_t) ftell(stream));
} /* my_seek */
@@ -166,7 +166,7 @@
{
off_t pos;
DBUG_ENTER("my_ftell");
- DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",stream, MyFlags));
+ DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d", (long) stream, MyFlags));
pos=ftell(stream);
DBUG_PRINT("exit",("ftell: %lu",(ulong) pos));
DBUG_RETURN((my_off_t) pos);
--- 1.17/mysys/my_getwd.c 2006-11-20 22:42:22 +02:00
+++ 1.18/mysys/my_getwd.c 2006-11-20 22:42:22 +02:00
@@ -45,7 +45,7 @@
{
my_string pos;
DBUG_ENTER("my_getwd");
- DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d", buf,size,MyFlags));
+ DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d", (long) buf,size,MyFlags));
#if ! defined(MSDOS)
if (curr_dir[0]) /* Current pos is saved here */
--- 1.25/mysys/my_lib.c 2006-11-20 22:42:22 +02:00
+++ 1.26/mysys/my_lib.c 2006-11-20 22:42:22 +02:00
@@ -638,7 +638,7 @@
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s', stat_area: 0x%lx, MyFlags: %d", path,
- (byte *) stat_area, my_flags));
+ (long) stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area = (MY_STAT *) my_malloc(sizeof(MY_STAT), my_flags)))
--- 1.6/mysys/my_lread.c 2006-11-20 22:42:22 +02:00
+++ 1.7/mysys/my_lread.c 2006-11-20 22:42:22 +02:00
@@ -27,8 +27,8 @@
{
uint32 readbytes;
DBUG_ENTER("my_lread");
- DBUG_PRINT("my",("Fd: %d Buffer: %ld Count: %ld MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %lu MyFlags: %d",
+ Filedes, (long) Buffer, (ulong) Count, MyFlags));
DBUG_PRINT("error", ("Deprecated my_lread() function should not be used."));
--- 1.7/mysys/my_lwrite.c 2006-11-20 22:42:22 +02:00
+++ 1.8/mysys/my_lwrite.c 2006-11-20 22:42:22 +02:00
@@ -23,8 +23,8 @@
{
uint32 writenbytes;
DBUG_ENTER("my_lwrite");
- DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %lu MyFlags: %d",
+ Filedes, (long) Buffer, (ulong) Count, MyFlags));
DBUG_PRINT("error", ("Deprecated my_lwrite() function should not be used."));
--- 1.10/mysys/my_malloc.c 2006-11-20 22:42:22 +02:00
+++ 1.11/mysys/my_malloc.c 2006-11-20 22:42:22 +02:00
@@ -44,7 +44,7 @@
}
else if (my_flags & MY_ZEROFILL)
bzero(point,size);
- DBUG_PRINT("exit",("ptr: 0x%lx",point));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_malloc */
@@ -55,7 +55,7 @@
void my_no_flags_free(gptr ptr)
{
DBUG_ENTER("my_free");
- DBUG_PRINT("my",("ptr: 0x%lx",ptr));
+ DBUG_PRINT("my",("ptr: 0x%lx", (long) ptr));
if (ptr)
free(ptr);
DBUG_VOID_RETURN;
--- 1.11/mysys/my_pread.c 2006-11-20 22:42:22 +02:00
+++ 1.12/mysys/my_pread.c 2006-11-20 22:42:22 +02:00
@@ -30,7 +30,7 @@
int error;
DBUG_ENTER("my_pread");
DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %u MyFlags: %d",
- Filedes, (ulong) offset, Buffer, Count, MyFlags));
+ Filedes, (ulong) offset, (long) Buffer, Count, MyFlags));
for (;;)
{
@@ -49,8 +49,8 @@
if (error)
{
my_errno=errno;
- DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
- readbytes,Count,Filedes,my_errno));
+ DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d",
+ (int) readbytes, Count,Filedes,my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
{
@@ -87,7 +87,7 @@
ulong written;
DBUG_ENTER("my_pwrite");
DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %d MyFlags: %d",
- Filedes, (ulong) offset,Buffer, Count, MyFlags));
+ Filedes, (ulong) offset, (long) Buffer, Count, MyFlags));
errors=0; written=0L;
for (;;)
--- 1.10/mysys/my_read.c 2006-11-20 22:42:22 +02:00
+++ 1.11/mysys/my_read.c 2006-11-20 22:42:22 +02:00
@@ -39,7 +39,7 @@
uint readbytes, save_count;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ Filedes, (long) Buffer, Count, MyFlags));
save_count= Count;
for (;;)
@@ -48,8 +48,8 @@
if ((readbytes= (uint) read(Filedes, Buffer, Count)) != Count)
{
my_errno= errno ? errno : -1;
- DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
- readbytes, Count, Filedes, my_errno));
+ DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d",
+ (int) readbytes, Count, Filedes, my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
{
--- 1.8/mysys/my_realloc.c 2006-11-20 22:42:22 +02:00
+++ 1.9/mysys/my_realloc.c 2006-11-20 22:42:22 +02:00
@@ -27,7 +27,7 @@
{
gptr point;
DBUG_ENTER("my_realloc");
- DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d",oldpoint, size,
+ DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d", (long) oldpoint, size,
my_flags));
if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR))
@@ -60,6 +60,6 @@
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG), size);
}
#endif
- DBUG_PRINT("exit",("ptr: 0x%lx",point));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_realloc */
--- 1.14/mysys/my_seek.c 2006-11-20 22:42:22 +02:00
+++ 1.15/mysys/my_seek.c 2006-11-20 22:42:22 +02:00
@@ -61,7 +61,7 @@
if (newpos == (os_off_t) -1)
{
my_errno=errno;
- DBUG_PRINT("error",("lseek: %lu, errno: %d",newpos,errno));
+ DBUG_PRINT("error",("lseek: %lu, errno: %d", (ulong) newpos,errno));
DBUG_RETURN(MY_FILEPOS_ERROR);
}
if ((my_off_t) newpos != pos)
--- 1.12/mysys/my_write.c 2006-11-20 22:42:22 +02:00
+++ 1.13/mysys/my_write.c 2006-11-20 22:42:22 +02:00
@@ -27,7 +27,7 @@
ulong written;
DBUG_ENTER("my_write");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %d MyFlags: %d",
- Filedes, Buffer, Count, MyFlags));
+ Filedes, (long) Buffer, Count, MyFlags));
errors=0; written=0L;
for (;;)
--- 1.25/mysys/safemalloc.c 2006-11-20 22:42:22 +02:00
+++ 1.26/mysys/safemalloc.c 2006-11-20 22:42:22 +02:00
@@ -194,7 +194,7 @@
if ((MyFlags & MY_ZEROFILL) || !sf_malloc_quick)
bfill(data, size, (char) (MyFlags & MY_ZEROFILL ? 0 : ALLOC_VAL));
/* Return a pointer to the real data */
- DBUG_PRINT("exit",("ptr: 0x%lx", data));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) data));
if (sf_min_adress > data)
sf_min_adress= data;
if (sf_max_adress < data)
@@ -259,7 +259,7 @@
{
struct st_irem *irem;
DBUG_ENTER("_myfree");
- DBUG_PRINT("enter",("ptr: 0x%lx", ptr));
+ DBUG_PRINT("enter",("ptr: 0x%lx", (long) ptr));
if (!sf_malloc_quick)
(void) _sanity (filename, lineno);
@@ -410,7 +410,7 @@
}
DBUG_PRINT("safe",
("%6u bytes at 0x%09lx, allocated at line %4d in '%s'",
- irem->datasize, data, irem->linenum, irem->filename));
+ irem->datasize, (long) data, irem->linenum, irem->filename));
irem= irem->next;
}
}
@@ -447,7 +447,7 @@
fprintf(stderr, " discovered at %s:%d\n", filename, lineno);
(void) fflush(stderr);
DBUG_PRINT("safe",("Underrun at 0x%lx, allocated at %s:%d",
- data, irem->filename, irem->linenum));
+ (long) data, irem->filename, irem->linenum));
flag=1;
}
@@ -463,7 +463,7 @@
fprintf(stderr, " discovered at '%s:%d'\n", filename, lineno);
(void) fflush(stderr);
DBUG_PRINT("safe",("Overrun at 0x%lx, allocated at %s:%d",
- data,
+ (long) data,
irem->filename,
irem->linenum));
flag=1;
--- 1.50/mysys/thr_lock.c 2006-11-20 22:42:22 +02:00
+++ 1.51/mysys/thr_lock.c 2006-11-20 22:42:22 +02:00
@@ -483,8 +483,8 @@
data->owner= owner; /* Must be reset ! */
VOID(pthread_mutex_lock(&lock->mutex));
DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx type: %d",
- data, data->owner->info->thread_id,
- lock, (int) lock_type));
+ (long) data, data->owner->info->thread_id,
+ (long) lock, (int) lock_type));
check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ?
"enter read_lock" : "enter write_lock",0);
if ((int) lock_type <= (int) TL_READ_NO_INSERT)
@@ -659,7 +659,7 @@
goto end;
}
}
- DBUG_PRINT("lock",("write locked by thread: %ld, type: %ld",
+ DBUG_PRINT("lock",("write locked by thread: %ld, type: %d",
lock->read.data->owner->info->thread_id, data->type));
}
wait_queue= &lock->write_wait;
@@ -740,7 +740,7 @@
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx",
- data, data->owner->info->thread_id, lock));
+ (long) data, data->owner->info->thread_id, (long) lock));
pthread_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock",0);
@@ -913,7 +913,7 @@
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_lock");
- DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count));
+ DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
if (count > 1)
sort_locks(data,count);
/* lock everything */
@@ -986,7 +986,7 @@
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_unlock");
- DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count));
+ DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
for (pos=data,end=data+count; pos < end ; pos++)
{
@@ -1000,7 +1000,8 @@
else
{
DBUG_PRINT("lock",("Free lock: data: 0x%lx thread: %ld lock: 0x%lx",
- *pos, (*pos)->owner->info->thread_id, (*pos)->lock));
+ (long) *pos, (*pos)->owner->info->thread_id,
+ (long) (*pos)->lock));
}
}
DBUG_VOID_RETURN;
--- 1.29/mysys/tree.c 2006-11-20 22:42:22 +02:00
+++ 1.30/mysys/tree.c 2006-11-20 22:42:22 +02:00
@@ -89,7 +89,7 @@
tree_element_free free_element, void *custom_arg)
{
DBUG_ENTER("init_tree");
- DBUG_PRINT("enter",("tree: 0x%lx size: %d",tree,size));
+ DBUG_PRINT("enter",("tree: 0x%lx size: %d", (long) tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
@@ -137,7 +137,7 @@
static void free_tree(TREE *tree, myf free_flags)
{
DBUG_ENTER("free_tree");
- DBUG_PRINT("enter",("tree: 0x%lx",tree));
+ DBUG_PRINT("enter",("tree: 0x%lx", (long) tree));
if (tree->root) /* If initialized */
{
--- 1.13/mysys/typelib.c 2006-11-20 22:42:22 +02:00
+++ 1.14/mysys/typelib.c 2006-11-20 22:42:22 +02:00
@@ -49,7 +49,7 @@
reg1 my_string i;
reg2 const char *j;
DBUG_ENTER("find_type");
- DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib));
+ DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) typelib));
if (!typelib->count)
{
--- 1.14/cmd-line-utils/readline/bind.c 2006-11-20 22:42:22 +02:00
+++ 1.15/cmd-line-utils/readline/bind.c 2006-11-20 22:42:22 +02:00
@@ -434,7 +434,7 @@
{
register int i, c, l, temp;
- for (i = l = 0; c = seq[i]; i++)
+ for (i = l = 0; (c = seq[i]); i++)
{
if (c == '\\')
{
@@ -765,8 +765,8 @@
/* Re-read the current keybindings file. */
int
-rl_re_read_init_file (count, ignore)
- int count, ignore;
+rl_re_read_init_file (int count __attribute__((unused)),
+ int ignore __attribute__((unused)))
{
int r;
r = rl_read_init_file ((const char *)NULL);
@@ -987,8 +987,7 @@
/* Invert the current parser state if there is anything on the stack. */
static int
-parser_else (args)
- char *args;
+parser_else (char *args __attribute__((unused)))
{
register int i;
@@ -1018,8 +1017,7 @@
/* Terminate a conditional, popping the value of
_rl_parsing_conditionalized_out from the stack. */
static int
-parser_endif (args)
- char *args;
+parser_endif (char *args __attribute__((unused)))
{
if (if_stack_depth)
_rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
@@ -1142,7 +1140,7 @@
{
int passc = 0;
- for (i = 1; c = string[i]; i++)
+ for (i = 1; (c = string[i]); i++)
{
if (passc)
{
@@ -1218,7 +1216,7 @@
{
int delimiter = string[i++], passc;
- for (passc = 0; c = string[i]; i++)
+ for (passc = 0; (c = string[i]); i++)
{
if (passc)
{
@@ -1377,7 +1375,7 @@
#if defined (VISIBLE_STATS)
{ "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */
- { (char *)NULL, (int *)NULL }
+ { (char *)NULL, (int *)NULL, 0 }
};
static int
@@ -1446,7 +1444,7 @@
{ "editing-mode", V_STRING, sv_editmode },
{ "isearch-terminators", V_STRING, sv_isrchterm },
{ "keymap", V_STRING, sv_keymap },
- { (char *)NULL, 0 }
+ { (char *)NULL, 0, 0 }
};
static int
@@ -1466,7 +1464,7 @@
values result in 0 (false). */
static int
bool_to_int (value)
- char *value;
+const char *value;
{
return (value == 0 || *value == '\0' ||
(_rl_stricmp (value, "on") == 0) ||
@@ -1725,13 +1723,13 @@
rl_get_keymap_name_from_edit_mode ()
{
if (rl_editing_mode == emacs_mode)
- return "emacs";
+ return (char*) "emacs";
#if defined (VI_MODE)
else if (rl_editing_mode == vi_mode)
- return "vi";
+ return (char*) "vi";
#endif /* VI_MODE */
else
- return "none";
+ return (char*) "none";
}
/* **************************************************************** */
@@ -1966,7 +1964,7 @@
fprintf (rl_outstream, "\n");
- for (i = 0; name = names[i]; i++)
+ for (i = 0; (name = names[i]); i++)
{
rl_command_func_t *function;
char **invokers;
@@ -2025,8 +2023,8 @@
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_functions (count, key)
- int count, key;
+rl_dump_functions (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2105,8 +2103,7 @@
}
int
-rl_dump_macros (count, key)
- int count, key;
+rl_dump_macros(int count __attribute__((unused)), int key __attribute__((unused)))
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2195,8 +2192,7 @@
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_variables (count, key)
- int count, key;
+rl_dump_variables(int count __attribute__((unused)), int key __attribute__((unused)))
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
--- 1.5/cmd-line-utils/readline/chardefs.h 2006-11-20 22:42:22 +02:00
+++ 1.6/cmd-line-utils/readline/chardefs.h 2006-11-20 22:42:22 +02:00
@@ -59,7 +59,11 @@
#define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
+#if largest_char >= 255
+#define META_CHAR(c) ((c) > meta_character_threshold)
+#else
#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
+#endif
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
--- 1.16/cmd-line-utils/readline/complete.c 2006-11-20 22:42:22 +02:00
+++ 1.17/cmd-line-utils/readline/complete.c 2006-11-20 22:42:22 +02:00
@@ -360,15 +360,15 @@
/* List the possible completions. See description of rl_complete (). */
int
-rl_possible_completions (ignore, invoking_key)
- int ignore, invoking_key;
+rl_possible_completions (int ignore __attribute__((unused)),
+ int invoking_key __attribute__((unused)))
{
return (rl_complete_internal ('?'));
}
int
-rl_insert_completions (ignore, invoking_key)
- int ignore, invoking_key;
+rl_insert_completions (int ignore __attribute__((unused)),
+ int invoking_key __attribute__((unused)))
{
return (rl_complete_internal ('*'));
}
@@ -760,10 +760,7 @@
}
static char *
-rl_quote_filename (s, rtype, qcp)
- char *s;
- int rtype;
- char *qcp;
+rl_quote_filename (char *s, int rtype __attribute__((unused)), char *qcp)
{
char *r;
@@ -871,7 +868,7 @@
completion, so use the word break characters to find the
substring on which to complete. */
#if defined (HANDLE_MULTIBYTE)
- while (rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY))
+ while ((rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY)))
#else
while (--rl_point)
#endif
@@ -1805,7 +1802,7 @@
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
match_list[1] = (char *)NULL;
- while (string = (*entry_function) (text, matches))
+ while ((string = (*entry_function) (text, matches)))
{
if (matches + 1 == match_list_size)
match_list = (char **)xrealloc
@@ -1855,7 +1852,7 @@
setpwent ();
}
- while (entry = getpwent ())
+ while ((entry = getpwent ()))
{
/* Null usernames should result in all users as possible completions. */
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
@@ -2091,8 +2088,7 @@
hit the end of the match list, we restore the original unmatched text,
ring the bell, and reset the counter to zero. */
int
-rl_menu_complete (count, ignore)
- int count, ignore;
+rl_menu_complete (int count, int ignore __attribute__((unused)))
{
rl_compentry_func_t *our_func;
int matching_filenames, found_quote;
--- 1.14/cmd-line-utils/readline/display.c 2006-11-20 22:42:22 +02:00
+++ 1.15/cmd-line-utils/readline/display.c 2006-11-20 22:42:22 +02:00
@@ -218,7 +218,7 @@
if (niflp)
*niflp = 0;
if (vlp)
- *vlp = lp ? *lp : strlen (r);
+ *vlp = lp ? *lp : (int) strlen (r);
return r;
}
@@ -435,7 +435,7 @@
return;
if (!rl_display_prompt)
- rl_display_prompt = "";
+ rl_display_prompt = (char*) "";
if (invisible_line == 0)
{
@@ -757,7 +757,7 @@
c_pos = out;
lb_linenum = newlines;
}
- for (i = in; i < in+wc_bytes; i++)
+ for (i = in; i < (int) (in+wc_bytes); i++)
line[out++] = rl_line_buffer[i];
for (i = 0; i < wc_width; i++)
CHECK_LPOS();
@@ -835,7 +835,7 @@
#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
#define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l])
#define VIS_CHARS(line) (visible_line + vis_lbreaks[line])
-#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line)
+#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? (char*) "" : VIS_CHARS(line)
#define INV_LINE(line) (invisible_line + inv_lbreaks[line])
/* For each line in the buffer, do the updating display. */
@@ -876,7 +876,7 @@
_rl_move_vert (linenum);
_rl_move_cursor_relative (0, tt);
_rl_clear_to_eol
- ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth);
+ ((linenum == _rl_vis_botlin) ? (int) strlen (tt) : _rl_screenwidth);
}
}
_rl_vis_botlin = inv_botlin;
@@ -1086,7 +1086,7 @@
int col_lendiff, col_temp;
#if defined (HANDLE_MULTIBYTE)
mbstate_t ps_new, ps_old;
- int new_offset, old_offset, tmp;
+ int new_offset, old_offset;
#endif
/* If we're at the right edge of a terminal that supports xn, we're
@@ -1837,7 +1837,7 @@
{
rl_on_new_line ();
- rl_display_prompt = rl_prompt ? rl_prompt : "";
+ rl_display_prompt = rl_prompt ? rl_prompt : (char*) "";
forced_display = 1;
return 0;
}
@@ -2212,7 +2212,7 @@
int start, end;
{
wchar_t wc;
- mbstate_t ps = {0};
+ mbstate_t ps;
int tmp, point, width, max;
if (end <= start)
@@ -2221,6 +2221,7 @@
point = 0;
max = end;
+ memset (&ps, 0, sizeof(ps));
while (point < start)
{
tmp = mbrlen (str + point, max, &ps);
--- 1.11/cmd-line-utils/readline/histexpand.c 2006-11-20 22:42:22 +02:00
+++ 1.12/cmd-line-utils/readline/histexpand.c 2006-11-20 22:42:22 +02:00
@@ -87,14 +87,14 @@
/* The list of characters which inhibit the expansion of text if found
immediately following history_expansion_char. */
-char *history_no_expand_chars = " \t\n\r=";
+char *history_no_expand_chars = (char*) " \t\n\r=";
/* If set to a non-zero value, single quotes inhibit history expansion.
The default is 0. */
int history_quotes_inhibit_expansion = 0;
/* Used to split words by history_tokenize_internal. */
-char *history_word_delimiters = HISTORY_WORD_DELIMITERS;
+char *history_word_delimiters = (char*) HISTORY_WORD_DELIMITERS;
/* If set, this points to a function that is called to verify that a
particular history expansion should be performed. */
@@ -203,7 +203,7 @@
}
/* Only a closing `?' or a newline delimit a substring search string. */
- for (local_index = i; c = string[i]; i++)
+ for (local_index = i; (c = string[i]); i++)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
--- 1.12/cmd-line-utils/readline/input.c 2006-11-20 22:42:22 +02:00
+++ 1.13/cmd-line-utils/readline/input.c 2006-11-20 22:42:22 +02:00
@@ -405,7 +405,7 @@
else
{
/* If input is coming from a macro, then use that. */
- if (c = _rl_next_macro_key ())
+ if ((c= _rl_next_macro_key ()))
return (c);
/* If the user has an event function, then call it periodically. */
--- 1.10/cmd-line-utils/readline/isearch.c 2006-11-20 22:42:22 +02:00
+++ 1.11/cmd-line-utils/readline/isearch.c 2006-11-20 22:42:22 +02:00
@@ -68,7 +68,7 @@
static char *last_isearch_string;
static int last_isearch_string_len;
-static char *default_isearch_terminators = "\033\012";
+static char *default_isearch_terminators = (char*) "\033\012";
/* Search backwards through the history looking for a string which is typed
interactively. Start with the current line. */
@@ -94,9 +94,8 @@
WHERE is the history list number of the current line. If it is
-1, then this line is the starting one. */
static void
-rl_display_search (search_string, reverse_p, where)
- char *search_string;
- int reverse_p, where;
+rl_display_search (char *search_string, int reverse_p,
+ int where __attribute__((unused)))
{
char *message;
int msglen, searchlen;
@@ -143,8 +142,7 @@
DIRECTION is which direction to search; >= 0 means forward, < 0 means
backwards. */
static int
-rl_search_history (direction, invoking_key)
- int direction, invoking_key;
+rl_search_history (int direction, int invoking_key __attribute__((unused)))
{
/* The string that the user types in to search for. */
char *search_string;
--- 1.9/cmd-line-utils/readline/kill.c 2006-11-20 22:42:22 +02:00
+++ 1.10/cmd-line-utils/readline/kill.c 2006-11-20 22:42:22 +02:00
@@ -76,8 +76,7 @@
/* How to say that you only want to save a certain amount
of kill material. */
int
-rl_set_retained_kills (num)
- int num;
+rl_set_retained_kills (int num __attribute__((unused)))
{
return 0;
}
@@ -293,8 +292,8 @@
/* Kill the whole line, no matter where point is. */
int
-rl_kill_full_line (count, ignore)
- int count, ignore;
+rl_kill_full_line (int count __attribute__((unused)),
+ int ignore __attribute__((unused)))
{
rl_begin_undo_group ();
rl_point = 0;
@@ -311,8 +310,7 @@
/* This does what C-w does in Unix. We can't prevent people from
using behaviour that they expect. */
int
-rl_unix_word_rubout (count, key)
- int count, key;
+rl_unix_word_rubout (int count, int key __attribute__((unused)))
{
int orig_point;
@@ -344,8 +342,7 @@
/* This deletes one filename component in a Unix pathname. That is, it
deletes backward to directory separator (`/') or whitespace. */
int
-rl_unix_filename_rubout (count, key)
- int count, key;
+rl_unix_filename_rubout (int count, int key __attribute__((unused)))
{
int orig_point, c;
@@ -388,8 +385,8 @@
into the line at all, and if you aren't, then you know what you are
doing. */
int
-rl_unix_line_discard (count, key)
- int count, key;
+rl_unix_line_discard (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (rl_point == 0)
rl_ding ();
@@ -425,16 +422,16 @@
/* Copy the text in the region to the kill ring. */
int
-rl_copy_region_to_kill (count, ignore)
- int count, ignore;
+rl_copy_region_to_kill (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
return (region_kill_internal (0));
}
/* Kill the text between the point and mark. */
int
-rl_kill_region (count, ignore)
- int count, ignore;
+rl_kill_region (int count __attribute__((unused)),
+ int ignore __attribute__((unused)))
{
int r, npoint;
@@ -498,8 +495,7 @@
/* Yank back the last killed text. This ignores arguments. */
int
-rl_yank (count, ignore)
- int count, ignore;
+rl_yank (int count __attribute__((unused)), int ignore __attribute__((unused)))
{
if (rl_kill_ring == 0)
{
@@ -517,8 +513,7 @@
delete that text from the line, rotate the index down, and
yank back some other text. */
int
-rl_yank_pop (count, key)
- int count, key;
+rl_yank_pop (int count __attribute__((unused)), int key __attribute__((unused)))
{
int l, n;
--- 1.8/cmd-line-utils/readline/macro.c 2006-11-20 22:42:22 +02:00
+++ 1.9/cmd-line-utils/readline/macro.c 2006-11-20 22:42:22 +02:00
@@ -189,8 +189,8 @@
definition to the end of the existing macro, and start by
re-executing the existing macro. */
int
-rl_start_kbd_macro (ignore1, ignore2)
- int ignore1, ignore2;
+rl_start_kbd_macro (int ignore1 __attribute__((unused)),
+ int ignore2 __attribute__((unused)))
{
if (RL_ISSTATE (RL_STATE_MACRODEF))
{
@@ -214,8 +214,7 @@
A numeric argument says to execute the macro right now,
that many times, counting the definition as the first time. */
int
-rl_end_kbd_macro (count, ignore)
- int count, ignore;
+rl_end_kbd_macro (int count, int ignore __attribute__((unused)))
{
if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
{
@@ -234,8 +233,7 @@
/* Execute the most recently defined keyboard macro.
COUNT says how many times to execute it. */
int
-rl_call_last_kbd_macro (count, ignore)
- int count, ignore;
+rl_call_last_kbd_macro (int count, int ignore __attribute__((unused)))
{
if (current_macro == 0)
_rl_abort_internal ();
--- 1.7/cmd-line-utils/readline/nls.c 2006-11-20 22:42:22 +02:00
+++ 1.8/cmd-line-utils/readline/nls.c 2006-11-20 22:42:22 +02:00
@@ -111,7 +111,7 @@
if (lspec == 0 || *lspec == 0)
lspec = setlocale (LC_CTYPE, (char *)NULL);
if (lspec == 0)
- lspec = "";
+ lspec = (char*) "";
t = setlocale (LC_CTYPE, lspec);
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
--- 1.10/cmd-line-utils/readline/readline.c 2006-11-20 22:42:22 +02:00
+++ 1.11/cmd-line-utils/readline/readline.c 2006-11-20 22:42:22 +02:00
@@ -83,7 +83,9 @@
static void bind_arrow_keys PARAMS((void));
static void readline_default_bindings PARAMS((void));
+#ifdef NOT_USED
static void reset_default_bindings PARAMS((void));
+#endif
/* **************************************************************** */
/* */
@@ -866,12 +868,14 @@
/* Reset the default bindings for the terminal special characters we're
interested in back to rl_insert and read the new ones. */
+#ifdef NOT_USED
static void
reset_default_bindings ()
{
rl_tty_unset_default_bindings (_rl_keymap);
rl_tty_set_default_bindings (_rl_keymap);
}
+#endif
/* Bind some common arrow key sequences in MAP. */
static void
--- 1.10/cmd-line-utils/readline/rltty.c 2006-11-20 22:42:22 +02:00
+++ 1.11/cmd-line-utils/readline/rltty.c 2006-11-20 22:42:22 +02:00
@@ -716,8 +716,7 @@
/* **************************************************************** */
int
-rl_restart_output (count, key)
- int count, key;
+rl_restart_output(int count __attribute__((unused)), int key __attribute__((unused)))
{
int fildes = fileno (rl_outstream);
#if defined (TIOCSTART)
@@ -749,8 +748,7 @@
}
int
-rl_stop_output (count, key)
- int count, key;
+rl_stop_output(int count __attribute__((unused)), int key __attribute__((unused)))
{
int fildes = fileno (rl_instream);
@@ -867,7 +865,6 @@
{
TIOTYPE ttybuff;
int tty;
- static int called = 0;
tty = fileno (rl_instream);
--- 1.9/cmd-line-utils/readline/search.c 2006-11-20 22:42:22 +02:00
+++ 1.10/cmd-line-utils/readline/search.c 2006-11-20 22:42:22 +02:00
@@ -303,8 +303,7 @@
/* Search forward through the history list for a string. If the vi-mode
code calls this, KEY will be `?'. */
int
-rl_noninc_forward_search (count, key)
- int count, key;
+rl_noninc_forward_search (int count __attribute__((unused)), int key)
{
noninc_search (1, (key == '?') ? '?' : 0);
return 0;
@@ -313,8 +312,7 @@
/* Reverse search the history list for a string. If the vi-mode code
calls this, KEY will be `/'. */
int
-rl_noninc_reverse_search (count, key)
- int count, key;
+rl_noninc_reverse_search (int count __attribute__((unused)), int key)
{
noninc_search (-1, (key == '/') ? '/' : 0);
return 0;
@@ -323,8 +321,8 @@
/* Search forward through the history list for the last string searched
for. If there is no saved search string, abort. */
int
-rl_noninc_forward_search_again (count, key)
- int count, key;
+rl_noninc_forward_search_again (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (!noninc_search_string)
{
@@ -338,8 +336,8 @@
/* Reverse search in the history list for the last string searched
for. If there is no saved search string, abort. */
int
-rl_noninc_reverse_search_again (count, key)
- int count, key;
+rl_noninc_reverse_search_again (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (!noninc_search_string)
{
--- 1.15/cmd-line-utils/readline/terminal.c 2006-11-20 22:42:22 +02:00
+++ 1.16/cmd-line-utils/readline/terminal.c 2006-11-20 22:42:22 +02:00
@@ -344,7 +344,7 @@
#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
register int i;
- for (i = 0; i < NUM_TC_STRINGS; i++)
+ for (i = 0; i < (int) NUM_TC_STRINGS; i++)
*(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
#endif
tcap_initialized = 1;
@@ -410,7 +410,7 @@
/* Everything below here is used by the redisplay code (tputs). */
_rl_screenchars = _rl_screenwidth * _rl_screenheight;
- _rl_term_cr = "\r";
+ _rl_term_cr = (char*) "\r";
_rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;
_rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL;
_rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL;
@@ -427,7 +427,7 @@
tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we
change that later... */
PC = '\0';
- BC = _rl_term_backspace = "\b";
+ BC = _rl_term_backspace = (char*) "\b";
UP = _rl_term_up;
return 0;
@@ -442,7 +442,7 @@
UP = _rl_term_up;
if (!_rl_term_cr)
- _rl_term_cr = "\r";
+ _rl_term_cr = (char*) "\r";
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
@@ -502,7 +502,7 @@
if (tcap_initialized == 0)
return ((char *)NULL);
- for (i = 0; i < NUM_TC_STRINGS; i++)
+ for (i = 0; i < (int) NUM_TC_STRINGS; i++)
{
if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0)
return *(tc_strings[i].tc_value);
--- 1.10/cmd-line-utils/readline/tilde.c 2006-11-20 22:42:22 +02:00
+++ 1.11/cmd-line-utils/readline/tilde.c 2006-11-20 22:42:22 +02:00
@@ -190,7 +190,7 @@
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+ if ((result = strchr (string, '~')))
result = (char *)xmalloc (result_size = (strlen (string) + 16));
else
result = (char *)xmalloc (result_size = (strlen (string) + 1));
--- 1.9/cmd-line-utils/readline/undo.c 2006-11-20 22:42:23 +02:00
+++ 1.10/cmd-line-utils/readline/undo.c 2006-11-20 22:42:23 +02:00
@@ -175,7 +175,7 @@
for (rl = rl_undo_list; rl; rl = rl->next)
{
- if (rl->what == type)
+ if (rl->what == (uint) type)
{
rl->start = start;
rl->end = end;
@@ -226,8 +226,7 @@
/* Revert the current line to its previous state. */
int
-rl_revert_line (count, key)
- int count, key;
+rl_revert_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
if (!rl_undo_list)
rl_ding ();
@@ -241,8 +240,7 @@
/* Do some undoing of things that were done. */
int
-rl_undo_command (count, key)
- int count, key;
+rl_undo_command (int count, int key __attribute__((unused)))
{
if (count < 0)
return 0; /* Nothing to do. */
--- 1.8/cmd-line-utils/readline/util.c 2006-11-20 22:42:23 +02:00
+++ 1.9/cmd-line-utils/readline/util.c 2006-11-20 22:42:23 +02:00
@@ -95,15 +95,13 @@
}
int
-rl_abort (count, key)
- int count, key;
+rl_abort (int count __attribute__((unused)), int key __attribute__((unused)))
{
return (_rl_abort_internal ());
}
int
-rl_tty_status (count, key)
- int count, key;
+rl_tty_status (int count __attribute__((unused)), int key __attribute__((unused)))
{
#if defined (TIOCSTAT)
ioctl (1, TIOCSTAT, (char *)0);
@@ -152,8 +150,7 @@
/* A function for simple tilde expansion. */
int
-rl_tilde_expand (ignore, key)
- int ignore, key;
+rl_tilde_expand (int ignore __attribute__((unused)), int key __attribute__((unused)))
{
register int start, end;
char *homedir, *temp;
--- 1.12/cmd-line-utils/readline/vi_mode.c 2006-11-20 22:42:23 +02:00
+++ 1.13/cmd-line-utils/readline/vi_mode.c 2006-11-20 22:42:23 +02:00
@@ -112,7 +112,7 @@
{
register int i;
- for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
+ for (i = 0; i < (int) (sizeof (vi_mark_chars) / sizeof (int)); i++)
vi_mark_chars[i] = -1;
}
@@ -166,8 +166,7 @@
redo a text modification command. The default for _rl_vi_last_command
puts you back into insert mode. */
int
-rl_vi_redo (count, c)
- int count, c;
+rl_vi_redo (int count, int c __attribute__((unused)))
{
int r;
@@ -205,8 +204,7 @@
/* Yank the nth arg from the previous line into this line at point. */
int
-rl_vi_yank_arg (count, key)
- int count, key;
+rl_vi_yank_arg (int count, int key __attribute__((unused)))
{
/* Readline thinks that the first word on a line is the 0th, while vi
thinks the first word on a line is the 1st. Compensate. */
@@ -286,8 +284,7 @@
/* Completion, from vi's point of view. */
int
-rl_vi_complete (ignore, key)
- int ignore, key;
+rl_vi_complete (int ignore __attribute__((unused)), int key)
{
if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
{
@@ -313,8 +310,7 @@
/* Tilde expansion for vi mode. */
int
-rl_vi_tilde_expand (ignore, key)
- int ignore, key;
+rl_vi_tilde_expand (int ignore __attribute__((unused)), int key)
{
rl_tilde_expand (0, key);
rl_vi_start_inserting (key, 1, rl_arg_sign);
@@ -384,8 +380,7 @@
/* Move forward a word the way that 'W' does. */
int
-rl_vi_fWord (count, ignore)
- int count, ignore;
+rl_vi_fWord (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -401,8 +396,7 @@
}
int
-rl_vi_bWord (count, ignore)
- int count, ignore;
+rl_vi_bWord (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point > 0)
{
@@ -425,8 +419,7 @@
}
int
-rl_vi_eWord (count, ignore)
- int count, ignore;
+rl_vi_eWord(int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -456,8 +449,7 @@
}
int
-rl_vi_fword (count, ignore)
- int count, ignore;
+rl_vi_fword (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -482,8 +474,7 @@
}
int
-rl_vi_bword (count, ignore)
- int count, ignore;
+rl_vi_bword (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point > 0)
{
@@ -521,8 +512,7 @@
}
int
-rl_vi_eword (count, ignore)
- int count, ignore;
+rl_vi_eword (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < rl_end - 1)
{
@@ -546,8 +536,7 @@
}
int
-rl_vi_insert_beg (count, key)
- int count, key;
+rl_vi_insert_beg (int count __attribute__((unused)), int key)
{
rl_beg_of_line (1, key);
rl_vi_insertion_mode (1, key);
@@ -555,8 +544,7 @@
}
int
-rl_vi_append_mode (count, key)
- int count, key;
+rl_vi_append_mode (int count __attribute__((unused)), int key)
{
if (rl_point < rl_end)
{
@@ -575,8 +563,7 @@
}
int
-rl_vi_append_eol (count, key)
- int count, key;
+rl_vi_append_eol (int count __attribute__((unused)), int key)
{
rl_end_of_line (1, key);
rl_vi_append_mode (1, key);
@@ -585,8 +572,7 @@
/* What to do in the case of C-d. */
int
-rl_vi_eof_maybe (count, c)
- int count, c;
+rl_vi_eof_maybe (int count __attribute__((unused)), int c __attribute__((unused)))
{
return (rl_newline (1, '\n'));
}
@@ -596,8 +582,7 @@
/* Switching from one mode to the other really just involves
switching keymaps. */
int
-rl_vi_insertion_mode (count, key)
- int count, key;
+rl_vi_insertion_mode (int count __attribute__((unused)), int key)
{
_rl_keymap = vi_insertion_keymap;
_rl_vi_last_key_before_insert = key;
@@ -659,8 +644,7 @@
}
int
-rl_vi_movement_mode (count, key)
- int count, key;
+rl_vi_movement_mode (int count __attribute__((unused)), int key)
{
if (rl_point > 0)
rl_backward_char (1, key);
@@ -729,8 +713,7 @@
#endif
int
-rl_vi_change_case (count, ignore)
- int count, ignore;
+rl_vi_change_case (int count, int ignore __attribute__((unused)))
{
int c, p;
@@ -959,8 +942,7 @@
}
int
-rl_vi_delete_to (count, key)
- int count, key;
+rl_vi_delete_to (int count __attribute__((unused)), int key)
{
int c;
@@ -985,8 +967,7 @@
}
int
-rl_vi_change_to (count, key)
- int count, key;
+rl_vi_change_to (int count __attribute__((unused)), int key)
{
int c, start_pos;
@@ -1038,8 +1019,7 @@
}
int
-rl_vi_yank_to (count, key)
- int count, key;
+rl_vi_yank_to (int count __attribute__((unused)), int key)
{
int c, save = rl_point;
@@ -1094,8 +1074,7 @@
}
int
-rl_vi_back_to_indent (count, key)
- int count, key;
+rl_vi_back_to_indent (int count __attribute__((unused)), int key)
{
rl_beg_of_line (1, key);
while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
@@ -1104,8 +1083,7 @@
}
int
-rl_vi_first_print (count, key)
- int count, key;
+rl_vi_first_print (int count __attribute__((unused)), int key)
{
return (rl_vi_back_to_indent (1, key));
}
@@ -1173,8 +1151,7 @@
/* Match brackets */
int
-rl_vi_match (ignore, key)
- int ignore, key;
+rl_vi_match (int ignore __attribute__((unused)), int key)
{
int count = 1, brack, pos, tmp, pre;
@@ -1284,8 +1261,7 @@
for test against 033 or ^C. Make sure that _rl_read_mbchar does
this right. */
int
-rl_vi_change_char (count, key)
- int count, key;
+rl_vi_change_char (int count, int key __attribute__((unused)))
{
int c, p;
@@ -1389,8 +1365,7 @@
}
int
-rl_vi_replace (count, key)
- int count, key;
+rl_vi_replace (int count __attribute__((unused)), int key __attribute__((unused)))
{
int i;
@@ -1450,8 +1425,7 @@
/* Functions to save and restore marks. */
int
-rl_vi_set_mark (count, key)
- int count, key;
+rl_vi_set_mark (int count __attribute__((unused)), int key __attribute__((unused)))
{
int ch;
@@ -1470,8 +1444,7 @@
}
int
-rl_vi_goto_mark (count, key)
- int count, key;
+rl_vi_goto_mark (int count __attribute__((unused)), int key __attribute__((unused)))
{
int ch;
--- 1.8/regex/regexec.c 2006-11-20 22:42:23 +02:00
+++ 1.9/regex/regexec.c 2006-11-20 22:42:23 +02:00
@@ -15,7 +15,8 @@
#include "utils.h"
#include "regex2.h"
-static int nope = 0; /* for use in asserts; shuts lint up */
+/* for use in asserts */
+#define nope 0
/* macros for manipulating states, small version */
#define states long
--- 1.126/sql/Makefile.am 2006-11-20 22:42:23 +02:00
+++ 1.127/sql/Makefile.am 2006-11-20 22:42:23 +02:00
@@ -149,6 +149,8 @@
sql_yacc.h: sql_yacc.yy
sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS)
+ @SED@ -e 's/__attribute__ ((__unused__))//' sql_yacc.cc > sql_yacc.cc-new
+ @MV@ sql_yacc.cc-new sql_yacc.cc
@echo "Note: The following compile may take a long time."
@echo "If it fails, re-run configure with --with-low-memory"
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
--- 1.107/sql/filesort.cc 2006-11-20 22:42:23 +02:00
+++ 1.108/sql/filesort.cc 2006-11-20 22:42:23 +02:00
@@ -296,7 +296,7 @@
DBUG_POP(); /* Ok to DBUG */
#endif
memcpy(&table->sort, &table_sort, sizeof(FILESORT_INFO));
- DBUG_PRINT("exit",("records: %ld",records));
+ DBUG_PRINT("exit",("records: %ld", (long) records));
DBUG_RETURN(error ? HA_POS_ERROR : records);
} /* filesort */
--- 1.169/sql/ha_myisam.cc 2006-11-20 22:42:23 +02:00
+++ 1.170/sql/ha_myisam.cc 2006-11-20 22:42:23 +02:00
@@ -1557,7 +1557,7 @@
}
}
DBUG_PRINT("loop",("found: 0x%lx recpos: %d minpos: %d length: %d",
- found,recpos,minpos,length));
+ (long) found, recpos, minpos, length));
if (recpos != minpos)
{ // Reserved space (Null bits?)
bzero((char*) recinfo_pos,sizeof(*recinfo_pos));
--- 1.84/sql/ha_myisammrg.cc 2006-11-20 22:42:23 +02:00
+++ 1.85/sql/ha_myisammrg.cc 2006-11-20 22:42:23 +02:00
@@ -108,7 +108,7 @@
if (table->s->reclength != mean_rec_length && mean_rec_length)
{
- DBUG_PRINT("error",("reclength: %d mean_rec_length: %d",
+ DBUG_PRINT("error",("reclength: %lu mean_rec_length: %lu",
table->s->reclength, mean_rec_length));
goto err;
}
--- 1.224/sql/handler.cc 2006-11-20 22:42:23 +02:00
+++ 1.225/sql/handler.cc 2006-11-20 22:42:23 +02:00
@@ -1533,7 +1533,7 @@
*/
DBUG_PRINT("info",("auto_increment: nr: %lu cannot honour "
"auto_increment_offset: %lu",
- nr, variables->auto_increment_offset));
+ (ulong) nr, variables->auto_increment_offset));
return nr;
}
if (variables->auto_increment_increment == 1)
--- 1.223/sql/item_cmpfunc.cc 2006-11-20 22:42:23 +02:00
+++ 1.224/sql/item_cmpfunc.cc 2006-11-20 22:42:23 +02:00
@@ -2196,7 +2196,7 @@
cmp_item_row::~cmp_item_row()
{
DBUG_ENTER("~cmp_item_row");
- DBUG_PRINT("enter",("this: 0x%lx", this));
+ DBUG_PRINT("enter",("this: 0x%lx", (long) this));
if (comparators)
{
for (uint i= 0; i < n; i++)
@@ -2971,7 +2971,7 @@
if (!used_tables_cache)
{
owner->was_null|= (!cached_value);
- DBUG_PRINT("info", ("cached :%d", cached_value));
+ DBUG_PRINT("info", ("cached :%ld", (long) cached_value));
DBUG_RETURN(cached_value);
}
if (args[0]->is_null())
--- 1.132/sql/item_timefunc.cc 2006-11-20 22:42:23 +02:00
+++ 1.133/sql/item_timefunc.cc 2006-11-20 22:42:23 +02:00
@@ -2498,7 +2498,8 @@
{ // Safe even if const arg
char char_type[40];
my_snprintf(char_type, sizeof(char_type), "%s(%lu)",
- cast_cs == &my_charset_bin ? "BINARY" : "CHAR", length);
+ cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
+ (ulong) length);
if (!res->alloced_length())
{ // Don't change const str
--- 1.214/sql/log_event.cc 2006-11-20 22:42:23 +02:00
+++ 1.215/sql/log_event.cc 2006-11-20 22:42:23 +02:00
@@ -727,7 +727,7 @@
LOG_EVENT_MINIMAL_HEADER_LEN);
LOCK_MUTEX;
- DBUG_PRINT("info", ("my_b_tell=%lu", my_b_tell(file)));
+ DBUG_PRINT("info", ("my_b_tell: %lu", (ulong) my_b_tell(file)));
if (my_b_read(file, (byte *) head, header_size))
{
DBUG_PRINT("info", ("Log_event::read_log_event(IO_CACHE*,Format_desc*) \
@@ -1297,7 +1297,8 @@
}
else
time_zone_len= 0;
- DBUG_PRINT("info",("Query_log_event has flags2=%lu sql_mode=%lu",flags2,sql_mode));
+ DBUG_PRINT("info",("Query_log_event has flags2: %lu sql_mode: %lu",
+ (ulong) flags2, sql_mode));
}
#endif /* MYSQL_CLIENT */
@@ -1345,7 +1346,7 @@
common_header_len= description_event->common_header_len;
post_header_len= description_event->post_header_len[event_type-1];
- DBUG_PRINT("info",("event_len=%ld, common_header_len=%d, post_header_len=%d",
+ DBUG_PRINT("info",("event_len: %u common_header_len: %d post_header_len: %d",
event_len, common_header_len, post_header_len));
/*
@@ -1393,7 +1394,7 @@
case Q_FLAGS2_CODE:
flags2_inited= 1;
flags2= uint4korr(pos);
- DBUG_PRINT("info",("In Query_log_event, read flags2: %lu", flags2));
+ DBUG_PRINT("info",("In Query_log_event, read flags2: %lu", (ulong) flags2));
pos+= 4;
break;
case Q_SQL_MODE_CODE:
@@ -3137,8 +3138,8 @@
#ifndef DBUG_OFF
char buff[22];
DBUG_ENTER("Rotate_log_event::Rotate_log_event(THD*,...)");
- DBUG_PRINT("enter",("new_log_ident %s pos %s flags %lu", new_log_ident_arg,
- llstr(pos_arg, buff), flags));
+ DBUG_PRINT("enter",("new_log_ident: %s pos: %s flags: %lu", new_log_ident_arg,
+ llstr(pos_arg, buff), (ulong) flags));
#endif
if (flags & DUP_NAME)
new_log_ident= my_strdup_with_length(new_log_ident_arg,
@@ -3912,7 +3913,7 @@
memcpy(master_log, rli->group_master_log_name, master_log_len + 1);
master_port = mi->port;
master_pos = rli->group_master_log_pos;
- DBUG_PRINT("info", ("master_log: %s pos: %d", master_log,
+ DBUG_PRINT("info", ("master_log: %s pos: %lu", master_log,
(ulong) master_pos));
}
else
--- 1.129/client/mysqlbinlog.cc 2006-11-20 22:42:23 +02:00
+++ 1.130/client/mysqlbinlog.cc 2006-11-20 22:42:23 +02:00
@@ -1088,7 +1088,7 @@
}
if (len < 8 && net->read_pos[0] == 254)
break; // end of data
- DBUG_PRINT("info",( "len= %u, net->read_pos[5] = %d\n",
+ DBUG_PRINT("info",( "len: %lu, net->read_pos[5]: %d\n",
len, net->read_pos[5]));
if (!(ev= Log_event::read_log_event((const char*) net->read_pos + 1 ,
len - 1, &error_msg,
--- 1.578/sql/mysqld.cc 2006-11-20 22:42:23 +02:00
+++ 1.579/sql/mysqld.cc 2006-11-20 22:42:23 +02:00
@@ -1531,7 +1531,7 @@
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
{
- sql_print_error("The socket file path is too long (> %lu): %s",
+ sql_print_error("The socket file path is too long (> %u): %s",
sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
unireg_abort(1);
}
@@ -3378,8 +3378,8 @@
if (stack_size && stack_size < thread_stack)
{
if (global_system_variables.log_warnings)
- sql_print_warning("Asked for %ld thread stack, but got %ld",
- thread_stack, stack_size);
+ sql_print_warning("Asked for %lu thread stack, but got %ld",
+ thread_stack, (long) stack_size);
#if defined(__ia64__) || defined(__ia64)
thread_stack= stack_size*2;
#else
@@ -3913,7 +3913,7 @@
int error;
thread_created++;
threads.append(thd);
- DBUG_PRINT("info",(("creating thread %d"), thd->thread_id));
+ DBUG_PRINT("info",(("creating thread %lu"), thd->thread_id));
thd->connect_time = time(NULL);
if ((error=pthread_create(&thd->real_id,&connection_attrib,
handle_one_connection,
@@ -5130,7 +5130,7 @@
(gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"merge", OPT_MERGE, "Enable Merge storage engine. Disable with \
--skip-merge.",
- (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0},
+ (gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"myisam-recover", OPT_MYISAM_RECOVER,
"Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.",
(gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0,
--- 1.92/sql/net_serv.cc 2006-11-20 22:42:23 +02:00
+++ 1.93/sql/net_serv.cc 2006-11-20 22:42:23 +02:00
@@ -810,7 +810,7 @@
{
my_bool interrupted = vio_should_retry(net->vio);
- DBUG_PRINT("info",("vio_read returned %d, errno: %d",
+ DBUG_PRINT("info",("vio_read returned %ld, errno: %d",
length, vio_errno(net->vio)));
#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
/*
--- 1.231/sql/opt_range.cc 2006-11-20 22:42:23 +02:00
+++ 1.232/sql/opt_range.cc 2006-11-20 22:42:23 +02:00
@@ -878,7 +878,7 @@
file->extra(HA_EXTRA_NO_KEYREAD);
if (free_file)
{
- DBUG_PRINT("info", ("Freeing separate handler %p (free=%d)", file,
+ DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file,
free_file));
file->reset();
file->external_lock(current_thd, F_UNLCK);
@@ -1836,9 +1836,9 @@
double scan_time;
DBUG_ENTER("SQL_SELECT::test_quick_select");
DBUG_PRINT("enter",("keys_to_use: %lu prev_tables: %lu const_tables: %lu",
- keys_to_use.to_ulonglong(), (ulong) prev_tables,
+ (ulong) keys_to_use.to_ulonglong(), (ulong) prev_tables,
(ulong) const_tables));
- DBUG_PRINT("info", ("records=%lu", (ulong)head->file->records));
+ DBUG_PRINT("info", ("records: %lu", (ulong) head->file->records));
delete quick;
quick=0;
needed_reg.clear_all();
@@ -2102,7 +2102,7 @@
n_blocks * (1.0 - pow(1.0 - 1.0/n_blocks, rows2double(records)));
if (busy_blocks < 1.0)
busy_blocks= 1.0;
- DBUG_PRINT("info",("sweep: nblocks=%g, busy_blocks=%g", n_blocks,
+ DBUG_PRINT("info",("sweep: nblocks: %g, busy_blocks: %g", n_blocks,
busy_blocks));
/*
Disabled: Bail out if # of blocks to read is bigger than # of blocks in
@@ -2126,7 +2126,7 @@
result= busy_blocks;
}
}
- DBUG_PRINT("info",("returning cost=%g", result));
+ DBUG_PRINT("return",("cost: %g", result));
DBUG_RETURN(result);
}
@@ -2220,7 +2220,7 @@
ha_rows roru_total_records;
double roru_intersect_part= 1.0;
DBUG_ENTER("get_best_disjunct_quick");
- DBUG_PRINT("info", ("Full table scan cost =%g", read_time));
+ DBUG_PRINT("info", ("Full table scan cost: %g", read_time));
if (!(range_scans= (TRP_RANGE**)alloc_root(param->mem_root,
sizeof(TRP_RANGE*)*
@@ -2264,7 +2264,7 @@
non_cpk_scan_records += (*cur_child)->records;
}
- DBUG_PRINT("info", ("index_merge scans cost=%g", imerge_cost));
+ DBUG_PRINT("info", ("index_merge scans cost %g", imerge_cost));
if (imerge_too_expensive || (imerge_cost > read_time) ||
(non_cpk_scan_records+cpk_scan_records >= param->table->file->records) &&
read_time != DBL_MAX)
@@ -2877,7 +2877,7 @@
DBUG_PRINT("info", ("Current out_rows= %g", info->out_rows));
DBUG_PRINT("info", ("Adding scan on %s",
info->param->table->key_info[ror_scan->keynr].name));
- DBUG_PRINT("info", ("is_cpk_scan=%d",is_cpk_scan));
+ DBUG_PRINT("info", ("is_cpk_scan: %d",is_cpk_scan));
selectivity_mult = ror_scan_selectivity(info, ror_scan);
if (selectivity_mult == 1.0)
@@ -8280,8 +8280,8 @@
*records= num_groups;
DBUG_PRINT("info",
- ("table rows=%u, keys/block=%u, keys/group=%u, result rows=%u, blocks=%u",
- table_records, keys_per_block, keys_per_group, *records,
+ ("table rows: %u keys/block: %u keys/group: %u result rows: %lu blocks: %u",
+ table_records, keys_per_block, keys_per_group, (ulong) *records,
num_blocks));
DBUG_VOID_RETURN;
}
--- 1.282/sql/slave.cc 2006-11-20 22:42:23 +02:00
+++ 1.283/sql/slave.cc 2006-11-20 22:42:23 +02:00
@@ -247,7 +247,7 @@
bool look_for_description_event)
{
DBUG_ENTER("init_relay_log_pos");
- DBUG_PRINT("info", ("pos=%lu", pos));
+ DBUG_PRINT("info", ("pos: %lu", (long) pos));
*errmsg=0;
pthread_mutex_t *log_lock=rli->relay_log.get_log_lock();
@@ -3080,7 +3080,7 @@
return packet_error;
}
- DBUG_PRINT("info",( "len=%u, net->read_pos[4] = %d\n",
+ DBUG_PRINT("info",( "len: %lu net->read_pos[4]: %d\n",
len, mysql->net.read_pos[4]));
return len - 1;
}
@@ -4116,7 +4116,7 @@
/* Safe copy as 'rev' has been "sanitized" in Rotate_log_event's ctor */
memcpy(mi->master_log_name, rev->new_log_ident, rev->ident_len+1);
mi->master_log_pos= rev->pos;
- DBUG_PRINT("info", ("master_log_pos: '%s' %d",
+ DBUG_PRINT("info", ("master_log_pos: '%s' %lu",
mi->master_log_name, (ulong) mi->master_log_pos));
#ifndef DBUG_OFF
/*
@@ -4233,7 +4233,7 @@
int error = process_io_create_file(mi,(Create_file_log_event*)ev);
delete ev;
mi->master_log_pos += inc_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
my_free((char*)tmp_buf, MYF(0));
DBUG_RETURN(error);
@@ -4260,7 +4260,7 @@
}
delete ev;
mi->master_log_pos+= inc_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
DBUG_RETURN(0);
}
@@ -4316,7 +4316,7 @@
delete ev;
mi->master_log_pos+= inc_pos;
err:
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
DBUG_RETURN(0);
}
@@ -4486,7 +4486,8 @@
rli->ign_master_log_pos_end= mi->master_log_pos;
}
rli->relay_log.signal_update(); // the slave SQL thread needs to re-check
- DBUG_PRINT("info", ("master_log_pos: %d, event originating from the same server, ignored", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu event originating from the same server, ignored",
+ (ulong) mi->master_log_pos));
}
else
{
@@ -4494,7 +4495,7 @@
if (likely(!(rli->relay_log.appendv(buf,event_len,0))))
{
mi->master_log_pos+= inc_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
rli->relay_log.harvest_bytes_written(&rli->log_space_total);
}
else
--- 1.212/sql/sql_acl.cc 2006-11-20 22:42:23 +02:00
+++ 1.213/sql/sql_acl.cc 2006-11-20 22:42:23 +02:00
@@ -3726,7 +3726,7 @@
GRANT_COLUMN *grant_column;
ulong want_access= grant->want_privilege & ~grant->privilege;
DBUG_ENTER("check_grant_column");
- DBUG_PRINT("enter", ("table: %s want_access: %u", table_name, want_access));
+ DBUG_PRINT("enter", ("table: %s want_access: %lu", table_name, want_access));
if (!want_access)
DBUG_RETURN(0); // Already checked
--- 1.93/sql/sql_cache.cc 2006-11-20 22:42:23 +02:00
+++ 1.94/sql/sql_cache.cc 2006-11-20 22:42:23 +02:00
@@ -527,7 +527,8 @@
my_rwlock_init(&lock, NULL);
lock_writing();
DBUG_PRINT("qcache", ("inited & locked query for block 0x%lx",
- ((byte*) this)-ALIGN_SIZE(sizeof(Query_cache_block))));
+ (long) (((byte*) this) -
+ ALIGN_SIZE(sizeof(Query_cache_block)))));
DBUG_VOID_RETURN;
}
@@ -536,7 +537,8 @@
{
DBUG_ENTER("Query_cache_query::unlock_n_destroy");
DBUG_PRINT("qcache", ("destroyed & unlocked query for block 0x%lx",
- ((byte*)this)-ALIGN_SIZE(sizeof(Query_cache_block))));
+ (long) (((byte*) this) -
+ ALIGN_SIZE(sizeof(Query_cache_block)))));
/*
The following call is not needed on system where one can destroy an
active semaphore
@@ -702,6 +704,7 @@
void query_cache_end_of_result(THD *thd)
{
+ Query_cache_block *query_block;
DBUG_ENTER("query_cache_end_of_result");
/* See the comment on double-check locking usage above. */
@@ -717,13 +720,9 @@
if (unlikely(query_cache.query_cache_size == 0 ||
query_cache.flush_in_progress))
- {
- STRUCT_UNLOCK(&query_cache.structure_guard_mutex);
- DBUG_VOID_RETURN;
- }
+ goto end;
- Query_cache_block *query_block= ((Query_cache_block*)
- thd->net.query_cache_query);
+ query_block= ((Query_cache_block*) thd->net.query_cache_query);
if (query_block)
{
DUMP(&query_cache);
@@ -742,27 +741,21 @@
header->query()));
query_cache.wreck(__LINE__, "");
- STRUCT_UNLOCK(&query_cache.structure_guard_mutex);
-
- DBUG_VOID_RETURN;
+ BLOCK_UNLOCK_WR(query_block);
+ goto end;
}
#endif
header->found_rows(current_thd->limit_found_rows);
header->result()->type= Query_cache_block::RESULT;
header->writer(0);
thd->net.query_cache_query= 0;
+ BLOCK_UNLOCK_WR(query_block);
DBUG_EXECUTE("check_querycache",query_cache.check_integrity(1););
- STRUCT_UNLOCK(&query_cache.structure_guard_mutex);
-
- BLOCK_UNLOCK_WR(query_block);
- }
- else
- {
- // Cache was flushed or resized and query was deleted => do nothing
- STRUCT_UNLOCK(&query_cache.structure_guard_mutex);
}
+end:
+ STRUCT_UNLOCK(&query_cache.structure_guard_mutex);
DBUG_VOID_RETURN;
}
@@ -879,8 +872,8 @@
flags.character_set_client_num,
flags.character_set_results_num,
flags.collation_connection_num,
- flags.limit,
- (ulong)flags.time_zone,
+ (ulong) flags.limit,
+ (ulong) flags.time_zone,
flags.sql_mode,
flags.max_sort_length,
flags.group_concat_max_len));
@@ -1122,8 +1115,8 @@
flags.character_set_client_num,
flags.character_set_results_num,
flags.collation_connection_num,
- flags.limit,
- (ulong)flags.time_zone,
+ (ulong) flags.limit,
+ (ulong) flags.time_zone,
flags.sql_mode,
flags.max_sort_length,
flags.group_concat_max_len));
@@ -1260,7 +1253,7 @@
#ifndef EMBEDDED_LIBRARY
do
{
- DBUG_PRINT("qcache", ("Results (len %lu, used %lu, headers %lu)",
+ DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %u)",
result_block->length, result_block->used,
result_block->headers_len()+
ALIGN_SIZE(sizeof(Query_cache_result))));
@@ -2037,7 +2030,7 @@
{
DBUG_ENTER("Query_cache::append_result_data");
DBUG_PRINT("qcache", ("append %lu bytes to 0x%lx query",
- data_len, query_block));
+ data_len, (long) query_block));
if (query_block->query()->add(data_len) > query_cache_limit)
{
@@ -3044,10 +3037,10 @@
OPTION_TO_QUERY_CACHE))) &&
lex->safe_to_cache_query)
{
- DBUG_PRINT("qcache", ("options %lx %lx, type %u",
- OPTION_TO_QUERY_CACHE,
- lex->select_lex.options,
- (int) thd->variables.query_cache_type));
+ DBUG_PRINT("qcache", ("options: %lx %lx type: %u",
+ OPTION_TO_QUERY_CACHE,
+ (long) lex->select_lex.options,
+ (int) thd->variables.query_cache_type));
if (!(table_count= process_and_count_tables(tables_used, tables_type)))
DBUG_RETURN(0);
@@ -3063,10 +3056,10 @@
}
DBUG_PRINT("qcache",
- ("not interesting query: %d or not cacheable, options %lx %lx, type %u",
+ ("not interesting query: %d or not cacheable, options %lx %lx type: %u",
(int) lex->sql_command,
OPTION_TO_QUERY_CACHE,
- lex->select_lex.options,
+ (long) lex->select_lex.options,
(int) thd->variables.query_cache_type));
DBUG_RETURN(0);
}
@@ -3655,7 +3648,8 @@
DBUG_PRINT("qcache", ("F:%u C:%u L:%lu T:'%s' (%u) '%s' '%s'",
flags.client_long_flag,
flags.character_set_client_num,
- (ulong)flags.limit, flags.time_zone->get_name(),
+ (ulong)flags.limit,
+ flags.time_zone->get_name()->ptr(),
len, str, strend(str)+1));
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
(ulong) block->next, (ulong) block->prev,
@@ -3875,9 +3869,8 @@
break;
}
default:
- DBUG_PRINT("error",
- ("block 0x%lx have incorrect type %u",
- block, block->type));
+ DBUG_PRINT("error", ("block 0x%lx have incorrect type %u",
+ (long) block, block->type));
result = 1;
}
@@ -3975,8 +3968,8 @@
} while (block != bins[i].free_blocks);
if (count != bins[i].number)
{
- DBUG_PRINT("error", ("bin[%d].number is %d, but bin have %d blocks",
- bins[i].number, count));
+ DBUG_PRINT("error", ("bins[%d].number = %d, but bin have %d blocks",
+ i, bins[i].number, count));
result = 1;
}
}
--- 1.253/sql/sql_class.cc 2006-11-20 22:42:23 +02:00
+++ 1.254/sql/sql_class.cc 2006-11-20 22:42:23 +02:00
@@ -712,7 +712,7 @@
{
list_include(prev_changed, curr, changed_table_dup(key, key_length));
DBUG_PRINT("info",
- ("key_length %u %u", key_length, (*prev_changed)->key_length));
+ ("key_length %ld %u", key_length, (*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
else if (cmp == 0)
@@ -722,7 +722,7 @@
{
list_include(prev_changed, curr, changed_table_dup(key, key_length));
DBUG_PRINT("info",
- ("key_length %u %u", key_length,
+ ("key_length %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
@@ -734,7 +734,7 @@
}
}
*prev_changed = changed_table_dup(key, key_length);
- DBUG_PRINT("info", ("key_length %u %u", key_length,
+ DBUG_PRINT("info", ("key_length %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
--- 1.308/sql/sql_class.h 2006-11-20 22:42:23 +02:00
+++ 1.309/sql/sql_class.h 2006-11-20 22:42:23 +02:00
@@ -2084,7 +2084,7 @@
inline bool unique_add(void *ptr)
{
DBUG_ENTER("unique_add");
- DBUG_PRINT("info", ("tree %u - %u", tree.elements_in_tree, max_elements));
+ DBUG_PRINT("info", ("tree %u - %lu", tree.elements_in_tree, max_elements));
if (tree.elements_in_tree > max_elements && flush())
DBUG_RETURN(1);
DBUG_RETURN(!tree_insert(&tree, ptr, 0, tree.custom_arg));
--- 1.185/sql/sql_delete.cc 2006-11-20 22:42:23 +02:00
+++ 1.186/sql/sql_delete.cc 2006-11-20 22:42:23 +02:00
@@ -326,7 +326,7 @@
{
thd->row_count_func= deleted;
send_ok(thd,deleted);
- DBUG_PRINT("info",("%d records deleted",deleted));
+ DBUG_PRINT("info",("%ld records deleted",(long) deleted));
}
DBUG_RETURN(error >= 0 || thd->net.report_error);
}
--- 1.588/sql/sql_parse.cc 2006-11-20 22:42:23 +02:00
+++ 1.589/sql/sql_parse.cc 2006-11-20 22:42:23 +02:00
@@ -381,9 +381,9 @@
NO_ACCESS)) // authentication is OK
{
DBUG_PRINT("info",
- ("Capabilities: %d packet_length: %ld Host: '%s' "
+ ("Capabilities: %lu packet_length: %ld Host: '%s' "
"Login user: '%s' Priv_user: '%s' Using password: %s "
- "Access: %u db: '%s'",
+ "Access: %lu db: '%s'",
thd->client_capabilities,
thd->max_client_packet_length,
thd->main_security_ctx.host_or_ip,
@@ -956,7 +956,7 @@
if (thd->client_capabilities & CLIENT_IGNORE_SPACE)
thd->variables.sql_mode|= MODE_IGNORE_SPACE;
#ifdef HAVE_OPENSSL
- DBUG_PRINT("info", ("client capabilities: %d", thd->client_capabilities));
+ DBUG_PRINT("info", ("client capabilities: %lu", thd->client_capabilities));
if (thd->client_capabilities & CLIENT_SSL)
{
/* Do the SSL layering. */
@@ -1112,7 +1112,7 @@
of handle_one_connection, which is thd. We need to know the
start of the stack so that we could check for stack overruns.
*/
- DBUG_PRINT("info", ("handle_one_connection called by thread %d\n",
+ DBUG_PRINT("info", ("handle_one_connection called by thread %lu\n",
thd->thread_id));
/* now that we've called my_thread_init(), it is safe to call DBUG_* */
@@ -1764,7 +1764,9 @@
if (alloc_query(thd, packet, packet_length))
break; // fatal error is set
char *packet_end= thd->query + thd->query_length;
- mysql_log.write(thd,command, "%.*b", thd->query_length, thd->query);
+ /* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */
+ const char *format= "%.*b";
+ mysql_log.write(thd,command, format, thd->query_length, thd->query);
DBUG_PRINT("query",("%-.4096s",thd->query));
if (!(specialflag & SPECIAL_NO_PRIOR))
--- 1.472/sql/sql_select.cc 2006-11-20 22:42:23 +02:00
+++ 1.473/sql/sql_select.cc 2006-11-20 22:42:23 +02:00
@@ -9965,7 +9965,7 @@
if (join->result->send_eof())
rc= 1; // Don't send error
}
- DBUG_PRINT("info",("%ld records output",join->send_records));
+ DBUG_PRINT("info",("%ld records output", (long) join->send_records));
}
else
rc= -1;
--- 1.203/sql/sql_update.cc 2006-11-20 22:42:23 +02:00
+++ 1.204/sql/sql_update.cc 2006-11-20 22:42:23 +02:00
@@ -569,7 +569,7 @@
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
send_ok(thd, (ulong) thd->row_count_func,
thd->insert_id_used ? thd->last_insert_id : 0L,buff);
- DBUG_PRINT("info",("%d records updated",updated));
+ DBUG_PRINT("info",("%ld records updated", (long) updated));
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
thd->abort_on_warning= 0;
@@ -667,7 +667,7 @@
while ((item= (Item_field *) item_it++))
map|= item->used_tables();
- DBUG_PRINT("info",("table_map: 0x%08x", map));
+ DBUG_PRINT("info", ("table_map: 0x%08lx", (long) map));
return map;
}
--- 1.236/sql/table.cc 2006-11-20 22:42:23 +02:00
+++ 1.237/sql/table.cc 2006-11-20 22:42:23 +02:00
@@ -88,7 +88,7 @@
MEM_ROOT **root_ptr, *old_root;
TABLE_SHARE *share;
DBUG_ENTER("openfrm");
- DBUG_PRINT("enter",("name: '%s' form: 0x%lx",name,outparam));
+ DBUG_PRINT("enter",("name: '%s' form: 0x%lx", name, (long) outparam));
error= 1;
disk_buff= NULL;
--- 1.77/sql/unireg.cc 2006-11-20 22:42:23 +02:00
+++ 1.78/sql/unireg.cc 2006-11-20 22:42:23 +02:00
@@ -394,16 +394,16 @@
pos[6]=pos[7]=0; // For the future
pos+=8;
key_parts+=key->key_parts;
- DBUG_PRINT("loop",("flags: %d key_parts: %d at 0x%lx",
- key->flags,key->key_parts,
- key->key_part));
+ DBUG_PRINT("loop", ("flags: %d key_parts: %d at 0x%lx",
+ key->flags, key->key_parts,
+ (long) key->key_part));
for (key_part=key->key_part,key_part_end=key_part+key->key_parts ;
key_part != key_part_end ;
key_part++)
{
uint offset;
- DBUG_PRINT("loop",("field: %d startpos: %lu length: %ld",
+ DBUG_PRINT("loop",("field: %d startpos: %lu length: %d",
key_part->fieldnr, key_part->offset + data_offset,
key_part->length));
int2store(pos,key_part->fieldnr+1+FIELD_NAME_USED);
--- 1.2/mysql-test/include/sp-vars.inc 2006-11-20 22:42:23 +02:00
+++ 1.3/mysql-test/include/sp-vars.inc 2006-11-20 22:42:23 +02:00
@@ -1,6 +1,6 @@
delimiter |;
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE PROCEDURE sp_vars_check_dflt()
BEGIN
@@ -40,7 +40,7 @@
SELECT v17, v18, v19, v20;
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE PROCEDURE sp_vars_check_assignment()
BEGIN
@@ -89,35 +89,35 @@
SELECT d1, d2, d3;
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE FUNCTION sp_vars_check_ret1() RETURNS TINYINT
BEGIN
RETURN 1e200;
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE FUNCTION sp_vars_check_ret2() RETURNS TINYINT
BEGIN
RETURN 10 * 10 * 10;
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE FUNCTION sp_vars_check_ret3() RETURNS TINYINT
BEGIN
RETURN 'Hello, world';
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE FUNCTION sp_vars_check_ret4() RETURNS DECIMAL(64, 2)
BEGIN
RETURN 12 * 10 + 34 + 0.1234;
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
CREATE FUNCTION sp_vars_div_zero() RETURNS INTEGER
BEGIN
@@ -126,6 +126,6 @@
RETURN div_zero;
END|
----------------------------------------------------------------------------
+# --------------------------------------------------------------------------
delimiter ;|
--- 1.19/mysql-test/t/ctype_collate.test 2006-11-20 22:42:23 +02:00
+++ 1.20/mysql-test/t/ctype_collate.test 2006-11-20 22:42:23 +02:00
@@ -59,7 +59,7 @@
INSERT INTO t1 (latin1_f) VALUES (_latin1'z');
--- ORDER BY
+# ORDER BY
SELECT latin1_f FROM t1 ORDER BY latin1_f;
SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_swedish_ci;
@@ -69,9 +69,9 @@
--error 1253
SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE koi8r_general_ci;
---SELECT latin1_f COLLATE koi8r FROM t1 ;
+# SELECT latin1_f COLLATE koi8r FROM t1 ;
--- AS + ORDER BY
+# AS + ORDER BY
SELECT latin1_f COLLATE latin1_swedish_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
SELECT latin1_f COLLATE latin1_german2_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
SELECT latin1_f COLLATE latin1_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
@@ -80,7 +80,7 @@
SELECT latin1_f COLLATE koi8r_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
--- GROUP BY
+# GROUP BY
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f;
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_swedish_ci;
@@ -91,7 +91,7 @@
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE koi8r_general_ci;
--- DISTINCT
+# DISTINCT
SELECT DISTINCT latin1_f FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1;
@@ -102,21 +102,20 @@
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
--- Aggregates
---SELECT MAX(k COLLATE latin1_german2_ci)
---FROM t1
-
-
--- WHERE
---SELECT *
---FROM t1
---WHERE (_latin1'Mu"ller' COLLATE latin1_german2_ci) = k
-
---HAVING
---SELECT *
---FROM t1
---HAVING (_latin1'Mu"ller' COLLATE latin1_german2_ci) = k
+# Aggregates
+--disable_parsing
+SELECT MAX(k COLLATE latin1_german2_ci)
+FROM t1
+WHERE
+SELECT *
+FROM t1
+WHERE (_latin1'Mu"ller' COLLATE latin1_german2_ci) = k
+HAVING
+SELECT *
+FROM t1
+HAVING (_latin1'Mu"ller' COLLATE latin1_german2_ci) = k;
+--enable_parsing
#
# Check that SHOW displays COLLATE clause
--- 1.47/mysql-test/t/ctype_ucs.test 2006-11-20 22:42:23 +02:00
+++ 1.48/mysql-test/t/ctype_ucs.test 2006-11-20 22:42:23 +02:00
@@ -298,7 +298,7 @@
SELECT HEX(a) FROM t1;
DROP TABLE t1;
--- the same should be also done with enum and set
+# the same should be also done with enum and set
#
--- 1.25/mysys/my_handler.c 2006-11-20 22:42:23 +02:00
+++ 1.26/mysys/my_handler.c 2006-11-20 22:42:23 +02:00
@@ -505,6 +505,7 @@
switch ((enum ha_base_keytype) keyseg->type) {
case HA_KEYTYPE_TEXT:
case HA_KEYTYPE_BINARY:
+ case HA_KEYTYPE_BIT:
if (keyseg->flag & HA_SPACE_PACK)
{
int a_length;
@@ -516,7 +517,9 @@
a= end;
break;
case HA_KEYTYPE_VARTEXT1:
+ case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY1:
+ case HA_KEYTYPE_VARBINARY2:
{
int a_length;
get_key_length(a_length, a);
@@ -545,6 +548,10 @@
case HA_KEYTYPE_FLOAT:
case HA_KEYTYPE_DOUBLE:
a= end;
+ break;
+ case HA_KEYTYPE_END: /* purecov: inspected */
+ /* keep compiler happy */
+ DBUG_ASSERT(0);
break;
}
}
--- 1.5/mysql-test/r/ctype_cp1250_ch.result 2006-11-20 22:42:23 +02:00
+++ 1.6/mysql-test/r/ctype_cp1250_ch.result 2006-11-20 22:42:23 +02:00
@@ -1,3 +1,4 @@
+DROP TABLE IF EXISTS t1;
SHOW COLLATION LIKE 'cp1250_czech_cs';
Collation Charset Id Default Compiled Sortlen
cp1250_czech_cs cp1250 34 Yes 2
--- 1.5/mysql-test/t/ctype_cp1250_ch.test 2006-11-20 22:42:23 +02:00
+++ 1.6/mysql-test/t/ctype_cp1250_ch.test 2006-11-20 22:42:23 +02:00
@@ -1,5 +1,9 @@
-- source include/have_cp1250_ch.inc
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
SHOW COLLATION LIKE 'cp1250_czech_cs';
#
--- 1.132/mysql-test/t/subselect.test 2006-11-20 22:42:23 +02:00
+++ 1.133/mysql-test/t/subselect.test 2006-11-20 22:42:23 +02:00
@@ -108,7 +108,7 @@
-- error 1241
select * from t3 where a in (select * from t2);
insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9),(1,10);
--- empty set
+# empty set
select b,max(a) as ma from t4 group by b having b < (select max(t2.a) from t2 where t2.b=t4.b);
insert into t2 values (2,10);
select b,max(a) as ma from t4 group by b having ma < (select max(t2.a) from t2 where t2.b=t4.b);
@@ -2247,11 +2247,11 @@
# Bug#19700: subselect returning BIGINT always returned it as SIGNED
#
CREATE TABLE t1 (i BIGINT UNSIGNED);
-INSERT INTO t1 VALUES (10000000000000000000); -- > MAX SIGNED BIGINT 9323372036854775807
+INSERT INTO t1 VALUES (10000000000000000000); # > MAX SIGNED BIGINT 9323372036854775807
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (i BIGINT UNSIGNED);
-INSERT INTO t2 VALUES (10000000000000000000); -- same as first table
+INSERT INTO t2 VALUES (10000000000000000000); # same as first table
INSERT INTO t2 VALUES (1);
/* simple test */
--- 1.134/sql/item_subselect.cc 2006-11-20 22:42:23 +02:00
+++ 1.135/sql/item_subselect.cc 2006-11-20 22:42:23 +02:00
@@ -54,7 +54,7 @@
{
DBUG_ENTER("Item_subselect::init");
- DBUG_PRINT("enter", ("select_lex: 0x%x", (ulong) select_lex));
+ DBUG_PRINT("enter", ("select_lex: 0x%lx", (long) select_lex));
unit= select_lex->master_unit();
if (unit->item)
--- 1.98/sql/sql_view.cc 2006-11-20 22:42:23 +02:00
+++ 1.99/sql/sql_view.cc 2006-11-20 22:42:23 +02:00
@@ -563,7 +563,7 @@
LEX_STRING *name;
int i;
- for (i= 0; name= names++; i++)
+ for (i= 0; (name= names++); i++)
{
buff.append(i ? ", " : "(");
append_identifier(thd, &buff, name->str, name->length);
--- 1.8/mysql-test/t/csv.test 2006-11-20 22:42:23 +02:00
+++ 1.9/mysql-test/t/csv.test 2006-11-20 22:42:23 +02:00
@@ -1360,27 +1360,27 @@
create table t1 (a int) engine=csv;
insert t1 values (1);
--enable_info
-delete from t1; -- delete_row
-delete from t1; -- delete_all_rows
+delete from t1; # delete_row
+delete from t1; # delete_all_rows
--disable_info
insert t1 values (1),(2);
--enable_info
-delete from t1; -- delete_all_rows
+delete from t1; # delete_all_rows
--disable_info
insert t1 values (1),(2),(3);
flush tables;
--enable_info
-delete from t1; -- delete_row
+delete from t1; # delete_row
--disable_info
insert t1 values (1),(2),(3),(4);
flush tables;
select count(*) from t1;
--enable_info
-delete from t1; -- delete_all_rows
+delete from t1; # delete_all_rows
--disable_info
insert t1 values (1),(2),(3),(4),(5);
--enable_info
-truncate table t1; -- truncate
+truncate table t1; # truncate
--disable_info
drop table t1;
--- 1.75/sql/ha_archive.cc 2006-11-20 22:42:23 +02:00
+++ 1.76/sql/ha_archive.cc 2006-11-20 22:42:23 +02:00
@@ -682,7 +682,8 @@
}
share->approx_file_size+= total_row_length;
written= gzwrite(writer, buf, table->s->reclength);
- DBUG_PRINT("ha_archive::real_write_row", ("Wrote %d bytes expected %d", written, table->s->reclength));
+ DBUG_PRINT("ha_archive::real_write_row", ("Wrote %d bytes expected %lu", (int) written,
+ table->s->reclength));
if (!delayed_insert || !bulk_insert)
share->dirty= TRUE;
@@ -822,7 +823,8 @@
DBUG_ENTER("ha_archive::get_row");
read= gzread(file_to_read, buf, table->s->reclength);
- DBUG_PRINT("ha_archive::get_row", ("Read %d bytes expected %d", read, table->s->reclength));
+ DBUG_PRINT("ha_archive::get_row", ("Read %d bytes expected %lu", (int) read,
+ table->s->reclength));
if (read == Z_STREAM_ERROR)
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
--- 1.34/sql/tztime.cc 2006-11-20 22:42:23 +02:00
+++ 1.35/sql/tztime.cc 2006-11-20 22:42:23 +02:00
@@ -949,13 +949,12 @@
*/
if (shift)
{
- if (local_t > (TIMESTAMP_MAX_VALUE - shift*86400L +
- sp->revtis[i].rt_offset - saved_seconds))
+ if (local_t > (my_time_t) (TIMESTAMP_MAX_VALUE - shift*86400L +
+ sp->revtis[i].rt_offset - saved_seconds))
{
DBUG_RETURN(0); /* my_time_t overflow */
}
- else
- local_t+= shift*86400L;
+ local_t+= shift*86400L;
}
if (sp->revtis[i].rt_type)
--- 1.13/mysql-test/t/func_sapdb.test 2006-11-20 22:42:24 +02:00
+++ 1.14/mysql-test/t/func_sapdb.test 2006-11-20 22:42:24 +02:00
@@ -35,7 +35,7 @@
select datediff("1997-11-31 23:59:59.000001","1997-12-31");
SET @@SQL_MODE="";
--- This will give a warning
+# This will give a warning
select datediff("1997-11-31 23:59:59.000001","1997-12-31");
select datediff("1997-11-30 23:59:59.000001",null);
--- 1.39/mysql-test/t/type_newdecimal.test 2006-11-20 22:42:24 +02:00
+++ 1.40/mysql-test/t/type_newdecimal.test 2006-11-20 22:42:24 +02:00
@@ -613,7 +613,7 @@
#-- should return 99.9999999999999999999999999999999
#
select truncate(99999999999999999999999999999999999999,-31);
--- should return 90000000000000000000000000000000
+# should return 90000000000000000000000000000000
#
#-- 6. Set functions (AVG, SUM, COUNT) should work.
#
@@ -810,7 +810,7 @@
#BUG#6048 Stored procedure causes operating system reboot
#BUG#6053 DOUBLE PRECISION literal
--- Tests from 'traditional' mode tests
+# Tests from 'traditional' mode tests
#
set sql_mode='ansi,traditional';
#
--- 1.102/sql-common/client.c 2006-11-20 22:42:24 +02:00
+++ 1.103/sql-common/client.c 2006-11-20 22:42:24 +02:00
@@ -598,7 +598,7 @@
if (len == packet_error || len == 0)
{
- DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
+ DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %lu",
vio_description(net->vio),len));
#ifdef MYSQL_SERVER
if (net->vio && vio_was_interrupted(net->vio))
@@ -870,7 +870,7 @@
mysql_free_result(MYSQL_RES *result)
{
DBUG_ENTER("mysql_free_result");
- DBUG_PRINT("enter",("mysql_res: %lx",result));
+ DBUG_PRINT("enter",("mysql_res: 0x%lx", (long) result));
if (result)
{
MYSQL *mysql= result->handle;
@@ -1366,7 +1366,7 @@
DBUG_PRINT("info",("status: %u warning_count: %u",
mysql->server_status, mysql->warning_count));
}
- DBUG_PRINT("exit",("Got %d rows",result->rows));
+ DBUG_PRINT("exit", ("Got %lu rows", (ulong) result->rows));
DBUG_RETURN(result);
}
@@ -2324,7 +2324,7 @@
goto error;
#endif
- DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
+ DBUG_PRINT("exit", ("Mysql handler: 0x%lx", (long) mysql));
reset_sigpipe(mysql);
DBUG_RETURN(mysql);
@@ -2697,7 +2697,7 @@
mysql_real_query(MYSQL *mysql, const char *query, ulong length)
{
DBUG_ENTER("mysql_real_query");
- DBUG_PRINT("enter",("handle: %lx",mysql));
+ DBUG_PRINT("enter",("handle: 0x%lx", (long) mysql));
DBUG_PRINT("query",("Query = '%-.4096s'",query));
if (mysql_send_query(mysql,query,length))
--- 1.9/myisam/mi_keycache.c 2006-11-20 22:42:24 +02:00
+++ 1.10/myisam/mi_keycache.c 2006-11-20 22:42:24 +02:00
@@ -54,8 +54,8 @@
int error= 0;
MYISAM_SHARE* share= info->s;
DBUG_ENTER("mi_assign_to_key_cache");
- DBUG_PRINT("enter",("old_key_cache_handle: %lx new_key_cache_handle: %lx",
- share->key_cache, key_cache));
+ DBUG_PRINT("enter",("old_key_cache_handle: 0x%lx new_key_cache_handle: 0x%lx",
+ (long) share->key_cache, (long) key_cache));
/*
Skip operation if we didn't change key cache. This can happen if we
--- 1.17/mysql-test/t/view_grant.test 2006-11-20 22:42:24 +02:00
+++ 1.18/mysql-test/t/view_grant.test 2006-11-20 22:42:24 +02:00
@@ -800,7 +800,7 @@
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 VALUES (1), (2), (3);
CREATE DEFINER = 'no-such-user'@localhost VIEW v AS SELECT a from t1;
---warning 1448
+#--warning 1448
SHOW CREATE VIEW v;
--error 1449
SELECT * FROM v;
--- 1.10/ndb/include/ndb_global.h.in 2006-11-20 22:42:24 +02:00
+++ 1.11/ndb/include/ndb_global.h.in 2006-11-20 22:42:24 +02:00
@@ -132,4 +132,10 @@
#define PATH_MAX 1024
#endif
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
+#define LINT_SET_PTR = {0,0}
+#else
+#define LINT_SET_PTR
+#endif
+
#endif
--- 1.18/ndb/tools/ndb_config.cpp 2006-11-20 22:42:24 +02:00
+++ 1.19/ndb/tools/ndb_config.cpp 2006-11-20 22:42:24 +02:00
@@ -114,6 +114,7 @@
int m_key;
BaseString m_value;
virtual int eval(const Iter&);
+ virtual ~Match() {}
};
struct HostMatch : public Match
@@ -127,6 +128,7 @@
Apply(int val) { m_key = val;}
int m_key;
virtual int apply(const Iter&);
+ virtual ~Apply() {}
};
struct NodeTypeApply : public Apply
--- 1.151/mysql-test/mysql-test-run.pl 2006-11-20 22:42:24 +02:00
+++ 1.152/mysql-test/mysql-test-run.pl 2006-11-20 22:42:24 +02:00
@@ -2045,6 +2045,12 @@
}
closedir(DIR);
}
+
+ # Remove old log files
+ foreach my $name (glob("r/*.reject r/*.progress r/*.log r/*.warnings"))
+ {
+ unlink($name);
+ }
}
@@ -2425,8 +2431,8 @@
sub rm_ndbcluster_tables ($) {
my $dir= shift;
- foreach my $bin ( glob("$dir/cluster/apply_status*"),
- glob("$dir/cluster/schema*") )
+ foreach my $bin ( glob("$dir/mysql/apply_status*"),
+ glob("$dir/mysql/schema*"))
{
unlink($bin);
}
@@ -4089,12 +4095,12 @@
# tables ok FIXME This is a workaround so that only one mysqld
# create the tables
if ( ! sleep_until_file_created(
- "$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
+ "$master->[0]->{'path_myddir'}/mysql/apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{
- $tinfo->{'comment'}= "Failed to create 'cluster/apply_status' table";
+ $tinfo->{'comment'}= "Failed to create 'mysql/apply_status' table";
return 1;
}
}
--- 1.24/sql-common/my_time.c 2006-11-20 22:42:24 +02:00
+++ 1.25/sql-common/my_time.c 2006-11-20 22:42:24 +02:00
@@ -963,7 +963,7 @@
*/
if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
tmp= 0;
-end:
+
return (my_time_t) tmp;
} /* my_system_gmt_sec */
--- 1.7/ndb/include/logger/LogHandler.hpp 2006-11-20 22:42:24 +02:00
+++ 1.8/ndb/include/logger/LogHandler.hpp 2006-11-20 22:42:24 +02:00
@@ -135,7 +135,7 @@
*
* @param str the error string.
*/
- void setErrorStr(char* str);
+ void setErrorStr(const char* str);
/**
* Parse logstring parameters
--- 1.4/ndb/include/util/InputStream.hpp 2006-11-20 22:42:24 +02:00
+++ 1.5/ndb/include/util/InputStream.hpp 2006-11-20 22:42:24 +02:00
@@ -25,6 +25,7 @@
*/
class InputStream {
public:
+ virtual ~InputStream() {}
virtual char* gets(char * buf, int bufLen) = 0;
};
--- 1.3/ndb/include/util/OutputStream.hpp 2006-11-20 22:42:24 +02:00
+++ 1.4/ndb/include/util/OutputStream.hpp 2006-11-20 22:42:24 +02:00
@@ -25,6 +25,7 @@
*/
class OutputStream {
public:
+ virtual ~OutputStream() {}
virtual int print(const char * fmt, ...) = 0;
virtual int println(const char * fmt, ...) = 0;
virtual void flush() {};
--- 1.5/ndb/include/util/SimpleProperties.hpp 2006-11-20 22:42:24 +02:00
+++ 1.6/ndb/include/util/SimpleProperties.hpp 2006-11-20 22:42:24 +02:00
@@ -151,6 +151,7 @@
ValueType m_type;
protected:
Reader();
+ virtual ~Reader() {}
virtual void reset() = 0;
virtual bool step(Uint32 len) = 0;
@@ -169,6 +170,7 @@
bool add(Uint16 key, const char * value);
bool add(Uint16 key, const void* value, int len);
protected:
+ virtual ~Writer() {}
virtual bool reset() = 0;
virtual bool putWord(Uint32 val) = 0;
virtual bool putWords(const Uint32 * src, Uint32 len) = 0;
@@ -184,6 +186,7 @@
public:
SimplePropertiesLinearReader(const Uint32 * src, Uint32 len);
+ virtual ~SimplePropertiesLinearReader() {}
virtual void reset();
virtual bool step(Uint32 len);
virtual bool getWord(Uint32 * dst);
@@ -202,6 +205,7 @@
public:
LinearWriter(Uint32 * src, Uint32 len);
+ virtual ~LinearWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
@@ -219,6 +223,7 @@
public:
UtilBufferWriter(class UtilBuffer & buf);
+ virtual ~UtilBufferWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
@@ -238,6 +243,7 @@
SimplePropertiesSectionReader(struct SegmentedSectionPtr &,
class SectionSegmentPool &);
+ virtual ~SimplePropertiesSectionReader() {}
virtual void reset();
virtual bool step(Uint32 len);
virtual bool getWord(Uint32 * dst);
@@ -270,6 +276,7 @@
public:
SimplePropertiesSectionWriter(class SectionSegmentPool &);
+ virtual ~SimplePropertiesSectionWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
--- 1.27/ndb/src/common/debugger/EventLogger.cpp 2006-11-20 22:42:24 +02:00
+++ 1.28/ndb/src/common/debugger/EventLogger.cpp 2006-11-20 22:42:24 +02:00
@@ -116,8 +116,7 @@
int sphase = theData[4];
int extra = theData[5];
getRestartAction(theData[1],action_str);
- if (signal)
- reason_str.appfmt(" Initiated by signal %d.", signum);
+ reason_str.appfmt(" Initiated by signal %d.", signum);
if (error)
{
ndbd_exit_classification cl;
--- 1.2/ndb/src/common/debugger/signaldata/BackupSignalData.cpp 2006-11-20 22:42:24 +02:00
+++ 1.3/ndb/src/common/debugger/signaldata/BackupSignalData.cpp 2006-11-20 22:42:24 +02:00
@@ -124,6 +124,9 @@
sig->backupPtr, sig->backupId);
return true;
break;
+ case AbortBackupOrd::AbortScan:
+ case AbortBackupOrd::IncompatibleVersions:
+ return false;
}
return false;
}
--- 1.11/ndb/src/common/logger/LogHandler.cpp 2006-11-20 22:42:24 +02:00
+++ 1.12/ndb/src/common/logger/LogHandler.cpp 2006-11-20 22:42:24 +02:00
@@ -164,9 +164,9 @@
}
void
-LogHandler::setErrorStr(char* str)
+LogHandler::setErrorStr(const char* str)
{
- m_errorStr= str;
+ m_errorStr= (char*) str;
}
bool
--- 1.8/ndb/src/common/portlib/NdbMutex.c 2006-11-20 22:42:24 +02:00
+++ 1.9/ndb/src/common/portlib/NdbMutex.c 2006-11-20 22:42:24 +02:00
@@ -28,7 +28,7 @@
DBUG_ENTER("NdbMutex_Create");
pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex));
- DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex));
+ DBUG_PRINT("info",("NdbMem_Allocate 0x%lx", (long) pNdbMutex));
if (pNdbMutex == NULL)
DBUG_RETURN(NULL);
@@ -50,7 +50,7 @@
result = pthread_mutex_destroy(p_mutex);
- DBUG_PRINT("info",("NdbMem_Free 0x%lx",p_mutex));
+ DBUG_PRINT("info",("NdbMem_Free 0x%lx", (long) p_mutex));
NdbMem_Free(p_mutex);
DBUG_RETURN(result);
--- 1.24/ndb/src/common/portlib/NdbThread.c 2006-11-20 22:42:24 +02:00
+++ 1.25/ndb/src/common/portlib/NdbThread.c 2006-11-20 22:42:24 +02:00
@@ -122,7 +122,7 @@
assert(result==0);
pthread_attr_destroy(&thread_attr);
- DBUG_PRINT("exit",("ret: %lx", tmpThread));
+ DBUG_PRINT("exit",("ret: 0x%lx", (long) tmpThread));
DBUG_RETURN(tmpThread);
}
@@ -131,7 +131,7 @@
{
DBUG_ENTER("NdbThread_Destroy");
if (*p_thread != NULL){
- DBUG_PRINT("enter",("*p_thread: %lx", * p_thread));
+ DBUG_PRINT("enter",("*p_thread: 0x%lx", (long) *p_thread));
free(* p_thread);
* p_thread = 0;
}
--- 1.21/ndb/src/common/transporter/Transporter.cpp 2006-11-20 22:42:24 +02:00
+++ 1.22/ndb/src/common/transporter/Transporter.cpp 2006-11-20 22:42:24 +02:00
@@ -39,8 +39,8 @@
int _byteorder,
bool _compression, bool _checksum, bool _signalId)
: m_s_port(s_port), remoteNodeId(rNodeId), localNodeId(lNodeId),
- isServer(lNodeId==serverNodeId), isMgmConnection(_isMgmConnection),
- m_packer(_signalId, _checksum),
+ isServer(lNodeId==serverNodeId),
+ m_packer(_signalId, _checksum), isMgmConnection(_isMgmConnection),
m_type(_type),
m_transporter_registry(t_reg)
{
--- 1.3/ndb/src/cw/cpcd/CPCD.hpp 2006-11-20 22:42:24 +02:00
+++ 1.4/ndb/src/cw/cpcd/CPCD.hpp 2006-11-20 22:42:24 +02:00
@@ -63,6 +63,7 @@
struct EventSubscriber {
virtual void report(const CPCEvent &) = 0;
+ virtual ~EventSubscriber() {}
};
/**
--- 1.36/ndb/src/kernel/blocks/backup/Backup.cpp 2006-11-20 22:42:24 +02:00
+++ 1.37/ndb/src/kernel/blocks/backup/Backup.cpp 2006-11-20 22:42:24 +02:00
@@ -272,7 +272,7 @@
Uint32 tabPtr_I = Tdata2;
Uint32 fragPtr_I = signal->theData[3];
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptr_I);
if (tabPtr_I == RNIL)
@@ -309,7 +309,7 @@
fragInfo->NoOfRecordsLow = htonl(fragPtr.p->noOfRecords & 0xFFFFFFFF);
fragInfo->NoOfRecordsHigh = htonl(fragPtr.p->noOfRecords >> 32);
fragInfo->FilePosLow = htonl(0 & 0xFFFFFFFF);
- fragInfo->FilePosHigh = htonl(0 >> 32);
+ fragInfo->FilePosHigh = htonl(0);
filePtr.p->operation.dataBuffer.updateWritePtr(sz);
@@ -341,7 +341,7 @@
case BackupContinueB::BUFFER_UNDERFLOW:
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, Tdata1);
checkFile(signal, filePtr);
return;
@@ -350,7 +350,7 @@
case BackupContinueB::BUFFER_FULL_SCAN:
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, Tdata1);
checkScan(signal, filePtr);
return;
@@ -359,7 +359,7 @@
case BackupContinueB::BUFFER_FULL_FRAG_COMPLETE:
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, Tdata1);
fragmentCompleted(signal, filePtr);
return;
@@ -368,7 +368,7 @@
case BackupContinueB::BUFFER_FULL_META:
{
jam();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, Tdata1);
BackupFilePtr filePtr;
@@ -377,7 +377,7 @@
if(buf.getFreeSize() + buf.getMinRead() < buf.getUsableSize()) {
jam();
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, Tdata2);
DEBUG_OUT("Backup - Buffer full - " << buf.getFreeSize()
@@ -392,7 +392,7 @@
return;
}//if
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, Tdata2);
GetTabInfoReq * req = (GetTabInfoReq *)signal->getDataPtrSend();
req->senderRef = reference();
@@ -912,6 +912,9 @@
#endif
Uint32 gsn, len, pos;
+ LINT_INIT(gsn);
+ LINT_INIT(len);
+ LINT_INIT(pos);
ptr.p->nodes.bitANDC(mask);
switch(ptr.p->masterData.gsn){
case GSN_DEFINE_BACKUP_REQ:
@@ -1099,7 +1102,7 @@
void
Backup::execUTIL_SEQUENCE_REF(Signal* signal)
{
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
jamEntry();
UtilSequenceRef * utilRef = (UtilSequenceRef*)signal->getDataPtr();
ptr.i = utilRef->senderData;
@@ -1153,7 +1156,7 @@
return;
}
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
ptr.i = conf->senderData;
c_backupPool.getPtr(ptr);
@@ -1194,7 +1197,7 @@
jamEntry();
ndbrequire(retVal == 0);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
ptr.i = ptrI;
c_backupPool.getPtr(ptr);
@@ -1215,7 +1218,7 @@
/**
* We now have both the mutexes
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
ptr.i = ptrI;
c_backupPool.getPtr(ptr);
@@ -1320,7 +1323,7 @@
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->errorCode);
@@ -1337,7 +1340,7 @@
//const Uint32 backupId = conf->backupId;
const Uint32 nodeId = refToNode(signal->senderBlockRef());
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
if (ERROR_INSERTED(10024))
@@ -1508,7 +1511,7 @@
const Uint32 ptrI = ref->getConnectionPtr();
const Uint32 tableId = ref->getTableId();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
/**
@@ -1623,7 +1626,7 @@
const Uint32 signalNo = ref->signalNo;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->errorCode);
@@ -1641,7 +1644,7 @@
const Uint32 signalNo = conf->signalNo;
const Uint32 nodeId = refToNode(signal->senderBlockRef());
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
startBackupReply(signal, ptr, nodeId, signalNo);
@@ -1671,7 +1674,7 @@
return;
}
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, ptr.p->masterData.startBackup.tablePtr);
for(Uint32 i = 0; i<StartBackupReq::MaxTableTriggers; i++) {
jam();
@@ -1765,7 +1768,7 @@
AlterTrigConf* conf = (AlterTrigConf*)signal->getDataPtr();
const Uint32 ptrI = conf->getConnectionPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
alterTrigReply(signal, ptr);
@@ -1779,7 +1782,7 @@
AlterTrigRef* ref = (AlterTrigRef*)signal->getDataPtr();
const Uint32 ptrI = ref->getConnectionPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->getErrorCode());
@@ -1823,7 +1826,7 @@
WaitGCPRef * ref = (WaitGCPRef*)signal->getDataPtr();
const Uint32 ptrI = ref->senderData;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ndbrequire(ptr.p->masterRef == reference());
@@ -1847,7 +1850,7 @@
const Uint32 ptrI = conf->senderData;
const Uint32 gcp = conf->gcp;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ndbrequire(ptr.p->masterRef == reference());
@@ -2057,7 +2060,7 @@
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
TablePtr tabPtr;
@@ -2206,7 +2209,7 @@
DropTrigRef* ref = (DropTrigRef*)signal->getDataPtr();
const Uint32 ptrI = ref->getConnectionPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
//ndbrequire(ref->getErrorCode() == DropTrigRef::NoSuchTrigger);
@@ -2221,7 +2224,7 @@
DropTrigConf* conf = (DropTrigConf*)signal->getDataPtr();
const Uint32 ptrI = conf->getConnectionPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
dropTrigReply(signal, ptr);
@@ -2261,7 +2264,7 @@
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->errorCode);
@@ -2296,7 +2299,7 @@
//const Uint32 backupId = conf->backupId;
const Uint32 nodeId = refToNode(signal->senderBlockRef());
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->noOfLogBytes += conf->noOfLogBytes;
@@ -2485,7 +2488,7 @@
DefineBackupReq* req = (DefineBackupReq*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
const Uint32 ptrI = req->backupPtr;
const Uint32 backupId = req->backupId;
const BlockReference senderRef = req->senderRef;
@@ -2663,7 +2666,7 @@
ListTablesConf* conf = (ListTablesConf*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, conf->senderData);
const Uint32 len = signal->length() - ListTablesConf::HeaderLength;
@@ -2711,7 +2714,7 @@
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
FsOpenReq * req = (FsOpenReq *)signal->getDataPtrSend();
req->userReference = reference();
@@ -2776,10 +2779,10 @@
const Uint32 userPtr = ref->userPointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, userPtr);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
ptr.p->setErrorCode(ref->errorCode);
openFilesReply(signal, ptr, filePtr);
@@ -2795,11 +2798,11 @@
const Uint32 userPtr = conf->userPointer;
const Uint32 filePointer = conf->filePointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, userPtr);
filePtr.p->filePointer = filePointer;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
ndbrequire(filePtr.p->fileOpened == 0);
@@ -2957,7 +2960,7 @@
GetTabInfoRef * ref = (GetTabInfoRef*)signal->getDataPtr();
const Uint32 senderData = ref->senderData;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, senderData);
defineBackupRef(signal, ptr, ref->errorCode);
@@ -2978,7 +2981,7 @@
const Uint32 len = conf->totalLen;
const Uint32 senderData = conf->senderData;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, senderData);
SegmentedSectionPtr dictTabInfoPtr;
@@ -3212,7 +3215,7 @@
fragPtr.p->scanned = 0;
fragPtr.p->scanning = 0;
fragPtr.p->tableId = tableId;
- fragPtr.p->node = RNIL;
+ fragPtr.p->node = 0;
}//for
/**
@@ -3421,7 +3424,7 @@
/**
* Get file
*/
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, ptr.p->dataFilePtr);
ndbrequire(filePtr.p->backupPtr == ptrI);
@@ -3553,12 +3556,12 @@
//const Uint32 transId2 = signal->theData[2];
const Uint32 dataLen = signal->length() - 3;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
OperationRecord & op = filePtr.p->operation;
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, op.tablePtr);
Table & table = * tabPtr.p;
@@ -3752,7 +3755,7 @@
ScanFragRef * ref = (ScanFragRef*)signal->getDataPtr();
const Uint32 filePtrI = ref->senderData;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
filePtr.p->errorCode = ref->errorCode;
@@ -3771,7 +3774,7 @@
ScanFragConf * conf = (ScanFragConf*)signal->getDataPtr();
const Uint32 filePtrI = conf->senderData;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
OperationRecord & op = filePtr.p->operation;
@@ -3812,7 +3815,7 @@
filePtr.p->scanRunning = 0;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
BackupFragmentConf * conf = (BackupFragmentConf*)signal->getDataPtrSend();
@@ -3835,7 +3838,7 @@
void
Backup::backupFragmentRef(Signal * signal, BackupFilePtr filePtr)
{
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
ptr.p->m_gsn = GSN_BACKUP_FRAGMENT_REF;
@@ -3891,7 +3894,7 @@
sendSignalWithDelay(DBLQH_REF, GSN_SCAN_NEXTREQ, signal,
10000, ScanFragNextReq::SignalLength);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend();
ord->backupId = ptr.p->backupId;
@@ -3922,7 +3925,8 @@
const Uint32 filePtrI = ref->userPointer;
const Uint32 errCode = ref->errorCode;
- BackupFilePtr filePtr;
+
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
filePtr.p->fileRunning = 0;
@@ -3942,7 +3946,7 @@
const Uint32 filePtrI = signal->theData[0]; //conf->userPointer;
const Uint32 bytes = signal->theData[1]; //conf->bytes;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
OperationRecord & op = filePtr.p->operation;
@@ -4030,8 +4034,8 @@
/*
TUP asks if this trigger is to be fired on this node.
*/
- TriggerPtr trigPtr;
- TablePtr tabPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
+ TablePtr tabPtr LINT_SET_PTR;
FragmentPtr fragPtr;
Uint32 trigger_id = signal->theData[0];
Uint32 frag_id = signal->theData[1];
@@ -4059,7 +4063,7 @@
TrigAttrInfo * trg = (TrigAttrInfo*)signal->getDataPtr();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
c_triggerPool.getPtr(trigPtr, trg->getTriggerId());
ndbrequire(trigPtr.p->event != ILLEGAL_TRIGGER_ID); // Online...
@@ -4090,7 +4094,7 @@
jam();
Uint32 save[TrigAttrInfo::StaticLength];
memcpy(save, signal->getDataPtr(), 4*TrigAttrInfo::StaticLength);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, trigPtr.p->backupPtr);
trigPtr.p->errorCode = AbortBackupOrd::LogBufferFull;
AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend();
@@ -4131,7 +4135,7 @@
const Uint32 gci = trg->getGCI();
const Uint32 trI = trg->getTriggerId();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
c_triggerPool.getPtr(trigPtr, trI);
ndbrequire(trigPtr.p->event != ILLEGAL_TRIGGER_ID);
@@ -4144,7 +4148,7 @@
ndbrequire(trigPtr.p->logEntry != 0);
Uint32 len = trigPtr.p->logEntry->Length;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, trigPtr.p->backupPtr);
if(gci != ptr.p->currGCP)
{
@@ -4215,7 +4219,7 @@
/**
* Get backup record
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->slaveState.setState(STOPPING);
@@ -4228,6 +4232,7 @@
BackupFilePtr filePtr;
ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr);
Uint32 * dst;
+ LINT_INIT(dst);
ndbrequire(filePtr.p->operation.dataBuffer.getWritePtr(&dst, 1));
* dst = 0;
filePtr.p->operation.dataBuffer.updateWritePtr(1);
@@ -4240,6 +4245,7 @@
const Uint32 gcpSz = sizeof(BackupFormat::CtlFile::GCPEntry) >> 2;
Uint32 * dst;
+ LINT_INIT(dst);
ndbrequire(filePtr.p->operation.dataBuffer.getWritePtr(&dst, gcpSz));
BackupFormat::CtlFile::GCPEntry * gcp =
@@ -4331,7 +4337,7 @@
FsRef * ref = (FsRef*)signal->getDataPtr();
const Uint32 filePtrI = ref->userPointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
BackupRecordPtr ptr;
@@ -4352,7 +4358,7 @@
FsConf * conf = (FsConf*)signal->getDataPtr();
const Uint32 filePtrI = conf->userPointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
#ifdef DEBUG_ABORT
@@ -4366,7 +4372,7 @@
filePtr.p->fileOpened = 0;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
for(ptr.p->files.first(filePtr); filePtr.i!=RNIL;ptr.p->files.next(filePtr))
{
@@ -4432,7 +4438,7 @@
dumpUsedResources();
#endif
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
if(requestType == AbortBackupOrd::ClientAbort) {
if (getOwnNodeId() != getMasterNodeId()) {
jam();
@@ -4561,7 +4567,7 @@
jam();
for(Uint32 j = 0; j<3; j++) {
jam();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
if(tabPtr.p->triggerAllocated[j]) {
jam();
c_triggerPool.getPtr(trigPtr, tabPtr.p->triggerIds[j]);
@@ -4600,7 +4606,7 @@
tabPtr.p->fragments.release();
for(Uint32 j = 0; j<3; j++) {
jam();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
if(tabPtr.p->triggerAllocated[j]) {
jam();
c_triggerPool.getPtr(trigPtr, tabPtr.p->triggerIds[j]);
@@ -4680,7 +4686,7 @@
/**
* Get backup record
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
c_backups.release(ptr);
}
--- 1.25/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp 2006-11-20 22:42:24 +02:00
+++ 1.26/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp 2006-11-20 22:42:24 +02:00
@@ -1234,7 +1234,7 @@
fprintf(stdout, "\n");
for(i = 0; i<signal->header.m_noOfSections; i++){
- SegmentedSectionPtr ptr;
+ SegmentedSectionPtr ptr = {0,0,0};
ndbout_c("-- Section %d --", i);
signal->getSection(ptr, i);
ndbrequire(ptr.p != 0);
@@ -1292,7 +1292,7 @@
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr;
+ SegmentedSectionPtr sptr = {0,0,0};
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1341,7 +1341,7 @@
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr;
+ SegmentedSectionPtr sptr = {0,0,0};
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1407,7 +1407,7 @@
const Uint32 secs = signal->getNoOfSections();
memset(g_test, 0, sizeof(g_test));
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr;
+ SegmentedSectionPtr sptr = {0,0,0};
signal->getSection(sptr, i);
g_test[i].sz = sptr.sz;
g_test[i].p = new Uint32[sptr.sz];
--- 1.69/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-11-20 22:42:24 +02:00
+++ 1.70/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-11-20 22:42:24 +02:00
@@ -10054,8 +10054,8 @@
static const DictLockType lt[] = {
{ DictLockReq::NodeRestartLock, BS_NODE_RESTART, "NodeRestart" }
};
- for (int i = 0; i < sizeof(lt)/sizeof(lt[0]); i++) {
- if (lt[i].lockType == lockType)
+ for (unsigned int i = 0; i < sizeof(lt)/sizeof(lt[0]); i++) {
+ if ((Uint32) lt[i].lockType == lockType)
return <[i];
}
return NULL;
@@ -10207,7 +10207,7 @@
DictLockPtr lockPtr;
c_dictLockQueue.getPtr(lockPtr, ord->lockPtr);
- ndbrequire(lockPtr.p->lt->lockType == ord->lockType);
+ ndbrequire((Uint32) lockPtr.p->lt->lockType == ord->lockType);
if (lockPtr.p->locked) {
jam();
--- 1.33/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2006-11-20 22:42:24 +02:00
+++ 1.34/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2006-11-20 22:42:24 +02:00
@@ -1524,6 +1524,11 @@
break;
}
+ case StopRecord::SR_BLOCK_GCP_START_GCP:
+ case StopRecord::SR_WAIT_COMPLETE_GCP:
+ case StopRecord::SR_UNBLOCK_GCP_START_GCP:
+ case StopRecord::SR_CLUSTER_SHUTDOWN:
+ break;
}
}
@@ -2283,7 +2288,7 @@
bool allNodesStopped = true;
int i ;
- for( i = 0; i< NdbNodeBitmask::Size; i++ ){
+ for( i = 0; i < (int) NdbNodeBitmask::Size; i++ ){
if ( stopReq.nodes[i] != 0 ){
allNodesStopped = false;
break;
--- 1.35/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2006-11-20 22:42:24 +02:00
+++ 1.36/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2006-11-20 22:42:24 +02:00
@@ -160,7 +160,7 @@
BaseString tmp;
tmp.append("Shutting down node as total restart time exceeds "
" StartFailureTimeout as set in config file ");
- if(c_restartFailureTimeout == ~0)
+ if(c_restartFailureTimeout == (Uint32) ~0)
tmp.append(" 0 (inifinite)");
else
tmp.appfmt(" %d", c_restartFailureTimeout);
@@ -1339,7 +1339,7 @@
if (now < partial_timeout)
{
jam();
- signal->theData[1] = c_restartPartialTimeout == ~0 ? 2 : 3;
+ signal->theData[1] = c_restartPartialTimeout == (Uint32) ~0 ? 2 : 3;
signal->theData[2] = Uint32((partial_timeout - now + 500) / 1000);
report_mask.assign(wait);
retVal = 0;
@@ -1356,7 +1356,7 @@
case CheckNodeGroups::Partitioning:
if (now < partitioned_timeout && result != CheckNodeGroups::Win)
{
- signal->theData[1] = c_restartPartionedTimeout == ~0 ? 4 : 5;
+ signal->theData[1] = c_restartPartionedTimeout == (Uint32) ~0 ? 4 : 5;
signal->theData[2] = Uint32((partitioned_timeout - now + 500) / 1000);
report_mask.assign(c_definedNodes);
report_mask.bitANDC(c_start.m_starting_nodes);
@@ -1403,6 +1403,7 @@
" starting: %s (missing fs for: %s)",
mask1, mask2);
progError(__LINE__, NDBD_EXIT_SR_RESTARTCONFLICT, buf);
+ return 0; // Deadcode
}
void
--- 1.13/ndb/src/kernel/error/ndbd_exit_codes.c 2006-11-20 22:42:24 +02:00
+++ 1.14/ndb/src/kernel/error/ndbd_exit_codes.c 2006-11-20 22:42:24 +02:00
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
#include <ndbd_exit_codes.h>
typedef struct ErrStruct {
--- 1.15/ndb/src/kernel/error/ErrorReporter.cpp 2006-11-20 22:42:24 +02:00
+++ 1.16/ndb/src/kernel/error/ErrorReporter.cpp 2006-11-20 22:42:24 +02:00
@@ -185,6 +185,7 @@
childReportError(ec);
NdbShutdown(s_errorHandlerShutdownType);
+ exit(1); // Deadcode
}
void
--- 1.9/ndb/src/kernel/error/ErrorReporter.hpp 2006-11-20 22:42:24 +02:00
+++ 1.10/ndb/src/kernel/error/ErrorReporter.hpp 2006-11-20 22:42:24 +02:00
@@ -29,7 +29,7 @@
static void setErrorHandlerShutdownType(NdbShutdownType nst = NST_ErrorHandler);
static void handleAssert(const char* message,
const char* file,
- int line, int ec = NDBD_EXIT_PRGERR);
+ int line, int ec = NDBD_EXIT_PRGERR) __attribute__((__noreturn__));
static void handleError(int faultID,
const char* problemData,
--- 1.13/ndb/src/kernel/vm/TransporterCallback.cpp 2006-11-20 22:42:24 +02:00
+++ 1.14/ndb/src/kernel/vm/TransporterCallback.cpp 2006-11-20 22:42:24 +02:00
@@ -56,7 +56,7 @@
{
int i= 0;
while ((Uint32)connectionError[i].err != err &&
- (Uint32)connectionError[i].err != -1)
+ connectionError[i].err != -1)
i++;
return connectionError[i].text;
}
--- 1.64/ndb/src/mgmapi/mgmapi.cpp 2006-11-20 22:42:24 +02:00
+++ 1.65/ndb/src/mgmapi/mgmapi.cpp 2006-11-20 22:42:24 +02:00
@@ -2565,8 +2565,8 @@
args.put("length", length);
BaseString data_string;
- for (int i = 0; i < length; i++)
- data_string.appfmt(" %u", data[i]);
+ for (int i = 0; i < (int) length; i++)
+ data_string.appfmt(" %lu", (ulong) data[i]);
args.put("data", data_string.c_str());
--- 1.70/ndb/src/mgmclient/CommandInterpreter.cpp 2006-11-20 22:42:24 +02:00
+++ 1.71/ndb/src/mgmclient/CommandInterpreter.cpp 2006-11-20 22:42:24 +02:00
@@ -653,7 +653,7 @@
;
#endif
-struct {
+struct st_cmd_help {
const char *cmd;
const char * help;
}help_items[]={
@@ -2466,7 +2466,7 @@
Vector<BaseString> specs;
tmp.split(specs, " ");
- for (int i=0; i < specs.size(); i++)
+ for (int i=0; i < (int) specs.size(); i++)
{
Vector<BaseString> spec;
specs[i].split(spec, "=");
--- 1.107/ndb/src/mgmsrv/MgmtSrvr.cpp 2006-11-20 22:42:24 +02:00
+++ 1.108/ndb/src/mgmsrv/MgmtSrvr.cpp 2006-11-20 22:42:24 +02:00
@@ -835,7 +835,7 @@
case GSN_API_VERSION_CONF: {
const ApiVersionConf * const conf =
CAST_CONSTPTR(ApiVersionConf, signal->getDataPtr());
- assert(conf->nodeId == v_nodeId);
+ assert((int) conf->nodeId == v_nodeId);
version = conf->version;
struct in_addr in;
in.s_addr= conf->inet_addr;
@@ -1573,7 +1573,7 @@
NodeBitmask nodes;
nodes.clear();
Uint32 max = (nodeId == 0) ? (nodeId = 1, MAX_NDB_NODES) : nodeId;
- for(; nodeId <= max; nodeId++)
+ for(; (Uint32) nodeId <= max; nodeId++)
{
if (nodeTypes[nodeId] != NODE_TYPE_DB)
continue;
@@ -2001,8 +2001,8 @@
int log_event)
{
DBUG_ENTER("MgmtSrvr::alloc_node_id");
- DBUG_PRINT("enter", ("nodeid=%d, type=%d, client_addr=%d",
- *nodeId, type, client_addr));
+ DBUG_PRINT("enter", ("nodeid: %d type: %d client_addr: 0x%ld",
+ *nodeId, type, (long) client_addr));
if (g_no_nodeid_checks) {
if (*nodeId == 0) {
error_string.appfmt("no-nodeid-checks set in management server.\n"
--- 1.71/ndb/src/mgmsrv/Services.cpp 2006-11-20 22:42:24 +02:00
+++ 1.72/ndb/src/mgmsrv/Services.cpp 2006-11-20 22:42:24 +02:00
@@ -1699,7 +1699,7 @@
BaseString tmp(data_string);
Vector<BaseString> item;
tmp.split(item, " ");
- for (int i = 0; i < length ; i++)
+ for (int i = 0; (Uint32) i < length ; i++)
{
sscanf(item[i].c_str(), "%u", data+i);
}
--- 1.28/ndb/src/ndbapi/ClusterMgr.cpp 2006-11-20 22:42:24 +02:00
+++ 1.29/ndb/src/ndbapi/ClusterMgr.cpp 2006-11-20 22:42:24 +02:00
@@ -213,7 +213,7 @@
int nodeId= 0;
for(int i=0;
- NodeBitmask::NotFound!=(nodeId= waitForHBFromNodes.find(i));
+ (int) NodeBitmask::NotFound != (nodeId= waitForHBFromNodes.find(i));
i= nodeId+1)
{
#ifdef DEBUG_REG
--- 1.18/ndb/src/ndbapi/DictCache.cpp 2006-11-20 22:42:24 +02:00
+++ 1.19/ndb/src/ndbapi/DictCache.cpp 2006-11-20 22:42:24 +02:00
@@ -116,7 +116,8 @@
NdbElement_t<Vector<TableVersion> > * curr = m_tableHash.getNext(0);
while(curr != 0){
DBUG_PRINT("curr", ("len: %d, hash: %d, lk: %d, str: %s",
- curr->len, curr->hash, curr->localkey1, curr->str));
+ curr->len, curr->hash, curr->localkey1,
+ (char*) curr->str));
if (curr->theData){
Vector<TableVersion> * vers = curr->theData;
const unsigned sz = vers->size();
--- 1.60/ndb/src/ndbapi/Ndb.cpp 2006-11-20 22:42:24 +02:00
+++ 1.61/ndb/src/ndbapi/Ndb.cpp 2006-11-20 22:42:24 +02:00
@@ -355,8 +355,9 @@
{
NdbTransaction *trans= startTransactionLocal(0, nodeId);
- DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx",
- trans, trans ? trans->getTransactionId() : 0));
+ DBUG_PRINT("exit",("start trans: 0x%lx transid: 0x%lx",
+ (long) trans,
+ (long) (trans ? trans->getTransactionId() : 0)));
DBUG_RETURN(trans);
}
} else {
@@ -377,7 +378,7 @@
{
DBUG_ENTER("Ndb::hupp");
- DBUG_PRINT("enter", ("trans: 0x%x",pBuddyTrans));
+ DBUG_PRINT("enter", ("trans: 0x%lx", (long) pBuddyTrans));
Uint32 aPriority = 0;
if (pBuddyTrans == NULL){
@@ -402,8 +403,9 @@
}
pCon->setTransactionId(pBuddyTrans->getTransactionId());
pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr());
- DBUG_PRINT("exit", ("hupp trans: 0x%x transid: 0x%llx",
- pCon, pCon ? pCon->getTransactionId() : 0));
+ DBUG_PRINT("exit", ("hupp trans: 0x%lx transid: 0x%lx",
+ (long) pCon,
+ (long) (pCon ? pCon->getTransactionId() : 0)));
DBUG_RETURN(pCon);
} else {
DBUG_RETURN(NULL);
@@ -490,8 +492,9 @@
tCon = theTransactionList;
theRemainingStartTransactions++;
- DBUG_PRINT("info",("close trans: 0x%x transid: 0x%llx",
- aConnection, aConnection->getTransactionId()));
+ DBUG_PRINT("info",("close trans: 0x%lx transid: 0x%lx",
+ (long) aConnection,
+ (long) aConnection->getTransactionId()));
DBUG_PRINT("info",("magic number: 0x%x TCConPtr: 0x%x theMyRef: 0x%x 0x%x",
aConnection->theMagicNumber, aConnection->theTCConPtr,
aConnection->theMyRef, getReference()));
--- 1.52/ndb/src/ndbapi/NdbTransaction.cpp 2006-11-20 22:42:24 +02:00
+++ 1.53/ndb/src/ndbapi/NdbTransaction.cpp 2006-11-20 22:42:24 +02:00
@@ -530,8 +530,8 @@
AbortOption abortOption)
{
DBUG_ENTER("NdbTransaction::executeAsynchPrepare");
- DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: %x, anyObject: %x",
- aTypeOfExec, aCallback, anyObject));
+ DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: 0x%lx, anyObject: Ox%lx",
+ aTypeOfExec, (long) aCallback, (long) anyObject));
/**
* Reset error.code on execute
--- 1.19/ndb/src/ndbapi/NdbOperationDefine.cpp 2006-11-20 22:42:24 +02:00
+++ 1.20/ndb/src/ndbapi/NdbOperationDefine.cpp 2006-11-20 22:42:24 +02:00
@@ -407,10 +407,10 @@
const char* aValuePassed, Uint32 len)
{
DBUG_ENTER("NdbOperation::setValue");
- DBUG_PRINT("enter", ("col=%s op=%d val=0x%x len=%u",
+ DBUG_PRINT("enter", ("col: %s op: %d val: 0x%lx len: %u",
tAttrInfo->m_name.c_str(),
theOperationType,
- aValuePassed, len));
+ (long) aValuePassed, len));
if (aValuePassed != NULL)
DBUG_DUMP("value", (char*)aValuePassed, len);
--- 1.20/ndb/src/ndbapi/NdbOperationExec.cpp 2006-11-20 22:42:24 +02:00
+++ 1.21/ndb/src/ndbapi/NdbOperationExec.cpp 2006-11-20 22:42:24 +02:00
@@ -205,7 +205,7 @@
tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen);
// A simple read is always ignore error
- abortOption = tSimpleIndicator ? AO_IgnoreError : abortOption;
+ abortOption = tSimpleIndicator ? (Uint8) AO_IgnoreError : abortOption;
tcKeyReq->setAbortOption(tReqInfo, abortOption);
Uint8 tDistrKeyIndicator = theDistrKeyIndicator_;
--- 1.15/ndb/src/ndbapi/NdbOperationInt.cpp 2006-11-20 22:42:24 +02:00
+++ 1.16/ndb/src/ndbapi/NdbOperationInt.cpp 2006-11-20 22:42:24 +02:00
@@ -1015,8 +1015,8 @@
bool nopad, Uint32 Label){
DBUG_ENTER("NdbOperation::branch_col");
- DBUG_PRINT("enter", ("type=%u col=%u val=0x%x len=%u label=%u",
- type, ColId, val, len, Label));
+ DBUG_PRINT("enter", ("type: %u col:%u val: 0x%lx len: %u label: %u",
+ type, ColId, (long) val, len, Label));
if (val != NULL)
DBUG_DUMP("value", (char*)val, len);
--- 1.25/ndb/src/ndbapi/NdbOperationSearch.cpp 2006-11-20 22:42:24 +02:00
+++ 1.26/ndb/src/ndbapi/NdbOperationSearch.cpp 2006-11-20 22:42:24 +02:00
@@ -58,10 +58,10 @@
Uint32 aVariableKeyLen)
{
DBUG_ENTER("NdbOperation::equal_impl");
- DBUG_PRINT("enter", ("col=%s op=%d val=0x%x len=%u",
+ DBUG_PRINT("enter", ("col: %s op: %d val: 0x%lx len: %u",
tAttrInfo->m_name.c_str(),
theOperationType,
- aValuePassed, aVariableKeyLen));
+ (long) aValuePassed, aVariableKeyLen));
if (aValuePassed != NULL)
DBUG_DUMP("value", (char*)aValuePassed, aVariableKeyLen);
--- 1.33/ndb/src/ndbapi/Ndbif.cpp 2006-11-20 22:42:24 +02:00
+++ 1.34/ndb/src/ndbapi/Ndbif.cpp 2006-11-20 22:42:24 +02:00
@@ -193,11 +193,11 @@
((Uint64)tmpTheNode << 40);
theFirstTransId += theFacade->m_max_trans_id;
// assert(0);
- DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id=%lx",
+ DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id: 0x%lx",
theMyRef,
tmpTheNode,
theImpl->theNoOfDBnodes,
- theFirstTransId));
+ (long) theFirstTransId));
theCommitAckSignal = new NdbApiSignal(theMyRef);
theDictionary->m_receiver.m_reference= theMyRef;
--- 1.36/ndb/src/ndbapi/Ndbinit.cpp 2006-11-20 22:42:24 +02:00
+++ 1.37/ndb/src/ndbapi/Ndbinit.cpp 2006-11-20 22:42:24 +02:00
@@ -39,7 +39,7 @@
: theImpl(NULL)
{
DBUG_ENTER("Ndb::Ndb()");
- DBUG_PRINT("enter",("Ndb::Ndb this=0x%x", this));
+ DBUG_PRINT("enter",("Ndb::Ndb this: 0x%lx", (long) this));
setup(ndb_cluster_connection, aDataBase, aSchema);
DBUG_VOID_RETURN;
}
@@ -115,7 +115,7 @@
Ndb::~Ndb()
{
DBUG_ENTER("Ndb::~Ndb()");
- DBUG_PRINT("enter",("Ndb::~Ndb this=0x%x",this));
+ DBUG_PRINT("enter",("Ndb::~Ndb this: 0x%lx",(long) this));
doDisconnect();
if (TransporterFacade::instance() != NULL && theNdbBlockNumber > 0){
--- 1.15/ndb/tools/drop_index.cpp 2006-11-20 22:42:24 +02:00
+++ 1.16/ndb/tools/drop_index.cpp 2006-11-20 22:42:24 +02:00
@@ -51,9 +51,6 @@
NDB_INIT(argv[0]);
load_defaults("my",load_default_groups,&argc,&argv);
int ho_error;
-#ifndef DBUG_OFF
- "d:t:O,/tmp/ndb_drop_index.trace";
-#endif
if ((ho_error=handle_options(&argc, &argv, my_long_options,
ndb_std_get_one_option)))
return NDBT_ProgramExit(NDBT_WRONGARGS);
--- 1.15/ndb/tools/drop_tab.cpp 2006-11-20 22:42:25 +02:00
+++ 1.16/ndb/tools/drop_tab.cpp 2006-11-20 22:42:25 +02:00
@@ -51,9 +51,6 @@
NDB_INIT(argv[0]);
load_defaults("my",load_default_groups,&argc,&argv);
int ho_error;
-#ifndef DBUG_OFF
- "d:t:O,/tmp/ndb_drop_table.trace";
-#endif
if ((ho_error=handle_options(&argc, &argv, my_long_options,
ndb_std_get_one_option)))
return NDBT_ProgramExit(NDBT_WRONGARGS);
--- 1.286/sql/ha_ndbcluster.cc 2006-11-20 22:42:25 +02:00
+++ 1.287/sql/ha_ndbcluster.cc 2006-11-20 22:42:25 +02:00
@@ -1774,7 +1774,7 @@
all pending update or delete operations should
be sent to NDB
*/
- DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
+ DBUG_PRINT("info", ("ops_pending: %ld", (long) m_ops_pending));
if (m_ops_pending)
{
if (m_transaction_on)
@@ -2976,7 +2976,7 @@
Take over any pending transactions to the
deleteing/updating transaction before closing the scan
*/
- DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
+ DBUG_PRINT("info", ("ops_pending: %ld", (long) m_ops_pending));
if (execute_no_commit(this,trans,false) != 0) {
no_uncommitted_rows_execute_failure();
DBUG_RETURN(ndb_err(trans));
@@ -3542,8 +3542,8 @@
Thd_ndb *thd_ndb= get_thd_ndb(thd);
Ndb *ndb= thd_ndb->ndb;
- DBUG_PRINT("enter", ("thd: %x, thd_ndb: %x, thd_ndb->lock_count: %d",
- thd, thd_ndb, thd_ndb->lock_count));
+ DBUG_PRINT("enter", ("thd: 0x%lx thd_ndb: 0x%lx thd_ndb->lock_count: %d",
+ (long) thd, (long) thd_ndb, thd_ndb->lock_count));
if (lock_type != F_UNLCK)
{
@@ -3847,7 +3847,8 @@
while ((share= it++))
{
pthread_mutex_lock(&share->mutex);
- DBUG_PRINT("info", ("Invalidate commit_count for %s, share->commit_count: %d ", share->table_name, share->commit_count));
+ DBUG_PRINT("info", ("Invalidate commit_count for %s, share->commit_count: %lu",
+ share->table_name, (ulong) share->commit_count));
share->commit_count= 0;
share->commit_count_lock++;
pthread_mutex_unlock(&share->mutex);
@@ -4281,7 +4282,7 @@
if (packfrm(data, length, &pack_data, &pack_length))
DBUG_RETURN(2);
- DBUG_PRINT("info", ("setFrm data=%x, len=%d", pack_data, pack_length));
+ DBUG_PRINT("info", ("setFrm data: 0x%lx len: %d", (long) pack_data, pack_length));
tab.setFrm(pack_data, pack_length);
my_free((char*)data, MYF(0));
my_free((char*)pack_data, MYF(0));
@@ -5237,7 +5238,7 @@
}
{
char buf[128];
- my_snprintf(buf, sizeof(buf), "mysqld --server-id=%d", server_id);
+ my_snprintf(buf, sizeof(buf), "mysqld --server-id=%lu", server_id);
g_ndb_cluster_connection->set_name(buf);
}
g_ndb_cluster_connection->set_optimized_node_selection
@@ -5813,9 +5814,9 @@
share->use_count++;
DBUG_PRINT("share",
- ("table_name: %s, length: %d, use_count: %d, commit_count: %d",
+ ("table_name: %s length: %d use_count: %d commit_count: %lu",
share->table_name, share->table_name_length, share->use_count,
- share->commit_count));
+ (ulong) share->commit_count));
pthread_mutex_unlock(&ndbcluster_mutex);
return share;
}
@@ -5862,14 +5863,14 @@
uint blob_len;
frm_blob_struct* blob;
DBUG_ENTER("packfrm");
- DBUG_PRINT("enter", ("data: %x, len: %d", data, len));
+ DBUG_PRINT("enter", ("data: 0x%lx, len: %d", (long) data, len));
error= 1;
org_len= len;
if (my_compress((byte*)data, &org_len, &comp_len))
goto err;
- DBUG_PRINT("info", ("org_len: %d, comp_len: %d", org_len, comp_len));
+ DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", org_len, comp_len));
DBUG_DUMP("compressed", (char*)data, org_len);
error= 2;
@@ -5889,7 +5890,7 @@
*pack_len= blob_len;
error= 0;
- DBUG_PRINT("exit", ("pack_data: %x, pack_len: %d", *pack_data, *pack_len));
+ DBUG_PRINT("exit", ("pack_data: 0x%lx, pack_len: %d", (long) *pack_data, *pack_len));
err:
DBUG_RETURN(error);
@@ -5903,13 +5904,13 @@
byte *data;
ulong complen, orglen, ver;
DBUG_ENTER("unpackfrm");
- DBUG_PRINT("enter", ("pack_data: %x", pack_data));
+ DBUG_PRINT("enter", ("pack_data: 0x%lx", (long) pack_data));
complen= uint4korr((char*)&blob->head.complen);
orglen= uint4korr((char*)&blob->head.orglen);
ver= uint4korr((char*)&blob->head.ver);
- DBUG_PRINT("blob",("ver: %d complen: %d orglen: %d",
+ DBUG_PRINT("blob",("ver: %lu complen: %lu orglen: %lu",
ver,complen,orglen));
DBUG_DUMP("blob->data", (char*) blob->data, complen);
@@ -5928,7 +5929,7 @@
*unpack_data= data;
*unpack_len= complen;
- DBUG_PRINT("exit", ("frmdata: %x, len: %d", *unpack_data, *unpack_len));
+ DBUG_PRINT("exit", ("frmdata: 0x%lx, len: %d", (long) *unpack_data, *unpack_len));
DBUG_RETURN(0);
}
@@ -6521,7 +6522,7 @@
my_thread_init();
DBUG_ENTER("ndb_util_thread");
- DBUG_PRINT("enter", ("ndb_cache_check_time: %d", ndb_cache_check_time));
+ DBUG_PRINT("enter", ("ndb_cache_check_time: %lu", ndb_cache_check_time));
thd= new THD; /* note that contructor of THD uses DBUG_ */
THD_CHECK_SENTRY(thd);
@@ -6550,7 +6551,7 @@
&abstime);
pthread_mutex_unlock(&LOCK_ndb_util_thread);
- DBUG_PRINT("ndb_util_thread", ("Started, ndb_cache_check_time: %d",
+ DBUG_PRINT("ndb_util_thread", ("Started, ndb_cache_check_time: %lu",
ndb_cache_check_time));
if (abort_loop)
@@ -7447,7 +7448,7 @@
if (context->expecting(Item::INT_ITEM))
{
Item_int *int_item= (Item_int *) item;
- DBUG_PRINT("info", ("value %d", int_item->value));
+ DBUG_PRINT("info", ("value %ld", (long) int_item->value));
NDB_ITEM_QUALIFICATION q;
q.value_type= Item::INT_ITEM;
curr_cond->ndb_item= new Ndb_item(NDB_VALUE, q, item);
@@ -7470,7 +7471,7 @@
context->supported= FALSE;
break;
case Item::REAL_ITEM:
- DBUG_PRINT("info", ("REAL_ITEM %s"));
+ DBUG_PRINT("info", ("REAL_ITEM"));
if (context->expecting(Item::REAL_ITEM))
{
Item_float *float_item= (Item_float *) item;
@@ -7518,7 +7519,7 @@
context->supported= FALSE;
break;
case Item::DECIMAL_ITEM:
- DBUG_PRINT("info", ("DECIMAL_ITEM %s"));
+ DBUG_PRINT("info", ("DECIMAL_ITEM"));
if (context->expecting(Item::DECIMAL_ITEM))
{
Item_decimal *decimal_item= (Item_decimal *) item;
--- 1.82/mysql-test/t/create.test 2006-11-20 22:42:25 +02:00
+++ 1.83/mysql-test/t/create.test 2006-11-20 22:42:25 +02:00
@@ -550,7 +550,7 @@
a varchar(112) charset utf8 collate utf8_bin not null,
primary key (a)
) select 'test' as a ;
---warning 1364
+#--warning 1364
show create table t1;
drop table t1;
@@ -563,7 +563,7 @@
);
insert into t2 values(111);
---warning 1364
+#--warning 1364
create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
@@ -571,7 +571,7 @@
show create table t1;
drop table t1;
---warning 1364
+#--warning 1364
create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
@@ -579,7 +579,7 @@
show create table t1;
drop table t1;
---warning 1364
+#--warning 1364
create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int null, primary key (a)
@@ -587,7 +587,7 @@
show create table t1;
drop table t1;
---warning 1364
+#--warning 1364
create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
@@ -595,7 +595,7 @@
show create table t1;
drop table t1;
---warning 1364
+#--warning 1364
create table t1 (
a varchar(12) charset utf8 collate utf8_bin,
b int not null, primary key (a)
@@ -609,7 +609,7 @@
);
insert into t1 values (1,1,1, 1,1,1, 1,1,1);
---warning 1364
+#--warning 1364
create table t2 (
a1 varchar(12) charset utf8 collate utf8_bin not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
@@ -617,20 +617,20 @@
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
drop table t2;
---warning 1364
+#--warning 1364
create table t2 (
a1 varchar(12) charset utf8 collate utf8_bin,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
drop table t1, t2;
---warning 1364
+#--warning 1364
create table t1 (
a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
);
insert into t1 values (1,1,1, 1,1,1, 1,1,1);
---warning 1364
+#--warning 1364
create table t2 (
a1 varchar(12) charset utf8 collate utf8_bin not null,
a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
--- 1.134/mysql-test/t/innodb.test 2006-11-20 22:42:25 +02:00
+++ 1.135/mysql-test/t/innodb.test 2006-11-20 22:42:25 +02:00
@@ -1482,7 +1482,7 @@
SELECT * FROM t1;
DROP TABLE t2, t1;
--- Test that foreign keys in temporary tables are not accepted (bug #12084)
+# Test that foreign keys in temporary tables are not accepted (bug #12084)
CREATE TABLE t1
(
id INT PRIMARY KEY
--- 1.32/mysql-test/t/join.test 2006-11-20 22:42:25 +02:00
+++ 1.33/mysql-test/t/join.test 2006-11-20 22:42:25 +02:00
@@ -362,38 +362,38 @@
insert into t5 values (11,4);
insert into t6 values (2, 3);
--- Views with simple natural join.
+# Views with simple natural join.
create algorithm=merge view v1a as
select * from t1 natural join t2;
--- as above, but column names are cross-renamed: a->c, c->b, b->a
+# as above, but column names are cross-renamed: a->c, c->b, b->a
create algorithm=merge view v1b(a,b,c) as
select * from t1 natural join t2;
--- as above, but column names are aliased: a->c, c->b, b->a
+# as above, but column names are aliased: a->c, c->b, b->a
create algorithm=merge view v1c as
select b as a, c as b, a as c from t1 natural join t2;
--- as above, but column names are cross-renamed, and aliased
--- a->c->b, c->b->a, b->a->c
+# as above, but column names are cross-renamed, and aliased
+# a->c->b, c->b->a, b->a->c
create algorithm=merge view v1d(b, a, c) as
select a as c, c as b, b as a from t1 natural join t2;
--- Views with JOIN ... ON
+# Views with JOIN ... ON
create algorithm=merge view v2a as
select t1.c, t1.b, t2.a from t1 join (t2 join t4 on b + 1 = y) on t1.c = t4.c;
create algorithm=merge view v2b as
select t1.c as b, t1.b as a, t2.a as c
from t1 join (t2 join t4 on b + 1 = y) on t1.c = t4.c;
--- Views with bigger natural join
+# Views with bigger natural join
create algorithm=merge view v3a as
select * from t1 natural join t2 natural join t3;
create algorithm=merge view v3b as
select * from t1 natural join (t2 natural join t3);
--- View over views with mixed natural join and join ... on
+# View over views with mixed natural join and join ... on
create algorithm=merge view v4 as
select * from v2a natural join v3a;
--- Nested natural/using joins.
+# Nested natural/using joins.
select * from (t1 natural join t2) natural join (t3 natural join t4);
select * from (t1 natural join t2) natural left join (t3 natural join t4);
select * from (t3 natural join t4) natural right join (t1 natural join t2);
@@ -402,12 +402,12 @@
select * from t1 natural join t2 natural join t3 natural join t4;
select * from ((t1 natural join t2) natural join t3) natural join t4;
select * from t1 natural join (t2 natural join (t3 natural join t4));
--- BUG#15355: this query fails in 'prepared statements' mode
--- select * from ((t3 natural join (t1 natural join t2)) natural join t4) natural join t5;
--- select * from ((t3 natural left join (t1 natural left join t2)) natural left join t4) natural left join t5;
+# BUG#15355: this query fails in 'prepared statements' mode
+# select * from ((t3 natural join (t1 natural join t2)) natural join t4) natural join t5;
+# select * from ((t3 natural left join (t1 natural left join t2)) natural left join t4) natural left join t5;
select * from t5 natural right join (t4 natural right join ((t2 natural right join t1) natural right join t3));
select * from (t1 natural join t2), (t3 natural join t4);
--- MySQL extension - nested comma ',' operator instead of cross join.
+# MySQL extension - nested comma ',' operator instead of cross join.
select * from t5 natural join ((t1 natural join t2), (t3 natural join t4));
select * from ((t1 natural join t2), (t3 natural join t4)) natural join t5;
select * from t5 natural join ((t1 natural join t2) cross join (t3 natural join t4));
@@ -417,7 +417,7 @@
select * from (t1 join t2 using (b)) natural join (t3 join t4 using (c));
--- Other clauses refer to NJ columns.
+# Other clauses refer to NJ columns.
select a,b,c from (t1 natural join t2) natural join (t3 natural join t4)
where b + 1 = y or b + 10 = y group by b,c,a having min(b) < max(y) order by a;
select * from (t1 natural join t2) natural left join (t3 natural join t4)
@@ -425,23 +425,23 @@
select * from (t3 natural join t4) natural right join (t1 natural join t2)
where b + 1 = y or b + 10 = y group by b,c,a,y having min(b) < max(y) order by a, y;
--- Qualified column references to NJ columns.
+# Qualified column references to NJ columns.
select * from t1 natural join t2 where t1.c > t2.a;
select * from t1 natural join t2 where t1.b > t2.b;
select * from t1 natural left join (t4 natural join t5) where t5.z is not NULL;
--- Nested 'join ... on' - name resolution of ON conditions
+# Nested 'join ... on' - name resolution of ON conditions
select * from t1 join (t2 join t4 on b + 1 = y) on t1.c = t4.c;
select * from (t2 join t4 on b + 1 = y) join t1 on t1.c = t4.c;
select * from t1 natural join (t2 join t4 on b + 1 = y);
select * from (t1 cross join t2) join (t3 cross join t4) on (a < y and t2.b < t3.c);
--- MySQL extension - 'join ... on' over nested comma operator
+# MySQL extension - 'join ... on' over nested comma operator
select * from (t1, t2) join (t3, t4) on (a < y and t2.b < t3.c);
select * from (t1 natural join t2) join (t3 natural join t4) on a = y;
select * from ((t3 join (t1 join t2 on c > a) on t3.b < t2.a) join t4 on y > t1.c) join t5 on z = t1.b + 3;
--- MySQL extension - refererence qualified coalesced columns
+# MySQL extension - refererence qualified coalesced columns
select * from t1 natural join t2 where t1.b > 0;
select * from t1 natural join (t4 natural join t5) where t4.y > 7;
select * from (t4 natural join t5) natural join t1 where t4.y > 7;
@@ -449,11 +449,11 @@
select * from (t4 natural join t5) natural right join t1 where t4.y > 7;
select * from (t1 natural join t2) join (t3 natural join t4) on t1.b = t3.b;
--- MySQL extension - select qualified columns of NJ columns
+# MySQL extension - select qualified columns of NJ columns
select t1.*, t2.* from t1 natural join t2;
select t1.*, t2.*, t3.*, t4.* from (t1 natural join t2) natural join (t3 natural join t4);
--- Queries over subselects in the FROM clause
+# Queries over subselects in the FROM clause
select * from (select * from t1 natural join t2) as t12
natural join
(select * from t3 natural join t4) as t34;
@@ -464,7 +464,7 @@
natural right join
(select * from t1 natural join t2) as t12;
--- Queries over views
+# Queries over views
select * from v1a;
select * from v1b;
select * from v1c;
@@ -481,13 +481,13 @@
select * from v1d join v2a on v1d.a = v2a.c;
select * from v1a join (t3 natural join t4) on a = y;
--- TODO: add tests with correlated subqueries for natural join/join on.
--- related to BUG#15269
+# TODO: add tests with correlated subqueries for natural join/join on.
+# related to BUG#15269
-----------------------------------------------------------------------
--- Negative tests (tests for errors)
-----------------------------------------------------------------------
+#--------------------------------------------------------------------
+# Negative tests (tests for errors)
+#--------------------------------------------------------------------
-- error 1052
select * from t1 natural join (t3 cross join t4); -- works in Oracle - bug
-- error 1052
@@ -504,7 +504,7 @@
select * from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4);
-- error 1052
select * from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b);
--- this one is OK, the next equivalent one is incorrect (bug in Oracle)
+# this one is OK, the next equivalent one is incorrect (bug in Oracle)
-- error 1052
select * from (t3 join (t4 natural join t5) on (b < z))
natural join
@@ -578,12 +578,12 @@
insert into t4 values (1,3);
insert into t5 values (1,4);
--- this fails
+# this fails
prepare stmt1 from "select * from ((t3 natural join (t1 natural join t2))
natural join t4) natural join t5";
execute stmt1;
--- this works
+# this works
select * from ((t3 natural join (t1 natural join t2)) natural join t4)
natural join t5;
drop table t1, t2, t3, t4, t5;
--- 1.11/mysql-test/t/limit.test 2006-11-20 22:42:25 +02:00
+++ 1.12/mysql-test/t/limit.test 2006-11-20 22:42:25 +02:00
@@ -7,7 +7,7 @@
--enable_warnings
create table t1 (a int not null default 0 primary key, b int not null default 0);
-insert into t1 () values (); -- Testing default values
+insert into t1 () values (); # Testing default values
insert into t1 values (1,1),(2,1),(3,1);
update t1 set a=4 where b=1 limit 1;
select * from t1;
--- 1.20/mysql-test/t/null.test 2006-11-20 22:42:25 +02:00
+++ 1.21/mysql-test/t/null.test 2006-11-20 22:42:25 +02:00
@@ -177,7 +177,7 @@
# non-null string collation, i.e. case insensitively,
# rather than according to NULL's collation, i.e. case sensitively
#
--- in field
+# in field
select
case 'str' when 'STR' then 'str' when null then 'null' end as c01,
case 'str' when null then 'null' when 'STR' then 'str' end as c02,
--- 1.116/mysql-test/t/select.test 2006-11-20 22:42:25 +02:00
+++ 1.117/mysql-test/t/select.test 2006-11-20 22:42:25 +02:00
@@ -2700,7 +2700,7 @@
create table t3 (a_id int(11) not null, b_id char(16) character set utf8);
insert into t3 values (123,null),(123,null),(123,null),(123,null),(123,null),(123,'58013');
--- both queries are equivalent
+# both queries are equivalent
select count(*)
from t1 inner join (t3 left join t2 on t2.id = t3.b_id) on t1.id = t3.a_id;
@@ -2940,7 +2940,7 @@
insert into t1 (b,c) values (0,1), (0,1);
insert into t2 (b,c) values (0,1);
--- Row 1 should succeed. Row 2 should fail. Both fail.
+# Row 1 should succeed. Row 2 should fail. Both fail.
select t1.a, t1.b + 0, t1.c + 0, t2.a, t2.b + 0, t2.c, t2.d
from t1 left outer join t2 on t1.a = t2.c and t2.b <> 1
where t1.b <> 1 order by t1.a;
--- 1.302/sql/ha_innodb.cc 2006-11-20 22:42:25 +02:00
+++ 1.303/sql/ha_innodb.cc 2006-11-20 22:42:25 +02:00
@@ -4215,7 +4215,7 @@
}
if (error) {
- DBUG_PRINT("error", ("Got error: %ld", error));
+ DBUG_PRINT("error", ("Got error: %d", error));
DBUG_RETURN(error);
}
@@ -4225,7 +4225,7 @@
error = index_read(buf, pos, ref_length, HA_READ_KEY_EXACT);
if (error) {
- DBUG_PRINT("error", ("Got error: %ld", error));
+ DBUG_PRINT("error", ("Got error: %d", error));
}
change_active_index(keynr);
--- 1.44/client/client_priv.h 2006-11-20 22:42:25 +02:00
+++ 1.45/client/client_priv.h 2006-11-20 22:42:25 +02:00
@@ -51,5 +51,6 @@
#endif
OPT_TRIGGERS,
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
- OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_SSL_VERIFY_SERVER_CERT
+ OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_SSL_VERIFY_SERVER_CERT,
+ OPT_DEBUG_INFO
};
--- 1.4/mysys/my_dup.c 2006-11-20 22:42:25 +02:00
+++ 1.5/mysys/my_dup.c 2006-11-20 22:42:25 +02:00
@@ -30,7 +30,7 @@
File fd;
const char *filename;
DBUG_ENTER("my_dup");
- DBUG_PRINT("my",("file: %d MyFlags: %d", MyFlags));
+ DBUG_PRINT("my",("file: %d MyFlags: %d", file, MyFlags));
fd = dup(file);
filename= (((uint) file < my_file_limit) ?
my_file_info[(int) file].name : "Unknown");
--- 1.49/mysql-test/t/grant.test 2006-11-20 22:42:25 +02:00
+++ 1.50/mysql-test/t/grant.test 2006-11-20 22:42:25 +02:00
@@ -118,7 +118,7 @@
#
--error 1221
GRANT FILE on mysqltest.* to mysqltest_1@localhost;
-select 1; -- To test that the previous command didn't cause problems
+select 1; # To test that the previous command didn't cause problems
#
# Bug #4898: User privileges depending on ORDER BY Settings of table db
--- 1.6/mysys/mf_keycaches.c 2006-11-20 22:42:25 +02:00
+++ 1.7/mysys/mf_keycaches.c 2006-11-20 22:42:25 +02:00
@@ -159,7 +159,7 @@
result= hash->default_value;
else
result= ((SAFE_HASH_ENTRY*) result)->data;
- DBUG_PRINT("exit",("data: 0x%lx", result));
+ DBUG_PRINT("exit",("data: 0x%lx", (long) result));
DBUG_RETURN(result);
}
@@ -190,7 +190,7 @@
SAFE_HASH_ENTRY *entry;
my_bool error= 0;
DBUG_ENTER("safe_hash_set");
- DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, data));
+ DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, (long) data));
rw_wrlock(&hash->mutex);
entry= (SAFE_HASH_ENTRY*) hash_search(&hash->hash, key, length);
--- 1.23/mysql-test/t/strict.test 2006-11-20 22:42:25 +02:00
+++ 1.24/mysql-test/t/strict.test 2006-11-20 22:42:25 +02:00
@@ -327,14 +327,14 @@
# SQLSTATE 22007 <invalid datetime value>
--error 1292
INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME));
--- should return OK
--- We accept this to be a failure
+# should return OK
+# We accept this to be a failure
--error 1292
INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME));
--error 1292
INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME));
--- should return SQLSTATE 22007 <invalid datetime value>
+# should return SQLSTATE 22007 <invalid datetime value>
# deactivated because of Bug#8294
# Bug#8294 Traditional: Misleading error message for invalid CAST to DATE
@@ -422,8 +422,8 @@
# SQLSTATE 22007 <invalid datetime value>
--error 1292
INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME));
--- should return OK
--- We accept this to be a failure
+# should return OK
+# We accept this to be a failure
--error 1292
INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME));
@@ -729,11 +729,11 @@
CREATE TABLE t1 (col1 NUMERIC(4,2));
INSERT INTO t1 VALUES (10.55),(10.5555),(0),(-10.55),(-10.5555),(11),(1e+01);
--- Note that the +/-10.5555 is inserted as +/-10.55, not +/-10.56 !
+# Note that the +/-10.5555 is inserted as +/-10.55, not +/-10.56 !
INSERT INTO t1 VALUES ('10.55'),('10.5555'),('-10.55'),('-10.5555'),('11'),('1e+01');
--- The 2 following inserts should generate a warning, but doesn't yet
--- because NUMERIC works like DECIMAL
+# The 2 following inserts should generate a warning, but doesn't yet
+# because NUMERIC works like DECIMAL
--error 1264
INSERT INTO t1 VALUES (101.55);
--error 1264
@@ -744,8 +744,8 @@
INSERT INTO t1 VALUES (1010.55);
--error 1264
INSERT INTO t1 VALUES (1010);
--- The 2 following inserts should generate a warning, but doesn't yet
--- because NUMERIC works like DECIMAL
+# The 2 following inserts should generate a warning, but doesn't yet
+# because NUMERIC works like DECIMAL
--error 1264
INSERT INTO t1 VALUES ('101.55');
--error 1264
--- 1.9/sql/strfunc.cc 2006-11-20 22:42:25 +02:00
+++ 1.10/sql/strfunc.cc 2006-11-20 22:42:25 +02:00
@@ -150,7 +150,7 @@
int pos;
const char *j;
DBUG_ENTER("find_type2");
- DBUG_PRINT("enter",("x: '%.*s' lib: 0x%lx", length, x, typelib));
+ DBUG_PRINT("enter",("x: '%.*s' lib: 0x%lx", length, x, (long) typelib));
if (!typelib->count)
{
--- 1.95/mysql-test/t/func_str.test 2006-11-20 22:42:25 +02:00
+++ 1.96/mysql-test/t/func_str.test 2006-11-20 22:42:25 +02:00
@@ -300,18 +300,26 @@
select POSITION(_latin1'B' IN _latin2'abcd');
select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d');
---fix this:
---select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d' COLLATE latin1_bin);
---select FIND_IN_SET(_latin1'B' COLLATE latin1_bin,_latin1'a,b,c,d');
+
+# fix this:
+--disable_parsing
+select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d' COLLATE latin1_bin);
+select FIND_IN_SET(_latin1'B' COLLATE latin1_bin,_latin1'a,b,c,d');
+--enable_parsing
+
--error 1267
select FIND_IN_SET(_latin1'B' COLLATE latin1_general_ci,_latin1'a,b,c,d' COLLATE latin1_bin);
--error 1267
select FIND_IN_SET(_latin1'B',_latin2'a,b,c,d');
select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2);
---fix this:
---select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_bin,_latin1'd',2);
---select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd' COLLATE latin1_bin,2);
+
+# fix this:
+--disable_parsing
+select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_bin,_latin1'd',2);
+select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd' COLLATE latin1_bin,2);
+--enable_parsing
+
--error 1267
select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2);
--error 1267
--- 1.71/libmysqld/libmysqld.c 2006-11-20 22:42:25 +02:00
+++ 1.72/libmysqld/libmysqld.c 2006-11-20 22:42:25 +02:00
@@ -206,7 +206,7 @@
}
}
- DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
+ DBUG_PRINT("exit",("Mysql handler: 0x%lx", (long) mysql));
DBUG_RETURN(mysql);
error:
--- 1.3/extra/yassl/testsuite/testsuite.cpp 2006-11-20 22:42:25 +02:00
+++ 1.4/extra/yassl/testsuite/testsuite.cpp 2006-11-20 22:42:25 +02:00
@@ -86,8 +86,8 @@
// input output compare
byte input[TaoCrypt::MD5::DIGEST_SIZE];
byte output[TaoCrypt::MD5::DIGEST_SIZE];
- file_test("input", input);
- file_test("output", output);
+ file_test((char*) "input", input);
+ file_test((char*) "output", output);
assert(memcmp(input, output, sizeof(input)) == 0);
printf("\nAll tests passed!\n");
--- 1.1/mysql-test/include/federated.inc 2006-11-20 22:42:25 +02:00
+++ 1.2/mysql-test/include/federated.inc 2006-11-20 22:42:25 +02:00
@@ -5,7 +5,7 @@
# remote table creation
connection slave;
---replicate-ignore-db=federated
+#--replicate-ignore-db=federated
stop slave;
--disable_warnings
--- 1.69/sql/ha_federated.cc 2006-11-20 22:42:25 +02:00
+++ 1.70/sql/ha_federated.cc 2006-11-20 22:42:25 +02:00
@@ -557,8 +557,8 @@
if (share->scheme)
{
DBUG_PRINT("info",
- ("error: parse_url. Returning error code %d \
- freeing share->scheme %lx", error_num, share->scheme));
+ ("error: parse_url. Returning error code %d freeing share->scheme 0x%lx",
+ error_num, (long) share->scheme));
my_free((gptr) share->scheme, MYF(0));
share->scheme= 0;
}
@@ -624,7 +624,7 @@
MYF(0));
share->connect_string_length= table->s->connect_string.length;
- DBUG_PRINT("info",("parse_url alloced share->scheme %lx", share->scheme));
+ DBUG_PRINT("info",("parse_url alloced share->scheme 0x%lx", (long) share->scheme));
/*
remove addition of null terminator and store length
@@ -1664,7 +1664,7 @@
DBUG_ENTER("ha_federated::update_auto_increment");
thd->insert_id(mysql->last_used_con->insert_id);
- DBUG_PRINT("info",("last_insert_id %d", auto_increment_value));
+ DBUG_PRINT("info",("last_insert_id: %ld", (long) auto_increment_value));
DBUG_VOID_RETURN;
}
@@ -1917,8 +1917,8 @@
deleted+= mysql->affected_rows;
records-= mysql->affected_rows;
DBUG_PRINT("info",
- ("rows deleted %d rows deleted for all time %d",
- int(mysql->affected_rows), deleted));
+ ("rows deleted %ld rows deleted for all time %ld",
+ (long) mysql->affected_rows, (long) deleted));
DBUG_RETURN(0);
}
--- 1.28/sql/ha_federated.h 2006-11-20 22:42:25 +02:00
+++ 1.29/sql/ha_federated.h 2006-11-20 22:42:25 +02:00
@@ -232,8 +232,7 @@
*/
double scan_time()
{
- DBUG_PRINT("info",
- ("records %d", records));
+ DBUG_PRINT("info", ("records %ld", (long) records));
return (double)(records*1000);
}
/*
--- 1.10/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp 2006-11-20 22:42:25 +02:00
+++ 1.11/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp 2006-11-20 22:42:25 +02:00
@@ -132,7 +132,7 @@
treePos.m_pos = hi;
return true;
}
- if (hi < currNode.getOccup()) {
+ if ((uint) hi < currNode.getOccup()) {
jam();
treePos.m_pos = hi;
return true;
--- 1.14/server-tools/instance-manager/mysql_connection.cc 2006-11-20 22:42:25 +02:00
+++ 1.15/server-tools/instance-manager/mysql_connection.cc 2006-11-20 22:42:25 +02:00
@@ -163,7 +163,7 @@
void Mysql_connection_thread::run()
{
- log_info("accepted mysql connection %d", connection_id);
+ log_info("accepted mysql connection %lu", connection_id);
my_thread_init();
@@ -173,7 +173,7 @@
return;
}
- log_info("connection %d is checked successfully", connection_id);
+ log_info("connection %lu is checked successfully", connection_id);
vio_keepalive(vio, TRUE);
@@ -312,7 +312,7 @@
packet= (char*) net.read_pos;
enum enum_server_command command= (enum enum_server_command)
(uchar) *packet;
- log_info("connection %d: packet_length=%d, command=%d",
+ log_info("connection %lu: packet_length=%lu, command=%d",
connection_id, packet_length, command);
return dispatch_command(command, packet + 1, packet_length - 1);
}
@@ -323,27 +323,27 @@
{
switch (command) {
case COM_QUIT: // client exit
- log_info("query for connection %d received quit command", connection_id);
+ log_info("query for connection %lu received quit command", connection_id);
return 1;
case COM_PING:
- log_info("query for connection %d received ping command", connection_id);
+ log_info("query for connection %lu received ping command", connection_id);
net_send_ok(&net, connection_id, NULL);
break;
case COM_QUERY:
{
- log_info("query for connection %d : ----\n%s\n-------------------------",
+ log_info("query for connection %lu : ----\n%s\n-------------------------",
connection_id,packet);
if (Command *command= parse_command(&instance_map, packet))
{
int res= 0;
- log_info("query for connection %d successefully parsed",connection_id);
+ log_info("query for connection %lu successefully parsed",connection_id);
res= command->execute(&net, connection_id);
delete command;
if (!res)
- log_info("query for connection %d executed ok",connection_id);
+ log_info("query for connection %lu executed ok",connection_id);
else
{
- log_info("query for connection %d executed err=%d",connection_id,res);
+ log_info("query for connection %lu executed err=%d",connection_id,res);
net_send_error(&net, res);
return 0;
}
@@ -356,7 +356,7 @@
break;
}
default:
- log_info("query for connection %d received unknown command",connection_id);
+ log_info("query for connection %lu received unknown command",connection_id);
net_send_error(&net, ER_UNKNOWN_COM_ERROR);
break;
}
--- 1.236/BitKeeper/etc/ignore 2006-11-20 22:42:25 +02:00
+++ 1.237/BitKeeper/etc/ignore 2006-11-20 22:42:25 +02:00
@@ -1322,3 +1322,4 @@
win/vs8cache.txt
zlib/*.ds?
zlib/*.vcproj
+mysql-test/r/*.warnings
--- 1.151/sql/sql_repl.cc 2006-11-20 22:42:25 +02:00
+++ 1.152/sql/sql_repl.cc 2006-11-20 22:42:25 +02:00
@@ -1101,7 +1101,7 @@
{
mi->master_log_pos= lex_mi->pos;
}
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
if (lex_mi->host)
strmake(mi->host, lex_mi->host, sizeof(mi->host)-1);
@@ -1218,7 +1218,7 @@
}
}
mi->rli.group_master_log_pos = mi->master_log_pos;
- DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
+ DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
/*
Coordinates in rli were spoilt by the 'if (need_relay_log_purge)' block,
--- 1.70/strings/decimal.c 2006-11-20 22:42:25 +02:00
+++ 1.71/strings/decimal.c 2006-11-20 22:42:25 +02:00
@@ -1348,7 +1348,7 @@
}
from+=i;
*buf=x ^ mask;
- if (((uint32)*buf) >= powers10[intg0x+1])
+ if (((ulonglong)*buf) >= (ulonglong) powers10[intg0x+1])
goto err;
if (buf > to->buf || *buf != 0)
buf++;
--- 1.5/mysql-test/t/sp-prelocking.test 2006-11-20 22:42:26 +02:00
+++ 1.6/mysql-test/t/sp-prelocking.test 2006-11-20 22:42:26 +02:00
@@ -209,7 +209,7 @@
call sp1() //
----------------
+# ---------------
drop procedure sp1//
drop function f3//
--- 1.19/extra/yassl/src/ssl.cpp 2006-11-20 22:42:26 +02:00
+++ 1.20/extra/yassl/src/ssl.cpp 2006-11-20 22:42:26 +02:00
@@ -918,7 +918,7 @@
char* ERR_error_string(unsigned long errNumber, char* buffer)
{
- static char* msg = "Please supply a buffer for error string";
+ static char* msg = (char*) "Please supply a buffer for error string";
if (buffer) {
SetErrorString(YasslError(errNumber), buffer);
--- 1.60/BUILD/SETUP.sh 2006-11-20 22:42:26 +02:00
+++ 1.61/BUILD/SETUP.sh 2006-11-20 22:42:26 +02:00
@@ -56,9 +56,9 @@
#debug_extra_warnings="-Wuninitialized"
c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
-base_max_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine $SSL_LIBRARY"
-base_max_no_ndb_configs="--with-innodb --with-berkeley-db --without-ndbcluster --with-archive-storage-engine --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine $SSL_LIBRARY"
-max_leave_isam_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine $SSL_LIBRARY --with-embedded-server --with-big-tables"
+base_max_configs="--with-innodb --with-ndbcluster --with-archive-storage-engine --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine $SSL_LIBRARY"
+base_max_no_ndb_configs="--with-innodb --without-ndbcluster --with-archive-storage-engine --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine $SSL_LIBRARY"
+max_leave_isam_configs="--with-innodb --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine $SSL_LIBRARY --with-embedded-server --with-big-tables"
max_configs="$base_max_configs --with-embedded-server"
max_no_ndb_configs="$base_max_no_ndb_configs --with-embedded-server"
--- 1.6/mysql-test/t/greedy_optimizer.test 2006-11-20 22:42:26 +02:00
+++ 1.7/mysql-test/t/greedy_optimizer.test 2006-11-20 22:42:26 +02:00
@@ -140,18 +140,18 @@
select @@optimizer_search_depth;
select @@optimizer_prune_level;
--- This value swithes back to the old implementation of 'find_best()'
--- set optimizer_search_depth=63; - old (independent of the optimizer_prune_level)
---
--- These are the values for the parameters that control the greedy optimizer
--- (total 6 combinations - 3 for optimizer_search_depth, 2 for optimizer_prune_level):
+# This value swithes back to the old implementation of 'find_best()'
+# set optimizer_search_depth=63; - old (independent of the optimizer_prune_level)
+#
+# These are the values for the parameters that control the greedy optimizer
+# (total 6 combinations - 3 for optimizer_search_depth, 2 for optimizer_prune_level):
--
--- set optimizer_search_depth=0; - automatic
--- set optimizer_search_depth=1; - min
--- set optimizer_search_depth=62; - max (default)
+# set optimizer_search_depth=0; - automatic
+# set optimizer_search_depth=1; - min
+# set optimizer_search_depth=62; - max (default)
--
--- set optimizer_prune_level=0 - exhaustive;
--- set optimizer_prune_level=1 - heuristic; -- default
+# set optimizer_prune_level=0 - exhaustive;
+# set optimizer_prune_level=1 - heuristic; # default
#
@@ -170,17 +170,17 @@
set optimizer_search_depth=63;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
@@ -195,17 +195,17 @@
set optimizer_search_depth=0;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
@@ -214,17 +214,17 @@
set optimizer_search_depth=1;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
@@ -233,17 +233,17 @@
set optimizer_search_depth=62;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
@@ -256,17 +256,17 @@
set optimizer_search_depth=0;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
@@ -275,17 +275,17 @@
set optimizer_search_depth=1;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
@@ -294,17 +294,17 @@
set optimizer_search_depth=62;
select @@optimizer_search_depth;
--- 6-table join, chain
+# 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, star
+# 6-table join, star
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
show status like 'Last_query_cost';
--- 6-table join, clique
+# 6-table join, clique
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
--- 1.25/mysql-test/t/group_min_max.test 2006-11-20 22:42:26 +02:00
+++ 1.26/mysql-test/t/group_min_max.test 2006-11-20 22:42:26 +02:00
@@ -57,8 +57,8 @@
create index idx_t1_2 on t1 (a1,a2,b);
analyze table t1;
--- t2 is the same as t1, but with some NULLs in the MIN/MAX column, and one more
--- nullable attribute
+# t2 is the same as t1, but with some NULLs in the MIN/MAX column, and
+# one more nullable attribute
--disable_warnings
drop table if exists t2;
@@ -68,7 +68,7 @@
a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' '
);
insert into t2 select * from t1;
--- add few rows with NULL's in the MIN/MAX column
+# add few rows with NULL's in the MIN/MAX column
insert into t2 (a1, a2, b, c, d) values
('a','a',NULL,'a777','xyz'),('a','a',NULL,'a888','xyz'),('a','a',NULL,'a999','xyz'),
('a','a','a',NULL,'xyz'),
@@ -92,10 +92,10 @@
create index idx_t2_2 on t2 (a1,a2,b);
analyze table t2;
--- Table t3 is the same as t1, but with smaller column lenghts.
--- This allows to test different branches of the cost computation procedure
--- when the number of keys per block are less than the number of keys in the
--- sub-groups formed by predicates over non-group attributes.
+# Table t3 is the same as t1, but with smaller column lenghts.
+# This allows to test different branches of the cost computation procedure
+# when the number of keys per block are less than the number of keys in the
+# sub-groups formed by predicates over non-group attributes.
--disable_warnings
drop table if exists t3;
@@ -164,11 +164,11 @@
analyze table t3;
---
--- Queries without a WHERE clause. These queries do not use ranges.
---
+#
+# Queries without a WHERE clause. These queries do not use ranges.
+#
--- plans
+# plans
explain select a1, min(a2) from t1 group by a1;
explain select a1, max(a2) from t1 group by a1;
explain select a1, min(a2), max(a2) from t1 group by a1;
@@ -176,31 +176,31 @@
explain select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b;
--replace_column 7 # 9 #
explain select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b;
--- Select fields in different order
+# Select fields in different order
explain select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1;
explain select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b;
explain select min(a2) from t1 group by a1;
explain select a2, min(c), max(c) from t1 group by a1,a2,b;
--- queries
+# queries
select a1, min(a2) from t1 group by a1;
select a1, max(a2) from t1 group by a1;
select a1, min(a2), max(a2) from t1 group by a1;
select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b;
select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b;
select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b;
--- Select fields in different order
+# Select fields in different order
select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1;
select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b;
select min(a2) from t1 group by a1;
select a2, min(c), max(c) from t1 group by a1,a2,b;
---
--- Queries with a where clause
---
+#
+# Queries with a where clause
+#
--- A) Preds only over the group 'A' attributes
--- plans
+# A) Preds only over the group 'A' attributes
+# plans
explain select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b;
explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b;
explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
@@ -238,7 +238,7 @@
--replace_column 9 #
explain select a1, max(c) from t2 where a1 in ('a','b','d') group by a1,a2,b;
--- queries
+# queries
select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b;
select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b;
select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
@@ -264,8 +264,8 @@
select a1,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b;
select a1, max(c) from t2 where a1 in ('a','b','d') group by a1,a2,b;
--- B) Equalities only over the non-group 'B' attributes
--- plans
+# B) Equalities only over the non-group 'B' attributes
+# plans
explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
explain select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;
@@ -278,11 +278,11 @@
explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;
explain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;
--- these queries test case 2) in TRP_GROUP_MIN_MAX::update_cost()
+# these queries test case 2) in TRP_GROUP_MIN_MAX::update_cost()
explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
--- queries
+# queries
select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;
@@ -295,20 +295,20 @@
select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;
select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;
--- these queries test case 2) in TRP_GROUP_MIN_MAX::update_cost()
+# these queries test case 2) in TRP_GROUP_MIN_MAX::update_cost()
select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
--- IS NULL (makes sense for t2 only)
--- plans
+# IS NULL (makes sense for t2 only)
+# plans
explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
explain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;
explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
--- queries
+# queries
select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
@@ -316,8 +316,8 @@
select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
--- C) Range predicates for the MIN/MAX attribute
--- plans
+# C) Range predicates for the MIN/MAX attribute
+# plans
--replace_column 9 #
explain select a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b;
explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;
@@ -367,7 +367,7 @@
--replace_column 9 #
explain select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;
--- queries
+# queries
select a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b;
select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;
select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;
@@ -401,19 +401,19 @@
select a1,a2,b,min(c),max(c) from t2 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;
select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;
--- analyze the sub-select
+# analyze the sub-select
explain select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c = t1.c )
group by a1,a2,b;
--- the sub-select is unrelated to MIN/MAX
+# the sub-select is unrelated to MIN/MAX
explain select a1,a2,b,min(c),max(c) from t1
where exists ( select * from t2 where t2.c > 'b1' )
group by a1,a2,b;
--- A,B,C) Predicates referencing mixed classes of attributes
--- plans
+# A,B,C) Predicates referencing mixed classes of attributes
+# plans
explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;
explain select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;
@@ -435,7 +435,7 @@
--replace_column 9 #
explain select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
--- queries
+# queries
select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;
select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;
@@ -452,11 +452,11 @@
select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
---
--- GROUP BY queries without MIN/MAX
---
+#
+# GROUP BY queries without MIN/MAX
+#
--- plans
+# plans
explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
explain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
@@ -471,7 +471,7 @@
--replace_column 9 #
explain select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
--- queries
+# queries
select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
@@ -482,11 +482,11 @@
select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
---
--- DISTINCT queries
---
+#
+# DISTINCT queries
+#
--- plans
+# plans
explain select distinct a1,a2,b from t1;
explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');
explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
@@ -502,7 +502,7 @@
explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
explain select distinct b from t2 where (a2 >= 'b') and (b = 'a');
--- queries
+# queries
select distinct a1,a2,b from t1;
select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');
select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
@@ -515,22 +515,22 @@
select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
select distinct b from t2 where (a2 >= 'b') and (b = 'a');
--- BUG #6303
+# BUG #6303
select distinct t_00.a1
from t1 t_00
where exists ( select * from t2 where a1 = t_00.a1 );
--- BUG #8532 - SELECT DISTINCT a, a causes server to crash
+# BUG #8532 - SELECT DISTINCT a, a causes server to crash
select distinct a1,a1 from t1;
select distinct a2,a1,a2,a1 from t1;
select distinct t1.a1,t2.a1 from t1,t2;
---
--- DISTINCT queries with GROUP-BY
---
+#
+# DISTINCT queries with GROUP-BY
+#
--- plans
+# plans
explain select distinct a1,a2,b from t1;
explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
@@ -548,7 +548,7 @@
--replace_column 9 #
explain select distinct b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
--- queries
+# queries
select distinct a1,a2,b from t1;
select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
@@ -562,9 +562,9 @@
select distinct b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
---
--- COUNT (DISTINCT cols) queries
---
+#
+# COUNT (DISTINCT cols) queries
+#
explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a');
explain select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
@@ -578,9 +578,9 @@
select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a');
select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a');
---
--- Queries with expressions in the select clause
---
+#
+# Queries with expressions in the select clause
+#
explain select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;
explain select concat(a1,min(c)),b from t1 where a1 < 'd' group by a1,a2,b;
@@ -595,48 +595,48 @@
select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2;
---
--- Negative examples: queries that should NOT be treated as optimizable by
--- QUICK_GROUP_MIN_MAX_SELECT
---
+#
+# Negative examples: queries that should NOT be treated as optimizable by
+# QUICK_GROUP_MIN_MAX_SELECT
+#
--- select a non-indexed attribute
+# select a non-indexed attribute
explain select a1,a2,b,d,min(c),max(c) from t1 group by a1,a2,b;
explain select a1,a2,b,d from t1 group by a1,a2,b;
--- predicate that references an attribute that is after the MIN/MAX argument
--- in the index
+# predicate that references an attribute that is after the MIN/MAX argument
+# in the index
explain select a1,a2,min(b),max(b) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2;
--- predicate that references a non-indexed attribute
+# predicate that references a non-indexed attribute
explain select a1,a2,b,min(c),max(c) from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b;
explain select a1,a2,b,c from t1
where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b,c;
--- non-equality predicate for a non-group select attribute
+# non-equality predicate for a non-group select attribute
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b < 'b') group by a1;
explain select a1,a2,b from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2,b;
--- non-group field with an equality predicate that references a keypart after the
--- MIN/MAX argument
+# non-group field with an equality predicate that references a keypart after the
+# MIN/MAX argument
explain select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
--- disjunction for a non-group select attribute
+# disjunction for a non-group select attribute
explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b = 'a') group by a1;
--- non-range predicate for the MIN/MAX attribute
+# non-range predicate for the MIN/MAX attribute
explain select a1,a2,b,min(c),max(c) from t2
where (c > 'a000') and (c <= 'd999') and (c like '_8__') group by a1,a2,b;
--- not all attributes are indexed by one index
+# not all attributes are indexed by one index
explain select a1, a2, b, c, min(d), max(d) from t1 group by a1,a2,b,c;
--- other aggregate functions than MIN/MAX
+# other aggregate functions than MIN/MAX
explain select a1,a2,count(a2) from t1 group by a1,a2,b;
explain select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b;
explain select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
@@ -765,24 +765,24 @@
INSERT INTO t5 VALUES(1,1);
INSERT INTO t6 VALUES(1);
--- original bug query
+# original bug query
SELECT * FROM
t1
NATURAL JOIN
(t2 JOIN (t3 NATURAL JOIN t4, t5 NATURAL JOIN t6)
ON (t3.id3 = t2.id3 AND t5.id5 = t2.id5));
--- inner join swapped
+# inner join swapped
SELECT * FROM
t1
NATURAL JOIN
(((t3 NATURAL JOIN t4) join (t5 NATURAL JOIN t6) on t3.id4 = t5.id5) JOIN t2
ON (t3.id3 = t2.id3 AND t5.id5 = t2.id5));
--- one join less, no ON cond
+# one join less, no ON cond
SELECT * FROM t1 NATURAL JOIN ((t3 join (t5 NATURAL JOIN t6)) JOIN t2);
--- wrong error message: 'id2' - ambiguous column
+# wrong error message: 'id2' - ambiguous column
SELECT * FROM
(t2 JOIN (t3 NATURAL JOIN t4, t5 NATURAL JOIN t6)
ON (t3.id3 = t2.id3 AND t5.id5 = t2.id5))
--- 1.36/ndb/src/ndbapi/ndb_cluster_connection.cpp 2006-11-20 22:42:26 +02:00
+++ 1.37/ndb/src/ndbapi/ndb_cluster_connection.cpp 2006-11-20 22:42:26 +02:00
@@ -262,7 +262,7 @@
m_name(0)
{
DBUG_ENTER("Ndb_cluster_connection");
- DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%x", this));
+ DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%lx", (long) this));
g_eventLogger.createConsoleHandler();
g_eventLogger.setCategory("NdbApi");
--- 1.37/vio/viossl.c 2006-11-20 22:42:26 +02:00
+++ 1.38/vio/viossl.c 2006-11-20 22:42:26 +02:00
@@ -87,8 +87,8 @@
{
int r;
DBUG_ENTER("vio_ssl_read");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d, ssl_: 0x%lx",
- vio->sd, buf, size, vio->ssl_arg));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d ssl: 0x%lx",
+ vio->sd, (long) buf, size, (long) vio->ssl_arg));
r= SSL_read((SSL*) vio->ssl_arg, buf, size);
#ifndef DBUG_OFF
@@ -104,7 +104,7 @@
{
int r;
DBUG_ENTER("vio_ssl_write");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size));
r= SSL_write((SSL*) vio->ssl_arg, buf, size);
#ifndef DBUG_OFF
@@ -133,7 +133,7 @@
break;
/* Fallthrough */
default: /* Shutdown failed */
- DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %s",
+ DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
SSL_get_error(ssl, r)));
break;
}
@@ -151,8 +151,8 @@
my_bool net_blocking;
enum enum_vio_type old_type;
DBUG_ENTER("sslaccept");
- DBUG_PRINT("enter", ("sd: %d ptr: %p, timeout: %d",
- vio->sd, ptr, timeout));
+ DBUG_PRINT("enter", ("sd: %d ptr: 0x%lx, timeout: %ld",
+ vio->sd, (long) ptr, timeout));
old_type= vio->type;
net_blocking= vio_is_blocking(vio);
@@ -168,7 +168,7 @@
DBUG_RETURN(1);
}
vio->ssl_arg= (void*)ssl;
- DBUG_PRINT("info", ("ssl_: %p timeout: %ld", ssl, timeout));
+ DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout));
SSL_clear(ssl);
SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
SSL_set_fd(ssl, vio->sd);
@@ -226,8 +226,8 @@
enum enum_vio_type old_type;
DBUG_ENTER("sslconnect");
- DBUG_PRINT("enter", ("sd: %d, ptr: %p, ctx: %p",
- vio->sd, ptr, ptr->ssl_context));
+ DBUG_PRINT("enter", ("sd: %d ptr: 0x%lx ctx: 0x%lx",
+ vio->sd, (long) ptr, (long) ptr->ssl_context));
old_type= vio->type;
net_blocking= vio_is_blocking(vio);
@@ -242,7 +242,7 @@
DBUG_RETURN(1);
}
vio->ssl_arg= (void*)ssl;
- DBUG_PRINT("info", ("ssl: %p, timeout: %ld", ssl, timeout));
+ DBUG_PRINT("info", ("ssl: 0x%lx timeout: %ld", (long) ssl, timeout));
SSL_clear(ssl);
SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout);
SSL_set_fd(ssl, vio->sd);
--- 1.28/vio/viosslfactories.c 2006-11-20 22:42:26 +02:00
+++ 1.29/vio/viosslfactories.c 2006-11-20 22:42:26 +02:00
@@ -79,8 +79,8 @@
vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file)
{
DBUG_ENTER("vio_set_cert_stuff");
- DBUG_PRINT("enter", ("ctx: %p, cert_file: %s, key_file: %s",
- ctx, cert_file, key_file));
+ DBUG_PRINT("enter", ("ctx: 0x%lx cert_file: %s key_file: %s",
+ (long) ctx, cert_file, key_file));
if (cert_file)
{
if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
@@ -128,7 +128,7 @@
X509 *err_cert;
DBUG_ENTER("vio_verify_callback");
- DBUG_PRINT("enter", ("ok: %d, ctx: %p", ok, ctx));
+ DBUG_PRINT("enter", ("ok: %d ctx: 0x%lx", ok, (long) ctx));
err_cert= X509_STORE_CTX_get_current_cert(ctx);
X509_NAME_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf));
@@ -139,7 +139,7 @@
err= X509_STORE_CTX_get_error(ctx);
depth= X509_STORE_CTX_get_error_depth(ctx);
- DBUG_PRINT("error",("verify error: %d, '%s'",err,
+ DBUG_PRINT("error",("verify error: %d '%s'",err,
X509_verify_cert_error_string(err)));
/*
Approve cert if depth is greater then "verify_depth", currently
--- 1.42/vio/viosocket.c 2006-11-20 22:42:26 +02:00
+++ 1.43/vio/viosocket.c 2006-11-20 22:42:26 +02:00
@@ -33,7 +33,7 @@
{
int r;
DBUG_ENTER("vio_read");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size));
/* Ensure nobody uses vio_read_buff and vio_read simultaneously */
DBUG_ASSERT(vio->read_end == vio->read_pos);
@@ -64,7 +64,7 @@
int rc;
#define VIO_UNBUFFERED_READ_MIN_SIZE 2048
DBUG_ENTER("vio_read_buff");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size));
if (vio->read_pos < vio->read_end)
{
@@ -102,7 +102,7 @@
{
int r;
DBUG_ENTER("vio_write");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, (long) buf, size));
#ifdef __WIN__
r = send(vio->sd, buf, size,0);
#else
@@ -227,7 +227,7 @@
int r=0;
uint opt = 0;
DBUG_ENTER("vio_keepalive");
- DBUG_PRINT("enter", ("sd: %d, set_keep_alive: %d", vio->sd, (int)
+ DBUG_PRINT("enter", ("sd: %d set_keep_alive: %d", vio->sd, (int)
set_keep_alive));
if (vio->type != VIO_TYPE_NAMEDPIPE)
{
@@ -411,7 +411,7 @@
{
DWORD length;
DBUG_ENTER("vio_read_pipe");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size));
if (!ReadFile(vio->hPipe, buf, size, &length, NULL))
DBUG_RETURN(-1);
@@ -425,7 +425,7 @@
{
DWORD length;
DBUG_ENTER("vio_write_pipe");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size));
if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL))
DBUG_RETURN(-1);
@@ -470,7 +470,7 @@
char *current_postion;
DBUG_ENTER("vio_read_shared_memory");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size));
remain_local = size;
current_postion=buf;
@@ -531,7 +531,7 @@
char *current_postion;
DBUG_ENTER("vio_write_shared_memory");
- DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
+ DBUG_PRINT("enter", ("sd: %d buf: 0x%lx size: %d", vio->sd, buf, size));
remain = size;
current_postion = buf;
--- 1.185/sql/sql_prepare.cc 2006-11-20 22:42:26 +02:00
+++ 1.186/sql/sql_prepare.cc 2006-11-20 22:42:26 +02:00
@@ -1664,7 +1664,7 @@
enum enum_sql_command sql_command= lex->sql_command;
int res= 0;
DBUG_ENTER("check_prepared_statement");
- DBUG_PRINT("enter",("command: %d, param_count: %ld",
+ DBUG_PRINT("enter",("command: %d, param_count: %u",
sql_command, stmt->param_count));
lex->first_lists_tables_same();
@@ -1877,9 +1877,12 @@
thd->stmt_map.erase(stmt);
}
else
- mysql_log.write(thd, COM_STMT_PREPARE, "[%lu] %.*b", stmt->id,
+ {
+ const char *format= "[%lu] %.*b";
+ mysql_log.write(thd, COM_STMT_PREPARE, format, stmt->id,
stmt->query_length, stmt->query);
+ }
/* check_prepared_statemnt sends the metadata packet in case of success */
DBUG_VOID_RETURN;
}
@@ -2261,8 +2264,11 @@
if (!(specialflag & SPECIAL_NO_PRIOR))
my_pthread_setprio(pthread_self(), WAIT_PRIOR);
if (error == 0)
- mysql_log.write(thd, COM_STMT_EXECUTE, "[%lu] %.*b", stmt->id,
+ {
+ const char *format= "[%lu] %.*b";
+ mysql_log.write(thd, COM_STMT_EXECUTE, format, stmt->id,
thd->query_length, thd->query);
+ }
DBUG_VOID_RETURN;
--- 1.212/tests/mysql_client_test.c 2006-11-20 22:42:26 +02:00
+++ 1.213/tests/mysql_client_test.c 2006-11-20 22:42:26 +02:00
@@ -13686,7 +13686,8 @@
hired.year, hired.month, hired.day);
}
DIE_UNLESS(rc == MYSQL_NO_DATA);
- mysql_stmt_free_result(stmt) || mysql_stmt_reset(stmt);
+ if (!mysql_stmt_free_result(stmt))
+ mysql_stmt_reset(stmt);
}
mysql_stmt_close(stmt);
mysql_rollback(mysql);
@@ -14828,6 +14829,8 @@
}
+#ifndef EMBEDDED_LIBRARY
+
static void test_bug12744()
{
MYSQL_STMT *prep_stmt = NULL;
@@ -14858,6 +14861,8 @@
rc= mysql_stmt_close(prep_stmt);
client_connect(0);
}
+
+#endif /* EMBEDDED_LIBRARY */
/* Bug #16143: mysql_stmt_sqlstate returns an empty string instead of '00000' */
--- 1.5/cmd-line-utils/readline/misc.c 2006-11-20 22:42:26 +02:00
+++ 1.6/cmd-line-utils/readline/misc.c 2006-11-20 22:42:26 +02:00
@@ -154,8 +154,7 @@
/* Add the current digit to the argument in progress. */
int
-rl_digit_argument (ignore, key)
- int ignore, key;
+rl_digit_argument (int ignore __attribute__((unused)), int key)
{
rl_execute_next (key);
return (rl_digit_loop ());
@@ -184,8 +183,8 @@
Read a key. If the key has nothing to do with arguments, then
dispatch on it. If the key is the abort character then abort. */
int
-rl_universal_argument (count, key)
- int count, key;
+rl_universal_argument (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
rl_numeric_arg *= 4;
return (rl_digit_loop ());
@@ -314,9 +313,7 @@
}
void
-rl_replace_from_history (entry, flags)
- HIST_ENTRY *entry;
- int flags; /* currently unused */
+rl_replace_from_history (HIST_ENTRY *entry, int flags __attribute__((unused)))
{
/* Can't call with `1' because rl_undo_list might point to an undo list
from a history entry, just like we're setting up here. */
@@ -342,16 +339,15 @@
/* Meta-< goes to the start of the history. */
int
-rl_beginning_of_history (count, key)
- int count, key;
+rl_beginning_of_history (int count __attribute__((unused)), int key)
{
return (rl_get_previous_history (1 + where_history (), key));
}
/* Meta-> goes to the end of the history. (The current line). */
int
-rl_end_of_history (count, key)
- int count, key;
+rl_end_of_history (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
rl_maybe_replace_line ();
using_history ();
@@ -455,8 +451,7 @@
/* **************************************************************** */
/* How to toggle back and forth between editing modes. */
int
-rl_vi_editing_mode (count, key)
- int count, key;
+rl_vi_editing_mode (int count __attribute__((unused)), int key)
{
#if defined (VI_MODE)
_rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */
@@ -468,8 +463,8 @@
}
int
-rl_emacs_editing_mode (count, key)
- int count, key;
+rl_emacs_editing_mode (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
rl_editing_mode = emacs_mode;
_rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
@@ -479,8 +474,7 @@
/* Function for the rest of the library to use to set insert/overwrite mode. */
void
-_rl_set_insert_mode (im, force)
- int im, force;
+_rl_set_insert_mode (int im, int force __attribute__((unused)))
{
#ifdef CURSOR_MODE
_rl_set_cursor (im, force);
@@ -492,8 +486,7 @@
/* Toggle overwrite mode. A positive explicit argument selects overwrite
mode. A negative or zero explicit argument selects insert mode. */
int
-rl_overwrite_mode (count, key)
- int count, key;
+rl_overwrite_mode (int count, int key __attribute__((unused)))
{
if (rl_explicit_arg == 0)
_rl_set_insert_mode (rl_insert_mode ^ 1, 0);
--- 1.6/cmd-line-utils/readline/text.c 2006-11-20 22:42:26 +02:00
+++ 1.7/cmd-line-utils/readline/text.c 2006-11-20 22:42:26 +02:00
@@ -402,8 +402,7 @@
/* Move to the beginning of the line. */
int
-rl_beg_of_line (count, key)
- int count, key;
+rl_beg_of_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
rl_point = 0;
return 0;
@@ -411,8 +410,7 @@
/* Move to the end of the line. */
int
-rl_end_of_line (count, key)
- int count, key;
+rl_end_of_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
rl_point = rl_end;
return 0;
@@ -508,8 +506,7 @@
/* Clear the current line. Numeric argument to C-l does this. */
int
-rl_refresh_line (ignore1, ignore2)
- int ignore1, ignore2;
+rl_refresh_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
int curr_line;
@@ -547,8 +544,7 @@
}
int
-rl_arrow_keys (count, c)
- int count, c;
+rl_arrow_keys (int count, int c __attribute__((unused)))
{
int ch;
@@ -596,7 +592,7 @@
#ifdef HANDLE_MULTIBYTE
static char pending_bytes[MB_LEN_MAX];
static int pending_bytes_length = 0;
-static mbstate_t ps = {0};
+static mbstate_t ps;
#endif
/* Insert the character C at the current location, moving point forward.
@@ -832,8 +828,7 @@
/* Insert the next typed character verbatim. */
int
-rl_quoted_insert (count, key)
- int count, key;
+rl_quoted_insert (int count, int key __attribute__((unused)))
{
int c;
@@ -854,8 +849,7 @@
/* Insert a tab character. */
int
-rl_tab_insert (count, key)
- int count, key;
+rl_tab_insert (int count, int key __attribute__((unused)))
{
return (_rl_insert_char (count, '\t'));
}
@@ -864,8 +858,7 @@
KEY is the key that invoked this command. I guess it could have
meaning in the future. */
int
-rl_newline (count, key)
- int count, key;
+rl_newline (int count __attribute__((unused)), int key __attribute__((unused)))
{
rl_done = 1;
@@ -898,8 +891,8 @@
is just a stub, you bind keys to it and the code in _rl_dispatch ()
is special cased. */
int
-rl_do_lowercase_version (ignore1, ignore2)
- int ignore1, ignore2;
+rl_do_lowercase_version (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
return 0;
}
@@ -1093,8 +1086,8 @@
/* Delete all spaces and tabs around point. */
int
-rl_delete_horizontal_space (count, ignore)
- int count, ignore;
+rl_delete_horizontal_space (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
int start = rl_point;
@@ -1134,14 +1127,13 @@
/* Turn the current line into a comment in shell history.
A K*rn shell style function. */
int
-rl_insert_comment (count, key)
- int count, key;
+rl_insert_comment (int count __attribute__((unused)), int key)
{
char *rl_comment_text;
int rl_comment_len;
rl_beg_of_line (1, key);
- rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT;
+ rl_comment_text = _rl_comment_begin ? _rl_comment_begin : (char*) RL_COMMENT_BEGIN_DEFAULT;
if (rl_explicit_arg == 0)
rl_insert_text (rl_comment_text);
@@ -1173,24 +1165,21 @@
/* Uppercase the word at point. */
int
-rl_upcase_word (count, key)
- int count, key;
+rl_upcase_word (int count, int key __attribute__((unused)))
{
return (rl_change_case (count, UpCase));
}
/* Lowercase the word at point. */
int
-rl_downcase_word (count, key)
- int count, key;
+rl_downcase_word (int count, int key __attribute__((unused)))
{
return (rl_change_case (count, DownCase));
}
/* Upcase the first letter, downcase the rest. */
int
-rl_capitalize_word (count, key)
- int count, key;
+rl_capitalize_word (int count, int key __attribute__((unused)))
{
return (rl_change_case (count, CapCase));
}
@@ -1314,8 +1303,7 @@
/* Transpose the characters at point. If point is at the end of the line,
then transpose the characters before point. */
int
-rl_transpose_chars (count, key)
- int count, key;
+rl_transpose_chars (int count, int key __attribute__((unused)))
{
#if defined (HANDLE_MULTIBYTE)
char *dummy;
@@ -1486,15 +1474,13 @@
#endif /* !HANDLE_MULTIBYTE */
int
-rl_char_search (count, key)
- int count, key;
+rl_char_search (int count, int key __attribute__((unused)))
{
return (_rl_char_search (count, FFIND, BFIND));
}
int
-rl_backward_char_search (count, key)
- int count, key;
+rl_backward_char_search (int count, int key __attribute__((unused)))
{
return (_rl_char_search (count, BFIND, FFIND));
}
@@ -1519,16 +1505,15 @@
/* A bindable command to set the mark. */
int
-rl_set_mark (count, key)
- int count, key;
+rl_set_mark (int count, int key __attribute__((unused)))
{
return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point));
}
/* Exchange the position of mark and point. */
int
-rl_exchange_point_and_mark (count, key)
- int count, key;
+rl_exchange_point_and_mark (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (rl_mark > rl_end)
rl_mark = -1;
| Thread |
|---|
| • bk commit into 5.0 tree (monty:1.2302) | monty | 20 Nov |