Commit graph

10846 commits

Author SHA1 Message Date
unknown
71c896c2bf Bug#21042 mysql client segfaults on importing a mysqldump export
- Use strmake, that will both protect the buffer and make sure it's terminated by a zero
 - Add test case


client/mysql.cc:
  Use strmake instead of strxnmov as that function will make sure the string is terminated by 0
mysql-test/r/mysql.result:
  Update test result
mysql-test/t/mysql.test:
  Add test case
2006-07-31 14:22:32 +02:00
unknown
d55c770ac0 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-31 13:12:49 +02:00
unknown
414dda4949 perror returns 2 if it does not understand the option --ndb
Move that perror test to ndb_basic so it's only run when there is support for --ndb


mysql-test/r/ndb_basic.result:
  Move test of "perror --ndb" to this file
mysql-test/r/perror.result:
  Move test of "perror --ndb" to ndb_basic
mysql-test/t/ndb_basic.test:
  Move test of "perror --ndb" to this file
mysql-test/t/perror.test:
  Move test of "perror --ndb" to ndb_basic
2006-07-31 13:11:21 +02:00
unknown
08be4e96a9 Merge sunlight.local:/local_work/tmp_merge-4.1-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.0-opt-mysql


mysql-test/t/select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/func_group.result:
  Manual merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/subselect.result:
  Manual merge
2006-07-29 23:59:53 +04:00
unknown
74214b8635 Merge moonlight.intranet:/home/tomash/src/mysql_ab/tmp_merge
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-merge


configure.in:
  Auto merged
man/Makefile.am:
  Auto merged
mysys/my_bitmap.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_locale.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Manual merge.
sql/sql_select.cc:
  Manual merge.
2006-07-29 13:43:34 +04:00
unknown
32fbc6da63 Fix for bug #16226 (timestamp_diff truncation issue when requesting
difference between timestamp in values of months and quarters.)

Problem:  when requesting timestamp diff in months or quarters, it
would only examine the date (and not the time) for the comparison.

Solution:  increased precision of comparison.


mysql-test/r/func_time.result:
  Additional test results
mysql-test/t/func_time.test:
  Additional tests
sql/item_timefunc.cc:
  Fix for timestamp diff issue.  Added microsecond precision when
  comparing months or quarters; previously only examined date for
  these comparisons.
2006-07-28 20:51:17 -07:00
unknown
3c9ba0208a udf_example.c, udf.test, Makefile.am:
Converted "udf_example.cc" to C, avoids C++ runtime lib dependency (bug#21336)


sql/Makefile.am:
  "udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
mysql-test/t/udf.test:
  "udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
sql/udf_example.c:
  Changes to be strict ansi, except long long
2006-07-29 04:41:50 +02:00
unknown
d573ea1678 Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-16881


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-07-28 12:19:13 -07:00
unknown
1986093055 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  maint1.mysql.com:/data/localhome/tsmith/bk/global-50
2006-07-28 17:40:33 +02:00
unknown
918f9a3806 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug16581


sql/mysql_priv.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-07-28 18:07:47 +04:00
unknown
0abc107cd2 Bug#16581: deadlock: server and client both read from connection in
'conc_sys' test

Concurrent execution of SELECT involing at least two INFORMATION_SCHEMA
tables, DROP DATABASE statement and DROP TABLE statement could have
resulted in stalled connection for this SELECT statement.

The problem was that for the first query of a join there was a race
between select from I_S.TABLES and DROP DATABASE, and the error (no
such database) was prepared to be send to the client, but the join
processing was continued.  On second query to I_S.COLUMNS there was a
race with DROP TABLE, but this error (no such table) was downgraded to
warning, and thd->net.report_error was reset.  And so neither result
nor error was sent to the client.

The solution is to stop join processing once it is clear we are going
to report a error, and also to downgrade to warnings file system errors
like 'no such database' (unless we are in the 'SHOW' command), because
I_S is designed not to use locks and the query to I_S should not abort
if something is dropped in the middle.

No test case is provided since this bug is a result of a race, and is
timing dependant.  But we test that plain SHOW TABLES and SHOW COLUMNS
give a error if there is no such database or a table respectively.


mysql-test/r/show_check.result:
  Add result for the test that SHOW TABLES and SHOW COLUMNS give a error
  if there is no such database or a table respectively.
mysql-test/t/show_check.test:
  Add test case that SHOW TABLES and SHOW COLUMNS give a error
  if there is no such database or a table respectively.
sql/mysql_priv.h:
  Remove prototype of mysql_find_files(), which is made static under
  find_files() name.
sql/sql_show.cc:
  Rename mysql_find_files() to find_files() and make it static.
  Return FIND_FILES_OK for success, FIND_FILES_OOM for out of memory,
  and FIND_FILES_DIR for directory reading error.
  Downgrade error to warning in get_all_tables() if it is a
  FIND_FILES_DIR error, and we are not in the 'SHOW' command.
  Once 'result' is set to 1 in get_schema_tables_result(), there's no
  need in continuing iterations, as we are about to return a error.
2006-07-28 15:06:23 +04:00
unknown
d36f578130 Fix for BUG#20438: CREATE statements for views, stored routines and triggers
can be not replicable.

Now CREATE statements for writing in the binlog are created as follows:
  - the beginning of the statement is re-created;
  - the rest of the statement is copied from the original query.

The problem appears when there is a version-specific comment (produced by
mysqldump), started in the re-created part of the statement and closed in the
copied part -- there is closing comment-parenthesis, but there is no opening
one.

The proper fix could be to re-create original statement, but we can not
implement it in 5.0. So, for 5.0 the fix is just to cut closing
comment-parenthesis. This technique is also used for SHOW CREATE PROCEDURE
statement (so we are able to reuse existing code).


mysql-test/r/rpl_sp.result:
  Updated result file.
mysql-test/r/rpl_trigger.result:
  Updated result file.
mysql-test/r/rpl_view.result:
  Updated result file.
mysql-test/t/rpl_sp.test:
  Added test case for BUG#20438.
mysql-test/t/rpl_trigger.test:
  Added test case for BUG#20438.
mysql-test/t/rpl_view.test:
  Added test case for BUG#20438.
sql/sp.cc:
  Trim comments at the end.
sql/sp_head.cc:
  Moved this code to the separate function to be re-used.
sql/sql_lex.cc:
  Added a new function.
sql/sql_lex.h:
  Added a new function.
sql/sql_trigger.cc:
  Trim comments at the end.
sql/sql_view.cc:
  Trim comments at the end.
2006-07-28 02:49:18 +04:00
unknown
4d6efe891a Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-19498
2006-07-27 11:42:34 -07:00
unknown
3c10858474 Fix for BUG#16211: Stored function return type for strings is ignored.
Fix for BUG#16676: Database CHARSET not used for stored procedures

The problem in BUG#16211 is that CHARSET-clause of the return type for
stored functions is just ignored.

The problem in BUG#16676 is that if character set is not explicitly
specified for sp-variable, the server character set is used instead
of the database one.

The fix has two parts:

  - always store CHARSET-clause of the return type along with the
    type definition in mysql.proc.returns column. "Always" means that
    CHARSET-clause is appended even if it has not been explicitly
    specified in CREATE FUNCTION statement (this affects BUG#16211 only).

    Storing CHARSET-clause if it is not specified is essential to avoid
    changing character set if the database character set is altered in
    the future.

    NOTE: this change is not backward compatible with the previous releases.

  - use database default character set if CHARSET-clause is not explicitly
    specified (this affects both BUG#16211 and BUG#16676).

    NOTE: this also breaks backward compatibility.


mysql-test/r/mysqldump.result:
  Updated result file.
mysql-test/r/sp.result:
  Updated result file.
mysql-test/t/sp.test:
  Provided test cases for BUG#16211, BUG#16676.
sql/mysql_priv.h:
  Added two convenient functions for work with databases.
sql/sp.cc:
  1. Add CHARSET-clause to CREATE-statement if it has been explicitly specified.
  2. Polishing -- provided some comments.
sql/sp_head.cc:
  Use database charset as default charset of sp-variable.
sql/sp_head.h:
  Move init_sp_name() out of init_strings().
sql/sql_db.cc:
  Two new functions created:
    - load_db_opt_by_name();
    - check_db_dir_existence();
sql/sql_show.cc:
  Eliminate duplicated code by using
  check_db_dir_existence() and load_db_opt_by_name()
sql/sql_table.cc:
  Eliminate duplicated code by using
  check_db_dir_existence() and load_db_opt_by_name()
sql/sql_yacc.yy:
  Call sp_head::init_sp_name() to initialize stored routine name.
2006-07-27 17:57:43 +04:00
unknown
49d721d7cf Don't complain in the error log about IM shutdown unless
BUG#20761 is fixed.
2006-07-27 15:19:13 +04:00
unknown
a6557b0c94 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-release
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main


VC++Files/sql/mysqld.vcproj:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/warnings-master.opt:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-07-27 13:47:36 +04:00
unknown
667c73be65 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21019-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-07-27 10:11:13 +03:00
unknown
9c7a329eba Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20792-4.1-opt


sql/sql_select.cc:
  Auto merged
2006-07-27 10:06:37 +03:00
unknown
b60272915f Merge siva.hindu.god:/usr/home/tim/m/bk/global-41
into  siva.hindu.god:/usr/home/tim/m/bk/global-50


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/field.cc:
  Auto merged
2006-07-26 13:30:03 -06:00
unknown
bb81f6ac2d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20792-4.1-opt


sql/sql_select.cc:
  Auto merged
2006-07-26 19:55:33 +03:00
unknown
c7c8c33c5b Merge macbook.gmz:/Users/kgeorge/mysql/work/B20792-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B20792-5.0-opt


mysql-test/r/subselect2.result:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-07-26 19:23:44 +03:00
unknown
6b75e24b73 * Bug #20792: Incorrect results from aggregate subquery
When processing aggregate functions all tables values are reset
to NULLs at the end of each group. 
When doing that if there are no rows found for a group
the const tables must not be reset as they are not recalculated 
by do_select()/sub_select() for each group.


mysql-test/r/subselect2.result:
  * Bug #20792: Incorrect results from aggregate subquery
   - test suite for the bug. This is dependent on InnoDB despite
     the fact that the bug and the fix are not InnoDB specific.
     This is because of the table flag HA_NOT_EXACT_COUNT.
     When this flag is off (as in MyISAM) both t2 and t3 become of
     join type 'system' as they are estimated to have 1 record and
     and this statistics can be trusted (according to the absence of
     HA_NOT_EXACT_COUNT).
mysql-test/t/subselect2.test:
  * Bug #20792: Incorrect results from aggregate subquery
   - test suite for the bug
sql/sql_select.cc:
  * Bug #20792: Incorrect results from aggregate subquery
   - when clearing results if there are not rows found for group
     the const tables must not be reset as they are not recalculated
     for each group.
2006-07-26 19:19:30 +03:00
unknown
70d27b3503 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21019-4.1-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
mysql-test/t/select.test:
  SCCS merged
2006-07-26 18:49:26 +03:00
unknown
8c92143b4b Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
Correct merge
2006-07-26 18:18:34 +03:00
unknown
048fbb845d Merge macbook.gmz:/Users/kgeorge/mysql/work/B21019-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21019-5.0-opt


mysql-test/t/select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
2006-07-26 17:31:34 +03:00
unknown
6528be27b5 Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug20145
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-26 14:22:23 +02:00
unknown
595fdd6ba0 Update test result for perror
mysql-test/r/perror.result:
  Add error result for 1186
  Remove the result for the others
mysql-test/t/perror.test:
  As it's only just interesting to see that perror doesn't crash(and as result varies across platforms), send result to /dev/null
2006-07-26 14:21:40 +02:00
unknown
de41f4e7bb Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror
- Since error 1186 is not found among NDB error codes, the message retuned should indicate that.


extra/perror.c:
  Move the !found out one level
mysql-test/t/perror.test:
  Add test case for bug#16561
ndb/src/kernel/error/ndbd_exit_codes.c:
  Check not only for zero size string but also classification "unknown error" when looking for an error mesage for an error code
2006-07-26 14:09:20 +02:00
unknown
b03b6c868e Bug#19890 mysqltest: "query" command is broken
- Allow "query" to be used as a prefix for focing a command to be sent to server
 - Add testcases


client/mysqltest.c:
  To force something being sent as a query to the mysqld one can
  use the prefix "query". Remove "query" from string before executing.
mysql-test/r/mysqltest.result:
  Add test case for "query" command
mysql-test/t/mysqltest.test:
  Add test case for "query" command
2006-07-26 14:02:24 +02:00
unknown
5ca1ee5eea Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're
 united into a single condition on the key and checked together the server must 
 check which value is the NULL value in a correct way : not only using ->is_null 
 but also check if the expression doesn't depend on any tables referenced in the 
 current statement. 
 This additional check must be performed because that optimization takes place 
 before the actual execution of the statement, so if the field was initialized 
 to NULL from a previous statement the optimization would be applied incorrectly.


mysql-test/r/select.result:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - test case
mysql-test/t/select.test:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - test case. 
     Note that ALTER TABLE is important here : it happens to
     leave the Field instance for t1.b set to NULL, witch is vital for
     demonstrating the problem fixed by this changeset.
sql/sql_select.cc:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - check whether a value is null taking into account its table dependency.
2006-07-26 13:32:28 +03:00
unknown
ef0cc9ebd0 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Modify test case to workaround the test tool problem
 - (Null merge into 5.0)


mysql-test/t/mysqlbinlog.test:
  Send the ouput from "mysqlbinlog" to a file and then read execute it with "mysql"
  This is a workaround for a windows bug in the test tools in mysql-4.1, which makes
  it impossible to use "|" to send the output from one program directly to the other.
  This has been fixed in mysql-5.0.
2006-07-26 11:08:15 +02:00
unknown
3809117084 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21086-5.0-opt
2006-07-26 11:56:39 +03:00
unknown
03fc0a8fb1 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  lamia.home:/home/tkatchaounov/autopush/4.1-bug-20954


mysql-test/r/subselect.result:
  Auto merged
2006-07-26 01:21:35 +03:00
unknown
585b5bbc92 Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
The problem was in that opt_sum_query() replaced MIN/MAX functions
with the corresponding constant found in a key, but due to imprecise
representation of float numbers, when evaluating the where clause,
this comparison failed.

When MIN/MAX optimization detects that all tables can be removed,
also remove all conjuncts in a where clause that refer to these
tables. As a result of this fix, these conditions are not evaluated
twice, and in the case of float number comparisons we do not discard
result rows due to imprecise float representation.

As a side-effect this fix also corrects an unnoticed problem in
bug 12882.


mysql-test/r/func_group.result:
  BUG#20954 - test result adjustment.
  Adjusted the test result of bug 12882 which was not preperly fixed.
  The current patch corrects the problem that was fully corrected by the
  patch for 12882.
  
  The problem was that opt_sum_query() indicated that the optimizer may
  remove all tables because all MIN/MAX/COUNT functions are constants,
  but this lead to an empty result instead of NULL because the WHERE
  clause was still evaluated.
  
  The current fix removes all conjuncts in the where clause that
  reference the removed tables, and thus corrects the problem.
mysql-test/r/select.result:
  BUG#20954 - added test
mysql-test/r/subselect.result:
  BUG#20954 - test result adjustment.
  
  The fix removes those conditions in a where clause that refer to
  tables optimized away by MIN/MAX optimization (opt_sum_query()).
mysql-test/t/select.test:
  BUG#20954 - added test
sql/sql_select.cc:
  Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
  
  When MIN/MAX optimization detects that all tables can be removed,
  also remove all conjuncts in a where clause that refer to these
  tables. As a result of this fix, these conditions are not evaluated
  twice, and in the case of float number comparisons we do not discard
  result rows due to imprecise float representation.
  
  As a side-effect this fix also corrects an unnoticed problem in
  bug 12882.
2006-07-26 01:11:19 +03:00
unknown
beb6f57c41 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/19862-bug-5.0-opt-mysql


sql/item_func.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-07-26 00:37:35 +04:00
unknown
9a63adc8fd Fixed bug#19862: Sort with filesort by function evaluates function twice
When there is no index defined filesort is used to sort the result of a
query. If there is a function in the select list and the result set should be
ordered by it's value then this function will be evaluated twice. First time to
get the value of the sort key and second time to send its value to a user.
This happens because filesort when sorts a table remembers only values of its
fields but not values of functions.
All functions are affected. But taking into account that SP and UDF functions
can be both expensive and non-deterministic a temporary table should be used 
to store their results and then sort it to avoid twice SP evaluation and to 
get a correct result.

If an expression referenced in an ORDER clause contains a SP or UDF 
function, force the use of a temporary table.

A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.


mysql-test/t/udf.test:
  Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/t/sp.test:
  Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/sp.result:
  Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/udf.result:
  Added test case for bug#19862: Sort with filesort by function evaluates function twice
sql/sql_select.cc:
  Fixed bug#19862: Sort with filesort by function evaluates function twice
  If an expression referenced in an ORDER clause contains a SP or UDF
  function, force the use of a temporary table.
sql/item_func.h:
  Fixed bug#19862: Sort with filesort by function evaluates function twice
  A new Item_processor function called func_type_checker_processor is added
  to check whether the expression contains a function of a particular type.
sql/item.h:
  Fixed bug#19862: Sort with filesort by function evaluates function twice
  A new Item_processor function called func_type_checker_processor is added
  to check whether the expression contains a function of a particular type.
sql/item_func.cc:
  Fixed bug#19862: Sort with filesort by function evaluates function twice
  A new Item_processor function called func_type_checker_processor is added
  to check whether the expression contains a function of a particular type.
2006-07-26 00:31:29 +04:00
unknown
ca3dbd26d4 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-25 12:47:01 -07:00
unknown
1b3cdb6085 Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
When executing INSERT over a view with calculated columns it was assuming all
  elements of the fields collection are actually Item_field instances.
  This may not be true when inserting into a view and that view has columns that are 
  such expressions that allow updating (like setting a collation for example).
  Corrected to access field information through the filed_for_view_update() function and 
  retrieve correctly the field info even for "update-friendly" non-Item_field items.


mysql-test/r/view.result:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - test suite
mysql-test/t/view.test:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - test suite
sql/item_strfunc.h:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - obvious typo fixed
sql/sql_base.cc:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - must access field information through the filed_for_view_update() function to retrieve
     correctly the field info even for "update-friendly" non-Item_field items.
2006-07-25 18:42:49 +03:00
unknown
b0b0c8cc1f "mysql-test-run.pl" must write a "Logging:" line for the evaluation of RPM build tests.
(Re-apply a patch from the general tree to the clone.)


mysql-test/mysql-test-run.pl:
  "mysql-test-run.pl" must write a "Logging:" line for the evaluation of RPM build tests.
  (Re-apply a patch from the general tree to the clone.)
2006-07-25 12:56:23 +02:00
unknown
bc6fd749b7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B16712-5.0-opt


sql/item_sum.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-07-25 11:56:22 +03:00
unknown
4e7121c07b Bug#16712: group_concat returns odd srting insead of intended result
when calculating GROUP_CONCAT all blob fields are transformed
  to varchar when making the temp table.
  However a varchar has at max 2 bytes for length. 
  This fix makes the conversion only for blobs whose max length 
  is below that limit. 
  Otherwise blob field is created by make_string_field() call.


mysql-test/r/func_gconcat.result:
  Bug#16712: group_concat returns odd srting insead of intended result
    * testsuite for the bug
mysql-test/t/func_gconcat.test:
  Bug#16712: group_concat returns odd srting insead of intended result
    * testsuite for the bug
sql/item_sum.cc:
  Bug#16712: group_concat returns odd srting insead of intended result
    * force blob->varchar conversion for small enough blobs only
sql/sql_select.cc:
  Bug#16712: group_concat returns odd srting insead of intended result
    * force blob->varchar conversion for small enough blobs only
2006-07-25 11:45:10 +03:00
unknown
d64f605e48 Fixed bug #21231: wrong results for a simple query with a
a non-correlated single-row subquery over information schema.

The function get_all_tables filling all information schema
tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
this the function could evaluate partial conditions related to
some columns. If these conditions contained a subquery over
information schema it led to a wrong evaluation and a wrong 
result set.
This bug was already fixed in 5.1.
This patch follows the way how it was done in 5.1 where
the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
in get_all_tables only for the calls of the function 
open_normal_and_derived_tables and is restored after these
calls.


mysql-test/r/information_schema.result:
  Added a test case for bug #21231.
mysql-test/t/information_schema.test:
  Added a test case for bug #21231.
2006-07-24 19:05:46 -07:00
unknown
c4bfacd777 Bug #16502: mysqlcheck gets confused with views
Make mysqlcheck skip over views when processing all of the tables in a
  database.


client/mysqlcheck.c:
  Use SHOW TABLE STATUS to get table list, and skip over things that don't
  have an engine (like a VIEW).
mysql-test/r/mysqlcheck.result:
  Add new results
mysql-test/t/mysqlcheck.test:
  Add new regression test
2006-07-24 13:31:20 -07:00
unknown
d2f447a9b4 Bug #19265 describe command does not work from mysql prompt
- Add test case


mysql-test/r/mysql.result:
  Update test result
mysql-test/t/mysql.test:
  Add test for mysql using DESC command
2006-07-24 19:01:54 +02:00
unknown
a96669395c Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug20145
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 18:21:15 +02:00
unknown
def55c5219 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Send confusing output to /dev/null


mysql-test/t/mysqlbinlog.test:
  Send confusing error messages to /dev/null so they don't appear in erro log if test case fails
2006-07-24 18:12:57 +02:00
unknown
0227a7b066 Bug#20145 perror segfault when call it with error nr
- Add test case(execute perror)
  - Check if strerror has returned NULL and set msg to "Unknown Error" in that case
  - Thanks to Steven Xie for pointing out how to fix. 


extra/perror.c:
  strerror might return NULL on Solaris 2.8
mysql-test/mysql-test-run.pl:
  Add possibility to execute perror from test case
mysql-test/r/have_perror.require:
  New BitKeeper file ``mysql-test/r/have_perror.require''
mysql-test/r/perror.result:
  New BitKeeper file ``mysql-test/r/perror.result''
mysql-test/t/perror.test:
  New BitKeeper file ``mysql-test/t/perror.test''
2006-07-24 18:05:00 +02:00
unknown
568b49fb7d Bug#21125 mysqldump: Problem with non-standard table names
- The mysql-test/std_data/bug15328.cnf file was not copied to install or dist dir.


mysql-test/Makefile.am:
  Add std_data/*.cnf files to dist_hook and install-data-local
scripts/make_win_src_distribution.sh:
  Copy *.cnf files as well.
2006-07-24 14:31:37 +02:00
unknown
3037459ad5 BUG#14702: misleading error message when syntax error in
CREATE PROCEDURE

The bug was fixed already.  This changeset adds a test case.


mysql-test/r/sp-error.result:
  Add result for bug#14702: misleading error message when syntax error
  in CREATE PROCEDURE.
mysql-test/t/sp-error.test:
  Add test case for bug#14702: misleading error message when syntax error
  in CREATE PROCEDURE.
2006-07-24 15:10:50 +04:00
unknown
a08a110878 Bug#21215 mysqldump creating incomplete backups without warning
- Add call to 'safe_exit' function when db query fails.


client/mysqldump.c:
  Add a call to 'safe_exit' to remember the error code and exit unless --force was give.n
mysql-test/r/mysqldump.result:
  Add test result
mysql-test/t/mysqldump.test:
  Add test case
2006-07-24 13:10:24 +02:00
unknown
a2df3e6365 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370
2006-07-23 16:26:12 +05:00
unknown
c2c79987fc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370
2006-07-23 15:45:00 +05:00
unknown
2522343924 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b8143
2006-07-23 15:28:50 +05:00
unknown
16878843e0 Fix for bug #8143: A date with value 0 is treated as a NULL value
mysql-test/r/delete.result:
  Fix for bug #8143: A date with value 0 is treated as a NULL value
    - test result
mysql-test/t/delete.test:
  Fix for bug #8143: A date with value 0 is treated as a NULL value
    - test case
sql/sql_delete.cc:
  Fix for bug #8143: A date with value 0 is treated as a NULL value
    - during SELECT queries processing we convert 'date[time]_field is null' 
      conditions into 'date[time]_field = 0000-00-00[ 00:00:00]' for not null 
      DATE and DATETIME fields. To be consistent, we have to do the same for DELETE
      queries. So we should call remove_eq_conds() in the mysql_delete() as well.
      Also it may simplify and speed up DELETE queries execution.
2006-07-23 15:25:30 +05:00
unknown
9d5b76eba9 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b16327


sql/field.cc:
  Auto merged
mysql-test/r/func_time.result:
  merging
mysql-test/t/func_time.test:
  merging
2006-07-23 14:17:01 +05:00
unknown
8819a677cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370


mysql-test/r/date_formats.result:
  Auto merged
2006-07-23 13:43:44 +05:00
unknown
774300afe4 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b10966


mysql-test/r/func_group.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
2006-07-23 12:58:26 +05:00
unknown
800b160031 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-22 12:45:45 -07:00
unknown
43df9fd34c Fixed bug #18925: wrong results for queries with
subqueries on information schema that use MIN/MAX aggregation.

Execution of some correlated subqueries may set the value
of null_row to 1 for tables used in the subquery.
If the the subquery is on information schema it causes
rejection of any row for the following executions of
the subquery in the case when an optimization filtering
by some condition is applied.

The fix restores the value of the null_row flag for 
each execution of a subquery on information schema.


mysql-test/r/information_schema.result:
  Added a test case for bug #18925.
mysql-test/t/information_schema.test:
  Added a test case for bug #18925.
sql/sql_show.cc:
  Fixed bug #18925.
  Execution of some correlated subqueries may set the value
  of null_row to 1 for tables used in the subquery.
  If the the subquery is on information schema it causes
  rejection of any row for the following execitions of
  the subquery in the case when an optimization filtering
  by some condition is applied.
  
  The fix restores the value of the null_row flag for 
  each execution of a subquery on information schema.
2006-07-22 12:44:54 -07:00
unknown
8a596b0237 Merge office:mysql/autopush/B20466-5.0-opt
into  macbook.mshome.net:/Users/kgeorge/mysql/work/B20466-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-07-22 15:18:30 +03:00
unknown
c24e91ece7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
2006-07-22 14:03:42 +03:00
unknown
0950a31683 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-opt2
2006-07-22 15:03:41 +04:00
unknown
cf1c7cb203 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
2006-07-22 09:11:50 +03:00
unknown
da0d9f37c4 Bug #19147: mysqlshow INFORMATION_SCHEMA does not work
When a wildcard database name is given the mysqlshow, but that wildcard
  matches one database *exactly* (it contains the wildcard character), we
  list the contents of that database instead of just listing the database
  name as matching the wildcard. Probably the most common instance of users
  encountering this behavior would be with "mysqlshow information_schema".


client/mysqlshow.c:
  Add special handling for listing a single database that has a name that
  looked like it contained wildcards. In this case, we just go ahead and list
  the contents of the database, since there is a very high probability that is
  what the user really wanted to do. (For example, 'mysqlshow INFORMATION_SCHEMA'
  will show the I_S tables instead of just the I_S database.)
mysql-test/r/mysqlshow.result:
  Add new results
mysql-test/t/mysqlshow.test:
  Add new regression test
2006-07-21 20:29:25 -07:00
unknown
8fc51f7aa6 Merge mysql.com:/home/psergey/mysql-4.1-opt
into  mysql.com:/home/psergey/mysql-5.0-opt2


mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
2006-07-22 02:41:29 +04:00
unknown
9d432f0dae Add missing "DROP TABLE" clause 2006-07-22 02:36:17 +04:00
unknown
f171d628c7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql


mysql-test/r/create.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
mysql-test/r/union.result:
  SCCS merged
mysql-test/t/union.test:
  SCCS merged
2006-07-22 02:15:36 +04:00
unknown
35209c68ea Fixed bug#12185: Data type aggregation may produce wrong result
The Item::tmp_table_field_from_field_type() function creates Field_datetime
object instead of Field_timestamp object for timestamp field thus always
changing data type is a tmp table is used.

The Field_blob object constructor which is used in the 
Item::tmp_table_field_from_field_type() is always setting packlength field of
newly created blob to 4. This leads to changing fields data type for example
from the blob to the longblob if a temporary table is used.

The Item::make_string_field() function always converts Field_string objects 
to Field_varstring objects. This leads to changing data type from the 
char/binary to varchar/varbinary.

Added appropriate Field_timestamp object constructor for using in the 
Item::tmp_table_field_from_field_type() function.

Added Field_blob object constructor which sets pack length according to
max_length argument.

The Item::tmp_table_field_from_field_type() function now creates
Field_timestamp object for a timestamp field.

The Item_type_holder::display_length() now returns correct NULL length NULL
length. 

The Item::make_string_field() function now doesn't change Field_string to
Field_varstring in the case of Item_type_holder. 

The Item::tmp_table_field_from_field_type() function now uses the Field_blob
constructor which sets packlength according to max_length.


mysql-test/t/union.test:
  Added test case for bug#12185: Data type aggregation may produce wrong result
  Corrected test case after fix for bug#12185
mysql-test/t/innodb.test:
  Corrected test case after fix for bug#12185
mysql-test/r/union.result:
  Added test case for bug#12185: Data type aggregation may produce wrong result
   Corrected test case after fix for bug#12185
mysql-test/r/innodb.result:
  Corrected test case after fix for bug#12185
mysql-test/r/create.result:
  Corrected the test case after fixing bug#12185
sql/field.h:
  Fixed bug#12185: Data type aggregation may produce wrong result
  Added Field_blob object constructor which sets packlength according to
  max_length argument.
sql/item.cc:
  Fixed bug#12185: Data type aggregation may produce wrong result
  The Item::make_string_field() function now doesn't change Field_string to
  Field_varstring in the case of Item_type_holder.
  The Item::tmp_table_field_from_field_type() function now creates
  Field_timestamp object for a timestamp field.
  The Item::tmp_table_field_from_field_type() function now uses the Field_blob
  constructor which sets packlength according to max_length.
  The Item_type_holder::display_length() now returns correct NULL length NULL
  length.
sql/field.cc:
  Fixed bug#12185: Data type aggregation may produce wrong result
  Added appropriate Field_timestamp object constructor for using in the 
  Item::tmp_table_field_from_field_type() function.
2006-07-22 02:08:00 +04:00
unknown
d37456f745 Bug #16881: password() and union select
This was only demonstrated by the use of PASSWORD(), it was not related to
  that function at all. The calculation of the size of a field in the results
  of a UNION did not take into account the possible growth of a string field
  when being converted to the aggregated character set.


mysql-test/r/union.result:
  Add new results
mysql-test/t/union.test:
  Add new regression test
sql/item.cc:
  Fix calculation of max_length when figuring out the type of a column in
  a UNION. It needs to take into account any expansion of field size due to
  charset conversions.
2006-07-21 13:28:42 -07:00
unknown
12d6b9c7f1 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug19207


sql/sql_yacc.yy:
  Auto merged
2006-07-22 00:08:45 +04:00
unknown
c13be23004 Merge mysql.com:/home/psergey/mysql-4.1-opt
into  mysql.com:/home/psergey/mysql-5.0-opt


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
sql/mysql_priv.h:
  Manual merge
2006-07-21 23:45:34 +04:00
unknown
7118c2523c Bug #20466: a view is mixing data when there's a trigger on the table
When making a place to store field values at the start of each group
  the real item (not the reference) must be used when deciding which column
  to copy.


mysql-test/r/group_by.result:
  Bug #20466: a view is mixing data when there's a trigger on the table
   - test suite for the bug
mysql-test/t/group_by.test:
  Bug #20466: a view is mixing data when there's a trigger on the table
   - test suite for the bug
sql/sql_select.cc:
  Bug #20466: a view is mixing data when there's a trigger on the table
   - deal correctly with references
2006-07-21 20:44:35 +03:00
unknown
a7ba5b75a6 Merge bk://anubis/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/merge/mysql-5.0


sql/handler.cc:
  Auto merged
2006-07-21 10:14:25 -07:00
unknown
47d6f7a60c Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
2006-07-21 18:10:37 +03:00
unknown
8024aabb76 Bug #20868: Client connection is broken on SQL query error
An aggregate function reference was resolved incorrectly and
caused a crash in count_field_types.
 Must use real_item() to get to the real Item instance through
the reference


mysql-test/r/func_group.result:
  Bug #20868: Client connection is broken on SQL query error
   * test case for the bug
mysql-test/t/func_group.test:
  Bug #20868: Client connection is broken on SQL query error
   * test case for the bug
sql/sql_select.cc:
  Bug #20868: Client connection is broken on SQL query error
   * correctly resolve aggregate function references.
2006-07-21 17:59:52 +03:00
unknown
f57bb34775 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-07-21 13:04:40 +03:00
unknown
4e59d30dc9 Fix for BUG#21007.
The problem was that store_top_level_join_columns() incorrectly assumed
that the left/right neighbor of a nested join table reference can be only
at the same level in the join tree.

The fix checks if the current nested join table reference has no immediate
left/right neighbor, and if so chooses the left/right neighbors of the
nearest upper level, where these references are != NULL.


mysql-test/r/group_min_max.result:
  Test for BUG#21007.
mysql-test/t/group_min_max.test:
  Test for BUG#21007.
sql/sql_base.cc:
  After computing and materializing the columns of all NATURAL joins in a FROM clause,
  the procedure store_top_level_join_columns() has to change the current natural join
  into a leaf table reference for name resolution. For this it needs to make the left
  neighbor point to the natural join table reference, and the natural join itself point
  to its left neighbor.
  
  This fix correctly determines the left/right neighbors of a table reference, even if
  the neghbors are at higher levels in the nested join tree. The rule is that if a table
  reference has no immediate left/right neighbors, we recursively pick the left/right
  neighbor of the level(s) above.
2006-07-21 11:59:46 +03:00
unknown
1376b5817f Merge patch for bug #15195 from 5.0 -> 5.0-release (for 5.0.24) 2006-07-21 09:53:12 +02:00
unknown
68698c04ab BUG#20975: Incorrect query result for NOT (subquery):
Add implementations of Item_func_{nop,not}_all::neg_transformer


mysql-test/r/subselect.result:
  BUG#20975: testcase
mysql-test/t/subselect.test:
  BUG#20975: testcase
sql/mysql_priv.h:
  Make chooser_compare_func_creator visible in item.h
2006-07-21 03:04:04 +04:00
unknown
22a963080b Merge neptunus.(none):/home/msvensson/mysql/bug7498/my50-bug7498
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2006-07-20 13:41:50 +02:00
unknown
d8180d44b8 Fix for BUG#20716: SHOW INSTANCES statement causes races in IM tests.
Fix for the bug in mysql-test-run.pl which prevents other tests succeed
after IM-test failure.
  
The idea of the fix of BUG#20716 is to:
  1. Check each SHOW INSTANCES statement, add necessary "sleep" instruction before;
  2. Move all environment checkings into the one file and include it everywhere.


mysql-test/mysql-test-run.pl:
  Fix bug in mysql-test-run.pl -- kill leftovers if some
  guarded mysqld-instance is still alive after IM shutdown.
mysql-test/r/im_daemon_life_cycle.result:
  Updated result file.
mysql-test/r/im_life_cycle.result:
  Updated result file.
mysql-test/r/im_options_set.result:
  Updated result file.
mysql-test/r/im_options_unset.result:
  Updated result file.
mysql-test/r/im_utils.result:
  Updated result file.
mysql-test/t/im_daemon_life_cycle.imtest:
  Include im_check_env.inc for the checking of environment.
mysql-test/t/im_life_cycle.imtest:
  Include im_check_env.inc for the checking of environment.
mysql-test/t/im_options_set.imtest:
  Include im_check_env.inc for the checking of environment.
mysql-test/t/im_options_unset.imtest:
  Include im_check_env.inc for the checking of environment.
mysql-test/t/im_utils.imtest:
  Include im_check_env.inc for the checking of environment.
mysql-test/include/im_check_env.inc:
  A new file to be included in each IM-test.
  The statements in the file ensure that starting
  conditions (environment) are as expected.
2006-07-20 13:24:12 +04:00
unknown
d7baef2a65 Partial merge of the patch for bug #15195 from 4.1 -> 5.0; more changes needed 2006-07-20 00:45:47 -06:00
unknown
f8dda7bfb9 Added a test case with views for bug #17526.
mysql-test/r/func_str.result:
  Adjusted results for the test case of bug 17526.
sql/item_strfunc.cc:
  Post-merge modification
2006-07-19 16:42:19 -07:00
unknown
f794dc3aa1 Manual merge required.
mysql-test/r/mysql_client.result:
  manual merge
mysql-test/t/mysql_client.test:
  manual merge
2006-07-19 17:39:53 -04:00
unknown
e71f3f1f14 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug20328


client/mysql.cc:
  Auto merged
mysql-test/r/bug20328.result:
  Merge rename: mysql-test/r/mysql_client.result -> mysql-test/r/bug20328.result
mysql-test/t/bug20328.test:
  Merge rename: mysql-test/t/mysql_client.test -> mysql-test/t/bug20328.test
2006-07-19 17:00:39 -04:00
unknown
ef9e634624 Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2006-07-19 13:44:37 -07:00
unknown
6ec7976df9 Fixed bug #17526: incorrect print method
for class Item_func_trim. 
For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
if expressions with the TRIM function of two arguments were used.
For 5.0 it caused an error message when trying to select
from a view with the TRIM function of two arguments.
This unexpected error message was due to the fact that the
print method for the class Item_func_trim was inherited from
the class Item_func. Yet the TRIM function does not take a list
of its arguments. Rather it takes the arguments in the form:
  [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
  [remstr FROM] str


mysql-test/r/func_str.result:
  Added a test case for bug #17526: uncorrect print method
  for class Item_func_trim.
mysql-test/t/func_str.test:
  Added a test case for bug #17526: incorrect print method
  for class Item_func_trim.
sql/item_strfunc.cc:
  Fixed bug #17526: incorrect print method
  for class Item_func_trim.
      
  Added an implementation for the virtual function print
  in the class Item_func_trim.
  The implementation takes into account the fact the TRIM
  function takes the arguments in the following forms:
    [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
    [remstr FROM] str
sql/item_strfunc.h:
  Fixed bug #17526: incorrect print method
  for class Item_func_trim.
      
  Added an implementation for the virtual function print
  in the class Item_func_trim.
  Declared a virtual method to return the mode of the TRIM 
  function: LEADING, TRAILING or BOTH.
  Added implementations of this method for Item_func_trim and
  its descendants Item_func_ltrim and Item_func_rtrim.
2006-07-19 12:36:55 -07:00
unknown
0fa250a936 A fix and a test case for Bug#21002 "Derived table not selecting from a
"real" table fails in JOINs".

This is a regression caused by the fix for Bug 18444. 
This fix removed the assignment of empty_c_string to table->db performed 
in add_table_to_list, as neither me nor anyone else knew what it was 
there for. Now we know it and it's covered with tests: the only case 
when a table database name can be empty is when the table is a derived 
table. The fix puts the assignment back but makes it a bit more explicit.

Additionally, finally drop sp.result.orig which was checked in by mistake. 


BitKeeper/deleted/.del-sp.result.orig:
  Delete: mysql-test/r/sp.result.orig
mysql-test/r/derived.result:
  Updated result file.
mysql-test/r/sp.result:
  Test results fixed (Bug#21002)
mysql-test/t/derived.test:
  New error return for the case when MULTI-DELETE tries to delete from
  a derived table: now derived tables belong to their own db (""), and
  MUTLI-DELETE can't find the correspondent table for it in the 
  DELETE list, as it can't resolve tables in different dbs by alias
  (See Bug#21148 for details)
mysql-test/t/sp.test:
  Add a test case for Bug#21002 "Derived table not selecting from a "real"
   table fails in JOINs"
sql/sp.cc:
  Make empty_c_string globally accessible.
sql/sql_class.cc:
  Add empty_c_string definition.
sql/sql_class.h:
  Add a comment for the constructor of Table_ident which is
  used for derived tables. Make sure this constructor also initializes
  the database name, not only the table name.
sql/sql_parse.cc:
  Don't call check_db_name for empty database. 
  Currently the only case when a table database name can be empty
  is when the table is a derived table.
  Report the right error if the database name is wrong (ER_WRONG_DB_NAME,
  not ER_WRONG_TABLE_NAME).
2006-07-19 22:33:19 +04:00
unknown
8a08c80235 Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0-release
into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0


sql/sql_insert.cc:
  Auto merged
2006-07-19 19:52:27 +02:00
unknown
73f47590aa Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug16180


sql/set_var.cc:
  Auto merged
2006-07-19 13:09:11 -04:00
unknown
846a99dcd7 manual merge, part 2/2
mysql-test/r/mysqldump.result:
  manual mergies, part 2/2
2006-07-19 16:50:55 +02:00
unknown
92bbb54092 Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0-release
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-merge


support-files/mysql.spec.sh:
  Auto merged
client/mysqldump.c:
  manual merge
mysql-test/r/mysqldump.result:
  manual merge
mysql-test/t/mysqldump.test:
  manual merge
2006-07-19 14:12:30 +02:00
unknown
c185144609 Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
REPLACE ... SELECT would require INSERT privileges on certain tables
when SELECT really suffices. Require INSERT only on target table.


mysql-test/r/insert_select.result:
  Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
  
  Show that REPLACE ... SELECT requires INSERT privileges only on target table.
  (revised test with more view-fu)
mysql-test/t/insert_select.test:
  Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
  
  Show that REPLACE ... SELECT requires INSERT privileges only on target table.
  (revised test with more view-fu)
sql/sql_insert.cc:
  Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
  
  require SELECT rather than INSERT privs on tables that constitute the views we'll read
2006-07-19 11:49:07 +02:00
unknown
9378fc627e "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Post merge changes.
2006-07-18 18:41:36 -07:00
unknown
6ab68cdf29 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.0-bug18764.2


mysql-test/r/federated.result:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  hand merge
mysql-test/t/federated.test:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  hand merge
sql/ha_federated.cc:
  "BUG #18764: Delete conditions causing inconsistencies in Federated tables"
  
  hand merge
2006-07-18 17:21:50 -07:00
unknown
20c2ddaf0c Bug #19498: Inconsistent support for DEFAULT in TEXT columns
When a default of '' was specified for TEXT/BLOB columns, the specification
  was silently ignored. This is presumably to be nice to applications (or
  people) who generate their column definitions in a not-very-clever fashion.

  For clarity, doing this now results in a warning, or an error in strict
  mode.


mysql-test/r/federated.result:
  Update results
mysql-test/r/fulltext_distinct.result:
  Update results
mysql-test/r/fulltext_update.result:
  Update results
mysql-test/r/gis-rtree.result:
  Update results
mysql-test/r/gis.result:
  Update results
mysql-test/r/join_outer.result:
  Update results
mysql-test/r/order_by.result:
  Update results
mysql-test/r/type_blob.result:
  Add new results
mysql-test/r/type_ranges.result:
  Update results
mysql-test/t/type_blob.test:
  Add new test
sql/field.cc:
  Issue a warning when setting '' as the default on a BLOB/TEXT column,
  and make it an error in strict mode. Also, clarify comments about when
  NO_DEFAULT_VALUE_FLAG is set.
2006-07-18 16:04:18 -07:00
unknown
dc50ce9970 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-07-18 23:45:17 +04:00
unknown
6abe1c7158 Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
2006-07-18 23:30:09 +04:00
unknown
d13a39b583 Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-17903
2006-07-18 10:58:44 -07:00
unknown
ec40f4a588 Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/time.cc:
  Manual merge
2006-07-18 21:32:25 +04:00