Commit graph

515 commits

Author SHA1 Message Date
unknown
3e937ef4e2 Fix for Bug #1595 "mysqlbinlog can't read a password from the console".
** I already fixed it in 3.23; I fix it in 4.0 separately because the
code is a bit different (so the changeset 1.1422 of 3.23 should not be
merged here) **
Make mysqlbinlog prompt for the password if
mysqlbinlog -p
instead of printing the usage().
This makes mysqlbinlog behave like other clients.
This new code was almost copied from mysqldump.
Note that before, one could use
  mysqlbinlog -p pass
and now one must use
  mysqlbinlog -ppass
(putting a space will ask for the password).


client/mysqlbinlog.cc:
  Make mysqlbinlog prompt for the password if
  mysqlbinlog -p
  instead of printing the usage().
  This makes mysqlbinlog behave like other clients.
  This new code was almost copied from mysqldump.
  Note that before, one could use
    mysqlbinlog -p pass
  and now one must use
    mysqlbinlog -ppass
  (putting a space will ask for the password).
2003-10-21 12:22:24 +02:00
unknown
83f5a6a34f Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/slave.cc:
  Auto merged
2003-10-14 00:27:04 +02:00
unknown
26456b8838 Fixed test case that my last patch to mysqlbinlog broke.
Changed --remote to --read-from-remote-server (mysqlbinlog)


client/mysqlbinlog.cc:
  Changed --remote to --read-from-remote-server to make option more understandable
mysql-test/t/mysqlbinlog.test:
  Fixed test case that --remote broke
2003-10-08 10:23:54 +03:00
unknown
9214babea7 Fix for option 'R' (connect to remote server) in mysqlbinlog
client/mysqlbinlog.cc:
  Fix for option 'R' (connect to remote server)
2003-10-08 01:30:10 +03:00
unknown
08bb033b53 merged
mysql-test/r/create.result:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2003-10-07 20:41:07 +02:00
unknown
c7fd510a41 Simple cleanups
client/mysqlbinlog.cc:
  Add default handling to mysqlbinlog
mysql-test/mysql-test-run.sh:
  Cleanup of mysqldump/mysqlbinlog argument handling
scripts/Makefile.am:
  Remove duplicate
scripts/mysql_install_db.sh:
  Change -eq to =
2003-10-07 15:44:31 +03:00
unknown
63aebfe5ec Fix for the bug #1336 mysql.cc assumes DATABASE() doesn't return NULL 2003-10-06 15:47:17 +05:00
unknown
08504cfe27 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


scripts/mysql_config.sh:
  Auto merged
sql/mysqld.cc:
  Auto merged
2003-10-06 09:24:12 +02:00
unknown
55dc3dcb82 Added resetting of replace_result patterns after --exec command in mysqltest (in order to be consistent with ordinary query execution).
client/mysqltest.c:
  Now resetting replace_result patterns after --exec command (in order to be consistent with ordinary query execution).
mysql-test/t/mysqlbinlog.test:
  Added additional replaces potentially needed after adding reset of replace conditions for exec
2003-09-29 23:10:30 +04:00
unknown
e03265d4d5 Removed random chars after filename for LOAD DATA INFILE (in mysqlbinlog)
Add quoting for use `database` for mysqlbinlog
Removed test ins0000001
Add support for --replace for exec in mysqltest
Don't refer to install dir in mysqlbinlog.result


BitKeeper/deleted/.del-ins000001.result~f45c599efdf8352b:
  Delete: mysql-test/r/ins000001.result
BitKeeper/deleted/.del-ins000001.test~2428ee5c9b1bc483:
  Delete: mysql-test/t/ins000001.test
client/mysqlbinlog.cc:
  Removed random chars after filename for LOAD DATA INFILE
client/mysqltest.c:
  Add support for --replace for 'exec'
mysql-test/r/drop_temp_table.result:
  Updated results after quoting change
mysql-test/r/fulltext_multi.result:
  Updated results after quoting change
mysql-test/r/fulltext_order_by.result:
  Updated results after quoting change
mysql-test/r/insert.result:
  New tests
mysql-test/r/insert_select.result:
  Updated results after quoting change
mysql-test/r/mix_innodb_myisam_binlog.result:
  Updated results after quoting change
mysql-test/r/mysqlbinlog.result:
  Updated results after quoting change
mysql-test/r/rpl_log.result:
  Updated results after quoting change
mysql-test/t/fulltext_multi.test:
  Remove 'use'
mysql-test/t/fulltext_order_by.test:
  Remove 'use'
mysql-test/t/insert.test:
  Merge test with ins0000001.test
mysql-test/t/mysqlbinlog.test:
  Don't refer to install dir in result
sql/log_event.cc:
  Add quoting for use `database` for mysqlbinlog
support-files/mysql.server.sh:
  Move pid_file test after arguments have been parsed
2003-09-29 12:31:35 +03:00
unknown
907e055583 enum options renamed to avoid possible name conflicts 2003-09-29 11:21:17 +02:00
unknown
9e2b97fb25 #1169: Add --exec command to mysqltest 2003-09-24 16:13:47 +05:00
unknown
792aa09ee1 Code cleanup of new patches
mysys/mf_dirname.c:
  Added comments
2003-09-23 17:06:44 +03:00
unknown
992587f411 Bugfix for bug #1340, style fix before push
client/mysqlbinlog.cc:
  Small fix to avoid double initialization
2003-09-19 20:34:58 +04:00
unknown
f89e03fd78 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg-1340


client/mysqlbinlog.cc:
  Auto merged
2003-09-19 20:34:57 +04:00
unknown
eac3b0682a Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1073/mysql-4.0


client/mysqlbinlog.cc:
  Auto merged
2003-09-19 12:34:56 -04:00
unknown
2a036dfa14 Fix for bug #1340 (More careful checks if we met proper Create_file_log_event before Append or Exec event we are processing now)
client/mysqlbinlog.cc:
  More accurate checks if Create_file_log_event is absent for this Append or Exec event...
2003-09-19 16:43:56 +04:00
unknown
493726836c Fixed Bug#1291, client displays wrong prompt when in the middle of
backticks.
2003-09-17 21:41:36 +03:00
unknown
22ad721b1f Fix for BUG#1258 (Trying to use the mysqlbinlog with -h and -u option gives segmentation
fault). Fix is just initializing "host" (and "user") with 0, not a string.


client/mysqlbinlog.cc:
  command-line arguments should be initialized like in mysqldump.cc to not cause
  segfault.
2003-09-12 15:48:48 +02:00
unknown
d8f676f543 Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1184/mysql-4.0
2003-09-08 12:47:40 -04:00
unknown
82afcf7eb0 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1184/mysql-4.0
2003-09-08 12:46:16 -04:00
unknown
0c5145ccd9 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1056/mysql-4.0


client/mysqldump.c:
  Auto merged
2003-09-08 12:15:17 -04:00
unknown
7b107a966a fixed Bug #1184 (change type of opt_ignore_lines to longlong) 2003-09-06 18:59:04 -04:00
unknown
5193315f9d added space after first '--' in the long '----....' comment line in mysqldump
just to make it compatible with the manual
(fixed bug #1056)


client/mysqldump.c:
  added space after first '--' in the long '----....' comment line
  just to make it compatible with the manual
  (fixed bug #1056)
2003-09-06 15:06:08 -04:00
unknown
04ff15001d after merge fixes 2003-09-05 08:16:13 +03:00
unknown
0af8b9805b Merge with 3.23 2003-09-05 06:56:28 +03:00
unknown
15cb9caea6 Better quoting patch for mysqldump
client/mysqldump.c:
  Better quoting patch
2003-09-03 18:48:10 +03:00
unknown
f888ceb1f0 proper obligatory quoting of identifiers in mysqldump<->server communication (unrelated from command-line options) 2003-09-02 18:30:34 +02:00
unknown
cbdde26555 fixed bug #1073
(Replication LOAD DATA INFILE mysqlbinlog doesn't cleanup tmp files)
2003-09-01 11:15:53 -04:00
unknown
6fd5403d31 Portability fixes
client/mysqltest.c:
  Removed not used functions
myisam/mi_dynrec.c:
  Added assert to avoid compilation errors
mysql-test/r/isam.result:
  Updated results after merge
sql/log_event.cc:
  Cleanup
sql/mysql_priv.h:
  Cleanup
sql/sql_class.cc:
  Moved Table_ident functions to .cc file to allow them to use table_case_convert()
sql/sql_class.h:
  Moved Table_ident functions to .cc file to allow them to use table_case_convert()
2003-08-28 22:18:02 +03:00
unknown
b43a551e83 Add column names for metadata when running mysql with -T
Change metadata info so that that MIN() and code MAX() reports that they can return NULL. Bug #324


client/mysql.cc:
  Add column names for metadata when running with -T
mysql-test/r/show_check.result:
  test case for bug fix
mysql-test/t/show_check.test:
  test case for bug fix
sql/item_sum.cc:
  Change metadata info so that that MIN() and code MAX() reports that they can return NULL. Bug #324
sql/sql_load.cc:
  Removed not needed line
2003-08-27 10:26:03 +03:00
unknown
59806e1004 vio ssl structure renames (to get rid of ending _)
Added TCP/IP read/write timeout for windows
Check on windows if second server is started with same TCP/IP port


BitKeeper/deleted/.del-have_openssl_2.inc~8c9f1a45676b698f:
  Delete: mysql-test/include/have_openssl_2.inc
BitKeeper/deleted/.del-have_openssl_2.require~53bbdfc136fb514:
  Delete: mysql-test/r/have_openssl_2.require
BitKeeper/deleted/.del-openssl_2.test~f2dfa927f19d14f8:
  Delete: mysql-test/t/openssl_2.test
BitKeeper/etc/ignore:
  added libmysql/vio_priv.h libmysql_r/vio_priv.h
client/mysql.cc:
  vio ssl structure renames
include/violite.h:
  Cleanup violite.h interface (move things to vio_priv.h)
libmysql/Makefile.am:
  Use vio_priv.h
libmysql/Makefile.shared:
  Use vio_priv.h
libmysqld/lib_vio.c:
  Added timeout for windows
mysys/my_getopt.c:
  Indentaion cleanup
sql/item_cmpfunc.cc:
  Remove compiler warnings
sql/item_func.cc:
  Remove compiler warnings
sql/mini_client.cc:
  vio ssl structure renames
sql/mysqld.cc:
  Check on windows if second server is started with same TCP/IP port
sql/net_serv.cc:
  Add read/write timeouts for windows
sql/sql_acl.cc:
  vio ssl structure renames
sql/sql_show.cc:
  vio ssl structure renames
vio/vio.c:
  Added timeouts for windows
vio/viosocket.c:
  Added timeouts for windows
vio/viossl.c:
  Added timeouts for windows
  Cleaned up structure element names
vio/viosslfactories.c:
  Added timeouts for windows
  Cleaned up structure element names
2003-08-27 02:51:39 +03:00
unknown
e3563c7911 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-08-22 15:42:22 +02:00
unknown
fdfb10f2fb 2 minor edits, plus
fix for BUG#1113 "INSERT into non-trans table SELECT ; ROLLBACK" does not send warning"
and
fix for BUG#873 "In transaction, INSERT to non-trans table is written too early to binlog".
Now we don't always write the non-trans update immediately to the binlog;
if there is something in the binlog cache we write it to the binlog cache
(because the non-trans update could depend on a trans table which was modified
earlier in the transaction); then in case of ROLLBACK, we write the binlog
cache to the binlog, wrapped with BEGIN/ROLLBACK.
This guarantees that the slave does the same updates.
For ROLLBACK TO SAVEPOINT: when we execute a SAVEPOINT command we write it
to the binlog cache. At ROLLBACK TO SAVEPOINT, if some non-trans table was updated,
we write ROLLBACK TO SAVEPOINT to the binlog cache; when the transaction
terminates (COMMIT/ROLLBACK), the binlog cache will be flushed to the binlog
(because of the non-trans update) so we'll have SAVEPOINT and ROLLBACK TO
SAVEPOINT in the binlog.

Apart from this rare case of updates of mixed table types in transaction, the
usual way is still clear the binlog cache at ROLLBACK, or chop it at
ROLLBACK TO SAVEPOINT (meaning the SAVEPOINT command is also chopped, which
is fine).
Note that BUG#873 encompasses subbugs 1) and 2) of BUG#333 "3 binlogging bugs when doing INSERT with mixed InnoDB/MyISAM".


client/mysqldump.c:
  Minor edit: one CHANGE MASTER with 2 arguments instead of 2 CHANGE MASTER with one argument each.
mysql-test/r/rpl_loaddata.result:
  result update
mysql-test/t/rpl_loaddata.test:
  minor edit: simplifying the test.
sql/handler.cc:
  Fix for BUG#873. See comments in code, and the description of the changeset.
sql/log.cc:
  * Previously, if a query updated a non-transactional table we wrote it immediately
  to the real binlog. This causes a bug when the update is done inside a transaction
  and uses the content of an updated transactional table (because this makes
  a wrong order of queries in the binlog). So if the binlog cache is not empty,
  we write the query to the binlog cache; otherwise we can write it to the binlog.
  * Previously, when we flushed the binlog cache to the binlog, we wrapped it
  with BEGIN/COMMIT. Now it's also possible to wrap it with BEGIN/ROLLBACK, to handle
  transactions which update both transactional and non-transactional tables.
sql/log_event.cc:
  The slave thread can leave a transaction if COMMIT or if ROLLBACK.
sql/sql_class.h:
  prototype
sql/sql_insert.cc:
  Fix for BUG#1113:
  this was because the INSERT SELECT code did not set OPTION_STATUS_NO_TRANS_UPDATE.
sql/sql_parse.cc:
  Don't send ER_WARNING_NOT_COMPLETE_ROLLBACK if this is the SQL slave thread (see comments).
2003-08-22 15:39:24 +02:00
unknown
e3ceec7136 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0


client/mysqltest.c:
  Auto merged
sql/sql_load.cc:
  Auto merged
2003-08-22 04:08:16 +03:00
unknown
64393d7e24 Move test that uses many tables (in query_cache.test) to separate test so that we can get it 'skipped' instead of 'failed' on system where we can't open many files.
client/mysqltest.c:
  Fix that LET can be used with queries that return multiple columns
libmysql/errmsg.c:
  Extend socket name to 100 characters in error messages
libmysql/libmysql.c:
  Reset some variables to make ensure that we can call mysql_server_init()/mysql_server_end() many times
mysql-test/mysql-test-run.sh:
  Set open-files-limit to 1024
mysql-test/r/loaddata.result:
  Add test case for LOAD DATA bug report (was not a bug)
mysql-test/r/query_cache.result:
  Move test with many tables to separate test
mysql-test/r/select_safe.result:
  Make test repeatable
mysql-test/t/loaddata.test:
  Add test case for LOAD DATA bug report (was not a bug)
mysql-test/t/query_cache.test:
  Move test with many tables to separate test
mysql-test/t/select_safe.test:
  Make test repeatable
sql/field.cc:
  Portability fix for gcc 3.3
sql/mysqld.cc:
  Store in open_files_limit the true number of files we can open (if system supports it)
sql/sql_load.cc:
  Safety fix
2003-08-22 04:07:40 +03:00
unknown
2d2db894d4 comment added 2003-08-20 12:27:06 +02:00
unknown
fe0e546434 Fix for BUG#1096 which is:
"mysqlbinlog does not comment the original LOAD DATA INFILE if it has a "use xx""


client/mysqlbinlog.cc:
  a comment
sql/log_event.cc:
  in mysqlbinlog we want to have a leading '#' before LOAD DATA INFILE when we
  print a Create_file event.
  This was not done properly when the query had *2* lines: only the "use db" got
  commented.
  To fix this I had to add an argument to Load_log_event::print, it could not be
  handled in Create_file_log_event::print alone.
sql/log_event.h:
  prototype
2003-08-19 15:46:47 +02:00
unknown
4392456bea Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-08-19 15:22:36 +02:00
unknown
c7578701e3 Fixes for BUG#1091,1092,1093. Synopsis of these bugs:
mysqlbinlog segfaults if --position is just before Exec_load event
mysqlbinlog prints uncommented warnings if --database and compiled with debug
mysqlbinlog --database does not filter LOAD DATA INFILE


client/mysqlbinlog.cc:
  * Don't stop in Append_block when there is no Create_file. Just print a warning.
  * Test LOAD DATA (Create_file) against --database.
  * Don't print "no skip" when you don't skip an event when using --database (it
  causes syntax errors in 'mysql').
  * Print a warning in Exec_load if there is no Create_file.
2003-08-19 15:12:44 +02:00
unknown
5ef233aa39 Fixed a limitation bug in mysqlimport. sql_statement was designed to
contain max 1280 characters, but sometimes in rare cases when --columns
was used, more than 1280 characters was needed. This is case when a lot
of columns was specified using this option. Raised the max value to 8448,
which should be enough.
2003-08-16 17:03:48 +03:00
unknown
1793513891 fixed bug Bug #683 (Prompt for password doesn't go to console for Windows) 2003-07-16 18:15:35 -04:00
unknown
cdb44cd455 fixed bug #670 2003-07-04 16:06:17 -04:00
unknown
2d5d754c8c Status query on killed mysql connection results in segmentation fault (Bug #738)
Added MAX_PASSWORD_LENGTH. This increased master-slave passwords to 32 bytes (Bug #766)
Fixed server crash on purge master logs or show master logs when binlog is off. (Bug #733)


client/mysql.cc:
  status query on killed mysql connection results in segmentation fault (Bug #738)
configure.in:
  Portability fix for Unixware
include/my_global.h:
  Removed wrong patch from previous changeset
sql/mysql_priv.h:
  Added MAX_PASSWORD_LENGTH. This increased master-slave passwords to 32 bytes
sql/slave.h:
  Optimized structure
sql/sql_repl.cc:
  Memory overrun safety fixes (not critical)
  Fixed server crash on purge master logs or show master logs when binlog is off. (Bug #733)
sql/sql_repl.h:
  Fixed to use right define
strings/strmake.c:
  Fixed comment
2003-07-04 03:18:15 +03:00
unknown
a9df65e595 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0


mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-07-03 11:56:30 +03:00
unknown
2373397e13 Cleaner implementation if INSERT ... SELECT with same tables
Tests cleanup (put drop database first in tests)


client/mysql.cc:
  Cleanup of code in last pull
include/config-win.h:
  Remove HAVE_CHSIZE on windows as it's not 64 bit clean
include/my_global.h:
  Portability fix
mysql-test/r/drop.result:
  Clean up results
mysql-test/r/flush.result:
  Clean up results
mysql-test/r/grant_cache.result:
  Clean up results
mysql-test/r/innodb.result:
  Clean up results
mysql-test/r/insert_select.result:
  Clean up results
mysql-test/r/merge.result:
  Clean up results
mysql-test/r/query_cache.result:
  Clean up results
mysql-test/t/drop.test:
  Clean up tests
mysql-test/t/flush.test:
  Clean up tests
mysql-test/t/grant_cache.test:
  Clean up tests
mysql-test/t/innodb.test:
  Clean up tests
mysql-test/t/insert_select.test:
  Added more tests
mysql-test/t/merge.test:
  Test of bug 515
mysql-test/t/query_cache.test:
  Clean up tests
mysql-test/t/symlink.test:
  Clean up tests
sql/mysql_priv.h:
  Cleaner implementation if INSERT ... SELECT with same tables
sql/sql_lex.h:
  Cleaner implementation if INSERT ... SELECT with same tables
sql/sql_list.h:
  Indentation cleanup
sql/sql_parse.cc:
  Cleaner implementation if INSERT ... SELECT with same tables
sql/sql_yacc.yy:
  Cleaner implementation if INSERT ... SELECT with same tables
2003-07-03 11:55:36 +03:00
unknown
8c113acf96 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_672/mysql-4.0


client/mysqlbinlog.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2003-07-02 17:37:23 -04:00
unknown
71373afb5c fixed bug #672
client/mysqlbinlog.cc:
  changed format of eof-packet for protocol 4.1
2003-07-02 16:56:27 -04:00
unknown
65d7980556 merge changes
mysql-test/r/insert_select.result:
  Auto merged
mysql-test/t/insert_select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
2003-07-02 00:26:23 +03:00
unknown
f3381e7383 made error output more detailed 2003-07-01 14:00:57 -04:00