Commit graph

7700 commits

Author SHA1 Message Date
unknown
6716fc050e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/17530-bug-5.0-mysql
2006-02-24 15:57:36 +03:00
unknown
f1a8a34c6c Fix mysqldump.test to work with non-standard --vardir.
(Backported from mysql-5.1-new)


mysql-test/t/mysqldump.test:
  Fix mysqldump.test to work with non-standard --vardir.
2006-02-24 13:51:04 +01:00
unknown
eb7f54a9f3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/17530-bug-5.0-mysql
2006-02-24 14:29:41 +03:00
unknown
f7295f2438 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
2006-02-23 10:45:39 +01:00
unknown
897f8eabf5 Merge neptunus.(none):/home/msvensson/mysql/mysqltest_replace/my50-mysqltest_replace
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/mysqltest.test:
  Merge
2006-02-23 10:30:31 +01:00
unknown
44e286d215 Add new parameter to do_eval so that only unescaped variables in input string is expanded and rest of string is left untouched.
client/mysqltest.c:
  Add new parameter to 'do_eval' that will add any escape chars found in the input string to the output string. 
  This is used in 'do_system' and in 'do_exec' where only unescaped variables
  will be expanded, rest of the string will be left untouched.
mysql-test/r/mysqltest.result:
  Update test result
mysql-test/t/mysqldump.test:
  Revert previous patch that added extra \\ in "exec" command
mysql-test/t/mysqltest.test:
  Revert previous patch that added extra \\ in exec command
2006-02-23 10:11:57 +01:00
unknown
85e54a08c4 Fix for BUG#7787: Stored procedures: improper warning for "grant execute" statement.
The problem was that error flag was not reset.


mysql-test/r/sp-security.result:
  Results for test case for BUG#7787.
mysql-test/t/sp-security.test:
  A test case for BUG#7787.
sql/sp.cc:
  Reset errors after sp_find_routine().
2006-02-22 13:44:04 +03:00
unknown
b56d453c8d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-runtime


sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  SCCS merged
2006-02-22 01:20:47 +03:00
unknown
9eca58895b Merge neptunus.(none):/home/msvensson/mysql/bug16878/my50-bug16878
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/sp_head.cc:
  Auto merged
mysql-test/r/mysqldump.result:
  Merge
mysql-test/t/mysqldump.test:
  Merge
2006-02-21 17:19:46 +01:00
unknown
71ee8615c3 Fixed bug#17530: Incorrect key truncation on table creation caused server crash.
When a too long field is used for a key, only a prefix part of the field is 
used. Length is reduced to the max key length allowed for storage. But if the
field have a multibyte charset it is possible to break multibyte char
sequence. This leads to the failed assertion in the innodb code and 
server crash when a record is inserted.

The make_prepare_table() now aligns truncated key length to the boundary of
multibyte char.


mysql-test/t/create.test:
  Added test case for bug#17530: Incorrect key truncation on table creation caused server crash.
mysql-test/r/create.result:
  Added test case for bug#17530: Incorrect key truncation on table creation caused server crash.
sql/sql_table.cc:
  Fixed bug#17530: Incorrect key truncation on table creation caused server crash.
  The make_prepare_table() now aligns truncated key length to the boundary of
  multibyte char.
2006-02-21 18:09:32 +03:00
unknown
c9d8cb49ba Merge neptunus.(none):/home/msvensson/mysql/bug14871/my50-bug14871
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
2006-02-21 15:05:58 +01:00
unknown
1f12107f00 Bug#14857 Reading dump files with single statement stored routines fails.Bug #14857 Reading dump files with single statement stored routines fails.
- Add tests, fixed by patch for 16878


mysql-test/r/mysqldump.result:
  Update test results
mysql-test/t/mysqldump.test:
  Add tests for bug 14857
2006-02-21 13:43:29 +01:00
unknown
15c3702598 Bug#14871 mysqldump: invalid view dump output
- Add comments with embeded veriosn info around the parts of the view syntax that are only supported by a certain version of MySQL Server


client/mysqldump.c:
  Use information_schema.views to gather information about the view, then replace some parts of the output from "SHOW CREATE VIEW" with comment markers with version, to make thos parts of the view syntax become parsed only of MySQL servers that supports it.
  Create common function "open_sql_file_for_table" to open the individual .sql file where to dump the table or view.
mysql-test/r/mysqldump.result:
  Update results
mysql-test/t/mysqldump.test:
  Add test to see that views can be deumped and reloaded alos when they contain "SECURITY TYPE", "CHECK OPTION" and "DEFINER"
2006-02-21 13:21:17 +01:00
unknown
3a9f0e7617 Merge neptunus.(none):/home/msvensson/mysql/mysqltest_replace/my50-mysqltest_replace
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
client/mysqltest.c:
  Merge
mysql-test/mysql-test-run.pl:
  Merge, undo removal
mysql-test/t/mysqldump.test:
  Merge
mysql-test/t/mysqltest.test:
  Merge
2006-02-21 09:40:18 +01:00
unknown
8d93d9256c Merge neptunus.(none):/home/msvensson/mysql/bug16795/my50-bug16795
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
2006-02-21 08:55:13 +01:00
unknown
ccec6f3e9f Merge neptunus.(none):/home/msvensson/mysql/bug2845/my50-bug2845
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-21 08:44:27 +01:00
unknown
06d4f8838c Escape \ in "exec"
mysql-test/t/ndb_config.test:
  Add extra \ to escape \. 
  \\\n => \n
2006-02-20 15:03:16 +01:00
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
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
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
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
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
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
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
4283d9f092 ndb_load disabled
mysql-test/t/disabled.def:
  Disable ndb_load again...
2006-02-16 10:03:13 +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
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
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
86c920ba77 Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
2006-02-14 20:19:00 +02:00
unknown
b79df79b95 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
2006-02-14 20:15:17 +02:00
unknown
56d00512c6 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/16272-bug-5.0-mysql
2006-02-14 19:46:35 +03:00
unknown
a3a5288449 Merge neptunus.(none):/home/msvensson/mysql/bug17233/my50-bug17233
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-14 17:25:44 +01:00
unknown
4b114615cf Enable ndb_load test case
mysql-test/t/disabled.def:
  Enable test case
2006-02-14 17:21:18 +01:00
unknown
1a9c96c58c Change from std_data to std_data_ln 2006-02-14 17:15:24 +01:00
unknown
2d18583700 Merge neptunus.(none):/home/msvensson/mysql/bug17280/my50-bug17280
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
2006-02-14 15:34:30 +01:00
unknown
315a46138e Fixed bug#16272: IF function with decimal args can produce wrong result
The Item_func_if::fix_length_and_dec() function when calculating length of 
result doesn't take into account unsigned_flag. But it is taken when 
calculating length of temporary field. This result in creating field that 
shorter than needed. Due to this, in the reported query 40.0 converted to 9.99.

The function Item_func_if::fix_length_and_dec() now adds 1 to the max_length if 
the unsigned_flag isn't set.


sql/item_cmpfunc.cc:
  Fixed bug#16272: IF function with decimal args can produce wrong result
  The function Item_func_if::fix_length_and_dec() now adds 1 to the max_length if 
  the unsigned_flag isn't set.
mysql-test/r/func_if.result:
  Added test case for bug#16272: IF function with decimal args can produce wrong result
mysql-test/t/func_if.test:
  Added test case for bug#16272: IF function with decimal args can produce wrong result
2006-02-14 16:22:37 +03:00
unknown
4e3f2e9d75 Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
2006-02-14 12:44:26 +02:00
unknown
a46ef2a8b5 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
2006-02-14 12:42:27 +02:00
unknown
7ce3b2a381 Many files:
Backporting character_set_filesystem from 5.0 to 5.1.


sql/mysqld.cc:
  Backporting character_set_filesystem from 5.0 to 5.1.
sql/set_var.cc:
  Backporting character_set_filesystem from 5.0 to 5.1.
sql/set_var.h:
  Backporting character_set_filesystem from 5.0 to 5.1.
sql/sql_class.cc:
  Backporting character_set_filesystem from 5.0 to 5.1.
sql/sql_class.h:
  Backporting character_set_filesystem from 5.0 to 5.1.
sql/sql_yacc.yy:
  Backporting character_set_filesystem from 5.0 to 5.1.
mysql-test/t/variables.test:
  Backporting character_set_filesystem from 5.0 to 5.1.
mysql-test/r/variables.result:
  Backporting character_set_filesystem from 5.0 to 5.1.
2006-02-14 08:24:01 +04:00