summaryrefslogtreecommitdiff
path: root/tests/bug25714.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
|\
| * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | * Update wrong zip-code
* | Fixes to get all test to run on MacosX Lion 10.7Monty2015-11-291-0/+1
|/ | | | | | | | | | | | | | | | | | | | This includes fixing all utilities to not have any memory leaks, as safemalloc warnings stopped tests from passing on MacOSX. - Ensure that all clients takes character-set-dir, as the libmysqlclient library will use it. - mysql-test-run now passes character-set-dir to all external clients. - Changed dynstr_free() so that it can be called twice (made freeing code easier) - Changed rpl_global_gtid_slave_state to be allocated dynamicly as it includes a mutex that needs to be initizlied/destroyed before my_end() is called. - Removed rpl_slave_state::init() and rpl_slave_stage::deinit() as their job are better handling by constructor and delete. - Print alias instead of table_name in check_duplicate_key as table_name may have been converted to lower case. Other things: - Fixed a case in time_to_datetime_with_warn() where we where using && instead of & in tests
* Fixed compiler errors and warningsMichael Widenius2013-12-021-1/+1
| | | | | | | | | | | | | extra/jemalloc/src/ctl.c: Fixed compiler warning include/mysql/service_logger.h: Fixed compile failure with clang compiler storage/maria/ma_check.c: Fixed compiler warning support-files/compiler_warnings.supp: Suppressed warnings in jemalloc tests/bug25714.c: Fixed compiler warning
* Updated/added copyright headersKent Boortz2011-06-301-2/+3
|\
| * Updated/added copyright headersKent Boortz2011-06-301-2/+5
| |\ |/ /
| * Updated/added copyright headersKent Boortz2011-06-301-2/+3
| |
* | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-131-2/+2
|\ \ | |/ | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-101-2/+2
| | | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
* | Merge polly.(none):/home/kaa/src/opt/bug32221/my50-bug31445unknown2007-11-221-1/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into polly.(none):/home/kaa/src/opt/bug32221/my51-bug31445 BitKeeper/deleted/.del-myTest.dsp~4a8c480769193952: Auto merged BitKeeper/deleted/.del-mytest.c~9a99338689e5de8: Auto merged BitKeeper/deleted/.del-mytest.dsw~2324698861155335: Auto merged libmysql/Makefile.am: Auto merged tests/bug25714.c: Auto merged tests/mysql_client_test.c: Auto merged BitKeeper/deleted/.del-copy_mysql_files.bat~f6878eeb80173de9: Auto merged BitKeeper/deleted/.del-mytest_1.c: Merge rename: BitKeeper/deleted/.del-mytest.c -> BitKeeper/deleted/.del-mytest_1.c BitKeeper/deleted/.del-myTest-package.dsp~ec9faf3287cbe2b9: Auto merged BitKeeper/deleted/.del-myTest-package_ia64.dsp~e423b69f2c624850: Auto merged BitKeeper/deleted/.del-myTest.vcproj~dba5adc4fad3c06: Auto merged BitKeeper/deleted/.del-myTest_ia64.dsp~b17572b217d092e6: Auto merged libmysql/CMakeLists.txt: Manual merge.
| * Fix for bug #32221: bug25714, mytest, mysql_client_test complaints andunknown2007-11-191-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes. MySQL distributions contain a number of programs that are used only by the MySQL test suite internally, i.e. they are not indended to be invoked directly by a user. As a result, such programs are not documented, do not have any built-in help or proper error reporting, which may confuse users. This patch fixes the problem with the following changes: - mytest, libmysqltest and all references to them were removed from the distribution since they are not used anymore - bug25714 now displays an error message when run with incorrect arguments or with the --help option - mysql_client_test now does not call abort() in case of errors, instead it does a clean exit() with a proper error status. BitKeeper/deleted/.del-mytest.c: Delete: libmysql/mytest.c BitKeeper/deleted/.del-myTest-package.dsp: Delete: VC++Files/libmysqltest/myTest-package.dsp BitKeeper/deleted/.del-myTest-package_ia64.dsp: Delete: VC++Files/libmysqltest/myTest-package_ia64.dsp BitKeeper/deleted/.del-myTest.dsp~4a8c480769193952: Delete: VC++Files/libmysqltest/myTest.dsp BitKeeper/deleted/.del-myTest.vcproj: Delete: VC++Files/libmysqltest/myTest.vcproj BitKeeper/deleted/.del-myTest_ia64.dsp: Delete: VC++Files/libmysqltest/myTest_ia64.dsp BitKeeper/deleted/.del-mytest.c~9a99338689e5de8: Delete: VC++Files/libmysqltest/mytest.c BitKeeper/deleted/.del-mytest.dsw~2324698861155335: Delete: VC++Files/libmysqltest/mytest.dsw VC++Files/copy_mysql_files.bat: Removed references to libmysqltest. libmysql/CMakeLists.txt: Removed rules for myTest. libmysql/Makefile.am: Removed mytest.c from EXTRA_DIST. tests/bug25714.c: Display a meaningful error message when run incorrectly or with the --help option. tests/mysql_client_test.c: In case of error, don't cause abnormal program termination, do a clean exit() with an error status.
* | Fixed a lot of compiler warnings and errors detected by Forte C++ on Solarisunknown2007-08-131-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map() BUILD/compile-solaris-sparc-forte: Updated script to current Solaris installations Now we compile by default for 64 bits client/mysql.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) client/mysql_upgrade.c: Fixed compiler warning (on Forte) client/mysqladmin.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) client/mysqlcheck.c: Fixed compiler warning (on Forte) client/mysqldump.c: Fixed compiler warning (on Forte) client/mysqlslap.c: Fixed compiler warning (on Forte) client/mysqltest.c: Fixed compiler warning (on Forte) client/sql_string.cc: Avoid compiler warnings when using C function pointers in C++ configure.in: Added detection of mtmalloc and ieeefp.h extra/replace.c: Fixed compiler warning (on Forte) include/m_ctype.h: Added some typedef's to make it easy to use C function pointers in C++ include/my_sys.h: Added my_file_total_opened (counter for calls to my_open()) include/myisam.h: Fixed compiler warning (on Forte) libmysql/libmysql.c: Fixed compiler warning (on Forte) by adding casts and change types libmysql/manager.c: Fixed compiler warning (on Forte) by adding casts and change types mysql-test/r/ctype_cp932_binlog_stm.result: Updated positions (Needed because we didn't before correctly restore collation_database after running stored procedure mysys/my_fopen.c: Count number of opened files mysys/my_open.c: Count number of opened files mysys/my_static.c: Count number of opened files mysys/thr_alarm.c: Optimization to do less alarm() and pthread_sigmask() calls. Idea is to remember time for next pending alarm and not reschedule a new alarm if it's after the current one. Before we only did this if there was other pending alarms. We don't have to use pthread_sigmask() in case of 'USE_ONE_SIGNAL_HAND' as the alarm() signal will be blocked for the calling thread anyway and no other thread will have the alarm() signal enabled to call process_alarm() regex/regcomp.c: Fixed compiler warning (on Forte) by adding casts and change types scripts/mysql_install_db.sh: Added option --source-install to allow one to create a mysql database from the source tree without installing MySQL Don't give (unnecessary) warnings server-tools/instance-manager/angel.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) server-tools/instance-manager/thread_registry.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/event_db_repository.cc: index_read() -> index_read_map() sql/event_queue.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/field.cc: Fixed compiler warnings about hidden fields sql/ha_partition.cc: Fixed compiler warnings about hidden fields index_read() -> index_read_map() sql/ha_partition.h: index_read() -> index_read_map() sql/handler.cc: Added PAGE option to row types (to prepare for future) index_read() -> index_read_map() sql/handler.h: Added ROW_TYPE_PAGE (for future) Added flag to signal if table was to be created transactionally I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map() sql/item.cc: Fixed indentation Renamed local variable to avoid hiding class variable sql/item_cmpfunc.cc: Renamed local variable to avoid hiding class variable sql/item_cmpfunc.h: Removed not used variable sql/item_func.cc: Renamed local variable to avoid hiding class variable sql/item_strfunc.cc: Moved functions from Item_strfunc.cc sql/item_strfunc.h: Move functions to item_strfunc.cc Use C function pointer type to avoid compiler warnings (with Forte) sql/item_subselect.cc: index_read() -> index_read_map() sql/item_xmlfunc.cc: Renamed local variable to avoid hiding class variable Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/key.cc: Fixed indentation sql/log.cc: Renamed local variable to avoid hiding class variable sql/log_event.cc: Removed call to my_time() when creating class instance of Log_event() as this may have static instances. (One can't call my_time() before my_init()) index_read() -> index_read_map() Renamed local variable to avoid hiding class variable sql/log_event_old.cc: Renamed local variable to avoid hiding class variable sql/mysql_priv.h: Made all create_backup_ctx() declarations identical. This lifted up a bug where wrong create_backup_ctx() was called in some cases. Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/mysqld.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) Fixed indentation Don't call end_thr_alarm() when calling unireg_abort() as unireg_abort() already calls end_thr_alarm() Added variable 'Opened_files' (number of calls to my_open() or my_fopen()) Don't print 'loose' warnings when using --bootstrap (to avoid warnings when running mysql_install_db) Fixed compiler warnings sql/opt_range.cc: index_read() -> index_read_map() sql/opt_sum.cc: index_read() -> index_read_map() sql/partition_info.cc: Renamed local variable to avoid hiding class variable sql/rpl_filter.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/set_var.cc: Renamed local variable to avoid hiding class variable Added 'process_key_cache_t' type to avoid compiler warning (on Forte) sql/set_var.h: Added 'process_key_cache_t' type to avoid compiler warning (on Forte) sql/sp.cc: More debugging index_read() -> index_read_map() sql/sp_cache.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/sp_head.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) Moved 'saved_creation_ctx' higher up to be able to free objects allocated by create_backup_ctx() sql/sql_acl.cc: index_read() -> index_read_map() sql/sql_class.cc: Renamed local variable to avoid hiding class variable Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/sql_class.h: Renamed local variable to avoid hiding class variable sql/sql_db.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) sql/sql_delete.cc: Renamed local variable to avoid hiding class variable sql/sql_handler.cc: index_read() -> index_read_map() sql/sql_help.cc: index_read() -> index_read_map() sql/sql_insert.cc: index_read() -> index_read_map() Renamed local variable to avoid hiding class variable sql/sql_lex.cc: Renamed local variable to avoid hiding class variable sql/sql_plugin.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) index_read() -> index_read_map() Don't give warnings about not used plugins if we are using --warnings=0 sql/sql_select.cc: index_read() -> index_read_map() sql-common/client.c: Fixed compiler warning (on Forte) sql-common/my_time.c: Removed never accessed code Fixed compiler warning (on Forte) sql/sql_servers.cc: index_read() -> index_read_map() sql/sql_show.cc: Added TRANSACTIONAL to SHOW CREATE Fixed ROW_TYPE_PAGE sql/sql_string.cc: Avoid compiler warnings when using C function pointers in C++ sql/sql_table.cc: Set create_info->transactional if we used TRANSACTIONAL=1 sql/sql_udf.cc: index_read() -> index_read_map() sql/sql_yacc.yy: Added TRANSACTIONAL=0|1 to CREATE (for future) Added row type PAGE (was only partionally handled before) sql/strfunc.cc: Avoid compiler warnings when using C function pointers in C++ sql/table.cc: More DBUG statements Declare all create_backup_ctx() functions identically Remember if table was created with TRANSACTIONAL flag or not (future safe) Renamed local variable to avoid hiding class variable sql/table.h: Remember if table was created with TRANSACTIONAL=1 sql/tztime.cc: index_read() -> index_read_map() sql-common/pack.c: Fixed compiler warning (on Forte) storage/archive/archive_reader.c: Fixed compiler warning (on Forte) storage/archive/azio.c: Fixed compiler warning (on Forte) storage/blackhole/ha_blackhole.cc: index_read() -> index_read_map() storage/blackhole/ha_blackhole.h: index_read() -> index_read_map() storage/csv/ha_tina.cc: Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte) storage/example/ha_example.cc: index_read() -> index_read_map() storage/example/ha_example.h: index_read() -> index_read_map() storage/heap/ha_heap.cc: index_read() -> index_read_map() storage/heap/ha_heap.h: index_read() -> index_read_map() storage/heap/hp_test1.c: Fixed compiler warning (on Forte) storage/heap/hp_test2.c: Fixed compiler warning (on Forte) storage/myisam/ft_boolean_search.c: Fixed compiler warning (on Forte) storage/myisam/ft_nlq_search.c: Fixed compiler warning (on Forte) storage/myisam/ft_parser.c: Fixed compiler warning (on Forte) storage/myisam/ft_stopwords.c: Fixed compiler warning (on Forte) storage/myisam/ha_myisam.cc: index_read() -> index_read_map() storage/myisam/ha_myisam.h: index_read() -> index_read_map() storage/myisam/mi_check.c: Fixed compiler warning (on Forte) storage/myisam/mi_delete.c: Fixed compiler warning (on Forte) storage/myisam/mi_dynrec.c: Fixed compiler warning (on Forte) storage/myisam/mi_extra.c: Fixed compiler warning (on Forte) storage/myisam/mi_key.c: Fixed compiler warning (on Forte) storage/myisam/mi_keycache.c: Fixed compiler warning (on Forte) storage/myisam/mi_locking.c: Fixed compiler warning (on Forte) storage/myisam/mi_log.c: Fixed compiler warning (on Forte) storage/myisam/mi_open.c: Fixed compiler warning (on Forte) storage/myisam/mi_packrec.c: Fixed compiler warning (on Forte) storage/myisam/mi_page.c: Fixed compiler warning (on Forte) storage/myisam/mi_rkey.c: Added comment storage/myisam/mi_search.c: Fixed compiler warning (on Forte) storage/myisam/mi_statrec.c: Fixed compiler warning (on Forte) storage/myisam/mi_test1.c: Fixed compiler warning (on Forte) storage/myisam/mi_test2.c: Fixed compiler warning (on Forte) storage/myisam/mi_test3.c: Fixed compiler warning (on Forte) storage/myisam/mi_update.c: Fixed compiler warning (on Forte) storage/myisam/mi_write.c: Fixed compiler warning (on Forte) storage/myisam/myisamdef.h: Fixed that file_read/file_write returns type size_t Changed some functions to use uchar * as argument/return value instead of char* This fixed some compiler warnings on Forte storage/myisam/myisamlog.c: Fixed compiler warning (on Forte) storage/myisam/myisampack.c: Fixed compiler warning (on Forte) storage/myisam/rt_test.c: Fixed compiler warning (on Forte) storage/myisam/sort.c: Fixed compiler warning (on Forte) by adding casts or changing variables to uchar* storage/myisam/sp_test.c: Fixed compiler warning (on Forte) by adding casts or changing variables to uchar* storage/myisammrg/ha_myisammrg.cc: index_read() -> index_read_map() storage/myisammrg/ha_myisammrg.h: index_read() -> index_read_map() storage/myisammrg/myrg_create.c: Fixed compiler warning (on Forte) by adding casts or changing variable types storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: Tdummy -> align (as in other part of cluster code) storage/ndb/src/kernel/vm/DynArr256.cpp: Removed not used variable storage/ndb/src/ndbapi/Ndb.cpp: Removed not used variable strings/strtod.c: Include ieeefp.h to avoid compiler warning tests/bug25714.c: Fixed compiler warning tests/mysql_client_test.c: Remove not used variable Fixed indentation Removed never reached code Fixed compiler warning (on Forte) by adding casts or changing variable types vio/viosocket.c: Fixed compiler warning (on Forte) by adding casts or changing variable types
* fix compile on Windows for bug25714.cunknown2007-07-241-3/+6
| | | | | | | | | --- fix compile on Windows for bug25714.c tests/bug25714.c: fix compile on Windows
* Bug#25714unknown2007-07-231-0/+68
"getGeneratedKeys() does not work with FEDERATED table" mysql_insert() expected the storage engine to update the row data during the write_row() operation with the value of the new auto- increment field. The field must be updated when only one row has been inserted as mysql_insert() would ignore the thd->last_insert. This patch implements HA_STATUS_AUTO support in ha_federated::info() and ensures that ha_federated::write_row() does update the row's auto-increment value. The test case was written in C as the protocol's 'id' value is accessible through libmysqlclient and not via SQL statements. mysql-test-run.pl was extended to enable running the test binary. mysql-test/mysql-test-run.pl: bug25714 implement support to run C test for bug25714 sql/ha_federated.cc: bug25714 The storage engine instance property auto_increment_value was not being set. mysql_insert() requires that the storage engine updates the row with the auto-increment value, especially when only inserting one row. Implement support for ha_federated::info(HA_STATUS_AUTO) tests/Makefile.am: bug25714 build C test for bug mysql-test/include/have_bug25714.inc: New BitKeeper file ``mysql-test/include/have_bug25714.inc'' mysql-test/r/federated_bug_25714.result: New BitKeeper file ``mysql-test/r/federated_bug_25714.result'' mysql-test/r/have_bug25714.require: New BitKeeper file ``mysql-test/r/have_bug25714.require'' mysql-test/t/federated_bug_25714.test: New BitKeeper file ``mysql-test/t/federated_bug_25714.test'' tests/bug25714.c: New BitKeeper file ``tests/bug25714.c''