Commit graph

50633 commits

Author SHA1 Message Date
unknown
cf8275e086 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


sql/item_func.cc:
  Auto merged
2007-11-01 06:41:50 -06: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
16bf418de5 Another attempt to fix the Windows compilation failre. 2007-11-01 00:55:25 +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
c2dadab136 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc
2007-10-31 23:51:01 +03:00
unknown
d757ae80d6 Try to fix a Windows compilation warning.
sql-common/client.c:
  Move a block of auxiliary functions to the beginning of the file,
  to avoid compilation warnings on Windows.
  Add comments, albeit trivial, while we're at it.
2007-10-31 23:48:41 +03:00
unknown
17d2230550 Merge endora.local:/Users/davi/mysql/bugs/31669-5.1
into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
2007-10-31 13:57:54 -02:00
unknown
10ed5ae794 Post merge fix for bug 31669.
tests/mysql_client_test.c:
  Macro name changed in 5.1
2007-10-31 13:54:53 -02: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
6c76397404 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc


libmysql/libmysql.c:
  Auto merged
2007-10-31 17:30:46 +03:00
unknown
70987ab97c Cleanup: use helper functions to set an error in MYSQL or MYSQL_STMT.
No functionality added or changed.
This is a pre-requisite for the fix for Bug#12713 Error in a stored 
function called from a SELECT doesn't cause ROLLBACK of statem

Address post-review comments.


include/sql_common.h:
  Declare auxiliary functions to manipulate mysql.net.last_er* and 
  mysql_stmt.last_er*
libmysql/libmysql.c:
  Use helper functions to set an error in MYSQL or MYSQL_STMT
libmysqld/lib_sql.cc:
  Use helper functions to set an error in MYSQL or MYSQL_STMT
sql-common/client.c:
  Use helper functions to set an error in MYSQL or MYSQL_STMT
2007-10-31 17:16:53 +03:00
unknown
440685058d Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-bug31649
2007-10-31 15:54:02 +03: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
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
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
41c2a2c490 Merge mysql.com:/home/kent/bk/bug24809/mysql-5.0-build
into  mysql.com:/home/kent/bk/bug24809/mysql-5.1-build


cmd-line-utils/libedit/Makefile.am:
  Auto merged
2007-10-31 10:52:18 +01:00
unknown
47d17e5d7f Fix for a BUG#31649: events.test fails: NULL "state" field of
SHOW PROCESSLIST.

The problem was a race condition: if the Event Scheduler was not
quick enough, the following scenario happens:
  - The Event Scheduler picks up the created event;
  - The event is executed;
  - event_scheduler_thread->proc_info is set to NULL;
  - The client issues SELECT FROM I_S.

The fix is to wait for the Event Scheduler to reach 'Waiting
for next activation' state. 


mysql-test/t/events.test:
  Wait for the Event Scheduler to start waiting for the activation.
2007-10-31 12:04:19 +03:00
unknown
77c8c76f8d Fix result files after patch for BUG#31035.
mysql-test/r/group_min_max.result:
  Update result file.
mysql-test/r/index_merge_myisam.result:
  Update result file.
2007-10-31 09:53:58 +03:00
unknown
be4ea151ff Merge endora.local:/Users/davi/mysql/bugs/31669-5.1
into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
2007-10-31 02:06:17 -02:00
unknown
41974cf107 Merge endora.local:/Users/davi/mysql/mysql-5.0-runtime
into  endora.local:/Users/davi/mysql/bugs/31669-5.1


sql/sql_table.cc:
  Auto merged
libmysql/libmysql.c:
  Manual merge
tests/mysql_client_test.c:
  Manual merge
2007-10-31 02:04:04 -02: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
1de7e5c09f Makefile.am:
Ensure use of libedit "config.h" by adding "-I. -I$(srcdir)" to DEFS,
  work around for problem with automake 1.10 (bug#24809)


cmd-line-utils/libedit/Makefile.am:
  Ensure use of libedit "config.h" by adding "-I. -I$(srcdir)" to DEFS,
  work around for problem with automake 1.10 (bug#24809)
2007-10-30 20:54:31 +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
85ba610f26 Minor Makefile fixes:
1) Add a new top level "Makefile.am" target "make embedded-test".

2) Fix a syntax error (bad merge) in "netware/Makefile.am".


Makefile.am:
  Add a new "make" target "embedded-test" so that it is easier 
  to test the "embedded server" ("libmyslqd").
  Make it "phony".
  
  Use it via a sub-make within "test-bt" to avoid code duplication.
netware/Makefile.am:
  Cleanup: Macros "BUILT_SOURCES" and "CLEANFILES" should be defined only once.
2007-10-30 20:06:49 +01: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
4123825d1b Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-10-30 15:48:25 +01:00
unknown
173d8d7926 Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build


mysql-test/mysql-test-run.pl:
  Auto merged
2007-10-30 15:39:02 +01:00
unknown
e3b246d6e8 Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-10-30 15:37:48 +01:00
unknown
2f0838d575 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-10-30 15:33:41 +01:00
unknown
0ca87f8e69 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work


mysql-test/mysql-test-run.pl:
  Auto merged
2007-10-30 15:24:17 +01:00
unknown
b0bc908cbf bug#30630 2007-10-30 15:22:52 +01:00
unknown
157645f45e Merge moksha.local:/Users/davi/mysql/bugs/31669-5.0
into  moksha.local:/Users/davi/mysql/mysql-5.0-runtime


libmysql/libmysql.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-30 09:41:24 -03: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
5f4783cf4b Make sure rpl.rpl_innodb_mixed_dml passes even if rpl_mixed.dat is read-only.
This is important for a development environment where not all source files
are checked out.
2007-10-30 15:25:39 +03:00
unknown
bd00ccb710 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  trift2.:/MySQL/M51/push-5.1
2007-10-29 23:13:28 +01:00
unknown
7752cee49f autorun.sh:
After review changes


BUILD/autorun.sh:
  After review changes
2007-10-29 22:48:58 +01:00
unknown
1b261d3d61 autorun.sh:
Removed innobase from compile-dist, and let it use autorun.sh to avoid
  code duplication. Also corrected a problem when searching for one of
  "libtoolize" and "glibtoolize", now it honors the PATH setting (Bug#31405)


BUILD/autorun.sh:
  Removed innobase from compile-dist, and let it use autorun.sh to avoid
  code duplication. Also corrected a problem when searching for one of
  "libtoolize" and "glibtoolize", now it honors the PATH setting (Bug#31405)
2007-10-29 20:12:44 +01:00
unknown
16c621d3dd 5.1 has been promoted to "rc" status. 2007-10-29 20:00:36 +01:00
unknown
ede89c6410 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1


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
BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_cache.cc:
  Null merge of a 5.0 patch, by order of the original author via IRC.
2007-10-29 15:47:37 +01: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
08edbe4ea1 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  lambda.weblab:/home/malff/TREE/mysql-5.1-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-29 08:01:40 -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
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
a861c70d6b Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1


configure.in:
  Auto merged
mysql-test/suite/funcs_1/r/innodb__datadict.result:
  Auto merged
mysql-test/suite/funcs_1/r/memory__datadict.result:
  Auto merged
mysql-test/suite/funcs_1/r/myisam__datadict.result:
  Auto merged
mysql-test/r/partition.result:
  Ensure test for bug number 27816 is in the merged tree.
mysql-test/t/partition.test:
  Ensure test for bug number 27816 is in the merged tree.
2007-10-29 12:56:48 +01:00
unknown
a2f5911b50 Merge trift2.:/MySQL/M41/push-4.1
into  trift2.:/MySQL/M50/push-5.0
2007-10-29 12:15:17 +01: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
93265192ce Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-10-29 11:55:48 +01:00