Commit graph

209 commits

Author SHA1 Message Date
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
b6e0033171 Test Bug: Memory leaks in the archive handler.
Moved initialization code into a new init function.
Added a new cleanup function.
Added a call to close the meta file.



mysql-test/t/archive.test:
  Test Bug: Memory leaks in the archive handler.
  Fixed a typo.
sql/examples/ha_archive.h:
  Test Bug: Memory leaks in the archive handler.
  Added declarations for the new init/cleanup functions.
sql/handler.cc:
  Test Bug: Memory leaks in the archive handler.
  Added calls of the new init/cleanup functions.
2005-01-26 15:27:31 +01:00
unknown
95056a0b65 Fix for bug #6516 (Server crash loading spatial data)
(after discussion with SerG)


include/my_base.h:
  Handler error code added
myisam/mi_write.c:
  New error code handled
myisam/rt_index.c:
  check for zero length added
myisam/sp_key.c:
  zero length check added
mysql-test/r/gis-rtree.result:
  appropriate test result
mysql-test/t/gis-rtree.test:
  test case
sql/handler.cc:
  new error code handling added
2004-12-10 16:06:49 +04:00
unknown
72d5625378 Merge mysql.com:/space/bkroot/mysql-4.1
into mysql.com:/space/bk/b6391-mysql-4.1


sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-12-03 12:15:31 +01:00
unknown
220acb328e Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the
  database created when checking conditions for replication.
  CREATE/DROP/ALTER DATABASE statements are now replicated based on
  the manipulated database.


mysql-test/t/rpl_until.test:
  Longer sleep to allow slave to stop.
mysql-test/t/rpl_charset.test:
  Position change in binary file.
mysql-test/r/drop_temp_table.result:
  Position change in binlog.
mysql-test/r/rpl_loaddata_rule_m.result:
  Position change in binlog.
mysql-test/r/rpl_charset.result:
  Position change in binlog.
sql/log_event.h:
  Added new flag and parameter to suppress generation of
  USE statements.
sql/log_event.cc:
  Added parameter and code to suppress generation of
  USE statements.
sql/sql_db.cc:
  Suppress generation of USE before CREATE/ALTER/DROP DATABASE
  statements.
sql/log.cc:
  Query_log_event have new extra parameter.
sql/sql_table.cc:
  Query_log_event have new extra parameter.
sql/sql_base.cc:
  Query_log_event have new extra parameter.
sql/sql_update.cc:
  Query_log_event have new extra parameter.
sql/sql_insert.cc:
  Query_log_event have new extra parameter.
sql/sql_rename.cc:
  Query_log_event have new extra parameter.
sql/sql_delete.cc:
  Query_log_event have new extra parameter.
sql/sql_acl.cc:
  Query_log_event have new extra parameter.
sql/handler.cc:
  Query_log_event have new extra parameter.
sql/item_func.cc:
  Query_log_event have new extra parameter.
sql/sql_parse.cc:
  Query_log_event have new extra parameter.
2004-12-03 12:13:51 +01:00
unknown
01604355ac Bug #6748 heap_rfirst() doesn't work (and never did!)
range for BETWEEN typo fixed


extra/perror.c:
  meaningless error message fixed
heap/hp_rfirst.c:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
mysql-test/r/heap.result:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
mysql-test/r/range.result:
  range for BETWEEN typo fixed
mysql-test/t/heap.test:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
sql/handler.cc:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
sql/sql_select.cc:
  range for BETWEEN typo fixed
2004-11-22 14:53:18 +01:00
unknown
6b1450d9b4 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-clean


sql/handler.cc:
  Auto merged
2004-11-11 00:27:34 +01:00
unknown
b6eb77f73d no new message in 4.1 (causes merge issues with 5.0). Using ER_UNKNOW_ERROR and hardcoded message string instead.
include/mysqld_error.h:
  no new message in 4.1 (causes merge issues with 5.0)
sql/handler.cc:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/czech/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/danish/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/dutch/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/english/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/estonian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/french/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/german/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/greek/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/hungarian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/italian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/japanese/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/korean/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/norwegian-ny/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/norwegian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/polish/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/portuguese/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/romanian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/russian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/serbian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/slovak/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/spanish/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/swedish/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
sql/share/ukrainian/errmsg.txt:
  no new message in 4.1 (causes merge issues with 5.0)
2004-11-11 00:00:17 +01:00
unknown
71196720d1 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


sql/handler.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2004-11-11 00:36:56 +02:00
unknown
5205078ef9 Added possibility to detect if libmysqld is restarted
(Needed to check if memory allocated with mysql_once_init() has been freed)



include/my_sys.h:
  Added possibility to detect if libmysqld is restarted
mysys/my_init.c:
  Added possibility to detect if libmysqld is restarted
sql/handler.cc:
  Detect if libmysqld is restarted
  Simple optimization of ha_known_exts()
2004-11-11 00:36:18 +02:00
unknown
3b3285b322 Merge
client/mysqldump.c:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/handler.h:
  SCCS merged
2004-11-10 18:02:00 +01:00
unknown
313ce62f70 WL#1596 "make mysqldump --master-data --single-transaction able to do online dump of InnoDB AND report reliable
binlog coordinates corresponding to the dump".
The good news is that now mysqldump can be used to get an online backup of InnoDB *which works for
point-in-time recovery and replication slave creation*. Formerly, mysqldump --master-data --single-transaction
used to call in fact mysqldump --master-data, so the dump was not an online dump (took big lock all time of dump).
The only lock which is now taken in this patch is at the beginning of the dump: mysqldump does:
FLUSH TABLES WITH READ LOCK; START TRANSACTION WITH CONSISTENT SNAPSHOT; SHOW MASTER STATUS; UNLOCK TABLES;
so the lock time is in fact the time FLUSH TABLES WITH READ LOCK takes to return (can be 0 or very long, if
a table is undergoing a huge update).
I have done some more minor changes listed in the paragraph of mysqldump.c.
WL#2237 "WITH CONSISTENT SNAPSHOT clause for START TRANSACTION":
it's a START TRANSACTION which additionally starts a consistent read on all
capable storage engine (i.e. InnoDB). So, can serve as a replacement for
BEGIN; SELECT * FROM some_innodb_table LIMIT 1; which starts a consistent read too. 


client/mysqldump.c:
  Main change: mysqldump --single-transaction --master-data is now able to, at the same time,
  take an online dump of InnoDB (using consistent read) AND get the binlog position corresponding to this dump
  (before, using the two options used to silently cancel --single-transaction).
  This uses the new START TRANSACTION WITH CONSISTENT SNAPSHOT syntax.
  Additional changes: 
  a) cleanup:
   - DBerror calls exit() so some code was unneeded
   - no need to call COMMIT at end, leave disconnection do the job
   - mysql_query_with_error_report()
  b) requirements I had heard from colleagues:
   - --master-data now requires an argument, to comment out ("--") the CHANGE MASTER or not
     (commenting had been asked for point-in-time recovery when replication is not necessary).
   - --first-slave is renamed to --lock-all-tables
  c) more sensible behaviours (has been discussed internally):
   - if used with --master-data, --flush-logs is probably intended to get a flush synchronous
     with the dump, not one random flush per dumped db.
   - disabled automatic reconnection as, at least, SQL_MODE would be lost (and also, depending
     on options, LOCK TABLES, BEGIN, FLUSH TABLES WITH READ LOCK).
include/mysqld_error.h:
  an error if START TRANSACTION WITH CONSISTENT SNAPSHOT is called and there is no consistent-read capable storage engine
  (idea ((C) PeterG) is that it's a bit like CREATE TABLE ENGINE=InnoDB when there is no support for InnoDB).
sql/handler.cc:
  new ha_start_consistent_snapshot(), which, inside an existing transaction, starts a consistent read
  (offers an alternative to SELECTing any InnoDB table). Does something only for InnoDB.
  Warning if no suitable engine supported.
sql/handler.h:
  declarations
sql/lex.h:
  symbols for lex
sql/share/czech/errmsg.txt:
  new message
sql/share/danish/errmsg.txt:
  new message
sql/share/dutch/errmsg.txt:
  new message
sql/share/english/errmsg.txt:
  new message
sql/share/estonian/errmsg.txt:
  new message
sql/share/french/errmsg.txt:
  new message
sql/share/german/errmsg.txt:
  new message
sql/share/greek/errmsg.txt:
  new message
sql/share/hungarian/errmsg.txt:
  new message
sql/share/italian/errmsg.txt:
  new message
sql/share/japanese/errmsg.txt:
  new message
sql/share/korean/errmsg.txt:
  new message
sql/share/norwegian-ny/errmsg.txt:
  new message
sql/share/norwegian/errmsg.txt:
  new message
sql/share/polish/errmsg.txt:
  new message
sql/share/portuguese/errmsg.txt:
  new message
sql/share/romanian/errmsg.txt:
  new message
sql/share/russian/errmsg.txt:
  new message
sql/share/serbian/errmsg.txt:
  new message
sql/share/slovak/errmsg.txt:
  new message
sql/share/spanish/errmsg.txt:
  new message
sql/share/swedish/errmsg.txt:
  new message
sql/share/ukrainian/errmsg.txt:
  new message
sql/sql_lex.h:
  new option in lex (transaction options)
sql/sql_parse.cc:
  warning comment (never make UNLOCK TABLES commit a transaction, please);
  support for starting consistent snapshot.
sql/sql_yacc.yy:
  new clause WITH CONSISTENT SNAPSHOT (syntax ok'd by PeterG) for START TRANSACTION.
2004-11-10 17:56:45 +01:00
unknown
97af0a0e8f Bug#6031 - To drop database you have to execute DROP DATABASE command twice.
DROP DATABASE failed because of file ext not in TYPELIB of known extensions.
  General solution - construct a TYPELIB at runtime instead of a static list.


mysql-test/r/ndb_basic.result:
  Bug#6031
    New test for bug
mysql-test/t/ndb_basic.test:
  Bug#6031
    New test for bug
sql/ha_ndbcluster.cc:
  Cosmetic fix
sql/handler.cc:
  Bug#6031
    New function - ha_known_exts()
    We can construct TYPELIB of known db file extensions.
sql/handler.h:
  Bug#6031
    New function - ha_known_exts()
sql/sql_db.cc:
  Bug#6031
    We use a constructed list of known extensions instead of a static list
2004-11-10 15:07:11 +00:00
unknown
c4d04e9ec1 As rollback can be 30 times slower than insert in InnoDB, and user may
not know there's rollback (if it's because of a dupl row), better warn
that it's happening. It can also be of use for a DBA killing a
connection and wondering what this connection is still doing now. Example:
|  5 | root | localhost | test | Killed  | 10   | Rolling back | insert into i select * from j |


sql/handler.cc:
  As rollback can be 30 times slower than insert in InnoDB, and user may
  not know there's rollback (if it's because of a dupl row), better warn.
2004-11-08 21:45:23 +01:00
unknown
712326d684 Bug#6202: ENUMs are not case sensitive even if declared BINARY 2004-10-25 17:51:26 +05:00
unknown
9de6a750f0 Fixed a typo, which prevented non-valgrind build. 2004-10-20 13:52:56 +02:00
unknown
3307318917 true,false -> TRUE, FALSE
Simple fixes/optimization of things discovered during review of new pushed code


include/my_sys.h:
  Ensure that clear_alloc_root() interacts correctly with alloc_root_inited()
mysys/hash.c:
  More comments
  Simple optimization (merge identical code)
mysys/my_bitmap.c:
  Change inline -> static inline
sql/examples/ha_archive.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  true,false -> TRUE, FALSE
  Change if (false) -> #ifdef NOT_USED
sql/ha_ndbcluster.h:
  true,false -> TRUE, FALSE
sql/handler.cc:
  More comments
  Remove not needed initializations.
  #ifdef not used code
sql/item_cmpfunc.h:
  true,false -> TRUE, FALSE
sql/item_strfunc.cc:
  Move local variables to function beginning
  Remove wrong comments
sql/log_event.h:
  true,false -> TRUE, FALSE
sql/sql_base.cc:
  true,false -> TRUE, FALSE
  More comments
sql/sql_help.cc:
  true,false -> TRUE, FALSE
sql/sql_lex.cc:
  Simple optimization of new code
sql/sql_parse.cc:
  true,false -> TRUE, FALSE
sql/sql_prepare.cc:
  true,false -> TRUE, FALSE
sql/sql_table.cc:
  true,false -> TRUE, FALSE
sql/sql_yacc.yy:
  true,false -> TRUE, FALSE
2004-10-14 18:03:46 +03:00
unknown
bbab9ec678 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied


BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-ctype-latin1_de.c~c5d8f9208bceb98e:
  Auto merged
Build-tools/mysql-copyright-2:
  Auto merged
acinclude.m4:
  Auto merged
client/mysqladmin.c:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
include/myisam.h:
  Auto merged
innobase/btr/btr0btr.c:
  Auto merged
innobase/buf/buf0buf.c:
  Auto merged
ltmain.sh:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/fsp/fsp0fsp.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/log/log0log.c:
  Auto merged
innobase/log/log0recv.c:
  Auto merged
innobase/pars/pars0opt.c:
  Auto merged
innobase/row/row0row.c:
  Auto merged
innobase/sync/sync0arr.c:
  Auto merged
innobase/ut/ut0dbg.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_close.c:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_locking.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/r/delete.result:
  Auto merged
mysql-test/r/func_if.result:
  Auto merged
Build-tools/mysql-copyright:
  Merge with 4.0 (too most of the code from 4.0)
Makefile.am:
  merge
client/mysql.cc:
  Used 4.1 code
configure.in:
  merge
innobase/os/os0file.c:
  merge
innobase/row/row0mysql.c:
  merge
mysql-test/r/ctype_latin1_de.result:
  merge
mysql-test/r/flush_table.result:
  merge
mysql-test/r/func_str.result:
  merge
mysql-test/r/handler.result:
  merge
mysql-test/r/multi_update.result:
  merge
mysql-test/r/type_timestamp.result:
  Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/r/update.result:
  merge
mysql-test/t/delete.test:
  merge
mysql-test/t/flush_table.test:
  merge
mysql-test/t/func_str.test:
  merge
mysql-test/t/handler.test:
  merge
mysql-test/t/multi_update.test:
  merge
mysql-test/t/type_timestamp.test:
  Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/t/update.test:
  merge
mysys/errors.c:
  merge
mysys/my_fstream.c:
  merge
mysys/my_pread.c:
  merge
mysys/my_write.c:
  merge
mysys/mysys_priv.h:
  merge
scripts/mysqlhotcopy.sh:
  merge
sql/field.cc:
  Keep code from 4.1
sql/field.h:
  Keep code from 4.1
sql/ha_innodb.cc:
  Don't merge lock code from 4.0; Heikki will look at this
sql/ha_myisam.cc:
  merge
sql/handler.cc:
  merge
sql/item_cmpfunc.cc:
  merge
sql/item_cmpfunc.h:
  merge
sql/item_strfunc.cc:
  merge
sql/mysql_priv.h:
  merge
sql/mysqld.cc:
  merge
sql/protocol.cc:
  merge
sql/records.cc:
  merge
sql/repl_failsafe.cc:
  merge
mysql-test/r/lock_multi.result:
  merge
mysql-test/t/ctype_latin1_de.test:
  merge
mysql-test/t/func_if.test:
  merge
mysql-test/t/lock_multi.test:
  merge
sql/repl_failsafe.h:
  merge
  Remove unnessessary header protection
sql/slave.h:
  merge
sql/sql_acl.cc:
  merge
sql/sql_base.cc:
  merge
sql/sql_cache.cc:
  auto merge
sql/sql_class.cc:
  merge
sql/sql_class.h:
  merge
sql/sql_delete.cc:
  merge
sql/sql_handler.cc:
  Get new HANDLER code into 4.1
sql/sql_parse.cc:
  Keep old file
sql/sql_repl.cc:
  merge
sql/sql_repl.h:
  merge
sql/sql_show.cc:
  merge
sql/sql_table.cc:
  merge
sql/sql_union.cc:
  Applied the examine_rows bug fix from 4.0 by hand
sql/sql_update.cc:
  New multi-update-grant-check code from 4.0
sql/sql_yacc.yy:
  New multi-update-grant-check code from 4.0
sql/stacktrace.c:
  merge
sql/table.h:
  merge
2004-10-06 19:14:33 +03:00
unknown
0d76cb7ea4 Reverted patch for new usage of open_count as it caused more problems than it solved
Cleaned up patch for checking locks for multi-table updates


myisam/mi_close.c:
  Reverted patch for new usage of open_counts
myisam/mi_locking.c:
  Reverted patch for new usage of open_counts
sql/ha_myisam.cc:
  Reverted patch for new usage of open_counts
sql/handler.cc:
  Removed compiler warning
sql/sql_acl.cc:
  Removed compiler warning
sql/sql_table.cc:
  No need to unlock after failed call to external_lock()
sql/sql_update.cc:
  Cleaned up (and made it more secure) patch for checking locks for multi-table updates
2004-10-06 01:24:21 +03:00
unknown
ec81fca2d0 Merge
BitKeeper/etc/logging_ok:
  auto-union
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/mysql-test-run.sh:
  SCCS merged
sql/ha_ndbcluster.cc:
  SCCS merged
2004-10-03 21:39:04 +00:00
unknown
7b51154461 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.


mysql-test/r/type_timestamp.result:
  Added test for TIMESTAMP columns which are able to store NULL values.
mysql-test/t/type_timestamp.test:
  Added test for TIMESTAMP columns which are able to store NULL values.
sql/field.cc:
  Added support for TIMESTAMP fields holding NULL values.
  We don't need Field_timestamp::set_timestamp_offsets() anymore.
  Instead we need Field_timestamp::get_auto_set_type() function
  which will convert TIMESTAMP auto-set type stored in Field in 
  unireg_check to value from timestamp_auto_set_type_enum.
  (We can't replace this function with additional Field_timestamp member
  and some code in constructor because then we will have troubles
  with Field::new_field() method).
  We should also set field to not null in Field_timestamp::set_time() now.
sql/field.h:
  Added support for TIMESTAMP fields holding NULL values.
  We don't need Field_timestamp::set_timestamp_offsets() anymore.
  Instead we need Field_timestamp::get_auto_set_type() function,
  which will convert TIMESTAMP auto-set type stored in Field in 
  unireg_check to value from timestamp_auto_set_type_enum.
  We also have to support NULL values in Field_timestamp::get_timestamp()
  function.
sql/field_conv.cc:
  Added comment clarifying behavior in case of TIMESTAMP fields which are
  able to store NULL values.
sql/ha_berkeley.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_heap.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_innodb.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_isam.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_isammrg.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_myisam.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_myisammrg.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_ndbcluster.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/handler.cc:
  handler::update_timestamp() is no longer needed since now we use
  Field_timestamp::set_time() instead.
  (we can't use handler::update_timestamp() anyway since field position
  only is not enough for TIMESTAMP fields which are able to store NULLs)
sql/handler.h:
  handler::update_timestamp() is no longer needed since now we use
  Field_timestamp::set_time() instead.
sql/item_timefunc.cc:
  Since now TIMESTAMP fields can hold NULL values we should take this into
  account.
sql/sql_base.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now. 
  (Here we use Field_timestamp::get_auto_set_type() to setup its value
   before further statement execution).
sql/sql_insert.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_load.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_parse.cc:
  Added support for TIMESTAMP fields holding NULL values.
  We should distinguish NULL default values and non-specified default
  values for such fields (because latter could mean DEFAULT NOW()
  ON UPDATE NOW() in some cases).
sql/sql_show.cc:
  Added support for TIMESTAMP fields holding NULL values.
  Unlike all other fields these are NOT NULL by default
  so we have to specify NULL attribute explicitly for them.
sql/sql_table.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_update.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_yacc.yy:
  Added support for TIMESTAMP fields holding NULL values.
  Unlike all other fields these are NOT NULL by default
  (so we have to set NOT_NULL_FLAG properly for them).
sql/table.h:
  Added timestamp_auto_set_type enum which values are used for indicating
  during which operations we should automatically set TIMESTAPM field
  value to current timestamp.
  TABLE: Replaced timestamp_default_now/on_update_now members with
  timestamp_auto_set_type flag (Now when TIMESTAMP field are able to 
  store NULL values, single position of field in record is not enough 
  for updating this field anyway).
2004-10-01 18:54:06 +04:00
unknown
5077ba47ad WL#1424 Updated after review
* Changed the implementation of ndbcluster_find_files to be more efficient, using only one mutex lock
* Moved ha_find_files to end of mysql_find_files so that it can be passed the list that we are interested to find. 


mysql-test/t/ndb_autodiscover.test:
  Added a new test case, disabled for now, waiting for mysql-test-run to set a NDB_CONNECTSTRING
sql/ha_ndbcluster.cc:
  Rewrite of ndbcluster_find_files to remove and delete files using only one mutex lock. 
  This version only discover files that fulfill wildcard.
sql/ha_ndbcluster.h:
  Add list of files as parameter
sql/handler.cc:
  Add list of files as parameter
sql/handler.h:
  Add list of files as parameter
sql/sql_show.cc:
  Moving the ha_find_files to end of function, so that the file lista can be passsed to it.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-09-26 16:11:24 +02:00
unknown
dd07a90d61 Changed WL#1424 to use the function ha_find_files. This is a simpler implementation and all handler specific code is hidden in the appropriate handler.
mysql-test/r/ndb_autodiscover.result:
  Update test result, number of rows is 1
mysql-test/t/ndb_autodiscover.test:
  Dont run the test where table is dropped in NDb with ndb_drop_table
sql/ha_ndbcluster.cc:
  Implement function ndbcluster_find_files which will discover new tables and delete old tables
sql/ha_ndbcluster.h:
  Implement function ndbcluster_find_files 
  Remove function ndbcluster_list_tables and ndbcluster_can_discover
sql/handler.cc:
  Add ha_find_files called from mysql_find_files
  Remove ha_can_discover and ha_list_tables
sql/handler.h:
  Add ha_find_files called from mysql_find_files
  Remove ha_can_discover and ha_list_tables
sql/sql_show.cc:
  Revert to original version of sql_show.cc
  Only changes to this version is that ha_find_files is called from mysql_find_files in order to give the handlers a possibility to find new files in engine
2004-09-21 12:13:58 +02:00
unknown
bdbb091b68 Merged Thd_ndb
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-09-20 14:28:43 +02:00
unknown
f87754fb6b Merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Go with the new solution
2004-09-13 14:49:50 +02:00
unknown
5a46435678 WL1424 Multiple MySQL Servers: SHOW TABLES etc. should detect new and delete old tables.
include/my_base.h:
  Added new bit to table create options
  Removed old error code HA_ERR_OLD_METADAT and reused it for HA_ERR_NO_SUCH_TABLE.
mysql-test/r/ndb_autodiscover.result:
  Updated test cases
mysql-test/t/ndb_autodiscover.test:
  Updated test cases
mysql-test/t/ndb_autodiscover2.test:
  Updated test cases
sql/discover.cc:
  Moved function create_table_from_handler to handler.cc
sql/ha_ndbcluster.cc:
  Improved discover functionality
  Added .ndb file
  Changed error code mappings for a table that does not exist in engine
  Check for ndb object in THD
  Updated ndbcluster_discover, ndbcluster_list_tables and ndbcluster_can_discover
sql/ha_ndbcluster.h:
  Improved discover
sql/handler.cc:
  Added new error message mapping.
  Moved function ha_create_table_from_engine to handler level
  Added new functions ha_can_discover, ha_list_tables and ha_table_exists
sql/handler.h:
  Added new error message mapping.
  Moved function ha_create_table_from_engine to handler level
  Added new functions ha_can_discover, ha_list_tables and ha_table_exists
sql/mysql_priv.h:
  Removed create_table_from_handler, moved to handler.h
sql/sql_base.cc:
  Renamed function create_table_from_handler
sql/sql_show.cc:
  Added new function mysql_discover_files and mysql_list_files. 
  Modified mysql_find_files to discover new and delete "old" files/tables.
sql/sql_table.cc:
  Renamed create_table_from_handler
  Call ha_create_table_from_engine, in order to discover the the frm file before it can be dropped.
sql/table.cc:
  Added mapping of the error code HA_ERR_NO_SUCH_TABLE
2004-09-13 14:46:38 +02:00
unknown
180abf8338 Merge mskold@build.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1


ndb/include/mgmcommon/ConfigRetriever.hpp:
  Auto merged
ndb/src/common/debugger/signaldata/ScanTab.cpp:
  Auto merged
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
ndb/src/common/mgmcommon/LocalConfig.cpp:
  Auto merged
ndb/src/ndbapi/Ndb.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionary.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/Ndbif.cpp:
  Auto merged
ndb/src/ndbapi/Ndbinit.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
2004-09-11 20:56:06 +02:00
unknown
9106686846 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into build.mysql.com:/users/tulin/mysql-4.1-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-09-09 10:41:33 +02:00
unknown
4844315a9e Merge mskold@build.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1


sql/handler.cc:
  Auto merged
2004-09-08 17:05:19 +02:00
unknown
41b9a9c81e Removed unnecessary condition 2004-09-07 16:21:29 +02:00
unknown
df8a43b8b2 sql_print_error cleanup 2004-09-04 20:17:09 +02:00
unknown
e8c2e41841 renamed ha_recovery_logging to ha_enable_transaction
added tests to alter table for "large" alter tables and truncates in ndbcluster
added debug printout in restart() in ndbcluster
added flag THD::transaction.on to enable/disable transaction


mysql-test/r/ndb_alter_table.result:
  added tests to alter table for "large" alter tables and truncates
mysql-test/t/ndb_alter_table.test:
  added tests to alter table for "large" alter tables and truncates
ndb/src/ndbapi/NdbConnection.cpp:
  added debug printout in restart()
sql/ha_ndbcluster.cc:
  added support for large alter table and truncate
sql/handler.cc:
  renamed ha_recovery_logging to ha_enable_transaction
sql/handler.h:
  renamed ha_recovery_logging to ha_enable_transaction
sql/sql_class.cc:
  added flag THD::transaction.on to enable/disable transaction
sql/sql_class.h:
  added flag THD::transaction.on to enable/disable transaction
sql/sql_delete.cc:
  added disable transaction for mysql_truncate
sql/sql_table.cc:
  renamed ha_recovery_logging to ha_enable_transaction
2004-09-03 15:11:09 +00:00
unknown
dcf98760ae check for mysql_bin_log.is_open() before my_b_tell(&thd->transaction.trans_log
in ha_commit_trans - why it didn't crash earlier ?


mysql-test/r/null.result:
  after merge fix
2004-08-22 14:23:52 +02:00
unknown
0745a2b783 after merge fix
myisam/Makefile.am:
  put zlib at the end (libtool adds the whole bunch of dependencies right after that)
sql/Makefile.am:
  put zlib at the end (libtool adds the whole bunch of dependencies right after that)
2004-08-20 22:54:42 +02:00
unknown
adf4e7a822 merged
sql/lock.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
2004-08-20 21:56:29 +02:00
unknown
cd8054d431 Making FLUSH TABLES WITH READ LOCK block COMMITs of existing transactions,
in a deadlock-free manner. This splits locking the global read lock in two steps.
This fixes a consequence of this bug, known as:
BUG#4953 'mysqldump --master-data may report incorrect binlog position if using InnoDB'
And a test.


sql/handler.cc:
  making COMMIT wait if FLUSH TABLES WITH READ LOCK happened.
sql/lock.cc:
  an additional stage so that FLUSH TABLES WITH READ LOCK blocks COMMIT:
  make_global_read_lock_block_commit():
  taking the global read lock is TWO steps (2nd step is optional; without
  it, COMMIT of existing transactions will be allowed):
  lock_global_read_lock() THEN make_global_read_lock_block_commit().
sql/mysql_priv.h:
  new argument to wait_if_global_read_lock()
sql/sql_class.h:
  THD::global_read_lock now an uint to reflect the 2 steps of global read lock (does not block COMMIT / does)
sql/sql_db.cc:
  update for new prototype
sql/sql_parse.cc:
  implementing the two steps of global read lock so that FLUSH TABLES WITH READ LOCK can block COMMIT without deadlocking with COMMITs.
2004-08-20 16:35:23 +02:00
unknown
2d8f4a61bf Merge baker@bk-internal.mysql.com:/home/bk/mysql-4.1
into avenger.(none):/export/brian/tina-4.1


acinclude.m4:
  Auto merged
BitKeeper/deleted/.del-acconfig.h~8d2e3113fc8056da:
  Auto merged
configure.in:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2004-08-13 16:27:17 -07:00
unknown
89987fa104 This is the addition of the CSV engine "aka tina". Its an example engine that works as a plain text file.
acconfig.h:
  Adding HAVE CSV rule
acinclude.m4:
  Build option of csv engine
configure.in:
  Update for building CSV
sql/Makefile.am:
  Added files for CSV build
sql/handler.cc:
  Needed options for CSV to be created.
sql/handler.h:
  CSV type engine enum.
sql/mysql_priv.h:
  Addition of the have_csv_db variable.
sql/mysqld.cc:
  Code to show csv option.
sql/set_var.cc:
  Adding have show variables for both csv and example.
2004-08-12 20:57:18 -07:00
unknown
5fbf11ba9b Merge mskold@build.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1-ndb


ndb/test/ndbapi/Makefile.am:
  Auto merged
sql/handler.cc:
  Auto merged
2004-07-27 09:59:26 +02:00
unknown
d57d78ac10 handler.cc:
Revise output of SHOW ENGINES.


sql/handler.cc:
  Revise output of SHOW ENGINES.
2004-07-19 15:09:21 -05:00
unknown
ef389ca0b2 Fixed ndbcluster_print_error to use table name from failed NdbOperation 2004-07-02 16:14:08 +02:00
unknown
c6e23c8549 Merge with 4.0 to get the latest bug patches to 4.1
BitKeeper/etc/ignore:
  added sql/mysql_tzinfo_to_sql
BitKeeper/etc/logging_ok:
  auto-union
acinclude.m4:
  Auto merged
extra/perror.c:
  Auto merged
include/mysql.h:
  Auto merged
innobase/include/mach0data.ic:
  Auto merged
innobase/include/mtr0log.h:
  Auto merged
innobase/include/mtr0log.ic:
  Auto merged
innobase/mem/mem0dbg.c:
  Auto merged
innobase/pars/lexyy.c:
  Auto merged
BitKeeper/deleted/.del-4.0.XX-gpl.ipr~f5909a9e9bd8094:
  Auto merged
BitKeeper/deleted/.del-Clients and Tools.fgl~bf0f776883577f02:
  Auto merged
BitKeeper/deleted/.del-Development.fgl~6392ce285e73f5fc:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/innodb_cache.result:
  Auto merged
mysql-test/r/lowercase_table2.result:
  Auto merged
mysql-test/t/innodb_cache.test:
  Auto merged
mysql-test/t/lowercase_table2.test:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/handler.cc:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
libmysql/libmysql.c:
  Merge with 4.0
mysql-test/r/bdb.result:
  Merge with 4.0
mysql-test/r/range.result:
  Merge with 4.0
mysql-test/t/bdb.test:
  Merge with 4.0
mysys/hash.c:
  Merge with 4.0
scripts/mysql_install_db.sh:
  Merge with 4.0
sql/field.cc:
  Merge with 4.0
sql/field.h:
  Merge with 4.0
sql/mysql_priv.h:
  Merge with 4.0
sql/sql_handler.cc:
  Merge with 4.0
sql/sql_select.cc:
  Merge with 4.0
sql/sql_table.cc:
  Merge with 4.0
2004-06-25 20:13:05 +03:00
unknown
4e664e3e43 Added missing root user to mysql.user on windows. (Bug #4242)
Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
Don't use default arguments for ha_rnd_init()
Simple code cleanups since last pull



scripts/fill_func_tables.sh:
  Change mode to -rw-rw-r--
scripts/make_win_src_distribution.sh:
  Safer remove of SCCS directories
scripts/mysql_create_system_tables.sh:
  Added missing root user to mysql.user on windows. (Bug #4242)
scripts/mysql_install_db.sh:
  Set default max_allowed_packet to be able to read help tables even if an my.cnf file with this option is present. (Bug #3938)
sql/filesort.cc:
  Don't use default arguments for ha_rnd_init()
sql/ha_berkeley.cc:
  Better to use #ifdef than // to disable code
  Removed not needed setting of active_index (It's set in index_end)
sql/ha_berkeley.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_heap.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_innodb.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_isam.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_isammrg.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_myisam.cc:
  Fixed wrong previous patch (New code used 'and' between two conditions when it should be 'or' as in original code)
sql/ha_myisam.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_myisammrg.h:
  Don't use default arguments for ha_rnd_init()
sql/ha_ndbcluster.h:
  Don't use default arguments for ha_rnd_init()
sql/handler.cc:
  Code cleanup
sql/handler.h:
  Keep bool variables together (better alignment)
sql/records.cc:
  Don't use default arguments for ha_rnd_init()
sql/sql_select.cc:
  Don't use default arguments for ha_rnd_init()
2004-06-25 18:49:36 +03:00
unknown
9293805a03 Merge mskold@build.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1


sql/handler.cc:
  Auto merged
2004-06-24 15:32:33 +02:00
unknown
4c450c5235 Cosmetic fixes 2004-06-24 14:49:34 +02:00
unknown
7d99900243 Enabling the --innodb-safe-binlog option in code. If you wish to disable it,
you just need to change this line of mysqld.cc:
#if MYSQL_VERSION_ID >= 40103
to, say,
#if MYSQL_VERSION_ID > 40103
I am noticing a failure of bdb.test; I believe this is not related to the
code I added yesterday and today, but I am checking. In any case I push this
changeset as it cannot by itself bring more mess that I *may* (or not)
already have brought with previous pushes.


sql/handler.cc:
  if innodb_active_trans is true then innobase_tid too.
sql/mysqld.cc:
  only a warning if --innodb-safe-binlog without InnoDB (it's true this situation will not hurt).
  Enabling the --innodb-safe-binlog option.
2004-06-24 14:42:56 +02:00
unknown
1045f2c3fd Modified index flags and added ndbcluster_print_error 2004-06-24 12:04:22 +02:00
unknown
3198ea57f5 Final part of WL#1717 "innodb/binlog consistency". This is to resolve
a limitation of yesterday's implementation:
if there was an unfinished transaction (COMMIT not typed), and some MyISAM tables were
then updated, and then mysqld crashes, then at restart the server would use the too old
binlog offset known by InnoDB to cut the binlog, thus cutting the successful MyISAM
updates. We fix this by reporting the binlog offset into InnoDB even if InnoDB was not
affected at all by the update.
But the feature is still disabled until we decide if it can go into 4.1.3.


sql/handler.cc:
  How we report the binlog offset into InnoDB:
  - if the update affected InnoDB, it will happen naturally
  - otherwise (for example MyISAM update not in an InnoDB transaction), we explicitely report it.
sql/handler.h:
  removing warning (noticed this)
sql/log.cc:
  clearer messages when truncating binlog.
sql/mysql_priv.h:
  need to see opt_innodb_safe_binlog in handler.cc
sql/mysqld.cc:
  No innodb-safe-binlog if no InnoDB.
  Updating message as now we work with MyISAM.
2004-06-24 11:38:57 +02:00
unknown
253e0a213b Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1


client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
sql/handler.cc:
  Auto merged
2004-06-23 21:47:07 +02:00
unknown
a3244c68f0 Fixed warning about unitialized mutex when mysqld couldn't start.
sql/handler.cc:
  Cleaned up comments
2004-06-23 16:39:56 +03:00