Commit graph

23216 commits

Author SHA1 Message Date
unknown
124af3f873 Bug #31866: MySQL Server crashes on SHOW CREATE TRIGGER statement
SHOW CREATE TRIGGER was not checking for detected errors 
opening/reading the trigger file. 
Fixed to return the already generated error.


mysql-test/r/trigger.result:
  Bug #31866: test case
mysql-test/t/trigger.test:
  Bug #31866: test case
sql/sql_show.cc:
  Bug #31866: test for error and return it.
2007-11-01 14:42:14 +02:00
unknown
74394b27fe Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge
2007-11-01 06:35:22 -06:00
unknown
4f7f5941ed Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


client/mysqldump.c:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-11-01 12:30:45 +01:00
unknown
ad723cd5f8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2


sql/sql_parse.cc:
  Auto merged
2007-11-01 14:24:32 +03:00
unknown
189ec0e0af A fix for Bug#32007 select udf_function() doesn't return an error if error
during udf initialization. The bug is spotted while working on Bug 12713.

If a user-defined function was used in a SELECT statement, and an
error would occur during UDF initialization, this error would not terminate
execution of the SELECT, but rather would be converted to a warning.

The fix is to use a stack buffer to store the message from udf_init instead
of private my_error() buffer.


mysql-test/r/udf.result:
  Update the result to reflect the fix for Bug#32007 select udf_function() 
  doesn't return an error if error during udf initialization
mysql-test/t/udf.test:
  Update the test to reflect the fix for Bug #32007 select udf_function() 
  doesn't return an error if error during udf initialization
sql/item_func.cc:
  A fix for Bug#32007.
  
  net.last_error buffer was used to store the temporary message from udf_init.
  Then, when my_error() was called, net.last_error was not empty so 
  my_error() would conclude that there is already an error in the error stack, 
  and not "overwrite" it.
  However, thd->net.report_error was not set, so the the 
  SELECT was not aborted.
  
  The fix is to use a stack buffer instead of thd->net.last_error
  to store the message from udf_init. The message will end up in
  thd->net.last_error anyway after a call to my_error.
2007-11-01 00:31:57 +03:00
unknown
bfae473053 Remove net_printf_error(). Do not talk to network directly in
check_user()/check_connection()/check_for_max_user_connections().

This is a pre-requisite patch for the fix for Bug#12713 "Error in a stored 
function called from a SELECT doesn't cause ROLLBACK of statem"

Implement review comments.


sql/mysql_priv.h:
  check_for_max_user_connections() is used in one place only, make it static.
sql/mysqld.cc:
  Remove net_printf_error(): a consolidation of error reporting facilities
  is necessary to simplify maintenance of the query cache, the 
  client-server protocol, stored procedure continue handlers. 
  Rewrite the only place where its use is somewhat justified 
  (my_error() can not be used since we need to report an error for the thread 
  that does not exist) with my_snprintf()/net_send_error().
sql/protocol.cc:
  Remove net_printf_error().
sql/protocol.h:
  Remove net_printf_error().
sql/sql_connect.cc:
  Remove net_printf_error(). In check_connection()/check_user()/
  check_for_max_user_connections() do not write directly to the network,
  but use the standard my_error() mechanism to record an error in THD.
  It will be sent to the client by the caller. This was the last place
  in the server that would attempt to send an error directly, mainly left 
  untouched by 5.0 refactoring because it is executed only during 
  thread startup.
sql/sql_parse.cc:
  In the old code, when res was greater than 0, it contained an exact 
  error code, e.g. ER_OUT_OF_RESOURCES or NO SUCH DATABASE, 
  or ER_HANDSHAKE_ERROR. I don't know the reason why this error code was 
  ignored, and instead a generic  ER_UNKNOWN_COM_ERROR was pushed into the
  error stack, but knowing the relaxed attitude towards preserving the error
  codes in the old code, I'm inclinded to think that it was a bug.
  
  After this patch, the most specific error message is already pushed,
  so calling my_message() again is useless.
  
  If res is < 0, the error used to be already sent. This is not done
  by the new code, but will be done later, in the end
  of dispatch_command(). When this is done, clear_error() will be called 
  for us - it is in the first lines of do_command.
  
  To sum up, this change is to remove COM_CHANGE_USER specific error handling
  in favor of the standard one employed for all other COM_* commands.
2007-11-01 00:10:58 +03:00
unknown
cc0e546567 BUG#28086 (SBR of USER() becomes corrupted on slave):
Marking statements containing USER() or CURRENT_USER() as unsafe, causing
them to switch to using row-based logging in MIXED mode and generate a
warning in STATEMENT mode.


mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Result change.
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Adding test to check that USER() and CURRENT_USER() cause a switch
  to row-based logging.
sql/sql_yacc.yy:
  Setting statements containing USER() or CURRENT_USER() to be unsafe.
2007-10-31 21:09:52 +01:00
unknown
9ad4366b7b Cleanup: rename select_send::status to select_send::is_result_set_started.
Add select_send::cleanup.
Fix a compilation warning.
Issues spotted while working on the fix for Bug#12713.


sql-common/client.c:
  Fix a warning.
sql/sql_class.cc:
  Give a variable a more specific name. Rewrite an incorrect comment.
  Add a cleanup for select_send. The only case now this cleanup can be
  necessary is when we have a prepared statement inside a stored procedure, 
  and a continue handler. At first execution, the statement is killed
  after having executed select_send::send_fields. At the second execution
  it is killed after having executed select_send::send_fields.
sql/sql_class.h:
  Rename a member. Add comments.
2007-10-31 18:33:13 +03:00
unknown
2ace967acd Merge adventure.(none):/home/thek/Development/cpp/bug31347/my50-bug31347
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime


sql/sql_acl.cc:
  Auto merged
2007-10-31 13:41:49 +01:00
unknown
ce55bb756a Merge adventure.(none):/home/thek/Development/cpp/bug31347/my51-bug31347
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime


sql/sql_acl.cc:
  Auto merged
2007-10-31 13:22:19 +01:00
unknown
1603139dd5 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
2007-10-31 13:13:20 +01:00
unknown
61c6024cb6 Merge adventure.(none):/home/thek/Development/cpp/bug31347/my50-bug31347
into  adventure.(none):/home/thek/Development/cpp/bug31347/my51-bug31347


sql/sql_acl.cc:
  Auto merged
2007-10-31 13:12:45 +01:00
unknown
ee4452dba4 Bug #31893 Partitions: crash if subpartitions and engine change.
The new default database engine for altered table was reassigned to
the old one. That's wrong thing by itself, and (as the engine
for a subpartition gets that new value) leads to DBUG_ASSERTION
in mysql_unpack_partition()


mysql-test/r/partition.result:
  Bug #31893 Partitions: crash if subpartitions and engine change.
  
  test result
mysql-test/t/partition.test:
  Bug #31893 Partitions: crash if subpartitions and engine change.
  
  test case
sql/sql_partition.cc:
  Bug #31893 Partitions: crash if subpartitions and engine change.
  
  Don't change part_info->default_engine_type if it's already set
2007-10-31 16:01:29 +04:00
unknown
c4f35d7c23 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_func.cc:
  Auto merged
2007-10-31 12:31:36 +01:00
unknown
8d69dd398d Bug#31347 Increase in memory usage after many DROP USER statements
Dropping users causes huge increase in memory usage because field values were
allocated on the server memory root for temporary usage but never deallocated.

This patch changes the target memory root to be that of the thread handler
instead since this root is cleared between each statement.


sql/sql_acl.cc:
  Changed memory root from server life time memory to thread life time memory.
2007-10-31 12:25:18 +01:00
unknown
d2a1fe14ab Merge endora.local:/Users/davi/mysql/bugs/30904-5.1
into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
2007-10-30 20:52:21 -02:00
unknown
bf18f6d4b8 Bug#30904 SET PASSWORD statement is non-transactional
The SET PASSWORD statement is non-transactional (no explicit transaction
boundaries) in nature and hence is forbidden inside stored functions and
triggers, but it weren't being effectively forbidden.

The implemented fix is to issue a implicit commit with every SET PASSWORD
statement, effectively prohibiting these statements in stored functions
and triggers. 


mysql-test/r/sp-error.result:
  Add test case result for Bug#30904
mysql-test/t/sp-error.test:
  Add test case for Bug#30904
sql/sql_lex.h:
  Add variable to set that a statement with SET PASSWORD causes a implicit
  commit.
sql/sql_parse.cc:
  End active transaction in SET PASSWORD.
sql/sql_yacc.yy:
  Set the correct flag on SET PASSWORD if inside a SP, thus effectively
  prohibiting SET PASSWORD statements in stored functions and triggers.
2007-10-30 20:51:04 -02:00
unknown
44dc5049ac Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b19958-mysql-5.1-rpl


sql/log_event.cc:
  Auto merged
2007-10-30 21:23:53 +01:00
unknown
eb191861e3 BUG#19958 (RBR idempotency issue for UPDATE and DELETE):
The rpl_trigger test case indicated a problem with idempotency support when run
under row-based replication, which this patch fixes.

However, despite this, the test is not designed for execution under row-based
replication and hence rpl_trigger.test is not executed under row-based
replication.

The problem is that the test expects triggers to be executed when the slave
updates rows on the slave, and this is (deliberately) not done with row-based
replication.


sql/log_event.cc:
  Adding function to print symbolic name of handler errors for debug purposes.
  Ignoring some more error messages to provide full idempotency support for
  update and delete operations.
mysql-test/suite/rpl/r/rpl_idempotency.result:
  New BitKeeper file ``mysql-test/suite/rpl/r/rpl_idempotency.result''
mysql-test/suite/rpl/t/rpl_idempotency.test:
  New BitKeeper file ``mysql-test/suite/rpl/t/rpl_idempotency.test''
2007-10-30 21:17:19 +01:00
unknown
8365a74e47 In ha_delete_table, use a standard mechanism to intercept the error message
and convert it to a warning instead of direct manipulation with the
thread error stack.
Fix a bug in handler::print_erorr when a garbled message was
printed for HA_ERR_NO_SUCH_TABLE.
This is a pre-requisite patch for the fix for Bug#12713 Error in a stored
function called from a SELECT doesn't cause ROLLBACK of statem


sql/handler.cc:
  Use a standard mechanism to intercept the error message, instead
  of direct manipulation with thread error stack. 
  Fix a bug when for HA_ERR_NO_SUCH_TABLE handler::print_error() would
  print a garbled message.
sql/log.cc:
  Extend internal error handler interface to carry the message text.
sql/mysqld.cc:
  Extend internal error handler interface to carry the message text.
sql/sql_base.cc:
  Extend internal error handler interface to carry the message text.
sql/sql_class.cc:
  Extend internal error handler interface to carry the message text.
sql/sql_class.h:
  Extend internal error handler interface to carry the message text.
sql/sql_error.cc:
  Extend internal error handler interface to carry the message text.
2007-10-30 22:35:14 +03:00
unknown
1430f4ded2 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2


sql/sql_connect.cc:
  Manual merge.
2007-10-30 20:10:11 +03:00
unknown
2437001234 Use an inline getter method (thd->is_error()) to query if there is an error
in THD.
In future the error may be stored elsewhere (not in net.report_error) and 
it's important to start using an opaque getter to simplify merges.


sql/filesort.cc:
  net.report_error -> is_error()
sql/ha_ndbcluster_binlog.cc:
  net.report_error -> is_error()
sql/item_func.cc:
  net.report_error -> is_error()
sql/item_subselect.cc:
  net.report_error -> is_error()
sql/set_var.cc:
  net.report_error -> is_error()
sql/sp.cc:
  net.report_error -> is_error()
sql/sp_head.cc:
  net.report_error -> is_error()
sql/sql_base.cc:
  net.report_error -> is_error()
sql/sql_class.cc:
  net.report_error -> is_error()
sql/sql_class.h:
  net.report_error -> is_error()
sql/sql_connect.cc:
  net.report_error -> is_error()
sql/sql_delete.cc:
  net.report_error -> is_error()
sql/sql_insert.cc:
  net.report_error -> is_error()
sql/sql_parse.cc:
  net.report_error -> is_error()
sql/sql_prepare.cc:
  net.report_error -> is_error()
sql/sql_select.cc:
  net.report_error -> is_error()
sql/sql_union.cc:
  net.report_error -> is_error()
sql/sql_update.cc:
  net.report_error -> is_error()
sql/sql_view.cc:
  net.report_error -> is_error()
sql/sql_yacc.yy:
  net.report_error -> is_error()
2007-10-30 20:08:16 +03:00
unknown
abdb052bae Merge magare.gmz:/home/kgeorge/mysql/work/B31884-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31884-5.1-opt


sql/item_subselect.h:
  Auto merged
mysql-test/r/subselect.result:
  merged the fix for bug 31884 to 5.1-opt
mysql-test/t/subselect.test:
  merged the fix for bug 31884 to 5.1-opt
2007-10-30 16:21:17 +02:00
unknown
95acd426eb Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31884-5.0-opt
2007-10-30 16:18:56 +02:00
unknown
fcff3b5a8d manual merge
BitKeeper/deleted/.del-rpl_slave_skip-slave.opt:
  Delete: mysql-test/t/rpl_slave_skip-slave.opt
BitKeeper/deleted/.del-rpl_slave_skip.test:
  Delete: mysql-test/t/rpl_slave_skip.test
BitKeeper/deleted/.del-rpl_slave_skip.result:
  Delete: mysql-test/r/rpl_slave_skip.result
2007-10-30 14:08:37 +01:00
unknown
d4d4ba9a9f Fix failing init_connect.test (5.1-runtime).
sql/sql_connect.cc:
  Fix failing init_connect.test (5.1-runtime). Add comments for the unjustified use
  of thd->is_slave_error.
2007-10-30 15:39:50 +03:00
unknown
6bbdacae20 Bug #31884: Assertion + crash in subquery in the SELECT clause.
Item_in_subselect's only externally callable method is val_bool().
However the nullability in the wrapper class (Item_in_optimizer) is 
established by calling the "forbidden" method val_int().

Fixed to use the correct method (val_bool() ) to establish nullability 
of Item_in_subselect in Item_in_optimizer.


mysql-test/r/subselect.result:
  Bug #31884: test case
mysql-test/t/subselect.test:
  Bug #31884: test case
sql/item_subselect.h:
  Bug #31884: Use the correct method to establish nullability
2007-10-30 14:27:21 +02:00
unknown
356bdcb7c4 Manual merge 5.0-rpl -> 5.1-rpl.
involved bug#12691, bug#27571


mysql-test/suite/rpl/r/rpl_sp_effects.result:
  results changed
sql/slave.cc:
  pended manual merge done (mats)
sql/sql_delete.cc:
  manual merge
sql/sql_insert.cc:
  manual merge
sql/sql_load.cc:
  manual merge
sql/sql_update.cc:
  manual merge.
2007-10-30 13:49:42 +02:00
unknown
c84d4b2139 Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


mysql-test/suite/rpl/r/rpl_bug31076.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
storage/ndb/include/ndbapi/Ndb.hpp:
  Auto merged
mysql-test/suite/rpl/t/rpl_bug31076.test:
  manual merge
2007-10-30 11:28:19 +01:00
unknown
200f0531ef Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
into  koti.dsl.inet.fi:/home/elkin/MySQL/5.1-merge-bug27571


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_killed.result:
  Auto merged
mysql-test/suite/binlog/t/binlog_killed.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
mysql-test/suite/rpl/r/rpl_sp_effects.result:
  manual merge ul
mysql-test/suite/rpl/t/rpl_sp_effects.test:
  manual merge
sql/slave.cc:
  leaving for manual merge
sql/sql_delete.cc:
  leaving for manual merge
sql/sql_insert.cc:
  leaving for manual merge
sql/sql_load.cc:
  leaving for manual merge
sql/sql_update.cc:
  leaving for manual merge
2007-10-30 11:31:03 +02:00
unknown
e722393f51 Bug #31758 inet_ntoa, oct crashes server with null+filesort
Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an
argument, which is wrong.
Both can be NULL with notnull arguments, so that's fixed.


mysql-test/r/func_str.result:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  test case
mysql-test/t/func_str.test:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  test result
sql/item_strfunc.h:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  missing maybe_null flags set for Item_func_inet_ntoa and Item_func_conv
2007-10-30 12:35:03 +04:00
unknown
5e314d06e6 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
2007-10-30 10:32:20 +02:00
unknown
c45171b01b Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-merge


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_regexp.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/func_regexp.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  After merge fix
mysql-test/t/ctype_ucs.test:
  After merge fix
2007-10-30 12:21:44 +04:00
unknown
a3b60d2d51 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_regexp.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_bug31076.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/func_regexp.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_xmlfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
sql/sql_yacc.yy:
  Reverting Rafal's changes: TRANSACTIONAL_SYM was removed in a mistake.
mysql-test/r/ctype_ucs.result:
  After merge fix
mysql-test/suite/rpl/t/rpl_bug31076.test:
  After merge fix.
mysql-test/t/ctype_ucs.test:
  After megre fix
2007-10-30 12:03:34 +04:00
unknown
2fa9b3c9a3 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31137/b31137.5.0
2007-10-29 20:43:57 +04:00
unknown
f139033063 Merge lambda.weblab:/home/malff/TREE/mysql-5.1-base
into  lambda.weblab:/home/malff/TREE/mysql-5.1-rt-merge


mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-10-29 08:07:27 -06:00
unknown
24ede323cc Merge lambda.weblab:/home/malff/TREE/mysql-5.0-base
into  lambda.weblab:/home/malff/TREE/mysql-5.0-rt-merge


sql/sql_table.cc:
  Auto merged
2007-10-29 07:53:15 -06:00
unknown
be04193c09 Merge mysql.com:/home/ram/work/b31137/b31137.5.0
into  mysql.com:/home/ram/work/b31137/b31137.5.1


sql/sql_table.cc:
  Auto merged
sql/structs.h:
  Auto merged
mysql-test/include/mix1.inc:
  will merge tests manually
mysql-test/r/innodb_mysql.result:
  will merge tests manually
mysql-test/r/key.result:
  will merge tests manually
mysql-test/t/key.test:
  will merge tests manually
include/my_base.h:
  manual merge.
2007-10-29 17:34:01 +04:00
unknown
95f3db7be1 Bug #27571 asynchronousity in setting mysql_query::error and
Query_log_event::error_code

A query can perform completely having the local var error of mysql_$query
zero, where $query in insert, update, delete, load,
and be  binlogged with error_code e.g KILLED_QUERY while there is no
reason do to so.
That can happen because Query_log_event consults thd->killed flag to
evaluate error_code.

Fixed with implementing a scheme suggested and partly implemented at
time of bug@22725 work-on. error_status is cached immediatly after the
control leaves the main rows-loop and that instance always corresponds
to `error' the local of mysql_$query functions. The cached value
is passed to Query_log_event constructor, not the default thd->killed
which can be changed in between of the caching and the constructing.


mysql-test/r/binlog_killed.result:
  results changed
mysql-test/t/binlog_killed.test:
  Demonstrating that effective killing during rows-loop execution leads to the speficied actions:
  binlogging with the error for a query modified a not-transactional table or
  rolling back effects for transactional table;
  
  fixing possible non-determinism with ID when query_log_enabled;
  
  leave commented out tests for multi-update,delete due to another bug;
  
  removing an obsolete tests template;
  
  changing system rm to --remove_file.
sql/log_event.cc:
  adding killed status arg
sql/log_event.h:
  added killed status arg
sql/sql_delete.cc:
  deploying the update part patch for delete, multi-delete
sql/sql_insert.cc:
  deploying the update-part patch for insert..select
sql/sql_load.cc:
  deploying the update-part patch for load data.
  simulation added.
sql/sql_update.cc:
  Impementing the fix as described in the comments left by bug@22725.
  Also simulation of killing after the loop that would affect binlogging in the old code.
mysql-test/t/binlog_killed_bug27571-master.opt:
  post rows-loop killing simulation's options
mysql-test/t/binlog_killed_bug27571.test:
  Checking that if killing happens inbetween of the end of rows loop and
  recording into binlog that will not lead to recording any error incl
  the killed error.
mysql-test/t/binlog_killed_simulate-master.opt:
  simulation options
mysql-test/t/binlog_killed_simulate.test:
  tests for 
  a query (update is choosen) being killed after the row-loop;
  load data killed within the loop - effective killed error in the event is gained.
2007-10-29 15:20:59 +02:00
unknown
7c92f118e4 Fix for BUG#27610: ALTER TABLE ROW_FORMAT=... does not
rebuild the table.

The problem was that ROW_FORMAT clause in ALTER TABLE did not trigger
table reconstruction.

The fix is to rebuild a table if ROW_FORMAT is specified.


mysql-test/include/mix1.inc:
  Add a test case for BUG#27610: ALTER TABLE ROW_FORMAT=... does not
  rebuild the table.
mysql-test/r/innodb_mysql.result:
  Update result file.
sql/sql_table.cc:
  Rebuild a table if ROW_FORMAT was specified in ALTER TABLE.
2007-10-29 15:42:49 +03:00
unknown
2b3e560622 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
2007-10-29 15:40:41 +04:00
unknown
9e6bb07d38 Bug#30889: filesort and order by with float/numeric crashes server
There are two problems with ROUND(X, D) on an exact numeric 
(DECIMAL, NUMERIC type) field of a table:
1) The implementation of the ROUND function would change the number of decimal
places regardless of the value decided upon in fix_length_and_dec. When the
number of decimal places is not constant, this would cause an inconsistent
state where the number of digits was less than the number of decimal places,
which crashes filesort.

Fixed by not allowing the ROUND operation to add any more decimal places than
was decided in fix_length_and_dec.

2) fix_length_and_dec would allow the number of decimals to be greater than
the maximium configured value for constant values of D. This led to the same 
crash as in (1).

Fixed by not allowing the above in fix_length_and_dec.


mysql-test/r/type_decimal.result:
  Bug#30889: Test result
mysql-test/t/type_decimal.test:
  Bug#30889: Test case
sql/item_func.cc:
  Bug#30889: 
  - Avoid setting number of digits after decimal point (scale) higher than its 
    maximum value.
  - Avoid increasing the number of decimal places in ::decimal_op
sql/item_func.h:
  Bug#30889: Added comments to the declarations of Item_func_numhybrid::<type>_op
  family of methods.
2007-10-29 15:39:56 +04:00
unknown
b63ae73d50 Merge trift2.:/MySQL/M50/clone-5.0
into  trift2.:/MySQL/M50/push-5.0


mysql-test/r/derived.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/type_date.result:
  Null-merge 5.0.50 build clone:
  The test for bug#31221 is already in the receiving tree.
mysql-test/t/type_date.test:
  Null-merge 5.0.50 build clone:
  The test for bug#31221 is already in the receiving tree.
2007-10-29 12:11:05 +01:00
unknown
91ca02ad8a Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2007-10-29 14:53:42 +04:00
unknown
d5b1d6205b Bug#30897 GROUP_CONCAT returns extra comma on empty fields
The fix is a copy of Martin Friebe's suggestion.
added testing for no_appended which will be false if anything,
including the empty string is in result


mysql-test/r/func_gconcat.result:
  test result
mysql-test/t/func_gconcat.test:
  test case
sql/item_sum.cc:
  added testing for no_appended which will be False if anything,
  including the empty string is in result
2007-10-29 14:53:10 +04:00
unknown
016c6f615e Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b30782/b30782.5.0


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
2007-10-29 13:42:02 +04:00
unknown
30dab869ec Merge mysql.com:/home/ram/work/b30782/b30782.5.0
into  mysql.com:/home/ram/work/b30782/b30782.5.1


sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/case.result:
  manual merge.
mysql-test/t/case.test:
  manual merge.
sql/item_cmpfunc.h:
  manual merge.
2007-10-29 13:16:26 +04:00
unknown
25939026a7 Fixed compile warnings introduced by the patch for bug #29131. 2007-10-29 11:52:44 +03:00
unknown
42894ed0b8 Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY

Problem: improper maximum length calculation of the CASE function leads to 
decimal value truncation (storing/retrieving decimal field values).

Fix: accurately calculate maximum length/unsigned flag/decimals parameters 
of the CASE function.


mysql-test/r/case.result:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - test result.
mysql-test/t/case.test:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - test case.
sql/item_cmpfunc.cc:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
sql/item_cmpfunc.h:
  Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, 
  JOIN, and ORDER BY
    - accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
2007-10-29 12:20:21 +04:00
unknown
33a8fdea12 Merge polly.(none):/home/kaa/src/opt/bug29131/my51-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-29 10:31:26 +03:00
unknown
b52ab3bda5 Merge polly.(none):/home/kaa/src/opt/bug29131/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-29 10:25:48 +03:00
unknown
e2bd6c6b12 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item.cc:
  Auto merged
2007-10-28 01:23:54 +05:00
unknown
5568084835 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-28 01:19:20 +05:00
unknown
321b1b6105 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30715-merged-5.1-opt
2007-10-27 10:21:02 +03:00
unknown
d8f35d1dc7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30715-merged-5.0-opt
2007-10-27 10:20:12 +03:00
unknown
2d380a832d Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.0-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b12691-mysql-5.0-rpl


sql/slave.cc:
  Auto merged
2007-10-26 19:18:02 +02:00
unknown
f01321fd09 BUG#12691 (Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER):
Adding code to keep skipping events while inside a transaction. Execution
will start just after the transaction has been skipped.


sql/slave.cc:
  Adding code to set the thd->options flag for the slave SQL thread
  even when BEGIN, ROLLBACK, COMMIT, and XID events are being skipped.
      
  Adding code to not decrease the slave skip counter from 1 to 0 if we
  are inside a transaction. This will keep the counter at 1, and keep
  skipping events, until a transaction terminator is read. At that point,
  the slave skip counter will be decreased to 0, and events will be read
  and executed instead of read and skipped.
mysql-test/r/rpl_slave_skip.result:
  New BitKeeper file ``mysql-test/r/rpl_slave_skip.result''
mysql-test/t/rpl_slave_skip-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_slave_skip-slave.opt''
mysql-test/t/rpl_slave_skip.test:
  New BitKeeper file ``mysql-test/t/rpl_slave_skip.test''
2007-10-26 18:52:58 +02:00
unknown
0e076d4bb9 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/select.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Merge with 5.0-opt
2007-10-26 18:05:46 +05:00
unknown
46b03c598d Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31663
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/sql_class.cc:
  Auto merged
2007-10-26 17:55:16 +05:00
unknown
efbc310af6 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/scratch/tnurnberg/31662/51-31662


sql/sql_base.cc:
  Auto merged
2007-10-26 12:47:59 +02:00
unknown
d7d93cf548 Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.

Problem: if a partial unique key followed by a non-partial one we declare
the second one as a primary key.

Fix: sort non-partial unique keys before partial ones.


include/my_base.h:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - sort unique keys that don't contain partial segments before other keys:
        set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
        use it in the sort_keys();
mysql-test/r/innodb_mysql.result:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test result.
mysql-test/r/key.result:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test result.
mysql-test/t/innodb_mysql.test:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test case.
mysql-test/t/key.test:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - test case.
sql/sql_table.cc:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - sort unique keys that don't contain partial segments before other keys:
        set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
        use it in the sort_keys();
sql/structs.h:
  Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0, 
  file .\ha_innodb.
    - sort unique keys that don't contain partial segments before other keys:
        set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
        use it in the sort_keys();
2007-10-26 15:37:38 +05:00
unknown
ca126a9990 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31662/50-31662


sql/sql_base.cc:
  Auto merged
2007-10-26 11:44:30 +02:00
unknown
4ce44da3d5 correct unused code 2007-10-26 11:43:05 +02:00
unknown
be4d062614 Merge mysql.com:/scratch/tnurnberg/31662/50-31662
into  mysql.com:/scratch/tnurnberg/31662/51-31662


mysql-test/r/information_schema_db.result:
  Auto merged
sql/sql_base.cc:
  Auto merged
2007-10-26 10:24:31 +02:00
unknown
0e700e1eeb Bug#31662: 'null' is shown as type of fields for view with bad definer, breaks mysqldump
SHOW FIELDS FROM a view with no valid definer was possible (since fix
for Bug#26817), but gave NULL as a field-type. This led to mysqldump-ing
of such views being successful, but loading such a dump with the client
failing. Patch allows SHOW FIELDS to give data-type of field in underlying
table.


mysql-test/r/information_schema_db.result:
  Fix test results: SHOW FIELDS FROM a view with no valid DEFINER
  gives us the field-type of the underlying table now rather than NULL.
sql/sql_base.cc:
  In the case of SHOW FIELDS FROM <view>, do not require a valid
  DEFINER for determining underlying data-type like we usually do.
  This is needed for mysqldump.
2007-10-26 09:01:29 +02:00
unknown
0bb55050d1 Bug#30296
"Dynamic plugins fail to load on FreeBSD"
  ELF executables need to be linked using the -export-dynamic option to
  ld(1) for symbols defined in the executable to become visible to dlsym().
  Also, do not build plugins on an all-static build.


configure.in:
  Bug#30296
    Use "-export-dynamic" when building executable for use with plugins.
    Add required option using MYSQLD_EXTRA_LDFLAGS variable so we do not
    affect any other binary.
config/ac-macros/plugins.m4:
  Do not build plugins when building all-static
sql/sql_yacc.yy:
  build fix - surplus semicolon
2007-10-25 21:19:28 -07:00
unknown
974201c7e0 Fix for bug #29131: SHOW VARIABLES reports variable 'log' but SET
doesn't recognize it
  
This is a 5.1 version of the patch.
  
Problem:
  
'log' and 'log_slow_queries' were "fixed" variables, i.e. they showed up
in SHOW VARIABLES, but could not be used in expressions like 
"select @@log". Also, using them in the SET statement produced an 
incorrect "unknown system variable" error.
  
Solution:

Since as of MySQL 5.1.12 one can enable or disable the general query log
or the slow query log at runtime by changing values of
general_log/slow_query_log, make 'log' and 'log_slow_queries" to be 
synonyms for 'general_log' and 'slow_query_log' respectively.  This 
makes expressions using the '@@var' syntax backward compatible with 
5.0 and SHOW VARIABLES output to be consistent with the SET statement.


mysql-test/r/log_state.result:
  Added a test case for bug #29131.
mysql-test/t/log_state.test:
  Added a test case for bug #29131.
sql/set_var.cc:
  Made the 'log' and 'log_slow_queries' system variables to be synonyms for 'general_log' and 'slow_query_log'.
2007-10-25 14:03:24 +04:00
unknown
6eced1b857 Fix for bug #29131: SHOW VARIABLES reports variable 'log' but SET
doesn't recognize it

This is a 5.0 version of the patch, it will be null-merged to 5.1

Problem:

'log' and 'log_slow_queries' were "fixed" variables, i.e. they showed up
in SHOW VARIABLES, but could not be used in expressions like 
"select @@log". Also, using them in the SET statement produced an 
incorrect "unknown system variable" error.

Solution:

Make 'log' and 'log_slow_queries' read-only dynamic variables to make 
them available for use in expressions, and produce a correct error 
about the variable being read-only when used in the SET statement.


mysql-test/r/variables.result:
  Added a test case for bug #29131.
mysql-test/t/variables.test:
  Added a test case for bug #29131.
sql/mysql_priv.h:
  Changed the type of opt_log and opt_slow_log to my_bool to 
  align with the interfaces in set_var.cc
sql/mysqld.cc:
  Changed the type of opt_log and opt_slow_log to my_bool to 
  align with the interfaces in set_var.cc
sql/set_var.cc:
  Made 'log' and 'log_slow_queries' to be read-only dynamic system 
  variable, i.e. available for use in expressions with the @@var syntax.
sql/set_var.h:
  Added a new system variable class representing a read-only boolean
  variable.
2007-10-25 14:02:27 +04:00
unknown
f8f8c0282a WL#4078: Document binary format of binlog entries
Documented some binlog events using doxygen. More will be done later.
Also fixed typos in other comments and added remarks about dubious code.
Only comments are affected, there is no change to the actual code.


sql/log_event.cc:
  Fixed typos in some comments.
  Added remarks (as comments) about questionable code.
sql/log_event.h:
  Documented the binary format of following binlog events:
  Log_event
  Query_log_event
  Muted_query_log_event
  Slave_log_event (partial)
  Load_log_event
  Intvar_log_event
  Rand_log_event
  Rotate_log_event (partial)
sql/sql_class.h:
  Fixed typo in comment.
2007-10-25 11:58:18 +02:00
unknown
1ebb7098c8 Merge loke.(none):/home/knielsen/devel/mysql-5.0-ndb
into  loke.(none):/home/knielsen/devel/mysql-5.1-new-ndb


storage/ndb/include/kernel/AttributeHeader.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  manual merge.
2007-10-25 11:00:36 +02:00
unknown
e9b98a5de7 Merge loke.(none):/home/knielsen/devel/bug31810
into  loke.(none):/home/knielsen/devel/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2007-10-25 10:54:23 +02:00
unknown
34279339dc BUG#31810: Potential infinite loop with autoincrement failures in ndb
Fix extra semicolon causing if-statement to be disabled.


sql/ha_ndbcluster.cc:
  Fix extra semicolon causing if-statement to be disabled.
2007-10-25 08:40:42 +02:00
unknown
04ff9d4da0 Fixed bug #27695: View should not be allowed to have empty or
all space column names.

The parser has been modified to check VIEW column names
with the check_column_name function and to report an error
on empty and all space column names (same as for TABLE
column names).


sql/sql_yacc.yy:
  Fixed bug #27695.
  The parser has been modified to check VIEW column aliases
  with the check_column_name function and to report an error
  on empty columns and all space columns (same as for TABLE
  column names).
mysql-test/t/select.test:
  Updated test case for bug #27695.
mysql-test/r/select.result:
  Updated test case for bug #27695.
2007-10-25 10:32:52 +05:00
unknown
35ca78a0d4 Bug#30854 (Tables name show as binary in slave err msg on vm-win2003-64-b)
The root cause of this defect is that a call to my_error() is using a
'LEX_STRING' parameter instead of a 'char*'

This patch fixes the failing calls to my_error(), as well as similar calls
found during investigation.

This is a compiling bug (see the instrumentation in the bug report), no test cases provided.


sql/sql_base.cc:
  Fix broken calls to "..." (va_args) functions.
sql/sql_table.cc:
  Fix broken calls to "..." (va_args) functions.
2007-10-24 19:01:08 -06:00
unknown
4de3fdd716 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31615/b31615.5.0


sql/set_var.cc:
  Auto merged
2007-10-24 21:57:51 +05:00
unknown
59729a7835 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31615/b31615.5.1
2007-10-24 21:56:32 +05:00
unknown
06e82cb855 Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b24860-mysql-5.1-rpl


sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/slave.cc:
  Auto merged
2007-10-24 16:54:18 +02:00
unknown
4a08f39214 BUG#31702 (Missing row on slave causes assertion failure under row-based
replication):

Incremental patch to enable idempotency support for update events again.
The final handling of errors will be done in BUG#31609, and until then
the handling of errors should be consistent between the different types
of changes.


mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
  Result change.
mysql-test/suite/rpl/r/rpl_temporary_errors.result:
  Result change.
mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
  Changing test to assume idempotency handling of update event.
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
  Changing test to assume idempotency handling of update event.
sql/log_event.cc:
  Incremental patch to enable idempotency support for the update events again.
  The real error handling will be implemented in BUG#31609.
2007-10-24 16:02:37 +02:00
unknown
3e208eb61f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-10-24 14:07:33 +02:00
unknown
22b3670544 Merge mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-5.0-engines


include/my_sys.h:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysys/charset.c:
  Manual merge.
sql/item_func.cc:
  Manual merge.
2007-10-24 16:39:13 +05:00
unknown
4fda18a3ec Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-engines
2007-10-24 16:10:09 +05:00
unknown
660d66263b BUG#31159 - fulltext search on ucs2 column crashes server
ucs2 doesn't provide required by fulltext ctype array. Crash
happens because fulltext attempts to use unitialized ctype
array.

Fixed by converting ucs2 fields to compatible utf8 analogue.


include/my_sys.h:
  Added a function to find compatible character set with ctype array
  available. Currently used by fulltext search to find compatible
  substitute for ucs2 collations.
mysql-test/r/ctype_ucs.result:
  A test case for BUG#31159.
mysql-test/t/ctype_ucs.test:
  A test case for BUG#31159.
mysys/charset.c:
  Added a function to find compatible character set with ctype array
  available. Currently used by fulltext search to find compatible
  substitute for ucs2 collations.
sql/item_func.cc:
  Convert ucs2 fields to utf8. Fulltext requires ctype array, but
  ucs2 doesn't provide it.
2007-10-24 16:09:30 +05:00
unknown
ee8ab6d9e6 Merge magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.1-opt


mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/opt_sum.cc:
  merge bug 30715 to 5.1-opt
2007-10-24 11:50:09 +03:00
unknown
e66f7e1d36 Merge magare.gmz:/home/kgeorge/mysql/work/B30715-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.0-opt
2007-10-24 11:45:29 +03:00
unknown
b5d33614ac after-merge fix: new sys_var_character_set_client classs introduced to perform
separate checking.
2007-10-24 13:28:46 +05:00
unknown
e2433cbcaa Bug #30715: Assertion failed: item_field->field->real_maybe_null(),
file .\opt_sum.cc, line
The optimizer pre-calculates the MIN/MAX values for queries like
 SELECT MIN(kp_k) WHERE kp_1 = const AND ... AND kp_k-1 = const
when there is a key over kp_1...kp_k
In doing so it was not checking correctly nullability and 
there was a superfluous assert(). 
Fixed by making sure that the field can be null before checking and
taking out the wrong assert().
.
Introduced a correct check for nullability 
The MIN(field) can return NULL when all the row values in the group
are NULL-able or if there were no rows.
Fixed the assertion to reflect the case when there are no rows.


mysql-test/r/func_group.result:
  Bug #30715: test case
mysql-test/t/func_group.test:
  Bug #30715: test case
sql/opt_sum.cc:
  Bug #30715: correct nullability check for MIN/MAX pre-calculation over index.
2007-10-24 11:15:08 +03:00
unknown
9aa4317066 Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-10-24 11:43:16 +04:00
unknown
18436d48d7 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-work/mysql-5.0.b31081
2007-10-24 12:09:24 +05:00
unknown
47bed4d45d Bug#31081 server crash in regexp function
Additional fix for valgrind warning
2007-10-24 12:08:33 +05:00
unknown
9be2220bfd Merge mysql.com:/home/bar/mysql-work/mysql-5.0
into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-mr


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
2007-10-24 10:49:46 +05:00
unknown
957d866506 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-engines
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30878


mysql-test/r/partition.result:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/sql_partition.cc:
  Auto merged
2007-10-23 22:13:00 +02:00
unknown
2b5bcaabee Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30695
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30878


mysql-test/r/partition.result:
  SCCS merged
mysql-test/t/partition.test:
  SCCS merged
2007-10-23 22:07:45 +02:00
unknown
fe784fac00 Bug #30695: An apostrophe ' in the comment of the ADD PARTITION
causes the Server to crash.

Accessing partitioned table with an apostrophe in partition options
like DATA DIRECTORY, INDEX DIRECTORY or COMMENT causes server crash.

Partition options were saved in .frm file without escaping.
When accessing such table it is not possible to properly restore
partition information.
Crashed because there was no check for partition info parser failure.

Fixed by escaping quoted text in the partition info when writing it to
the frm-file and added a check that it was able to parse the partition
info before using it 

NOTE: If the comment is written by an earlier version of the server,
the corrupted frm-file is not fixed, but left corrupted, you have to
manually drop the table and recreate it.


mysql-test/r/partition.result:
  bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes
  the Server to crash.
   testresult
mysql-test/t/partition.test:
  bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes
  the Server to crash.
    testcase
sql/sql_partition.cc:
  Bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes
    the Server to crash.
  
    Crashes when there is an non escaped apostrophe in the partition options
  
    fixed by escaping quoted text before writing to the frm-file
sql/table.cc:
  Bug #30695 An apostrophe ' in the comment of the ADD PARTITION
    causes the Server to crash
  
  problem was using a null poiter without check -> crash.
  
  added a check that the previus call succeded
2007-10-23 22:04:09 +02:00
unknown
4ea9a3d5cd Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug31450


sql/item.cc:
  Auto merged
mysql-test/r/type_decimal.result:
  Post-merge fixes
mysql-test/t/type_decimal.test:
  Post-merge fixes
2007-10-23 20:03:06 +04:00
unknown
53dac1ee1a BUG#31450: Query causes error 1048
- Let Item::save_in_field() call set_field_to_null_with_conversions() 
  for decimal type, like this is done for the other item result types.


mysql-test/r/type_decimal.result:
  BUG#31450: Query causes error 1048: testcase
mysql-test/t/type_decimal.test:
  BUG#31450: Query causes error 1048: testcase
2007-10-23 19:24:59 +04:00
unknown
95a8bb20fb Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/client_priv.h:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/query_cache.result:
  manual merge
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/query_cache.test:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 19:08:21 +05:00
unknown
6044965c4f Patch for BUG#30736: Row Size Too Large Error Creating a Table and
Inserting Data.

The problem was that under some circumstances Field class was not
properly initialized before calling create_length_to_internal_length()
function, which led to assert failure.

The fix is to do the proper initialization.

The user-visible problem was that under some circumstances
CREATE TABLE ... SELECT statement crashed the server or led
to wrong error message (wrong results).


mysql-test/r/select.result:
  Update result file.
mysql-test/t/select.test:
  Add a test case for BUG#30736: Row Size Too Large Error
  Creating a Table and Inserting Data.
sql/sql_table.cc:
  Move sql_field->decimals initialization before
  sql_field->create_length_to_internal_length() call.
2007-10-23 18:03:51 +04:00
unknown
8479eb1db7 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 18:51:43 +05:00
unknown
c448d2ed5d Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-23 17:24:57 +05:00
unknown
72bd96aef3 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-23 16:24:56 +04:00
unknown
de3eb8fbdc Merge polly.(none):/home/kaa/src/opt/bug31742/my51-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt
2007-10-23 16:07:03 +04:00
unknown
f7f8ca8bd7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
2007-10-23 15:04:40 +03:00
unknown
2d4639c40b Merge polly.(none):/home/kaa/src/opt/bug31742/my50-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-23 16:03:48 +04:00
unknown
619bb76ba7 Merge polly.(none):/home/kaa/src/opt/bug31742/my50-bug28550
into  polly.(none):/home/kaa/src/opt/bug31742/my51-bug28550


sql/filesort.cc:
  SCCS merged
2007-10-23 15:52:27 +04:00
unknown
4e5c8bc7e0 type conversions fixed to get rid of warnings
sql/ha_heap.cc:
  type conversion fix
sql/opt_range.cc:
  type conversion fix
2007-10-23 16:32:05 +05:00
unknown
09c8f3e606 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-5.1-opt
2007-10-23 14:28:50 +03:00
unknown
73d08e3aae Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
2007-10-23 14:23:18 +03:00
unknown
bfa5dd2f53 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28687-5.1-opt
2007-10-23 14:21:50 +03:00
unknown
bcc627846d Fixed bug #31663: if the FIELDS TERMINATED BY string
in the SELECT INTO OUTFILE clause starts with a special
character (one of n, t, r, b, 0, Z or N) and ENCLOSED BY
is empty, every occurrence of this character within a
field value is duplicated.

Duplication has been avoided.
New warning message has been added: "First character of
the FIELDS TERMINATED string is ambiguous; please use
non-optional and non-empty FIELDS ENCLOSED BY".


mysql-test/r/outfile_loaddata.result:
  BitKeeper file /home/uchum/work/bk/5.0-opt-31663/mysql-test/r/outfile_loaddata.result
  Added test case for bug #31663.
mysql-test/t/outfile_loaddata.test:
  BitKeeper file /home/uchum/work/bk/5.0-opt-31663/mysql-test/t/outfile_loaddata.test
  Added test case for bug #31663.
sql/sql_class.h:
  Fixed bug #31663.
  The select_export::is_ambiguous_field_term field has been added.
  This field is true if select_export::field_sep_char contains
  the first char of the FIELDS TERMINATED BY (ENCLOSED BY is empty),
  and items can contain this character.
  The select_export::field_term_char field has been added (first
  char of the FIELDS TERMINATED BY string or INT_MAX).
sql/sql_class.cc:
  Fixed bug #31663.
  The select_export::prepare method has been modified to calculate
  a value of the select_export::is_ambiguous_field_term field and
  to warn if this value is true.
  The select_export::send_data method has been modified to
  avoid escaping or duplication of the field_set_char if
  is_ambiguous_field_term is true.
sql/share/errmsg.txt:
  Fixed bug #31663.
  The ER_AMBIGUOUS_FIELD_TERM warning has been added.
2007-10-23 16:16:59 +05:00
unknown
0c396b862e Merge mysql.com:/home/ram/work/b31615/b31615.4.1
into  mysql.com:/home/ram/work/b31615/b31615.5.0


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
2007-10-23 16:04:32 +05:00
unknown
5cc013209e Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/scratch/tnurnberg/20901/51-20901
2007-10-23 12:38:09 +02:00
unknown
084753af19 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-23 15:35:52 +05:00
unknown
8262c4f445 type conversion fixed to get rid of warnings
sql/opt_range.cc:
  type conversion fixed
2007-10-23 15:34:10 +05:00
unknown
1831e8e043 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31604/b31604.5.1
2007-10-23 15:26:14 +05:00
unknown
a9a50c7287 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
2007-10-23 13:10:35 +03:00
unknown
8a790dd155 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-23 14:31:24 +05:00
unknown
e1dc86b079 type conversions fixed to avoid warnings on Windows
myisam/mi_write.c:
  type conversion fixed
myisam/sort.c:
  type conversion fixed
sql/ha_federated.cc:
  type conversion fixed
sql/ha_heap.cc:
  type conversion fixed
sql/ha_innodb.cc:
  type conversion fixed
sql/ha_myisam.cc:
  type conversion fixed
sql/opt_range.cc:
  type conversion fixed
sql/sql_map.cc:
  type conversion fixed
sql/sql_select.cc:
  type conversion fixed
sql/sql_update.cc:
  type conversion fixed
2007-10-23 14:27:11 +05:00
unknown
31634a38e8 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2007-10-23 14:06:56 +05:00
unknown
0d86a617b5 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31349/b31349.5.0
2007-10-23 14:06:26 +05:00
unknown
6e71a0f99b Merge mysql.com:/home/ram/work/b31349/b31349.5.0
into  mysql.com:/home/ram/work/b31349/b31349.5.1


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2007-10-23 13:55:06 +05:00
unknown
760840e231 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31604/b31604.5.1


sql/set_var.cc:
  Auto merged
2007-10-23 13:54:40 +05:00
unknown
c5dfd3e193 Merge magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30825-5.1-opt


mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
BitKeeper/deleted/.del-bdb_gis.result:
  Auto merged
BitKeeper/deleted/.del-bdb_gis.test:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/innodb_gis.result:
  merged 5.0-opt -> 5.1-opt
mysql-test/t/innodb_gis.test:
  merged 5.0-opt -> 5.1-opt
sql/field.cc:
  merged 5.0-opt -> 5.1-opt
sql/field.h:
  merged 5.0-opt -> 5.1-opt
sql/sql_select.h:
  merged 5.0-opt -> 5.1-opt
sql/sql_yacc.yy:
  merged 5.0-opt -> 5.1-opt
sql/table.cc:
  merged 5.0-opt -> 5.1-opt
2007-10-23 11:44:14 +03:00
unknown
933bf86954 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt


sql/field.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-10-23 11:26:37 +03:00
unknown
e7acb3ac71 Merge magare.gmz:/home/kgeorge/mysql/work/B28687-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B28687-5.1-opt


mysql-test/t/type_date.test:
  Auto merged
mysql-test/r/type_date.result:
  merge 5.0-opt -> 5.1-opt
sql/item.cc:
  merge 5.0-opt -> 5.1-opt
2007-10-23 11:22:59 +03:00
unknown
565c105c84 Bug#31633 Information schema = NULL queries crash the server
added correct handling of NULL values for lookup fields


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_show.cc:
  added correct handling of NULL values for lookup fields
2007-10-23 13:20:51 +05:00
unknown
61b812d913 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/scratch/tnurnberg/20901/51-20901


mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-10-23 08:54:20 +02:00
unknown
f7eae9d33a Merge mysql.com:/scratch/tnurnberg/20901/50-20901
into  mysql.com:/scratch/tnurnberg/20901/51-20901


mysql-test/r/create.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-10-23 07:09:56 +02:00
unknown
a06c4b5353 Merge mysql.com:/scratch/tnurnberg/20901/41-20901
into  mysql.com:/scratch/tnurnberg/20901/50-20901


mysql-test/r/grant.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/create.result:
  SCCS merged
2007-10-23 07:00:13 +02:00
unknown
f9d068bc09 Bug #20901: CREATE privilege is enough to insert into a table
CREATE TABLE IF NOT EXISTS ... SELECT let you insert into an existing
table as long as you had the CREATE privilege.  CREATE ... SELECT
variants now always require INSERT privilege on target table.


mysql-test/r/create.result:
  Show that CREATE...SELECT requires INSERT privilege on target table.
mysql-test/r/grant.result:
  Sort output for a defined state.
mysql-test/t/create.test:
  Show that CREATE...SELECT requires INSERT privilege on target table.
mysql-test/t/grant.test:
  Sort output for a defined state.
sql/sql_parse.cc:
  Require INSERT privilege on target table for CREATE ... SELECT.
2007-10-23 06:54:31 +02:00
unknown
50ff08918f Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


sql/set_var.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
2007-10-22 14:32:22 -06:00
unknown
966e3df374 Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-10-22 14:31:41 -06:00
unknown
c6e00be97f Bug #31332 --event-scheduler option misbehaving
Changed the behaviour of the --event-scheduler option when used without an arguments. It
now turns the option on.


mysql-test/r/events_bugs.result:
  Test that --event-scheduler with no options in events_bugs-master.opt turns the option
  on.
mysql-test/t/events_bugs.test:
  Test that --event-scheduler with no options in events_bugs-master.opt turns the option
  on.
sql/events.cc:
  Changed the behaviour of the --event-scheduler option when used without an arguments.
  It now turns the option on.
mysql-test/t/events_bugs-master.opt:
  Test that --event-scheduler with no options in events_bugs-master.opt turns the option
  on.
2007-10-22 15:16:43 -04:00
unknown
e3bd02cfbf Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


mysql-test/r/innodb_mysql.result:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-22 20:05:06 +02:00
unknown
849bcf941f Bug #28687: Search fails on '0000-00-00' date after sql_mode change
When doing indexed search the server constructs a key image for 
faster comparison to the stored keys. While doing that it must not
perform (and stop if they fail) the additional date checks that can 
be turned on by the SQL mode because there already may be values in 
the table that don't comply with the error checks.
Fixed by ignoring these SQL mode bits while making the key image.


mysql-test/r/type_date.result:
  Bug #28687: test case
mysql-test/t/type_date.test:
  Bug #28687: test case
sql/item.cc:
  Bug #28687: no invalid date warnings
2007-10-22 19:32:18 +03:00
unknown
bbce18c303 Fix for bug #31742: delete from ... order by function call that causes
an error, asserts server

In case of a fatal error during filesort in find_all_keys() the error
was returned without the necessary handler uninitialization.
Fixed by changing the code so that handler uninitialization is performed
before returning the error.


mysql-test/r/delete.result:
  Added a test case for bug #31742.
mysql-test/t/delete.test:
  Added a test case for bug #31742.
sql/filesort.cc:
  In case of a fatal error in find_all_keys() do not return before doing
  the necessary handler uninitialization steps.
2007-10-22 16:10:08 +04:00
unknown
82cc70959e Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b28618-mysql-5.1-rpl


mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/rpl_rli.h:
  Auto merged
sql/slave.cc:
  Auto merged
2007-10-22 08:50:08 +02:00
unknown
578c238600 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-22 10:27:35 +05:00
unknown
dda586282d Merge mysql.com:/home/hf/work/29801/my50-29801
into  mysql.com:/home/hf/work/30638/my50-30638
2007-10-22 10:26:16 +05:00
unknown
e763badfe3 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31588/50-31588
2007-10-22 01:57:49 +02:00
unknown
8e32e10370 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/scratch/tnurnberg/31588/51-31588
2007-10-21 22:49:16 +02:00
unknown
62d096496f Merge polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt
2007-10-21 21:57:57 +04:00
unknown
fb434504cc Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-10-21 21:55:26 +04:00
unknown
e259d46103 Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550
into  polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550


mysql-test/t/func_str.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
mysql-test/r/func_str.result:
  Manual merge.
2007-10-21 21:49:30 +04:00
unknown
04311fabaa Bug #28550 "Potential bugs related to the return type of the CHAR function".
Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account.
  
This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args().


mysql-test/r/func_str.result:
  Import patch bug288550.patch
mysql-test/t/func_str.test:
  Import patch bug288550.patch
sql/item.cc:
  Import patch bug288550.patch
sql/item.h:
  Import patch bug288550.patch
sql/item_strfunc.h:
  Import patch bug288550.patch
2007-10-21 21:45:31 +04:00
unknown
e8b8b0894e Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  dsl-hkibras1-ff5fc300-23.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug26199-create_proc_syntax_slave
2007-10-21 18:39:22 +03:00
unknown
6cfd9a4fc3 Bug #26199 Replication Failure on Slave when using stored procs with bit-type parameters.
The value of the actual argument of BIT-type-arg stored procedure was binlogged as non-escaped
sequence of bytes corresponding to internal representation of the bit value.

The patch enforces binlogging of the bit-argument as a valid literal: prefixing the quoted bytes
sequence with _binary.
Note, that behaviour of Item_field::var_str for field_type() of MYSQL_TYPE_BIT is exceptional
in that the returned string contains the binary representation even though result_type() of
the item is INT_RESULT.


mysql-test/r/rpl_sp_effects.result:
  testing stored function and procedure called with BIT-arg.
mysql-test/t/rpl_sp_effects.test:
  results changed
sql/sp_head.cc:
  Treating BIT field type specially to for its value to be prefixed and quoted.
2007-10-21 18:37:37 +03:00
unknown
219e6a6438 BUG#24860 (Incorrect SLAVE_TRANSACTION_RETRIES code can result in slave stuck):
If a temporary error occured inside a group on an event that was not the first
event of the group, the slave could get stuck because the retry counter is reset
whenever an event was executed successfully.

This patch only reset the retry counter when an entire group has been successfully
executed, or failed with a non-transient error.


sql/slave.cc:
  Adding debug printouts to every place where Relay_log_info::trans_retries
  is changed and to has_temporary_error() to print the error when returning.
  
  Adding debug variable all_errors_are_temporary_errors to make all errors
  for slave thread temporary errors.
  
  Adding code so that the Relay_log_info::trans_retries is only reset when
  an entire group was sucessfully executed, or a non-temporary error occured.
mysql-test/suite/rpl/r/rpl_temporary_errors.result:
  New BitKeeper file ``mysql-test/suite/rpl/r/rpl_temporary_errors.result''
mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt:
  New BitKeeper file ``mysql-test/suite/rpl/t/rpl_temporary_errors-slave.opt''
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
  New BitKeeper file ``mysql-test/suite/rpl/t/rpl_temporary_errors.test''
2007-10-20 20:16:12 +02:00
unknown
d1ddc24a1a Fix for BUG#31148: bool close_thread_table(THD*, TABLE**):
Assertion `table->key_read == 0' failed.

The problem was that key_read on a table in a sub-select was not
properly reset. That happens because the code responsible for that
is copy&pasted all around the server. In some place, it was obviously
forgotten to be pasted.

The fix is to reset key_read properly.


mysql-test/r/key.result:
  Update result file.
mysql-test/t/key.test:
  A test case for BUG#31148: bool close_thread_table(THD*, TABLE**):
  Assertion `table->key_read == 0' failed.
sql/sql_select.cc:
  Reset key_read before closing index.
2007-10-20 21:48:15 +04:00
unknown
0b1c0f3173 Bug#31702 (Missing row on slave causes assertion failure under row-based replication):
When replicating an update pair (before image, after image) under row-based
replication, and the before image is not found on the slave, the after image
was not discared, and was hence read as a before image for the next row.
Eventually, this lead to an after image being read outside the block of rows
in the event, causing an assertion to fire.

This patch fixes this by reading the after image in the event that the row
was not found on the slave, adds some extra debug assertion to catch future
errors earlier, and also adds a few non-debug checks to prevent reading
outside the block of the event.


include/my_base.h:
  Adding error code HA_ERR_CORRUPT_EVENT.
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
  Result change.
mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
  Adding test to try to use row-based replication to replicate an
  update of a row that doesn't exist on the slave. We should get
  an apropriate error and the slave should stop.
sql/log_event.cc:
  Adding debug printouts. Adding code to Update_rows_log_event::do_exec_row()
  so that the after image is read (and ignored) in the event of an error in
  finding the row. This is necessary so that the second pair of images is
  read correctly for the next update pair.
  
  Changing logic for ignoring errors to not include update events, since
  a "key not found" error or a "record changed" error is not idempotent
  for updates, just for deletes and inserts.
sql/log_event.h:
  Adding debug assertions to check that row reading is within the events block of rows.
2007-10-20 18:19:55 +02:00
unknown
1a163698b4 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  sin.intern.azundris.com:/misc/mysql/31588/51-31588
2007-10-20 17:18:23 +02:00
unknown
c33823ba83 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


sql/sql_class.cc:
  Auto merged
2007-10-20 01:21:20 +04:00
unknown
079ae23003 Rename: query_error -> is_slave_error.
Add comments.


sql/ha_ndbcluster_binlog.cc:
  query_error -> slave_error
sql/handler.cc:
  query_error -> slave_error
sql/log.cc:
  query_error -> slave_error
sql/log_event.cc:
  query_error -> slave_error
sql/log_event_old.cc:
  query_error -> slave_error
sql/mysqld.cc:
  query_error -> slave_error
sql/protocol.cc:
  query_error -> slave_error
sql/slave.cc:
  query_error -> slave_error
sql/sp_head.cc:
  query_error -> slave_error
sql/sql_class.cc:
  query_error -> slave_error
sql/sql_class.h:
  Rename: query_error -> is_slave_error, to avoid confusion.
  Add commenta.
sql/sql_connect.cc:
  Rename: query_error -> is_slave_error, to avoid confusion.
  Originally it was the same code to handle init-connect and init-slave 
  mysqld options. Then init-connect implementation forked off,
  but the one who copy-pasted the code didn't change it to not
  use a replication-specific variable.
2007-10-20 01:20:38 +04:00
unknown
62fd471647 Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines
into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines.merge


configure.in:
  Auto merged
mysql-test/r/heap_btree.result:
  Auto merged
mysql-test/r/log_tables.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/system_mysql_db.result:
  Auto merged
mysql-test/t/heap_btree.test:
  Auto merged
mysql-test/t/log_tables.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysys/my_getopt.c:
  Auto merged
scripts/mysql_system_tables.sql:
  Auto merged
sql/sql_base.cc:
  Auto merged
2007-10-19 13:06:37 -07:00
unknown
66cd6d0c8f Patch for BUG#31111: --read-only crashes MySQL (events fail to load).
There actually were several problems here:
  - WRITE-lock is required to load events from the mysql.event table,
    but in the read-only mode an ordinary user can not acquire it;
  - Security_context::master_access attribute was not properly
    initialized in Security_context::init(), which led to differences
    in behavior with and without debug configure options.
  - if the server failed to load events from mysql.event, it forgot to
    close the mysql.event table, that led to the coredump, described
    in the bug report.

The patch is to fix all these problems:
  - Use the super-user to acquire WRITE-lock on the mysql.even table;
  - The WRITE-lock is acquired by the event scheduler in two cases:
    - on initial loading of events from the database;
    - when an event has been executed, so its attributes should
      be updated.
    Other cases when WRITE-lock is needed for the mysql.event table
    happen under the user account. So, nothing should be changed there
    for the read-only mode. The user is able to create/update/drop
    an event only if he is a super-user.
  - Initialize Security_context::master_access;
  - Close the mysql.event table in case something went wrong.


mysql-test/r/events_bugs.result:
  Update result file.
mysql-test/t/events_bugs.test:
  A test case for BUG#31111: --read-only crashes MySQL (events fail
  to load).
sql/event_data_objects.cc:
  When the worker thread is going to drop event after the execution
  we should do it under the super-user privileges in order to be able
  to lock the mysql.event table for writing in the read-only mode.
  
  This is a system operation, where user SQL can not be executed.
  So, there is no risk in compromising security by dropping an event
  under the super-user privileges.
sql/event_db_repository.cc:
  1. Close tables if something went wrong in simple_open_n_lock_tables();
  2. As soon as the system event scheduler thread is running under
     the super-user privileges, we should always be able to acquire
     WRITE-lock on the mysql.event table. However, let's have an assert
     to check this.
sql/event_scheduler.cc:
  Run the system event scheduler thread under the super-user privileges.
  In particular, this is needed to be able to lock the mysql.event table
  for writing when the server is running in the read-only mode.
  
  The event scheduler executes only system operations and does not
  execute user SQL (this is what the worker threads for). So, there
  is no risk in compromising security by running the event scheduler
  under the super-user privileges.
sql/events.cc:
  Open the mysql.event table as the super user to be able to acquire
  WRITE-lock in the read-only mode.
sql/sql_class.cc:
  Initialize Security_context::master_acces.
2007-10-19 19:57:08 +04:00
unknown
ddeec5ab8d export patch for bug#31221 2007-10-19 17:07:08 +02:00
unknown
8c57b13424 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31157-5.1-opt
2007-10-19 17:01:13 +03:00
unknown
b87f070489 Bug #31157: crash when select+order by the avg of some field within the group by
The uncacheable flag should be set at fix_fields() stage.
Fixed by moving the flag setting to match the one in 5.1


mysql-test/r/query_cache.result:
  Bug #31157: test case
mysql-test/t/query_cache.test:
  Bug #31157: test case
sql/item_func.cc:
  Bug #31157: The uncacheable flag should be set at
  fix_fields() stage.
sql/item_func.h:
  Bug #31157: The uncacheable flag should be set at
  fix_fields() stage.
2007-10-19 15:43:19 +03:00
unknown
74ef292dc2 BUG#28618 (Skipping into the middle of a group with SQL_SLAVE_SKIP_COUNTER
is possible):

When skipping the beginning of a transaction starting with BEGIN, the OPTION_BEGIN
flag was not set correctly, which caused the slave to not recognize that it was
inside a group. This patch sets the OPTION_BEGIN flag for BEGIN, COMMIT, ROLLBACK,
and XID events. It also adds checks if inside a group before decreasing the
slave skip counter to zero.

Begin_query_log_event was not marked that it could not end a group, which is now
corrected.


mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
  Correcting slave skip counter to get the correct behaviour.
mysql-test/suite/rpl/r/rpl_slave_skip.result:
  Result change.
mysql-test/suite/rpl/t/rpl_slave_skip.test:
  Adding tests to check that skipping works for transactions:
  - Skipping one group with BEGIN first
  - Skipping two groups with BEGIN first
  - Skipping one group without BEGIN first but with AUTOCOMMIT=0
  - LOAD DATA INFILE under statement-based replication
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Result change.
sql/log_event.cc:
  Adding checks if we're in a group when the slave skip counter is 1.
  In that case, we should keep going.
  
  Adding helping member function Log_event::continue_group() denoting
  that this event cannot end a group, and if the skip counter indicates
  that the group ends after this event, it should not decrease the skip
  counter.
  
  Query_log_event will change the OPTION_BEGIN flag for BEGIN, COMMIT, and
  ROLLBACK, even when skipping because of a positive skip count, and
  Xid_log_event will also affect the OPTION_BEGIN flag, even when being
  skipped.
  
  Begin_load_query_log_event cannot end a group, so it is marked to
  continue the group.
sql/log_event.h:
  Adding helper function Log_event::continue_group().
sql/rpl_rli.h:
  Adding Relay_log_info::get_flag() to get the value of a
  replication flag.
sql/slave.cc:
  Adding debug output and changing debug message.
mysql-test/suite/rpl/data/rpl_bug28618.dat:
  New BitKeeper file ``mysql-test/suite/rpl/data/rpl_bug28618.dat''
mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt:
  New BitKeeper file ``mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt''
2007-10-19 14:18:41 +02:00
unknown
bdab4dcefe Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


client/mysqldump.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
sql/sql_lex.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-19 12:44:57 +02:00
unknown
426b551bf6 Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
Problem: lying to the optimizer that a function (Item_func_inet_ntoa)
cannot return NULL values leads to unexpected results (in the case group
keys creation/comparison is broken). 

Fix: Item_func_inet_ntoa::maybe_null should be set properly.


mysql-test/r/func_misc.result:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - test case.
sql/item_strfunc.h:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - set Item_func_inet_ntoa::maybe_null flag.
2007-10-19 14:54:05 +05:00
unknown
244fb387a3 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge


client/mysqltest.c:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/udf_example.c:
  Auto merged
sql/udf_example.def:
  Auto merged
2007-10-18 19:21:07 -06:00
unknown
bf5bcb849f Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge


client/mysqlcheck.c:
  Auto merged
client/mysqltest.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-18 16:57:51 -06:00
unknown
d927461052 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge


mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/udf_example.c:
  Auto merged
sql/udf_example.def:
  Auto merged
2007-10-18 16:39:55 -06:00
unknown
42d4be2c75 Merge moksha.com.br:/Users/davi/mysql/bugs/21557-5.1
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime


sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-10-18 15:47:22 -03:00
unknown
b9b481ec70 Bug#21557 entries in the general query log truncated at 1000 characters.
The general log write function (general_log_print) uses printf style
arguments which need to be pre-processed, meaning that the all arguments
are copied to a single buffer and the problem is that the buffer size is
constant (1022 characters) but queries can be much larger then this.

The solution is to introduce a new log write function that accepts a
buffer and it's length as arguments. The function is to be used when
a formatted output is not required, which is the case for almost all
query write-to-log calls.

This is a incompatible change with respect to the log format of prepared
statements.


mysql-test/r/log_tables.result:
  Add test case result for Bug#21557
mysql-test/t/log_tables.test:
  Add test case for Bug#21557
sql/log.cc:
  Introduce the logger function general_log_write which is similar to
  general_log_print but accepts a single buffer and the buffer length.
  The function doesn't perform any formatting and sends the buffer
  directly to the underlying log handlers.
sql/log.h:
  Introduce the logger function general_log_write.
sql/log_event.cc:
  Pass the query buffer directly to the logger function, formatting
  is not required on this case.
sql/mysql_priv.h:
  Prototype for the logger function general_log_write.
sql/sp_head.cc:
  Pass the query buffer directly to the logger function, formatting
  is not required on this case.
sql/sql_parse.cc:
  Pass the buffer directly to the logger function when formatting
  is not required.
sql/sql_prepare.cc:
  Don't log the statement id, it avoids making a extra copy of the query
  and the query is not truncated anymore if it exceeds the limit.
2007-10-18 15:45:07 -03:00
unknown
bf82c2f9b4 Bug#31692 - binlog_killed.test crashes sometimes
The server crashed when a thread was killed while locking the
general_log table at statement begin.

The general_log table is handled like a performance schema table.
The state of open tables is saved and cleared so that this table
seems to be the only open one. Then this table is opened and locked.
After writing, the table is closed and the open table state is
restored. Before restoring, however, it is asserted that there is
no current table open.

After locking the table, mysql_lock_tables() checks if the thread
was killed in between. If so, it unlocks the table and returns an
error. open_ltable() just returns with the error and leaves closing
of the table to close_thread_tables(), which is called at
statement end.

open_performance_schema_table() did not take this into account.
It assumed that a failed open_ltable() would not leave an open
table behind.

Fixed by closing thread tables after open_ltable() and before
restore_backup_open_tables_state() if the thread was killed.

No test case. It requires correctly timed parallel execution.
Since this bug was detected by the test suite, it seems
dispensable to add another test.


sql/sql_base.cc:
  Bug#31692 - binlog_killed.test crashes sometimes
  Closing thread tables after open_ltable() and before
  restore_backup_open_tables_state() if the thread was killed.
2007-10-18 16:14:27 +02:00
unknown
0a47c29fb0 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31588/50-31588
2007-10-18 16:09:03 +02:00
unknown
0b3720facc Merge magare.gmz:/home/kgeorge/mysql/work/B31221-5.0-gca-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31221-5.1-opt


mysql-test/r/derived.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/type_date.result:
  merge 5.0-opt -> 5.1-opt
2007-10-18 15:57:59 +03:00
unknown
e8504c5dfd Merge magare.gmz:/home/kgeorge/mysql/work/B31221-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31221-5.0-gca-opt
2007-10-18 15:53:45 +03:00
unknown
d5819c1f7c Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31221-5.0-opt
2007-10-18 15:32:48 +03:00
unknown
787a4b487a Bug #31221: Optimizer incorrectly identifies impossible WHERE clause
No warning was generated when a TIMESTAMP with a non-zero time part
 was converted to a DATE value. This caused index lookup to assume
 that this is a valid conversion and was returning rows that match 
 a comparison between a TIMESTAMP value and a DATE keypart.
 Fixed by generating a warning on such a truncation.


mysql-test/r/derived.result:
  Bug #31221: fixed an existing not-precise test case
mysql-test/r/ps_2myisam.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_3innodb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_4heap.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_5merge.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_6bdb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_7ndb.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/type_date.result:
  Bug #31221: Warnings cased by existing tests
mysql-test/r/type_datetime.result:
  Bug #31221: test case
mysql-test/t/derived.test:
  Bug #31221: fixed an existing not-precise test case
mysql-test/t/type_date.test:
  Bug #31221: test case
sql/field.cc:
  Bug #31221: 
   - Upgraded fix for bug 29729
   - issue a warning only if the hh:mm:ss.msec is not zero consistently 
     for all the Field_newdate::store function
sql/item_timefunc.cc:
  Bug #31221: don't ignore the errors when storing data
2007-10-18 15:19:04 +03:00
unknown
89810417ae Post-merge changes for bug #31207: Test "join_nested" shows different strategy on IA64 CPUs / Intel's ICC compiler. 2007-10-18 15:17:21 +04:00
unknown
ddaecb2161 Merge polly.(none):/home/kaa/src/maint/mysql-5.0-maint
into  polly.(none):/home/kaa/src/maint/mysql-5.1-maint


include/my_sys.h:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/sql_array.h:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
mysys/mf_keycache.c:
  Manual merge.
mysys/mf_sort.c:
  Manual merge.
mysys/my_lib.c:
  Manual merge.
mysys/queues.c:
  Manual merge.
sql/sql_acl.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
storage/csv/ha_tina.cc:
  Manual merge.
storage/myisam/sort.c:
  Manual merge.
2007-10-18 14:32:43 +04:00
unknown
85f9df837c Merge polly.(none):/home/kaa/src/maint/bug31207/my50-bug31174
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


myisam/sort.c:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-10-18 13:47:35 +04:00
unknown
4e1e091c9e Merge sin.intern.azundris.com:/misc/mysql/31588/50-31588
into  sin.intern.azundris.com:/misc/mysql/31588/51-31588


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-18 10:55:42 +02:00
unknown
b088967252 Merge sin.intern.azundris.com:/misc/mysql/31588/41-31588
into  sin.intern.azundris.com:/misc/mysql/31588/50-31588


sql/set_var.cc:
  Auto merged
mysql-test/r/variables.result:
  SCCS merged
mysql-test/t/variables.test:
  SCCS merged
2007-10-18 10:51:10 +02:00
unknown
cd9d89a75d Bug#31588: buffer overrun when setting variables
Buffer used when setting variables was not dimensioned to accomodate
trailing '\0'. An overflow by one character was therefore possible.
CS corrects limits to prevent such overflows.


mysql-test/r/variables.result:
  Try to overflow buffer used for setting system variables.
  Unpatched server should throw a valgrind warning here.
  Actual value and error message irrelevant, only length counts.
mysql-test/t/variables.test:
  Try to overflow buffer used for setting system variables.
sql/set_var.cc:
  Adjust maximum number of characters we can store in 'buff' by one
  as strmake() will write a terminating '\0'.
2007-10-18 10:47:54 +02:00
unknown
367fc73e3c Bug #29804 UDF parameters don't contain correct string length
Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself.
    
Now the *_init functions get the constant as a null terminated string with the correct length supplied too.


mysql-test/r/udf.result:
  Test case to check constants passed UDFs.
mysql-test/t/udf.test:
  Test case to check constants passed UDFs.
sql/item_func.cc:
  UDF _init functions are now passed the length of the constants, rather than the max length of the var containing the constant.
sql/udf_example.c:
  Added check_const_len functions. The check_const_len_init functions checks that lengths of constants are correctly passed.
sql/udf_example.def:
  Add new example functions to windows dll export list.
2007-10-17 17:54:11 -04:00
unknown
bfc41161b4 Bug #30878: Crashing when alter an auto_increment non partitioned
table to partitioned

Problem:
Crashed because usage of an uninitialised mutex when auto_incrementing
  a partitioned temporary table

Fix:
Only locking (using the mutex) if not temporary table.


mysql-test/r/partition.result:
  Bug #30878: Crashing when alter an auto_increment non partitioned
    table to partitioned
  test result
mysql-test/t/partition.test:
  Bug #30878: Crashing when alter an auto_increment non partitioned
    table to partitioned
  testcase
sql/ha_partition.cc:
  Bug #30878: Crashing when alter an auto_increment non partitioned
    table to partitioned
  
  If the table is a temporary table, the table_share->mutex is not
    initialised.
  
  Checking if not temporary table, then OK to lock (else no need
    to lock)
2007-10-17 20:40:23 +02:00
unknown
ce8bf087b0 Fix for bug #31207: Test "join_nested" shows different strategy on IA64
CPUs / Intel's ICC compile

The bug is a combination of two problems:

1. IA64/ICC MySQL binaries use glibc's qsort(), not the one in mysys.

2. The order relation implemented by join_tab_cmp() is not transitive,
i.e. it is possible to choose such a, b and c that (a < b) && (b < c)
but (c < a). This implies that result of a sort using the relation
implemented by join_tab_cmp() depends on the order in which
elements are compared, i.e. the result is implementation-specific. Since
choose_plan() uses qsort() to pre-sort the
join tables using join_tab_cmp() as a compare function, the results of
the sorting may vary depending on qsort() implementation.

It is neither possible nor important to implement a better ordering
algorithm in join_tab_cmp(). Therefore the only way to fix it is to
force our own qsort() to be used by renaming it to my_qsort(), so we don't depend
on linker to decide that.

This patch also "fixes" bug #20530: qsort redefinition violates the
standard.


include/my_sys.h:
  Renamed qsort() and qsort2() to my_qsort() and my_qsort2(). Since
  previously we relied on stdlib.h to provide a declaration for qsort(), a
  separate declaration for my_qsort() is now required.
libmysql/Makefile.shared:
  Added mf_qsort.c to libmysql, since my_lib.c now uses my_qsort() instead of qsort().
myisam/ft_boolean_search.c:
  Replaced qsort2() with my_qsort2().
myisam/ft_nlq_search.c:
  Replaced qsort2() with my_qsort2().
myisam/myisampack.c:
  Replaced qsort() with my_qsort().
myisam/sort.c:
  Replaced qsort2() with my_qsort2().
mysys/mf_keycache.c:
  Replaced qsort() with my_qsort().
mysys/mf_qsort.c:
  Renamed qsort() to my_qsort() and qsort2() to my_qsort2().
mysys/mf_sort.c:
  Replaced qsort2() with my_qsort2().
mysys/my_lib.c:
  Replaced qsort() with my_qsort().
mysys/queues.c:
  Replaced qsort2() with my_qsort2().
sql/item_cmpfunc.cc:
  Replaced qsort2() with my_qsort2().
sql/item_cmpfunc.h:
  Replaced qsort2() with my_qsort2().
sql/opt_range.cc:
  Replaced qsort() with my_qsort().
sql/records.cc:
  Replaced qsort() with my_qsort().
sql/sql_acl.cc:
  Replaced qsort() with my_qsort().
sql/sql_array.h:
  Replaced qsort() with my_qsort().
sql/sql_help.cc:
  Replaced qsort() with my_qsort().
sql/sql_select.cc:
  Replaced qsort() with my_qsort().
sql/examples/ha_tina.cc:
  Replaced qsort() with my_qsort().
sql/sql_table.cc:
  Replaced qsort() with my_qsort().
2007-10-17 20:08:58 +04:00
unknown
e8adc3f74b Fix for bug#31615: crash after set names ucs2 collate xxx
Problem: currently, UCS-2 cannot be used as a client character set.

Fix: raise an error if one attempts to set it to USC-2.


mysql-test/r/ctype_ucs.result:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - test result.
mysql-test/t/ctype_ucs.test:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - test case.
sql/set_var.cc:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - raise an error if one is going to set character_set_client to UCS-2.
sql/set_var.h:
  Fix for bug#31615: crash after set names ucs2 collate xxx
    - raise an error if one is going to set character_set_client to UCS-2.
2007-10-17 14:28:00 +05:00
unknown
666efa1c43 Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA
move 'table_collation' field filling outside of if(file) condition
because this field has 'OPEN_FRM_ONLY' attribute


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_show.cc:
  move 'table_collation' field filling outside of if(file) condition
  because this field has 'OPEN_FRM_ONLY' attribute
2007-10-17 14:08:03 +05:00
unknown
9e1604a46c Fix for BUG#24923: Functions with ENUM issues.
The problem was that the RETURNS column in the mysql.proc was of
CHAR(64). That was not enough for storing long-named datatypes.

The fix is to change CHAR(64) to LONGBLOB, and to throw warnings
at the time a stored routine is created if some data is truncated
during writing into mysql.proc.


mysql-test/r/sp.result:
  Update test result.
mysql-test/t/sp.test:
  Add a test case for BUG#24923.
scripts/mysql_system_tables.sql:
  Change the data type of column 'returns' from char(64) to longblob.
scripts/mysql_system_tables_fix.sql:
  Change the data type of column 'returns' from char(64) to longblob.
sql/sp.cc:
  Produce warnings if any data was truncated during writing
  into mysql.proc.
sql/sp.h:
  Add new error code.
sql/share/errmsg.txt:
  Add new error message.
sql/sql_parse.cc:
  Hande
2007-10-17 12:13:56 +04:00
unknown
3f284594be Removing debug variables from non-debug builds.
sql/rpl_record.cc:
  Turning of declaration of debug variables in non-debug builds.
2007-10-17 09:29:11 +02:00
unknown
04e13b103a Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b29549-mysql-5.1-target-5.1.22
2007-10-17 06:53:19 +02:00
unknown
f3cd8a91b0 Eliminating some valgrind warnings resulting from that some
storage engines do not set the unused null bits (i.e., the
filler bits and the X bit) correctly. Also adding some casts
to debug printouts to eliminate compiler warnings.


sql/ha_ndbcluster.cc:
  Changing debug enter names to use full names for member functions.
sql/records.cc:
  Emptying records before starting to read records since some engines do
  not set the unused null bits, leading to valgrind errors.
sql/rpl_record.cc:
  Adding casts to debug printouts to eliminate compiler warnings.
2007-10-17 06:50:03 +02:00
unknown
84984f9111 Manual merge of 5.0-runtime to 5.1-runtime
mysql-test/r/sp-error.result:
  Manual merge
mysql-test/r/sp.result:
  Manual merge
mysql-test/r/udf.result:
  Manual merge
mysql-test/t/sp.test:
  Manual merge
mysql-test/t/udf.test:
  Manual merge
sql/item_create.cc:
  Manual merge
sql/sp_head.cc:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
2007-10-16 20:47:08 -06:00
unknown
1dc0efc606 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-runtime
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge


mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
mysql-test/r/sp-error.result:
  failed auto merge
mysql-test/r/sp.result:
  failed auto merge
mysql-test/r/udf.result:
  failed auto merge
mysql-test/t/sp.test:
  failed auto merge
sql/sp_head.cc:
  failed auto merge
sql/sql_yacc.yy:
  failed auto merge
2007-10-16 15:43:16 -06:00
unknown
42b6424327 Fixed broken call to my_error
sql/sql_yacc.yy:
  Fixed error message to use char*, not LEX_STRING
2007-10-16 14:27:20 -06:00
unknown
72af57b87b Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-28318-rework
2007-10-16 11:17:27 -06:00
unknown
28ef3b2a7f Implementing code review comments
mysql-test/r/sp.result:
  Added tests for coverage
mysql-test/t/sp.test:
  Added tests for coverage
sql/sql_udf.cc:
  Code cleanup
2007-10-16 11:16:31 -06:00
unknown
5254686e53 Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2007-10-16 14:45:52 +02:00
unknown
1f8126190b Bug#30710 query_cache.test fails on embedded - per-column privs test
The embedded version of the server doesn't use column level grants, and 
the compile directive NO_EMBEDDED_ACCESS_CHECKS should be checked instead of
the redundant HAVE_QUERY_CACHE (which is always the case) to determine if 
column level grants should be compiled or not.


mysql-test/r/query_cache.result:
  Updated result file
mysql-test/r/query_cache_notembedded.result:
  Updated result file
mysql-test/t/query_cache.test:
  Moved test with GRANT to query_cache_notembedded test.
mysql-test/t/query_cache_notembedded.test:
  Moved test with GRANT to query_cache_notembedded test.
sql/sql_cache.cc:
  Changed the conditional compilation directive to only compile column level grant
  checks if NO_EMBEDDED_ACCESS_CHECKS isn't defined.
2007-10-16 14:42:42 +02:00
unknown
faf0f9fb21 Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable
Problem: we don't evaluate given expression checking values of the
slow_query_log_file/general_log_file, don't check it for NULL.

Fix: evaluate the expression, check result returned.


mysql-test/r/log_state.result:
  Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable
    - test result.
mysql-test/t/log_state.test:
  Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable
    - test case.
sql/set_var.cc:
  Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable
    - evaluate var->value calling val_str() method;
    - check for null values returned;
    - return proper errors if any.
2007-10-16 17:19:07 +05:00
unknown
d3443ee1c7 Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b31081
into  mysql.com:/home/bar/mysql-work/mysql-5.1.b31081


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_regexp.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
2007-10-16 15:04:04 +05:00
unknown
666155f5e7 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-work/mysql-5.0.b31081


mysql-test/t/ctype_uca.test:
  Auto merged
2007-10-16 14:58:59 +05:00
unknown
6f8fd0a797 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-10-16 14:10:07 +05:00
unknown
55a3a64eb1 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/item.cc:
  Auto merged
sql/item.h:
  manual merge
2007-10-16 13:19:01 +05:00
unknown
f1d7a96b0a Bug#28318 (CREATE FUNCTION (UDF) requires a schema) -- part II
The root cause of the issue was that the CREATE FUNCTION grammar,
for User Defined Functions, was using the sp_name rule.
The sp_name rule is intended for fully qualified stored procedure names,
like either ident.ident, or just ident but with a default database
implicitly selected.

A UDF does not have a fully qualified name, only a name (ident), and should
not use the sp_name grammar fragment during parsing.

The fix is to re-organize the CREATE FUNCTION grammar, to better separate:
- creating UDF (no definer, can have AGGREGATE, simple ident)
- creating Stored Functions (definer, no AGGREGATE, fully qualified name)

With the test case provided, another issue was exposed which is also fixed:
the DROP FUNCTION statement was using sp_name and also failing when no database
is implicitly selected, when droping UDF functions.
The fix is also to change the grammar so that DROP FUNCTION works with
both the ident.ident syntax (to drop a stored function), or just the ident
syntax (to drop either a UDF or a Stored Function, in the current database)


mysql-test/r/sp-error.result:
  Adjust test results
mysql-test/r/udf.result:
  Adjust test results
mysql-test/t/sp-error.test:
  Adjust test results
mysql-test/t/udf.test:
  Adjust test results
sql/sql_parse.cc:
  CREATE UDF FUNCTION does not use a fully qualified name.
sql/sql_yacc.yy:
  Fix grammar for CREATE / DROP FUNCTION, FOR udf
  Improve error messages for select no_such_function()
2007-10-15 19:15:38 -06:00
unknown
44e92639b1 fix problem caused by previous submission for bugs BUG#29589 BUG#29772
sql/set_var.cc:
  fix problem caused by previous submission
2007-10-15 15:53:39 -04:00
unknown
dd1217816c Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime
2007-10-15 13:25:12 -04:00
unknown
520774eae7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime
2007-10-15 13:23:16 -04:00
unknown
048006e2f9 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters


mysql-test/r/ctype_utf8.result:
  issue an error if string has illegal characters
mysql-test/t/ctype_utf8.test:
  issue an error if string has illegal characters
sql/item.cc:
  issue an error if string has illegal characters
sql/item.h:
  issue an error if string has illegal characters
sql/sql_yacc.yy:
  issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
unknown
4db46e26f3 Add comments, tidy up sql_delete.cc to refer to thd->row_count_func
explicitly.


sql/sql_class.cc:
  Add comments.
sql/sql_delete.cc:
  Change syntax to make grepping easier. No semantical change.
2007-10-15 16:42:41 +04:00
unknown
7345835213 Fix broken compilation.
sql/net_serv.cc:
  Fix the build I broke by the previous change.
2007-10-15 15:49:16 +04:00
unknown
c969f78b7c Remove an unused variable that was there since the first implementation
of the stored procedure cursors (materialized on disk).


include/mysql_com.h:
  Remove an unused variable.
sql/protocol.cc:
  net->no_send_eof was not used anywhere.
2007-10-15 15:45:20 +04:00
unknown
35ec70abb5 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2007-10-15 08:51:35 +02:00
unknown
9458aa48a3 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  mysql.com:/home/bar/mysql-work/mysql-5.1.b27287
2007-10-15 11:16:53 +05:00
unknown
e9668a9b55 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31154/b31154.5.0
2007-10-15 10:28:58 +05:00
unknown
fbb2d1ff69 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31154/b31154.5.1
2007-10-15 10:21:22 +05:00
unknown
173eb806db bug #29801 Federated engine crashes local server
if remote server sends malicious response.

We need to check if the SHOW TABLE STATUS query we issue inside the
FEDERATED engine returned the result with the proper (or just sufficient)
number of rows. Otherwise statements like row[12] can crash the server.


sql/ha_federated.cc:
  bug #29801 Federated engine crashes local server
                 if remote server sends malicious response.
  
  Return with the error if the remote server return fewer rows than we need.
2007-10-15 10:11:52 +05:00
unknown
b777dbfba8 Merge mysql.com:/home/ram/work/b31154/b31154.5.0
into  mysql.com:/home/ram/work/b31154/b31154.5.1


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2007-10-15 09:44:22 +05:00
unknown
4ecb2aa4eb Merge magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.1-opt


sql/item_sum.cc:
  Auto merged
2007-10-14 11:30:28 +03:00
unknown
97a98ff59b item_sum.cc:
Fixed dbug macros usage errors


sql/item_sum.cc:
  Fixed dbug macros usage errors
2007-10-14 11:28:43 +03:00
unknown
bf9eb0f0d7 manual merge for bug_29136, bug#29309.
mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test:
  manual merge from 5.0
mysql-test/r/innodb.result:
  results changed
mysql-test/r/multi_update.result:
  results changed
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  manual merge: results re-recorded
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  results changed
mysql-test/suite/manual/r/rpl_replication_delay.result:
  results recorded for 5.1
mysql-test/t/innodb.test:
  removing bug27716 regression test as one exists in binlog suite already.
mysql-test/t/multi_update.test:
  manual merge plus refining for execution in both binlog_format.
sql/log_event.cc:
  bloody manual merge;
  the fact that an event is artificial is encode with setting timestamp argument to zero.
  rli's last_master_timestamp won't be updated in stmt_done in such case.
sql/rpl_rli.cc:
  simulation and the real fixing code.
  Don't update last_master_timestamp with zero.
sql/sql_delete.cc:
  manual merge
2007-10-13 23:12:50 +03:00
unknown
1408095a11 Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug29136-mdelete
into  koti.dsl.inet.fi:/home/elkin/MySQL/merge-5.1


mysql-test/t/multi_update.test:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  manual merge use local; another file has to be changed in 5_1.
mysql-test/r/innodb.result:
  manual merge use local to re-record the results
mysql-test/r/multi_update.result:
  manual merge use local to re-record the results
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  manual merge use local to re-record the results
mysql-test/t/innodb.test:
  restoring bug#27716 snippet
sql/log_event.cc:
  trasfering simulation to another file: rpl_rli.cc
2007-10-13 16:51:16 +03:00
unknown
c8b6d10509 Bug #29136 erred multi-delete on trans table does not rollback the statement
similar to bug_27716, but it was stressed on in the synopsis on that there is another
side of the artifact affecting behaviour in transaction.

Fixed with deploying multi_delete::send_error() - otherwise never called - and refining its logic
to perform binlogging job if needed.

The changeset includes the following side effects:
- added tests to check bug_23333's scenarios on the mixture of tables for multi_update;
- fixes bug@30763 with two-liner patch and a test coinciding to one added for bug_23333.


mysql-test/r/innodb.result:
  results changed
mysql-test/r/mix_innodb_myisam_binlog.result:
  results changed
mysql-test/r/multi_update.result:
  results changed
mysql-test/t/innodb.test:
  trans table specific test added
mysql-test/t/mix_innodb_myisam_binlog.test:
  multi-update  and multi-delete of mixure of ta and not-ta tables tests added (relates to bug_23333).
mysql-test/t/multi_update.test:
  testing another branch of mult-delete: send_eof() (binloggin there), send_error (early return)
sql/sql_class.h:
  a new flag to designate the fact the statement's error has been handled.
  The flag is checked by ::send_error() methods (multi_update and _delete classes)
sql/sql_delete.cc:
  expanding multi_delete::send_error to 
  1. early return if error_handled == t
  2. binlogging locally if there was a non-trans table modified side effect
sql/sql_parse.cc:
  adding multi_update::send_error which can perform binlogging and rollback job in needed
sql/sql_update.cc:
  issues relating to
   
  1. bug_27716 with zeroing of `updated' to serve as the flag of early return from send_error().
     The flag is changed to be a new member error_handled; also moved outside binlogging branch.
     The reason for this change is that bug_23333 fixes were pushed after the bug_27716's and they
     left this flaw (also no test coverage).
  2. bug_30763 with assertion on trans_safe. I decide to make 2 liner fix for that bug here instead of to remove
     those two assertions. This new bug test case is the same as for multi-update on the mixure of tables.
     The rational for this fix:
     presumption for mutli_update::trans_safe to be set to zero at
     multi_update::multi_update or multi_update::initialize_tables() is incorrect.
  
     trans_safe := false should happen only when a non-transactional table gets modified. 
     Therefore, at initialization the member must be be set to true.
2007-10-13 15:49:42 +03:00
unknown
c62aa5c795 Merge magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31156-5.1-opt


mysql-test/r/func_group.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
2007-10-13 09:22:37 +03:00
unknown
c9141ac580 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
2007-10-13 09:20:23 +03:00
unknown
6c974c673f Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.1-opt


sql/item_cmpfunc.cc:
  Auto merged
2007-10-13 09:13:00 +03:00
unknown
387d03f574 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt


sql/item_cmpfunc.cc:
  Auto merged
2007-10-13 09:12:15 +03:00
unknown
1a5582d422 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-10-12 22:55:33 +05:00
unknown
b3b01cf48b BUG#29549 (Endians: rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb and rpl_ndb_mix_innodb failed on):
Post-merge fixes. Setting write bit before calling Field::store() since the function asserts that
the write bit has been set.


sql/field.cc:
  Setting bit in write set to prevent assertion from throwing when calling Field::store().
2007-10-12 18:22:31 +02:00
unknown
334686d323 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-12 20:54:54 +05:00
unknown
de8a961604 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime
2007-10-12 11:03:10 -03:00
unknown
3cf3e2863e Merge moksha.com.br:/Users/davi/mysql/bugs/post-rename-5.0
into  moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
2007-10-12 10:56:59 -03:00
unknown
7c25308aa4 Merge moksha.com.br:/Users/davi/mysql/bugs/post-rename-5.0
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime


sql/sql_handler.cc:
  Auto merged
2007-10-12 10:56:50 -03:00
unknown
4eb4b37cfa Bug#31409 RENAME TABLE causes server crash or deadlock when used with HANDLER statements
If mysql_lock_tables fails because the lock was aborted, we need to
reset thd->some_tables_delete, otherwise we might loop indefinitely
because handler's tables are not closed in a standard way, meaning
that close_thread_tables() (which resets some_tables_deleted) is not
used.

This patch fixes sporadical failures of handler_myisam/innodb tests
which were introduced by previous fix for this bug.


sql/sql_handler.cc:
  Properly reset thd->some_tables_deleted if mysql_lock_tables
  fails for some reason.
2007-10-12 10:55:46 -03:00
unknown
7619a5efc6 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/rpl_record.cc:
  Manual merge.
2007-10-12 13:24:28 +02:00
unknown
39bc53e7c7 Merge magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31440-5.1-opt


mysql-test/r/func_regexp.result:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2007-10-12 14:14:27 +03:00
unknown
9380fdb1c6 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31440-5.0-opt
2007-10-12 14:11:27 +03:00
unknown
147eef3eba Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/31155/my51-31155


sql/item.cc:
  Auto merged
sql/item.h:
  merging
2007-10-12 15:36:51 +05:00
unknown
1ccf107a5e Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31155/my50-31155


sql/item.cc:
  Auto merged
2007-10-12 15:35:16 +05:00
unknown
9908eceb2a Merge mysql.com:/home/hf/work/31155/my50-31155
into  mysql.com:/home/hf/work/31155/my51-31155


sql/item.h:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/item.cc:
  merging
sql/item_geofunc.cc:
  merging
2007-10-12 15:33:26 +05:00
unknown
0d128c0746 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/30821/50-30821


sql/mysqld.cc:
  Auto merged
2007-10-12 11:30:53 +02:00
unknown
c83bff9915 Bug#30821: setting --tc_heuristic_recover tries to set myisam_stats_method
Options to mysqld were not processed correctly because switch statement
was missing some "break"s. CS adds them.

No test case; would require .opt file and server restart. Manually tested.


sql/mysqld.cc:
  Add missing "break"s to switch() in mysqld to fix option processing.
2007-10-12 11:23:45 +02:00
unknown
bc2ecae3e8 Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b29549-mysql-5.1-target-5.1.22


mysql-test/suite/rpl/t/disabled.def:
  Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
  Auto merged
sql/log.cc:
  Auto merged
sql/rpl_record.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
BitKeeper/deleted/.del-rpl_ndb_innodb2ndb.result~1:
  Delete: mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result
BitKeeper/deleted/.del-rpl_ndb_myisam2ndb.result~1:
  Delete: mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt:
  Manual merge
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test:
  Manual merge
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt:
  Manual merge
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test:
  Manual merge
sql/log_event.cc:
  Manual merge
sql/field.cc:
  Manual merge and adding comment.
sql/field.h:
  Manual merge.
2007-10-12 09:40:24 +02:00
unknown
f22b95401e Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-27858-b


mysql-test/r/log_tables.result:
  Auto merged
2007-10-11 17:58:32 -06:00
unknown
3df1613f27 Bug#27858 (Failing to log to a log table doesn't log anything to error log)
Before this patch, failures to write to the log tables (mysql.slow_log
and mysql.general_log) were improperly printed (the time was printed twice),
or not printed at all.

With this patch, failures to write to the log tables is reported in the
error log, for all cases of failures.


mysql-test/r/log_tables.result:
  Bug#27858 (Failing to log to a log table doesn't log anything to error log)
mysql-test/t/log_tables.test:
  Bug#27858 (Failing to log to a log table doesn't log anything to error log)
sql/log.cc:
  Bug#27858 (Failing to log to a log table doesn't log anything to error log)
2007-10-11 17:55:18 -06:00
unknown
03e74b8c5e Bug#29223 declare cursor c for SHOW .....
"DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work,
but is untested for some SHOW commands and does not work for other SHOW
commands.

Since this is an un-intended feature that leaked as a result of a coding bug
(in the parser grammar), the correct fix is to fix the grammar to not accept
this construct.

In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>"
is not considered a bug, and we will not implement other features to make all
the SHOW commands usable inside a cursor just because someone exploited a bug.


mysql-test/r/sp-error.result:
  Only allow declaring cursors for SELECT statements to avoid
  possible further confusion/problems.
mysql-test/t/information_schema.test:
  Only SELECT statements are allowed in cursors.
mysql-test/t/sp-error.test:
  Add test case for Bug#29223. Non-SELECT statements in cursors now
  yields a parser error.
sql/sql_yacc.yy:
  Rework DECLARE CURSOR statement to not allow non-SELECT statements.
2007-10-11 17:38:40 -03:00
unknown
f0fcc8c267 Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31471
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/create.result:
  Auto merged
mysql-test/r/null.result:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2007-10-11 23:09:08 +05:00
unknown
1fc06a1f46 Merge gleb.loc:/home/uchum/work/bk/PA/5.0-opt-31471
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-10-11 22:42:11 +05:00
unknown
06fb8c2d10 BUG#29549 (Endians: test failures on Solaris):
Refactoring code to add parameter to pack() and unpack() functions with
purpose of indicating if data should be packed in little-endian or
native order. Using new functions to always pack data for binary log
in little-endian order. The purpose of this refactoring is to allow
proper implementation of endian-agnostic pack() and unpack() functions.

Eliminating several versions of virtual pack() and unpack() functions
in favor for one single virtual function which is overridden in
subclasses.

Implementing pack() and unpack() functions for some field types that
packed data in native format regardless of the value of the
st_table_share::db_low_byte_first flag.

The field types that were packed in native format regardless are:
Field_real, Field_decimal, Field_tiny, Field_short, Field_medium,
Field_long, Field_longlong, and Field_blob.

Before the patch, row-based logging wrote the rows incorrectly on
big-endian machines where the storage engine defined its own
low_byte_first() to be FALSE on big-endian machines (the default
is TRUE), while little-endian machines wrote the fields in correct
order. The only known storage engine that does this is NDB. In effect,
this means that row-based replication from or to a big-endian
machine where the table was using NDB as storage engine failed if the
other engine was either non-NDB or on a little-endian machine.

With this patch, row-based logging is now always done in little-endian
order, while ORDER BY uses the native order if the storage engine
defines low_byte_first() to return FALSE for big-endian machines.

In addition, the max_data_length() function available in Field_blob
was generalized to the entire Field hierarchy to give the maximum
number of bytes that Field::pack() will write.


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Sorting by columns that produces deterministic order.
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Result change.
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Result change.
mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result:
  Result change.
mysql-test/suite/rpl/t/disabled.def:
  Enabling tests.
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
  Adding missing sync_slave_with_master causing slave to keep tables
  after shutdown.
mysql-test/suite/rpl_ndb/t/disabled.def:
  Enabling tests.
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt:
  Adding --new option
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test:
  Adding have_log_bin.
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt:
  Adding --new option
mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test:
  Adding have_log_bin
mysql-test/t/partition.test:
  Adding have_archive, since that is used in the test.
sql/field.cc:
  Eliminating all two-argument pack() and unpack() functions and moving
  functionality into the four-argument version. The four argument version
  is introduced so that it is possible to avoid using the storage engine
  default when writing and reading the packed format (the unpacked format
  still uses the storage engine's default). This is used by row-based
  replication to write the fields in a storage engine- and endian-agnostic
  format.
  
  Packing integral and floating-point numbers in little-endian format
  (if requested).
  
  Using pad_char for the field instead of spaces (0x20) when unpacking.
  
  Adding some Doxygen documentation.
  ---
  Adding max_data_length() to denote the maximum number of bytes that
  pack() will write.
  
  Adding casts to remove warnings for debug printouts.
sql/field.h:
  Eliminating all virtual pack() and unpack() functions except the four-
  argument version, which now is the function that shall be overridden.
  The two-argument versions are convenience functions, to prevent changes
  to code that uses these.
  
  Adding code to pack integer numbers and floating-point numbers in
  little-endian format, if requested.
  ---
  Adding max_data_length() to denote the maximum number of bytes that
  pack() will write.
sql/log.cc:
  Removing debug printout causing crash when starting NDB on Solaris.
sql/log_event.cc:
  Adding missing #ifndef causing compile failure. Adding debug printouts.
sql/rpl_record.cc:
  Debriding code. Using new pack() and unpack() functions to always pack
  fields little-endian. Adding debug printouts.
  ---
  Using max_data_length() when packing field into row.
  
  Adding casts to debug printouts.
sql/sql_show.cc:
  Adding code that causes crash on Solaris machines since printf() cannot
  handle NULL values for strings properly.
mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
  New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result''
mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
  New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result''
2007-10-11 18:18:05 +02:00
unknown
3ca34c102a A patch for BUG#31418: User locks misfunctioning after
mysql_change_user().

The problem was that THD::ull was not reset in THD::cleanup().

The fix is to reset it.


sql/sql_class.cc:
  Reset THD::ull after cleanup to prevent memory corruption.
tests/mysql_client_test.c:
  Add test case for BUG#31418.
2007-10-11 17:11:12 +04:00
unknown
24a567e9f6 Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
Problem: GROUP_CONCAT(DISTINCT BIT_FIELD...) uses a tree to store keys;
which are constructed using a temporary table fields,
see Item_func_group_concat::setup().
As a) we don't store null bits in the tree where the bit fields store parts 
of their data and b) there's no method to properly compare two table records
we've got problem.

Fix: convert BIT fields to INT in the temporary table used.


mysql-test/r/func_gconcat.result:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - test result.
mysql-test/t/func_gconcat.test:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - test case.
sql/item_sum.cc:
  Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
    - force the create_tmp_table() to convert BIT columns to INT 
      in order to be able to compare records containing BIT fields.
2007-10-11 17:20:34 +05:00
unknown
048cb42dbf after merge fix 2007-10-11 16:41:05 +05:00
unknown
937504e7a0 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_yacc.yy:
  manual merge
2007-10-11 16:13:14 +05:00
unknown
f30eacb223 Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset


mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/ctype_utf8.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/ctype_utf8.test:
  test case
sql/item.cc:
  check_well_formed_result() moved from Item_str_func
sql/item.h:
  check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
  check_well_formed_result moved to Item
  fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
  check_well_formed_result moved to Item
sql/sql_yacc.yy:
  added check for well formed string
2007-10-11 16:07:10 +05:00
unknown
76af571717 Bug #31440: 'select 1 regex null' asserts debug server
The special case with NULL as a regular expression
was handled at prepare time. But in this special case
the item was not marked as fixed. This caused an assertion
at execution time.
Fixed my marking the item as fixed even when known to 
return NULL at prepare time.


mysql-test/r/func_regexp.result:
  Bug #31440: test case
mysql-test/t/func_regexp.test:
  Bug #31440: test case
sql/item_cmpfunc.cc:
  Bug #31440: mark the item as fixed even when 
  known to return NULL.
2007-10-11 11:29:26 +03:00
unknown
b24d4a977f Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/bugs/31409-5.1


sql/sql_base.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
2007-10-10 21:16:53 -03:00
unknown
dc1ce0ba41 Mismerge broken 5.1-runtime compilation because do_command was defined
static but it's still used by another compilation unit.

Remove static qualifier from do_command definition.


sql/sql_parse.cc:
  do_command is also used by sql_connect.c in 5.1
2007-10-10 21:07:23 -03:00
unknown
d2b946c59e Merge moksha.com.br:/Users/davi/mysql/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/mysql-5.1-runtime


sql/sql_parse.cc:
  Auto merged
2007-10-10 19:44:12 -03:00
unknown
954bb0f555 Merge moksha.com.br:/Users/davi/mysql/bugs/21587-5.0
into  moksha.com.br:/Users/davi/mysql/bugs/21587-5.1


sql/sql_handler.cc:
  Auto merged
2007-10-10 18:17:11 -03:00
unknown
17c19299af Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


configure.in:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
scripts/Makefile.am:
  Auto merged
scripts/mysql_system_tables_data.sql:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
2007-10-10 14:15:09 -06:00
unknown
5597f40f7f Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


sql/sql_class.cc:
  Auto merged
2007-10-10 14:01:48 -06:00
unknown
80ace29416 Bug #31517: Potential crash due to access of NULL thd in mark_transaction_to_rollback()
Introduced in mark_transaction_to_rollback(), part of fix for bug 24989;
fix is to check thd for NULL before using it.


sql/sql_class.cc:
  It is possible that mark_transaction_to_rollback() may be
  called in rare circumstances when thd is NULL (e.g., from
  some calls to convert_error_code_to_mysql()).  Don't use thd
  if it is NULL.
2007-10-10 14:00:57 -06:00
unknown
da804f3088 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


configure.in:
  Auto merged
sql/ha_partition.cc:
  Auto merged
2007-10-10 21:25:19 +02:00
unknown
219af87231 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.1-runtime
2007-10-10 14:48:25 -04:00
unknown
f9759397d2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  damien-katzs-computer.local:/Users/dkatz/mysql-5.0-runtime
2007-10-10 14:46:30 -04:00
unknown
c866f8015f Fixed bug #31471: decimal_bin_size: Assertion `scale >= 0 &&
precision > 0 && scale <= precision'.

A sign of a resulting item of the IFNULL function was not
updated and the maximal length of this result was calculated
improperly. Correct algorithm was copy&pasted from the IF
function implementation.


sql/item_cmpfunc.cc:
  Fixed bug #31471.
  The Item_func_ifnull::fix_length_and_dec method has been
  modified to update the Item_func_ifnull::unsigned_flag field
  and to take this field into account when calculating the
  Item_func_ifnull::max_length value.
  (See Item_func_if::fix_length_and_dec for reference).
mysql-test/t/null.test:
  Added test case for bug #31471.
mysql-test/r/null.result:
  Added test case for bug #31471.
mysql-test/r/create.result:
  Update test case after the bugfix of bug #31471.
2007-10-10 20:14:29 +05:00
unknown
3b4b925ea7 Fix for BUG#20023: mysql_change_user() resets the value
of SQL_BIG_SELECTS.

The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.

The fix is to update SQL_BIG_SELECTS properly.


sql/mysql_priv.h:
  Cleanup: make prepare_new_connection_state() private for module.
sql/sql_class.cc:
  Update THD::options with the respect to SQL_BIG_SELECTS
  in COM_CHANGE_USER.
sql/sql_connect.cc:
  Cleanup: make prepare_new_connection_state() private for module.
tests/mysql_client_test.c:
  Add a test case BUG#20023.
2007-10-10 17:57:01 +04:00
unknown
aec287fd67 Bug #30825: Problems when putting a non-spatial index on a GIS column
Fixed the usage of spatial data (and Point in specific) with 
 non-spatial indexes.
 Several problems :
   - The length of the Point class was not updated to include the 
     spatial reference system identifier. Fixed by increasing with 4 
     bytes.
   - The storage length of the spatial columns was not accounting for
     the length that is prepended to it. Fixed by treating the 
     spatial data columns as blobs (and thus increasing the storage
     length)
   - When creating the key image for comparison in index read wrong
     key image was created (the one needed for and r-tree search,
     not the one for b-tree/other search). Fixed by treating the
     spatial data columns as blobs (and creating the correct kind of
     image based on the index type). 


mysql-test/r/bdb_gis.result:
  Bug #30825: bdb tests
mysql-test/r/gis-rtree.result:
  Bug #30825: key length changed
mysql-test/r/gis.result:
  Bug #30825: MyISAM tests
mysql-test/r/innodb_gis.result:
  Bug #30825: InnoDB tests
mysql-test/t/bdb_gis.test:
  Bug #30825: bdb tests
mysql-test/t/gis.test:
  Bug #30825: MyISAM tests
mysql-test/t/innodb_gis.test:
  Bug #30825: InnoDB tests
sql/field.cc:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/field.h:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/sql_select.h:
  Bug #30825: Geometry data are a blob derivate
sql/sql_table.cc:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/sql_yacc.yy:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/table.cc:
  Bug #30825: It stores a length for spatial data
   as well, so increase the storage length (as it's
   done for blobs).
mysql-test/include/gis_keys.inc:
  Bug #30825: Test file for spatial data and non-spatial indexes
2007-10-10 16:26:02 +03:00
unknown
4e4f4fe51f Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


mysql-test/t/sp.test:
  Merge.
sql/item_func.cc:
  Merge.
2007-10-10 13:35:40 +04:00
unknown
2dd78add6b Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


libmysql/libmysql.c:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-10-10 14:33:46 +05:00
unknown
6146c0c75d Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


libmysql/libmysql.c:
  Auto merged
2007-10-10 14:31:19 +05:00
unknown
9676a86aed after merge fix 2007-10-10 14:22:21 +05:00
unknown
62f72d3610 Bug#28893 --relay-log variable is not exposed with SHOW VARIABLES
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES


mysql-test/r/rpl_flush_log_loop.result:
  test result
mysql-test/t/rpl_flush_log_loop.test:
  test case
sql/set_var.cc:
  added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
  to make them visible within SHOW VARIABLES
2007-10-10 12:21:11 +05:00
unknown
d67410b57d Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug30484
2007-10-10 08:30:02 +02:00
unknown
8a88cacb61 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b29444/b29444.5.1
2007-10-10 10:20:19 +05:00
unknown
e952df911c Merge virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/bugs/28318-5.0
into  virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/mysql-5.0-runtime


sql/sql_yacc.yy:
  Auto merged
2007-10-09 20:48:37 -03:00
unknown
ad104d5bfd Bug#28318 CREATE FUNCTION (UDF) requires a schema
Bug#29816 Syntactically wrong query fails with misleading error message

The core problem is that an SQL-invoked function name can be a <schema
qualified routine name> that contains no <schema name>, but the mysql
parser insists that all stored procedures (function, procedures and
triggers) must have a <schema name>, which is not true for functions.
This problem is especially visible when trying to create a function
or when a query contains a syntax error after a function call (in the
same query), both will fail with a "No database selected" message if
the session is not attached to a particular schema, but the first
one should succeed and the second fail with a "syntax error" message.

Part of the fix is to revamp the sp name handling so that a schema
name may be omitted for functions -- this means that the internal
function name representation may not have a dot, which represents
that the function doesn't have a schema name. The other part is
to place schema checks after the type (function, trigger or procedure)
of the routine is known.


mysql-test/r/sp-error.result:
  Add test case result for Bug#29816
mysql-test/r/udf.result:
  Add test case result for Bug#28318
mysql-test/t/sp-error.test:
  Add test case for Bug#29816
mysql-test/t/udf.test:
  Add test case for Bug#28318
sql/sp.cc:
  Copy the (last) nul byte of the stored routine key and move name parsing
  code to the sp_name class constructor.
sql/sp_head.cc:
  Revamp routine name parsing for when no schema is specified and
  omit dot from the qualified name if the routine is not associated
  with a scheme name.
sql/sp_head.h:
  Name parsing got bigger, uninline by moving to a single unit -- the sp_head.cc
  file.
sql/sql_yacc.yy:
  Only copy the schema name if one is actually set and check for schema
  name presence only where it's necessary.
2007-10-09 20:46:33 -03:00
unknown
ad8ca7b3b4 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/mysqld.cc:
  Auto merged
2007-10-09 13:49:58 -06:00
unknown
91923ed2d4 Merge moksha.com.br:/Users/davi/mysql/push/mysql-5.0-runtime
into  moksha.com.br:/Users/davi/mysql/push/bugs/31409-5.0
2007-10-09 16:27:54 -03:00
unknown
7d05e7e94c Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-10-09 11:04:45 -04:00
unknown
f57813e457 Bug#31409 RENAME TABLE causes server crash or deadlock when used with HANDLER statements
This deadlock occurs when a client issues a HANDLER ... OPEN statement
that tries to open a table that has a pending name-lock on it by another
client that also needs a name-lock on some other table which is already
open and associated to a HANDLER instance owned by the first client.
The deadlock happens because the open_table() function will back-off
and wait until the name-lock goes away, causing a circular wait if some
other name-lock is also pending for one of the open HANDLER tables.

Such situation, for example, can be easily repeated by issuing a RENAME
TABLE command in such a way that the existing table is already open
as a HANDLER table by another client and this client tries to open
a HANDLER to the new table name.

The solution is to allow handler tables with older versions (marked for
flush) to be closed before waiting for the name-lock completion. This is
safe because no other name-lock can be issued between the flush and the
check for pending name-locks.

The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).


sql/sql_base.cc:
  Improve comments in the open_table() function, stating the importance
  of the handler tables flushing for the back-off process.
sql/sql_handler.cc:
  Allows handler tables flushes when opening new tables in order to avoid
  potential deadlocks. Add comments explaining the importance of the flush.
2007-10-09 12:02:59 -03:00
unknown
8ae794bbd6 Fix for bug #29444: crash with partition refering to table in create-select
Problem: creating a partitioned table during name resolution for the 
partition function we search for column names in all parts of the
CREATE TABLE query. It is superfluous (and wrong) sometimes.

Fix: launch name resolution for the partition function against
the table we're creating.


mysql-test/r/partition.result:
  Fix for bug #29444: crash with partition refering to table in create-select
    - test result.
mysql-test/t/partition.test:
  Fix for bug #29444: crash with partition refering to table in create-select
    - test result.
sql/item.cc:
  Fix for bug #29444: crash with partition refering to table in create-select
    - LEX::use_only_table_context introduced, which is used in the 
      Item_field::fix_fields() to resolve names only against
      context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.cc:
  Fix for bug #29444: crash with partition refering to table in create-select
    - LEX::use_only_table_context introduced, which is used in the 
      Item_field::fix_fields() to resolve names only against
      context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.h:
  Fix for bug #29444: crash with partition refering to table in create-select
    - LEX::use_only_table_context introduced, which is used in the 
      Item_field::fix_fields() to resolve names only against
      context->first_name_resolution_table/last_name_resolution_table.
sql/sql_partition.cc:
  Fix for bug #29444: crash with partition refering to table in create-select
    - set the lex->use_only_table_context before the func_expr->fix_fields()
      call to ensure we're resolving names against the table we're creating;
      then restore it back after the call.
2007-10-09 19:16:39 +05:00
unknown
09ddd95132 Merge bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my51-bug31160


sql/item_timefunc.h:
  Auto merged
2007-10-09 15:35:03 +02:00
unknown
9141577596 Merge martin@mhansson.mysql.internal:/home/martin/mysql/src/bug31160/my51-bug31160
into  dl145s.mysql.com:/data0/mhansson/bug31160/my51-bug31160
2007-10-09 15:27:38 +02:00
unknown
69ecde861a Merge bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160


sql/item_timefunc.h:
  Auto merged
2007-10-09 15:25:27 +02:00
unknown
addc2f4720 Merge martin@mhansson.mysql.internal:/home/martin/mysql/src/bug31160/my50-bug31160
into  dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160
2007-10-09 15:23:16 +02:00
unknown
277a719247 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31438/b31438.5.1
2007-10-09 18:18:14 +05:00
unknown
d28ce15779 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b31249/b31249.5.0


mysql-test/r/type_datetime.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
2007-10-09 18:14:13 +05:00
unknown
05903b333f Merge linux-st28.site:/home/martin/mysql/src/bug31160/my50-bug31160
into  linux-st28.site:/home/martin/mysql/src/bug31160/my51-bug31160


mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
sql/item_timefunc.h:
  Auto merged
mysql-test/t/func_time.test:
  SCCS merged
2007-10-09 15:00:06 +02:00
unknown
ae4141ed75 Bug#31160: MAKETIME() crashes server when returning NULL in ORDER BY using filesort
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().


mysql-test/r/func_sapdb.result:
  Bug#31160: Changed test result.
mysql-test/r/func_time.result:
  Bug#31160: Test result.
mysql-test/t/func_time.test:
  Bug#31160: Test case.
sql/item_timefunc.h:
  Bug#31160: The fix: Initializing maybe_null to true
2007-10-09 14:58:09 +02:00
unknown
5cdb084e09 Merge mysql.com:/home/ram/work/mysql-5.1-maint
into  mysql.com:/home/ram/work/b31438/b31438.5.1
2007-10-09 16:34:56 +05:00
unknown
12fd56a9da Merge mysql.com:/home/ram/work/b31249/b31249.5.0
into  mysql.com:/home/ram/work/b31249/b31249.5.1


sql/item_timefunc.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge.
mysql-test/t/type_datetime.test:
  manual merge.
2007-10-09 16:21:27 +05:00
unknown
6340f77cbe Merge sama.ndb.mysql.com:/export/space/pekka/ndb/version/my51-ndb
into  sama.ndb.mysql.com:/export/space/pekka/ndb/version/my51-bug29390
2007-10-09 13:16:49 +02:00
unknown
701ea230ad Fix merge. 2007-10-09 14:53:15 +04:00
unknown
2e53f36311 Merge station.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged


sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Manual merge/
2007-10-09 14:32:43 +04:00
unknown
4f0fc8d7d5 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug30832-again-push/my51-bug30832-again
2007-10-09 12:06:44 +02:00
unknown
f2d6508fb7 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug30832-again-push/my50-bug30832-again
2007-10-09 12:04:50 +02:00
unknown
46f2f2ef11 Merge linux-st28.site:/home/martin/mysql/src/bug30832-again/my50-bug30832-again
into  linux-st28.site:/home/martin/mysql/src/bug30832-again/my51-bug30832-again


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item_func.h:
  Auto merged
2007-10-09 11:37:46 +02:00
unknown
1a5f13a12c Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel

Problem: creating a temporary table we allocate the group buffer if needed
followed by table bitmaps (see create_tmp_table()). Reserving less memory for 
the group buffer than actually needed (used) for values retrieval may lead 
to overlapping with followed bitmaps in the memory pool that in turn leads 
to unpredictable consequences.

As we use Item->max_length sometimes to calculate group buffer size,
it must be set to proper value. In this particular case 
Item_datetime_typecast::max_length is too small.

Another problem is that we use max_length to calculate the group buffer
key length for items represented as DATE/TIME fields which is superfluous.

Fix: set Item_datetime_typecast::max_length properly,
accurately calculate the group buffer key length for items 
represented as DATE/TIME fields in the buffer.


mysql-test/r/type_datetime.result:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - test result.
mysql-test/t/type_datetime.test:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - test case.
sql/item_timefunc.h:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - set Item_datetime_typecast::max_length properly.
sql/sql_select.cc:
  Fix for bug #31249: Assertion `!table || (!table->write_set || 
  bitmap_is_set(table->write_set, fiel
    - the group buffer key length for items represented as 
  DATE/TIME fields in the buffer should be calculated using
  the maximum pack length of such fields (== 8), using 
  max_length here is redundant.
2007-10-09 14:37:21 +05:00
unknown
a462f34a94 Bug#30832:Assertion + crash with select name_const('test',now());
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.


mysql-test/r/func_misc.result:
  Bug#30832 completion: test result
mysql-test/t/func_misc.test:
  Bug#30832 completion: test case
  added negative numbers
sql/item_func.h:
  Bug#30832 completion
  The function that represents unary minus is considered a constant if the argument is.
2007-10-09 11:36:05 +02:00
unknown
4c21617d4a Bug#27287 extractvalue() (and updatexml()) extremely slow for large XML
Performance improvements made.
ExtractValue for large XML values is now much faster
(about 2000 times faster of 1Mb-long XML values).


sql/item_xmlfunc.cc:
  Performance improvement for huge XML values:
  1. Avoid reallocs - reserve extra memory:
  using String::reserve() + String::q_append()
  instead of String::append()
  2. Parent is now not searched through the all previous
  nodes in backward direction. Instead, we do the following:
  - we introduce data->parent - a new member in MY_XML_USER_DATA
  - when entering a new tag/attribute node, we remember offset
    of the current node in data->parent
  - when leaving a tag/attribute node, we change data->parent
    to offset of the parent of the current node.
2007-10-09 13:53:39 +05:00
unknown
deb74591c9 Bug #31470 ndb table with special characters in name are not discovered correctly 2007-10-09 09:39:39 +02:00
unknown
07cc799c7b Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/bug30942/my51-bug30942
2007-10-09 08:58:53 +02:00
unknown
b9805a5a45 Fixed bug #31310.
Locked rows of the InnoDB storage was silently skipped in the read-committed
isolation level.

QUICK_RANGE_SELECT for unique ranges lacks second (blocking) read
of the record that was read semi-consistently and just skip it.

The handler::read_multi_range_next method has been modified
to retry previous unique range if the previous read was
semi-consistent.


sql/handler.cc:
  Fixed bug #31310.
  The handler::read_multi_range_next method has been modified
  to retry previous unique range if the previous read was
  semi-consistent.
mysql-test/include/mix1.inc:
  Added test case for bug #31310.
mysql-test/r/innodb_mysql.result:
  Added test case for bug #31310.
2007-10-09 01:07:15 +05:00
unknown
7bb3501ff9 sql_plugin.cc:
fixed uninit memory access in SET pluginvar=DEFAULT
innodb_mysql.test, innodb_mysql.result:
  test case for SET pluginvar=DEFAULT


mysql-test/r/innodb_mysql.result:
  test case for SET pluginvar=DEFAULT
mysql-test/t/innodb_mysql.test:
  test case for SET pluginvar=DEFAULT
sql/sql_plugin.cc:
  fixed uninit memory access in SET pluginvar=DEFAULT
2007-10-08 20:57:37 +02:00
unknown
71bc644ea9 Makefile.am:
do link_sources only once


sql/Makefile.am:
  do link_sources only once
libmysql_r/Makefile.am:
  do link_sources only once
2007-10-08 20:55:44 +02:00