Commit graph

5923 commits

Author SHA1 Message Date
unknown
2fc5d274e8 Fixing bug #8850 in such a way that when TRUNCATE is called within
stored  procedure,  it  is converted  to DELETE.


mysql-test/r/sp.result:
  A result for  the  test  case  for bug #8850
mysql-test/t/sp.test:
  A test  case  for the bug #8850
sql/sql_delete.cc:
  A fix for bug  #8850, plus adding a missing call  to mysql_init_select(),
  which  caused mem_root corruption.
sql/sql_parse.cc:
  A fix for the bug #8850
BitKeeper/etc/ignore:
  Added acinclude.m4 to the ignore list
2005-03-05 21:44:15 +02:00
unknown
ef7570c72b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/sql_repl.cc:
  Auto merged
2005-02-28 22:27:55 +02:00
unknown
8400a5a4a8 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-02-28 19:23:58 +01:00
unknown
ed3b44994c Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-8532
2005-02-28 19:21:04 +02:00
unknown
cef636d9be Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-02-28 18:09:24 +01:00
unknown
110f6abd38 Fixed BUG#8760: Stored Procedures: Invalid SQLSTATE is allowed in
a DECLARE ? HANDLER FOR stmt.


mysql-test/r/sp-error.result:
  New test case for BUG#8776 (check format of sqlstates in handler declarations).
mysql-test/t/sp-error.test:
  New test case for BUG#8776 (check format of sqlstates in handler declarations).
sql/share/errmsg.txt:
  New error message for malformed SQLSTATEs.
sql/sp_pcontext.cc:
  Added function for checking SQLSTATE format.
sql/sp_pcontext.h:
  Added function for checking SQLSTATE format.
sql/sql_yacc.yy:
  Check format of SQLSTATE in handler declaration.
2005-02-28 18:07:06 +01:00
unknown
1b002905b7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
include/mysql_com.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-28 16:22:26 +02:00
unknown
7a703d6ace Fix for BUG#8532.
The problem was in that the code that analyses the applicability of the
QUICK_GROUP_MIN_MAX access method for DISTINC queries assumed that there
are no duplicate column references in the DISTINCT clause, and it added
non-exiting key parts for the duplicate column references. 

The solution adds a test to check whether the select list already contained
a field with the same name. If such field was already present, then it was
already decided to use its key part for index access. In this such case we
must skip the duplicate field instead of counting it as a new field.


mysql-test/r/group_min_max.result:
  Added test results for BUG#8532.
mysql-test/t/group_min_max.test:
  Added tests for BUG#8532.
sql/opt_range.cc:
  The problem was in that the code that analyses the applicability of the
  QUICK_GROUP_MIN_MAX access method for DISTINC queries assumed that there
  are no duplicate column references in the DISTINCT clause, and it added
  non-exiting key parts for the duplicate column references. 
  
  The solution adds a test to check whether the select list already contained
  a field with the same name. If such field was already present, then it was
  already decided to use its key part for index access. In this such case we
  must skip the duplicate field instead of counting it as a new field.
2005-02-28 16:20:02 +02:00
unknown
45a26d449d merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
mysql-test/r/select_found.result:
  Auto merged
mysql-test/r/type_set.result:
  Auto merged
mysys/default.c:
  Auto merged
sql/field.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
strings/ctype-simple.c:
  Auto merged
include/mysql_com.h:
  Merge
sql/filesort.cc:
  merge
2005-02-28 12:18:39 +02:00
unknown
8b8c9452dd Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)


innobase/dict/dict0dict.c:
  Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
mysql-test/r/select_found.result:
  Add missing drop table
mysql-test/r/type_set.result:
  More tests
mysql-test/t/select_found.test:
  Add missing drop table
mysql-test/t/type_set.test:
  More tests
mysys/my_init.c:
  Avoid warning from purify (purify doesn't handle getrusage() properly)
sql/field.h:
  enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/filesort.cc:
  enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/item_cmpfunc.cc:
  Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
  Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
sql/mysqld.cc:
  Wait for signal handler to stop when running --bootstrap
  (Fixes warning from purify)
sql/sql_insert.cc:
  Initialize slot used by innodb.cc (not critical)
sql/sql_lex.h:
  Better comments
sql/sql_repl.cc:
  memcmp -> bcmp() to avoid warning from purify
sql/sql_select.cc:
  Fix for out-of-bound memory reference when doing DISTINCT on const expressions
strings/ctype-simple.c:
  Fixes to not access uninitialized memory
  (Not critical)
2005-02-28 11:59:46 +02:00
unknown
4ef7991d28 Merge mysql.com:/space/pekka/ndb/version/my50
into mysql.com:/space/pekka/ndb/version/my50-ndb


ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
2005-02-27 17:25:31 +01:00
unknown
87a48cdf0d Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/svoj/devel/mysql/stddev-mysql-5.0


sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-02-27 13:33:20 +04:00
unknown
7cc7a62856 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb


sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-26 16:15:36 +01:00
unknown
d339dd13cd BUG#3190 fix (request for STDDEV_SAMP, VAR_SAMP).
This bug is also known as WL#1639.


mysql-test/r/func_group.result:
  Test case for stddev_pop, var_pop, stddev_samp, var_samp was added.
mysql-test/t/func_group.test:
  Test case for stddev_pop, var_pop, stddev_samp, var_samp was added.
sql/item_sum.cc:
  New functions stddev_samp and var_samp were added.
sql/item_sum.h:
  New functions stddev_samp and var_samp were added.
sql/lex.h:
  New functions stddev_pop, var_pop, stddev_samp and var_samp were added.
sql/sql_yacc.yy:
  New functions stddev_pop, var_pop, stddev_samp and var_samp were added.
2005-02-25 22:19:04 +04:00
unknown
0be32e7e5a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/sp_pcontext.cc:
  Auto merged
2005-02-25 19:51:29 +02:00
unknown
3d8aed6d83 Fixed BUG#8757: Stored Procedures: Scope of Begin and End Statements do not work properly.
mysql-test/r/sp.result:
  New test case for BUG#8757.
mysql-test/t/sp.test:
  New test case for BUG#8757.
sql/sp_pcontext.cc:
  Return the correct scope offset to cursors during parsing.
2005-02-25 17:56:45 +01:00
unknown
08b3e79e40 Merge with global tree
mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/examples/ha_archive.cc:
  Merge with global tree
  (Use my changes)
sql/sql_parse.cc:
  Remove 'tmp' fix to be able to run tests
2005-02-25 17:12:06 +02:00
unknown
948bb77d4e Fixed BUG#6857: current_time() in STORED PROCEDURES
Have to thd->set_time() before each substatement execution, to make
  current_time() et al return different times within the same procedure.


mysql-test/r/sp.result:
  New test case for BUG#6857: current_time() in STORED PROCEDURES.
  Note: The actual call is disable, to save time when running with slow debugging tools.
mysql-test/t/sp.test:
  New test case for BUG#6857: current_time() in STORED PROCEDURES.
  Note: The actual call is disable, to save time when running with slow debugging tools.
sql/sp_head.cc:
  Make current_time() et all work in stored procedures.
2005-02-25 13:19:44 +01:00
unknown
0d9ba2678f Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb


BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/triggers/post-commit:
  Auto merged
sql/item.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-02-25 08:28:43 +01:00
unknown
eb18f93a78 Show all generated warnings in SHOW ERROR
Previously we only stored the first given error (the error sent to the client)


include/mysys_err.h:
  Moved ER_FILENOTFOUND last to avoid getting 'error 0'
mysql-test/r/backup.result:
  More warnings from in case of errors
mysql-test/r/innodb.result:
  More warnings from in case of errors
mysql-test/r/key_cache.result:
  More warnings from in case of errors
mysql-test/r/myisam.result:
  More warnings from in case of errors
mysql-test/r/preload.result:
  More warnings from in case of errors
mysql-test/r/repair.result:
  More warnings from in case of errors
mysql-test/r/rpl_failed_optimize.result:
  More warnings from in case of errors
mysql-test/r/subselect.result:
  More warnings from in case of errors
mysql-test/t/backup.test:
  Portability fix
mysql-test/t/innodb.test:
  Avoid some warnings
mysql-test/t/myisam.test:
  Portability fix
mysql-test/t/rpl_rotate_logs.test:
  Portablitiy fix
mysys/errors.c:
  Move ER_FILENOTFOUND last to avoid error 0
sql/mysql_priv.h:
  Indentation change
sql/mysqld.cc:
  Save all given errors for SHOW ERRORS
sql/protocol.cc:
  Store new errors for SHOW ERROR
  (Ignore those that are already reported with my_error())
sql/sql_class.cc:
  More errors with SHOW ERROR
sql/sql_class.h:
  More errors with SHOW ERROR
sql/sql_error.cc:
  More errors with SHOW ERROR
sql/sql_parse.cc:
  Temporary fix: Don't give error for the to-be-removed 'pre-open tables code'
sql/sql_show.cc:
  More debugging
  Don't register errors while populating schema tables.
  (If we do, we get a LOT of warnings from information_schema.test)
sql/sql_table.cc:
  Don't register errors from handler in drop table (as we already do it the upper level DROP TABLE code)
  Don't register errors for 'restore_table' as in most cases the table doesn't exists
sql/sql_union.cc:
  Use file->write_row() instead of 'write_record'.
  This gives us easer to handle error messages and is faster than the old version
2005-02-24 23:33:42 +02:00
unknown
d9da27db27 Fix for BUG#8783 kill.test must always sleep 2 seconds, even if
mysql-test-run runs with --sleep=10; otherwise GET_LOCK() times out
before being killed so we get 0 instead of NULL. Verified that it
works on our powermacg5 where the test was failing.


mysql-test/t/kill.test:
  must always sleep 2 seconds, even if mysql-test-run runs with --sleep=10;
  otherwise GET_LOCK() times out before being killed so we get 0 instead of NULL.
2005-02-24 19:13:55 +01:00
unknown
abd8200f77 Fix of an incorrect merge 2005-02-24 17:25:06 +01:00
unknown
c7fefed4b8 Merge
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-24 14:48:12 +01:00
unknown
2b467d35e3 Added tests for BINARY|VARBINARY LIKE|NOT LIKE 2005-02-24 14:20:12 +01:00
unknown
9d5d847835 Fixed BUG#8638: Test 'sp' fails: Stored Procedure often sends warning 1329
The warning sent is by itself ok, the problem was rather why it wasn't
  sent on some other platforms...
  The real problem was that a total_warn_count which was inconsistent with warn_list
  was sent back with send_eof() during SP execution, which in turn cause a protocol
  error in mysqltest.


mysql-test/r/sp.result:
  Updated results after fixing bug in how total_warn_count is handled.
sql/protocol.cc:
  Fixed bug that caused protocol errors with mysqltest. Don't send total_warn_count
  with send_eof() during SP execution, as it's usually wrong anyway. (warn_list is
  cleared)
sql/sql_parse.cc:
  Reset total_warn_count if the warn_list has been cleared. This gets rid of
  "empty" warnings after some CALLs.
2005-02-24 13:56:09 +01:00
unknown
48429203a8 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/space/pekka/ndb/version/my50-ndb
2005-02-24 13:07:34 +01:00
unknown
161a434944 ndb - wl-1203 fix binary LIKE binary in ndb api
mysql-test/r/ndb_condition_pushdown.result:
  fix binary LIKE binary in ndb api
mysql-test/t/ndb_condition_pushdown.test:
  fix binary LIKE binary in ndb api
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  fix binary LIKE binary in ndb api
ndb/src/ndbapi/NdbOperationInt.cpp:
  fix binary LIKE binary in ndb api
ndb/src/ndbapi/NdbScanFilter.cpp:
  fix binary LIKE binary in ndb api
2005-02-24 13:07:33 +01:00
unknown
dcdbfa6527 merge
BitKeeper/etc/logging_ok:
  auto-union
include/mysql_com.h:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-24 06:24:46 +01:00
unknown
fc79380e69 fixed test results
mysql-test/r/rpl_insert_id.result:
  fixed error format after mats merge
mysql-test/r/sp.result:
  fixed typo
2005-02-24 04:07:58 +02:00
unknown
c3d916b52c Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0
2005-02-24 03:28:33 +02:00
unknown
0613ed1f0e get time for thread switching 2005-02-24 03:25:53 +02:00
unknown
20a30c64f5 fixed typo in test 2005-02-24 02:59:36 +02:00
unknown
c5fb55668b Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0


BitKeeper/etc/logging_ok:
  auto-union
sql/sql_parse.cc:
  Auto merged
2005-02-24 01:11:59 +02:00
unknown
91251238b4 Bug#8412: merged from 4.1
sql/log.cc:
  Merge from 4.1
2005-02-23 23:01:51 +01:00
unknown
f5a80e5a3b Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-qc_item_view-5.0
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0


BitKeeper/etc/logging_ok:
  auto-union
2005-02-23 23:00:41 +02:00
unknown
fee0f25fbd Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-qc_item_view-5.0


BitKeeper/etc/logging_ok:
  auto-union
2005-02-23 22:56:24 +02:00
unknown
c41a485d75 Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0
2005-02-23 22:16:51 +02:00
unknown
bef32dfacd innodb-dependent test moved from rpl_rotate_logs.test to binlog.test
mysql-test/r/binlog.result:
  binlog rotation after a big transation
mysql-test/r/rpl_rotate_logs.result:
  innodb-dependent test removed
mysql-test/t/binlog.test:
  binlog rotation after a big transation
mysql-test/t/rpl_rotate_logs.test:
  innodb-dependent test removed
2005-02-23 20:35:59 +01:00
unknown
58df85e06a Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/log_event.cc:
  Auto merged
2005-02-23 20:10:58 +01:00
unknown
e0b2dab77d Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb


sql/log.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-23 20:08:21 +01:00
unknown
4b2ee4854f result fixes after my change to mysqlbinlog (which was accidentally
pushed some minutes ago)



mysql-test/r/ctype_ucs.result:
  result fix
mysql-test/r/mysqlbinlog.result:
  result fix
mysql-test/r/mysqlbinlog2.result:
  result fix
mysql-test/r/rpl_charset.result:
  result fix
mysql-test/r/user_var.result:
  result fix
2005-02-23 19:59:25 +01:00
unknown
1f2b46fa0f Bug#8412: Merge from 4.0
mysql-test/r/rpl_insert_id.result:
  Auto merged
mysql-test/t/rpl_insert_id.test:
  Auto merged
sql/log.cc:
  Merge from 4.0
2005-02-23 19:58:54 +01:00
unknown
6a0e1def63 Merge mysql.com:/home/bkroot/mysql-4.0
into mysql.com:/home/bk/b8412-mysql-4.0
2005-02-23 19:40:31 +01:00
unknown
39cab5abec Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/log.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2005-02-23 19:20:17 +01:00
unknown
be9f1863b7 don't log BEGIN in auto-commit mode
correct end_log_pos for Xid_log_event


mysql-test/r/binlog.result:
  don't depend on the previous tests
mysql-test/r/rpl_rotate_logs.result:
  correct end_log_pos for Xid_log_event
mysql-test/t/binlog.test:
  don't depend on the previous tests
sql/handler.h:
  comment
sql/log_event.cc:
  advance position for Xid
sql/log_event.h:
  comment
sql/sql_class.h:
  correct end_log_pos for Xid_log_event
sql/sql_parse.cc:
  make sure commit handler knows whether it's autocommit or not
2005-02-23 18:26:49 +01:00
unknown
2c1ef3c604 Merge 52.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 52.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0


BitKeeper/etc/logging_ok:
  auto-union
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
2005-02-23 19:22:52 +02:00
unknown
e09a6c1a20 Merge gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-5.0


mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
sql/protocol.cc:
  Auto merged
2005-02-23 20:22:51 +03:00
unknown
262dadccf1 Fix for bug #6572: SHOW ERRORS doesn't 2005-02-23 20:18:21 +03:00
unknown
c5acdd33bc ha_ndbcluster.cc:
Fixed faulty debug printout
ndb_condition_pushdown.test, ndb_condition_pushdown.result:
  Added BINARY and VARBINARY tests


mysql-test/r/ndb_condition_pushdown.result:
  Added BINARY and VARBINARY tests
mysql-test/t/ndb_condition_pushdown.test:
  Added BINARY and VARBINARY tests
sql/ha_ndbcluster.cc:
  Fixed faulty debug printout
2005-02-23 17:18:06 +01:00
unknown
272f78b533 Merge gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-5.0


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2005-02-23 18:47:00 +03:00