Commit graph

2951 commits

Author SHA1 Message Date
unknown
e5b3d521f5 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0


sql/log_event.cc:
  Auto merged
2003-08-25 17:20:51 +03:00
unknown
3fdc38d4bb comments about mutexes in replication.
Don't start the SQL slave thread with SQL_BIG_SELECTS;
it's better to inhibate max_join_size instead.


sql/slave.cc:
  OPTION_BIG_SELECTS does more than ignoring max_join_size (talks to the optimiser),
  just ignore max_join_size.
sql/slave.h:
  comments
2003-08-25 16:20:21 +02:00
unknown
413b57e14c Better fix for myisamchk --sort-index on windows
Fixed deadlock bug when doing resize of key buffer while key buffer was in active use


myisam/mi_locking.c:
  Better fix for myisamchk --sort-index on windows
mysql-test/r/symlink.result:
  Update results
mysql-test/t/symlink.test:
  Update results
mysys/mf_keycache.c:
  Fixed deadlock bug when doing resize of key buffer while key buffer was in active use
sql/ha_myisam.cc:
  simple optimization
sql/sql_show.cc:
  Fixed theoretical buffer overrun
  Reset variable properly before calling update_create_info()
2003-08-25 17:19:44 +03:00
unknown
c47ee56915 Clearer states in SHOW PROCESSLIST for replication threads.
For example the Binlog_dump thread (on the master) sometimes showed "Slave:".
And there were confusing messages where "binlog" was employed instead
of "relay log".


sql/log.cc:
  MYSQL_LOG::wait_for_update() is used by the binlog_dump and I/Oslave threads,
  and it updates thd->proc_info, so we need a bool to not show the same
  proc_info for 2 different things (previously we showed "Slave: etc" and that's
  bad for a binlog_dump thread).
sql/slave.cc:
  Clearer thd-proc_info for slave threads.
sql/sql_class.h:
  prototype change
sql/sql_repl.cc:
  clearer thd->proc_info for binlog_dump thread
2003-08-25 14:13:58 +02:00
unknown
e8007ae77b Update of VC++ project files (to remove link warnings)
Fix unlock error in myisamchk on windows when doing --sort-index
Use SetFilePointer instead of SetFilePointerEx


VC++Files/client/mysql.dsp:
  Update of project files
VC++Files/client/mysqladmin.dsp:
  Update of project files
VC++Files/client/mysqlclient.dsp:
  Update of project files
VC++Files/client/mysqldump.dsp:
  Update of project files
VC++Files/client/mysqlimport.dsp:
  Update of project files
VC++Files/client/mysqlshow.dsp:
  Update of project files
VC++Files/comp_err/comp_err.dsp:
  Update of project files
VC++Files/innobase/innobase.dsp:
  Update of project files
VC++Files/isamchk/isamchk.dsp:
  Update of project files
VC++Files/libmysql/libmysql.dsp:
  Update of project files
VC++Files/libmysqld/libmysqld.dsp:
  Update of project files
VC++Files/libmysqltest/myTest.dsp:
  Update of project files
VC++Files/my_print_defaults/my_print_defaults.dsp:
  Update of project files
VC++Files/myisamlog/myisamlog.dsp:
  Update of project files
VC++Files/mysql.dsw:
  Update of project files
VC++Files/mysqlbinlog/mysqlbinlog.dsp:
  Update of project files
VC++Files/mysqlcheck/mysqlcheck.dsp:
  Update of project files
VC++Files/mysqldemb/mysqldemb.dsp:
  Update of project files
VC++Files/mysqlmanager/MySqlManager.dsp:
  Update of project files
VC++Files/mysqlserver/mysqlserver.dsp:
  Update of project files
VC++Files/mysqlshutdown/mysqlshutdown.dsp:
  Update of project files
VC++Files/mysys/mysys.dsp:
  Update of project files
VC++Files/pack_isam/pack_isam.dsp:
  Update of project files
VC++Files/perror/perror.dsp:
  Update of project files
VC++Files/replace/replace.dsp:
  Update of project files
VC++Files/sql/mysqld.dsp:
  Update of project files
VC++Files/test1/test1.dsp:
  Update of project files
VC++Files/thr_test/thr_test.dsp:
  Update of project files
VC++Files/vio/vio.dsp:
  Update of project files
VC++Files/zlib/zlib.dsp:
  Update of project files
myisam/mi_check.c:
  Fix unlock error in myisamchk on windows when doing --sort-index
myisam/mi_locking.c:
  Fix unlock error in myisamchk on windows when doing --sort-index
myisam/myisamchk.c:
  New comment
mysys/my_chsize.c:
  Use SetFilePointer instead of SetFilePointerEx, as the first is more portable
sql/handler.cc:
  Fix compiler warning
sql/log_event.cc:
  Fix compiler warning
2003-08-25 14:27:32 +03:00
unknown
89e95d0c26 The slave threads MUST not care about max_join_size, we start them with
OPTION_BIG_SELECTS.


sql/slave.cc:
  The slave threads MUST not care about max_join_size.
  I can imagine the case of a slave where users can connect and do SELECTs, but
  DBA does not want them to issue crazy SELECTs, but he/she still wants replication
  to work.
  Before, this just printed a warning to the error log (not fatal) but that
  was still annoying.
2003-08-23 17:41:43 +02:00
unknown
9438655af9 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-08-23 16:54:22 +02:00
unknown
6e10224d71 * Fix for a potential bug:
when the SQL thread stops, set rli->inside_transaction to 0. This is needed if the user
later restarts replication from a completely different place where there are only autocommit
statements.
* Detect the case where the master died while flushing the binlog cache to the binlog
and stop with error. Cannot add a testcase for this in 4.0 (I tested it manually)
as the slave always runs with --skip-innodb.


sql/log_event.cc:
  Detect the case where the master died while flushing the binlog cache to the binlog:
  in that case, we have a BEGIN with no COMMIT/ROLLBACK in the relay log; we detect
  this with rli->inside_transaction in Rotate_log_event::exec_event() (which is the
  only right place to detect this, see comments). When we see it, we stop with error.
  In 4.1, I had put code in Start_log_event::exec_event(); I'll remove it next time
  I push in the 4.1 tree.
sql/slave.cc:
  * Use slave_print_error instead of sql_print_error, to put the info in SHOW SLAVE STATUS too.
  * Fix for a potential bug:
  when the SQL thread stops, set rli->inside_transaction to 0. This is not needed if
  replication later restarts from the same position; but this is needed if the user
  restarts replication from a completely different place where there are only autocommit
  statements (in that case, if we didn't set to 0, the position would never increment in SHOW
  SLAVE STATUS, even if queries are processed well).
2003-08-23 16:53:04 +02:00
unknown
2ad17fa6e0 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0


sql/mysql_priv.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2003-08-23 12:26:08 +03:00
unknown
af9b771a32 show symlinked directories in SHOW CREATE TABLE 2003-08-23 12:25:39 +03:00
unknown
2d2f576545 After merge fixes
mysql-test/r/func_test.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/t/func_test.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-08-22 18:43:46 +03:00
unknown
11fbbe44ac grant.result, grant.test, sql_acl.cc:
Fix for a bug #878


sql/sql_acl.cc:
  Fix for a bug #878
mysql-test/t/grant.test:
  Fix for a bug #878
mysql-test/r/grant.result:
  Fix for a bug #878
2003-08-22 18:32:11 +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
ec4d0edf85 merged
extra/resolveip.c:
  Auto merged
sql/item.cc:
  Auto merged
2003-08-21 21:39:22 +02:00
unknown
b8de463ea1 Bug #1064: SHOW CREATE TABLE: avoid allocations for simple tables, old client compatibility
sql/item.h:
  fixups
sql/sql_show.cc:
  avoid allocations for simple tables
  old client compatibility
2003-08-21 21:14:02 +02:00
unknown
87b1e4cec6 fix for SHOW CREATE TABLE to report corerct second field's length 2003-08-21 20:21:07 +02:00
unknown
943233632e Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-08-21 10:45:43 +02:00
unknown
c7f517b53f sorted 2003-08-21 10:44:17 +02:00
unknown
fd9b177564 Yesterday I removed process_io_create_file; I shouldn't have.
Let's say the lack of comments did not help me ;)
Copying it back again and adding comments; now 3.23->4.0
replication of LOAD DATA INFILE works again.


sql/slave.cc:
  Enabling again process_io_create_file
2003-08-21 10:24:37 +02:00
unknown
d52145da3d Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0


sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/slave.cc:
  Auto merged
2003-08-20 23:25:58 +02:00
unknown
1542fffb34 First commit for fixing BUG#1100
"LOAD DATA INFILE is badly filtered by binlog-*-db rules".
There will probably be a second final one to merge Dmitri's changes
to rpl_log.result and mine.
2 new tests:
rpl_loaddata_rule_m : test of logging of LOAD DATA INFILE when the master has binlog-*-db rules,
rpl_loaddata_rule_s : test of logging of LOAD DATA INFILE when the slave has binlog-*-db rules and --log-slave-updates.


mysql-test/r/rpl_loaddata.result:
  Test that logging of LOAD DATA INFILE is done on the slave
mysql-test/t/rpl_loaddata.test:
  Test that logging of LOAD DATA is done on the slave
sql/log.cc:
  debug info
sql/log_event.cc:
  * Append_block, Exec_load and Delete_file now have a member 'db' like Create_file.
  This member is filled by mysql_load(). It is used for filtering by binlog-*-db rules,
  that's all. It's not written to the binlog, and so can't be read from the binlog.
  In other words, that's temporary info which is stored in the event and lost when
  it is written and deleted.
  * Better error messages in Append_block et al. events.
  * The slave now logs (log-slave-updates) the Create_file et al. events in mysql_load()
  (they are not directly copied from the events in the relay log, because this
  prevented filtering by binlog-*-db rules). Before, mysql_load() in the slave
  did no logging, now it does the logging, as in any regular thread.
sql/log_event.h:
  New member 'db' for Append_block et al. events.
sql/slave.cc:
  Removed useless code. Why was it useless:
  - CREATE_FILE_EVENT is not defined in 3.23. It appeared in 4.0.
  - in queue_old_event(), which is called only if the master is 3.23, we had a
  case CREATE_FILE_EVENT:
  so this case can be removed.
  - this case was the only caller of process_io_create_file() so this function
  can be removed.
sql/sql_load.cc:
  Pass the db to events, so that they can be well filtered.
sql/sql_repl.cc:
  Pass the db to events so that they can be well filtered.
2003-08-20 23:24:45 +02:00
unknown
c1e6d2d1bf sql_union.cc:
Merge fix


sql/sql_union.cc:
  Merge fix
2003-08-20 20:16:37 +03:00
unknown
924a9708c9 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg-1086
2003-08-20 17:25:45 +04:00
unknown
de5d47c35d Fixed some varnings from valgrind
Set min value of max_allowed_packet to 1024
Fixed problem with UNION's without braces and SQL_CALC_FOUND_ROWS, LIMIT #,#
and ORDER BY...LIMIT


include/m_string.h:
  Added memcpy_overlap() to avoid warnings when using valgrind on memcpy(A,A,...)
myisam/mi_create.c:
  Fixed comment
myisam/mi_search.c:
  Fix warning from valgrind
myisam/mi_write.c:
  Indentation fix
mysql-test/mysql-test-run.sh:
  Add options handled by general skip- option
mysql-test/r/packet.result:
  Update results after change to mysqld (min max_allowed_packet length is now 1024)
mysql-test/r/union.result:
  Added testing of UNION with SQL_CALC_FOUND_ROWS
mysql-test/t/packet.test:
  Update results after change to mysqld (min max_allowed_packet length is now 1024)
mysql-test/t/union.test:
  Added testing of UNION with SQL_CALC_FOUND_ROWS
sql/field.cc:
  Fix to remove waarning from valgrind
sql/ha_innodb.cc:
  Remove wrong include file
sql/item_cmpfunc.cc:
  Safety fix to handle EOM conditions in IN
sql/item_sum.cc:
  Fixed prototype for update_field() (argument was alwys 0)
sql/item_sum.h:
  Fixed prototype for update_field() (argument was alwys 0)
sql/item_uniq.h:
  Fixed prototype for update_field() (argument was alwys 0)
sql/log.cc:
  Indentation fix
sql/mysqld.cc:
  Set min value of max_allowed_packet to 1024 (to avoid it getting set to 0)
sql/net_serv.cc:
  Indentation changes + trivial optimization
sql/sql_select.cc:
  Fixed prototype for update_field() (argument was alwys 0)
sql/sql_union.cc:
  Fixed problem with UNION's without braces and
  - SQL_CALC_FOUND_ROWS
  - LIMIT #,#
  - ORDER BY ... LIMIT
2003-08-20 16:25:44 +03:00
unknown
db2b279f70 sql_union.cc:
Fix for SQL_CALC_FOUND_ROWS in UNION's


sql/sql_union.cc:
  Fix for SQL_CALC_FOUND_ROWS in UNION's
2003-08-20 16:14:01 +03:00
unknown
22ad5163e9 item_func.h:
Fix for a bug with LEAST() in WHERE clause
ha_innodb.cc:
  Fix for a configure bug
multi_update.result, multi_update.test:
  Fix for the update with NULL's in the result set
sql_update.cc:
  Fix for the update with NULL's in the result set
   Fix for the update with NULL's in the result set
   Fix for the update with NULL's in the result set


sql/sql_update.cc:
  Fix for the update with NULL's in the result set
   Fix for the update with NULL's in the result set
   Fix for the update with NULL's in the result set
mysql-test/t/multi_update.test:
  Fix for the update with NULL's in the result set
mysql-test/r/multi_update.result:
  Fix for the update with NULL's in the result set
sql/ha_innodb.cc:
  Fix for a configure bug
sql/item_func.h:
  Fix for a bug with LEAST() in WHERE clause
2003-08-20 15:33:21 +03:00
unknown
e3541b8a97 Fix for BUG#1086. Now we don't preserve event's log_pos through
log-slave-updates since this causes unexpected values in 
Exec_master_log_pos in A->B->C replication setup, synchronization
 problems in master_pos_wait()... 
Still this brokes some functionality in sql/repl_failsafe.cc 
(but this file is not used now)


mysql-test/r/rpl_log.result:
  SHOW BINLOG EVENTS for binlog on slave should give the same 
  Orig_log_pos and Pos values
sql/log_event.cc:
  Do not propagate our master's log pos to our bin log
sql/repl_failsafe.cc:
  Added comment about broken SHOW NEW MASTER
sql/slave.cc:
  Do not propagate our master's log pos to our bin log
sql/sql_class.cc:
  THD::log_pos is no longer needed
sql/sql_class.h:
  THD::log_pos is no longer needed
sql/sql_parse.cc:
  Added comment about broken SHOW NEW MASTER
2003-08-20 03:38:31 +04:00
unknown
d43a347db1 Use my_b_append instead of my_b_write on a SEQ_READ_APPEND cache, when we write
the first 4 bytes of the relay log. Indeed comments in mysys/mf_iocache.c 
say we must always use my_b_append for such a cache.
This *could* avoid a very rare assertion failure which is: 
030524 19:32:38  Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '/
users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000001' position: 4
030524 19:32:38  next log '/users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000002' is currently active
mysqld: mf_iocache.c:701: _my_b_seq_read: Assertion `pos_in_file == info->end_of_file' failed.
and which seemed to happen always when the SQL thread and/or the I/O thread
were at position 4 in a relay log.


include/my_sys.h:
  moving a function from log_event.cc so that it can be widely used
mysys/mf_iocache.c:
  moving a function from log_event.cc so that it can be widely used
sql/log.cc:
  my_b_write should not be used on a SEQ_READ_APPEND cache, one should use my_b_append
  (otherwise there could be some locking problems).
sql/log_event.cc:
  moved to mysys/mf_iocache.c for wider use.
  A typo.
2003-08-19 17:00:36 +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
01441bc590 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.0
into laptop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
2003-08-18 01:56:31 +03:00
unknown
79e3476071 fixed typo in last push 2003-08-17 14:37:26 +03:00
unknown
ff012aedab Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0


sql/sql_parse.cc:
  Auto merged
2003-08-17 14:10:45 +03:00
unknown
0eaf4d8d7e Fix mutex handling in SHOW_VARIABLES (key_buffer_size was not properly protected)
Changed some non fatal myisamchk error messages to warnings


myisam/myisamchk.c:
  Change error -> warning
sql/handler.cc:
  Add mutex around keybuff_size usage
sql/mysql_priv.h:
  Indentation update
sql/set_var.cc:
  Add mutex around longlong variable usage
sql/sql_parse.cc:
  Fix mutex handling in SHOW_VARIABLES
sql/sql_show.cc:
  Fix mutex handling in SHOW_VARIABLES
2003-08-17 14:10:15 +03:00
unknown
ccd828900b Cleanups to recent patches
Fix packet error when using wrong GRANT command


include/config-win.h:
  Changed back to test for HAVE_SETFILEPOINTER instead of operating system
mysql-test/r/grant.result:
  Extra test to catch wrong packet bug
mysql-test/t/grant.test:
  Extra test to catch wrong packet bug
mysys/my_chsize.c:
  Cleanup
sql/opt_range.cc:
  Fix to recent BETWEEN patch
sql/sql_acl.cc:
  Fix packet error when using wrong GRANT command
sql/sql_select.cc:
  Cleanups
  Added not critical out-of-memory check
2003-08-15 09:54:19 +03:00
unknown
902111963e Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.0
into laptop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
2003-08-15 00:17:43 +03:00
unknown
5c9e0cdc53 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0


sql/sql_select.cc:
  Auto merged
2003-08-13 13:26:52 +03:00
unknown
1301a6c42d Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-08-12 15:30:47 +02:00
unknown
8e6ff087df snprintf compatibility fix 2003-08-12 15:28:36 +02:00
unknown
20901edafb Remove wrong bug fix when calling create_sort_index.
Fix possible replication bug with LOAD DATA ... IGNORE LINES #


mysql-test/r/rpl_log.result:
  Test of load data ... ignore # lines
mysql-test/t/rpl_log.test:
  Test of load data ... ignore # lines
sql/log_event.cc:
  Fix replication bug with LOAD DATA ... IGNORE LINES #
  (Note that the code that is probably not executed in 4.0)
sql/sql_parse.cc:
  Indentation fix
sql/sql_select.cc:
  Remove wrong bug fix (all tests passes)
sql/sql_yacc.yy:
  Indentation cleanup
2003-08-10 05:14:16 +03:00
unknown
541486f318 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-merged_qc-4.0
2003-08-09 14:16:13 +03:00
unknown
8d81696753 BETWEEN bug fix: non-const expressions on both ends 2003-08-09 01:20:02 +02:00
unknown
05f5df0c36 rewritten test using loop (BUG#930)
removed unused field (now it is in variables)


mysql-test/r/query_cache.result:
  rewritten test using loop
mysql-test/t/query_cache.test:
  rewritten test using loop
sql/sql_class.h:
  removed unused field (now it is in variables)
2003-08-08 23:27:22 +03:00
unknown
a71ef9e643 between range optimization bug (between with const on one end only) 2003-08-08 19:13:27 +02:00
unknown
6db21de014 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0


sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2003-08-07 20:18:51 +03:00
unknown
fa1613be0a Review of changesets since last pull.
(Mostly code cleanups)


include/my_sys.h:
  Removed not used define
myisam/mi_check.c:
  Indentation change
mysql-test/t/rpl_insert_id.test:
  Add test if server supports innodb
mysys/mf_format.c:
  Remove QUOTE handling from fn_format()
  (fn_format() should not have anything to do with quoting things)
sql/log_event.cc:
  Removed some unnecessary casts (by changing functions to use const char *)
  Cleaned up some error messages to make them shorter and (hopefully) more readable.
  Fixed wrong format strings
  Restored 'thd->options' on error.
sql/mini_client.cc:
  Changed order of include files to remove compilation warning
sql/mysqld.cc:
  Add proper quoting of service arguments (don't use fn_format)
sql/slave.cc:
  Simple optimization and cleanup.
  Changed rewrite_db() and print_slave_db_safe() to use const char* to avoid casting of arguments when calling functions.
  Cleanup of some error messages.
sql/slave.h:
  Changed protypes to use const char *
sql/sql_acl.cc:
  Simple optimization
vio/viosslfactories.c:
  Changed order of include files to remove compilation warning
2003-08-07 20:16:37 +03:00
unknown
5d17247128 merged
Docs/Makefile.am:
  Auto merged
acinclude.m4:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2003-08-07 14:39:34 +02:00
unknown
0a47309300 Merge bk-internal:/home/bk/mysql-3.23/
into serg.mylan:/usr/home/serg/Abk/mysql
2003-08-07 14:33:56 +02:00
unknown
2b29fc9271 PRIMARY KEY can erroneously have HA_NULL_PART_KEY flag that breaks correct key sorting 2003-08-07 13:39:53 +02:00
unknown
61f953e88a fixed password buffer overflow 2003-08-07 11:16:34 +02:00
unknown
e50930d36c Bug #792 combination of date-interval and between with mixed constant and non-constant 2003-08-06 15:37:22 +02:00
unknown
79e560162b Fix an erronous cast for GCC introduced for to fix VC++ compiler error
sql/sql_select.cc:
  Fix the GCC compiler error introduced for the cast for VC++
2003-08-05 22:57:44 -03:00
unknown
8edc3dedf9 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-08-05 16:30:22 +02:00
unknown
0f314c9da3 make it clear for optimizer that XOR's are not optimizable at the moment (BUG#992) 2003-08-05 16:29:09 +02:00
unknown
89dad4c9b4 Fix VC++ compiler error 2003-08-04 09:44:26 -03:00
unknown
d8df84aa43 2 bugfixes:
- Bug #985: "Between RESET SLAVE and START SLAVE, SHOW SLAVE STATUS is wrong."
Now RESET SLAVE puts correct info in mi->host etc. A new test rpl_reset_slave
for that.
- Bug #986: "CHANGE MASTER & START SLAVE do not reset error columns in SHOW
SLAVE STATUS". Now these reset the errors.


mysql-test/r/rpl_loaddata.result:
  result update.
mysql-test/t/rpl_loaddata.test:
  Test that RESET SLAVE, START SLAVE and CHANGE MASTER all reset 
  Last_slave_error and Last_slave_errno (columns of SHOW SLAVE STATUS).
  We do it in this test because that's one of tests which have 
  an intentional query error on the slave.
sql/slave.cc:
  As we need TWICE the code to copy command-line options (--master-host etc)
  to mi (we already had it in init_master_info, but we also need it in RESET
  SLAVE to fix bug#985), I make a function of this code.
  And a function to reset Last_slave_error and Last_slave_errno (we need
  it in CHANGE MASTER, RESET SLAVE, and at the start of the SQL thread).
sql/slave.h:
  declarations for new functions.
sql/sql_repl.cc:
  copy --master-host etc to mi in RESET SLAVE, so that SHOW SLAVE STATUS
  shows correct information.
2003-08-04 10:59:44 +02:00
unknown
e2a4c4a5d2 Cleaned up code comment 2003-08-03 16:33:04 +03:00
unknown
3b013646e1 Fix so that SET PASSWORD is not replicated by the slave if running with
replicate-*-table rules which exclude 'mysql' tables
(e.g. replicate-wild-ignore-table=mysql.%).
This was already the behaviour for GRANT/REVOKE, I'm extending it to
SET PASSWORD because it seems very logical (the contrary seems illogical).
2 new tests:
- one to test if GRANT and SET PASSWORD are replicated
- one to test if they are not replicated if replicate-wild-ignore-table=mysql.%
The 2nd is also a testcase for BUG#980.


sql/sql_acl.cc:
  Fix so that SET PASSWORD is not replicated by the slave if running with
  replicate-*-table rules which exclude 'mysql' tables
  (e.g. replicate-wild-ignore-table=mysql.%).
  This was already the behaviour for GRANT/REVOKE, I'm extending it to
  SET PASSWORD because it seems very logical (the contrary seems illogical).
2003-08-02 23:46:26 +02:00
unknown
b1c56d68e9 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0


sql/sql_acl.cc:
  Auto merged
2003-08-02 16:11:39 +02:00
unknown
5a696ebd16 Mark tables 'updating' in sql_acl.cc (mysql_grant(), mysql_table_grant()) so that
tables_ok() does not ignore them. This fixes random bug #980.


sql/sql_acl.cc:
  Mark tables 'updating' so that tables_ok() does not ignore them;
  this fixes random bug #980.
2003-08-02 16:10:26 +02:00
unknown
2c3f656879 Backporting the changeset below from 4.0, because a customer hits
the bug with 3.23.
ChangeSet@1.1416.113.1, 2003-03-22 15:22:59+01:00, guilhem@mysql.com
  Fix for #178  Replicating INSERT VALUES(USER()) crashes (SEGV) the slave
      Now it does not SEGV, but USER() is still badly replicated
      (it is replicated to ""), which is a lower priority bug.


sql/item_strfunc.cc:
  Don't segfault in USER() if thd->user == 0 (system thread).
2003-08-01 22:29:38 +02:00
unknown
9645695108 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-08-01 14:58:57 +02:00
unknown
2d413d3c6f Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-merged_qc-4.0
2003-07-30 16:52:56 +03:00
unknown
9b9a914c5d support of more then 255 tables dependence in query cache (fixed BUG#930)
mysql-test/r/query_cache.result:
  test of many merged tales
mysql-test/t/query_cache.test:
  test of many merged tales
sql/sql_cache.h:
  query with merged tables can depend of more then 255 tables
2003-07-30 14:59:56 +03:00
unknown
880088ba50 Fix security bug. mysqld server without ssl support was completly
ignorant about ssl_type attribute


sql/sql_acl.cc:
  Now acl_getroot() honors ssl_type attribute even if we compile without openssl
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2003-07-30 03:33:48 +04:00
unknown
17a6d749d4 mysqld.cc:
innodb_fast_shutdown CAN take an argument though it was not specified so in mysqld.cc


sql/mysqld.cc:
  innodb_fast_shutdown CAN take an argument though it was not specified so in mysqld.cc
2003-07-29 00:04:56 +03:00
unknown
46f96a30b0 Avoid segfault when LOAD DATA FROM MASTER is run on a master which does no
binary logging.


sql/repl_failsafe.cc:
  If the master is running without --log-bin, SHOW MASTER STATUS will return
  "empty set", i.e. row==0; we must test this before invoking row[0], or
  segfault.
2003-07-28 15:33:46 +02:00
unknown
2763b52d0a outer join, impossible on condition, where, and usable key for range
bug#926
2003-07-25 14:32:03 +02:00
unknown
6ccd8cfa69 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-07-24 22:30:20 +02:00
unknown
14d9a2e5e7 Fix for BUG#858 "CHANGE MASTER forgets to update relay-log.info";
just a flush_relay_log_info() at the end of CHANGE MASTER
(there was already flush_master_info()).


sql/sql_repl.cc:
  Comments.
  Flush relay-log.info after CHANGE MASTER, or the changes
  to the relay log parameters (relay log name and position, and
  the corresponding master's binlog name and position) will be
  lost if the slave mysqld is shutdown immediately after the 
  CHANGE MASTER (without the slave threads being started).
2003-07-24 22:29:09 +02:00
unknown
ab34adf66a WL#1036 (print the db in slave error messages).
I extended the task to cleaning error messages, making them look nicer,
and making the output of SHOW SLAVE STATUS (column Last_error) be as complete
as what's printed on the .err file;
previously we would have, for a failure of a replicated LOAD DATA INFILE:
- in the .err, 2 lines:
"duplicate entry 2708 for key 1"
"failed loading SQL_LOAD-5-2-2.info"
- and in SHOW SLAVE STATUS, only:
"failed loading SQL_LOAD-5-2-2.info".
Now SHOW SLAVE STATUS will contain the concatenation of the 2 messages.


sql/log_event.cc:
  Print the default database when replication stops because of an error. Previously, we had:
  "error "Duplicate entry 87987 for key 1", query 'insert into t values(87987)'", ie the db
  was not mentioned, making it hard for cases where the same table name is used in
  several databases.
  Lengthened some error messages (for failing replication of LOAD DATA: mention the table
  and the db).
  Changes so that SHOW SLAVE STATUS reports as complete errors as the .err file.
sql/slave.cc:
  Removed a useless declaration (the rewrite_db() function is already declared in slave.h).
  Added missing ')' in error messages.
  Tried to make error messages look nicer (previously we had
  "do START SLAVE;, error_code=1062"
  now we'll have
  "do START SLAVE; . Error_code=1062".
  This form has been discussed, I agree it's no panacea, but it's still more readable
  like this. To be improved in the future :)
sql/slave.h:
  declarations.
2003-07-24 22:25:36 +02:00
unknown
c67f50f37e Fix for service issue with paths having spaces (bug #687) 2003-07-23 21:57:44 -04:00
unknown
aa0d0d20d9 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
2003-07-23 17:37:51 +03:00
unknown
d289accb0a Fuller implementation of lower case table names.
Bug record #828
2003-07-23 17:36:56 +03:00
unknown
30ee158d2f Bug #473 - GRANT ... TO ''@... was requiring FLUSH PRIVILEGES to work 2003-07-21 13:46:57 +02:00
unknown
5aef292a07 Fix for #712 with Serg's suggestions
myisam/mi_locking.c:
  Here we use F_EXTRA_LCK
myisam/myisamchk.c:
  lines of "locking - emulation" replaced with mi_lock_database call
myisam/myisamdef.h:
  no need for MI_TEMPORARY_TABLE
sql/ha_myisam.cc:
  We use F_WRLCK instead MI_TEMPORARY_TABLE
2003-07-19 18:17:29 +05:00
unknown
0fd6f4049d Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0
2003-07-19 13:51:15 +05:00
unknown
b3021da20a Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0


sql/item_cmpfunc.cc:
  Auto merged
2003-07-18 14:14:20 +03:00
unknown
995fe9f13a Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-07-18 04:38:05 +03:00
unknown
06517dfed3 Fixed memory overrun when doing REPAIR on table with multi-part auto_increment key where one part was a packed CHAR
myisam/mi_check.c:
  Fixed memory overrun in _mi_put_key_in_record
myisam/mi_key.c:
  Fixed unnecessary memory allocation
mysql-test/r/insert_select.result:
  Added test case for memory corruption
mysql-test/t/insert_select.test:
  Added test case for memory corruption
mysys/safemalloc.c:
  Removed compiler warnings
sql/sql_acl.cc:
  Fixed core dump when running with --debug
2003-07-18 04:04:24 +03:00
unknown
47d9c95f9c Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/handler.cc:
  Auto merged
2003-07-15 20:44:29 +02:00
unknown
b40895f9d2 bug #702 - ALTER TABLE tm UNION=(t1,t2) doesn't work if t1.MYD is compressed
myisammrg/myrg_open.c:
  never mark merge table as readonly even if all underlying myisam tables are readonly,
  otherwise ALTER TABLE merge UNION=(t1,t2,t3,...) will not work
sql/handler.cc:
  map EACCES to ER_OPEN_AS_READONLY.
  can only happen on modifying merge table that has (some) read-only myisam tables
2003-07-15 20:43:57 +02:00
unknown
6159cd27bf Portability fixes
acinclude.m4:
  Made test for compress more reliable (for Solaris)
sql/item_strfunc.cc:
  Portability fix (for Linux Alpha)
2003-07-15 13:10:20 +03:00
unknown
c36c37c339 merge
mysql-test/r/rpl_max_relay_size.result:
  Auto merged
2003-07-14 23:52:17 +03:00
unknown
e97b2766e1 Fixed wrong test in LOG::close
Fixed test for binary build


mysql-test/r/rpl_max_relay_size.result:
  Fixed test for binary build
mysql-test/t/rpl_max_relay_size.test:
  Fixed test for binary build
sql/log.cc:
  Fixed wrong test in close
2003-07-14 23:49:19 +03:00
unknown
aa70f48264 errmsg.txt:
Correct a misleading error message about max row length


sql/share/english/errmsg.txt:
  Correct a misleading error message about max row length
2003-07-14 16:04:20 +03:00
unknown
66672ad185 ha_innodb.h:
Revert the previous patch: MySQL would not allow creation of VARCHAR columns whose total max length is > 8000 bytes, though InnoDB can easily store them as trailing spaces are removed


sql/ha_innodb.h:
  Revert the previous patch: MySQL would not allow creation of VARCHAR columns whose total max length is > 8000 bytes, though InnoDB can easily store them as trailing spaces are removed
2003-07-14 15:53:50 +03:00
unknown
666d4717cb ha_innodb.h:
Fix wrong error message: If one tried to create table with a very big row len, MySQL claimed the max len is 64 kB for InnoDB, while it normally is 8000 bytes


sql/ha_innodb.h:
  Fix wrong error message: If one tried to create table with a very big row len, MySQL claimed the max len is 64 kB for InnoDB, while it normally is 8000 bytes
2003-07-14 15:38:20 +03:00
unknown
128feded87 Better fix for bug #791: At binlog rotation, INSERTs may not find their way into the binlog
mysql-test/t/rpl_flush_log_loop.test:
  Add timer to avoid problem when 'flush logs' is executed before we have read all data from master
sql/log.cc:
  Better fix for bug #791:
  Mark log as LOG_TO_BE_OPENED instead of LOG_CLOSED when it's closed and opened.
sql/mysqld.cc:
  Better startup message
sql/slave.cc:
  Fix argument to close()
sql/sql_class.h:
  Better handling of log.close()
2003-07-14 14:59:26 +03:00
unknown
02808985dd Proposed bugfix for #712
Monty revoked any locks for temporary tables in
ha_myisam::external_lock()
But further code bans using write cache on nonlocked tables
this makes operations much slower


myisam/mi_locking.c:
  Handling of MI_TEMPORARY_TABLE lock
myisam/myisamdef.h:
  defining of MI_TEMPORARY_TABLE
sql/ha_myisam.cc:
  now we lock temporary tables using MI_TEMPORARY_TABLE lock
2003-07-14 12:40:58 +05:00
unknown
c4daa71614 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.r18.ru:/usr/home/ram/work/4.0
2003-07-14 12:40:13 +05:00
unknown
e45b9ab481 backport fix for the bug #803: INTERVAL(NULL, ....) 2003-07-14 12:39:10 +05:00
unknown
3611f70a25 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
2003-07-14 10:18:04 +03:00
unknown
e1a3069603 Safety and speedup fixes:
Changed is_open() to work as before.
Added back inited argument to LOG


mysql-test/r/rpl_flush_log_loop.result:
  Fixed results (probably bug in previous rpatch)
sql/handler.cc:
  Changed is_open() to work as before
sql/item_func.cc:
  Changed is_open() to work as before
sql/log.cc:
  Part revert of previous patch.
  The reason for adding back 'inited' is that is that we can't be 100 % sure that init_pthread_objects() is called before mysqld dies (for example on windows)
  I removed mutex lock handling in is_open() as the new code didn't have ANY affect except beeing slower.
  Added back checking of is_open() to some functions as we don't want to do a mutex lock when we are not using logging.
  Indentation/comment fixes
sql/log_event.cc:
  Changed is_open() to work as before
sql/repl_failsafe.cc:
  Changed is_open() to work as before
sql/sql_base.cc:
  Changed is_open() to work as before
sql/sql_class.h:
  Changed is_open() to work as before. Added back 'inited' variable
sql/sql_db.cc:
  Changed is_open() to work as before
sql/sql_delete.cc:
  Changed is_open() to work as before
sql/sql_insert.cc:
  Changed is_open() to work as before
sql/sql_load.cc:
  Changed is_open() to work as before
sql/sql_parse.cc:
  Changed is_open() to work as before
sql/sql_rename.cc:
  Changed is_open() to work as before
sql/sql_repl.cc:
  Changed is_open() to work as before
sql/sql_table.cc:
  Changed is_open() to work as before
sql/sql_update.cc:
  Changed is_open() to work as before
2003-07-14 10:12:05 +03:00
unknown
c4381bb0c6 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.r18.ru:/usr/home/ram/work/4.0
2003-07-14 11:23:36 +05:00
unknown
9480ec8289 Cleaning after removing LOG_INFO_PURGE_NO_ROTATE.
sql/sql_repl.cc:
  In my previous change I removed 'no_rotate' from MYSQL_LOG, so this made
  LOG_INFO_PURGE_NO_ROTATE useless (an error code which was never returned),
  so I remove it of the 'switch'.
2003-07-12 16:04:42 +02:00
unknown
5526d454fd Member no_rotate in MYSQL_LOG was always 0, I delete it.
sql/log.cc:
  Member no_rotate of MYSQL_LOG is useless; this shows it for sure:
  [guilhem@gbichot2 mysql-4.0]$ bk -r grep no_rotate
  sql/log.cc      1.83       no_rotate(0), need_start_event(1)
  sql/log.cc      1.75      if (no_rotate)
  sql/log.cc      1.89      if (!no_rotate)
  sql/sql_class.h 1.119     bool no_rotate;
  i.e. no_rotate is 0 all the time. So we don't need it.
  Biggest part of the patch is indentation change.
sql/sql_class.h:
  suppress no_rotate
2003-07-12 15:48:26 +02:00
unknown
543208de96 removed 2 small useless if().
sql/log.cc:
  a comment for the future.
sql/mysqld.cc:
  if (p) is not needed: fn_ext() always returns a valid pointed; the way
  to test if an extension was found is if (*p), not if (p).
  But here even if there's no extension, we still want to truncate opt_name
  to FN_REFLEN, so we always execute the code.
  By design, the test was always 'false' (because we strip the extension before
  testing if there's an extension) so log->set_no_rotate never executed.
sql/sql_class.h:
  remove set_no_rotate as we don't need it.
2003-07-12 15:06:40 +02:00
unknown
d974959b4f Fix for BUG#791:
a safer way of initing the mutexes in MYSQL_LOG.
is_open() is now always thread-safe.
See each file for details.


sql/handler.cc:
  is_open() with locks
sql/item_func.cc:
  is_open() with locks
sql/log.cc:
  No more 'inited'.
  We now always use is_open() in a thread-safe manner.
  This simplifies some functions (no more need to test is_open() twice).
sql/log_event.cc:
  is_open() with locks
sql/mysqld.cc:
  Init mutexes for the global MYSQL_LOG objects.
  We care about no_rotate, because we can't do it in open() anymore (because
  we don't have 'inited' anymore).
sql/repl_failsafe.cc:
  is_open() with locks
sql/slave.cc:
  init pthread objects (mutexes, conds) in the constructor of st_relay_log_info.
  Some better locking in rotate_relay_log().
sql/sql_base.cc:
  is_open() with locks
sql/sql_class.h:
  Before, we inited LOCK_log in MYSQL_LOG::open(), so in other places of the code
  when we were never 100% sure that it had been inited. For example, if the server
  was running without --log-bin, ::open() was not called so the mutex was not
  inited. We could detect it with !inited, but not safely as 'inited' was not
  protected by any mutex.
  So now:
  we *always* init the LOCK_log mutex, even if the log is not used. We can't init
  the mutex in MYSQL_LOG's constructor, because for global objects like
  mysql_bin_log, mysql_log etc, the constructor is called before MY_INIT(), but
  safe_mutex depends on MY_INIT(). So we have a new function MYSQL_LOG::init_pthread_objects
  which we call in main(), after MY_INIT().
  For the relay log, we call this function in the constructor of
  st_relay_log_info, which is called before any function tries to
  use the relay log (the relay log is always invoked as rli.relay_log).
  So now we should be safe in all cases and we don't need 'inited'.
sql/sql_db.cc:
  is_open() with locks
sql/sql_delete.cc:
  is_open() with locks
sql/sql_insert.cc:
  is_open() with locks
sql/sql_load.cc:
  is_open() with locks
sql/sql_parse.cc:
  is_open() with locks
sql/sql_rename.cc:
  is_open() with locks
sql/sql_repl.cc:
  is_open() with locks
sql/sql_table.cc:
  is_open() with locks
sql/sql_update.cc:
  is_open() with locks
2003-07-11 14:26:44 +02:00
unknown
1a45c83972 Fix for the bug #801: create table t1 select x'41'; doesn't work 2003-07-11 14:17:18 +05:00
unknown
830e53c8b1 Fix for the bug #803.
Now INTERVAL(NULL, N1, N2, ...) returns NULL.
2003-07-10 15:27:02 +05:00
unknown
9e386beadb Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0
2003-07-09 15:53:54 +03:00
unknown
cae6ffdcee Fix for a bug #807 2003-07-09 15:52:51 +03:00
unknown
3c268e59ec Cleanups
mysql-test/t/distinct.test:
  Cleanup
sql/log.cc:
  Cleanup
sql/slave.cc:
  Cleanup
sql/sql_delete.cc:
  Cleanup
sql/sql_parse.cc:
  Simple optimization
2003-07-09 00:55:07 +03:00
unknown
5e817c5313 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0


sql/mysqld.cc:
  Auto merged
2003-07-09 00:00:16 +03:00
unknown
e13e857cae Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup


myisam/mi_extra.c:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
mysql-test/r/alter_table.result:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
mysql-test/t/alter_table.test:
  Test DISABLE/ENABLE KEY
sql/ha_myisam.cc:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
sql/mysqld.cc:
  Removed double my_thread_end() which caused fatal error on windows if mysqld died on startup
sql/sql_table.cc:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
sql/table.cc:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
sql/table.h:
  Fixed bug in ALTER TABLE ... DISABLE/ENABLE KEYS
2003-07-08 23:58:04 +03:00
unknown
f0f7eccc23 ha_innodb.cc:
Prevent the user from creating InnoDB tables with > 1000 columns


sql/ha_innodb.cc:
  Prevent the user from creating InnoDB tables with > 1000 columns
2003-07-08 20:51:45 +03:00
unknown
eed62d993d Fix for
BUG#797 "If query ignored on slave (replicate-ignore-table) the slave still checks if
the returned error (0) is the same as the one on the master, whereas it shouldn't
test this.
Plus a new test for BUG#797.


include/mysqld_error.h:
  New error code (can be sent only to the slave thread, not to normal clients).
sql/log.cc:
  removed comment from a previous debugging.
sql/log_event.cc:
  ER_SLAVE_IGNORED_TABLE is an ignorable error.
sql/share/czech/errmsg.txt:
  for BUG#797
sql/share/danish/errmsg.txt:
  for BUG#797
sql/share/dutch/errmsg.txt:
  for BUG#797
sql/share/english/errmsg.txt:
  for BUG#797
sql/share/estonian/errmsg.txt:
  for BUG#797
sql/share/french/errmsg.txt:
  for BUG#797
sql/share/german/errmsg.txt:
  for BUG#797
sql/share/greek/errmsg.txt:
  for BUG#797
sql/share/hungarian/errmsg.txt:
  for BUG#797
sql/share/italian/errmsg.txt:
  for BUG#797
sql/share/japanese/errmsg.txt:
  for BUG#797
sql/share/korean/errmsg.txt:
  for BUG#797
sql/share/norwegian-ny/errmsg.txt:
  for BUG#797
sql/share/norwegian/errmsg.txt:
  for BUG#797
sql/share/polish/errmsg.txt:
  for BUG#797
sql/share/portuguese/errmsg.txt:
  for BUG#797
sql/share/romanian/errmsg.txt:
  for BUG#797
sql/share/russian/errmsg.txt:
  for BUG#797
sql/share/slovak/errmsg.txt:
  for BUG#797
sql/share/spanish/errmsg.txt:
  for BUG#797
sql/share/swedish/errmsg.txt:
  for BUG#797
sql/share/ukrainian/errmsg.txt:
  for BUG#797
sql/sql_parse.cc:
  when in sql_parse in the slave thread we ignore the query because of replicate-do
  and replicate-ignore options, we return a specific error to the slave thread,
  so that it knows that the query has been ignored (which is different from a
  successful query).
  A small cleanup (test was done twice).
2003-07-08 15:50:57 +02:00
unknown
d0486f8abc typos fixed 2003-07-07 19:35:11 +02:00
unknown
c0d60e83a7 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-07 19:08:17 +02:00
unknown
a4c3f0d727 finally proper recursive descent for parsing expressions with MATCH ... AGAINST in add_ft_keys() 2003-07-07 19:02:58 +02:00
unknown
7ff9378a34 correct (finally) condition for MATCH >0, >=0 etc in add_ft_keys (SW#1647)
still no rec. descent
2003-07-07 16:45:19 +02:00
unknown
e639c5fec7 sql_delete.cc:
Fix bug: if a DELETE failed in a FOREIGN KEY error and it had already deleted some rows, then MySQL did not roll back the failed SQL statement, and also wrote it to the binlog


sql/sql_delete.cc:
  Fix bug: if a DELETE failed in a FOREIGN KEY error and it had already deleted some rows, then MySQL did not roll back the failed SQL statement, and also wrote it to the binlog
2003-07-07 16:39:53 +03:00
unknown
964c2fe083 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0


sql/mysql_priv.h:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2003-07-06 18:01:39 +02:00
unknown
27601fc5ee WL#912 (more user control on relay logs):
FLUSH LOGS now rotates relay logs,
and a new variable max_relay_log_size.
Plus a very small bit of code cleaning.


libmysqld/lib_sql.cc:
  open_log has no default arguments anymore.
mysql-test/r/rpl_flush_log_loop.result:
  result update now that FLUSH LOGS rotates relay logs.
mysql-test/r/rpl_log.result:
  result update now that FLUSH LOGS rotates relay logs.
mysql-test/r/rpl_rotate_logs.result:
  result update now that max_binlog_size is 4096.
mysql-test/t/rpl_rotate_logs-master.opt:
  now max_binlog_size must be a multiple of 4096 (see change in mysqld.cc)
sql/log.cc:
  Got rid of default arguments of various MYSQL_LOG methods (the default arguments
  made code reading uneasy).
  Set max_size in ::init().
  New function set_max_size() to set max_size of a MYSQL_LOG on-the-fly.
  More DBUG info.
sql/mysql_priv.h:
  no defaults in open_log().
  New variables max_relay_log_size.
sql/mysqld.cc:
  New variable and option max_relay_log_size.
  max_binlog_size and max_relay_log_size are multiples of IO_SIZE.
  No more default arguments for log functions.
sql/set_var.cc:
  New variable max_relay_log_size.
  If it is 0, then max_binlog_size will apply to relay logs.
  When one of these variables is changed, fix_max_%log_size is called
  to update max_size of the binary and/or relay logs.
sql/slave.cc:
  New function rotate_relay_log().
sql/slave.h:
  New function rotate_relay_log().
sql/sql_class.h:
  New member max_size of MYSQL_LOG (for automatic rotation).
  New method set_max_size() for setting on-the-fly.
sql/sql_parse.cc:
  Flush the relay log in FLUSH LOGS.
2003-07-06 17:59:54 +02:00
unknown
57043e331c Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/work/mysql-4.0


sql/sql_parse.cc:
  Auto merged
2003-07-04 23:06:22 +03:00
unknown
778fec0c82 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-07-04 23:06:20 +03:00
unknown
40feb0c617 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-04 22:06:19 +02:00
unknown
4e61b75d8b Remove compiler warnings
Simple cleanup of previous pull


sql/item_strfunc.cc:
  Removed compiler warning
sql/sql_cache.cc:
  Indentation fix
sql/sql_handler.cc:
  Simple ptimization
sql/sql_parse.cc:
  Removed compiler warning
sql/log_event.h:
  Indentation fix
2003-07-04 23:06:19 +03:00
unknown
4e4ab26f53 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.r18.ru:/usr/home/ram/work/4.0
2003-07-05 01:06:18 +05:00
unknown
cdb44cd455 fixed bug #670 2003-07-04 16:06:17 -04:00
unknown
2848b0bed9 merge + order by (bug #515) temporary fix
properly fixed in 4.1
2003-07-04 14:42:57 +02:00
unknown
30341167c5 fix and test case for the bug #787: HANDLER without INDEX doesn't work with deleted rows
mysql-test/r/handler.result:
  test case for the bug #787: HANDLER without INDEX doesn't work with deleted rows
mysql-test/t/handler.test:
  test case for the bug #787: HANDLER without INDEX doesn't work with deleted rows
sql/sql_handler.cc:
  fix for the bug #787: HANDLER without INDEX doesn't work with deleted rows
2003-07-04 17:15:16 +05:00
unknown
b22a797631 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/sql_handler.cc:
  Auto merged
2003-07-04 12:55:46 +02:00
unknown
4b50f4f252 handler should be used with constant expressions only (or rand) 2003-07-04 12:55:25 +02:00
unknown
62be5b0f61 Fixed memory/lock leak from bug fix 2003-07-04 11:06:58 +03:00
unknown
fd29a5bc19 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-07-04 03:40:11 +03: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
3ee7174fc1 Fix for bug #676
A security leak with SHOW TABLES/ TABLE STATUS FROM db ...
2003-07-03 23:41:07 +03:00
unknown
a29adff6b8 ha_innodb.cc:
Since the mysql interactive client or some other phase in communication cuts > 64 kB strings to very short, restrict the output of SHOW INNODB STATUS to at most 60 kB


sql/ha_innodb.cc:
  Since the mysql interactive client or some other phase in communication cuts > 64 kB strings to very short, restrict the output of SHOW INNODB STATUS to at most 60 kB
2003-07-03 22:48:13 +03:00
unknown
5dc1e4b98a Many files:
Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
os0sync.h, os0sync.c:
  Fix a bug in os_event on Unix: even though we signaled the event, some threads could continue waiting if the event became nonsignaled quickly again; this made group commit less efficient than it should be


innobase/os/os0sync.c:
  Fix a bug in os_event on Unix: even though we signaled the event, some threads could continue waiting if the event became nonsignaled quickly again; this made group commit less efficient than it should be
innobase/include/os0sync.h:
  Fix a bug in os_event on Unix: even though we signaled the event, some threads could continue waiting if the event became nonsignaled quickly again; this made group commit less efficient than it should be
innobase/log/log0log.c:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
innobase/include/log0log.h:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
innobase/srv/srv0srv.c:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
innobase/row/row0mysql.c:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
innobase/trx/trx0trx.c:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
sql/ha_innodb.cc:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
innobase/btr/btr0btr.c:
  Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
2003-07-03 21:25:55 +03:00
unknown
db5283b306 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0.739
2003-07-03 23:25:54 +05:00
unknown
33c416f67e Fix for #739
check for negative count in RPAD added


mysql-test/r/func_str.result:
  Appropriate result
mysql-test/t/func_str.test:
  testcase added
sql/item_strfunc.cc:
  we return NULL if count < 0
2003-07-03 23:24:23 +05:00
unknown
1f0d470463 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-07-03 21:04:34 +03:00
unknown
25cd10cb87 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-07-03 19:23:29 +03:00
unknown
abe124e76b Fix for UNIXWARE 7
Remove unaligned warnings on Ia64 from client library when using --host
Fix for replication when using many file descriptors 


include/my_global.h:
  Fix for UNIXWARE 7
libmysql/libmysql.c:
  Portability fix (removes unaligned warnings on Ia64)
mysql-test/r/symlink.result:
  Updated results
sql/mini_client.cc:
  Ported connect timeout code from libmysql.c
2003-07-03 19:23:06 +03:00
unknown
8d7eb4a0e5 Proposed fix for #751
Fields in key_expr (mysql_ha_read) wasn't linked to tables.
Hmm. How did it work at all?


mysql-test/r/alias.result:
  It's better to delete table after the test
mysql-test/r/handler.result:
  appropriate result
mysql-test/t/alias.test:
  it's better to drop table after test
mysql-test/t/handler.test:
  test case for #751
sql/sql_handler.cc:
  fix_fields called
2003-07-03 20:57:51 +05:00
unknown
dc0fb6ea48 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0
2003-07-03 19:02:11 +05:00
unknown
6805157498 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0.717
2003-07-03 16:54:05 +05:00
unknown
c9dab0787c Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0.628


sql/item_strfunc.cc:
  Auto merged
2003-07-03 16:50:17 +05: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
d433fe5580 Proposed bugfix for #717
Current table is placed into read_tables set of the current join_tab->select
so get_mm_parts function thinks that current table's record is read and
tries to calculate WHERE condition with the fields of the record.
Result of these calculations is unpredictable.
Looks funny - outcome of the SELECT depends on the queries executed before.

Anyway i think we should have testcase on this part of the code.


mysql-test/r/sel000001.result:
  appropriate result added
mysql-test/t/sel000001.test:
  testcase added
sql/sql_select.cc:
  I think we should count current table out of read_tables set
2003-07-03 10:42:13 +05:00
unknown
e22a31f173 I committed the same changeset in my tree yesterday, but broke the tree since,
so I commit again in a fresh tree.
Fix for bug#763 (Relay_log_space too big by 4 bytes),
plus comments and DBUG_PRINT, and we don't start replication
if --bootstrap.


mysql-test/r/rpl_log.result:
  Result update
mysql-test/r/rpl_log_pos.result:
  Result update
sql/mysqld.cc:
  Don't start replication if in bootstrap mode (bootstrap isn't supposed to have
  several threads).
sql/slave.cc:
  Fix for bug 763 (Relay_log_space too big by 4 bytes).
  A DBUG_PRINT.
sql/sql_acl.cc:
  Replaced a return by DBUG_RETURN (happened to find this reading a debug log).
sql/sql_repl.cc:
  A comment.
2003-07-03 01:08:36 +02:00
unknown
c0eb448582 Added missing (char*) casts in bzero calls.
(Needed for platforms with the traditional bzero prototype.)
Fixes BUG#460.
2003-07-03 01:08:34 +02:00
unknown
cb151c2ab7 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-03 01:08:32 +02:00
unknown
34b4da78bc add comment for BUG 672 2003-07-02 19:08:31 -04:00
unknown
4872adb663 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2003-07-02 23:37:24 +02:00