Commit graph

29025 commits

Author SHA1 Message Date
unknown
2c371ec79f Merge mysql.com:/usr/local/mysql/mysql-5.0-fixtest
into  mysql.com:/usr/local/mysql/mysql-5.0
2006-02-20 09:37:26 +01:00
unknown
8aac108d91 Remove hard-coded ../var/.. path in test mix_innodb_myisam_binlog,
fails with --vardir option.
2006-02-20 09:34:02 +01:00
unknown
f37ebdb209 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/subselect.result:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-02-19 17:26:06 -08:00
unknown
34d8c57208 In previous push, a DROP TABLE at the end of test was missing.
mysql-test/r/mix_innodb_myisam_binlog.result:
  result update
mysql-test/t/mix_innodb_myisam_binlog.test:
  cleanup in the end
2006-02-18 21:08:41 +01:00
unknown
8dc567dbed Fix for BUG#13897 "failure to do SET SQL_MODE=N where N is a number > 31" (the original bug's title isn't the simplest
symptom). sys_var::check_set() was wrong. mysqlbinlog makes use of such SET SQL_MODE=N
(where N is interpreted like if SQL_MODE was a field of type SET), so
this bug affected recovery from binlogs if the server was running with certain SQL_MODE values,
for example the default values on Windows (STRICT_TRANS_TABLES); to work around this bug people
had to edit mysqlbinlog's output.


mysql-test/r/sql_mode.result:
  result update
mysql-test/t/sql_mode.test:
  test for various numeric SQL_MODE values
sql/set_var.cc:
  For a set, it does not make sense to test if the supplied argument exceeds the number of elements in the set
  (such test would make sense for an enum), but rather to check if it exceeds 2^this (to verify
  that only reasonable bits are set).
2006-02-18 17:32:15 +01:00
unknown
8470ae9cb1 Fix for BUG#14769 "Function fails to replicate if fails half-way (slave stops)":
if the function, invoked in a non-binlogged caller (e.g. SELECT, DO), failed half-way on the master,
slave would stop and complain that error code between him and master mismatch. 
To solve this, when a stored function is invoked in a non-binlogged caller (e.g. SELECT, DO), we binlog the function
call as SELECT instead of as DO (see revision comment of sp_head.cc for more).
And: minor wording change in the help text.
This cset will cause conflicts in 5.1, I'll merge.


mysql-test/r/rpl_sp.result:
  result update
mysql-test/t/rpl_sp-slave.opt:
  bug just fixed so option not needed
mysql-test/t/rpl_sp.test:
  test for more half-failed functions with DO and SELECT, to test the bug of this changeset.
  cleanup at the end.
sql/mysqld.cc:
  function -> stored function (change suggested by Paul)
sql/sp_head.cc:
  When a function updates data and is called from a non-binlogged statement (SELECT, DO), we binlog it 
  as SELECT myfunc(), and not DO myfunc() like before.
2006-02-18 17:26:30 +01:00
unknown
cefc0b6dff Fix for BUG#16559 "Replication Problems with Non transactional tables inside an interrupted trans.":
problem was: when a connection disconnects having an open transaction affecting MyISAM and InnoDB, the ROLLBACK event stored in the binary log
contained a non-zero error code (1053 because of the disconnection), so when slave applied the transaction, slave complained that its ROLLBACK succeeded
(error_code=0) while master's had 1053, so slave stopped. But internally generated binlog events such as this ROLLBACK
should always have 0 as error code, as is true in 4.1 and was accidentally broken in 5.0,
so that there is no false alarm.


mysql-test/r/mix_innodb_myisam_binlog.result:
  result update
mysql-test/t/mix_innodb_myisam_binlog.test:
  test for BUG#16559
sql/log.cc:
  Internally generated binlog events should always have an error code of zero (like in 4.1; in 5.0 this was accidentally broken).
2006-02-18 17:19:16 +01:00
unknown
1d96eaddb9 --help option added to mysql_upgrade script
scripts/mysql_upgrade.sh:
  --help option implemented
2006-02-18 14:55:31 +04:00
unknown
187aab97b6 Add a shift in the parser. Forgotten in the previous commit.
server-tools/instance-manager/parse.cc:
  shift the second value for the log
2006-02-18 03:22:13 +03:00
unknown
a2c1e816ff Merge mysql.com:/home/cps/mysql/trees/5.0/mysql-5.0-virgin-debug
into  mysql.com:/home/cps/mysql/devel/im/5.0-im-add-error-message
2006-02-18 02:50:50 +03:00
unknown
eae6679fd4 Fix subselect results (there was a bad merge when subselect test was disabled)
BitKeeper/etc/ignore:
  Added scripts/mysql_upgrade to the ignore list
mysql-test/r/subselect.result:
  Update results
2006-02-17 10:02:59 -08:00
unknown
dd6e56b903 Merge mysql.com:/home/jimw/my/mysql-5.0-14676
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/item_strfunc.cc:
  Auto merged
2006-02-17 08:32:50 -08:00
unknown
abe796eb71 Merge paul@bk-internal.mysql.com:/home/bk/mysql-5.0
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-5.0
2006-02-17 08:38:05 -06:00
unknown
128e5df7e9 mysqlcheck.c:
Tweak --check-upgrade help text.


client/mysqlcheck.c:
  Tweak --check-upgrade help text.
2006-02-17 08:32:52 -06:00
unknown
edd1cd23ea Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/15706-bug-5.0-mysql
2006-02-17 15:36:56 +03:00
unknown
010fb090e8 Set opt_vardir_trace for path for tracefiles 2006-02-17 12:19:05 +01:00
unknown
c61fb3c359 Replace win filename s with unix equivalent
Evaluate commands passed to "exec" and "system" to expand any $variables before executing command.


client/mysqltest.c:
  do_exec, do_system 
   - call do_eval on the command to be executed in order to expand any $variables
   - Remove old subst_env_var and my_popen, not needed anymore
  Rewrite 'replace_strings' into 'replace_strings_append'
   - copy whole strings instead of byte by byte copy
   - insert result directly inito dynamic_string, no need to check if out 
     string needs to be realloced for every byte.
   - Add comments and DBUG_PRINT's
  New function 'fix_win_paths', detect filenames in win format that should be converted 
  do_eval
  - Only set "escaped" if next char is \ or $
mysql-test/mysql-test-run.pl:
  Always pass path for DBUG .trace file in unix format
  Add search path client_debug to find debug compiled windows binaries
  Remove unused MYSQL_TEST_WINDIR and MASTER_WINMYSOCK
mysql-test/r/mysqldump.result:
  Update test result
mysql-test/t/client_xml.test:
  Use " instead of '
mysql-test/t/mysql_client_test.test:
  Remove the useless "exec echo" command
mysql-test/t/mysqltest.test:
  Escape $variables passed to --exec, that should not be evaluated in exec.
mysql-test/t/rpl000015.test:
  Remove unneccessary replace
mysql-test/t/system_mysql_db_fix.test:
  Call the "shell script" $MYSQL_FIX_SYSTEM_TABLE using --system
2006-02-17 12:07:45 +01:00
unknown
96b4449370 Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.w2645


sql/sql_table.cc:
  Auto merged
2006-02-17 10:56:54 +04:00
unknown
bf84040458 WL#2645 (CHECK TABLE FOR UPGRADE)
necessary implementation in the server
mysql_upgrade script added


client/mysqlcheck.c:
  --check-upgrade option added
include/my_base.h:
  errcode added
include/myisam.h:
  option added
scripts/Makefile.am:
  mysql_upgrade script added
sql/handler.cc:
  checks for old types/bugs added
sql/handler.h:
  declarations regarding checks for upgrade
sql/lex.h:
  sym added
sql/share/errmsg.txt:
  error message added
sql/slave.cc:
  now ha_repair is for public use
sql/sql_table.cc:
  upgrade in ha_repair implemented
sql/sql_yacc.yy:
  CHECK ... FOR UPGRADE added to syntax
2006-02-17 10:52:32 +04:00
unknown
1be9ba8ae8 #define popen(A,B) _popen((A),(B))
include/config-win.h:
  Fix strange "double" define for popen.
2006-02-16 23:05:15 +01:00
unknown
2c07e96ca0 Use the tmp dir of MYSQLTEST_VARDIR 2006-02-16 22:10:25 +01:00
unknown
c54809fc59 Don't disable warnings when dropping objects that should exist 2006-02-16 22:06:07 +01:00
unknown
cb71a3051a Use --system for unix command's 2006-02-16 21:34:01 +01:00
unknown
3554d87f84 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug8841
2006-02-16 19:23:37 +01:00
unknown
7a7c1f7983 Merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
mysql-test/t/disabled.def:
  SCCS merged
2006-02-16 21:11:38 +03:00
unknown
74f6299efd mysqlcheck.c:
Fix out of order options.


client/mysqlcheck.c:
  Fix out of order options.
2006-02-16 10:00:14 -06:00
unknown
50c1d251e8 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/home/dlenev/src/mysql-5.0-bg16593


sql/sql_base.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2006-02-16 16:22:53 +03:00
unknown
e1c8d9c9b4 Fix for bug #16593 "Deadlock or crash in stress test for case where
trigger starts trigger".

In short, the deadlock/crash happened when execution of statement, which used
stored functions or activated triggers, coincided with alteration of the
tables used by these functions or triggers (in highly concurrent environment).

Bug was caused by the incorrect handling of tables from prelocked set in
open_tables() functions in situations when refresh happened. This fix replaces
old smart but not very robust way of handling tables after refresh (which was
closing only old tables), with new one which simply closes all tables opened so
far and restarts open_tables().
Also fixed handling of temporary tables in close_tables_for_reopen().

No test case present since bug manifests itself only in concurrent environment.


sql/mysql_priv.h:
  In order to handle correctly case when table list completely consists from tables
  from prelocked set close_tables_for_reopen() have to accept table list as in/out
  parameter.
sql/sql_base.cc:
  open_tables():
    Removed part of comment  which was out of date.
    Changed handling of case when refresh happens during opening of tables, now
    instead of having code which decides for each table if it should be closed
    we simply close all tables. Old code also incorrectly handled tables from
    prelocked set in this situation which resulted in bug #16593 "Deadlock or
    crash in stress test for case where triggers starting trigger".
  close_tables_for_reopen():
    Now we correctly handle the case when table list completely consists from
    tables from prelocked set. Also now we simply close all tables instead
    leaving temporary tables non-closed (such approach allows easily handle
    correctly tables from prelocked set).
sql/sql_prepare.cc:
  In order to handle correctly case when table list completely consists from tables
  from prelocked set close_tables_for_reopen() have to accept table list as in/out
  parameter.
sql/sql_update.cc:
  In order to handle correctly case when table list completely consists from tables
  from prelocked set close_tables_for_reopen() have to accept table list as in/out
  parameter.
2006-02-16 16:19:24 +03:00
unknown
7032a814f2 Bug#14057 mysql_ping() handles TCP and UNIX socket connections in different ways
- Retry the ping if reconnect is turned on and the error was CR_SERVER_LOST


libmysql/libmysql.c:
  Send a new ping if first ping fails with CR_SERVER_LOST and reconnect is turned on
2006-02-16 13:44:56 +01:00
unknown
d430e2474f Bug#2845 client fails to reconnect if using TCP/IP
- Detect that connection to server has been broken in "net_clear". Since 
  net_clear is always called before we send command to server, we can be sure
  that server has not received the command.


mysql-test/r/wait_timeout.result:
  Update test result
mysql-test/t/wait_timeout-master.opt:
  Decrease wait_timeout value to avoid unneccessary sleeps
mysql-test/t/wait_timeout.test:
  Test that same error message is returned when disconnected regardless of connection is socket or TCP
  Decrease sleep times
sql/net_serv.cc:
  Make "net_clear" detect if connection with server has been broken by 
  performing a select. If the select returns that there are data to read but
  no data can be read, that means the connection is broken. Signal disconnected
  to "write" functions by setting error to 2.
2006-02-16 12:02:38 +01:00
unknown
920b9275bb Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug8841
2006-02-16 10:31:32 +01:00
unknown
f42c2c533a Merge neptunus.(none):/home/msvensson/mysql/bug16333/my50-bug16333
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-16 10:20:42 +01:00
unknown
bf9e29d174 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug8841
2006-02-16 10:17:30 +01:00
unknown
4283d9f092 ndb_load disabled
mysql-test/t/disabled.def:
  Disable ndb_load again...
2006-02-16 10:03:13 +01:00
unknown
4ecc62881f Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug8841


mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
2006-02-16 08:59:55 +01:00
unknown
82f645531c Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main
into  mysql.com:/home/stewart/Documents/MySQL/5.0/bug17411-thisisaverylongnamethatshouldbewaylongerthanthe128limitthatweprivouslyhadbutireallywantotestitandseethatitdoesreallywork.nowitshouldbeabout160charslongnonow.iwonderifanythingwillchokeornotwiththisoutrageouslylongpathname
2006-02-16 15:47:48 +11:00
unknown
f47a3805d9 Bug#13809 mysql-test: --replace_result option works on Windows incorrect
client/mysqltest.c:
  Convert cr/lf to lf
2006-02-16 00:53:55 +01:00
unknown
3e17193aa3 Bug#16795 ndb_cache_multi2
- remove timing dependent part of test, wait until condition occurs or sleep max 10 seconds


mysql-test/r/ndb_cache_multi2.result:
  Update test results
mysql-test/t/ndb_cache_multi2.test:
  Convert long sleeps to a while leep whith small sleeps and a check if condition has occured.
  This allows slower machines to sleep longer if needed.
2006-02-15 22:46:16 +01:00
unknown
8c1c10dc20 Add possibility to have a negative expression in "if" and "while" in mysqltest
client/mysqltest.c:
  Extend 'do_block' to be able to process a !<expression>. 
  Making it possible to do 'if(!$i)' and 'while(!$i)'
mysql-test/r/mysqltest.result:
  Update test results
mysql-test/t/mysqltest.test:
  Add test for if
  Add test for while with ! expr
2006-02-15 22:43:42 +01:00
unknown
2974245c21 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


libmysql/libmysql.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-02-15 20:16:33 +01:00
unknown
5d6985c4a1 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-02-15 09:29:11 -08:00
unknown
9849b248f2 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-02-15 09:13:56 -08:00
unknown
de0c65dd4e Fix bug #15706 find_field_in_tables() returns field from outer select
If item->cached_table is set, find_field_in_tables() returns found field
even if it doesn't belong to current select. Because Item_field::fix_fields
doesn't expect such behaviour, reported bug occurs.

Item_field::fix_fields() was modifed to detect when find_field_in_tables() 
can return field from outer select and process such fields accordingly.
In order to ease this code which was searching and processing outed fields was
moved into separate function called Item_field::fix_outer_field().


sql/item_subselect.h:
  Fixed bug #15706: find_field_in_tables() returns field from outer select
  Item_field::fix_outer_field() was marked as friend to Item_subselect class.
sql/item.h:
  Fixed bug #15706: find_field_in_tables() returns field from outer select
  fix_outer_field() function is added to the Item_field class.
sql/item.cc:
  Fixed bug #15706: find_field_in_tables() returns field from outer select
  
  Item_ref::fix_fields() and Item_field::fix_fields() were modifed to detect when
  find_field_in_tables() can return field from outer select and process such
  fields accordingly.
  In order to ease this, code Item_field::fix_fields() which was searching and
  processing outer fields was moved into separate function called
  Item_field::fix_outer_field().
  To the Item_field::fix_field() added a loop for finding context for found field.
mysql-test/t/disabled.def:
  Fixed bug #15706: find_field_in_tables() returns field from outer select
  Enable subselect test
2006-02-15 19:45:06 +03:00
unknown
4628da295f Additional tests for nested handlers added to sp.test.
A follow-up to BUG#15011 (already fixed).


mysql-test/r/sp.result:
  Updated results for new handler tests.
mysql-test/t/sp.test:
  Additional tests for nested handlers.
2006-02-15 17:28:34 +01:00
unknown
a7abbd918b Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2006-02-15 07:36:33 -08:00
unknown
69ede4d9d4 Bug#16143 mysql_stmt_sqlstate returns an empty string instead of '00000'
- Init sql_state in mysql_stmt_init


libmysql/libmysql.c:
  Init sql_state to not_error_sql_state in mysql_init
tests/mysql_client_test.c:
  Add test for mysql_stmt_sqlstate after mysql_stmt_init
2006-02-15 13:45:03 +01:00
unknown
02091fd59b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-15 12:02:20 +01:00
unknown
c49c9645e9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-15 10:53:25 +01:00
unknown
56c99820c3 BUG#17411 cannot have path longer than 128 characters
Use the POSIX limits.h define of PATH_MAX for maximum path length.

This has been being hit in pushbuild


ndb/include/util/File.hpp:
  use PATH_MAX for maximum filename length
ndb/src/common/portlib/NdbConfig.c:
  use PATH_MAX for max path name length instead of hardcoding 128
ndb/src/common/util/File.cpp:
  use PATH_MAX for maximum filename length
2006-02-15 16:37:09 +11:00
unknown
94e5b71035 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


client/mysqldump.c:
  Resolve conflict by using local version
2006-02-14 18:14:04 -08:00