Commit graph

9853 commits

Author SHA1 Message Date
unknown
1aad903b71 Use MYSQLTEST_VARDIR variable 2006-12-18 10:22:48 +01:00
unknown
0a93477fb1 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-12-15 13:30:20 +01:00
unknown
acecd1caf6 Bug#19209 Test 'rpl_openssl' hangs on Windows
- Remove check not to run on windows. 


mysql-test/t/rpl_openssl.test:
  Remove check not to run on windows
2006-12-15 13:23:45 +01:00
unknown
acf0636e2e Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
When deleting a user defined function MySQL must remove it from both the
in-memory hash table and the mysql.proc system table.
Finding (and removal therefore) from the internal hash table is case 
insensitive (or whatever the default charset is), whereas finding and 
removal from the system table is case sensitive.
As a result if you supply a function name that is not in the same character
case to DROP FUNCTION the server will remove the function only from the
in-memory hash table and will keep the row in mysql.proc system table.
This will cause inconsistency between the two structures (that is fixed
only by restarting the server).
Fixed by using the name in the precise case (from the in-memory hash table)
to delete the row in the mysql.proc system table. 


mysql-test/r/udf.result:
  Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
              the UDF
   - test case
mysql-test/t/udf.test:
  Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
              the UDF
   - test case
sql/sql_udf.cc:
  Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
              the UDF
   - use the exact function name in deleting from mysql.proc.
2006-12-15 11:38:30 +02:00
unknown
386b381788 bug#19956 Problems with VARCHAR primary key and BLOB fields:added test case 2006-12-15 09:03:21 +01:00
unknown
3a5064205f Merge siva.hindu.god:/usr/home/tim/m/bk/41
into  siva.hindu.god:/usr/home/tim/m/bk/50


mysql-test/r/myisam.result:
  Manual merge.
mysql-test/r/symlink.result:
  Manual merge.
mysql-test/t/myisam.test:
  Manual merge.
mysql-test/t/symlink.test:
  Manual merge.
2006-12-14 16:51:12 -07:00
unknown
a6f4c958ca myisam.result: a test was moved from the .test file, but the results were not updated.
mysql-test/r/myisam.result:
  Fix results file - a test was moved from the .test file, but the results were not updated.
mysql-test/r/symlink.result:
  echo End of 4.1 tests while I'm here
mysql-test/t/myisam.test:
  echo End of 4.1 tests while I'm here
mysql-test/t/symlink.test:
  echo End of 4.1 tests while I'm here
2006-12-14 16:23:54 -07:00
unknown
db1a2d2d80 Merge polly.local:/tmp/maint/bug24117/my50-bug24117
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


mysys/typelib.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
2006-12-14 21:24:52 +03:00
unknown
5b71281467 Fix for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
Problem:
When creating a temporary field for a temporary table in create_tmp_field_from_field(), a resulting field is created as an exact copy of an original one (in Field::new_field()). However, Field_enum and Field_set contain a pointer (typelib) to memory allocated in the parent table's MEM_ROOT, which under some circumstances may be deallocated later by the time a temporary table is used.

Solution:
Override the new_field() method for Field_enum and Field_set and create a separate copy of the typelib structure in there.


include/typelib.h:
  Added copy_typelib() declaration
mysql-test/r/sp.result:
  Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysql-test/t/sp.test:
  Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysys/typelib.c:
  Added copy_typelib() definition
sql/field.cc:
  Create a copy of the internal 'typelib' structure when copying Field_enum of Field_set objects.
sql/field.h:
  Override new_field method in Field_enum (and Field_set) to copy the typelib structure.
2006-12-14 20:58:07 +03:00
unknown
833b235b18 Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
2006-12-14 16:09:15 +01:00
unknown
931dcc8a83 Merge kpettersson@bk-internal:/home/bk/mysql-5.0-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2006-12-14 16:04:07 +01:00
unknown
e21242fef8 Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into  naruto.:C:/cpp/mysql-4.1-maint
2006-12-14 16:02:43 +01:00
unknown
2772d72a93 Merge kpettersson@bk-internal:/home/bk/mysql-5.0-maint
into  naruto.:C:/cpp/mysql-5.0-maint
2006-12-14 15:52:06 +01:00
unknown
c4b2bee9a1 Merge kpdesk.mysql.com:/home/thek/dev/bug17489/my41-bug17498
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint


mysql-test/t/myisam.test:
  SCCS merged
2006-12-14 15:30:00 +01:00
unknown
8359968b51 Merge kpdesk.mysql.com:/home/thek/dev/bug17489/my50-bug17498
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2006-12-14 14:50:08 +01:00
unknown
e91334334e Bug#17498 failed to put data file in custom directory use "data directory" option
Merged 4.1->5.0. Updated myisam.test


mysql-test/r/myisam.result:
  updated result file
mysql-test/t/myisam.test:
  Removing symlink specific test from myisam test
2006-12-14 13:45:17 +01:00
unknown
d2b950f006 Merge kpdesk.mysql.com:/home/thek/dev/bug17489/my41-bug17498
into  kpdesk.mysql.com:/home/thek/dev/bug17489/my50-bug17498


mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/r/myisam.result:
  SCCS merged
mysql-test/t/myisam.test:
  SCCS merged
2006-12-14 13:38:09 +01:00
unknown
76bd00a993 After merge fix for bug N22645
mysql-test/t/mysqlbinlog.test:
  After merge fix
sql/log_event.cc:
  Fixing comment, thanks to Andrei for suggestion
2006-12-14 16:31:23 +04:00
unknown
e524063bee Bug#17498 failed to put data file in custom directory use "data directory" option
- When this bug was corrected it changed the behavior 
  for data/index directory in the myisam test case.
- This patch moves the OS depending tests to a non-windows
  test file.


mysql-test/r/myisam.result:
  moved test from myisam to symlink; new result file
mysql-test/r/symlink.result:
  moved test from myisam to symlink; new result file
mysql-test/t/myisam.test:
  moved test from myisam to symlink
mysql-test/t/symlink.test:
  moved test from myisam to symlink
2006-12-14 13:23:31 +01:00
unknown
c8b678ac08 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b22645


mysql-test/t/disabled.def:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
mysql-test/r/mysqlbinlog.result:
  After merge fix
mysql-test/t/mysqlbinlog.test:
  After merge fix
2006-12-14 14:19:30 +04:00
unknown
cbd1bd9078 Fixed bug #25027.
Blocked evaluation of constant objects of the classes
Item_func_is_null and Item_is_not_null_test at the
prepare phase in the cases when the objects used subqueries. 


mysql-test/r/ps.result:
  Extended test case for bug #25027.
mysql-test/t/ps.test:
  Extended test case for bug #25027.
sql/sql_lex.cc:
  Returned back the assertion in st_select_lex_unit::set_limit,
  removed by the previous commit for this bug.
2006-12-13 21:08:25 -08:00
unknown
b9d2627ca1 Merge mysql.com:/home/svoj/devel/mysql/BUG23404/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG23404/mysql-5.0-engines


mysql-test/r/alter_table.result:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
sql/sql_parse.cc:
  SCCS merged
2006-12-13 16:29:33 +04:00
unknown
a4ad07b7ea Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG23404/mysql-4.1-engines


mysql-test/r/alter_table.result:
  SCCS merged
mysql-test/t/alter_table.test:
  SCCS merged
2006-12-13 15:53:37 +04:00
unknown
2f78d5ca81 Fixed bug #25027.
Removed an assertion that was not valid for the cases where the query
in a prepared statement contained a single-row non-correlated
subquery that was used as an argument of the IS NULL predicate.


mysql-test/r/ps.result:
  Added a test case for bug #25027.
mysql-test/t/ps.test:
  Added a test case for bug #25027.
2006-12-13 00:39:13 -08:00
unknown
22192d083a Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt


sql/item_subselect.cc:
  Auto merged
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
sql/item_subselect.h:
  Manual merge
2006-12-12 11:53:09 -08:00
unknown
7433bdfa7b Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2006-12-12 14:01:06 +04:00
unknown
33446269e1 Fixed bug #24670: optimizations that are legal only for subqueries without tables
and no WHERE condition were applied for any subquery without tables.



mysql-test/r/subselect.result:
  Added a test case for bug #24670.
mysql-test/t/subselect.test:
  Added a test case for bug #24670.
sql/item_subselect.cc:
  Fixed bug #24670: optimizations that are legal only for subqueries without tables
  and no WHERE condition were applied for any subquery without tables.
  
  Removed an assertion that caused an abort for subqueries without tables and no 
  WHERE condition. 
  Blocked substitution of a single-row subquery without tables for the constant 
  row from its select list when the subquery contained a WHERE condition.
  This optimization is valid only for subquries without tables with no conditions.
  Any subquery without tables with WHERE clause returns NULL if the WHERE condition
  is FALSE. Erroneously it was always considered as non-nullable that could trigger 
  another optimization concerning IS NULL predicates which is applicable only for 
  non-nullable expressions and ultimately led to a wrong result returned by the outer
  query.
  Added a proper implementation of the virtual method may_be_null for class 
  subselect_single_select_engine.
sql/item_subselect.h:
  Fixed bug #24670: optimizations that are legal only for subqueries without tables
  and no WHERE condition were applied for any subquery without tables.
  Made method may_by_null for class subselect_engine vvirtual.
2006-12-11 18:57:23 -08:00
unknown
d501b2dd39 minor cleanup
mysql-test/t/sp_stress_case.test:
  Minor cleanup ... the test is now faster, even in debug builds
2006-12-11 18:52:24 -07:00
unknown
1ec1068037 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-19194


sql/sp_head.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-12-11 17:15:08 -07:00
unknown
c01c4cc359 Bug#19194 (Right recursion in parser for CASE causes excessive stack usage,
limitation)
Bug#24854 (Mixing Searched Case with Simple Case inside Stored Procedure
  crashes Mysqld)

Implemented code review (19194) comments


mysql-test/r/sp_stress_case.result:
  Implemented code review comments : use SQL instead of a shell script to
  generate the code
mysql-test/t/sp_stress_case.test:
  Adjusted
sql/sql_yacc.yy:
  Added more explicit comments
BitKeeper/deleted/.del-sp_stress_case.sh:
  Delete: mysql-test/t/sp_stress_case.sh
2006-12-11 16:59:02 -07:00
unknown
a8103a89b4 Post-merge fixes for Bug#4968 "Stored procedure crash if cursor opened
on altered table" and Bug#19733 "Repeated alter, or repeated 
create/drop, fails"


mysql-test/r/ps.result:
  Post-merge fixes: update results with new tests.
mysql-test/r/sp.result:
  Post-merge fixes: update results.
mysql-test/t/ps.test:
  Add more test cases for Bug#4968 and related.
mysql-test/t/sp.test:
  A post-merge fix: add more testcases for Bug#4968 and related.
sql/sql_insert.cc:
  Post-merge fixes: update comments, fix errors of the manual merge.
sql/sql_lex.cc:
  Fix a manual merge error.
sql/sql_parse.cc:
  Fix a few errors of the manual merge, style.
sql/sql_table.cc:
  Post-merge fixes, fix a few errors of the manual merge, fix style.
sql/sql_yacc.yy:
  A post-merge fix.
2006-12-12 01:50:12 +03:00
unknown
3e3990433a Merge bodhi.local:/opt/local/work/mysql-4.1-4968
into  bodhi.local:/opt/local/work/mysql-5.0-4968-pull-from-4.1


sql/sql_insert.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/sql_class.h:
  Manual merge.
sql/sql_lex.cc:
  Manual merge.
sql/sql_lex.h:
  Manual merge.
sql/sql_list.h:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_show.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2006-12-12 01:23:30 +03:00
unknown
58558f0686 Wait for INSERT DELAYED to finish i.e sleep in while loop until
"select count" is one more.
2006-12-11 16:43:21 +01:00
unknown
9d3eadeab9 Merge naruto.:C:/cpp/bug17489/my50-bug17489
into  naruto.:C:/cpp/mysql-5.0-maint


sql/sql_parse.cc:
  Auto merged
2006-12-11 13:13:05 +01:00
unknown
e78b4fc276 Merge naruto.:C:/cpp/bug17489/my41-bug17489
into  naruto.:C:/cpp/mysql-4.1-maint
2006-12-11 13:06:59 +01:00
unknown
1c1c35d2b5 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2006-12-11 15:32:07 +04:00
unknown
721b8f87f2 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


sql/sql_class.h:
  Auto merged
2006-12-11 11:28:11 +01:00
unknown
c35c8a17d2 Merge naruto.:C:/cpp/bug17489/my41-bug17489
into  naruto.:C:/cpp/bug17489/my50-bug17489


mysql-test/r/windows.result:
  Auto merged
mysql-test/t/windows.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-12-10 16:40:15 +01:00
unknown
cacaef6e44 Merge mysql.com:/home/bkroot/mysql-5.0-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


client/mysqldump.c:
  Auto merged
include/my_pthread.h:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/rpl_timezone.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysys/my_thr_init.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-12-08 23:33:39 +01:00
unknown
5aa8705ab6 Merge mysql.com:/home/bkroot/mysql-4.1-rpl
into  mysql.com:/home/bk/MERGE/mysql-4.1-merge


sql/item_timefunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2006-12-08 23:33:15 +01:00
unknown
3288ddf671 Merge polly.local:/tmp/maint/bug24261/my50-bug24261
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


mysql-test/r/func_in.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-12-08 22:38:03 +03:00
unknown
8ba0259a5f Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/t/kill.test:
  Auto merged
2006-12-08 17:09:43 +01:00
unknown
0abeff727d Bug#19410 Test 'kill' fails on Windows + SCO
mysql-test/t/kill.test:
  Move the connect of second connection to just before the query to be killed are sent.
  This introduces less variance since the connect time is not included in the delay
  we want between send of query and kill.
2006-12-08 17:09:07 +01:00
unknown
42b2cb8613 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug24507


sql/sql_acl.cc:
  Auto merged
2006-12-08 16:50:06 +01:00
unknown
ca1aebbd57 Backport fix for mysqladmin on windows test failure 2006-12-08 13:37:40 +01:00
unknown
c0ca163d06 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2006-12-08 12:28:21 +01:00
unknown
5e3f06db42 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/embt/my50-embt


libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/federated.inc:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  merging
mysql-test/r/flush_block_commit.result:
  SCCS merged
2006-12-08 15:22:46 +04:00
unknown
6aa09b4c23 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b24158
2006-12-08 15:18:03 +04:00
unknown
ca98fb63ad Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/embt/my41-embt


libmysqld/lib_sql.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-12-08 15:15:33 +04:00
unknown
df2af6cdf0 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug24507


client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-12-08 11:47:48 +01:00
unknown
b93baf4832 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b20396
2006-12-08 09:48:46 +04:00
unknown
e47ded8114 A fix and test cases for
Bug#4968 "Stored procedure crash if cursor opened on altered table"
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
stored procedure."
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"

Test cases for bugs 4968, 19733, 6895 will be added in 5.0.

Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE 
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).
In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).

The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table were not
re-execution friendly: during their operation they used to modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc 
for drop_it.remove() and similar patterns to find evidence.

The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement. 

To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.

The problem of crashing bug 22060 stemmed from the fact that the above 
metnioned functions were not only modifying HA_CREATE_INFO structure in 
LEX, but also were changing it to point to areas in volatile memory of 
the execution memory root.
 
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO (note that code in 5.1 already creates and
uses a copy of this structure in mysql_create_table()/alter_table(),
but this approach didn't work well for CREATE TABLE SELECT statement).


mysql-test/r/ps.result:
  Update test results (Bug#19182, Bug#22060)
mysql-test/t/ps.test:
  Add a test case for Bug#19182, Bug#22060 (4.1-only parts)
sql/mysql_priv.h:
  LEX::key_list and LEX::create_list were moved to LEX::alter_info.
  Update declarations to use LEX::alter_info instead of these two
  members.
sql/sql_class.h:
  Replace pair<columns, keys> with an instance of Alter_info in
  select_create constructor. We create a new copy of Alter_info
  each time we re-execute SELECT .. CREATE prepared statement.
sql/sql_insert.cc:
  Adjust to a new signature of create_table_from_items.
sql/sql_lex.cc:
  Implement Alter_info::Alter_info that would make a "deep" copy
  of all definition lists (keys, columns).
sql/sql_lex.h:
  Move key_list and create_list to class Alter_info. Implement
  Alter_info::Alter_info that can be used with PS and SP.
sql/sql_list.h:
  Implement a copy constructor of class List that makes a deep copy
  of all list nodes.
sql/sql_parse.cc:
  Adjust to new signatures of mysql_create_table, mysql_alter_table,
  select_create. Functions mysql_create_index and mysql_drop_index has
  become identical after initialization of alter_info was moved to the 
  parser, and were merged. Flag enable_slow_log was not updated for 
  SQLCOM_DROP_INDEX, which is a bug. Just like CREATE INDEX, DROP INDEX
  is currently done via complete table rebuild and is rightfully a slow
  administrative statement.
sql/sql_show.cc:
  Adjust mysqld_show_create_db to a new signature.
sql/sql_table.cc:
  Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
  mysql_prepare_table to new signatures.
sql/sql_yacc.yy:
  LEX::key_list and LEX::create_list moved to class Alter_info
2006-12-08 02:20:09 +03:00
unknown
1267a7fb3c Bug#17498 failed to put data file in custom directory use "data directory" option
- Using DATA/INDEX DIRECTORY option on Windows put data/index file into
  default directory because the OS doesn't support readlink().
- The procedure for changing data/index file directory is 
  different under Windows.
- With this fix we report a warning if DATA/INDEX option is used,
  but OS doesn't support readlink().


mysql-test/r/windows.result:
  - updated result file.
mysql-test/t/windows.test:
  - Added test case to verify we get warnings if we specify DATA/INDEX
    DIRECTORY on a platform which doesn't support readlink().
sql/sql_parse.cc:
  - Added warnings if DATA/INDEX DIRECTORY option is used but not supported
    by the target platform.
2006-12-07 17:01:00 +01:00
unknown
bc675bbdb5 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-12-07 15:54:43 +01:00
unknown
d8ff6cdfc8 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


mysql-test/r/ndb_index_unique.result:
  Auto merged
mysql-test/t/ndb_index_unique.test:
  Auto merged
2006-12-07 15:51:16 +01:00
unknown
6e47c11c7a Bug#24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld: Added test case 2006-12-07 15:49:59 +01:00
unknown
1cb8e4e9c9 BUG#23404 - ROW_FORMAT=FIXED option is lost is an index is added to the
table

ROW_FORMAT option is lost during CREATE/DROP INDEX.

This fix forces CREATE/DROP INDEX to retain ROW_FORMAT by instructing
mysql_alter_table() that ROW_FORMAT is not used during creating/dropping
indexes.


mysql-test/r/alter_table.result:
  A test case for bug#23404.
mysql-test/t/alter_table.test:
  A test case for bug#23404.
sql/sql_parse.cc:
  CREATE/DROP INDEX must not change ROW_FORMAT. Setting create_info.row_type
  to ROW_TYPE_NOT_USED informs mysql_alter_table that ROW_FORMAT was not
  used during alteration, and thus must be retained.
2006-12-07 18:32:40 +04:00
unknown
e8be5f6d50 merging fix
mysql-test/r/gis.result:
  result fixed
mysql-test/t/gis.test:
  path to datafile fixed
2006-12-07 15:22:43 +04:00
unknown
c423ecc0a7 Bug#22645 LC_TIME_NAMES: Statement not replicated
Implementing event based replication of LC_TIME_NAMES for 5.0
(as a replacement of previously made ONE_SHOT replication)


mysql-test/r/mysqlbinlog.result:
  Fixing results
mysql-test/r/rpl_locale.result:
  Fixing results
mysql-test/t/disabled.def:
  Enabling rpl_locale
mysql-test/t/mysqlbinlog.test:
  Check "mysqlbinlog | mysql" reproduces lc_time_names correctly.
mysql-test/t/rpl_locale.test:
  Adding new test: that setting lc_time_names back to en_US works fine.
sql/log_event.cc:
  Implementing event based replication of LC_TIME_NAMES for 5.0
  (as a replacement of previously made ONE_SHOT replication)
sql/log_event.h:
  Adding new Q_*_CODE
  Adding "lc_time_names_number" members into Query_log_event and PRINT_EVENT_INFO
2006-12-07 09:31:53 +04:00
unknown
8f3c395c26 Merge mysql.com:/home/hf/work/22372/my41-22372
into  mysql.com:/home/hf/work/22372/my50-22372


mysql-test/r/gis.result:
  merging
mysql-test/t/gis.test:
  merging
sql/field.cc:
  merging
sql/field.h:
  merging
sql/sql_load.cc:
  merging
2006-12-06 22:02:39 +04:00
unknown
fa115a0f2c bug #22372 (LOAD DATA crashes the table with the geometry field)
The problem is that the GEOMETRY NOT NULL can't automatically set
any value as a default one. We always tried to complete LOAD DATA
command even if there's not enough data in file. That doesn't work
for GEOMETRY NOT NULL. Now Field_*::reset() returns an error sign
and it's checked in mysql_load()


mysql-test/r/gis.result:
  test result
mysql-test/t/gis.test:
  testcase
sql/field.cc:
  reset() now returns error sign
sql/field.h:
  Field_*::reset() now returns error sign if the field can't be reset
sql/sql_load.cc:
  check if field can't be reset and return error if it's so
2006-12-06 21:45:57 +04:00
unknown
c0efc71780 Adjust replace to mask win paths 2006-12-06 16:44:31 +01:00
unknown
0ce02f6d98 Fix for bug #22533: Traditional: Too-long bit value not rejected.
Problem: storing >=8 byte hexadecimal values we don't check data.
Fix: check if the data fits the {u}longlong range.


mysql-test/r/select.result:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - test result.
mysql-test/t/range.test:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - adjusted.
mysql-test/t/select.test:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - test case.
sql/item.cc:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - limit storing value to {U}LONGLONG_MAX in numeric context.
2006-12-06 16:32:12 +04:00
unknown
8ef1be3de8 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-12-05 19:56:49 +01:00
unknown
21b9187ab9 Merging bug#22645 "LC_TIME_NAMES: Statement not replicated" from 4.1.
mysql-test/t/disabled.def:
  Disabling test in 5.0 temporarily
sql/mysql_priv.h:
  Adding number_par agrument to constructor
sql/sql_locale.cc:
  Using constructor, instead of structure initialization.
2006-12-05 16:01:21 +04:00
unknown
c7457bdf93 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-12-05 11:18:00 +01:00
unknown
3eafe5cf98 Merge mysql.com:/usr/home/bar/mysql-4.1.b22645
into  mysql.com:/usr/home/bar/mysql-5.0.b22645


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/log.cc:
  Removing one_shot from 5.0.
sql/sql_locale.cc:
  After merge fix
sql/set_var.cc:
  After merge fix
sql/set_var.h:
  After merge fix
2006-12-05 14:08:19 +04:00
unknown
4474cc8493 Bug#22645 LC_TIME_NAMES: Statement not replicated
Problem: replication of LC_TIME_NAMES didn't work.
Thus, INSERTS or UPDATES using date_format() always
worked with en_US on the slave side.
Fix: adding ONE_SHOT implementation for LC_TIME_NAMES.


mysql-test/r/variables.result:
  Adding various tests with LC_TIME_NAMES and
  string and numeric constants and expressions.
mysql-test/t/variables.test:
  Adding various tests with LC_TIME_NAMES and
  string and numeric constants and expressions.
sql/log.cc:
  Adding ONE_SHOT trick for lc_time_names.
sql/mysql_priv.h:
  Adding new member "number" - for unique locale IDs.
  Adding prototype for my_locale_by_number().
sql/set_var.cc:
  Modifying lc_time_names variable to understand both:
  - string valyes (using locale name)
  - number values (using locale IDs)
sql/set_var.h:
  - Marking lc_time_names as ONE_SHOT capable.
  - Marking lc_time_names as INT_RESULT compatible.
sql/sql_locale.cc:
  - adding local IDs
  - better layout for locale data declarations
    (splitting long lines into short ones)
  - adding DBUG_ASSERT into my_locale_by_name()
    and moving this function towards the end of file -
    after "my_locales" declaration
  - adding my_locale_by_number() implementation
sql/sql_parse.cc:
  Adding initialization of lc_time_names
  to its default value (en_US)
mysql-test/r/rpl_locale.result:
  Adding test case
mysql-test/t/rpl_locale.test:
  Adding test case
2006-12-05 13:45:21 +04:00
unknown
96fa010c66 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-12-05 06:38:08 +01:00
unknown
fa52873b35 Merge kpettersson@bk-internal:/home/bk/mysql-5.0-maint
into  kpdesk.mysql.com:/home/thek/dev/tmp/mysql-5.0-maint
2006-12-04 23:51:54 +01:00
unknown
3b8e73fb2d Disabled flush2 until pushbuild framework can handle test which
disables binlog.


mysql-test/t/disabled.def:
  disabled test flush2.
2006-12-04 22:46:12 +01:00
unknown
ea67b2fd3e Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20836/my41-bug20836
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint


sql/sql_class.h:
  Auto merged
2006-12-04 15:33:53 -05:00
unknown
d0482fee0a Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20836/my50-bug20836
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint


sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2006-12-04 15:32:16 -05:00
unknown
2e5a6f9eaa Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/ignore:
  auto-union
Docs/Makefile.am:
  Auto merged
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_handler.cc:
  Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
  Manual merge with import of upstream yaSSL
2006-12-04 19:28:38 +01:00
unknown
11c27cf6b5 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-12-04 19:08:52 +01:00
unknown
c0612e453e Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/mysqld.cc:
  Auto merged
2006-12-04 19:06:42 +01:00
unknown
e9c2c8bad9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg


sql/ha_federated.cc:
  Auto merged
2006-12-04 19:03:01 +01:00
unknown
33fc8d5064 Merge bk-internal:/home/bk/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
2006-12-04 19:01:31 +01:00
unknown
85b1701ab7 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0-opt
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.0


sql/item_func.cc:
  Auto merged
2006-12-04 18:05:42 +01:00
unknown
6b60322131 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-12-04 15:09:47 +01:00
unknown
9b86f2a48a Merge naruto.:C:/cpp/bug17733/my50-bug17733
into  naruto.:C:/cpp/mysql-5.0-maint


sql/sql_parse.cc:
  Auto merged
2006-12-04 14:43:34 +01:00
unknown
63b2be3c8a item_func.cc:
fixed a valgrind warning
type_varchar.test:
  fixed a valgrind warning


mysql-test/t/type_varchar.test:
  fixed a valgrind warning
sql/item_func.cc:
   fixed a valgrind warning
2006-12-04 14:26:05 +02:00
unknown
85e15fb3e7 Use standard shell instead of BASH. 2006-12-04 14:05:27 +03:00
unknown
65da49e6a8 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  example.com:/work/bug24395-v2/my50


myisam/mi_open.c:
  Auto merged
sql/sql_table.cc:
  Auto merged
2006-12-02 00:30:10 +01:00
unknown
6b9d3ccb8b Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  example.com:/work/bug24395-v2/my41


myisam/mi_open.c:
  Auto merged
2006-12-01 23:11:44 +01:00
unknown
d337e90e8c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg


configure.in:
  Auto merged
myisam/mi_dynrec.c:
  Auto merged
sql/ha_federated.cc:
  Auto merged
2006-12-01 18:49:20 +01:00
unknown
ec74c40064 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  chilla.local:/home/mydev/mysql-5.0-axmrg


sql/ha_federated.cc:
  Auto merged
2006-12-01 18:38:08 +01:00
unknown
48595c284d Merge kpdesk.mysql.com:/home/thek/dev/bug22043/my50-bug22043
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/rpl_sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/rpl_sp.result:
  - Merged
2006-12-01 18:00:45 +01:00
unknown
c06f995ba7 Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build


client/mysqltest.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
2006-12-01 13:02:54 +01:00
unknown
2f0b1d6580 Bug#22043 MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS"
- Refactoring of duplicate code
- Modified bad test cases
- Changed expected error when operating on information_schema.


mysql-test/r/information_schema.result:
  - updated result file with new error code.
mysql-test/r/rpl_sp.result:
  - Modified test case
mysql-test/t/information_schema.test:
  - Changed error code for operations on information_schema
mysql-test/t/rpl_sp.test:
  - Modified test case
sql/sql_parse.cc:
  - Cleaned up code:
    * replace tab with space
    * simplified if/switch statements
    * refactored duplicated code
2006-12-01 12:50:57 +01:00
unknown
e284256ef0 Bug#17733 Flushing logs causes daily server crash
Server crashes if a flush commmand is issued and binlog is closed.
- added check to prevent binlog access when binlog file isn't opened.


sql/sql_parse.cc:
  - removed deprecated environment consistency check.
  - added check to prevent binlog access on closed binlog.
mysql-test/t/flush2-master.opt:
  - Added test case (master options)
mysql-test/t/flush2.test:
  - Added test case
mysql-test/r/flush2.result:
  - Added test case (resultfile)
2006-12-01 09:49:19 +01:00
unknown
1c49e88e4c Bug#20836 Selecting into variables results in wrong results being returned
- Post-merge cleanup.
- Disabled this bug's test for 5.x until 16861 is resolved.


mysql-test/r/distinct.result:
  Bug#20836 Selecting into variables results in wrong results being returned
  - Remove results for this bug.  When bug number 16861 is resolved, the result
  should match the 4.1 result.
mysql-test/t/distinct.test:
  Bug#20836 Selecting into variables results in wrong results being returned
  - Disable the test for 20836.  This test should remain disabled until bug 16861
  is fixed.  The results for the test should be the same as in 4.1.
sql/sql_class.cc:
  Bug#20836 Selecting into variables results in wrong results being returned
  - Post-merge cleanup.
2006-11-30 13:09:48 -05:00
unknown
c429ca8498 Merge example.com:/work/bug24395-v2/my41
into  example.com:/work/bug24395-v2/my50

fix for bug#24395 merged into 5.0


mysql-test/t/alter_table.test:
  Auto merged
myisam/mi_open.c:
  merge into 5.0 by using macroses available in 5.0
mysql-test/r/alter_table.result:
  manual merge
sql/sql_table.cc:
  manual merge
  Added else clause of 
  if (new_table && !new_table->file->is_view)
  This else clauses does keys management on the live table, thus we have
  to force other threads to reopen the table.
2006-11-30 18:36:15 +01:00
unknown
a4342155a5 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B11927-5.0-opt
2006-11-30 18:49:50 +02:00
unknown
140c3ee961 func_group.test, func_group.result, func_gconcat.result, func_gconcat.test:
merge fix : removed undeterministic warnings


mysql-test/r/func_gconcat.result:
  merge fix : removed undeterministic warnings
mysql-test/r/func_group.result:
  merge fix : removed undeterministic warnings
mysql-test/t/func_gconcat.test:
  merge fix : removed undeterministic warnings
mysql-test/t/func_group.test:
  merge fix : removed undeterministic warnings
2006-11-30 18:47:59 +02:00
unknown
7d3cb1a453 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/tools/ndb_config.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-11-30 16:04:12 +01:00
unknown
d9540e74e2 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


mysql-test/r/ndb_update.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-11-30 15:57:43 +01:00
unknown
eb36371ac3 #18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: call peek_index_rows 2006-11-30 15:02:33 +01:00
unknown
6e791795a2 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-30 12:22:32 +01:00
unknown
88dd3c59f9 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/mysql-test-run.pl:
  Auto merged
mysys/my_getopt.c:
  Auto merged
2006-11-30 12:14:28 +01:00
unknown
d242920922 Merge neptunus.(none):/home/msvensson/mysql/bug10608/my41-bug10608
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/mysql-test-run.pl:
  Auto merged
2006-11-30 11:58:23 +01:00
unknown
ef42631b53 func_gconcat.result, func_gconcat.test:
disabled warnings because their order is undeterministic


mysql-test/t/func_gconcat.test:
  disabled warnings because their order is undeterministic
mysql-test/r/func_gconcat.result:
  disabled warnings because their order is undeterministic
2006-11-30 12:58:05 +02:00
unknown
fc9a6bc528 Merge neptunus.(none):/home/msvensson/mysql/bug20589/my50-bug20589
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-30 11:40:13 +01:00
unknown
daa14544e0 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
client/mysqltest.c:
  Manual merge
mysql-test/r/mysqltest.result:
  Manual merge
2006-11-30 10:57:40 +01:00
unknown
708bce0a97 Add "chmod" command to mysqltest 2006-11-30 10:54:50 +01:00
unknown
fa46c80340 Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
Problem: ``SET PASSWORD FOR foo@localhost'' was written into
binary log using double quites: ``SET PASSWORD FOR "foo"@"localhost"...''.
If sql_mode was set to ANSI_QUOTES, parser on slave considered
"foo" and "localhost" as identifiers instead of strigns constants,
so it failed to parse, generated syntax error and slave then stopped.
Fix: changing binary log entries to use single quotes:
``SET PASSWORD FOR 'foo'@'localhost'...'' not to depend on ANSI_QUOTES.


mysql-test/r/rpl_do_grant.result:
  Adding test case
mysql-test/t/rpl_do_grant.test:
  Adding test case
sql/sql_acl.cc:
  Using single quotes instead of double quotes,
  not to fails when sql_mode=ANSI_QUOTES.
2006-11-30 11:08:23 +04:00
unknown
30278aedce Merge neptunus.(none):/home/msvensson/mysql/bug19731/my50-bug19731
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
sql/handler.cc:
  Auto merged
client/mysqltest.c:
  Manual merge
2006-11-29 23:08:35 +01:00
unknown
8e0614c839 Bug#19371 VARBINARY() have trailing zeros after upgrade from 4.1
- chmod the saved files from 4.1 to make sure they are writable


mysql-test/t/varbinary.test:
  As the files saved from 4.1 has been in bk they muight be readonly
  Use "chmod" to make sure they are writable
2006-11-29 23:03:45 +01:00
unknown
0e8ed1b5f2 Add command "chmod" to mysqltest
client/mysqltest.c:
  Add "chmod" command
mysql-test/r/mysqltest.result:
  Update result file
mysql-test/t/mysqltest.test:
  Add tests for chmod
2006-11-29 23:02:06 +01:00
unknown
403fa25473 federated.test:
fixed test to replace port to SLAVE_PORT in result file
federated.result:
  new result file


mysql-test/t/federated.test:
  fixed test to replace port to SLAVE_PORT in result file
mysql-test/r/federated.result:
  new result file
2006-11-29 13:56:59 -05:00
unknown
0e6675479d Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20836/my41-bug20836
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20836/my50-bug20836


mysql-test/r/distinct.result:
  manual merge
mysql-test/t/distinct.test:
  manual merge
sql/sql_class.cc:
  manual merge
sql/sql_class.h:
  manual merge
2006-11-29 12:15:15 -05:00
unknown
6ae9e9a57c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


sql/item_sum.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-11-29 17:25:23 +02:00
unknown
90578ce767 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0-opt
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.0-opt


mysql-test/t/view_grant.test:
  Auto merged
sql/table.cc:
  Auto merged
2006-11-29 15:21:28 +01:00
unknown
004aadd6f7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/20327-bug-5.0-opt-mysql


sql/sql_base.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-11-29 15:03:53 +03:00
unknown
8ac71ce7ea Merge kpdesk.mysql.com:/home/thek/dev/bug22043/my50-bug22043
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint


sql/sql_parse.cc:
  Auto merged
mysql-test/r/rpl_sp.result:
  - merged
mysql-test/t/rpl_sp.test:
  -merged
2006-11-29 12:57:43 +01:00
unknown
fe499575af Bug#20327: Marking of a wrong field leads to a wrong result on select with view,
prepared statement and subquery.

When a field of a view from an outer select is resolved the find_field_in_view
function creates an Item_direct_view_ref object that references the 
corresponding view underlying field. After that the view_ref is marked
as a dependent one. While resolving view underlying field it also get
marked as a dependent one due to current_select still points to the subselect.
Marking the view underlying field is wrong and lead to attaching conditions
to a wrong table and thus to the wrong result of the whole statement.

Now mark_select_range_as_dependent() function isn't called for fields from a 
view underlying table.


sql/sql_base.cc:
  Bug#20327: Marking of a wrong field leads to a wrong result on select with view, prepared statement and subquery.
  
  Now mark_select_range_as_dependent() function isn't called for fields from a
  view underlying table.
mysql-test/r/ps.result:
  Added a test case for bug#20327: Marking of a wrong field leads to a wrong result on select with view, prepared statement and subquery.
mysql-test/t/ps.test:
  Added a test case for bug#20327: Marking of a wrong field leads to a wrong result on select with view,prepared statement and subquery.
2006-11-29 14:52:11 +03:00
unknown
a116f93dd3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/17254-bug-5.0-opt-mysql
2006-11-29 14:44:24 +03:00
unknown
2278d96215 Bug#20589 Missing some table level privileges after upgrade
- The table_priv column of table_privs table was altered to a enum type
   with fewer enums causing the SHOW/CREATE VIEW grants to be truncated.
 - Improved comments and moved all declarations for table_privs, column_privs
   and proc_privs to one section for each table making it easy to see hat alterations
   are performed on each table
 - Reduced the number of ALTER's slightly, but as this is an upgrade script we need
   to take all possibilites into account.


scripts/mysql_fix_privilege_tables.sql:
  Collect everything for tables_priv, columns_priv and procs_priv in one section for each table
  Remove duplicate ALTERS
  Remove the ALTERS that truncated "SHOW VIEW" and "CREATE VIEW" from
  the enum type for Table_priv.
mysql-test/r/fix_priv_tables.result:
  New BitKeeper file ``mysql-test/r/fix_priv_tables.result''
mysql-test/r/fix_priv_tabs.result:
  New BitKeeper file ``mysql-test/r/fix_priv_tabs.result''
mysql-test/t/fix_priv_tables.test:
  New BitKeeper file ``mysql-test/t/fix_priv_tables.test''
2006-11-29 12:04:29 +01:00
unknown
15155fff77 bug#24303 Wrong result for UPDATE IGNORE for NDB table: Added test case 2006-11-29 11:53:43 +01:00
unknown
37d0126b99 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.0-opt


mysql-test/t/group_min_max.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-11-29 11:25:22 +01:00
unknown
89d106c1a4 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22229/my50-bug22229


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-29 13:41:03 +04:00
unknown
15584161e2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/t/wait_for_socket.sh:
  Manual merge.
sql/sql_cache.cc:
  Manual merge.
2006-11-29 02:44:12 +03:00
unknown
760bd9d166 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.local:/opt/local/work/mysql-4.1-runtime


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-29 02:39:17 +03:00
unknown
b4aab15272 Bug#20836 Selecting into variables results in wrong results being returned
This error is displayed anytime the SELECT statement needs a temp table to
return correct results because the object (select_dumpvar) that represents
variables named in the INTO clause stored the results before the temp
table was considered.  The problem was fixed by creating the necessary
Item_func_set_user_var objects once the correct data is ready.


mysql-test/r/distinct.result:
  Bug#20836 Selecting into variables results in wrong results being returned
  - Added results
mysql-test/t/distinct.test:
  Bug#20836 Selecting into variables results in wrong results being returned
  - Added various Selects that use the INTO statement and a temp table.
  - Added Select Into Outfile variant tests also.
sql/sql_class.cc:
  Bug#20836 Selecting into variables results in wrong results being returned
  - The select_dumpvar variable created a Item_func_set_user_var too early
  and once set, it was not possible to change.  The Item_func_set_user_var
  is now created once the final results are available.
sql/sql_class.h:
  Bug#20836 Selecting into variables results in wrong results being returned
  - Removed unnecessary object members.
2006-11-28 17:21:39 -05:00
unknown
38da90cc2d Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/t/mysql.test:
  Auto merged
2006-11-28 22:35:00 +01:00
unknown
befbebcfdb Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


client/mysqltest.c:
  Auto merged
Makefile.am:
  Manual merge
mysql-test/mysql-test-run.pl:
  Manual merge
2006-11-28 21:11:05 +01:00
unknown
bd4c0c1175 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-11-28 15:08:16 -05:00
unknown
c789301fcd Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_deadlock.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/rpl_deadlock.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
include/my_sys.h:
  Manual merge, my_getpagesize broken out of "#ifdef HAVE_SYS_MMAN_H"
2006-11-28 20:59:57 +01:00
unknown
be820c11d0 Revert charset breakage. 2006-11-28 13:08:41 -05:00
unknown
a9173ec999 Fix for bug#24395:
ALTER TABLE DISABLE KEYS doesn't work when modifying the table
  
ENABLE|DISABLE KEYS combined with another ALTER TABLE option, different
than RENAME TO did nothing. Also, if the table had disabled keys
and was ALTER-ed then the end table was with enabled keys.
  
Fixed by checking whether the table had disabled keys and enabling them
in the copied table.


myisam/mi_open.c:
  Extend mi_indexes_are_disabled to implement return value
  2 - Non-unique indexes are disabled
mysql-test/r/alter_table.result:
  update result
mysql-test/t/alter_table.test:
  update test
sql/sql_table.cc:
  When ENABLE|DISABLE index is combined with another option
  different than RENAME TO, we should ENABLE|DISABLE the keys of
  the modified table. Also when modifying we should preserve the
  previous state of the indices.
  (This problem exists in 5.0 and 5.1 but since the codebase has
  diverged, this fix won't automerge, but the fix will be quite
  similar).
2006-11-28 18:27:32 +01:00
unknown
852d378057 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B24156-5.0-opt
2006-11-28 18:09:15 +02:00
unknown
762f4ac167 Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
statements
Currently the optimizer evaluates loose index scan only for top-level SELECT
statements
Extend loose index scan applicability by :
 - Test the applicability of loose scan for each sub-select, instead of the
   whole query. This change enables loose index scan for sub-queries.
 - allow non-select statements with SELECT parts (like, e.g. 
   CREATE TABLE .. SELECT ...) to use loose index scan.


mysql-test/r/group_min_max.result:
  Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
             statements
   - test case
mysql-test/t/group_min_max.test:
  Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
             statements
   - test case
sql/opt_range.cc:
  Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
             statements
   - loose index scan will be tried over the current subselect 
     (lex->current_select) instead of the whole query (lex->select_lex).
   - allow non-select statements with SELECT parts (like, e.g. 
     CREATE TABLE .. SELECT ...) to use loose index scan.
2006-11-28 18:06:47 +02:00
unknown
9a87702b03 Bug#22043 MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE EXISTS"
- CREATE PROCEDURE stores database name based on query context instead
  of 'current database' as set by 'USE' according to manual.
  The bug reporter interpret the filtering statements as bug for
   DROP PROCEDURE based on this behavior.
- Removed the code which changes db context.
- Added code to check that a valid db was supplied.  


mysql-test/r/rpl_sp.result:
  - Added test case (result)
mysql-test/t/rpl_sp.test:
  - Added test case
sql/sp.cc:
  - Removed code for changing current db context.
sql/sql_parse.cc:
  - Added code to check if a valid db was supplied.
2006-11-28 16:03:53 +01:00
unknown
bce65bf41b Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B11927-5.0-opt


mysql-test/r/func_gconcat.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/sql_string.h:
  Auto merged
2006-11-28 15:47:53 +02:00
unknown
9221a5482b BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
When implicitly converting string fields to numbers the 
 string-to-number conversion error was not sent to the client.
 Added code to send the conversion error as warning.
 
 We also need to prevent generation of warnings from the places
 where val_xxx() methods are called for the sole purpose of updating
 the Item::null_value flag.
 To achieve that a special function is added (and called) : 
 update_null_value(). This function will set the no_errors flag and
 will call val_xxx(). The warning generation in Field_string::val_xxx()
 will use the flag when generating the conversion warnings. 


mysql-test/r/compare.result:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - non-convertible strings in arithmetic operations
mysql-test/r/func_gconcat.result:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - non-convertible strings in arithmetic operations
mysql-test/r/func_group.result:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - non-convertible strings in arithmetic operations
mysql-test/r/type_varchar.result:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - test case
mysql-test/t/type_varchar.test:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - test case
sql/field.cc:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - send conversion warning to the client
sql/item.cc:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - send conversion warning to the client
sql/item.h:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - added a special function to explicitly update the null_value
sql/item_func.h:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - added a special function to explicitly update the null_value
sql/item_subselect.h:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - added a special function to explicitly update the null_value
sql/item_sum.cc:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - added a special function to explicitly update the null_value
sql/item_sum.h:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - added a special function to explicitly update the null_value
sql/sql_string.h:
  BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
   - send conversion warning to the client
2006-11-28 15:44:11 +02:00
unknown
36c7cfd71e Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
Problem: when loading mysqlbinlog dumps, CREATE PROCEDURE having semicolons
in their bodies failed.
Fix: Using safe delimiter "/*!*/;" to dump log entries.


client/mysqlbinlog.cc:
  - Adding PRINT_EVENT_INFO argument to dump_xxx_log_entries()
  - Setting delimiter to "/*!*/;" before calling dump functions
mysql-test/r/ctype_ucs_binlog.result:
  Fixing test results
mysql-test/r/mix_innodb_myisam_binlog.result:
  Fixing test results
mysql-test/r/mysqlbinlog.result:
  Fixing test results
  Adding test case
mysql-test/r/mysqlbinlog2.result:
  Fixing test results
mysql-test/r/rpl_charset.result:
  Fixing test results
mysql-test/r/rpl_timezone.result:
  Fixing test results
mysql-test/r/user_var-binlog.result:
  Fixing test results
mysql-test/t/mix_innodb_myisam_binlog.test:
  Fixing LIKE expression
mysql-test/t/mysqlbinlog.test:
  Adding test case
sql/log_event.cc:
  Using print_event_info->delimiter instead of
  hard-coded semicolon as a query end marker.
sql/log_event.h:
  Adding new member to store delimiter.
2006-11-28 16:26:15 +04:00
unknown
780fc6b6f9 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/mysql-test-run.pl:
  Auto merged
2006-11-28 11:50:48 +01:00
unknown
129a48b0b9 Increased heap max length to > 4G for 64 bit machines
Initialize key_part->type on open. This caused key_copy() to fail for bit_fields. (key_copy is used in HANDLER and opt_range)


include/heap.h:
  Increased heap max length to > 4G for 64 bit machines
mysql-test/r/show_check.result:
  Updated results after heap size change
mysql-test/r/type_bit.result:
  Added test for bug in bit field handling (in handler and opt_range.cc)
mysql-test/t/type_bit.test:
  Added test for bug in bit field handling (in handler and opt_range.cc)
sql/ha_heap.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/item_sum.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/mysqld.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/set_var.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/sql_class.h:
  Increased heap max length to > 4G for 64 bit machines
sql/sql_select.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/table.cc:
  Initialize key_part->type ; This was used for bit fields but only set in temporary tables
sql/uniques.cc:
  Increased heap max length to > 4G for 64 bit machines
2006-11-28 00:47:21 +02:00
unknown
5a0b54fd13 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  shakedown.(none):/home/jpipes/dev/mysql-5.0-maint


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
sql/item_func.h:
  Auto merged
mysql-test/r/mysql.result:
  Manual merge
mysql-test/t/mysql.test:
  Manual merge
2006-11-27 14:58:57 -05:00
unknown
deecc9bb11 Fix for rpl000015 that fails if $MYSQL_TCP_PORT is set. The default value for
master_port after a "change master" will be set to the compiled in default value
i.e not always the same as what the master report as it's port number. 


mysql-test/mysql-test-run.pl:
  Read the master-port value from the mysqld. Used for replacing the 
  default compiled in port number in for example rpl000015
mysql-test/r/rpl000015.result:
  Update result file
mysql-test/t/rpl000015.test:
  When changing master without specifying master port, the port for master will
  be set to the compiled in default. Replace with that value
2006-11-27 19:56:04 +01:00
unknown
2e758a7c23 Fix for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL


mysql-test/r/func_in.result:
  Added testcase for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
mysql-test/t/func_in.test:
  Added testcase for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
sql/opt_range.cc:
  When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL
2006-11-27 19:12:10 +03:00
unknown
880b3d84d1 Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt


libmysql/libmysql.c:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
strings/decimal.c:
  Auto merged
2006-11-27 16:25:52 +01:00
unknown
af1b3da56f Bug#17254: Error for DEFINER security on VIEW provides too much info
If a view was created with the DEFINER security and later the definer user
was dropped then a SELECT from the view throws the error message saying that
there is no definer user is registered. This is ok for a root but too much
for a mere user.

Now the st_table_list::prepare_view_securety_context() function reveals
the absence of the definer only to a superuser and throws the 'access denied'
error to others.


mysql-test/t/view_grant.test:
  Added a test case for bug#17254: Error for DEFINER security on VIEW provides too much info
mysql-test/r/view_grant.result:
  Added a test case for bug#17254: Error for DEFINER security on VIEW provides too much info
sql/table.cc:
  Bug#17254: Error for DEFINER security on VIEW provides too much info
  Now the st_table_list::prepare_view_securety_context() function reveals
  the absence of the definer only to a superuser and throws the 'access denied'
  error to others.
2006-11-27 16:15:32 +03:00
unknown
f3c26f7d9c Merge polly.local:/tmp/maint/bug22077/my50-bug22077
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql/sql_parse.cc:
  Auto merged
2006-11-24 17:01:43 +03:00
unknown
87e3047501 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/Makefile.am:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge of changes for RPM
2006-11-24 12:12:25 +01:00
unknown
cf9038e979 Fix for BUG##24415: Instance manager test im_daemon_life_cycle
fails randomly.

The problem was that the test case used command line tool (mysql)
without specifying connect_timeout argument. In some cases,
this lead to hanging of the test case.

The fix is to specify --connect_timeout=1 when starting mysql.

Also, the patch contains polishing and various cleanups to simplify
analyzing of the problems further.

The patch affects only test suite, no server codebase has been
touched.


mysql-test/lib/mtr_im.pl:
  Remember PID of the IM-spawner -- a process, that is
  used to fork IM-angel.
mysql-test/lib/mtr_io.pl:
  Trim \n from the PID.
mysql-test/lib/mtr_process.pl:
  Don't complain if it was IM-spawner, who died.
mysql-test/r/im_daemon_life_cycle.result:
  Update the result file.
mysql-test/r/im_life_cycle.result:
  Update the result file.
mysql-test/t/im_daemon_life_cycle.imtest:
  Polishing: add more comments, be more verbose.
mysql-test/t/im_life_cycle.imtest:
  Polishing: be more verbose.
mysql-test/t/im_utils.imtest:
  Polishing: be more verbose.
mysql-test/t/kill_n_check.sh:
  Log messages to the extrenal file so that they can be analyzed
  if test case failed.
mysql-test/t/wait_for_process.sh:
  Log messages to the extrenal file so that they can be analyzed
  if test case failed.
mysql-test/t/wait_for_socket.sh:
  Log messages to the extrenal file so that they can be analyzed
  if test case failed.
mysql-test/t/log.sh:
  Dummy script to facilitate logging from test-scripts.
mysql-test/t/utils.sh:
  A bunch of auxilary functions to facilitate logging.
2006-11-23 22:55:36 +03:00
unknown
52fc261bca Added option --mtr-build-thread to mysql-test-run.pl
Load shared libraries from zlib (fixed that mysql-test-run.pl didn't work on some Solaris boxes)
Added connect timeout to test to make im_daemon_life_cycle more predictable


mysql-test/mysql-test-run.pl:
  Added option --mtr-build-thread
  Load shared libraries from zlib (fixed that mysql-test-run.pl didn't work on some Solaris boxes)
mysql-test/t/wait_for_socket.sh:
  Added connect timeout (to make test predictable)
2006-11-23 18:39:10 +02:00
unknown
aff59a7021 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22029/my50-bug22029
2006-11-22 10:52:44 +04:00
unknown
c65ce2e09f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug22029/my41-bug22029


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-22 10:30:46 +04:00
unknown
ca0658d471 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22029/my50-bug22029


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-22 10:27:11 +04:00
unknown
1b3f04caa4 Bug#19799 delimiter command not working correctly when sourcing a sql file
- Use more appropriate test case.


mysql-test/r/mysql.result:
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - Alt. Result.
mysql-test/t/mysql_delimiter.sql:
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - Alt. Test
2006-11-22 01:27:06 -05:00
unknown
8473844792 Merge mysql.com:/usr/home/ram/work/bug22029/my41-bug22029
into  mysql.com:/usr/home/ram/work/bug22029/my50-bug22029


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  merging
2006-11-22 09:19:51 +04:00
unknown
0c7d10bde7 Bug#19799 delimiter command not working correctly when sourcing a sql file
- Client side readline functions unconditionally search for Unix '\n' line
endings. In this case, the delimiter statement was set to '//\r' instead 
of the intended '//'. When removing the '\n' check for and remove 
preceeding '\r' character as well.


client/readline.cc:
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - When removing the '\n' character, check for and remove preceeding '\r' 
  character as well.
mysql-test/r/mysql.result:
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - Added Results.
mysql-test/t/mysql_delimiter.sql:
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - Added Tests.
mysql-test/t/mysql_delimiter_19799.sql:
  Bug#19799 delimiter command not working correctly when sourcing a sql file
  - File containing delimiter statement followed by '\r\n' line ending.
2006-11-21 21:10:02 -05:00
unknown
413e0f0b2a Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159
2006-11-21 17:37:57 +03:00
unknown
75432f3fb7 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-runtime
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug23159
2006-11-21 17:37:25 +03:00
unknown
c9eb0a63d0 Rename system_mysql_db_fix.test to system_mysql_db_fix30020 as it tests
mysql_fix_privilege_tables.s's ability to convert the system tables as of
3.20 to current system table format
Add similar test for 4.1.23 tables - but use "mysql < mysql_fix_privilege_tables.sql"
so it can be run on any platform. 


mysql-test/t/system_mysql_db_fix30020-master.opt:
  Rename: mysql-test/t/system_mysql_db_fix-master.opt -> mysql-test/t/system_mysql_db_fix30020-master.opt
mysql-test/mysql-test-run.pl:
  Find mysql_fix_privilege_tables.sql and assign it's path and name to $MYSQL_FIX_PRIVILEGE_TABLES
mysql-test/t/system_mysql_db_fix30020.test:
  Send output to var/log/system_mysql_db_fix30020.err
  Add some more comments
mysql-test/t/system_mysql_db_fix40123-master.opt:
  New BitKeeper file ``mysql-test/t/system_mysql_db_fix40123-master.opt''
mysql-test/t/system_mysql_db_fix40123.test:
  New BitKeeper file ``mysql-test/t/system_mysql_db_fix40123.test''
2006-11-21 15:31:11 +01:00
unknown
fdc37f0666 Fix after manual merge.
mysql-test/r/ps.result:
  Fix after manual merge: update for different error message.
mysql-test/t/ps.test:
  Fix after manual merge: use right error codes.
2006-11-21 16:57:23 +03:00
unknown
596e29c253 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug23159
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159


mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/set_var.cc:
  Manual merge.
2006-11-21 16:53:33 +03:00
unknown
7a45fb546f BUG#23159: prepared_stmt_count should be status variable
Make Prepared_stmt_count a global status variable, accessible via
SHOW STATUS LIKE 'Prepared_stmt_count';.  Documentation should be
updated.


mysql-test/r/ps.result:
  Update result for bug#16365: Prepared Statements: DoS with too many
  open statements, according to bug#23159: prepared_stmt_count should be
  status variable.
mysql-test/t/ps.test:
  Update test case for bug#16365: Prepared Statements: DoS with too many
  open statements, according to bug#23159: prepared_stmt_count should be
  status variable.
sql/mysqld.cc:
  Add Prepared_stmt_count as global status variable.
sql/set_var.cc:
  Remove prepared_stmt_count as system variable.
2006-11-21 16:49:18 +03:00
unknown
1ae9f3b985 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
disable filling of I_S tables for EXPLAIN


mysql-test/r/information_schema.result:
  Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
  test case
mysql-test/t/information_schema.test:
  Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
  test case
2006-11-21 13:45:01 +04:00
unknown
1a0e1f1328 Bug#23556: TRUNCATE TABLE still maps to DELETE
This is the 5.0 part of the fix.
 Currently TRUNCATE command will not call
 delete_all_rows() in the handler (that implements
 the "fast" TRUNCATE for InnoDB) when there are
 triggers on the table.
 As decided by the architecture team TRUNCATE must
 use "fast" TRUNCATE even when there are triggers.
 Thus it must ignore the triggers. 
 Made TRUNCATE to ignore the triggers and call
 delete_all_rows() for all storage engines
 to maintain engine consistency.


mysql-test/r/trigger.result:
  Bug#23556: TRUNCATE TABLE still maps to DELETE
   - test case
mysql-test/t/trigger.test:
  Bug#23556: TRUNCATE TABLE still maps to DELETE
   - test case
sql/sql_delete.cc:
  Bug#23556: TRUNCATE TABLE still maps to DELETE
   - We implemenent fast TRUNCATE for InnoDB even
     if triggers are present.  
   - TRUNCATE ignores triggers.
2006-11-21 10:11:43 +02:00
unknown
654395b051 Prepare to merge "backport of bug#13926 from 5.0 to 4.1" back into 5.0:
Moving tests into their new place into 4.1 tests section
2006-11-21 12:09:14 +04:00
unknown
248ab7c7ee BUG#13926: --order-by-primary fails if PKEY contains quote character.
Backporting from 5.0


mysql-test/r/mysqldump.result:
  Adding test case
mysql-test/t/mysqldump.test:
  Adding test case
2006-11-21 11:09:33 +04:00
unknown
8869653031 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/t/ctype_ucs.test:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-11-20 22:46:52 +02:00
unknown
14decc4fbc Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)


BitKeeper/etc/ignore:
  added mysql-test/r/*.warnings
BUILD/SETUP.sh:
  Don't build with BDB as default
client/client_priv.h:
  Added OPT_DEBUG_INFO
client/mysqlbinlog.cc:
  Fixed compiler warning
client/mysqldump.c:
  Removed compiler warnings
  Added option --debug-info to detect memory leaks
  Fixed memory leak
  Don't backup cluster replication tables (if used with 5.1)
cmd-line-utils/readline/bind.c:
  Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
  Fixed compiler warning
cmd-line-utils/readline/complete.c:
  Fixed compiler warning
cmd-line-utils/readline/display.c:
  Fixed compiler warning
cmd-line-utils/readline/histexpand.c:
  Fixed compiler warning
cmd-line-utils/readline/input.c:
  Fixed compiler warning
cmd-line-utils/readline/isearch.c:
  Fixed compiler warning
cmd-line-utils/readline/kill.c:
  Fixed compiler warning
cmd-line-utils/readline/macro.c:
  Fixed compiler warning
cmd-line-utils/readline/misc.c:
  Fixed compiler warning
cmd-line-utils/readline/nls.c:
  Fixed compiler warning
cmd-line-utils/readline/readline.c:
  Fixed compiler warning
cmd-line-utils/readline/rltty.c:
  Fixed compiler warning
cmd-line-utils/readline/search.c:
  Fixed compiler warning
cmd-line-utils/readline/terminal.c:
  Fixed compiler warning
cmd-line-utils/readline/text.c:
  Fixed compiler warning
cmd-line-utils/readline/tilde.c:
  Fixed compiler warning
cmd-line-utils/readline/undo.c:
  Fixed compiler warning
cmd-line-utils/readline/util.c:
  Fixed compiler warning
cmd-line-utils/readline/vi_mode.c:
  Fixed compiler warning
dbug/dbug_analyze.c:
  Fixed compiler warning
extra/yassl/src/ssl.cpp:
  Fixed compiler warning
extra/yassl/testsuite/testsuite.cpp:
  Fixed compiler warning
heap/_check.c:
  Fixed compiler warning
heap/hp_delete.c:
  Fixed compiler warning
heap/hp_hash.c:
  Fixed compiler warning
heap/hp_open.c:
  Fixed compiler warning
heap/hp_rkey.c:
  Fixed compiler warning
heap/hp_rrnd.c:
  Fixed compiler warning
heap/hp_write.c:
  Fixed compiler warning
libmysql/libmysql.c:
  Fixed compiler warning
libmysqld/libmysqld.c:
  Fixed compiler warning
myisam/mi_close.c:
  Fixed compiler warning
myisam/mi_delete.c:
  Fixed compiler warning
myisam/mi_dynrec.c:
  Fixed compiler warning
myisam/mi_keycache.c:
  Fixed compiler warning
myisam/mi_page.c:
  Fixed compiler warning
myisam/mi_statrec.c:
  Fixed compiler warning
myisam/mi_test2.c:
  Fixed compiler warning
myisam/mi_write.c:
  Fixed compiler warning
myisam/myisampack.c:
  Fixed compiler warning
myisammrg/myrg_extra.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  Remove .reject, .progress, .log and .warnings flag at start
  cluster -> mysql database (for 5.1)
mysql-test/include/federated.inc:
  Remove mysqltest warnings
mysql-test/include/sp-vars.inc:
  Remove mysqltest warnings
mysql-test/mysql-test-run.sh:
  Fix so that 'make test' works again
  Remove .reject, .progress .log and .warnings files at startup
mysql-test/r/ctype_cp1250_ch.result:
  Drop used tables at startup
mysql-test/t/create.test:
  Remove mysqltest warnings
mysql-test/t/csv.test:
  Remove mysqltest warnings
mysql-test/t/ctype_collate.test:
  Remove mysqltest warnings
mysql-test/t/ctype_cp1250_ch.test:
  Drop used tables at startup
mysql-test/t/ctype_ucs.test:
  Remove mysqltest warnings
mysql-test/t/func_sapdb.test:
  Remove mysqltest warnings
mysql-test/t/func_str.test:
  Remove mysqltest warnings
mysql-test/t/grant.test:
  Remove mysqltest warnings
mysql-test/t/greedy_optimizer.test:
  Remove mysqltest warnings
mysql-test/t/group_min_max.test:
  Remove mysqltest warnings
mysql-test/t/innodb.test:
  Remove mysqltest warnings
mysql-test/t/join.test:
  Remove mysqltest warnings
mysql-test/t/limit.test:
  Remove mysqltest warnings
mysql-test/t/null.test:
  Remove mysqltest warnings
mysql-test/t/select.test:
  Remove mysqltest warnings
mysql-test/t/sp-prelocking.test:
  Remove mysqltest warnings
mysql-test/t/strict.test:
  Remove mysqltest warnings
mysql-test/t/subselect.test:
  Remove mysqltest warnings
mysql-test/t/type_newdecimal.test:
  Remove mysqltest warnings
mysql-test/t/view_grant.test:
  Remove mysqltest warnings
mysys/default.c:
  Fixed compiler warning
mysys/hash.c:
  Fixed compiler warning
mysys/list.c:
  Fixed compiler warning
mysys/mf_iocache.c:
  Fixed compiler warning
mysys/mf_keycache.c:
  Fixed compiler warning
mysys/mf_keycaches.c:
  Fixed compiler warning
mysys/my_alloc.c:
  Fixed compiler warning
mysys/my_dup.c:
  Fixed compiler warning
mysys/my_fopen.c:
  Fixed compiler warning
mysys/my_fstream.c:
  Fixed compiler warning
mysys/my_getwd.c:
  Fixed compiler warning
mysys/my_handler.c:
  Fixed compiler warning
  Added missing enums in switch
mysys/my_lib.c:
  Fixed compiler warning
mysys/my_lread.c:
  Fixed compiler warning
mysys/my_lwrite.c:
  Fixed compiler warning
mysys/my_malloc.c:
  Fixed compiler warning
mysys/my_pread.c:
  Fixed compiler warning
mysys/my_read.c:
  Fixed compiler warning
mysys/my_realloc.c:
  Fixed compiler warning
mysys/my_seek.c:
  Fixed compiler warning
mysys/my_write.c:
  Fixed compiler warning
mysys/safemalloc.c:
  Fixed compiler warning
mysys/thr_lock.c:
  Fixed compiler warning
mysys/tree.c:
  Fixed compiler warning
mysys/typelib.c:
  Fixed compiler warning
ndb/include/logger/LogHandler.hpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/include/ndb_global.h.in:
  Added LINT_SET_PTR macro to be able to remove some compiler warnings
ndb/include/util/InputStream.hpp:
  Fixed compiler warning
ndb/include/util/OutputStream.hpp:
  Fixed compiler warning
ndb/include/util/SimpleProperties.hpp:
  Fixed compiler warning
ndb/src/common/debugger/EventLogger.cpp:
  remove if on 'signal' as this is a function pointer and is always true
ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Add missing enums
ndb/src/common/logger/LogHandler.cpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/src/common/portlib/NdbMutex.c:
  Fixed compiler warning
ndb/src/common/portlib/NdbThread.c:
  Fixed compiler warning
ndb/src/common/transporter/Transporter.cpp:
  Swapped arguments to remove compiler warnings
ndb/src/cw/cpcd/CPCD.hpp:
  Fixed compiler warning
ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Added missing enums
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.hpp:
  Fixed compiler warning
ndb/src/kernel/error/ndbd_exit_codes.c:
  Fixed compiler warning
ndb/src/kernel/vm/TransporterCallback.cpp:
  Fixed compiler warning
ndb/src/mgmapi/mgmapi.cpp:
  Fixed compiler warning
ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/Services.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ClusterMgr.cpp:
  Fixed compiler warning
ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndb.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationExec.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationSearch.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbTransaction.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbif.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbinit.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Fixed compiler warning
ndb/tools/drop_index.cpp:
  Fixed compiler warning
ndb/tools/drop_tab.cpp:
  Fixed compiler warning
ndb/tools/ndb_config.cpp:
  Fixed compiler warning
regex/regexec.c:
  Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
  Fixed compiler warning
sql/Makefile.am:
  Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse
sql/filesort.cc:
  Fixed compiler warning
sql/ha_archive.cc:
  Fixed compiler warning
sql/ha_federated.cc:
  Fixed compiler warning
sql/ha_federated.h:
  Fixed compiler warning
sql/ha_innodb.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/handler.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_subselect.cc:
  Fixed compiler warning
sql/item_timefunc.cc:
  Fixed compiler warning
sql/log_event.cc:
  Fixed compiler warning
sql/mysqld.cc:
  Fixed compiler warning
sql/net_serv.cc:
  Fixed compiler warning
sql/opt_range.cc:
  Fixed compiler warning
  Formated DBUG statements to be as rest of code
sql/slave.cc:
  Fixed compiler warning
sql/sql_acl.cc:
  Fixed compiler warning
sql/sql_cache.cc:
  Fixed compiler warning
  Fixed bug in query cache when used with DBUG traceing
sql/sql_class.cc:
  Fixed compiler warning
sql/sql_class.h:
  Fixed compiler warning
sql/sql_delete.cc:
  Fixed compiler warning
sql/sql_parse.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_prepare.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_repl.cc:
  Fixed compiler warning
sql/sql_select.cc:
  Fixed compiler warning
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_view.cc:
  Fixed compiler warning
sql/strfunc.cc:
  Fixed compiler warning
sql-common/client.c:
  Fixed compiler warning
sql-common/my_time.c:
  Fixed compiler warning
sql/table.cc:
  Fixed compiler warning
sql/tztime.cc:
  Fixed compiler warning
sql/unireg.cc:
  Fixed compiler warning
strings/decimal.c:
  Fixed compiler warning
tests/mysql_client_test.c:
  Fixed compiler warning
vio/viosocket.c:
  Fixed compiler warning
vio/viossl.c:
  Fixed compiler warning
vio/viosslfactories.c:
  Fixed compiler warning
2006-11-20 22:42:06 +02:00
unknown
2b720487f0 Fix for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
Do not issue a 'read-only' error in case of DROP TEMPORARY TABLE on a non-existing temporary table.
Instead produce the correct "Unknown table" error or warning (in cases when the IF EXISTS clause was specified).

To a documentor: the part of the manual describing the 'read_only' system variable should be clarified to state the following:
"When the read_only variable is set to ON, all operations which create/update/drop tables are rejected with the exceptions for:
1. Any operation performed by the replication thread on a slave server
2. Any operation performed by a user that have the SUPER privilege
3. Any operation that creates/updates/drops only temporary tables"


mysql-test/r/read_only.result:
  Added testcases for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
mysql-test/t/read_only.test:
  Added testcases for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
sql/sql_parse.cc:
  Before issuing the 'read-only' error also check if the operation is not a DROP TEMPORARY TABLE statement
2006-11-20 17:35:23 +03:00
unknown
e1cc50c19e Merge mysql.com:/usr/home/bar/mysql-4.1.b22646
into  mysql.com:/usr/home/bar/mysql-4.1-rpl


sql/item_timefunc.cc:
  Auto merged
2006-11-20 18:08:46 +04:00
unknown
883df74755 Merge mysql.com:/usr/home/bar/mysql-4.1.b22646
into  mysql.com:/usr/home/bar/mysql-5.0.b22646


mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/r/ctype_utf8.result:
  After merge fix
sql/item_timefunc.cc:
  After merge fix
2006-11-20 15:06:33 +04:00
unknown
476eaae84d Bug#19194 (Right recursion in parser for CASE causes excessive stack usage,
limitation)

Note to the reviewer
====================

Warning: reviewing this patch is somewhat involved.
Due to the nature of several issues all affecting the same area,
fixing separately each issue is not practical, since each fix can not be
implemented and tested independently.
In particular, the issues with
- rule recursion
- nested case statements
- forward jump resolution (backpatch list)
are tightly coupled (see below).

Definitions
===========

The expression
  CASE expr
  WHEN expr THEN expr
  WHEN expr THEN expr
  ...
  END
is a "Simple Case Expression".

The expression
  CASE
  WHEN expr THEN expr
  WHEN expr THEN expr
  ...
  END
is a "Searched Case Expression".

The statement
  CASE expr
  WHEN expr THEN stmts
  WHEN expr THEN stmts
  ...
  END CASE
is a "Simple Case Statement".

The statement
  CASE
  WHEN expr THEN stmts
  WHEN expr THEN stmts
  ...
  END CASE
is a "Searched Case Statement".

A "Left Recursive" rule is like
  list:
      element
    | list element
    ;

A "Right Recursive" rule is like
  list:
      element
    | element list
    ;

Left and right recursion produces the same language, the difference only
affects the *order* in which the text is parsed.

In a descendant parser (usually written manually), right recursion works
very well, and is typically implemented with a while loop.
In an ascendant parser (yacc/bison) left recursion works very well,
and is implemented naturally by the parser stack.
In both cases, using the wrong type or recursion is very bad and should be
avoided, as it causes technical issues with the parser implementation.

Before this change
==================

The "Simple Case Expression" and "Searched Case Expression" were both
implemented by the "when_list" and "when_list2" rules, which are left
recursive (ok).

These rules, however, used lex->when_list instead of using the parser stack,
which is more complex that necessary, and potentially dangerous because
of other rules using THD::reset_lex.

The "Simple Case Statement" and "Searched Case Statements" were implemented
by the "sp_case", "sp_whens" and in part by "sp_proc_stmt" rules.
Both cases were right recursive (bad).

The grammar involved was convoluted, and is assumed to be the results of
tweaks to get the code generation to work, but is not what someone would
naturally write.

In addition, using a common rule for both "Simple" and "Searched" case
statements was implemented with sp_head::m_flags |= IN_SIMPLE_CASE,
which is a flag and not a stack, and therefore does not take into account
*nested* case statements. This leads to incorrect generated code, and either
a server crash or an incorrect result.

With regards to the backpatch mechanism, a *different* backpatch list was
created for each jump from "WHEN expr THEN stmt" to "END CASE", which
relied on the grammar to be right recursive.
This is a mis-use of the backpatch list, since this list can resolve
multiple references to the same target at once.

The optimizer algorithm used to detect dead code in the "assembly" SQL
instructions, implemented by sp_head::opt_mark(uint ip), was recursive
in some cases (a conditional jump pointing forward to another conditional
jump).
In case of specially crafted code, like
- a long list of "IF expr THEN stmt END IF"
- a long CASE statement
this would actually cause a server crash with a stack overflow.
In general, having a stack that grows proportionally with user data (the
SQL code given by the client in a CREATE PROCEDURE) is to be avoided.

In debug builds only, creating a SP / SF / Trigger which had a significant
amount of code would spend --literally-- several minutes in sp_head::create,
because of the debug code involved with DBUG_PRINT("info", ("Code %s ...
There are several issues with this code:
- in a CASE with 5 000 WHEN, there are 15 000 instructions generated,
  which create a sting representation of the code which is 500 000 bytes
  long,
- using a String instead of an io stream causes performances to degrade
  to a total server freeze, as time is spent doing realloc of a buffer
  always too short,
- Printing a 500 000 long string in the debug log is too verbose,
- Generating this string even when DBUG_PRINT is off is useless,
- Having code that potentially can affect the server behavior, used with
  #ifdef / #endif is useful in some cases, but is also a bad practice.

After this change
=================

"Case Expressions" (both simple and searched) have been simplified to
not use LEX::when_list, which has been removed.

Considering all the issues affecting case statements, the grammar for these
has been totally re written.

The existing actions, used to generate "assembly" sp_inst* code, have been
preserved but moved in the new grammar, with the following changes:

a) Bison rules are no longer shared between "Simple" and "Searched" case
statements, because a stack instead of a flag is required to handle them.
Nested statements are handled naturally by the parser stack, which by
definition uses the correct rule in the correct context.
Nested statements of the opposite type (simple vs searched) works correctly.
The flag sp_head::IN_SIMPLE_CASE is no longer used.
This is a step towards resolution of WL#2999, which correctly identified
that temporary parsing flags do not belong to sp_head.
The code in the action is shared by mean of the case_stmt_action_xxx()
helpers.

b) The backpatch mechanism, used to resolve forward jumps in the generated
code, has been changed to:
- create a label for the instruction following 'END CASE',
- register each jump at the end of a "WHEN expr THEN stmt" in a *unique*
  backpatch list associated with the 'END CASE' label
- resolve all the forward jumps for this label at once.

In addition, the code involving backpatch has been commented, so that a
reader can now understand by reading matching "Registering" and "Resolving"
comments how the forward jumps are resolved and what target they resolve to,
as this is far from evident when reading the code alone.

The implementation of sp_head::opt_mark() has been revised to avoid
recursive calls from jump instructions, and instead add the jump location
to the list of paths to explore during the flow analysis of the instruction
graph, with a call to sp_head::add_mark_lead().
In addition, the flow analysis will stop if an instruction has already
been marked as reachable, which the previous code failed to do in the
recursive case.
sp_head::opt_mark() is now private, to prevent new calls to this method from
being introduced.

The debug code present in sp_head::create() has been removed.
Considering that SHOW PROCEDURE CODE is also available in debug builds,
and can be used anytime regardless of the trace level, as opposed to
"CREATE PROCEDURE" time and only if the trace was on,
removing the code actually makes debugging easier (usable trace).

Tests have been written to cover the parser overflow (big CASE),
and to cover nested CASE statements.


mysql-test/r/sp-code.result:
  Test cases for nested CASE statements.
mysql-test/t/sp-code.test:
  Test cases for nested CASE statements.
sql/sp_head.cc:
  Re factored opt_mark() to avoid recursion, clean up.
sql/sp_head.h:
  Re factored opt_mark() to avoid recursion, clean up.
sql/sql_lex.cc:
  Removed when_list.
sql/sql_lex.h:
  Removed when_list.
sql/sql_yacc.yy:
  Minor clean up for case expressions,
  Major re write for case statements (Bug#19194).
mysql-test/r/sp_stress_case.result:
  New test for massive CASE statements.
mysql-test/t/sp_stress_case.sh:
  New test for massive CASE statements.
mysql-test/t/sp_stress_case.test:
  New test for massive CASE statements.
2006-11-17 12:14:29 -07:00
unknown
96ad04dec0 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-0mrg


BitKeeper/deleted/.del-mysql_client.test:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
include/my_time.h:
  merging
libmysql/libmysql.c:
  merging
mysql-test/t/order_by.test:
  merging
2006-11-17 10:30:16 +04:00
unknown
e971334ece Merge mysql.com:/home/hf/work/mysql-4.1-mrg
into  mysql.com:/home/hf/work/mysql-5.0-mrg


client/mysqltest.c:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql-common/client.c:
  Auto merged
Makefile.am:
  merging
BitKeeper/deleted/.del-mysql_client.test:
  merging
include/mysql.h:
  SCCS merged
libmysql/libmysql.c:
  merging
libmysqld/lib_sql.cc:
  merging
mysql-test/r/order_by.result:
  SCCS merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/order_by.test:
  merging
mysql-test/t/subselect.test:
  SCCS merged
sql/item_subselect.cc:
  merging
sql/item_subselect.h:
  merging
sql/protocol.cc:
  merging
sql/sql_class.h:
  merging
2006-11-16 23:16:44 +04:00
unknown
17c238a15b Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1-mrg


include/mysql.h:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_class.h:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
mysql-test/t/mysql_client.test:
  merging
2006-11-16 20:44:37 +04:00
unknown
3d958eb1af Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  example.com:/work/bug24219/my50


sql/sql_table.cc:
  Auto merged
2006-11-16 16:37:07 +01:00
unknown
6ce5681b12 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  example.com:/work/bug24219/my41
2006-11-16 16:29:06 +01:00
unknown
db42257de8 Merge example.com:/work/bug24219/my41
into  example.com:/work/bug24219/my50


mysql-test/t/alter_table.test:
  Auto merged
sql/sql_table.cc:
  manual merge
mysql-test/r/alter_table.result:
  manual merge
2006-11-16 13:46:43 +01:00
unknown
09fc514bd5 Fix for bug#24219 ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
There was an improper order of doing chained operations.

To the documentor: ENABLE|DISABLE KEYS combined with RENAME TO, and no other
ALTER TABLE clause, leads to server crash independent of the presence of
indices and data in the table.


mysql-test/r/alter_table.result:
  update result
mysql-test/t/alter_table.test:
  add test for bug#24129
sql/sql_table.cc:
  If there is operation on the KEYS, first do it
  and then do a rename if there is such. Or, we will crash because
  the underlying table has changed.
2006-11-16 13:18:37 +01:00
unknown
3ea5628b11 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug23653/my50-bug23653
2006-11-16 16:17:29 +04:00
unknown
096631a3d3 Merge mysql.com:/usr/home/ram/work/bug23653/my41-bug23653
into  mysql.com:/usr/home/ram/work/bug23653/my50-bug23653


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-16 15:26:33 +04:00
unknown
a4823607f9 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047


sql/item_strfunc.cc:
  Auto merged
mysql-test/r/func_str.result:
  Manual merge.
mysql-test/t/func_str.test:
  Manual merge.
2006-11-16 14:19:37 +03:00
unknown
db336c0544 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-runtime
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047
2006-11-16 14:15:56 +03:00
unknown
af22eb35e5 Add 5.0 part of fix for bug 17047.
mysql-test/r/func_str.result:
  Add result for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
mysql-test/t/func_str.test:
  Add test case for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
sql/item_strfunc.cc:
  Add Item_str_func::fix_fields() implementation, and set maybe_null to
  TRUE if we are in the SQL mode that requires some functions to return
  null even if they normally do not.
sql/item_strfunc.h:
  Add declaration of Item_str_func::fix_fields().
  Do not reset maybe_null in Item_func_char::fix_length_and_dec().
2006-11-16 14:06:51 +03:00
unknown
ec845335ac Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047


sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/func_in.result:
  Manual merge.  Add "End of 5.0 tests".
mysql-test/t/func_in.test:
  Manual merge.  Add "End of 5.0 tests".
2006-11-16 13:25:55 +03:00
unknown
e40e8052e8 BUG#17047: CHAR() and IN() can return NULL without signaling NULL result
The problem was that some functions (namely IN() starting with 4.1, and
CHAR() starting with 5.0) were returning NULL in certain conditions,
while they didn't set their maybe_null flag.  Because of that there could
be some problems with 'IS NULL' check, and statements that depend on the
function value domain, like CREATE TABLE t1 SELECT 1 IN (2, NULL);.

The fix is to set maybe_null correctly.


mysql-test/r/func_in.result:
  Add result for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
mysql-test/t/func_in.test:
  Add test case for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
sql/item_cmpfunc.cc:
  Remove assignment to maybe_null, as it was already set in fix_fields()
  based on all arguments, not only on the first.
2006-11-16 13:21:38 +03:00
unknown
bd74ef4854 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b23619
2006-11-16 13:44:23 +04:00
unknown
3d3432bc6e Merge mysql.com:/usr/home/bar/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b23619


sql/log_event.cc:
  Auto merged
2006-11-16 12:28:09 +04:00
unknown
16a0bdd7da BUG# 17044 Federated Storage Engine not UTF8 clean
- Added 'SET NAMES <charset>" upon ::open
- Added test and results for simple UTF test

federated.test:
  BUG #17044 Federated Storage Engine not UTF8 clean
  New test. Using hex - pasting various charsets in the terminal doesn't work.
federated.result:
  BUG# 17044 Federated Storage Engine not UTF8 clean
  New test results
ha_federated.cc:
  BUG# 17044 Federated Storage Engine not UTF8 clean
  Upon ::open, set names to table's charset


sql/ha_federated.cc:
  BUG# 17044 Federated Storage Engine not UTF8 clean
          Upon ::open, set names to table's charset
mysql-test/t/federated.test:
   BUG #17044 Federated Storage Engine not UTF8 clean
      New test. Using hex - pasting various charsets in the terminal doesn't work.
    federated.result:
    BUG# 17044 Federated Storage Engine not UTF8 clean
      New test results
mysql-test/r/federated.result:
  BUG# 17044 Federated Storage Engine not UTF8 clean
          New test results
2006-11-15 21:24:58 -05:00
unknown
daaddeb656 Dummy push to force pushbuild retest
mysql-test/t/disabled.def:
  Dummy push
2006-11-15 19:17:52 +01:00
unknown
ab6d44374e Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug19955/my50-bug19955
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


sql/item_func.cc:
  Auto merged
2006-11-15 12:27:09 -05:00
unknown
3be6493aab Bug#19955: unsigned bigint used as signed with MOD function
Problem:  When we have a really large number (between 2^63 and 2^64)
as the left side of the mod operator, it gets improperly corerced
into a signed value.

Solution:  Added check to see if the "negative" number is really
positive, and if so, cast it.


mysql-test/r/bigint.result:
  Added test case result
mysql-test/t/bigint.test:
  Added test case
sql/item_func.cc:
  Added check to see if we have an unsigned number that looks like a
  signed number.
2006-11-15 12:23:07 -05:00
unknown
cb79b92252 Merge dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/4.1
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0
2006-11-15 12:55:43 +02:00
unknown
9cde979eb7 bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
mending windows test.


mysql-test/r/rpl_packet.result:
  results changed
mysql-test/t/rpl_packet.test:
  removing because of the connection with windows client can be lost instead of
  the error code back (source: manual).
2006-11-15 12:53:07 +02:00
unknown
8f1337add4 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  example.com:/work/bug23760/my50
2006-11-15 11:50:30 +01:00
unknown
8b8647ff42 Cleanup after test cases
mysql-test/r/init_connect.result:
  Restore global variable to the value it's set to when server is started
mysql-test/r/key_cache.result:
  Restore global variable values to original
mysql-test/r/mysqldump.result:
  Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%"
mysql-test/r/rpl_deadlock.result:
  Restore global variable values to original
mysql-test/r/rpl_drop_db.result:
  Remove the conflicting file and drop database mysqltest1 before test exits
mysql-test/r/rpl_ignore_revoke.result:
  As changes to mysql.* are ignored - explicitly delete the user on slave
mysql-test/r/rpl_init_slave.result:
  Restore global variable values to original
mysql-test/r/rpl_max_relay_size.result:
  Restore global variable values to original
mysql-test/r/rpl_sp.result:
  Restore global variable values to original
mysql-test/r/rpl_timezone.result:
  Restore global variable values to original
mysql-test/r/rpl_variables.result:
  Restore global variable values to original
mysql-test/r/view_grant.result:
  Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost"
mysql-test/t/init_connect.test:
  Restore global variable to the value it's set to when server is started
mysql-test/t/key_cache.test:
  Restore global variable values to original
mysql-test/t/mysqldump.test:
  Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%"
mysql-test/t/rpl_deadlock.test:
  Restore global variable values to original
mysql-test/t/rpl_drop_db.test:
  Remove the conflicting file and drop database mysqltest1 before test exits
mysql-test/t/rpl_ignore_revoke.test:
  As changes to mysql.* are ignored - explicitly delete the user on slave
mysql-test/t/rpl_init_slave.test:
  Restore global variable values to original
mysql-test/t/rpl_max_relay_size.test:
  Restore global variable values to original
mysql-test/t/rpl_sp.test:
  Restore global variable values to original
mysql-test/t/rpl_timezone.test:
  Restore global variable values to original
mysql-test/t/rpl_variables.test:
  Restore global variable values to original
mysql-test/t/view_grant.test:
  Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost"
2006-11-15 10:23:27 +01:00
unknown
327a9f1805 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  example.com:/work/bug23760/my50


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-14 20:48:48 +01:00
unknown
eb5d7145af Update test cases after run with --check-testcases
mysql-test/r/limit.result:
  Add missing drop of table t1
mysql-test/r/lowercase_fs_off.result:
  Add missing drop of "sample" user
mysql-test/t/limit.test:
  Add missing drop of table t1
mysql-test/t/lowercase_fs_off.test:
  Add missing drop of "sample" user
2006-11-14 19:45:52 +01:00
unknown
645aac545e Fix for bug#23760 ROW_COUNT() and store procedure not owrking together
The problem was that THD::row_count_func was zeroed too. It was zeroed
as a fix for bug 4905 "Stored procedure doesn't clear for "Rows affected"
However, the proper solution is not to zero, because THD::row_count_func has
been set to -1 already in mysql_execute_command(), a later fix, which obsoletes
the incorrect fix of #4095


mysql-test/r/sp.result:
  update result
mysql-test/t/sp.test:
  test for bug#23760 ROW_COUNT() and store procedure not owrking together
sql/sql_parse.cc:
  Remove zeroing for thd->row_count_func
  The fix for #4905 wasn't right. Now, it's ok without this zeroing
  because if there was an error THD::
2006-11-14 18:40:11 +01:00
unknown
1019dd404c Bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
The regression is caused by the fix for bug 14767. When INSERT ... SELECT
used a view in the SELECT list that was not inlined, and there was an 
active transaction, the server could crash in Query_cache::invalidate.

On INSERT ... SELECT only the table being inserted into is invalidated.
Thus views that can't be inlined are skipped from invalidation.

The bug manifests itself in two ways so there is 2 test cases.
One checks that the only the table being inserted into is invalidated.
And the second one checks that there is no crash on INSERT ... SELECT.


mysql-test/t/query_cache.test:
  Added a test case for bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
mysql-test/r/query_cache.result:
  Added a test case for bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
sql/sql_parse.cc:
  Bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view 
  On INSERT ... SELECT only the table being inserted into is invalidated.
2006-11-14 19:50:44 +03:00
unknown
6dc05dde2b Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2006-11-14 10:06:11 +01:00
unknown
b3e5cc6bad Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-14 09:18:46 +01:00
unknown
541e9c9ac5 Bug#23703 (DROP TRIGGER needs an IF EXISTS)
This change set implements the DROP TRIGGER IF EXISTS functionality.

This fix is considered a bug and not a feature, because without it,
there is no known method to write a database creation script that can create
a trigger without failing, when executed on a database that may or may not
contain already a trigger of the same name.

Implementing this functionality closes an orthogonality gap between triggers
and stored procedures / stored functions (which do support the DROP IF
EXISTS syntax).

In sql_trigger.cc, in mysql_create_or_drop_trigger,
the code has been reordered to:
- perform the tests that do not depend on the file system (access()),
- get the locks (wait_if_global_read_lock, LOCK_open)
- call access()
- perform the operation
- write to the binlog
- unlock (LOCK_open, start_waiting_global_read_lock)

This is to ensure that all the code that depends on the presence of the
trigger file is executed in the same critical section,
and prevents race conditions similar to the case fixed by Bug 14262 :

- thread 1 executes DROP TRIGGER IF EXISTS, access() returns a failure
- thread 2 executes CREATE TRIGGER
- thread 2 logs CREATE TRIGGER
- thread 1 logs DROP TRIGGER IF EXISTS

The patch itself is based on code contributed by the MySQL community,
under the terms of the Contributor License Agreement (See Bug 18161).


mysql-test/r/rpl_trigger.result:
  DROP TRIGGER IF EXISTS
mysql-test/r/trigger.result:
  DROP TRIGGER IF EXISTS
mysql-test/t/rpl_trigger.test:
  DROP TRIGGER IF EXISTS
mysql-test/t/trigger.test:
  DROP TRIGGER IF EXISTS
sql/sql_trigger.cc:
  DROP TRIGGER IF EXISTS
sql/sql_yacc.yy:
  DROP TRIGGER IF EXISTS
2006-11-13 15:40:22 -07:00
unknown
1aad990179 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my50-bug18761
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
sql/item_func.cc:
  Auto merged
2006-11-13 13:19:13 -05:00
unknown
154c6e0677 Bug#18761: constant expression as UDF parameters not passed in as constant
The code that set up data to be passed to user-defined functions was very
old and analyzed the "Type" of the data that was passed into the UDF, when
it really should analyze the "return_type", which is hard-coded for simple
Items and works correctly for complex ones like functions.
---
Added test at Sergei's behest.


mysql-test/r/udf.result:
  Verify that various arguments work.
  ---
  Added test at Sergei's behest.
mysql-test/t/udf.test:
  Verify that various arguments work.
  ---
  Added test at Sergei's behest.
sql/item_func.cc:
  For function-Items, test whether it is constant and set the struct members 
  for the UDF parameter appropriately.
  
  Replace tabs with spaces in affected code.
sql/udf_example.c:
  Include a simple function that is useful in testing.
2006-11-13 13:13:44 -05:00
unknown
1613ad2c98 Merge mysql.com:/home/bk/MERGE/mysql-4.1-merge
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/triggers/post-commit:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/log_event.h:
  Manual merge
sql/slave.cc:
  Manual merge
2006-11-13 17:54:01 +01:00
unknown
ea1f7e4b56 several fixes to make tests pass in embedded-server mode
libmysqld/lib_sql.cc:
  check for bootstrap added
mysql-test/include/federated.inc:
  disabled in embedded
mysql-test/mysql-test-run.pl:
  we disable ssh in embedded server
mysql-test/r/bdb.result:
  part moved to bdb_notembedded as it uses binlog
mysql-test/r/flush_block_commit.result:
  part moved to flush_block_commit_notembedded
mysql-test/r/insert.result:
  part moved to insert_notembedded as delayed works differently in embedded server
mysql-test/r/insert_select.result:
  part moved to insert_notembedded as GRANTS usually disabled in embedded server
mysql-test/r/join.result:
  access rights hidden in result
mysql-test/t/backup.test:
  now available in embedded server
mysql-test/t/bdb.test:
  part moved to bdb_notembedded as it uses binlog
mysql-test/t/delayed.test:
  code trimmed
mysql-test/t/execution_constants.test:
  skipped in embedded-server mode
mysql-test/t/flush_block_commit.test:
  moved to flush_block_commit_notembedded
mysql-test/t/information_schema_db.test:
  skipped in embedded-server
mysql-test/t/innodb.test:
  directories replaced to be embedded-server compliant
mysql-test/t/insert.test:
  part moved to insert_notembedded
mysql-test/t/insert_select.test:
  part moved to insert_notembedded
mysql-test/t/join.test:
  access rights hidden
mysql-test/t/status.test:
  skipped in embedded server
mysql-test/t/trigger.test:
  directories replaced to be embedded-server compliant
sql/item_strfunc.cc:
  extra contexts not needed whan access checks disabled
sql/share/errmsg.txt:
  bigger paths reserved to prevent test's fails
mysql-test/r/bdb_notembedded.result:
  ***MISSING WEAVE***
mysql-test/r/flush_block_commit_notembedded.result:
  added
mysql-test/r/insert_notembedded.result:
  added
mysql-test/t/bdb_notembedded.test:
  ***MISSING WEAVE***
mysql-test/t/flush_block_commit_notembedded.test:
  added
mysql-test/t/insert_notembedded.test:
  added
2006-11-13 20:06:45 +04:00
unknown
ab15fb9e90 Expect the file "have_mysql_upgrade.result" to contain the
result from "require mysql_upgrade"


mysql-test/r/have_mysql_upgrade.result:
  New BitKeeper file ``mysql-test/r/have_mysql_upgrade.result''
2006-11-13 16:55:05 +01:00
unknown
8b01c318c0 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql_upgrade.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
2006-11-13 16:39:44 +01:00
unknown
71419317f1 Merge mysql.com:/home/hf/work/embt/my41-embt
into  mysql.com:/home/hf/work/embt/my50-embt


mysql-test/t/delayed.test:
  Auto merged
2006-11-13 18:16:52 +04:00
unknown
f660dfa64f delayed.test fixed
mysql-test/t/delayed.test:
  shouldn't be tested in embedded server
2006-11-13 18:12:15 +04:00
unknown
e56742d7a9 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B19216-4.1-opt
2006-11-13 15:40:19 +02:00
unknown
405dcd2df2 merge 4.1->5.0 of the test suite for bug 19216 2006-11-13 15:37:04 +02:00
unknown
8c598f607f Make it possible for .test suites to run "mysql_upgrade"
Add new test file mysql_upgrade.test


BitKeeper/deleted/.del-abi_check.ic:
  Rename: include/abi_check.ic -> BitKeeper/deleted/.del-abi_check.ic
client/mysql_upgrade.c:
  Make mysql_upgrade search also in "client" dir so it can be run from a source dist.
mysql-test/mysql-test-run.pl:
  Make it possible for .test scripts to run "mysql_upgrade"
mysql-test/r/mysql_upgrade.result:
  New BitKeeper file ``mysql-test/r/mysql_upgrade.result''
mysql-test/t/mysql_upgrade.test:
  New BitKeeper file ``mysql-test/t/mysql_upgrade.test''
2006-11-13 13:39:49 +01:00
unknown
181c9b4dd4 Merge mysql.com:/home/bkroot/mysql-5.0-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
2006-11-13 12:44:53 +01:00
unknown
8fd48ccec0 Merge mysql.com:/home/bkroot/mysql-4.1-rpl
into  mysql.com:/home/bk/MERGE/mysql-4.1-merge
2006-11-13 12:44:24 +01:00
unknown
f53af7b8e5 Bug #19216: Client crashes on long SELECT
The server sends a number of columns to the client.
 It uses a limited "fast" function for that instead of the
 general one. This fast function cannot send numbers larger 
 than 2 bytes. 
 This causes the client to expect smaller number of columns. 
 The client writes outside of the allocated memory buffer 
 as a result.
 Fixed the server to use the general function to send column
 count.
 Fixed the client to check the column count before writing
 column data. 


mysql-test/t/mysql_client.test:
  Bug #19216: Client crashes on long SELECT
   - test case
sql/protocol.cc:
  Bug #19216: Client crashes on long SELECT
   - renamed the function for bether comprehention
     and made it local
   - used the right (non-local) function to transfer 
     the column count in Protocol::send_fields
sql/protocol.h:
  Bug #19216: Client crashes on long SELECT
   - made optimized net_store_length local
sql-common/client.c:
  Bug #19216: Client crashes on long SELECT
   - fixed the client to check for older servers (without the fix).
2006-11-13 12:28:55 +02:00
unknown
1031c460de Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg23651


sql/item_func.cc:
  Auto merged
2006-11-13 11:15:02 +03:00
unknown
fc83f787cb Fix for bug bug#23651 "Server crashes when trigger which uses
stored function invoked from different connections".

Invocation of trigger which was using stored function from different
connections caused server crashes (for non-debug server this happened
in highly concurrent environment, but debug server failed on assertion
in relatively simple scenario).

Item_func_sp was not safe to use in triggers (in other words for
re-execution from different threads) as artificial TABLE object
pointed by Item_func_sp::dummy_table referenced incorrect THD
object. To fix the problem we force re-initialization of this
object for each re-execution of statement.


mysql-test/r/trigger.result:
  Added test for bug#23651 "Server crashes when trigger which uses
  stored function invoked from different connections".
mysql-test/t/trigger.test:
  Added test for bug#23651 "Server crashes when trigger which uses
  stored function invoked from different connections".
sql/item_func.cc:
  To make Item_func_sp safe for usage in triggers (in other words safe
  for re-execution in different threads) we need to ensure that artificial
  TABLE object pointed by Item_func_sp::dummy_table references correct
  THD object. To achieve this we simply force its re-initialization for
  each re-execution of statement.
2006-11-13 11:10:49 +03:00
unknown
28f6e13299 embedded-mode tests fixed
libmysqld/examples/test-run:
  mysql_embedded should be run here
libmysqld/lib_sql.cc:
  thd->real_id setup added
  bootstrap check added
mysql-test/t/innodb.test:
  paths can be different in embedded server - replace_result added
sql/item_func.cc:
  we should compare real_id-s in embedded server
2006-11-13 10:39:15 +04:00
unknown
75a0878fbf Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/t/rename.test:
  Use local (resolve a conflict)
2006-11-11 14:51:19 +03:00
unknown
00e781c8cc Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug20691/my50-bug20691
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-11-10 14:48:37 -05:00
unknown
56934f9dd4 Merge trift2.:/MySQL/M41/push-4.1
into  trift2.:/MySQL/M50/push-5.0


BitKeeper/deleted/.del-gcc.cpp~3d2e013cfac48838:
  Auto merged
configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/install_test_db.sh:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/time.cc:
  Auto merged
myisam/sort.c:
  Manual merge: "use local" (= 5.0 version).
mysql-test/mysql-test-run.pl:
  Manual merge, part of the fix for bug#17194.
2006-11-10 19:07:52 +01:00
unknown
fbd4378b85 Bug#10608 mysqladmin breaks on "database" variable in my.cnf
- Add printout of "Warning" or "Note" for non error messages in default_reporter
 - Add test for the above in new mysqladmin.test


mysql-test/mysql-test-run.pl:
  Add support for mysqladmin to mysql-test-run.pl
mysys/my_getopt.c:
  Add printout of Warning: or Info: in 'default_reporter', this
  will make the user aware of the problem but can filter it
  as a warning or note.
mysql-test/r/mysqladmin.result:
  New BitKeeper file ``mysql-test/r/mysqladmin.result''
mysql-test/t/mysqladmin.test:
  New BitKeeper file ``mysql-test/t/mysqladmin.test''
2006-11-10 13:25:10 +01:00
unknown
cb80733a89 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/t/rename.test:
  choose one of the race problem solutions. It was solved
  differently in -runtime and mainstream
2006-11-10 15:05:38 +03:00
unknown
19d61b1b81 Bug#20691: DATETIME col (NOT NULL, NO DEFAULT) may insert garbage when \
specifying DEFAULT

This was not specific to datetime.  When there is no default value 
for a column, and the user inserted DEFAULT, we would write 
uninitialized memory to the table.  

Now, insist on writing a default value, a zero-ish value, the same 
one that comes from inserting NULL into a not-NULL field.

(This is, at best, really strange behavior that comes from allowing 
sloppy usage, and serves as a good reason always to run one's server 
in a strict SQL mode.)


mysql-test/r/default.result:
  Verify that all kinds of types work, even others other than datetime.
mysql-test/t/default.test:
  Verify that all kinds of types work, even others other than datetime.
sql/item.cc:
  Even if we warn that there is no default value in the table definition,
  we have to insert /something/.
2006-11-09 18:33:58 -05:00
unknown
a5975941a4 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B20191-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-11-09 18:03:49 +02:00
unknown
59b45b5b0a Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
When compiling GROUP BY Item_ref instances are dereferenced in 
setup_copy_fields(), i.e. replaced with the corresponding Item_field 
(if they point to one) or Item_copy_string for the other cases.
Since the Item_ref (in the Item_field case) is no longer used the information
about the aliases stored in it is lost.   
Fixed by preserving the column, table and DB alias on dereferencing Item_ref


mysql-test/r/metadata.result:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - test case
mysql-test/t/metadata.test:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - test case
sql/item.cc:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - use the table and db name to fill up the metadata for columns
sql/sql_select.cc:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - preserve the field, table and DB name on dereferencing an Item_ref
2006-11-09 16:55:42 +02:00
unknown
69d8bfe231 Fix for bug #23653: Crash if last_day('0000-00-00')
As get_arg0_date() in the Item_func_last_day::get_date() returns 
0000-00-00 date sometimes, we have to check ltime->month for 0 after the call.


mysql-test/r/func_time.result:
  Fix for bug #23653: Crash if last_day('0000-00-00')
    - test result.
mysql-test/t/func_time.test:
  Fix for bug #23653: Crash if last_day('0000-00-00')
    - test case.
sql/item_timefunc.cc:
  Fix for bug #23653: Crash if last_day('0000-00-00')
    - return error if month is 0.
2006-11-09 16:17:50 +04:00
unknown
27aa4489ad Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2006-11-09 16:08:31 +04:00
unknown
f90f1e306f Bug#19371 VARBINARY() have trailing zeros after upgrade from 4.1
- Detect if a table has field of type MYSQL_TYPE_VAR_STRING while running
   "CHECK TABLE t FOR UPGRADE" and indicate it need to be fixed
   with "REPAIR TABLE t".
 - When running a "REPAIR TABLE t" or "ALTER TABLE t FORCE" on the above
   table, install a special copy function to trim off the trailing spaces
   which we safely can say that the pre 5.0 mysqld didn't put there. 


mysql-test/r/varbinary.result:
  Add test to see that a table with varbinary from 4.1 can be REPAIRED
mysql-test/t/varbinary.test:
  Add test to see that a table with varbinary from 4.1 can be REPAIRED
sql/field_conv.cc:
  Add new field copy function 'do_field_varbinary_pre50' used for copying
  between MYSQL_TYPE_VAR_STRING and MYSQL_TYPE_VARCHAR. It will remove trailing
  spaces from the field as MySQL <= 4.1 never stores the trailing spaces for
  a MYSQL_TYPE_VAR_STRING.
  Install this new copy function in ALTER TABLEs list of functions to use for
  copying data during and alter if from field is a <= 4.1 varbinary and to
  field is 5.0 varbinary.
sql/handler.cc:
  If the table has a pre 5.0 varbinary, table not to be altered so the field
  type is upgraded to 5.0 version and trailing space can be trimmed.
mysql-test/std_data/bug19371.MYD:
  New BitKeeper file ``mysql-test/std_data/bug19371.MYD''
mysql-test/std_data/bug19371.MYI:
  New BitKeeper file ``mysql-test/std_data/bug19371.MYI''
mysql-test/std_data/bug19371.frm:
  New BitKeeper file ``mysql-test/std_data/bug19371.frm''
2006-11-09 12:00:27 +01:00
unknown
7614eb0d1d Bug#21505 Create view - illegal mix of collation for operation 'UNION'
The problem was that any VIEW columns had always implicit derivation.
  Fix: derivation is now copied from the original expression
  given in VIEW definition.
  For example:
  - a VIEW column which comes from a string constant
    in CREATE VIEW definition have now coercible derivation.
  - a VIEW column having COLLATE clause
    in CREATE VIEW definition have now explicit derivation.


mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
sql/field.cc:
  Copying derivation from item to field.
sql/field.h:
  Adding derivation and methods to get/set it into Field.
sql/item.cc:
  Copying derivation from field to item.
sql/item.h:
  Moving "enum Derivation" declaration from item.h to mysql_priv.h
sql/mysql_priv.h:
  Moving "enum Derivation" declaration from item.h to mysql_priv.h
sql/sql_select.cc:
  Copying derivation from item to field in
  create_tmp_field_from_item() and create_tmp_field().
2006-11-09 14:41:34 +04:00
unknown
e0fc25e982 Bug#23619 Incorrectly escaped multibyte characters in binary log break replication
Problem: when embedding a character string with introducer with charset X
into a SQL query which is generally in character set Y, the string constants
were escaped according to their own character set (i.e.X), then after reading
such a "mixed" query from binlog, the string constants were unescaped
using character set of the query (i.e. Y), instead of X, which gave wrong
results or even syntax errors with tricky charsets (e.g. sjis)
Fix: when embedding a string constant of charset X into a query of charset Y,
the string constant is now escaped according to character Y, instead of
its own character set X.


mysql-test/r/ctype_cp932_binlog.result:
  Fixing test results.
sql/log_event.cc:
  Using character set "csinfo" instead of the string character set.
sql/sp_head.cc:
  - adding "thd" argument to sp_get_item_value()
    to have access to thd->variables.character_set_client
  - using character_set_client for escaping, instead of
    the string character set
mysql-test/r/rpl_charset_sjis.result:
  Adding test case
mysql-test/t/rpl_charset_sjis.test:
  Adding test case
2006-11-09 14:27:34 +04:00
unknown
6004231787 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/g50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
2006-11-09 00:26:22 +01:00
unknown
1144a46631 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1-rpl
into  mysql.com:/usr/home/bar/mysql-4.1.b23451v2


mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-08 22:03:08 +04:00
unknown
eca59e1faf Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my50-bug10963
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-11-08 10:18:16 -05:00
unknown
8b1f7c4852 bug#19402 SQL close to the size of the max_allowed_packet fails on slave
fixing a flow of the test


mysql-test/r/rpl_packet.result:
  results changed
mysql-test/t/rpl_packet.test:
  fixing a flaw in the test to create a table in MAX_NAME-sized db indeed.
  Upon that the `select to return 1' invariant holds.
2006-11-08 17:17:28 +02:00
unknown
3a86738289 Bug#10963: LEFT/RIGHT/SUBSTR/.. string functions returns wrong result \
on large length
  
Problem:  Most (all) of the numeric inputs were being coerced into
int (32 bit) sized variables.  Works OK for sane inputs; any input
larger than 2^32 (or 2^31 for signed vars) exihibited predictable
wrapping behavior (up to about 10^18) and then started having really
strange behaviour past that point (since the conversion to 64 bit int
from the DECIMAL type can do weird things on out of range numbers).

Solution: 1)  Add many tests.  2)  Convert input from (u)long type to
(u)longlong.  3)  Do (sometimes multiple) sanity checks on input,
keeping in mind that sometimes a negative longlong is not a negative
longlong (if the unsigned_flag is set).  4) Emulate existing behavior
w/rt negative and "small" out-of-bounds values.


mysql-test/r/func_str.result:
  Additional test results for #10963
mysql-test/t/func_str.test:
  Additional test results for #10963
sql/item_func.cc:
  Used larger type for counting, to avoid truncation.
sql/item_strfunc.cc:
  Fix for #10963, including comments and cleaned up logic
2006-11-08 10:11:02 -05:00
unknown
6bae01057c Merge mysql.com:/usr/home/bar/mysql-4.1.b23451v2
into  mysql.com:/usr/home/bar/mysql-5.0.b23451


mysql-test/r/func_gconcat.result:
  after merge fix
mysql-test/t/func_gconcat.test:
  after merge fix
sql/item_sum.cc:
  after merge fix
2006-11-08 17:03:37 +04:00
unknown
d301b4a0a5 Bug#22646 LC_TIME_NAMES: Assignment to non-UTF8 target fails
Problem: After introducing of LC_TIME_NAMES variable,  the 
function date_format() can return international non-ascii
characters in month and weekday names. Thus, it cannot return
a binary string anymore, because inserting a result of date_format()
into a column with non-utf8 character set produces garbage.
Fix: date_format() now returns a character string, using
"collation_connection" to detect character set and collation
for the returned value. This allows to insert
results of date_format() properly into columns with
various character sets.


mysql-test/r/ctype_utf8.result:
  Adding test case.
  Fixing old result.
mysql-test/t/ctype_utf8.test:
  Adding test case.
sql/item_timefunc.cc:
  DATE_FORMAT() now returns a character string
  instead of binary string:
  - make_date_time() now converts localte data from UTF8 to 
  the character set of "str" argument, instead of copying as is.
  - fix_dec_and_length() now uses "collation_connection"
  instead of "binary" for the result, it also now
  multiplies to mbmaxlen when calculating max_length
2006-11-08 15:37:54 +04:00
unknown
4a3d614352 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


configure.in:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
2006-11-08 11:40:33 +01:00
unknown
6befbec8bc Merge dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/4.1/bug19402-max_allowed
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/mysql-4.1-rpl


sql/slave.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2006-11-08 09:57:20 +02:00
unknown
5ad3ed8c19 Merge macbook.gmz:/Users/kgeorge/mysql/work/B11032-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B11032-5.0-opt


mysql-test/r/subselect.result:
  merge fixes
mysql-test/t/subselect.test:
  merge fixes
sql/item_subselect.cc:
  merge fixes
sql/item_subselect.h:
  merge fixes
2006-11-07 18:44:37 +02:00
unknown
5af4fd2563 Bug #11032: getObject() returns a String for a sub-query of type datetime
- When returning metadata for scalar subqueries the actual type of the
   column was calculated based on the value type, which limits the actual
   type of a scalar subselect to the set of (currently) 3 basic types : 
   integer, double precision or string. This is the reason that columns
   of types other then the basic ones (e.g. date/time) are reported as
   being of the corresponding basic type.
   Fixed by storing/returning information for the column type in addition
   to the result type.


mysql-test/r/subselect.result:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - test case
mysql-test/t/subselect.test:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - test case
sql/item_subselect.cc:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - store and return the field type as well in addition to result type for 
     single row subqueries
sql/item_subselect.h:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - store and return the field type as well in addition to result type for 
     single row subqueries
2006-11-07 18:16:17 +02:00
unknown
807d6c0950 bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values 2006-11-07 16:38:37 +01:00
unknown
c6de4d1c3b Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-07 12:02:53 +01:00
unknown
b227a3d348 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-11-07 12:00:55 +01:00
unknown
4d37f9b56a Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


sql/item.cc:
  Auto merged
mysql-test/r/order_by.result:
  SCCS merged
2006-11-07 11:53:48 +01:00
unknown
871378bc69 Merge alik.:/mnt/raid/alik/MySQL/devel/5.0
into  alik.:/mnt/raid/alik/MySQL/devel/5.0-rt


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/time.cc:
  Auto merged
2006-11-07 13:50:00 +03:00
unknown
b4093b65be Merge alik.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-11-07 13:45:56 +03:00
unknown
5ecb34c227 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-07 10:48:14 +01:00
unknown
4250321d43 Merge neptunus.(none):/home/msvensson/mysql/my50-rt-im_d_fix
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
2006-11-07 10:44:44 +01:00
unknown
d9360eae3b Bug#23451 GROUP_CONCAT truncates a multibyte utf8 character
Problem: GROUP_CONCAT on a multi-byte column can truncate
  in the middle of a multibyte character when applying
  group_concat_max_len limit. It produces an invalid
  multi-byte character in the result string.
  
The second, easier version - reusing old "warning_for_row" flag,
instead of introducing of "result_is_full" - which was
added in the previous commit.


mysql-test/r/func_gconcat.result:
  Adding test case
mysql-test/t/func_gconcat.test:
  Adding test case
sql/item_sum.cc:
  Adding well_formed_len() call not to cut
      in the middle of a multi-byte character.
2006-11-07 12:45:48 +04:00