Commit graph

423 commits

Author SHA1 Message Date
unknown
fa1436bf1f BUG#20256 - LOCK WRITE - MyISAM
Only MyISAM tables locked with LOCK TABLES ... WRITE were affected.

A query that is optimized with index_merge doesn't reflect rows
inserted within LOCK TABLES.

MyISAM doesn't flush a state within LOCK TABLES. index_merge
optimization creates a copy of the handler, which thus gets
outdated MyISAM state.

New handler->clone() method is introduced to fix this problem.
For non-MyISAM storage engines it allocates a handler and opens
it with ha_open(). For MyISAM it additionally copies MyISAM state
pointer to cloned handler.


mysql-test/r/index_merge.result:
  A test case for bug#20256.
mysql-test/t/index_merge.test:
  A test case for bug#20256.
sql/ha_myisam.cc:
  clone method added to handler class.
sql/ha_myisam.h:
  clone method added to handler class.
sql/handler.cc:
  clone method added to handler class.
sql/handler.h:
  clone method added to handler class.
sql/opt_range.cc:
  Use handler clone method.
2006-09-12 18:25:35 +05:00
unknown
2233201ba7 Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max"
  Strict mode should fail if autoincrement value is out of range


include/my_base.h:
  Add new handler error codes
sql/ha_berkeley.cc:
  handle error in update_auto_increment()
sql/ha_heap.cc:
  handle error in update_auto_increment()
sql/ha_innodb.cc:
  handle error in update_auto_increment()
sql/ha_myisam.cc:
  handle error in update_auto_increment()
sql/ha_myisammrg.cc:
  handle error in update_auto_increment()
sql/ha_ndbcluster.cc:
  handle error in update_auto_increment()
sql/handler.cc:
  return error from handler::update_auto_increment()
sql/handler.h:
  change return type of handler::update_auto_increment() to int
sql/share/errmsg.txt:
  new error message for auto-increment
mysql-test/include/strict_autoinc.inc:
  New BitKeeper file ``mysql-test/include/strict_autoinc.inc''
mysql-test/r/strict_autoinc_1myisam.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_1myisam.result''
mysql-test/r/strict_autoinc_2innodb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_2innodb.result''
mysql-test/r/strict_autoinc_3heap.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_3heap.result''
mysql-test/r/strict_autoinc_4bdb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_4bdb.result''
mysql-test/r/strict_autoinc_5ndb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_5ndb.result''
mysql-test/t/strict_autoinc_1myisam.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_1myisam.test''
mysql-test/t/strict_autoinc_2innodb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_2innodb.test''
mysql-test/t/strict_autoinc_3heap.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_3heap.test''
mysql-test/t/strict_autoinc_4bdb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_4bdb.test''
mysql-test/t/strict_autoinc_5ndb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_5ndb.test''
2006-08-30 13:20:39 -07:00
unknown
a7ba5b75a6 Merge bk://anubis/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/merge/mysql-5.0


sql/handler.cc:
  Auto merged
2006-07-21 10:14:25 -07:00
unknown
93eef69dd5 Finish the merge of the patch for bug #15195 from 4.1 -> 5.0
- Adapt it to work with the handlerton class


sql/handler.cc:
  Only create new MERGE handler if merge engine is enabled
sql/mysql_priv.h:
  Use the myisammrg_hton.state field for the have_merge_db option
sql/mysqld.cc:
  Handle the OPT_MERGE (--skip-merge) option case
2006-07-20 13:41:00 -06:00
unknown
a00f18e5e6 Merge bk-internal:/home/bk/mysql-5.0-engines
into  rama.(none):/home/jimw/my/mysql-5.0-17608


include/my_base.h:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/handler.cc:
  Auto merged
2006-07-18 10:25:04 -07:00
unknown
39f9adfa84 --{skip-}merge option added which allows the user to disable merge engine and
to avoid the potential security problem.
(see bug #15195: Security Breach with MERGE table)
2006-07-14 16:26:58 +05:00
unknown
97cdd9df8a Bug #17766: The server accepts to create MERGE tables which cannot work
Changed the error reporting (and a crash) when inserting data into a
 MERGE table that has no underlying tables or no INSERT_METHOD specified
 by reporting that it is read-only.


include/my_base.h:
  Add new handler error
mysql-test/r/merge.result:
  Update results
mysql-test/t/merge.test:
  Add new regression test
sql/ha_myisammrg.cc:
  When trying to insert into a MERGE table with no underlying tables
  or no INSERT_METHOD, report that it is read-only.
sql/handler.cc:
  Handle new error message
2006-07-11 17:28:50 -07:00
unknown
90cf816f74 Merge gbichot3.local:/home/mysql_src/mysql-5.0-20524
into  gbichot3.local:/home/mysql_src/mysql-5.0


sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-07-06 14:42:47 +02:00
unknown
8646be88a1 Fix for BUG#20524 "auto_increment_* not observed when inserting
a too large value": the bug was that if MySQL generated a value for an
auto_increment column, based on auto_increment_* variables, and this value
was bigger than the column's max possible value, then that max possible
value was inserted (after issuing a warning). But this didn't honour
auto_increment_* variables (and so could cause conflicts in a master-master
replication where one master is supposed to generated only even numbers,
and the other only odd numbers), so now we "round down" this max possible
value to honour auto_increment_* variables, before inserting it.


mysql-test/r/rpl_auto_increment.result:
  result update. Before the fix, the result was that master inserted 127 in t1
  (which didn't honour auto_increment_* variables!),
  instead of failing with "duplicate key 125" like now.
mysql-test/t/rpl_auto_increment.test:
  Test for BUG#20524 "auto_increment_* not observed when inserting
  a too large value".
  We also check the pathological case (table t2) where it's impossible to
  "round down".
  The fixer of BUG#20573 will be able to use table t2 for testing his fix.
sql/handler.cc:
  If handler::update_auto_increment() generates a value larger than the field's
  max possible value, we used to simply insert this max possible value
  (after pushing a warning). Now we "round down" this max possible value to
  honour auto_increment_* variables (if at all possible), before trying the
  insertion.
2006-07-06 14:37:09 +02:00
unknown
4e9d7d6c4b Fix for BUG#20188 "REPLACE or ON DUPLICATE KEY UPDATE in
auto_increment breaks binlog":
if slave's table had a higher auto_increment counter than master's (even
though all rows of the two tables were identical), then in some cases,
REPLACE and INSERT ON DUPLICATE KEY UPDATE failed to replicate
statement-based (it inserted different values on slave from on master).
write_record() contained a "thd->next_insert_id=0" to force an adjustment
of thd->next_insert_id after the update or replacement. But it is this
assigment introduced indeterminism of the statement on the slave, thus
the bug. For ON DUPLICATE, we replace that assignment by a call to
handler::adjust_next_insert_id_after_explicit_value() which is deterministic
(does not depend on slave table's autoinc counter). For REPLACE, this
assignment can simply be removed (as REPLACE can't insert a number larger
than thd->next_insert_id).
We also move a too early restore_auto_increment() down to when we really know
that we can restore the value.


mysql-test/r/rpl_insert_id.result:
  result update, without the bugfix, slave's "3 350" were "4 350".
mysql-test/t/rpl_insert_id.test:
  test for BUG#20188 "REPLACE or ON DUPLICATE KEY UPDATE in
  auto_increment breaks binlog".
  There is, in this order:
  - a test of the bug for the case of REPLACE
  - a test of basic ON DUPLICATE KEY UPDATE functionality which was not
  tested before
  - a test of the bug for the case of ON DUPLICATE KEY UPDATE
sql/handler.cc:
  the adjustment of next_insert_id if inserting a big explicit value, is
  moved to a separate method to be used elsewhere.
sql/handler.h:
  see handler.cc
sql/sql_insert.cc:
  restore_auto_increment() means "I know I won't use this autogenerated
  autoincrement value, you are free to reuse it for next row". But we were
  calling restore_auto_increment() in the case of REPLACE: if write_row() fails
  inserting the row, we don't know that we won't use the value, as we are going to
  try again by doing internally an UPDATE of the existing row, or a DELETE
  of the existing row and then an INSERT. So I move restore_auto_increment()
  further down, when we know for sure we failed all possibilities for the row.
  Additionally, in case of REPLACE, we don't need to reset THD::next_insert_id:
  the value of thd->next_insert_id will be suitable for the next row.
  In case of ON DUPLICATE KEY UPDATE, resetting thd->next_insert_id is also
  wrong (breaks statement-based binlog), but cannot simply be removed, as
  thd->next_insert_id must be adjusted if the explicit value exceeds it.
  We now do the adjustment by calling
  handler::adjust_next_insert_id_after_explicit_value() (which, contrary to
  thd->next_insert_id=0, does not depend on the slave table's autoinc counter,
  and so is deterministic).
2006-07-05 14:41:35 +02:00
unknown
365f6f6f03 foo2
sql/ha_innodb.cc:
  Import patch foo2
sql/ha_innodb.h:
  Import patch foo2
sql/handler.cc:
  Import patch foo2
sql/handler.h:
  Import patch foo2
sql/mysqld.cc:
  Import patch foo2
sql/set_var.cc:
  Import patch foo2
sql/sql_class.h:
  Import patch foo2
sql/sql_repl.cc:
  Import patch foo2
2006-04-13 17:22:56 +09:30
unknown
ce33555014 foo1
sql/ha_innodb.cc:
  Import patch foo1
sql/ha_innodb.h:
  Import patch foo1
sql/handler.cc:
  Import patch foo1
sql/handler.h:
  Import patch foo1
sql/mysqld.cc:
  Import patch foo1
sql/set_var.cc:
  Import patch foo1
sql/sql_class.h:
  Import patch foo1
sql/sql_repl.cc:
  Import patch foo1
2006-04-13 17:20:33 +09:30
unknown
bf84040458 WL#2645 (CHECK TABLE FOR UPGRADE)
necessary implementation in the server
mysql_upgrade script added


client/mysqlcheck.c:
  --check-upgrade option added
include/my_base.h:
  errcode added
include/myisam.h:
  option added
scripts/Makefile.am:
  mysql_upgrade script added
sql/handler.cc:
  checks for old types/bugs added
sql/handler.h:
  declarations regarding checks for upgrade
sql/lex.h:
  sym added
sql/share/errmsg.txt:
  error message added
sql/slave.cc:
  now ha_repair is for public use
sql/sql_table.cc:
  upgrade in ha_repair implemented
sql/sql_yacc.yy:
  CHECK ... FOR UPGRADE added to syntax
2006-02-17 10:52:32 +04:00
unknown
bf1ebe98df Merge mysql.com:/home/jimw/my/mysql-5.0-14212
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
mysql-test/r/bdb.result:
  Resolve conflict
mysql-test/t/bdb.test:
  Resolve conflict
2006-01-06 08:34:55 -08:00
unknown
724f46c2d0 Merge mysql.com:/home/jimw/my/mysql-5.0-15185
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/handler.cc:
  Auto merged
2006-01-05 10:27:06 -08:00
unknown
eb12c38b47 remove "defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__)" unmaintainably scattered all over the source
include/config-netware.h:
  put undef HAVE_ARCHIVE_DB where it belongs
2005-12-24 14:32:50 +01:00
unknown
4e82e0af51 Fix crash when trying to open table using a disabled storage engine. (Bug #15185)
sql/handler.cc:
  Don't create handler object for engines that are disabled.
2005-12-14 15:01:02 -08:00
unknown
81df509fe0 Disabled archive db for Netware. 2005-12-14 02:08:48 +02:00
unknown
4d09673065 Fix crash in BDB from improper cleanup of transactions, and avoid problem
in NDB that the fix would cause due to improper registration of a transaction
that isn't meant to be seen by the handler layer. (Bug #14212)

Thanks to Sergei Golubchik for helping with this.


mysql-test/r/bdb.result:
  Add new result
mysql-test/t/bdb.test:
  Add new regression test
sql/ha_ndbcluster.cc:
  Don't register transaction if transactions are "disabled".
sql/handler.cc:
  Commit statement before trying to end transaction.
2005-12-09 15:00:33 -08:00
unknown
faa0c00eba Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0


sql/ha_federated.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/spatial.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2005-11-21 21:15:48 +02:00
unknown
95b92b4369 Bug #14514 Creating table with packed key fails silently
- Backport from 5.0


include/my_base.h:
  Rename HA_CREATE_FROM_ENGINE to HA_OPTION_CREATE_FROM_ENGINE, ie. it's a bit in the table_options variable
mysql-test/r/ndb_basic.result:
  Add test result
mysql-test/t/ndb_basic.test:
  Add test case for bug14514
sql/ha_ndbcluster.cc:
  Use new bitmask for table_options to detect if create from engine
sql/handler.cc:
  Use new bit for create from engine
2005-11-21 12:27:58 +01:00
unknown
fe63e09581 Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.


sql/field.cc:
  Inefficient usage of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
  A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
  Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
  Bad examples of usage of a string with its length fixed.
sql/handler.cc:
  Inefficient usage of String::append() fixed.
sql/item.cc:
  Bad examples of usage of a string with its length fixed.
sql/item.h:
  A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
  Inefficient using of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
  Bad examples of usage of a string with its length fixed.
sql/key.cc:
  Bad examples of usage of a string with its length fixed.
sql/log.cc:
  Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
  Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
  The dummy parser hook allocated.
sql/opt_range.cc:
  Inefficient usage of String::append() fixed.
sql/parse_file.cc:
  Bad examples of usage of a string with its length fixed.
  A hook for unknown keys added to the parser.
sql/parse_file.h:
  A hook for unknown keys added to the parser.
sql/protocol.cc:
  A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
  Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
  A warning for old format config file.
sql/slave.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
  Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
  The macro definition moved to sql_string.h to
    be accessible in all parts of server.
sql/sql_table.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
  Bad examples of usage of a string with its length fixed.
  The incorrect length in the trigger file configuration descriptor
    fixed (BUG#14090).
  The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
  A dummy  hook used for parsing views.
sql/structs.h:
  The macro definition moved to sql_string.h to be
    accessible in all parts of server.
sql/table.cc:
  A bad example of usage of a string with its length fixed.
sql/tztime.cc:
  A bad example of usage of a string with its length fixed.
2005-11-20 20:47:07 +02:00
unknown
e2de3a8fc4 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg13825


sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-11-19 15:11:57 +03:00
unknown
11d4d7e6ff Fix for bug #13825 "Triggers: crash if release savepoint" and for general
handling of savepoints in stored routines.

Fixed ha_rollback_to_savepoint()/ha_savepoint()/ha_release_savepoint()
functions to properly handle savepoints inside of stored functions and
triggers.
Also now when we invoke stored function or trigger we create new savepoint
level. We destroy it at the end of function/trigger execution and return back
to old savepoint level.


mysql-test/r/sp_trans.result:
  Added test for bug #13825 "Triggers: crash if release savepoint" and for
  general handling of savepoints in stored routines.
mysql-test/t/sp_trans.test:
  Added test for bug #13825 "Triggers: crash if release savepoint" and for
  general handling of savepoints in stored routines.
sql/ha_innodb.cc:
  innobase_savepoint():
    Replaced check which always failed due to similar check in caller
    with assertion.
sql/handler.cc:
  ha_rollback_to_savepoint()/ha_savepoint()/ha_release_savepoint():
    Changed functions to properly support handling of savepoints
    inside of stored functions and triggers.
sql/sql_class.cc:
  THD::reset_sub_statement_state()/restore_sub_statement_state():
    When we invoke stored function or trigger we should create new savepoint
    level. We should destroy it at the end of function/trigger execution and
    return back to old savepoint level. To support this behavior we should
    save and reset list of current savepoints on entering function and restore
    old list when we leave it.
sql/sql_class.h:
  Sub_statement_state:
    When we invoke stored function or trigger we should create new savepoint
    level. We should destroy it at the end of function/trigger execution and
    return back to old savepoint level. To support this behavior added "savepoint"
    member which is used to save/restore list of current savepoints on
    entering/leaving function.
sql/sql_parse.cc:
  mysql_execute_command():
    Changed processing of SQLCOM_SAVEPOINT so now it is not ignored when
    we are in autocommit mode and savepoint is set inside of stored
    function or trigger.
2005-11-19 15:09:23 +03:00
unknown
4f2fe28773 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-14210


sql/handler.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
2005-11-03 15:24:55 +03:00
unknown
3fa0dd23e0 A fix and a test case for Bug#14210 "Simple query with > operator on
large table gives server crash": make sure that when a MyISAM temporary
table is created for a cursor, it's created in its memory root,
not the memory root of the current query.


mysql-test/r/sp.result:
  Test results fixed: a test case for Bug#14210
mysql-test/t/sp.test:
  A test case for Bug#14210 "Simple query with > operator on large table 
  gives server crash"
sql/handler.cc:
  - rewrite get_new_handler to accept a memory root and use it for
sql/handler.h:
  - get_new_handler declaration changed
sql/opt_range.cc:
  - get_new_handler declaration changed
sql/sql_base.cc:
  - get_new_handler declaration changed
sql/sql_select.cc:
  - the actual fix for Bug#14210. In create_myisam_from_heap we should
  create the new table handler in TABLE::mem_root, not in THD::mem_root:
  the latter is freed shortly after cursor is open.
  - adjust create_tmp_table to explicitly supply &table->mem_root
  to get_new_handler when creating a handler for a new temporary table
sql/sql_table.cc:
  - get_new_handler declaration changed
sql/table.cc:
  - get_new_handler declaration changed
sql/unireg.cc:
  - get_new_handler declaration changed
tests/mysql_client_test.c:
  A test case for Bug#14210 "Simple query with > operator on large table
   gives server crash": a C API test case is worth adding because of different
  memory allocation/freeing patterns in handling of C API and SP cursors
2005-11-03 14:20:13 +03:00
unknown
316e95049d BUG#14514 Creating table with packed key fails silently
include/my_base.h:
  Move HA_CREATE_FROM_ENGINE to HA_OPTION_CREATE_FROM_ENGINE
sql/ha_ndbcluster.cc:
  Use HA_OPTION_CREATE_FROM_ENGINE
sql/handler.cc:
  Use HA_OPTION_CREATE_FROM_ENGINE
2005-11-02 15:53:04 +01:00
unknown
79538fb62f Fixes during review of new pushed code
sql/handler.cc:
  Indentation fixes
sql/item.cc:
  Remove not needed test of *ref (If ref is set it always points to a valid address)
sql/table.cc:
  Indentation changes
  Moved buff_end directly after 'buff' assignment to make code more clear
sql/unireg.cc:
  Indentation changes
2005-10-13 19:40:46 +03:00
unknown
706157f025 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
server-tools/instance-manager/instance.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_manager.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
2005-10-12 00:59:52 +03:00
unknown
0ce12f70ed Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code


client/mysqldump.c:
  Simple optimizations of new code
  Indentation fixes
client/mysqltest.c:
  Removed not needed variable
include/mysql_com.h:
  Made octec2hex() more usable
mysql-test/r/ctype_utf8.result:
  CHAR() now returns binary string as default
mysql-test/r/func_str.result:
  CHAR() now returns binary string as default
mysql-test/r/range.result:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/r/user_var-binlog.result:
  CHAR() now returns binary string as default
mysql-test/r/view.result:
  More tests of view rename
mysql-test/t/ctype_utf8.test:
  CHAR() now returns binary string as default
mysql-test/t/func_str.test:
  CHAR() now returns binary string as default
mysql-test/t/range.test:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/t/view.test:
  More tests of view rename
mysys/mf_keycache.c:
  Indentation changes
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/my_os2cond.c:
  Fix to MySQL coding style
  Optimized functions
mysys/thr_lock.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/thr_mutex.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/instance.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/thread_registry.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/ha_federated.cc:
  Use octet2hex()
sql/ha_ndbcluster.cc:
  Removed not used variable
sql/handler.cc:
  Simplify code
  Use *NONE* instead of 'none' for not existing storage engine
  Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
sql/item.h:
  Remove not needed test for *ref.  (If ref is set, it should never point at 0)
sql/item_func.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  Simplify code
  More comments
  Require that last argument to find_and_check_access() is given
  (Made code shorter and faster)
sql/item_strfunc.cc:
  Changed CHAR() to return result in binary collation
  CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
  
  Bar will shortly add the following syntax:
  CHAR(.... USING character_set)
  and ensure that
  CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings
  Use ocet2hex()
sql/item_strfunc.h:
  CHAR() now returns a binary string
sql/log_event.cc:
  Use octet2hex()
  Simplify code
sql/parse_file.cc:
  Indentation fixes
  Use for() instead of while()
sql/password.c:
  Make octet2hex() more generally usable by returning pointer to end 0
sql/slave.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_base.cc:
  Indentation fixes
sql/sql_insert.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_manager.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_parse.cc:
  Don't check thd->db when checking for function privileges
sql/sql_prepare.cc:
  Fixed wrong merge
sql/sql_select.cc:
  Fixed new bug for NOT BETWEEN X and X
sql/sql_show.cc:
  Removed not used variable
sql/sql_table.cc:
  Indentation fixed
  Removed DBUG_PRINT that is obvious from context
sql/sql_view.cc:
  Simplify code
sql/unireg.cc:
  Use octet2hex()
2005-10-12 00:58:22 +03:00
unknown
57ef857681 Store and read engine type string in extra block of .frm.
sql/handler.cc:
  Use my_strnncoll instead of my_strcasecmp (it is possible to
  compare non-asciiz strings now).
sql/handler.h:
  extra block size added to HA_CREATE_INFO.
2005-10-10 23:01:45 +05:00
unknown
ed35cecdcc Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers.
May changes were to simplify storage engine setup and support for legacy call to show storage engines.


mysql-test/r/ps_1general.result:
  Fixed test results for new listing order
sql/examples/ha_tina.cc:
  Removed dead code
sql/examples/ha_tina.h:
  Removed dead code
sql/ha_archive.cc:
  Capitalized sotrage engine name and moved disabled code.
sql/ha_berkeley.cc:
  Moved deisabled code
sql/ha_federated.cc:
  Removed disabled code
sql/ha_innodb.cc:
  Removed disabled message
sql/ha_ndbcluster.cc:
  Removed disabled message
sql/handler.cc:
  Added in legacy support for sotrage engine listing (ala Serg's request). Removed handlertons variables and we now have simplified ha_init code.
sql/handler.h:
  No longer need handlertons array.
2005-10-03 18:42:30 -07:00
unknown
cdb5719257 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/fix-5.0


sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_archive.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/ha_federated.cc:
  Merge fix.
2005-10-02 20:13:18 -07:00
unknown
5655d31d5f Next big patch for loadable storage engines!
Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail. 


sql/examples/ha_archive.cc:
  Modifications for new ha_init code. The init method now checks for errors and will not start up if the errors occur.
sql/examples/ha_archive.h:
  Change for new init method.
sql/examples/ha_example.cc:
  New handlerton pieces.
sql/examples/ha_tina.cc:
  New handlerton pieces.
sql/ha_berkeley.cc:
  New handlerton pieces, plus changes for ha_init changes. I'm not happy with our current "skip" setup.
sql/ha_berkeley.h:
  Change in init return.
sql/ha_blackhole.cc:
  Changes for new handlerton pieces.
sql/ha_federated.cc:
  Changes for new handlerton and true cleanup code.
sql/ha_heap.cc:
  Changes for new handlerton returns.
sql/ha_innodb.cc:
  Changes for handlerton code.
sql/ha_innodb.h:
  Change in init.
sql/ha_myisam.cc:
  Changes for additional handlerton bits.
sql/ha_myisammrg.cc:
  Changes for  new handlerton bits.
sql/ha_ndbcluster.cc:
  Changes for new handlerton bits.
sql/ha_ndbcluster.h:
  Changes for handlerton bits.
sql/handler.cc:
  Changes for ditching show_table_type_st types, and collapsing it into a handlerton array. The ha_init now just loops through all handlers to init (much cleaner...). handlertons and sys_table_types should be merged next.
sql/handler.h:
  Additions for sys_table_types
sql/log.cc:
  Clean up of binlog for changes in handlerton
sql/mysql_priv.h:
  Removed unneeded define for binlog_init
sql/sql_show.cc:
  Changes for change in handlerton to sys_table_types
2005-10-02 19:44:28 -07:00
unknown
d553b66791 Move handler specific options into handlerton flag check
BUG#13108


mysql-test/r/federated.result:
  added test results for federated alter table
mysql-test/t/federated.test:
  added test for federated alter table
sql/examples/ha_example.cc:
  supports table re-creation
sql/examples/ha_tina.cc:
  supports table re-creation
sql/ha_blackhole.cc:
  supports table re-creation
sql/ha_federated.cc:
  added flag for not supporting alter
sql/ha_heap.cc:
  supports table recreation
sql/ha_myisam.cc:
  supports table recreation
sql/ha_myisammrg.cc:
  supports table re-creation
sql/handler.cc:
  implemented flag check function
sql/handler.h:
  added additional handlerton flags
  created a function to test flags
  replace ha_supports_generate macro with call to flag check
sql/sql_delete.cc:
  replaced ha_supports_generate with handlerton flag check
sql/sql_table.cc:
  added check for handlerton check for alter support
2005-09-30 16:26:48 -07:00
unknown
5c24a8feef Moving archive from example to sql.
sql/ha_archive.h:
  Rename: sql/examples/ha_archive.h -> sql/ha_archive.h
libmysqld/Makefile.am:
  Moved archive files references
sql/Makefile.am:
  Moved archive from example to sql
sql/ha_archive.cc:
  Moved location of prov file.
sql/handler.cc:
  Moved location from examples to sql
2005-09-28 19:04:51 -07:00
unknown
f7a8b36b36 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/handler.cc:
  Auto merged
2005-09-24 21:45:30 +02:00
unknown
e4b0b0d00c Fix bug #3443, better foreign key error messsages.
innobase/dict/dict0dict.c:
  Add 'add_newline' parameter to dict_print_info_on_foreign_key_in_create_format.
innobase/include/dict0dict.h:
  Add 'add_newline' parameter to dict_print_info_on_foreign_key_in_create_format.
innobase/include/os0file.h:
  Add os_file_read_string.
innobase/include/trx0trx.h:
  Add trx_set_detailed_error and trx_set_detailed_error_from_file functions
  and a detailed_error field to trx_struct.
innobase/include/ut0mem.h:
  Add ut_strlcpy.
innobase/os/os0file.c:
  Add os_file_read_string.
innobase/row/row0ins.c:
  Add row_ins_set_detailed function and call it when needed.
  
  Adapt to changes in dict_print_info_on_foreign_key_in_create_format.
innobase/trx/trx0trx.c:
  Add trx_set_detailed_error and trx_set_detailed_error_from_file.
  
  Clear trx->detailed_error in trx_create.
innobase/ut/ut0mem.c:
  Add ut_strlcpy.
mysql-test/r/innodb.result:
  Add new tests, adapt existing ones whose output was changed.
mysql-test/t/innodb.test:
  Add new tests, adapt existing ones whose output was changed.
sql/ha_innodb.cc:
  Add get_error_message.
  
  Clear trx->detailed_error in start_stmt and external_lock.
sql/ha_innodb.h:
  Add get_error_message.
sql/handler.cc:
  Add special case code in print_error for HA_ERR_ROW_IS_REFERENCED and
  HA_ERR_NO_REFERENCED_ROW.
  
  Change SETMSG to point to new error messages.
sql/share/errmsg.txt:
  Add ER_ROW_IS_REFERENCED_2 and ER_NO_REFERENCED_ROW_2.
2005-09-23 16:22:27 +03:00
unknown
fe9635991a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/handler.cc:
  Auto merged
2005-09-23 14:36:38 +02:00
unknown
abda6dc69f Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/fix-5.0


sql/handler.cc:
  Auto merged
2005-09-22 19:46:16 -07:00
unknown
1d5a9276e2 This fixed bug 13369. Note, I dislike goto's as well.
The alias structure now is a bit more simple and just uses a pointer to replace with the currect name. The giant case statement should go away in the next patch.


sql/handler.cc:
  Simplified the code, annd fixed build issue with engines not being compiled.
  I disliek the goto but Serg preferred it over the testing of aliases first :)
sql/handler.h:
  Removed ht from alias structure.
2005-09-22 16:58:09 -07:00
unknown
38ebb6c638 Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/opt/local/work/mysql-5.0-root


BitKeeper/etc/ignore:
  auto-union
include/my_sys.h:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/ctype_ujis.test:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
2005-09-23 00:46:59 +04:00
unknown
87ad1060d3 fixed a memory leak in ha_tina.cc 2005-09-22 16:05:05 +02:00
unknown
813fc4104e A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc


include/my_sys.h:
  - declaration for multi_alloc_root
libmysqld/Makefile.am:
  - drop protocol_cursor.cc, add sql_cursor.cc (replaces the old
  implementation of cursors with a new one)
mysql-test/r/ctype_ujis.result:
  - test results fixed (a test case for Bug#6513)
mysql-test/r/sp-big.result:
  - test results fixed (a test case for Bug#9819)
mysql-test/t/ctype_ujis.test:
  Add a test case for Bug#6513 "Test Suite: Values inserted by using cursor is
   interpreted latin1 character"
mysql-test/t/sp-big.test:
  Add a restricted test case for Bug#9819 "Cursors: Mysql Server Crash
  while fetching from table with 5 million records."
mysys/my_alloc.c:
  - an implementation of multi_alloc_root; this is largely a copy-paste
    from mulalloc.c, but the function is small and there is no easy way
    to reuse the existing C function.
sql/Makefile.am:
  - add sql_cursor.h, sql_cursor.cc (a new implementation of stored procedure
  cursors) and drop protocol_cursor.cc (the old one)
sql/handler.cc:
  - now TABLE object has its mem_root always initialized.
    Adjust the implementation handler::ha_open
sql/item_subselect.cc:
  - adjust to the changed declaration of st_select_lex_unit::prepare
sql/protocol.h:
  - drop Protocol_cursor
sql/sp_head.cc:
  - move juggling with Query_arena::free_list and Item::next to
    sp_eval_func_item, as this is needed in 3 places already.
sql/sp_head.h:
  - declare a no-op implementation for cleanup_stmt in sp_instr_cpush.
    This method is needed for non-materializing cursors, which are yet not 
    used in stored procedures.
  - declaration for sp_eval_func_item
sql/sp_rcontext.cc:
  - reimplement sp_cursor using the new implementation of server side cursors.
  - use sp_eval_func_item to assign values of SP variables from the
    row fetched from a cursor. This should fix a possible memory leak in 
    the old implementation of sp_cursor::fetch
sql/sp_rcontext.h:
  - reimplement sp_cursor using the new implementation of server side cursors.
sql/sql_class.cc:
  - disable the functionality that closes transient cursors at commit/rollback;
    transient cursors are not used in 5.0, instead we use materialized ones.
    To be enabled in a later version.
sql/sql_class.h:
  - adjust to the rename Cursor -> Server_side_cursor
  - additional declarations of select_union used in materialized cursors
sql/sql_derived.cc:
  - reuse bits of tmp table code in UNION, derived tables, and materialized
    cursors
  - cleanup comments
sql/sql_lex.h:
  - declarations of auxiliary methods used by materialized cursors
  - a cleanup in st_select_lex_unit interface
sql/sql_list.h:
  - add an array operator new[] to class Sql_alloc
sql/sql_prepare.cc:
  - split the tight coupling of cursors and prepared statements to reuse 
    the same implementation in stored procedures
  - cleanups of error processing in Prepared_statement::{prepare,execute}
sql/sql_select.cc:
  - move the implementation of sensitive (non-materializing) cursors to 
    sql_cursor.cc
  - make temporary tables self-contained: the table, its record and fields
    are allocated in TABLE::mem_root. This implementation is not clean
    and resets thd->mem_root several times because of the way create_tmp_table 
    works (many additional things are done inside it).
  - adjust to the changed declaration of st_select_lex_unit::prepare
sql/sql_select.h:
  - move the declaration of sensitive (non-materializing) cursors to 
    sql_cursor.cc
sql/sql_union.cc:
  - move pieces of st_select_unit::prepare to select_union and st_table
    methods to be able to reuse code in the implementation of materialized
    cursors
sql/sql_view.cc:
  - adjust to the changed signature of st_select_lex_unit::prepare
sql/table.cc:
  - implement auxiliary st_table methods for use with temporary tables
sql/table.h:
  - add declarations for auxiliary methods of st_table used to work with 
   temporary tables
tests/mysql_client_test.c:
  - if cursors are materialized, a parallel update of the table used
    in the cursor may go through: update the test.
sql/sql_cursor.cc:
  New BitKeeper file ``sql/sql_cursor.cc'' -- implementation of server side
  cursors
sql/sql_cursor.h:
  New BitKeeper file ``sql/sql_cursor.h'' - declarations for
  server side cursors.
2005-09-22 02:11:21 +04:00
unknown
f679e33cf9 Fixed a typo in handler.cc if CSV was built. I also added CSV to the default MAX builds so that more people test it.
BUILD/SETUP.sh:
  Adding CVS engine to default max builds.
sql/handler.cc:
  Fixed typo
2005-09-20 15:26:10 -07:00
unknown
91fbe52bf9 Cleanups for storage engine patch. Changed two test results to now reflect the changes in storage engines and a couple of comment changes in the code.
mysql-test/r/ps_1general.result:
  Redoing test output with straightened up output for storage engine names.
mysql-test/r/variables.result:
  Fixed test case.
sql/handler.cc:
  Couple of format cleanups and a change in a comment.
2005-09-19 22:08:22 -07:00
unknown
fa8fcecb8e Cleanup for handlerton structure to allow for loadable engine work. This is the first in a series of patches.
sql/examples/ha_archive.cc:
  Now declared externally.
sql/examples/ha_example.cc:
  Now declared externally
sql/examples/ha_tina.cc:
  Now declared externally
sql/ha_berkeley.cc:
  Now declared externally
sql/ha_blackhole.cc:
  Now declared externally
sql/ha_federated.cc:
  Now declared externally.
sql/ha_heap.cc:
  Now declared externally.
sql/ha_innodb.cc:
  Now declared externally.
sql/ha_myisam.cc:
  Now declared externally
sql/ha_myisammrg.cc:
  Now declared externally.
sql/ha_ndbcluster.cc:
  Now declared externally.
sql/handler.cc:
  Changes for eventual loadable engines. This will allow us to gain faster access to the handlerton (eventually this will just be a handlteron array).
sql/handler.h:
  New alias structure and change to show_table_st to place handlerton in the structure.
2005-09-19 12:06:23 -07:00
unknown
f8f1c01675 Added option --valgrind-mysqltest to mysql-test-run
Added flag to Field::store(longlong) to specify if value is unsigned.
This fixes bug #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
Fixed warning from valgrind in CREATE ... SELECT
Fixed double free of mysql.options if reconnect failed


mysql-test/mysql-test-run.sh:
  Added option --valgrind-mysqltest to allow one to run mysqltest with valgrind
mysql-test/r/bigint.result:
  Update results after fix for Field::store(longlong)
mysql-test/r/range.result:
  Update results after fix for Field::store(longlong)
mysql-test/r/strict.result:
  Update results after fix for Field::store(longlong)
  (This fixes some wrong results when storing things into bigint columns)
mysql-test/r/type_ranges.result:
  Update results after fix for Field::store(longlong)
mysql-test/t/bigint.test:
  Added testing for #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
mysql-test/t/innodb.test:
  Removed comments affected by this bug fix
mysql-test/t/mysqldump.test:
  Fixed result to not depend on existing config files
mysql-test/t/range.test:
  0xff numbers are now unsigned
mysql-test/t/strict.test:
  Added errors for things that previously (wrongly) succeeded
sql-common/client.c:
  Fixed double free of mysql.options if reconnect failed
sql/field.cc:
  Added flag to Field::store(longlong) to specify if value is unsigned
sql/field.h:
  Added flag to Field::store(longlong) to specify if value is unsigned
sql/field_conv.cc:
  Fixed calls to Field::store(longlong,flag)
sql/ha_ndbcluster.cc:
  Fixed calls to Field::store(longlong,flag)
sql/handler.cc:
  Fixed calls to Field::store(longlong,flag)
sql/item.cc:
  Fixed calls to Field::store(longlong,flag)
sql/item_sum.cc:
  Fixed calls to Field::store(longlong,flag)
sql/sp.cc:
  Fixed calls to Field::store(longlong,flag)
sql/sql_acl.cc:
  Fixed calls to Field::store(longlong,flag)
sql/sql_help.cc:
  Fixed calls to Field::store(longlong,flag)
sql/sql_show.cc:
  Fixed calls to Field::store(longlong,flag)
sql/sql_table.cc:
  Fixed varning from valgrind
sql/sql_udf.cc:
  Fixed calls to Field::store(longlong,flag)
sql/tztime.cc:
  Fixed calls to Field::store(longlong,flag)
sql/unireg.cc:
  Fixed calls to Field::store(longlong,flag)
2005-09-14 01:41:44 +03:00
unknown
a3fbfc037d don't crash when in XA PREPARE not all storage engines are 2pc-capable 2005-09-07 18:03:07 +02:00
unknown
5baa13ce12 After merge fixes
mysql-test/r/subselect2.result:
  After merge fix
sql/handler.cc:
  Remove compiler warning
sql/sql_acl.cc:
  After merge fix
sql/sql_db.cc:
  After merge fix
2005-08-25 09:38:06 +03:00
unknown
87ae5a1597 BUG#12162 - one can start two transactions with the same XID.
Now we keep all active XID's in a hash
2005-08-12 21:15:01 +02:00
unknown
e10362b472 void handler::print_error(): cleanup 2005-08-08 20:35:51 +02:00
unknown
11abe15eab Added Non-prelocked SP execution: Now a PROCEDURE doesn't enter/leave prelocked mode for
its body, but lets each statement to get/release its own locks. This allows a broader set
of statements to be executed inside PROCEDUREs (but breaks replication)
This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126


mysql-test/r/sp-security.result:
  Drop tables this test attempts to create
mysql-test/r/sp-threads.result:
  Update test results
mysql-test/r/sp.result:
  Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/r/view.result:
  Enabled a test case that now works with prelocking-free SPs
mysql-test/t/sp-security.test:
  Drop tables this test attempts to create
mysql-test/t/sp.test:
  Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/t/view.test:
  Enabled a test case that now works with prelocking-free SPs
sql/handler.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/item_func.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sp.cc:
  Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
  "CALL proc(...)" statements.
sql/sp.h:
  Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
  "CALL proc(...)" statements.
sql/sp_cache.h:
  Added comments
sql/sp_head.cc:
  Non-prelocked SP execution:
  * Try to unlock tables after PROCEDURE arguments have been evaluated.
  * Make sp_lex_keeper be able to execute in 2 modes: A) when already in prelocked mode
    B) when its statement enters/leaves prelocked mode itself.
sql/sp_head.h:
  Non-prelocked SP execution:  Make sp_lex_keeper to additionally keep list of tables it 
  needs to prelock when its statement enters/leaves prelocked mode on its own.
sql/sql_base.cc:
  Non-prelocked SP execution: Make open_tables() to
   * detect 'CALL proc(...)' and not to do prelocking for procedure body statements.
   * Make lex->query_tables_last to point precisely to a boundary in lex->query_tables 
     list where 'own' tables and views' tables end and added-for-prelocking tables begin.
     (it was not true before - view's tables could end up after query_tables_own_last)
sql/sql_class.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_class.h:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_lex.cc:
  Non-prelocked SP execution: More rigourous cleanup in st_lex::cleanup_after_one_table_open()
sql/sql_parse.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt, remove outdated comments
sql/sql_trigger.h:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
2005-07-30 08:19:57 +00:00
unknown
0b732c4797 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into  c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0


include/my_sys.h:
  Auto merged
include/thr_lock.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql-common/client.c:
  Auto merged
client/mysqldump.c:
  Manual merge
include/mysql.h:
  Manual merge
libmysql/libmysql.c:
  Manual merge
myisam/rt_split.c:
  Manual merge
mysys/thr_lock.c:
  Manual merge
sql/lock.cc:
  Manual merge
sql/mysql_priv.h:
  Manual merge
sql/sql_base.cc:
  Manual merge
sql/sql_table.cc:
  Manual merge
tests/mysql_client_test.c:
  Manual merge
2005-07-21 01:29:57 -04:00
unknown
1145f44859 Bug #12055 NDB temp tables created by ALTER TABLE are usable
- do not discover temporary files and make them visible
2005-07-20 18:40:55 +02:00
unknown
cd4bce0244 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kostja/mysql/mysql-5.0-10760-new


sql/handler.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-07-19 22:22:12 +04:00
unknown
de6f5ae5ab A fix and a test case for Bug#10760 and complementary cleanups.
The idea of the patch
is that every cursor gets its own lock id for table level locking.
Thus cursors are protected from updates performed within the same 
connection. Additionally a list of transient (must be closed at
commit) cursors is maintained and all transient cursors are closed
when necessary. Lastly, this patch adds support for deadlock
timeouts to TLL locking when using cursors.
+ post-review fixes.


include/thr_lock.h:
  - add a notion of lock owner to table level locking. When using
    cursors, lock owner can not be identified by a thread id any more, 
    as we must protect cursors from updates issued within the same 
    connection (thread). So, each cursor has its own lock identifier to 
    use with table level locking.
  - extend return values of thr_lock and thr_multi_lock with
    THR_LOCK_TIMEOUT and THR_LOCK_DEADLOCK, since these conditions
    are now possible (see comments to thr_lock.c)
mysys/thr_lock.c:
  Better support for cursors:
  - use THR_LOCK_OWNER * as lock identifier, not pthread_t.
  - check and return an error for a trivial deadlock case, when an
    update statement is issued to a table locked by a cursor which has 
    been previously opened in the same connection.
  - add support for locking timeouts: with use of cursors, trivial 
    deadlocks can occur. For now the only remedy is the lock wait timeout,
    which is initialized from a new global variable 'table_lock_wait_timeout'
    Example of a deadlock (assuming the storage engine does not downgrade 
    locks):
    con1: open cursor for select * from t1;
    con2: open cursor for select * from t2;
    con1: update t2 set id=id*2;  -- blocked
    con2: update t1 set id=id*2;  -- deadlock
    Lock timeouts are active only if a connection is using cursors.
  - the check in the wait_for_lock loop has been changed from
    data->cond != cond to data->cond != 0. data->cond is zeroed
    in every place it's changed. 
  - added comments
sql/examples/ha_archive.cc:
  - extend the handlerton with the info about cursor behaviour at commit.
sql/examples/ha_archive.h:
  - ctor moved to .cc to make use of archive handlerton
sql/examples/ha_example.cc:
  - add handlerton instance, init handler::ht with it
sql/examples/ha_example.h:
  - ctor moved to .cc to make use of ha_example handlerton
sql/examples/ha_tina.cc:
  - add handlerton instance, init handler::ht with it
sql/examples/ha_tina.h:
  - ctor moved to .cc to make use of CSV handlerton
sql/ha_berkeley.cc:
  - init handlerton::flags and handler::ht
sql/ha_berkeley.h:
  - ctor moved to .cc to make use of BerkeleyDB handlerton
sql/ha_blackhole.cc:
  - add handlerton instance, init handler::ht with it
sql/ha_blackhole.h:
  - ctor moved to .cc to make use of blackhole handlerton
sql/ha_federated.cc:
  - add handlerton instance, init handler::ht with it
sql/ha_federated.h:
  - ctor moved to .cc to make use of federated handlerton
sql/ha_heap.cc:
  - add handlerton instance, init handler::ht with it
sql/ha_heap.h:
  - ctor moved to .cc to make use of ha_heap handlerton
sql/ha_innodb.cc:
  - init handlerton::flags and handler::ht of innobase storage engine
sql/ha_innodb.h:
  - ctor moved to .cc to make use of archive handlerton
sql/ha_myisam.cc:
  - add handlerton instance, init handler::ht with it
sql/ha_myisam.h:
  - ctor moved to .cc to make use of MyISAM handlerton
sql/ha_myisammrg.cc:
  - init handler::ht in the ctor
sql/ha_myisammrg.h:
  - ctor moved to .cc to make use of MyISAM MERGE handlerton
sql/ha_ndbcluster.cc:
  - init handlerton::flags and handler::ht
sql/handler.cc:
  - drop support for ISAM storage engine, which was removed from 5.0
  - close all "transient" cursors at COMMIT/ROLLBACK. A "transient"
    SQL level cursor is a cursor that uses tables that have a transaction-
    specific state.
sql/handler.h:
  - extend struct handlerton with flags, add handlerton *ht to every
    handler instance.
sql/lock.cc:
  - extend mysql_lock_tables to send error to the client if 
    thr_multi_lock returns a timeout or a deadlock error.
sql/mysqld.cc:
  - add server option --table_lock_wait_timeout (in seconds)
sql/set_var.cc:
  - add new global variable 'table_lock_wait_timeout' to specify
  a wait timeout for table-level locks of MySQL (in seconds). The default
  timeout is 50 seconds. The timeout is active only if the connection
  has open cursors.
sql/sql_class.cc:
  - implement Statement_map::close_transient_cursors
  - safety suggests that we need an assert ensuring 
   llock_info->n_cursors is functioning properly, adjust destruction of
   the Statement_map to allow such assert in THD::~THD
sql/sql_class.h:
  - add support for Cursors registry to Statement map.
sql/sql_prepare.cc:
  - maintain a list of cursors that must be closed at commit/rollback.
sql/sql_select.cc:
  - extend class Cursor to support specific at-COMMIT/ROLLBACK behavior.
  If a cursor uses tables of a storage engine that 
  invalidates all open tables at COMMIT/ROLLBACK, it must be closed
  before COMMIT/ROLLBACK is executed.
sql/sql_select.h:
  - add an own lock_id and commit/rollback status flag to class Cursor
tests/mysql_client_test.c:
  A test case for Bug#10760 and complementary issues: test a simple
  deadlock case too.
mysql-test/var:
  New BitKeeper file ``mysql-test/var''
2005-07-19 22:21:12 +04:00
unknown
a32bf7fb82 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"


mysql-test/r/information_schema.result:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/r/information_schema_db.result:
  INFORMATION_SCHEMA.TRIGGERS view was added.
mysql-test/r/rpl_sp.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/r/trigger.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/r/view.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/information_schema.test:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/t/rpl_sp.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/trigger.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/t/view.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
sql/handler.cc:
  Added .TRN tho the list of known file extensions assoicated with tables.
sql/item.h:
  trg_action_time_type/trg_event_type enums:
    Added TRG_ACTION_MAX/TRG_EVENT_MAX elements which should be used instead of
    magical values in various loops where we iterate through all types of trigger
    action times or/and trigger event types.
sql/lex.h:
  Added new symbol "TRIGGERS".
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger name (.TRN) files.
sql/mysqld.cc:
  Added statistical variable for SHOW TRIGGERS command.
sql/share/errmsg.txt:
  Added error message saying that one attempts to create trigger in wrong schema.
sql/sp.cc:
  Replaced magical values with TRG_EVENT_MAX/TRG_ACTION_MAX constants.
sql/sql_base.cc:
  open_unireg_entry():
    Now Table_triggers_list::check_n_load() has one more argument which
    controls whether we should prepare Table_triggers_list with fully functional
    triggers or load only their names.
sql/sql_lex.h:
  Added element for new SHOW TRIGGERS command to enum_sql_command enum.
sql/sql_parse.cc:
  prepare_schema_table():
    Added support for SHOW TRIGGERS statement.
sql/sql_show.cc:
  Added new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
sql/sql_table.cc:
  mysql_rm_table_part2():
    Replaced simple deletion of .TRG file with call to
    Table_triggers_list::drop_all_triggers which will also delete .TRN files
    for all triggers associated with table.
sql/sql_trigger.cc:
  Now triggers have database wide namespace. To support it we create special .TRN
  file with same name as trigger for each trigger. This file contains name of
  trigger's table so one does not need to specify it explicitly in DROP TRIGGER.
  Moreover DROP TRIGGER treats first part of trigger identifier as database name
  now. Updated mysql_create_or_drop_trigger() routine and
  Table_triggers_list::create_trigger()/drop_trigger()/check_n_load() methods
  accordingly. Added add_table_for_trigger() routine and
  Table_triggers_list::drop_all_triggers() method.
  
  Added Table_triggers_list::get_trigger_info() for obtaining trigger metadata.
sql/sql_trigger.h:
  Table_triggers_list:
    Use TRG_EVENT_MAX, TRG_ACTION_MAX instead of magic values.
    Added get_trigger_info() method for obtaining trigger's meta-data.
    Added drop_all_triggers() method which drops all triggers for table.
    Added declarations of trg_action_time_type_names/trg_event_type_names
    arrays which hold names of triggers action time types  and event types.
sql/sql_yacc.yy:
  Changed grammar for CREATE/DROP TRIGGER to support database wide trigger
  namespace. Added new SHOW TRIGGERS statement.
sql/table.h:
  enum enum_schema_tables:
    Added constant for new INFORMATION_SCHEMA.TRIGGERS view.
2005-07-19 20:06:49 +04:00
unknown
eeee5fb10b Merge with 4.1
Makefile.am:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysys/thr_alarm.c:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Keep old
client/mysqldump.c:
  Manual merge
client/mysqltest.c:
  Automatic merge
configure.in:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Auto merge
mysql-test/r/func_str.result:
  Auto merge
mysql-test/r/group_by.result:
  Auto merge
mysql-test/r/insert_select.result:
  Auto merge
mysql-test/r/insert_update.result:
  Auto merge
mysql-test/r/lowercase_table2.result:
  Auto merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/variables.result:
  Auto merge
mysql-test/t/ctype_ucs.test:
  Auto merge
mysql-test/t/func_str.test:
  Auto merge
mysql-test/t/group_by.test:
  Auto merge
mysql-test/t/insert_select.test:
  Auto merge
mysql-test/t/insert_update.test:
  Auto merge
mysql-test/t/ndb_alter_table.test:
  Auto merge
mysql-test/t/select.test:
  Auto merge
mysql-test/t/variables.test:
  Auto merge
mysys/my_access.c:
  Auto merge
scripts/make_win_src_distribution.sh:
  Auto merge
sql/field.cc:
  Manual merge
sql/ha_ndbcluster.cc:
  Auto merge
sql/handler.cc:
  Auto merge
sql/item.cc:
  Auto merge
sql/item.h:
  Manual merge
sql/item_cmpfunc.h:
  Auto merge
sql/item_strfunc.cc:
  Auto merge
sql/item_strfunc.h:
  Auto merge
sql/mysql_priv.h:
  manual merge
sql/mysqld.cc:
  manual merge
sql/opt_range.cc:
  manual merge
sql/set_var.cc:
  Auto merge
sql/sql_base.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_insert.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
  Simplify mysql_prepare_insert by using local variable for select_lex and save old values just before they are changed
sql/sql_parse.cc:
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_prepare.cc:
  New ON DUPLICATE KEY UPDATE handling
sql/sql_select.cc:
  manual merge
sql/sql_table.cc:
  auto merge
sql/sql_yacc.yy:
  auto merge
strings/ctype-ucs2.c:
  auto merge
strings/ctype-utf8.c:
  auto merge
2005-07-03 14:17:52 +03:00
unknown
76d444fcb6 Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning


client/mysqldump.c:
  Cleanup
  Ensure we free allocated memory
  Portability fixes
client/mysqltest.c:
  Cleanup of code during review
  Portability fixes (Don't use 'bool')
mysql-test/r/func_encrypt.result:
  NULL as argument to encrypt/decrypt should return NULL without a warning
mysql-test/r/func_encrypt_nossl.result:
  Added test of NULL argument
mysql-test/t/func_encrypt_nossl.test:
  Added test of NULL argument
sql/handler.cc:
  Cleanup during code review
sql/item_strfunc.cc:
  NULL as argument to encrypt/decrypt should return NULL without a warning
sql/sql_parse.cc:
  Fix wrong merge (fix was not needed as the previous code was reverted)
sql/sql_table.cc:
  Removed extra new line
2005-06-27 20:31:00 +03:00
unknown
4db138f91a Merged from mysql-4.1 to mysql-5.0
client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/t/ndb_autodiscover.test:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
client/mysqldump.c:
  Merge from 4.1 to 5.0
mysql-test/r/ndb_autodiscover.result:
  Merge
ndb/test/ndbapi/create_tab.cpp:
  Merge
sql/ha_ndbcluster.cc:
  Merge
sql/handler.cc:
  Merge
sql/handler.h:
  Merge
sql/sql_base.cc:
  Merge
sql/sql_table.cc:
  Merge
2005-06-22 14:10:02 +02:00
unknown
c25470e3a1 Bug#6877 MySQL should give an error if the requested table type is not available
Implement new SQL mode - NO_ENGINE_SUBSTITUTION


mysql-test/r/sql_mode.result:
  Test for bug 6877
mysql-test/t/sql_mode.test:
  Test for bug 6877
sql/handler.cc:
  change to ha_checktype()
sql/handler.h:
  change to ha_checktype()
sql/mysql_priv.h:
  new sql mode NO_ENGINE_SUBSTITUTION
  change to args for get_table_type() and create_frm()
sql/mysqld.cc:
  new sql mode NO_ENGINE_SUBSTITUTION
sql/set_var.cc:
  change to ha_checktype() args
sql/sql_delete.cc:
  change to get_table_type() args
sql/sql_rename.cc:
  change to get_table_type() args
sql/sql_table.cc:
  move common code to check_engine()
  change to ha_checktype(), get_table_type() args
sql/table.cc:
  change to ha_checktype(), create_frm(), get_table_type() args
sql/unireg.cc:
  change to create_frm() args
2005-06-17 22:14:44 +01:00
unknown
d18e5622eb BUG10365 Cluster handler uses non-standard error code
- Updated after review


sql/ha_ndbcluster.cc:
  Return -1 if table does not exists
sql/handler.cc:
  Return -1 if table does not exists
  Return 0 if table exists and it could be created
  Return >0 if table existed but it could not be created.
sql/sql_base.cc:
  Only need to call ha_create_table_from_engine and check if result is > 0. If that is the case, print error message
2005-06-16 15:17:47 +02:00
unknown
09944efd71 BUG#10365 Cluster handler uses non-standard error codes
- Added better error messages when trying to open a table that can't be discovered or unpacked. The most likely cause of this is that it does not have any frm data, probably since it has been created from NdbApi or is a NDB system table.
 - Separated functionality that was in ha_create_table_from_engine into two functions. One that checks if the table exists and another one that tries to create the table from the engine.


mysql-test/r/ndb_autodiscover.result:
  Add tests for reading from a table that can't be discovered(SYSTAB_0)
  Discovery is not performed during create table anymore.
mysql-test/t/ndb_autodiscover.test:
  Add tests for reading from a table that can't be discovered(SYSTAB_0)
  Discovery is not performed during create table anymore.
ndb/test/ndbapi/create_tab.cpp:
  Set connectstring before creating Ndb object.
sql/ha_ndbcluster.cc:
  Rename and use the function ndbcluster_table_exists_in_engine.
  Correct return valu from ndbcluster_discover
  Remove old code "ndb_discover_tables"
sql/ha_ndbcluster.h:
  Rename function ndbcluster_table_exists to ndb ndbcluster_table_exists_in_engine
sql/handler.cc:
  Update comment of ha_create_table_from_engine
  Remove parameter create_if_found from ha_create_table_from_engine, the function ha_table_exists_in_engine is now used toi check if table is found in engine.
  Cleanup return codes from ha_create_table_from_engine.
  Change name of ha_table_exists to ha_table_exists_in_engine, update comment and returne codes.
sql/handler.h:
  Remove paramter create_if_cound from  ha_create_table_from_engine
  Rename ha_table_exists to ha_table_exists_in_engine
sql/sql_base.cc:
  Use the function ha_table_exists_in_engine to detect if table exists in enegine. 
  If it exists, call function ha_create_table_from_engine to try and create it.
  If create of table fails, set correct error message.
sql/sql_table.cc:
  Add comments, remove parameter create_if_found to ha_create_table_from_engine.
  When dropping a table, try to discover it from engine. If discover fails, use same error message as if the table didn't exists. 
  Maybe another message should be displayed here, ex: "Table could not be dropped, unpack failed"
  
  When creating a new table, use ha_table_exists_in_engine to check if a table with the given name already exists.
2005-06-08 13:31:59 +02:00
unknown
49357ae8f0 Fix for bug #10015 "Crash in InnoDB if stored routines are used".
We should not allow explicit or implicit transaction commits inside
of stored functions or triggers (so in autocommit mode we should not
do commits after execution of sub-statement).
Also since we don't support nested statement transactions in 5.0,
we shouldn't commit or rollback stmt transactions while we are inside
stored functions or triggers. This should be fixed in later (>=5.1)
releases.


mysql-test/r/sp_trans.result:
  Added test for bug #10015 "Crash in InnoDB if stored routines are used"
  and for general transaction handling inside of functions.
mysql-test/t/sp_trans.test:
  Added test for bug #10015 "Crash in InnoDB if stored routines are used"
  and for general transaction handling inside of functions.
sql/handler.cc:
  ha_trans_commit()/ha_trans_rollback():
    Since we don't support nested statement transactions in 5.0,
    we can't commit or rollback stmt transactions while we are inside
    stored functions or triggers. So we simply do nothing now.
    This should be fixed in later ( >= 5.1) releases.
sql/item_func.cc:
  Item_func_sp::execute():
    Set THD::transaction.in_sub_stmt flag to TRUE during stored function
    execution to prevent commits and rollbacks for statement level
    transactions, since doing them will ruin such transaction for
    stateemtn which calls this function.
sql/share/errmsg.txt:
  Added error message which says that statements doing explicit or implicit
  commits are disallowed in triggers and stored functions.
sql/sql_base.cc:
  close_thread_tables():
    Clarified comment about committing of statement transactions in
    prelocked mode.
sql/sql_class.h:
  THD::transaction:
    Added in_sub_stmt method which indicates that we are executing
    statements from trigger or stored function now, and thus
    statement transaction belongs to statement which invoked this
    routine and we should not commit or rollback it while executing
    these sub-statements.
sql/sql_parse.cc:
  end_active_trans()/begin_trans()/end_trans():
    We should not commit or rollback global (non-stmt) transaction
    if we are executing stored function or trigger. These checks will
    catch situation when we are trying to do commit or rollback in stored
    procedure which is called from function or trigger.
sql/sql_trigger.h:
  Table_triggers_list::process_triggers():
    Set THD::transaction.in_sub_stmt flag to TRUE during trigger
    execution to prevent commits and rollbacks for statement level
    transactions, since doing them will ruin such transaction for
    stateemtn which invokes this trigger.
sql/sql_yacc.yy:
  Prohibited usage of statements which do explicit or implicit commit or
  rollback inside of stored functions and triggers.
2005-06-07 14:53:08 +04:00
unknown
6e79678dee Merge from 4.1
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
client/sql_string.cc:
  Auto merged
client/sql_string.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysys/my_open.c:
  Auto merged
mysys/raid.cc:
  Auto merged
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.cc:
  Auto merged
sql/item_uniq.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_analyse.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/opt_range.cc:
  Manual merge
sql/sql_parse.cc:
  Use select_lex pointer instead of lex->select_lex
sql/sql_repl.cc:
  Function moved to log.cc, fix made there instead
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-26 21:01:55 +02:00
unknown
22944a9563 Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"


client/sql_string.cc:
  USE_PRAGMA_IMPLEMENTATION
client/sql_string.h:
  USE_PRAGMA_INTERFACE
include/my_global.h:
  Use pragma implementation for gcc pre version 3
mysys/raid.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/field.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_berkeley.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_blackhole.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_heap.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_innodb.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_isam.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_isammrg.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_myisam.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_myisammrg.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_ndbcluster.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/handler.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/hash_filo.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_cmpfunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_func.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_geofunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_strfunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_subselect.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_sum.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_timefunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.h:
  USE_PRAGMA_INTERFACE
sql/log_event.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/log_event.h:
  USE_PRAGMA_INTERFACE
sql/opt_range.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/procedure.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/protocol.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/protocol_cursor.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/set_var.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.h:
  USE_PRAGMA_INTERFACE
sql/sql_class.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.h:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_list.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_map.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_map.h:
  USE_PRAGMA_INTERFACE
sql/sql_olap.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_select.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_string.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_udf.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/tztime.cc:
  USE_PRAGMA_IMPLEMENTATION
2005-05-26 12:09:14 +02:00
unknown
ef342b743e Change update_auto_increment to return 1 if get_auto_increment() returned ~(ulonglong)
This makes it easier to give an error in the handler if there was a problem generating an auto-increment value


mysys/thr_alarm.c:
  Remove warning from valgrind
sql/item_strfunc.cc:
  Fixed indentation
tests/mysql_client_test.c:
  Removed compiler warning
2005-05-18 10:41:35 +03:00
unknown
d15f89c47a After merge fixes
mysql-test/r/alter_table.result:
  Fixed results after merge
sql/handler.cc:
  Trivial optimzation
sql/sql_table.cc:
  Trvial optimization
sql/sql_yacc.yy:
  After merge fix
sql/unireg.cc:
  Removed argument 'null_fields' from make_empty_rec() as it was not needed
  Moved assert() to right place to take bit fields into account
2005-05-16 15:21:35 +03:00
unknown
ab54e16705 Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows)
Fixed possible core dump in information schema


client/client_priv.h:
  --count for mysqlshow
client/mysqlshow.c:
  Added option --count to be used when the user want's number of rows per table in the output
  (We shouldn't use count(*) as default as this can be a slow operation)
mysys/my_thr_init.c:
  Correct comment
sql/ha_berkeley.cc:
  Remove not used variable
sql/ha_berkeley.h:
  Remove not used variable
sql/ha_innodb.cc:
  Remove not used function
sql/ha_ndbcluster.cc:
  false -> FALSE
  true -> TRUE
sql/handler.cc:
  Added and fixed comments
  Remove 'strange' code to remove compiler warnings (better to do things like this with attribute)
sql/item.cc:
  false -> FALSE
sql/item_cmpfunc.cc:
  Fixed indentation
sql/item_cmpfunc.h:
  marked BETWEEN as a bool function
sql/item_func.cc:
  Simple optimzation
sql/key.cc:
  Removed wrong code
sql/log.cc:
  Check result from open_index_file()
sql/mysql_priv.h:
  Simplyfy some test of netware
sql/mysqld.cc:
  Fixed indentation
  Check result form open_index_file()
  Simplify code with IF_NETWARE()
sql/opt_range.cc:
  false -> FALSE
  true -> TRUE
  Fixed indentation
sql/opt_sum.cc:
  Fixed comments
sql/sp_head.cc:
  Simple optimzation
  Move variable declarations to begining of blocks
sql/sql_acl.cc:
  Fix long lines
  Rename xx -> column
  Move declaration to beginning of block
sql/sql_parse.cc:
  Removed comment
sql/sql_select.cc:
  Indentation fixes
sql/sql_show.cc:
  Fixed reference outside of array (possible core dump)
sql/sql_table.cc:
  Simplify code
  Combine common code
sql/sql_test.cc:
  false -> FALSE
sql/sql_trigger.cc:
  false -> false
  true -> TRUE
sql/sql_yacc.yy:
  Simpler test
sql/unireg.cc:
  Added comment
2005-05-06 11:39:30 +03:00
unknown
66bea0de15 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
2005-04-30 03:46:38 +03:00
unknown
aba91fb130 Merge
sql/examples/ha_archive.cc:
  SCCS merged
sql/examples/ha_archive.h:
  SCCS merged
sql/handler.cc:
  SCCS merged
2005-04-28 10:58:24 +02:00
unknown
2c8e261725 BUG#9911 After review fixes
- Remove ha_archive::rename_table and move the fix to handler::rename_table


sql/examples/ha_archive.cc:
  Remove ha_archive::rename_table
sql/examples/ha_archive.h:
  Remove ha_archive::rename_table
sql/handler.cc:
  Fix handler::rename_table so it does not care about if the file to rename is missing
2005-04-28 10:49:18 +02:00
unknown
8b5b3652ec Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


myisam/mi_key.c:
  Auto merged
sql/handler.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2005-04-27 17:19:32 +03:00
unknown
0e1e0ddf23 mysqladmin extended-status now displays global status
Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part


client/mysqladmin.cc:
  Show GLOBAL status
myisam/mi_key.c:
  Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part
  (Ramil will soon push test cases)
sql/handler.cc:
  Indentation fix
tests/mysql_client_test.c:
  Portability fixes
2005-04-27 17:16:08 +03:00
unknown
05bfcf65a5 handler.cc:
Fix compilation error if HAVE_REPLICATION is not defined


sql/handler.cc:
  Fix compilation error if HAVE_REPLICATION is not defined
2005-04-27 15:09:41 +03:00
unknown
194298265f Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0


sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2005-04-26 17:57:15 +03:00
unknown
f5c3843c37 Fixes for BUG#10039 "MEMORY engine is reported as HEAP",
BUG#9738 "SHOW VARIABLES still displays the deprecated 'log_update' in 5.0",
BUG#9542 "MySQL dies with signal 11 when it is using non-existent location of binary logs"



mysql-test/r/create.result:
  MEMORY, not HEAP
mysql-test/r/ps_1general.result:
  order changed in SHOW STORAGE ENGINES
mysql-test/r/variables.result:
  MEMORY, not HEAP
sql/handler.cc:
  the array of storage engine names is searched in index order, so we must put the preferred name
  before the alias so that the preferred name is printed by MySQL instead of the alias.
sql/log.cc:
  TC_LOG::open(): don't try to open if the index (relevant only for binlog TC log)
  could not be opened.
sql/set_var.cc:
  --log-update is deprecated and replaced by --log-bin so don't show log_update in SHOW VARIABLES.
2005-04-23 00:05:05 +02:00
unknown
273d78e115 Many files:
Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3


sql/ha_innodb.cc:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
sql/handler.cc:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
sql/mysqld.cc:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
sql/set_var.cc:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
sql/sql_repl.cc:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
sql/ha_innodb.h:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
sql/handler.h:
  Semi-synchronous replication for InnoDB type tables; before telling the client that a commit has been processed, wait that the replication thread has returned from my_net_send() where it sends the binlog to the slave; note that TCP/IP, even with the TCP_NODELAY option does not guarantee that the slave has RECEIVED the data - this is just heuristic at the moment; this is useful in failover: in almost all cases, every transaction that has returned from the commit has been sent and processed in the slave, which makes failover to the slave simpler if the master crashes; the code does not work yet as is, because MySQL should call innobase_report_binlog_offset_and_commit() in a commit; we will most probably return that call to 5.0.x, to make InnoDB Hot Backup and group commit to work again; XA code broke them temporarily in 5.0.3
2005-04-20 19:27:46 +03:00
unknown
2be63528bc Merge with 4.1
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/set_var.cc:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
sql/ha_ndbcluster.cc:
  Merge
sql/handler.cc:
  Merge
sql/handler.h:
  Merge
sql/mysqld.cc:
  Merge
2005-04-16 04:35:54 +03:00
unknown
0327d05c69 Fixed core dump with long timezone names
Don't abort on bootstrap if a wrong --default-storage-engine is specified


sql/handler.cc:
  Combined code
sql/mysqld.cc:
  Fixed core dump with long timezone names
  Don't abort on bootstrap if a wrong --default-storage-engine is specified
  Don't print strange messages if one sends 'kill' to a mysqld --bootstrap
sql/set_var.cc:
  Indentaion change
2005-04-16 03:40:33 +03:00
unknown
e687d6beae Check that the default storage engine is really available, and
refuse to start up if it is not. (Bug #9815)


sql/handler.cc:
  Add ha_storage_engine_is_enabled function.
sql/handler.h:
  Declare ha_storage_engine_is_enabled()
sql/mysqld.cc:
  Abort startup if the specified default storage engine is
  not available.
2005-04-13 18:25:31 -07:00
unknown
b59dc1e860 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/handler.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-04-12 17:22:14 +02:00
unknown
859b3e16ac FLUSH TABLES WITH READ LOCK should block writes to binlog too
mysql-test/r/flush_block_commit.result:
  FLUSH TABLES WITH READ LOCK should block writes to binlog too
  it does not yet
mysql-test/t/flush_block_commit.test:
  FLUSH TABLES WITH READ LOCK should block writes to binlog too
  it does not yet
2005-04-12 17:15:54 +02:00
unknown
5fa93a136d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
2005-04-07 20:19:25 +02:00
unknown
f9d6463fdf BUG#6762 ALTER TABLE gives weird results and error message
- Removed hardcoded error message from 4.1


include/my_base.h:
  Adding error message for the case when table definition has changed in storage engine
mysql-test/t/ndb_alter_table.test:
  Updated testresult to expect new error code
sql/ha_ndbcluster.cc:
  Add mapping for ndb error 284 to HA_ERR_TABLE_DEF_CHANGED, this error will occur when the table definition has been changed by another MySQL Server connected to the cluster.
  Remove hardcoded errormessage from 4.1
sql/handler.cc:
  Adding error message for the case when table definition has changed in storage engine
sql/share/errmsg.txt:
  Adding error message for the case when table definition has changed in storage engine
2005-04-07 20:17:37 +02:00
unknown
6f23625d4e merged 2005-04-06 20:20:37 +02:00
unknown
ce10cefda6 Per Heikki's request make trans_register_ha tolerant to multiple registrations 2005-04-05 18:42:34 +02:00
unknown
d4cc076109 handler.cc, ha_innodb.cc:
Fix Bug #8650 : InnoDB does not rollback SQL statement at an error


sql/ha_innodb.cc:
  Fix Bug #8650 : InnoDB does not rollback SQL statement at an error
sql/handler.cc:
  Fix Bug #8650 : InnoDB does not rollback SQL statement at an error
2005-04-05 17:56:40 +03:00
unknown
46aad9633e Merge
sql/field.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/handler.cc:
  SCCS merged
2005-04-05 13:23:11 +02:00
unknown
cd0a50bf34 remove the rest of isam/merge references
fix a race condition in TC_LOG_BINLOG::unlog


include/Makefile.am:
  remove the rest of isam/merge references
include/config-win.h:
  unused and abused macro removed
include/my_pthread.h:
  unused and abused macro removed
include/my_sys.h:
  MY_IGNORE_BADFD flag
include/mysql_embed.h:
  remove the rest of isam/merge references
mysql-test/r/replace.result:
  remove the rest of isam/merge references
mysql-test/t/replace.test:
  remove the rest of isam/merge references
mysql-test/t/xa.test:
  comment
mysys/my_sync.c:
  MY_IGNORE_BADFD flag
sql/handler.cc:
  remove the rest of isam/merge references
sql/log.cc:
  fix a race condition in TC_LOG_BINLOG::unlog
  preparation for binlog group commit
sql/mysql_priv.h:
  remove duplicates
sql/mysqld.cc:
  remove the rest of isam/merge references
sql/opt_range.cc:
  remove the rest of isam/merge references
sql/set_var.cc:
  hide unused variables. simplify sync_binlog code
sql/sql_base.cc:
  remove the rest of isam/merge references
sql/sql_class.h:
  cleanup
2005-04-05 13:17:49 +02:00
unknown
2fc4270b4c XID SQL syntax
minor cleanups
XA tests


include/m_ctype.h:
  minor cleanup
sql/field.cc:
  minor cleanup
sql/handler.cc:
  XID SQL syntax
sql/handler.h:
  XID SQL syntax
sql/item_sum.h:
  minor cleanup
sql/lock.cc:
  comments
sql/sql_class.cc:
  minor cleanup
sql/sql_lex.h:
  XID SQL syntax
sql/sql_parse.cc:
  XID SQL syntax
sql/sql_yacc.yy:
  XID SQL syntax
  cleanups
2005-04-04 00:50:05 +02:00
unknown
690ebd8193 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-trg3


sql/handler.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-04-03 17:02:13 +04:00
unknown
a5b1b9d924 Give warnings if wrong date/time/datetime argument for STR_TO_DATE
Small fixes while doing review of new pushed code
More test cases for decimal


mysql-test/r/date_formats.result:
  Warnings added for STR_TO_DATE()
mysql-test/r/ps_1general.result:
  Better description for BLACKHOLE
mysql-test/r/strict.result:
  Added tests for STR_TO_DATE
mysql-test/r/type_decimal.result:
  Test to test ranges of DECIMAL
mysql-test/t/date_formats.test:
  More tests
mysql-test/t/strict.test:
  Added tests for STR_TO_DATE
mysql-test/t/type_decimal.test:
  Test to test ranges of DECIMAL
sql/field.cc:
  Simple optimization
sql/handler.cc:
  Better description for BLACKHOLE
sql/item_timefunc.cc:
  Give warnings if wrong date/time/datetime argument for STR_TO_DATE
sql/log_event.cc:
  Indentation fixes
sql/log_event.h:
  #ifdef-ed not used code
sql/share/errmsg.txt:
  New error message
sql/sql_show.cc:
  Ensure that we do a proper restore in case of error
2005-03-30 16:00:31 +03:00
unknown
2c5d427c87 Fix for bugs #5859 "DROP TABLE does not drop triggers" and
#6559 "DROP DATABASE forgets to drop triggers".

If we drop table we should also drop all triggers associated with it.
To do this we have to check for existence of .TRG file when we are 
dropping table and delete it too.


mysql-test/r/trigger.result:
  Added tests for bugs #5859 "DROP TABLE does not drop triggers"
  and #6559 "DROP DATABASE forgets to drop triggers".
mysql-test/t/trigger.test:
  Added tests for bugs #5859 "DROP TABLE does not drop triggers"
  and #6559 "DROP DATABASE forgets to drop triggers".
sql/handler.cc:
  Added .TRG to the list of known extensions of files associated with 
  tables.
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger files.
sql/sql_table.cc:
  mysql_rm_table_part2():
    If we drop table we should also drop all triggers associated with it.
    To do this we have to check for existence of .TRG file and delete it
    (until the moment when we will store trigger definitions in the same
     .FRM file as table description).
sql/sql_trigger.cc:
  Made constant holding extension for trigger files externally visible.
2005-03-27 16:15:21 +04:00
unknown
6b46566532 Merging support for blackhole up to 5.0.
configure.in:
  Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/Makefile.am:
  Edited for adding blackhole.
sql/handler.cc:
  Edited for adding blackhole.
sql/handler.h:
  Edited for blackhole.
2005-03-25 10:36:58 -08:00
unknown
d27a709f3d merged
BitKeeper/etc/logging_ok:
  auto-union
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/ndb_autodiscover.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
scripts/fill_func_tables.sh:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
2005-03-23 09:42:24 +01:00
unknown
8a99997d60 Additional storage engine called "blackhole". Customer request, and for that matter a Zawodny request. With this you can alter table to a type of table that would never store data. Its a /dev/null for a database.
acinclude.m4:
  New macro rule for ha_blackhole.
configure.in:
  Rule enabling blackhole engine
sql/Makefile.am:
  Additions to Makefile for blackhole engine
sql/handler.cc:
  Ifdef enable code for blackhole (and message for "what does this thing do").
sql/handler.h:
  Flag for storage engine type.
sql/mysql_priv.h:
  Added blackhole type.
sql/mysqld.cc:
  Updates for building backhole.
sql/set_var.cc:
  Show variable for blackhole engine
2005-03-22 16:10:39 -08:00
unknown
e31642727b Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


innobase/include/trx0trx.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2005-03-22 16:11:43 +01:00
unknown
5be4362874 Fix Windows compile warnings, declarations of walk functions
sql/item_func.cc:
  Remove unused variable
sql/handler.cc:
  Fix warnings
sql/item_sum.cc:
  Restore C_MODE_START/END around count_distinct_walk
  Change second argument to dump_leaf_key to correct type
sql/item_sum.h:
  Change second argument to dump_leaf_key to correct type
2005-03-22 00:00:24 +01:00