mariadb/innobase/dict/ts/tsdict.c
unknown 2662b59306 Added Innobase to source distribution
Docs/manual.texi:
  Added Innobase documentation
configure.in:
  Incremented version
include/my_base.h:
  Added option for Innobase
myisam/mi_check.c:
  cleanup
mysql-test/t/bdb.test:
  cleanup
mysql-test/t/innobase.test:
  Extended with new tests from bdb.test
mysql-test/t/merge.test:
  Added test of SHOW create
mysys/my_init.c:
  Fix for UNIXWARE 7
scripts/mysql_install_db.sh:
  Always write how to start mysqld
scripts/safe_mysqld.sh:
  Fixed type
sql/ha_innobase.cc:
  Update to new version
sql/ha_innobase.h:
  Update to new version
sql/handler.h:
  Added 'update_table_comment()' and 'append_create_info()'
sql/sql_delete.cc:
  Fixes for Innobase
sql/sql_select.cc:
  Fixes for Innobase
sql/sql_show.cc:
  Append create information (for MERGE tables)
sql/sql_update.cc:
  Fixes for Innobase
2001-02-17 14:19:19 +02:00

73 lines
1.5 KiB
C

/************************************************************************
The test module for the data dictionary
(c) 1996 Innobase Oy
Created 1/13/1996 Heikki Tuuri
*************************************************************************/
#include "sync0sync.h"
#include "mem0mem.h"
#include "buf0buf.h"
#include "data0type.h"
#include "..\dict0dict.h"
/************************************************************************
Basic test of data dictionary. */
void
test1(void)
/*=======*/
{
dict_table_t* table;
dict_index_t* index;
table = dict_table_create("TS_TABLE1", 3);
dict_table_add_col(table, "COL1", DATA_INT, 3, 4, 5);
dict_table_add_col(table, "COL2", DATA_INT, 3, 4, 5);
dict_table_add_col(table, "COL3", DATA_INT, 3, 4, 5);
ut_a(0 == dict_table_publish(table));
index = dict_index_create("TS_TABLE1", "IND1",
DICT_UNIQUE | DICT_CLUSTERED | DICT_MIX, 2, 1);
dict_index_add_field(index, "COL2", DICT_DESCEND);
dict_index_add_field(index, "COL1", 0);
ut_a(0 == dict_index_publish(index));
dict_table_print(table);
dict_table_free(table);
ut_a(dict_all_freed());
dict_free_all();
ut_a(dict_all_freed());
}
/************************************************************************
Main test function. */
void
main(void)
/*======*/
{
ulint tm, oldtm;
oldtm = ut_clock();
sync_init();
mem_init();
buf_pool_init(100, 100);
dict_init();
test1();
tm = ut_clock();
printf("Wall clock time for test %lu milliseconds\n", tm - oldtm);
printf("TESTS COMPLETED SUCCESSFULLY!\n");
}