Commit graph

28 commits

Author SHA1 Message Date
unknown
4bd2b5adc4 Fix style nit
sql/examples/ha_archive.cc:
  Fix style
2005-01-11 01:01:35 +01:00
unknown
4bb238a054 Fix double-initalization of mutex in archive storage engine. (Bug #7762)
sql/examples/ha_archive.cc:
  Fix redundant initialization of share->mutex
  Fix error handling to always clean up correctly
  Fix a couple of warnings
2005-01-10 23:59:28 +01:00
unknown
e1248f4fc3 Fix for crummy compiler that didn't udnerstand for declaration. Another fix for example storage engine to pass, not skip, test.
mysql-test/r/have_exampledb.require:
  Fix for test for examples.
sql/examples/ha_archive.cc:
  Fix for compiler that had problem with ANSI C.
2004-12-06 16:26:05 -08:00
unknown
2da1cbd97d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mishka.local:/home/my/mysql-4.1


client/mysqlimport.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
ndb/src/ndbapi/ndberror.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-10-20 02:55:03 +03:00
unknown
a4d8ed871a Fix for broken --with-csv-storage-engine build.
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/examples/ha_example.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/examples/ha_tina.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().
2004-10-18 10:32:52 +04: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
62637c9dca Clean up from Bar and Antony code review. Found an issue with the header file were it could end up corrupted.
sql/examples/ha_archive.cc:
  Cleanup from Bar's and Antony's code review. Meta file should not be system independent (so you can copy around the files as you like).
sql/examples/ha_archive.h:
  No longer bother with storing the working version of the data files. Its unimportant while there is only one format.
2004-10-06 23:26:40 -07:00
unknown
9da04daa00 Row level lock code for the archive storage engine.
sql/examples/ha_archive.h:
  Updates for new meta file.
sql/examples/ha_archive.cc:
  Removed debug statement.
2004-10-05 01:40:00 -07:00
unknown
764ea714f4 The major change for this changeset is the addition of code to handle:
OPTIMIZE TABLE <archive table>

This recompresses the table, thus removing any additional gzip headers caused by opening/closing or flushing the table.


mysql-test/r/archive.result:
  Added optimize test case for archive engine.
mysql-test/t/archive.test:
  Added test case for OPTIMIZE table <archive table>
sql/examples/ha_archive.cc:
  The big change was the addition of optimize() call to allow tables to be recompressed (so if you have been reading/writing/reading/writing and ending up with larger files then you should, this will solve it). Though adding this feature is going to make it a real headache to add row level locking. 
  Also fixed bug reported by JD where storage engine code was not functioning (this of course was because I didn't check for the propper return value for hash_init). Removed BROKEN_GZIP ifdef since there was no way to enable it.
sql/examples/ha_archive.h:
  Added optimize() method.
2004-09-21 03:33:22 +02:00
unknown
b28118abfb Fix for BUG#5117:
* Renamed handler::estimate_number_of_rows to handler::estimate_rows_upper_bound function, which can also return "unknown"
 * made filesort to use full sort buffer if number of rows to sort is not known.


sql/examples/ha_tina.h:
  Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/filesort.cc:
   * Fix for BUG#5117: made filesort() to use full sort buffer if number of rows to sort is not known.
   * Comments and assertion added
sql/ha_berkeley.cc:
  Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/ha_berkeley.h:
  Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/ha_innodb.cc:
  Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/ha_innodb.h:
  Renamed estimate_number_of_rows -> estimate_rows_upper_bound
sql/handler.h:
  Renamed estimate_number_of_rows -> estimate_rows_upper_bound
2004-09-13 06:14:25 +04:00
unknown
f0c1dadbdb Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


mysys/mf_keycache.c:
  Auto merged
mysys/my_lib.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
2004-08-23 13:47:52 +03:00
unknown
f7d0dfd9e8 Changed %lx -> 0x%lx (for easier comparison of debug files)
Cosmetic cleanups
Don't call 'delete_elements' on copy_funcs as this causes elements to be freed twice


mysys/hash.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/list.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/mf_iocache.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/mf_keycache.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
  Changed debug messages to be more consistent with other mysys files.
mysys/mf_keycaches.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_alloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_fopen.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_fstream.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_getwd.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_lib.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_lwrite.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_malloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_pread.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_read.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_realloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_write.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/safemalloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/thr_alarm.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/thr_lock.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/thr_mutex.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/tree.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/typelib.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
sql/examples/ha_archive.cc:
  Changed to return error number for some functions (instead of -1)
  Updated function comments & some other minor cleanups
  Ensure that free_share() and gzclose() are always called
  Use 'TRUE' and 'FALSE' instead of 'true' and 'false'
  Removed some compiler warnings
sql/examples/ha_archive.h:
  Fixed to use new prototypes for records_in_range
sql/sql_select.cc:
  Don't call 'delete_elements' on copy_funcs
2004-08-23 13:46:51 +03:00
unknown
ff24b4d5d4 Fix for not compiling ha_tina.
sql/examples/ha_tina.cc:
  Adding in pieces to remove from compile (aka ifdef).
2004-08-17 01:29:19 -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
325de4ebf1 Updates for archive storage engine.
sql/examples/ha_archive.cc:
  Corrections from Bar's comments. Mainly small code changes/style changes.
2004-07-20 13:25:55 -07:00
unknown
a23fbc060e New handler::index_flags() definition to make it easy to check the full used key and a specific key part.
Added key part to optimize_range() to fix problems when using fields in key parts.



sql/examples/ha_archive.h:
  New handler::index_flags() definition
sql/examples/ha_example.h:
  New handler::index_flags() definition
sql/field.cc:
  New optimize_range() definition
sql/field.h:
  New optimize_range() definition
sql/ha_berkeley.cc:
  New handler::index_flags() definition
sql/ha_berkeley.h:
  New handler::index_flags() definition
sql/ha_heap.h:
  New handler::index_flags() definition
sql/ha_innodb.h:
  New handler::index_flags() definition
sql/ha_isam.h:
  New handler::index_flags() definition
sql/ha_isammrg.h:
  New handler::index_flags() definition
sql/ha_myisam.h:
  New handler::index_flags() definition
sql/ha_myisammrg.h:
  New handler::index_flags() definition
sql/ha_ndbcluster.cc:
  New handler::index_flags() definition
sql/ha_ndbcluster.h:
  New handler::index_flags() definition
sql/handler.h:
  New handler::index_flags() definition
sql/log.cc:
  Fixed compiler warnings
sql/log_event.cc:
  Fixed compiler warnings (and renamed short variable name)
sql/opt_range.cc:
  New handler::index_flags() definition
sql/opt_sum.cc:
  New handler::index_flags() definition
sql/set_var.cc:
  Removed compiler warnings
sql/sql_db.cc:
  Removed compiler warnings
sql/sql_select.cc:
  New handler::index_flags() definition
sql/sql_show.cc:
  Removed compiler warnings
sql/sql_update.cc:
  Removed compiler warnings
sql/table.cc:
  New handler::index_flags() definition
2004-07-08 15:45:25 +03:00
unknown
4e95ea7b6e ha_archive.cc:
Memory was used after it has been alreay freed.
  This led to server crash on FreeBSD.


sql/examples/ha_archive.cc:
  Memory was used after it has been alreay freed.
  This led to server crash on FreeBSD.
2004-07-07 13:47:29 +05:00
unknown
ebf9c723f0 followup to handler cleanup
mysql-test/r/bdb.result:
  bug#4000
mysql-test/t/bdb.test:
  bug#4000
sql/sql_select.cc:
  cleanup
2004-06-23 21:26:34 +02:00
unknown
89de63595f Last patch before push into main tree. Updated from code review and final once over.
A couple of small changes to ha_example (mainly comments). 


sql/examples/ha_archive.cc:
  Changes from Serg.
  A few styles changes, fix for potential hash insert gone wrong, removed bad tables if create fails, gzflush used for flushing by default (had problems with OSX 10.2), and some spelling corrections.
sql/examples/ha_archive.h:
  Removed fast_key_read() and changed the name of a conflicting variable.
sql/examples/ha_example.cc:
  Added a few new comments.
sql/examples/ha_example.h:
  Added pragma interface. Removed fast_key_read() and Serg's request
2004-06-07 02:06:33 -07:00
unknown
9a162f9abd Added tests for archive. Cleaned up a merge mistake and added some information on how well archive compresses.
sql/examples/ha_archive.cc:
  Added in example information from testing archive with Slashdot's comments.
sql/handler.h:
  Fixed broken merge.
sql/set_var.cc:
  Adding in "have_archive" to variables shown to make tests work.
2004-05-25 13:27:01 -07:00
unknown
fc81419d07 Resolving merge issues between archive and most recent changes by Monty/NDB
BitKeeper/etc/logging_ok:
  auto-union
2004-05-21 10:06:49 -07:00
unknown
31c1f849b1 First commit of archive example. Archive is a simple storage engine that handles inserts and selects.
acconfig.h:
  Adding undef piece for HAVE_ARCHIVE_DB	
acinclude.m4:
  Code needed for --with-archive-storage-engine flag for compile.
configure.in:
  Adding tag for Archive
sql/Makefile.am:
  Source updates to compile ha_archive
sql/examples/ha_archive.cc:
  Class file for archive storage engine. First version.
sql/handler.cc:
  Updates needed for adding archive storage engine.
sql/handler.h:
  ENUM for archive storage engine.
sql/mysql_priv.h:
  Archive show options
sql/mysqld.cc:
  Ifdef foor HAVE_ARCHIVE_DB
sql/examples/ha_archive.h:
  Include file for archive storage engine addition.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-05-20 18:13:11 -07:00
unknown
e015ee3918 Updating range_in_rows for the include file for ha_example (the main .cc file has already been updated).
sql/examples/ha_example.h:
  Updating ha_example.h for new records_in_range. ha_example.cc has already been updated.
2004-05-18 09:54:36 -07:00
unknown
70f79563d9 key_cmp -> key_cmp_if_same
New records_in_range() interface (similar to read_range())
Macros for faster bitmap handling
Simplify read_range() code (#WL1786)
New general key_cmp() function to compare keys




heap/hp_hash.c:
  New records_in_range() interface
include/heap.h:
  New records_in_range() interface
include/my_base.h:
  Moved 'key_range' here so that all table handlers can use it
include/my_bitmap.h:
  Make some bitmap functions inline for faster usage in one thread
include/myisam.h:
  New records_in_range() interface
include/myisammrg.h:
  New records_in_range() interface
myisam/mi_range.c:
  New records_in_range() interface
myisam/mi_test2.c:
  New records_in_range() interface
myisam/rt_test.c:
  New records_in_range() interface
  Indentation fixes
myisam/sp_test.c:
  New records_in_range() interface
  Indentation fixes
myisammrg/myrg_range.c:
  New records_in_range() interface
mysys/my_bitmap.c:
  Make some bitmap functions inline for faster usage in one thread
sql/examples/ha_example.cc:
  New records_in_range() interface
sql/field.cc:
  Fixed indentation
sql/ha_berkeley.cc:
  New records_in_range() interface
sql/ha_berkeley.h:
  New records_in_range() interface
sql/ha_heap.cc:
  New records_in_range() interface
sql/ha_heap.h:
  New records_in_range() interface
sql/ha_innodb.cc:
  New records_in_range() interface
sql/ha_innodb.h:
  New records_in_range() interface
sql/ha_isam.cc:
  New records_in_range() interface
sql/ha_isam.h:
  New records_in_range() interface
sql/ha_myisam.cc:
  New records_in_range() interface
sql/ha_myisam.h:
  New records_in_range() interface
sql/ha_myisammrg.cc:
  New records_in_range() interface
sql/ha_myisammrg.h:
  New records_in_range() interface
sql/ha_ndbcluster.cc:
  New records_in_range() interface
sql/ha_ndbcluster.h:
  New records_in_range() interface
sql/handler.cc:
  Simplify read_range() interface:
  - Add 'eq_range' to read_range_first
  - Remove 'eq_range' parameer from read_range_next()
  - Trust values from index_next_same()
  - Simplfy compare_key() by moving key_comparision to key.cc (as this code can be reused from other places)
sql/handler.h:
  Move key_range to my_base.h to be used by external table handlers
  Simplify read_range() interface
  New records_in_range() interface
sql/key.cc:
  Rename key_cmp() to key_cmp_if_same() to make it more descriptive
  Add new key_cmp() function usable from range and handler code.
sql/mysql_priv.h:
  Prototypes for new functions
sql/opt_range.cc:
  New records_in_range() interface
  Simplify cmp_prev()
  (We can in 5.0 simplify cmp_next() the same way)
sql/opt_range.h:
  Added key_part_info to QUICK_SELECT to be able to use key_cmp() in get_next()
sql/opt_sum.cc:
  key_cmp -> key_cmp_if_same
sql/sql_acl.cc:
  key_cmp -> key_cmp_if_same
sql/sql_select.cc:
  key_cmp -> key_cmp_if_same
2004-05-16 14:48:32 +03:00
unknown
1662e59626 Added comments to all methods. Added explanation for a sequential read through a storage engine.
sql/examples/ha_example.cc:
  Documentation updates (lots of comments in the code).
sql/examples/ha_example.h:
  Documenation update, lots of comments in the code.
2004-05-11 15:59:20 -07:00
unknown
01bff53c4f All changes are to allow someone to compile the example storage engine and use it.
acconfig.h:
  Default undef for example storage engine.
acinclude.m4:
  Build macro additions for example engine.
configure.in:
  Configure changes for it to be listed in --help
sql/Makefile.am:
  Added in paths to build example.
sql/examples/ha_example.cc:
  Correction in indention and a few minor other corrections. It now lets you create/open/drop example engine.
sql/handler.cc:
  Added definition for the example storage engine. Added case for it to be created.
sql/handler.h:
  Added example storage engine type.
sql/mysql_priv.h:
  Added flag for optional build of example storage engine.
sql/mysqld.cc:
  Pieces to build example storage engine.
2004-04-12 21:01:45 -07:00
unknown
83c2292bb5 ha_example.h:
Fixed spelling of example share and fxed indention.
ha_example.cc:
  Fixed spelling of example and removed a few unneeded printf pieces.
my_base.h:
  Adde HA_ERR_NOT_IMPLEMENTED at Monty's request


include/my_base.h:
  Adde HA_ERR_NOT_IMPLEMENTED at Monty's request
sql/examples/ha_example.cc:
  Fixed spelling of example and removed a few unneeded printf pieces.
sql/examples/ha_example.h:
  Fixed spelling of example share and fxed indention.
2004-04-05 22:57:53 -07:00
unknown
bf3f491e6d First commit of the skeleton storage engine. Use this example as a template to build storage engines. Also includes a new degine for marking storage engine methods as not being implemented.
sql/examples/ha_example.h:
  First commit of example storage engine.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-04-01 01:02:42 -08:00