summaryrefslogtreecommitdiff
path: root/client/mysqlslap.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.0Sergei Golubchik2016-04-261-1/+1
|\
| * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-04-201-1/+1
| |\
| | * WL#9072: Backport WL#8785 to 5.5Ramil Kalimullin2016-02-191-4/+4
| | |
* | | Fixes to get all test to run on MacosX Lion 10.7Monty2015-11-291-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch '5.5' into 10.0Sergei Golubchik2015-08-051-8/+41
|\ \ \ | |/ / | | | | | | 5.5 without InnoDB/XtraDB changes
| * | Merge tag 'mysql-5.5.45' into 5.5Sergei Golubchik2015-08-011-8/+41
| |\ \ | | |/
| | * Merge branch 'mysql-5.1' into mysql-5.5Arun Kuruvila2015-06-041-8/+40
| | |\
| | | * Bug #20605441 : BUFFER OVERFLOW IN MYSQLSLAPArun Kuruvila2015-06-041-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- mysqlslap is a diagnostic utility designed to emulate client load for a MySQL server and to report the timing of each stage. This utility crashes when invalid values are passed to the options 'num_int_cols_opt' or 'num_chars_cols_opt' or 'engine'. Analysis:- mysqlslap uses "parse_option()" to parse the values specified to the options 'num_int_cols_opt', 'num_chars_cols_opt' and 'engine'. These options takes values separated by commas. In "parse_option()", the comma separated values are separated and copied into a buffer without checking the length of the string to be copied. The size of the buffer is defined by a macro HUGE_STRING_LENGTH whose value is 8196. So if the length of the any of the comma separated value exceeds HUGE_STRING_LENGTH, will result in a buffer overflow. Fix:- A check is introduced in "parse_option()" to check whether the size of the string to be copied is more than HUGE_STRING_LENGTH. If it is more, an error, "Invalid value specified for the option 'xxx'" is thrown. Option length was incorrectly calculated for the last comma separated value. So fixed that as well.
| | * | Merge of patch for Bug#13928675 from mysql-5.1.Nirbhay Choubey2012-08-071-2/+2
| | |\ \ | | | |/
| | | * Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUSTNirbhay Choubey2012-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHOW 2012 INSTEAD OF 2011 * Added a new macro to hold the current year : COPYRIGHT_NOTICE_CURRENT_YEAR * Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro to take the initial year as parameter and pick current year from the above mentioned macro.
| | | * Bug #11766072 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWSVenkata Sidagam2012-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This bug is a duplicate of Bug #31173, which was pushed to the mysql-trunk 5.6 on 4th Aug, 2010. This is just a back-port of the fix
| | * | Bug #12998841: libmysql divulges plaintext password upon request in 5.5Georgi Kodinov2012-07-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Clear text password client plugin disabled by default. 2. Added an environment variable LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN, that when set to something starting with '1', 'Y' or 'y' will enable the clear text plugin for all connections. 3. Added a new mysql_options() option : MYSQL_ENABLE_CLEARTEXT_PLUGIN that takes an my_bool argument. When the value of the argument is non-zero the clear text plugin is enabled for this connection only. 4. Added an enable-cleartext-plugin config file option that takes a numeric argument. If the numeric value of the numeric argument is non-zero the clear text plugin is enabled for the connection 5. Added a boolean command line option "--enable_cleartext_plugin" to mysql, mysqlslap and mysqladmin. When specified it will call mysql_options with the effect of #3 6. Added a new CLEARTEXT option to the connect command in mysqltest. When specified it will enable the cleartext plugin for usage. 7. Added test cases and updated existing ones that need the clear text plugin.
| | * | Merged from 5.1 to 5.5Venkata Sidagam2012-04-091-1/+2
| | |\ \
| | | * | Bug #11766072 59107: MYSQLSLAP CRASHES IF STARTED WITH NO ARGUMENTS ON WINDOWSVenkata Sidagam2012-04-091-1/+2
| | | |/ | | | | | | | | | | | | | | | | | | | | This bug is a duplicate of Bug #31173, which was pushed to the mysql-trunk 5.6 on 4th Aug, 2010. This is just a back-port of the fix
| | | * Updated/added copyright headersKent Boortz2011-07-031-3/+8
| | | |\
| | * | \ Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | |\ \ \ | | | |/ /
| | | * | Updated/added copyright headersKent Boortz2011-06-301-2/+3
| | | | |
| | * | | Fixed cast warnings in introducing the pluggable authentication clientGeorgi Kodinov2011-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | options.
| | * | | Merging patch for bug#11765157 from mysql-5.1.Nirbhay Choubey2011-04-081-3/+8
| | |\ \ \ | | | | |/ | | | |/|
| | | * | Bug#11765157 - 58090: mysqlslap drops schema specified inNirbhay Choubey2011-04-081-3/+8
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | create_schema if auto-generate-sql also set. mysqlslap uses a schema to run its tests on and later drops it if auto-generate-sql is used. This can be a problem, if the schema is an already existing one. If create-schema is used with auto-generate-sql option, mysqlslap while performing the cleanup, drops the specified database. Fixed by introducing an option --no-drop, which, if used, will prevent the dropping of schema at the end of the test.
| | * | Bug#58139 : default-auth option not recognized in MySQL standardNirbhay Choubey2011-01-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | command line clients. Postfix covering other mysql standard clients like mysql_upgrade, mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow and mysqlslap.
| | * | Merging from mysql-5.1.Nirbhay Choubey2011-01-131-5/+15
| | |\ \ | | | |/
| | | * Bug#59109 : mysqlslap crashes on mysql_fetch_row after ignoringNirbhay Choubey2011-01-131-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | null from mysql_store_result. mysqlslap segfaults at a point when it tries to fetch rows from the result set. Under some circumstances, mysql_store_result can return 'NULL', even after query execution (mysql_query) succeeds, and eventually a segfault might occur if same unchecked return value is passed to mysql_fetch_row. Fixed by adding a check on mysql_store_result's return value.
| | * | Fix for Bug#57094 (Copyright notice incorrect?).Alexander Nozdrin2010-10-061-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix is to: - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place to specify copyright notice; - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE in programs.
| | * | WL#5486: Remove code for unsupported platformsDavi Arnaut2010-07-151-8/+0
| | | | | | | | | | | | Remove Netware specific code.
| | * | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives.
| | * | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-06-101-55/+51
| | |\ \ | | | |/
| | | * Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-101-55/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced.
| | * | Manual merge from mysql-trunk-merge.Alexander Nozdrin2010-02-241-6/+6
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - client/mysql.cc - client/mysqldump.c - configure.in - mysql-test/r/csv.result - mysql-test/r/func_time.result - mysql-test/r/show_check.result - mysql-test/r/sp-error.result - mysql-test/r/sp.result - mysql-test/r/sp_trans.result - mysql-test/r/type_blob.result - mysql-test/r/type_timestamp.result - mysql-test/r/warnings.result - mysql-test/suite/rpl/r/rpl_sp.result - sql/mysql_priv.h - sql/mysqld.cc - sql/sp.cc - sql/sql_base.cc - sql/sql_table.cc - sql/sql_trigger.cc - sql/sql_view.cc - sql/table.h - sql/share/errmsg.txt - mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
| | | * \ Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2010-02-091-6/+6
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/suite/rpl/r/rpl_slow_query_log.result Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test Conflict adding files to server-tools. Created directory. Conflict because server-tools is not versioned, but has versioned children. Versioned directory. Conflict adding files to server-tools/instance-manager. Created directory. Conflict because server-tools/instance-manager is not versioned, but has versioned children. Versioned directory. Contents conflict in server-tools/instance-manager/options.cc Text conflict in sql/mysqld.cc
| | | | * Recommit of Bug#49447.Staale Smedseng2010-02-041-6/+6
| | | | |
| | * | | Manual merge/pull from mysql-next-mr.Alexander Nozdrin2009-11-251-8/+8
| | |\ \ \ | | | | | | | | | | | | | | | | | | Conflicts: - sql/sql_insert.cc
| | | * | | Backport of:Konstantin Osipov2009-11-241-8/+8
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0 Bug#32082 : definition of VOID in my_global.h conflicts with Windows SDK headers VOID macro is now removed. Its usage is replaced with void cast. In some cases, where cast does not make much sense (pthread_*, printf, hash_delete, my_seek), cast is ommited.
| | * | | merging.Alexey Botchkov2009-11-171-1/+5
| | |\ \ \ | | | |/ / | | |/| |
| | | * | Bug#47216 programs should quit if the file specified by --defaults-file ↵Alexey Botchkov2009-10-091-1/+5
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | option isn't found added code to exit a tool if the forced config file wasn't found per-file comments: client/mysql.cc Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysql_upgrade.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqladmin.cc Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlcheck.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqldump.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlimport.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlshow.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found client/mysqlslap.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found mysql-test/t/mysql.test Bug#47216 programs should quit if the file specified by --defaults-file option isn't found test added sql/mysqld.cc Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found storage/myisam/myisamchk.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found storage/myisam/myisampack.c Bug#47216 programs should quit if the file specified by --defaults-file option isn't found added code to exit a tool if the forced config file wasn't found
| | * | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-10-141-2/+7
| | |\ \ | | | |/
| | | * automergeGeorgi Kodinov2009-10-041-2/+2
| | | |\
| | | * | Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-231-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 Cleaning up warnings not present in 5.0.
| | * | | Merge "trunk-build" up into "next-mr".Joerg Bruehe2009-09-301-2/+2
| | |\ \ \ | | | | |/ | | | |/|
| | | * | Fix bug#46980Joerg Bruehe2009-09-171-2/+2
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Option "--without-server" still not working in 5.1 The general approach is to make sure that source files which require thread support are only compiled if the build really needs thread support, which means when the server is built or a thread-safe client library. This required several changes: - Make sure the subdirectories "storage/" and "plugin/" are only processed if the server is built, not ifclient-only. - Make the compilation of some modules which inherently require threading depend on thread supportin the build. - Separate the handling of threading in "configure.in" from that of server issues, threading is also needed in a non-server build of a thread-safe client library. Also, "libdbug" must get built even in a client-only build, so "dbug/" must be in the list of client directories. In addition, calls to thread functions in source files which can be built without thread support must use the wrapper functions which handle the non-threaded build. So the modules "client/mysqlimport.c" and "client/mysqlslap.c" must call "my_thread_end()" only via "mysql_thread_end()".
| | * | This is the downport ofVladislav Vaintroub2009-09-111-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#24509 - 2048 file descriptor limit on windows needs increasing, also WL#3049 - improved Windows I/O The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open file is stored in the my_file_info struct, along with a flag for append mode because the Windows API does not support opening files in append mode in all cases) The default max open files has been increased to 16384 and can be increased further by setting --max-open-files=<value> during the server start. Another major change in this patch that almost all Windows specific file IO code has been moved to a new file my_winfile.c, greatly reducing the amount of code in #ifdef blocks within mysys, thus improving readability. Minor enhancements: - my_(f)stat() is changed to use __stati64 structure with 64 file size and timestamps. It will return correct file size now (C runtime implementation used to report outdated information) - my_lock on Windows is prepared to handle additional timeout parameter - after review : changed __WIN__ to _WIN32 in the new and changed code.
| | * Merge in bug fixes for client toolsJim Winstead2009-07-141-2/+6
| | |\
| | | * mysqlslap didn't correctly handle --csv with no argument. (Bug #44412)Jim Winstead2009-05-181-2/+6
| | | |
| | * | Fix compilation failures: get rid of C++ specifics in C-code.Alexander Nozdrin2009-06-031-1/+1
| | |/
| | * Various command-line utilities, including mysqlbinlog and mysqldump, don'tJim Winstead2009-05-071-0/+2
| | | | | | | | | | | | handle the --skip-password option correctly. (Bug #28479)
| | * Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-131-1/+1
| | | | | | | | | | | | | | | | | | - 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
| | * mysql-test/r/partition.resultBuild Team2008-11-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/t/partition.test sql/ha_partition.cc Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables Problem was usage of read_range_first with an empty key. Solution was to not to give a key if it was empty. (real author Mattias Jonsson) storage/archive/archive_reader.c client/mysqlslap.c Aligned the copyright texts output from "--version" of tools, to let internal tools be able to change them if needed. storage/ndb/test/tools/connect.cpp storage/ndb/test/run-test/atrt.hpp Corrected a few GPL headers not restricted to GPL version 2 Makefile.am Added missing --report-features to the 'test-bt-fast' target support-files/mysql.spec.sh Reversed the removal of the "%define license GPL" in as internal tools depended on it
| | * Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2008-02-081-2/+2
| | |\ | | | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| | | * Merge hynda.mysql.fi:/home/my/mysql-5.1-mainjani@hynda.mysql.fi2007-11-081-1/+1
| | | |\ | | | | | | | | | | | | | | | into hynda.mysql.fi:/home/my/mysql-5.1-marvel
| | | | * Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@narttu.mysql.fi2007-10-011-1/+1
| | | | |\ | | | | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.1