Commit graph

14 commits

Author SHA1 Message Date
unknown
38b2cd733b Update test result
mysql-test/r/ndb_autodiscover.result:
  Update results
2005-09-12 12:45:03 -07:00
unknown
63d25bbd98 Disabled internal ndb system table test, since it only works on case sensitive systems 2005-07-12 10:39:58 +02:00
unknown
09944efd71 BUG#10365 Cluster handler uses non-standard error codes
- Added better error messages when trying to open a table that can't be discovered or unpacked. The most likely cause of this is that it does not have any frm data, probably since it has been created from NdbApi or is a NDB system table.
 - Separated functionality that was in ha_create_table_from_engine into two functions. One that checks if the table exists and another one that tries to create the table from the engine.


mysql-test/r/ndb_autodiscover.result:
  Add tests for reading from a table that can't be discovered(SYSTAB_0)
  Discovery is not performed during create table anymore.
mysql-test/t/ndb_autodiscover.test:
  Add tests for reading from a table that can't be discovered(SYSTAB_0)
  Discovery is not performed during create table anymore.
ndb/test/ndbapi/create_tab.cpp:
  Set connectstring before creating Ndb object.
sql/ha_ndbcluster.cc:
  Rename and use the function ndbcluster_table_exists_in_engine.
  Correct return valu from ndbcluster_discover
  Remove old code "ndb_discover_tables"
sql/ha_ndbcluster.h:
  Rename function ndbcluster_table_exists to ndb ndbcluster_table_exists_in_engine
sql/handler.cc:
  Update comment of ha_create_table_from_engine
  Remove parameter create_if_found from ha_create_table_from_engine, the function ha_table_exists_in_engine is now used toi check if table is found in engine.
  Cleanup return codes from ha_create_table_from_engine.
  Change name of ha_table_exists to ha_table_exists_in_engine, update comment and returne codes.
sql/handler.h:
  Remove paramter create_if_cound from  ha_create_table_from_engine
  Rename ha_table_exists to ha_table_exists_in_engine
sql/sql_base.cc:
  Use the function ha_table_exists_in_engine to detect if table exists in enegine. 
  If it exists, call function ha_create_table_from_engine to try and create it.
  If create of table fails, set correct error message.
sql/sql_table.cc:
  Add comments, remove parameter create_if_found to ha_create_table_from_engine.
  When dropping a table, try to discover it from engine. If discover fails, use same error message as if the table didn't exists. 
  Maybe another message should be displayed here, ex: "Table could not be dropped, unpack failed"
  
  When creating a new table, use ha_table_exists_in_engine to check if a table with the given name already exists.
2005-06-08 13:31:59 +02:00
unknown
3b38a854e0 ndb: bug#6451
1) fix so that missing blob tables don't prevent table from being
    dropped
2) decrease size of blob part if record length exceeds max length
3) add test case for table wo/ corresponding blob table
4) init scan counters when sending scan_tabreq


mysql-test/r/ndb_autodiscover.result:
  testcase for table wo/ corresponding blob tables
mysql-test/r/ndb_autodiscover2.result:
  testcase for table wo/ corresponding blob tables
mysql-test/t/ndb_autodiscover.test:
  testcase for table wo/ corresponding blob tables
mysql-test/t/ndb_autodiscover2.test:
  testcase for table wo/ corresponding blob tables
ndb/include/ndbapi/NdbDictionary.hpp:
  Add non-const get column
ndb/src/ndbapi/NdbDictionary.cpp:
  Add non-const get column
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Allow "partially" getTable, which enables dropping of tables
     that fails to create blob tables
ndb/src/ndbapi/NdbScanOperation.cpp:
  Init counter when sending SCAN_TABREQ
sql/ha_ndbcluster.cc:
  Make sure that blob don't have to big part size
2004-11-08 11:06:36 +01:00
unknown
ed5b9e9a3f Fixes bug with tableImpl with blobs not being initialized properly w.r.t pointer to blob tableImpl in column
added blob to test to see that blob tables don't show up in show tables
    auto increment setting need not fetch blob tables (will otherwise generate error during table creation)
    moved addBlobTables out of fetchGlobalTableImpl to get_local_table_info
    changed addBlobTables to start from last column and break if all blobs added
    also addBlobTables will return -1 if failed (typically getTable)
    changed to using get_local_table_info with internal table name where applicable for efficiency
    added option to get_local_table_info wether to fetch blob tables or not
    getTable always fetches the blobtables
    moved addBlobTables to get_local_table_info to always be called, even if main table goes to cache only


mysql-test/r/ndb_autodiscover.result:
  added blob to test to see that blob tables don't show up in show tables
mysql-test/t/ndb_autodiscover.test:
  added blob to test to see that blob tables don't show up in show tables
ndb/src/ndbapi/Ndb.cpp:
  auto increment setting need not fetch blob tables (will otherwise generate error during table creation)
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  moved addBlobTables out of fetchGlobalTableImpl to get_local_table_info
  changed addBlobTables to start from last column and break if all blobs added
  also addBlobTables will return -1 if failed (typically getTable)
  changed to using get_local_table_info with internal table name where applicable for efficiency
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  added option to get_local_table_info wether to fetch blob tables or not
  getTable always fetches the blobtables
  moved addBlobTables to get_local_table_info to always be called, even if main table goes to cache only
2004-10-10 08:31:45 +00:00
unknown
3d963659e4 BUG#5973 ndb table belonging to different database shows up in SHOW TABLES
mysql-test/r/ndb_autodiscover.result:
  Added test cases to check that SHOW TABLES  only show tables in the selected  db.
mysql-test/t/ndb_autodiscover.test:
  Added test cases to check that SHOW TABLES  only show tables in the selected  db.
sql/ha_ndbcluster.cc:
  Only find files for the current db
  Only add files to files list which can be created i.e has a valid frm blob. This prevents NDB$BLOB tables and tables created from NdbApi to show up.
2004-10-08 13:37:13 +02:00
unknown
b7c3591b32 WL#1424 Added more advanced test cases for autodiscovery
mysql-test/mysql-test-run.sh:
  Create and export an NDB_CONNECSTRING that can be used for NDB_TOOLS to connect to NDB
mysql-test/r/ndb_autodiscover.result:
  Added more advanced test cases for ndb_autodiscover
mysql-test/t/ndb_autodiscover.test:
  Added more advanced test cases for ndb_autodiscover
2004-09-30 14:20:14 +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
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
c0c6513864 Fix order by 2004-08-27 14:15:47 +02:00
unknown
5eea01a764 Small fix, addin order by to get predicatble output from select
mysql-test/r/ndb_autodiscover.result:
  Added yet another order by to test.
mysql-test/t/ndb_autodiscover.test:
  Added yet another order by to test.
2004-05-26 14:34:40 +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
2ddc188826 Added test(s) for auto discover of frm file 2004-05-17 09:53:13 +02:00