summaryrefslogtreecommitdiff
path: root/client/client_priv.h
Commit message (Collapse)AuthorAgeFilesLines
* WL#2360 Performance schemaMarc Alff2009-12-091-1/+22
| | | | Part III: mysys instrumentation
* BUG #8368 "mysqldump needs --slave-data option"Magne Mahre2009-11-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Added this option, named as "--dump-slave". The purpose of this option is to be able to produce a dump from a slave used for making backups of the master. Originally, dumping from the main master was fine, but as more data accumulated, the dump process would take over 30 minutes, locking up the master database hence website for 30 minutes. A slave dedicated to producing backups was the answer, but I needed a dump that could be used to restore a slave instantly and in order to do that, it has to have three things contained in the dump: 1. "STOP SLAVE;" at the beginning 2. "CHANGE MASTER TO ...<the master - info from 'show slave status'>" 3. "START SLAVE;" at the end These options in this changeset contain this. --stop-slave adds "STOP SLAVE" to the beginning of the dump and "STOP SLAVE" to the end of the dump. --include-host gives the user the option to have the host explicitely added to the "CHANGE MASTER TO ..." line. --dump-slave adds the "CHANGE MASTER ..." to the dump representing not the slave's master binlog info, but the slave's master's info from "SHOW SLAVE STATUS"
* Bug#26780: automatic vertical output for wide resultsMagne Mahre2009-11-041-0/+1
| | | | | | | | | Feature from Eric Bergen, CLA signed 2007-06-27. Adds new mysql client option "--auto-vertical-output", which causes the client to test whether a result table is too wide for the current window (where available) and emit vertical results in that case. Otherwise, it sends normal tabular results.
* WL#751 Error message construction, backportSergey Glukhov2009-10-151-0/+1
|
* Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1mkindahl@dl145h.mysql.com2008-01-311-1/+1
|\ | | | | | | into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
| * BUG#32407: Impossible to do point-in-time recovery from older binlogsven@riska.(none)2007-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: it is unsafe to read base64-printed events without first reading the Format_description_log_event (FD). Currently, mysqlbinlog cannot print the FD. As a side effect, another bug has also been fixed: When mysqlbinlog --start-position=X was specified, no ROLLBACK was printed. I changed this, so that ROLLBACK is always printed. This patch does several things: - Format_description_log_event (FD) now print themselves in base64 format. - mysqlbinlog is now able to print FD events. It has three modes: --base64-output=auto Print row events in base64 output, and print FD event. The FD event is printed even if it is outside the range specified with --start-position, because it would not be safe to read row events otherwise. This is the default. --base64-output=always Like --base64-output=auto, but also print base64 output for query events. This is like the old --base64-output flag, which is also a shorthand for --base64-output=always --base64-output=never Never print base64 output, generate error if row events occur in binlog. This is useful to suppress the FD event in binlogs known not to contain row events (e.g., because BINLOG statement is unsafe, requires root privileges, is not SQL, etc) - the BINLOG statement now handles FD events correctly, by setting the thread's rli's relay log's description_event_for_exec to the loaded event. In fact, executing a BINLOG statement is almost the same as reading an event from a relay log. Before my patch, the code for this was separated (exec_relay_log_event in slave.cc executes events from the relay log, mysql_client_binlog_statement in sql_binlog.cc executes BINLOG statements). I needed to augment mysql_client_binlog_statement to do parts of what exec_relay_log_event does. Hence, I did a small refactoring and moved parts of exec_relay_log_event to a new function, which I named apply_event_and_update_pos. apply_event_and_update_pos is called both from exec_relay_log_event and from mysql_client_binlog_statement. - When a non-FD event is executed in a BINLOG statement, without previously executing a FD event in a BINLOG statement, it generates an error, because that's unsafe. I took a new error code for that: ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENTS. In order to get a decent error message containing the name of the event, I added the class method char* Log_event::get_type_str(Log_event_type type), which returns a string name for the given Log_event_type. This is just like the existing char* Log_event::get_type_str(), except it is a class method that takes the log event type as parameter. I also added PRE_GA_*_ROWS_LOG_EVENT to Log_event::get_type_str(), so that names of old rows event are properly printed. - When reading an event, I added a check that the event type is known by the current Format_description_log_event. Without this, it may crash on bad input (and I was struck by this several times). - I patched the following test cases, which all contain BINLOG statements for row events which must be preceded by BINLOG statements for FD events: - rpl_bug31076 While I was here, I fixed some small things in log_event.cc: - replaced hard-coded 4 by EVENT_TYPE_OFFSET in 3 places - replaced return by DBUG_VOID_RETURN in one place - The name of the logfile can be '-' to indicate stdin. Before my patch, the code just checked if the first character is '-'; now it does a full strcmp(). Probably, all arguments that begin with a - are already handled somewhere else as flags, but I still think it is better that the code reflects what it is supposed to do, with as little dependencies as possible on other parts of the code. If we one day implement that all command line arguments after -- are files (as most unix tools do), then we need this. I also fixed the following in slave.cc: - next_event() was declared twice, and queue_event was not static but should be static (not used outside the file).
* | Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-archbrian@zim.(none)2007-12-201-1/+0
|\ \ | |/ |/| | | into zim.(none):/home/bk/mysql-5.1-arch
| * client_priv.h:brian@zim.(none)2007-12-201-1/+0
| | | | | | | | | | | | | | Removed dead option mysqlslap.c: Updates from Paul for help. Removed dead option
* | after merge fixgluh@mysql.com/eagle.(none)2007-10-041-3/+2
| |
* | Merge mysql.com:/home/gluh/MySQL/Merge/5.0-optgluh@eagle.(none)2007-10-041-1/+3
|\ \ | |/ |/| | | into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
| * Fixed bug #31077.gshchepa/uchum@gleb.loc2007-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string to the end of output if the --comments switch is on. The only way to suppress this line is to use --skip-comments/--compact switch. New switch has been added to the mysqldump client command line: --dump-date. For the compatibility with previous releases, by default the --dump-date is on. The --dump-date switch forces mysqldump to add date to the "-- Dump completed on ..." string at the end of output. The --skip-dump-date switch supresses the output of date string and uses short form of that commentary: "-- Dump completed". --skip-comments or --compact switches disable the whole commentary as usual.
* | Merge amd64.(none):/src/mysql-5.1-maintiggy@amd64.(none)2007-08-031-1/+1
|\ \ | | | | | | | | | into amd64.(none):/src/mysql-5.1-build_29903
| * | Bug#29903 The CMake build method does not produce the embedded library.iggy@amd64.(none)2007-08-031-1/+1
| | | | | | | | | | | | - Changes to correct and test Windows embedded build.
* | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@nosik.monty.fi2007-08-021-2/+2
|\ \ \ | |/ / |/| | | | | into mysql.com:/home/my/mysql-5.1
| * | Fixes Bug#30127: --debug-info no longer prints memory usage in mysqlmonty@mysql.com/nosik.monty.fi2007-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Fixed compiler warnings, errors and link errors Fixed new bug on Solaris with gethrtime() Added --debug-check option to all mysql clients to print errors and memory leaks Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
* | | Added a test for pre-statement call, and fixed connection/deconnect code so ↵brian@zim.(none)2007-06-151-0/+4
|/ / | | | | | | that the rest of bbench can be ran by others.
* | Move WEXITSTATUS #define from mysqltest.c to client_priv.h, andtsmith@siva.hindu.god2007-04-181-1/+10
| | | | | | | | include client_priv.h in mysqltest.c. Portability fix.
* | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1jani@ua141d10.elisa.omakaista.fi2007-04-101-1/+1
|\ \ | | | | | | | | | into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
| * \ Merge bk-internal.mysql.com:/data0/bk/mysql-5.1jamppa@bk-internal.mysql.com2007-03-291-1/+8
| |\ \ | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.1-marvel
| * \ \ Merge sin.intern.azundris.com:/home/tnurnberg/26817/50-26817tnurnberg@sin.intern.azundris.com2007-03-231-1/+1
| |\ \ \ | | | |/ | | |/| | | | | into sin.intern.azundris.com:/home/tnurnberg/26817/51-26817
| | * | Bug #26817: mysqldump fails to backup database containing view with invalid ↵tnurnberg@sin.intern.azundris.com2007-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | definer give some leeway on required permissions for SHOW FIELDS on views so an unknonwn DEFINER will no longer break mysqldump
* | | | Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1msvensson@pilot.blaudden2007-04-021-1/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
| * | | Bug #26262: Add option to skip binary logging for mysqlchecktsmith@siva.hindu.god2007-03-281-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Add the --skip-write-binlog option, which adds NO_WRITE_TO_BINLOG to REPAIR, ANALYZE, and OPTIMIZE commands. Use this option when these SQL commands should not be sent to replication slaves, nor run when using the binary logs for recovery from backup
* | | Added pre and post option to test run (allows me to adjust an engine once ↵brian@zim.(none)2007-03-261-0/+2
| | | | | | | | | | | | | | | | | | all of the data has been loaded). Kinda obvious that this was going to come up ;)
* | | The pthread() support was not working. Once I fixed use-thread in a previous ↵brian@zim.(none)2007-03-161-1/+0
| | | | | | | | | | | | | | | | | | | | | push I realized that the pthread/windows code was not working. I've replaced the fork/thread design with a pure pthread design using condition timers and broadcast. Ramification, UNIX now uses thread, support for slaves had to be dropped and there is no need for the --use-threads flag. Added --concurrency=0 option so that it will start at 1 and keep going up until something bad happens :)
* | | Correctly report load type.brian@zim.(none)2007-03-151-0/+1
| | | | | | | | | | | | | | | Updated engine to also handle create options Secondary indexes can now be generated (aka the test PeterZ thoughts!)
* | | Cleaned up memory allocation so that in all cases of malloc failure the ↵brian@zim.(none)2007-03-121-0/+3
| | | | | | | | | | | | | | | | | | application ends execution. Default values for auto-generate have been made available for adjusting. Key test for rights now works with either type of keys.
* | | Fixed buffer overflow cases (should not be possible to do...)brian@zim.(none)2007-03-061-0/+2
|/ / | | | | | | Fixed for autoincrement support/GUID
* | Extended mysqlslap.c for auto tests (see the comment on the mysqlslap.c ↵brian@zim.(none)2007-01-291-0/+2
| | | | | | | | file). I also fixed a bug where limit was not being reached.
* | Merge mysql.com:/home/kent/bk/main/mysql-5.0kent@kent-amd64.(none)2006-12-311-1/+1
|\ \ | |/ | | | | into mysql.com:/home/kent/bk/main/mysql-5.1
| * my_strtoll10-x86.s:kent@mysql.com/kent-amd64.(none)2006-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrected spelling in copyright text Makefile.am: Don't update the files from BitKeeper Many files: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Many files: Added GPL copyright text Removed files: Docs/Support/colspec-fix.pl Docs/Support/docbook-fixup.pl Docs/Support/docbook-prefix.pl Docs/Support/docbook-split Docs/Support/make-docbook Docs/Support/make-makefile Docs/Support/test-make-manual Docs/Support/test-make-manual-de Docs/Support/xwf
* | Merge mysql.com:/home/kent/bk/main/mysql-5.0kent@kent-amd64.(none)2006-12-231-2/+1
|\ \ | |/ | | | | into mysql.com:/home/kent/bk/main/mysql-5.1
| * Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| | | | | | | | Changed header to GPL version 2 only
| * Remove compiler warningsmonty@mysql.com/nosik.monty.fi2006-11-201-1/+2
| | | | | | | | | | | | | | (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 #)
* | Added --debug-info to most clients to detect memory leaks in mysql-test-runmonty@mysql.com/nosik.monty.fi2006-11-211-1/+2
| | | | | | | | | | | | | | | | | | Moved .progress files into the log directory Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23 Fixed some compiler warnings Fixed small memory leak in libmysql Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
* | Removed double enum value.jani@a193-229-222-105.elisa-laajakaista.fi2006-05-161-1/+0
| |
* | Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-newjani@a193-229-222-105.elisa-laajakaista.fi2006-05-121-1/+1
|\ \ | | | | | | | | | into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new-merge_060509
| * \ Merge neptunus.(none):/home/msvensson/mysql/tmp/tmp_mergemsvensson@neptunus.(none)2006-05-121-1/+1
| |\ \ | | |/ | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.1
* | | Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0jani@ua141d10.elisa.omakaista.fi2006-05-091-0/+1
|\ \ \ | |/ / |/| / | |/ into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-new
| * Bug#17208 SSL: client does not verify server certificatemsvensson@neptunus.(none)2006-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Add new function 'ssl_verify_server_cert' which is used if we are connecting to the server with SSL. It will compare the hostname in the server's cert against the hostname that we used when connecting to the server. Will reject the connection if hostname does not match. - Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options which will turn on checking of servers cert. - Add new argument "ssl-verify-server-cert" to all mysql* clients which will activate the above option. - Generate a new server cert with 1024 bits that has "localhost" as the server name.
* | Final patch to remove the last of the OS2 support. brian@zim.(none)2006-04-151-2/+0
| |
* | client_priv.h:bar@mysql.com2006-02-171-1/+2
| | | | | | | | Sorry, forgot to push in the previous changeset.
* | Adding thread support for mysqlimport. You can now specify a number of ↵brian@zim.tangent.org2006-02-131-0/+1
| | | | | | | | threads to use and it will thread the loading of the database. Anyone who has had to go through the pain of loading the database will immediatly get the reason for this.
* | Adding a --use-threads options which I believe will allow it to be ported to ↵brian@zim.tangent.org2006-01-111-0/+1
| | | | | | | | windows.
* | Now uses a single pass testing loop. Dual pass made no sense.brian@zim.(none)2006-01-011-3/+2
| | | | | | | | | | | | | | Now does averaging when running iterations. Realligned a bunch of code and continued to remove global variables. Added CSV output along with printable. Structures are now provided for print options so adding XML, HTML, ... should now be trivial.
* | Added option --lock-directory so that you can now syncronize several ↵brian@zim.(none)2005-12-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | mysqlslap processes across several machines. Not perfect yet. Added --slave option if you are trying to syncronize around one server using the lock-directory option plus NFS. Added options to allow you to run several concurrency runs in one call. aka --concurrency="1, 8, 64, 128" Time collection is now done in a finer grain manner, and is linked to the sync call (doesn't count the cost of the blocked processes that are setup to run).
* | New option to run multiple engines through the same test:brian@zim.(none)2005-12-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | --engine="myisam,archive" --number-of-rows has been removed for the time being and replaced with option to allow you to just repeat multiple time all of the inserts you specifed with data. When number-of-rows-returns it will be instead used for averaging rows while growing concurrency. Returned stats now has accurent row and query counts since it includes a multiple for the rows and queries added. Parser is now a touch smarter and understands end of file issues if you have a delimiter at the end of the file.
* | See message in mysqlslap.c, but basically brian@zim.(none)2005-12-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Parsing now works 2) Options are safer, aka it doesn't kill the machine and it cleans up after itself 3) Option of --only-print added so that you can see what it does. 4) Tiny cleanup of the auto generate sql. A lot more needs to be done with this, for it to be very valuable. I suspect it doesn't work all that well. 5) Delimeter is now a single character. No good escaping going on. 6) You can now change which schema it is runninng against. Now I think I can go make use of it! Though I need to add support for a "only run this many inserts, divide by the number of clients connecting, to really test scaling"
* | WL#1012: All changes as one single changeset.lars@mysql.com2005-12-221-1/+1
| | | | | | | | This includes both code and test cases.
* | Merge hholzgraefe@bk-internal.mysql.com:/home/bk/mysql-5.1-newhartmut@mysql.com2005-12-051-1/+1
|\ \ | | | | | | | | | into mysql.com:/home/hartmut/projects/mysql/dev/5.1