Commit graph

384 commits

Author SHA1 Message Date
unknown
235c5035b5 Fix for INSERT with multiple values and start/end_bulk_insert
mysql-test/r/ndb_insert.result:
  Add tests for duplicate keys in combination with start/end_bulk_insert
mysql-test/t/ndb_insert.test:
  Add tests for duplicate keys in combination with start/end_bulk_insert
sql/ha_ndbcluster.cc:
  Set my_errno if error occurs in end_bulk_insert
2004-09-07 12:45:19 +02:00
unknown
af46c9c3b6 Only include debug print routines in debug mode 2004-09-07 12:23:06 +02:00
unknown
d90b95ed31 fixed so that ndbcluster and mysqld can be started independently
fixed some error codes in Ndb so that 4009-cluster failure is returned when cluster is not up
2004-09-06 18:30:57 +00:00
unknown
c7e942a8ff added ndb_mgm_destroy_configuration call
fixed memory leak in object map
fixed uninitialized value blobs_pending


ndb/include/mgmapi/mgmapi.h:
  added ndb_mgm_destroy_configuration call
ndb/src/mgmapi/mgmapi.cpp:
  added ndb_mgm_destroy_configuration call
ndb/src/ndbapi/ObjectMap.hpp:
  fixed memory leak
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  added ndb_mgm_destroy_configuration call
sql/ha_ndbcluster.cc:
  fixed uninitialized value blobs_pending
2004-09-06 10:46:23 +00:00
unknown
ac8f443a6c Added debug printout's to ha_ndbcluster
sql/ha_ndbcluster.cc:
  Added debug function for printing key_range.
  Corrected number of arguments to DBUG_PRINT, too many %s
2004-09-06 10:33:12 +02:00
unknown
9fd78ea3d3 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into poseidon.(none):/home/tomas/mysql-4.1-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2004-09-03 15:12:34 +00: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
92f58a4b76 Remove usage of row count (as it trashes _all_ explain & table status)
Use order by


mysql-test/r/ndb_index_ordered.result:
  Use order by
mysql-test/t/ndb_index_ordered.test:
  Use order by
sql/ha_ndbcluster.cc:
  Remove usage of row count (as it trashes _all_ explain & table status)
2004-09-03 14:46:39 +02:00
unknown
f54c4a9460 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/home/jonas/src/mysql-4.1-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2004-09-03 13:56:11 +02:00
unknown
6302d0d0e1 Added support for HA_READ_ORDER +
Added table statistics
2004-09-03 13:55:40 +02:00
unknown
0d3ade0bb5 fixed wrong initial auto increment value bug#5369
ndb/tools/waiter.cpp:
  added option to set timeout to ndb_waiter
2004-09-02 15:51:44 +00:00
unknown
8628937ec2 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/space/pekka/ndb/version/my41-blobs


sql/ha_ndbcluster.cc:
  Auto merged
2004-09-02 14:11:47 +02:00
unknown
b186ef5a62 ha_ndbcluster.cc, ndb_blob.test, ndb_blob.result:
bug-5013 fix


mysql-test/r/ndb_blob.result:
  bug-5013 fix
mysql-test/t/ndb_blob.test:
  bug-5013 fix
sql/ha_ndbcluster.cc:
  bug-5013 fix
2004-09-02 12:42:03 +02:00
unknown
069c47d260 Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-ndb


acinclude.m4:
  Auto merged
configure.in:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-09-01 04:55:16 +02:00
unknown
851e3cabb0 Fix for bug#5312 Ndb Cluster returns wrong error code for duplicate key at insert 2004-08-31 12:07:48 +02:00
unknown
c52a30b5df Enabled HA_NULL_IN_KEY support 2004-08-31 10:19:10 +02:00
unknown
89dd83db35 ndb table locks
Removed errornous hupp, which made handler commit same transid several times
(which is checked when running in debug mode)


sql/ha_ndbcluster.cc:
  Removed errornous hupp, which made handler commit same transid several times
  (which is checked when running in debug mode)
2004-08-30 12:13:10 +02:00
unknown
340d40a77c Cleaned up rnd_init 2004-08-24 23:13:32 +02:00
unknown
20f24a422b Portablity fixes & simple optimizations
sql/ha_ndbcluster.cc:
  Added missing cast
sql/item.cc:
  Portability fix (for windows)
sql/lock.cc:
  Cleanup + more comments
sql/sql_class.cc:
  Portability fix + more comments
sql/sql_select.cc:
  Portability fix
sql/sql_table.cc:
  Simpler handling of auto_increment in ALTER TABLE
2004-08-24 18:00:45 +03:00
unknown
355004e0d6 stylistic fixes 2004-08-23 08:42:31 +00:00
unknown
c6150949bf added switch to mysqld to specify connectstring 2004-08-20 16:10:47 +00:00
unknown
8a5bb1a06c Minor typo 2004-08-19 11:51:06 +02:00
unknown
939db862a6 Cleaned up build of index list 2004-08-19 11:10:35 +02:00
unknown
32efeee47b Minor cosmetic fix 2004-08-19 07:33:35 +02:00
unknown
86fdb8b977 Fix for WL#1731 Handler: multiple databases 2004-08-18 19:13:39 +02:00
unknown
55cc6be43c Added support for NULL in unique index 2004-08-13 13:51:18 +02:00
unknown
732ccc5ccc Fix for bug#4730 2004-08-11 15:06:17 +02:00
unknown
89017ca5b0 Bug fix for bug#3912 2004-08-10 14:38:24 +02:00
unknown
04cc2cc4d1 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1-ndb


mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/r/ndb_basic.result:
  Auto merged
mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  Auto merged
mysql-test/t/ndb_basic.test:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
ndb/src/ndbapi/Ndb.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-08-10 11:48:43 +02:00
unknown
e223c07eb1 Merge joreland@bk-internal.mysql.com:irix
into eel.hemma.oreland.se:/ndb/clone-mysql-4.1-ndb-daily-2004-08-04


BitKeeper/etc/logging_ok:
  auto-union
ndb/src/common/debugger/signaldata/SignalDataPrint.cpp:
  Auto merged
ndb/src/cw/cpcd/Process.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Auto merged
ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/test/ndbapi/testBasic.cpp:
  Auto merged
ndb/test/run-test/main.cpp:
  Auto merged
ndb/test/src/HugoTransactions.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-08-05 22:19:52 +02:00
unknown
92498f81db BUG#4818 DELETE FROM tab LIMIT
Check if there are any operations pending that needs to be taken over to the updating/deleting transaction before closing the scan 


sql/ha_ndbcluster.cc:
  Check ops_pending if there are operations to take over before closing the scan
2004-08-04 10:54:42 +02:00
unknown
ac8b4881c1 Merge 4.1 with jonas irix clone
BitKeeper/etc/logging_ok:
  auto-union
ndb/include/kernel/NodeState.hpp:
  Auto merged
ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
ndb/include/util/Bitmask.hpp:
  Auto merged
ndb/src/common/debugger/EventLogger.cpp:
  Auto merged
ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
ndb/src/common/util/SocketServer.cpp:
  Auto merged
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
ndb/src/kernel/main.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
ndb/src/kernel/error/ErrorReporter.hpp:
  Auto merged
ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
ndb/src/mgmclient/CpcClient.cpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
ndb/src/ndbapi/Ndb.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Auto merged
ndb/src/ndbapi/Ndbinit.cpp:
  Auto merged
ndb/test/include/NDBT_Table.hpp:
  Auto merged
ndb/test/include/NDBT_Test.hpp:
  Auto merged
ndb/test/run-test/main.cpp:
  Auto merged
ndb/test/src/HugoOperations.cpp:
  Auto merged
ndb/test/src/HugoTransactions.cpp:
  Auto merged
ndb/test/src/NDBT_Tables.cpp:
  Auto merged
ndb/test/src/NDBT_Test.cpp:
  Auto merged
ndb/test/src/NdbRestarter.cpp:
  Auto merged
ndb/tools/waiter.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-08-03 14:16:16 +02:00
unknown
4e2137fabf Fix duplicate declaration in NDB cluster handler
sql/ha_ndbcluster.cc:
  Fix duplicate declaration
2004-08-03 13:54:55 +02:00
unknown
66e46aeb56 Fix for bug#3912 Auto increment not correctly initialised when table is altered, completes WL#1911 Extended AUTO_INCREMENT support in NDB 2004-07-29 11:35:38 +02:00
unknown
9778a2c98d ha_ndbcluster.h, ha_ndbcluster.cc:
compile fix for gcc-2.95


sql/ha_ndbcluster.cc:
  compile fix for gcc-2.95
sql/ha_ndbcluster.h:
  compile fix for gcc-2.95
2004-07-29 10:44:53 +02:00
unknown
410c7b3323 Fixed merge problems, optimized bulk insert 2004-07-23 15:46:56 +02:00
unknown
9628ff1a8e ha_ndbcluster.cc:
merge


sql/ha_ndbcluster.cc:
  merge
2004-07-23 13:41:38 +02:00
unknown
d5ff3eca53 Merge
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster.cc:
  merge
2004-07-23 13:27:26 +02:00
unknown
a3b71309d7 ha_ndbcluster.cc:
ndb_supported_type, include all types in switch


sql/ha_ndbcluster.cc:
  ndb_supported_type, include all types in switch
2004-07-23 13:21:39 +02:00
unknown
206cc88b69 Changed bulk insert to only be statement wise 2004-07-23 13:13:50 +02:00
unknown
564b2736a4 Fixes after code review of WL#1791 Handler: support update of primary key 2004-07-23 10:33:51 +02:00
unknown
25a54005ae Cosmetic fix 2004-07-22 19:14:05 +02:00
unknown
cf4cfab216 WL#1791 Handler: support update of primary key 2004-07-22 18:35:51 +02:00
unknown
d1e7ef7927 ha_ndb blobs 2 2004-07-22 12:38:09 +02:00
unknown
2d74872cf8 Fix for bug#4669, Scans do not ignore uncommitted inserts (instead hang on lock) 2004-07-21 11:46:14 +02:00
unknown
e5c416e4f1 Fix for bug#4595 2004-07-19 17:28:07 +02:00
unknown
d590b04708 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1-ndb


mysql-test/mysql-test-run.sh:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2004-07-19 09:09:40 +02:00
unknown
1cbbbcf70e Fixed bug #4106 and removed buggy pk update 2004-07-09 13:18:56 +02: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
913424a8ec merge
ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
2004-07-06 08:56:05 +02:00
unknown
3e73b86d7f missing ; 2004-07-06 08:43:57 +02:00
unknown
3f3ea3037a Fixed bugs in ordered scan discovered by mysql-test-run
Enabled ordered scan in handler



ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  Moved saveBound to NdbIndexScanOperation
ndb/include/ndbapi/NdbScanOperation.hpp:
  Moved saveBound to NdbIndexScanOperation
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Introduced map for
  index attributes (keys) -> real attr id (and back)
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Introduced map for
  index attributes (keys) -> real attr id (and back)
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Moved saveBound to NdbIndexScanOperation
ndb/src/ndbapi/NdbOperationInt.cpp:
  Moved saveBound to NdbIndexScanOperation
ndb/src/ndbapi/NdbScanOperation.cpp:
  Moved saveBound to NdbIndexScanOperation
  Fixed bugs in handling of setBounds w.r.t getValues and index keys
    (use new reverse map)
  Fixed bugs in next_result_ordered
sql/ha_ndbcluster.cc:
  Use sorted scan when requested
2004-07-05 20:41:06 +02:00
unknown
ef389ca0b2 Fixed ndbcluster_print_error to use table name from failed NdbOperation 2004-07-02 16:14:08 +02:00
unknown
8ad0e2a2b5 Added support for update of pk 2004-07-02 11:50:28 +02:00
unknown
0112bd5e30 Merged
sql/ha_ndbcluster.h:
  Auto merged
2004-06-27 16:56:52 +02:00
unknown
3d5c2d1d31 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1-ndb


ndb/src/ndbapi/Ndb.cpp:
  Auto merged
ndb/src/ndbapi/Ndbinit.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2004-06-27 16:00:48 +02:00
unknown
4c450c5235 Cosmetic fixes 2004-06-24 14:49:34 +02:00
unknown
1045f2c3fd Modified index flags and added ndbcluster_print_error 2004-06-24 12:04:22 +02:00
unknown
82f8a71df4 Modified ndbcluster_print_error to stack allocate table and handler, NOT for review, will make patch instead 2004-06-23 15:34:45 +02:00
unknown
c5e9441294 Added static print error function to be used by handler in ndbcluster_commit and ndbcluster_rollback 2004-06-22 14:24:51 +02:00
unknown
c87ccc6fd1 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2004-06-22 09:59:15 +02:00
unknown
ab773d3582 Added static print error function to be used by handler in ndbcluster_commit and ndbcluster_rollback 2004-06-22 09:54:00 +02:00
unknown
3e9f47d6b0 Fix handler w.r.t scan
ndb/include/ndbapi/NdbApi.hpp:
  Removed SchemaOp, SchemaCon
ndb/src/ndbapi/NdbRecAttr.cpp:
  merge error
ndb/tools/select_count.cpp:
  clean up
sql/ha_ndbcluster.cc:
  Fixed handler w.r.t scan
sql/ha_ndbcluster.h:
  Fixed handler w.r.t scan
2004-06-11 13:49:22 +02:00
unknown
30be36f002 Added missing ;
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-05-28 11:23:44 +02:00
unknown
537ba1e125 Fix after running on a 4-node system.
mysql-test/r/ndb_autodiscover.result:
  Removed one test that needs manual interaction
  Added order by in some places
mysql-test/t/ndb_autodiscover.test:
  Removed one test that needs manual interaction
  Added order by in some places
sql/ha_ndbcluster.cc:
  Using HA_WRONG_ASCII_ORDER to activate filesort on a not "sorted" ordered index.
2004-05-26 14:22:49 +02:00
unknown
5a99542962 Corrected index_flags returned when index are created with USING HASH
Updated ndb_ test cases 


mysql-test/r/ndb_autodiscover.result:
  Updated to new output of error message
mysql-test/r/ndb_basic.result:
  Added som order by to sort the result correctly before comparing
mysql-test/r/ndb_index_unique.result:
  Added test for USING HASH combined with PRIMARY KEY and UNIQUE index
mysql-test/t/ndb_autodiscover.test:
  Correctede error case
mysql-test/t/ndb_basic.test:
  Added som order by
mysql-test/t/ndb_index_unique.test:
  Added test for USING HASH combined with PRIMARY KEY and UNIQUE index
sql/ha_ndbcluster.cc:
  Added the index flag HA_ONLY_WHOLE_INDEX if index is created with USING HASH.
2004-05-25 14:40:51 +02:00
unknown
88a3b3bca8 Fixed prototype of get_error_message to use String to return error message
WL#1747 and #1746 allow user to decide if ordered index should be created or not


BitKeeper/deleted/.del-AttrType.hpp~a9b2d6efcf660378:
  Delete: ndb/include/ndbapi/AttrType.hpp
sql/ha_ndbcluster.cc:
  Removed the NDB_ERR_CODE_OFFSET, ndb and handler error codes should not clash
  Encapsulated functionality to cache information about known indexes into buil_index_list
  Added detection of algorithm from key_info in function get_index_type_from_table
  Updated read_range_first and records_in_range to work wih new prototype.
sql/ha_ndbcluster.h:
  WL#1746 and WL#1747 Added ability to skip creating an ordered index in addition to the hash index if the user so wishes.
  Modified get_error_message to return error messaga in a String datatype, in that way the String class will take care of wheter the "data" has to be freed or not.
sql/handler.cc:
  Use String datatype as ouput parameter of get_error_message.
sql/handler.h:
  Changed the function prototype for getting error messages from handler to use String datataype
2004-05-24 12:35:39 +02:00
unknown
4d3f8f210a Merge
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/ha_ndbcluster.h:
  SCCS merged
2004-05-17 09:57:02 +02:00
unknown
26d2c58c59 Fixes made after running with sql-bench
sql/ha_ndbcluster.cc:
  Added new function set_primary_key_from_old_data, used from update_row to specify the primary key of the record to update.
  Simplified index_read function, to use read_range_first
  Close the active cursor if read_range_first is called on an open cursor.
  In read_range_first, map error code from HA_ERR_KEY_NOT_FOUND to HA_ERR_END_OF_FILE.
  Remove call to function waitUntilReady from check_ndb_connection, this shuold remove the delay from transactions executed when node(s) are down.
sql/ha_ndbcluster.h:
  Added new function set_primary_key_from_old_data
2004-05-17 09:51:02 +02: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
d4399619bd WL #1729 Handler: error text for NDB errors
- New solution after discussions with Sergei, no handler specific code or error messages should be in sql layer.
next_result, only check for error if check is -1
Improved index_read 


include/mysqld_error.h:
  New error codes ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG, update number to 298.
  Removed prevoius ER_NDB_ERROR, handler specific error should not be here.
sql/ha_ndbcluster.cc:
  Removed print_error from ha_ndbcluster, added code to handler::print_error to ask  handler::get_error_message for message for an error.
  Fix bug in next_result, only check for error if -1 is returned.
  Make index_read easier, special case where pk_read or unique_index_read is detected and as default do ordered_index_scan
sql/ha_ndbcluster.h:
  Remplace print_error with get_error_message
sql/handler.cc:
  Add new function get_error_message usedc to ask handler for a message for an error.
  Call get_error_message from print_error if error code is not known.
sql/handler.h:
  Add new function get_error_message
sql/share/czech/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/danish/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/dutch/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/english/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/estonian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/french/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/german/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/greek/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/hungarian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/italian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/korean/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/norwegian-ny/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/norwegian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/polish/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/portuguese/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/romanian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/russian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/serbian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/slovak/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/spanish/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/swedish/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
sql/share/ukrainian/errmsg.txt:
  Error message for ER_GET_ERRMSG and ER_GET_TEMPORARY_ERRMSG
2004-05-13 11:56:45 +02:00
unknown
f84be2fd89 WL# 1729 Handler: error text for NDB errors
- Close an open scan if index_read is called without closing the previous one.
- Removed some errors that occured during previous merge


include/mysqld_error.h:
  Added two new error messages for NDB
sql/ha_ndbcluster.cc:
  Added more error code mappings, from NDB code to MySQL 
  Added function to print out the error message when an NDB error occurs.
  Added two new error codes, which will represent either a permanent or temporary NDB error.
  Modev get_ndb_lock_type from class to local function
  Removed some merge errors
  New function close_scan, to close an open scan.
sql/ha_ndbcluster.h:
  Added print_error function, overrides handler::print_error
  Added close_scan
  Moved get_ndb_lock_type from class to local function
sql/share/czech/errmsg.txt:
  Added two new error messages for NDB
sql/share/danish/errmsg.txt:
  Added two new error messages for NDB
sql/share/dutch/errmsg.txt:
  Added two new error messages for NDB
sql/share/english/errmsg.txt:
  Added two new error messages for NDB
sql/share/estonian/errmsg.txt:
  Added two new error messages for NDB
sql/share/french/errmsg.txt:
  Added two new error messages for NDB
sql/share/german/errmsg.txt:
  Added two new error messages for NDB
sql/share/greek/errmsg.txt:
  Added two new error messages for NDB
sql/share/hungarian/errmsg.txt:
  Added two new error messages for NDB
sql/share/italian/errmsg.txt:
  Added two new error messages for NDB
sql/share/japanese/errmsg.txt:
  Added two new error messages for NDB
sql/share/korean/errmsg.txt:
  Added two new error messages for NDB
sql/share/norwegian-ny/errmsg.txt:
  Added two new error messages for NDB
sql/share/norwegian/errmsg.txt:
  Added two new error messages for NDB
sql/share/polish/errmsg.txt:
  Added two new error messages for NDB
sql/share/portuguese/errmsg.txt:
  Added two new error messages for NDB
sql/share/romanian/errmsg.txt:
  Added two new error messages for NDB
sql/share/russian/errmsg.txt:
  Added two new error messages for NDB
sql/share/serbian/errmsg.txt:
  Added two new error messages for NDB
sql/share/slovak/errmsg.txt:
  Added two new error messages for NDB
sql/share/spanish/errmsg.txt:
  Added two new error messages for NDB
sql/share/swedish/errmsg.txt:
  Added two new error messages for NDB
sql/share/ukrainian/errmsg.txt:
  Added two new error messages for NDB
2004-05-11 13:59:22 +02:00
unknown
d6676b0f57 Merged ha_ndbcluster.cc
sql/ha_ndbcluster.h:
  Auto merged
2004-05-10 15:06:07 +02:00
unknown
075eb33889 Use correct access method, found using sql-bench and comparing with other handler.
BitKeeper/deleted/.del-regression.sh~c19f771726612629:
  Delete: ndb/bin/regression.sh
sql/ha_ndbcluster.cc:
  Change index flags, remove HA_WRONG_ASCII_ORDER and HA_ONLY_WHOLE_INDEX.
  HA_WRONG_ASCII_ORDER was used in field::optimize_range and if it was set, the index was hardly ever used.
  Correct check of start_key and start_key->flag != HA_READ_KEY_EXACT, ignore end-Key in suc a case
  Updated implementation o read_range_first
  Made the calculation of number of bytes par batch easier to underatsn and easier to configure. The value bytesperbatch can be made a config variable.
  AReduce the number of bytes sent per batch, don't overload.
  Increase the value returned from scan_time in order to make it clear to optimizer that scanning is the worst alternative. Always use index if available.
2004-05-10 14:46:06 +02:00
unknown
444fc1ce98 WL# 1728 Handler: use scanReadExclusive for scan update and delete
sql/ha_ndbcluster.cc:
  Modified next_result to process fetched records cached in NdbApi before asking NDB for more. 
  It should also NoCommit any pending operations before contacting NDB again.
  Added utility function define_read_attrs to set the fields that should be read.
sql/ha_ndbcluster.h:
  Add function define_read_attrs, used to set the fields to read
  Add get_nd_lock_type funciton ,to convert MySQL lock type to NDB lock type
  Always compile filtered scan function even if it's not used yet.
  Add variable ops_pending to keep track of "pending" update/delete operations.
2004-05-10 14:12:28 +02:00
unknown
9d99ebe394 BUG# 3658 ALTER TABLE corrupts table
Added  test file for ALTER TABLE, engine = ndbcluster


sql/ha_ndbcluster.cc:
  Add code to retriev all fields if HA_EXTRA_RETRIEVE_ALL_COLS are set.
sql/ha_ndbcluster.h:
  Add var for retreiving all fields
sql/sql_table.cc:
  Send HA_EXTRA_RETRIEVE_ALL_COLS to handler in copy_data_between_tables
2004-05-05 16:04:23 +02:00
unknown
316c128f9d Merge fixes
sql/ha_ndbcluster.cc:
  Updated use of extra ordered index after merge
  Removed TODO note in swedish
2004-05-05 08:54:12 +02:00
unknown
d540f0c011 Merge neptunus.(none):/home/magnus/mysql-4.1
into neptunus.(none):/home/magnus/mysql-4.1-insert


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2004-04-30 13:42:47 +02:00
unknown
ddbef950cb Merge neptunus.(none):/home/magnus/mysql-4.1
into neptunus.(none):/home/magnus/mysql-4.1-sql-bench


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2004-04-30 13:41:19 +02:00
unknown
08676716ff WL#1727 Implement read_range_first and read_range_next
sql/ha_ndbcluster.cc:
  Added new function set_bounds, used to set bounds in NDB from a key_range
  Updated ordered_index_scan to take start_key and end_key as parameters
  Override of functions read_range_first and read_range_next, to call appropriate access function in NDB
sql/ha_ndbcluster.h:
  Added functions set_bounds, read_range_first and read_range_next
  Changed declaration of ordered_index_scan
2004-04-30 13:38:41 +02:00
unknown
0f0635ec0f Add extra ordered index in when UNIQUE and PRIMARY KEY are specified.
Extra ordered indexes are created primarily 
to support partial key scan/read and range scans of hash indexes.
I.e. the ordered index are used instead of the hash indexes for 
these queries.


sql/ha_ndbcluster.cc:
  Add creation and use of extra ordered indexes on pk and unique indexes.
sql/ha_ndbcluster.h:
  Added new functions for creating extra ordered indexes
2004-04-30 12:25:31 +02:00
unknown
155f8b3d31 WL#1737 Removed superfluous "NoCommit" from insert
sql/ha_ndbcluster.cc:
  Added 3 new variables for keeping track of insert batching
sql/ha_ndbcluster.h:
  Send more inserts per roundtrip to NDB
  Regulate how many inserts are sent by calculating number of bytes in each row.
2004-04-29 14:38:35 +02:00
unknown
465bb046ff symlink, not hardlink
mkdir in Makefile, not in configure
chmod a-x


sql/ha_ndbcluster.cc:
  Change mode to -rw-rw-r--
sql/ha_ndbcluster.h:
  Change mode to -rw-rw-r--
BitKeeper/etc/ignore:
  added libmysqld/discover.cc
configure.in:
  symlink, not hardlink
  mkdir in Makefile, not in configure
include/Makefile.am:
  mkdir in Makefile, not in configure
mysql-test/std_data/init_file.dat:
  add EOL
  make a test faster
2004-04-21 14:55:39 -05:00
unknown
b43af929f8 Added NDB storage engine
include/my_base.h:
  Added three new errorcodes to be returned by the handler
sql/Makefile.am:
  Add new files discover.cc, ha_ndbcluster.cc and ha_ndbcluster.h
  Add include path of NDB files
sql/handler.cc:
  Added variable for keeping track of number of "discovers"
  Added NDB to list of storage engines
  Added calls to NDB for commit, rollback etc.
  Added function ha_discover for discovering a table from handler
sql/handler.h:
  Added NDB to list of storage engines
  Added vbariable in transaction for keeping a ndb transaction handle
sql/lex.h:
  Changed AND to AND_SYM and OR to OR_SYM to avoid nameclash
sql/mysql_priv.h:
  Added prototypes for new functions readfrm, writefrm and create_table_from_handler
sql/mysqld.cc:
  Added NDB support
  Disable NDB with --skip-ndbcluster
sql/set_var.cc:
  Add posibilty to show if NDB handler is supported
sql/ha_ndbcluster.cc:
  Add ifdef for whole file for not compiling anything if NDB sholdn't be included
  Updated timestamp handling to use new vars timestamp_default_now and timestamp_on_update_now
sql/sql_base.cc:
  If frm file is not found on disk, ask handler if it knows about the table. Then retry the open.
  This new functionality is called "discover" and can be used by any handler.
sql/sql_class.h:
  Added variable for keeping a NDB connection handle
sql/sql_table.cc:
  Before trying to create a table, ask handler if a table with that name already exists.
  If user said CREATE TABLE IF NOT EXISTS, disocver the table from handler
sql/sql_yacc.yy:
  Add NDBCLUSTER_SYM
  Change AND to AND_SYM
  Change OR to OR_SYM
sql/table.cc:
  Fixe for probelm when NullS is returned from bas_ext of a handler.
2004-04-15 09:14:14 +02:00