mariadb/mysql-test/r/ndb_autodiscover.result

398 lines
9.3 KiB
Text
Raw Normal View History

drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
flush status;
create table t1(
id int not null primary key,
name char(20)
) engine=ndb;
insert into t1 values(1, "Autodiscover");
flush tables;
select * from t1;
id name
1 Autodiscover
show status like 'handler_discover%';
Variable_name Value
Handler_discover 1
flush tables;
insert into t1 values (2, "Auto 2");
show status like 'handler_discover%';
Variable_name Value
Handler_discover 2
insert into t1 values (3, "Discover 3");
show status like 'handler_discover%';
Variable_name Value
Handler_discover 2
flush tables;
select * from t1 order by id;
id name
1 Autodiscover
2 Auto 2
3 Discover 3
show status like 'handler_discover%';
Variable_name Value
Handler_discover 3
flush tables;
update t1 set name="Autodiscover" where id = 2;
show status like 'handler_discover%';
Variable_name Value
Handler_discover 4
2004-08-27 14:15:47 +02:00
select * from t1 order by id;
id name
1 Autodiscover
2004-08-27 14:15:47 +02:00
2 Autodiscover
3 Discover 3
show status like 'handler_discover%';
Variable_name Value
Handler_discover 4
flush tables;
delete from t1 where id = 3;
select * from t1 order by id;
id name
1 Autodiscover
2 Autodiscover
show status like 'handler_discover%';
Variable_name Value
Handler_discover 5
drop table t1;
flush status;
create table t2(
id int not null primary key,
name char(22)
) engine=ndb;
insert into t2 values (1, "Discoverer");
select * from t2;
id name
1 Discoverer
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
flush tables;
select * from t2;
id name
1 Discoverer
show status like 'handler_discover%';
Variable_name Value
Handler_discover 1
drop table t2;
flush status;
create table t3(
id int not null primary key,
name char(255)
) engine=ndb;
insert into t3 values (1, "Explorer");
select * from t3;
id name
1 Explorer
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
flush tables;
create table t3(
id int not null primary key,
name char(20), a int, b float, c char(24)
) engine=ndb;
ERROR 42S01: Table 't3' already exists
show status like 'handler_discover%';
Variable_name Value
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
Handler_discover 0
create table IF NOT EXISTS t3(
id int not null primary key,
id2 int not null,
name char(20)
) engine=ndb;
Warnings:
Note 1050 Table 't3' already exists
show status like 'handler_discover%';
Variable_name Value
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
Handler_discover 0
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
2004-11-04 10:15:37 +01:00
`id` int(11) NOT NULL,
`name` char(255) default NULL,
PRIMARY KEY (`id`)
WL #2604: Partition Management Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
2006-01-17 08:40:00 +01:00
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY ()
select * from t3;
id name
1 Explorer
show status like 'handler_discover%';
Variable_name Value
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
Handler_discover 1
drop table t3;
flush status;
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
create table t7(
id int not null primary key,
name char(255)
) engine=ndb;
create table t6(
id int not null primary key,
name char(255)
) engine=MyISAM;
insert into t7 values (1, "Explorer");
insert into t6 values (2, "MyISAM table");
select * from t7;
id name
1 Explorer
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
flush tables;
show tables from test;
Tables_in_test
t6
t7
show status like 'handler_discover%';
Variable_name Value
Handler_discover 1
flush tables;
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Import ndb varsize BitKeeper/deleted/.del-MetaData.cpp~146ae9865dd35829: Delete: storage/ndb/src/kernel/vm/MetaData.cpp BitKeeper/deleted/.del-MetaData.hpp~538342afcd8ac53c: Delete: storage/ndb/src/kernel/vm/MetaData.hpp BitKeeper/deleted/.del-DbtupLCP.cpp~855b1ed3fbc86a42: Delete: storage/ndb/src/kernel/blocks/dbtup/DbtupLCP.cpp BitKeeper/deleted/.del-DbtupSystemRestart.cpp~15b54d7e4e75d2d: Delete: storage/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp BitKeeper/deleted/.del-DbtupUndoLog.cpp~5a2ef6e86b1404e9: Delete: storage/ndb/src/kernel/blocks/dbtup/DbtupUndoLog.cpp storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp'' storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp'' storage/ndb/include/kernel/signaldata/CreateObj.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/CreateObj.hpp'' storage/ndb/include/kernel/signaldata/DictObjOp.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/DictObjOp.hpp'' storage/ndb/include/kernel/signaldata/DropFilegroup.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/DropFilegroup.hpp'' storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp'' storage/ndb/include/kernel/signaldata/DropObj.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/DropObj.hpp'' storage/ndb/include/kernel/signaldata/Extent.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/Extent.hpp'' storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp'' storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp'' storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp'' storage/ndb/include/kernel/signaldata/RestoreImpl.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/RestoreImpl.hpp'' storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp: New BitKeeper file ``storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp'' storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp'' storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp'' storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp'' storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp'' storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp'' storage/ndb/src/kernel/blocks/dbtup/test_varpage.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/test_varpage.cpp'' storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp'' storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp'' storage/ndb/src/kernel/blocks/diskpage.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/diskpage.cpp'' storage/ndb/src/kernel/blocks/diskpage.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/diskpage.hpp'' storage/ndb/src/kernel/blocks/lgman.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/lgman.cpp'' storage/ndb/src/kernel/blocks/lgman.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/lgman.hpp'' storage/ndb/src/kernel/blocks/pgman.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/pgman.cpp'' storage/ndb/src/kernel/blocks/pgman.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/pgman.hpp'' storage/ndb/src/kernel/blocks/print_file.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/print_file.cpp'' storage/ndb/src/kernel/blocks/restore.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/restore.cpp'' storage/ndb/src/kernel/blocks/restore.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/restore.hpp'' storage/ndb/src/kernel/blocks/tsman.cpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/tsman.cpp'' storage/ndb/src/kernel/blocks/tsman.hpp: New BitKeeper file ``storage/ndb/src/kernel/blocks/tsman.hpp'' storage/ndb/src/kernel/vm/DLCFifoList.hpp: New BitKeeper file ``storage/ndb/src/kernel/vm/DLCFifoList.hpp'' storage/ndb/src/kernel/vm/DLCHashTable.hpp: New BitKeeper file ``storage/ndb/src/kernel/vm/DLCHashTable.hpp'' storage/ndb/src/kernel/vm/KeyTable2Ref.hpp: New BitKeeper file ``storage/ndb/src/kernel/vm/KeyTable2Ref.hpp'' storage/ndb/src/kernel/vm/Rope.cpp: New BitKeeper file ``storage/ndb/src/kernel/vm/Rope.cpp'' storage/ndb/src/kernel/vm/Rope.hpp: New BitKeeper file ``storage/ndb/src/kernel/vm/Rope.hpp''
2005-11-07 12:19:28 +01:00
t6 MyISAM 10 Fixed 1 # # # # 0 NULL # # NULL # NULL #
t7 NDBCLUSTER 10 Fixed 1 # # # # 0 NULL # # NULL # NULL #
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
show status like 'handler_discover%';
Variable_name Value
Handler_discover 2
drop table t6, t7;
flush status;
create table t4(
id int not null primary key,
name char(27)
) engine=ndb;
insert into t4 values (1, "Automatic");
select * from t4;
id name
1 Automatic
select * from t4;
ERROR 42S02: Table 'test.t4' doesn't exist
select * from t4;
ERROR 42S02: Table 'test.t4' doesn't exist
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
drop table t4;
ERROR 42S02: Unknown table 't4'
create table t4(
id int not null primary key,
name char(27)
) engine=ndb;
insert into t4 values (1, "Automatic");
select * from t4;
id name
1 Automatic
select * from t4;
ERROR 42S02: Table 'test.t4' doesn't exist
drop table if exists t4;
Warnings:
Error 155 Table 'test.t4' doesn't exist
drop table t5;
ERROR 42S02: Unknown table 't5'
drop table if exists t5;
Warnings:
Note 1051 Unknown table 't5'
flush status;
create table t4(
id int not null primary key,
id2 int,
name char(27)
) engine=ndb;
insert into t4 values (1, 76, "Automatic2");
select * from t4;
id id2 name
1 76 Automatic2
flush tables;
SHOW TABLES;
Tables_in_test
select * from t4;
ERROR 42S02: Table 'test.t4' doesn't exist
flush status;
create table t1(id int) engine=ndbcluster;
create table t2(id int, b char(255)) engine=myisam;
create table t3(id int, c char(255)) engine=ndbcluster;
create table t4(id int) engine=myisam;
create table t5(id int, d char(56)) engine=ndbcluster;
create table t6(id int) engine=ndbcluster;
create table t7(id int) engine=ndbcluster;
create table t8(id int, e char(34)) engine=myisam;
create table t9(id int) engine=myisam;
insert into t2 values (2, "myisam table 2");
insert into t3 values (3, "ndb table 3");
insert into t5 values (5, "ndb table 5");
insert into t6 values (6);
insert into t8 values (8, "myisam table 8");
insert into t9 values (9);
SHOW TABLES;
Tables_in_test
t1
t2
t4
t8
t9
t7
t6
select * from t6;
id
6
select * from t7;
id
show status like 'handler_discover%';
Variable_name Value
Handler_discover 2
drop table t1, t2, t4, t6, t7, t8, t9;
flush status;
create table t1(id int) engine=ndbcluster;
create table t2(id int, b char(255)) engine=myisam;
create table t3(id int, c char(255)) engine=ndbcluster;
create table t4(id int) engine=myisam;
create table t5(id int, d char(56)) engine=ndbcluster;
create table t6(id int) engine=ndbcluster;
create table t7(id int) engine=ndbcluster;
create table t8(id int, e char(34)) engine=myisam;
create table t9(id int) engine=myisam;
insert into t2 values (2, "myisam table 2");
insert into t3 values (3, "ndb table 3");
insert into t5 values (5, "ndb table 5");
insert into t6 values (6);
insert into t8 values (8, "myisam table 8");
insert into t9 values (9);
SHOW TABLES LIKE 't6';
Tables_in_test (t6)
t6
show status like 'handler_discover%';
Variable_name Value
Handler_discover 1
create table t3(a int);
ERROR 42S01: Table 't3' already exists
create table t5(a int);
ERROR 42S01: Table 't5' already exists
SHOW TABLES LIKE 't%';
Tables_in_test (t%)
t1
t2
t4
t6
t8
t9
t7
show status like 'handler_discover%';
Variable_name Value
Handler_discover 2
drop table t1, t2, t4, t6, t7, t8, t9;
flush status;
create table t1(id int) engine=ndbcluster;
create table t2(id int, b char(255)) engine=ndbcluster;
create table t3(id int, c char(255)) engine=ndbcluster;
create table t4(id int) engine=myisam;
insert into t1 values (1);
insert into t2 values (2, "table 2");
insert into t3 values (3, "ndb table 3");
insert into t4 values (4);
flush tables;
select * from t1, t2, t3, t4;
id id b id c id
1 2 table 2 3 ndb table 3 4
show status like 'handler_discover%';
Variable_name Value
Handler_discover 3
drop table t1, t2, t3, t4;
flush status;
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
create table t5(
id int not null primary key,
name char(200)
) engine=ndb;
insert into t5 values (1, "Magnus");
select * from t5;
id name
1 Magnus
ALTER TABLE t5 ADD COLUMN adress char(255) FIRST;
select * from t5;
adress id name
NULL 1 Magnus
insert into t5 values
("Adress for record 2", 2, "Carl-Gustav"),
("Adress for record 3", 3, "Karl-Emil");
update t5 set name="Bertil" where id = 2;
select * from t5 order by id;
adress id name
NULL 1 Magnus
Adress for record 2 2 Bertil
Adress for record 3 3 Karl-Emil
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
drop table t5;
flush status;
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
create table t6(
id int not null primary key,
name char(20)
) engine=ndb;
insert into t6 values (1, "Magnus");
select * from t6;
id name
1 Magnus
ALTER TABLE t6 ADD COLUMN adress char(255) FIRST;
select * from t6;
adress id name
NULL 1 Magnus
insert into t6 values
("Adress for record 2", 2, "Carl-Gustav"),
("Adress for record 3", 3, "Karl-Emil");
update t6 set name="Bertil" where id = 2;
select * from t6 order by id;
adress id name
NULL 1 Magnus
Adress for record 2 2 Bertil
Adress for record 3 3 Karl-Emil
show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
drop table t6;
show tables;
Tables_in_test
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 10:31:45 +02:00
create table t1 (a int,b longblob) engine=ndb;
show tables;
Tables_in_test
t1
create database test2;
use test2;
show tables;
Tables_in_test2
select * from t1;
ERROR 42S02: Table 'test2.t1' doesn't exist
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 10:31:45 +02:00
create table t2 (b int,c longblob) engine=ndb;
use test;
select * from t1;
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 10:31:45 +02:00
a b
show tables;
Tables_in_test
t1
drop table t1;
use test2;
drop table t2;
drop database test2;
2005-07-12 11:49:57 +02:00
use test;
drop database if exists test_only_ndb_tables;
create database test_only_ndb_tables;
use test_only_ndb_tables;
create table t1 (a int primary key) engine=ndb;
select * from t1;
a
select * from t1;
ERROR HY000: Can't lock file (errno: 4009)
use test;
drop database test_only_ndb_tables;
CREATE TABLE t9 (
a int NOT NULL PRIMARY KEY,
b int
) engine=ndb;
insert t9 values(1, 2), (2,3), (3, 4), (4, 5);
create table t10 (
a int not null primary key,
b blob
) engine=ndb;
insert into t10 values (1, 'kalle');