2001-02-17 14:19:19 +02:00
|
|
|
/******************************************************
|
|
|
|
Data dictionary system
|
|
|
|
|
|
|
|
(c) 1996 Innobase Oy
|
|
|
|
|
|
|
|
Created 1/8/1996 Heikki Tuuri
|
|
|
|
*******************************************************/
|
|
|
|
|
|
|
|
#ifndef dict0dict_h
|
|
|
|
#define dict0dict_h
|
|
|
|
|
|
|
|
#include "univ.i"
|
|
|
|
#include "dict0types.h"
|
|
|
|
#include "dict0mem.h"
|
|
|
|
#include "data0type.h"
|
|
|
|
#include "data0data.h"
|
|
|
|
#include "sync0sync.h"
|
|
|
|
#include "sync0rw.h"
|
|
|
|
#include "mem0mem.h"
|
|
|
|
#include "rem0types.h"
|
|
|
|
#include "btr0types.h"
|
|
|
|
#include "ut0mem.h"
|
|
|
|
#include "ut0lst.h"
|
|
|
|
#include "hash0hash.h"
|
|
|
|
#include "ut0rnd.h"
|
|
|
|
#include "ut0byte.h"
|
|
|
|
#include "trx0types.h"
|
|
|
|
|
dict0dict.c, dict0dict.h, fil0fil.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/fil/fil0fil.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/include/dict0dict.h:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/dict/dict0dict.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
2005-04-27 02:57:19 +03:00
|
|
|
/**********************************************************************
|
|
|
|
Makes all characters in a NUL-terminated UTF-8 string lower case. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_casedn_str(
|
|
|
|
/*============*/
|
|
|
|
char* a); /* in/out: string to put in lower case */
|
Many files:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
sync0sync.c:
UNIV_SYNC_DEBUG caused assertion in the creation of the doublewrite buffer, if we do not allow thousands of latches per thread
innobase/dict/dict0crea.c:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
innobase/dict/dict0dict.c:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
innobase/include/dict0crea.h:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
innobase/include/dict0dict.h:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
innobase/include/ut0mem.h:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
innobase/row/row0mysql.c:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
innobase/sync/sync0sync.c:
UNIV_SYNC_DEBUG caused assertion in the creation of the doublewrite buffer, if we do not allow thousands of latches per thread
innobase/ut/ut0mem.c:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
2004-02-09 01:32:00 +02:00
|
|
|
/************************************************************************
|
|
|
|
Get the database name length in a table name. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_get_db_name_len(
|
|
|
|
/*=================*/
|
InnoDB cleanup: fixing buffer overflows and quoting of quotes
innobase/dict/dict0crea.c:
Remove unneeded prototypes for static functions
Remove unused parameters from some functions
Replace some assertions with compile-time checks
dict_create_add_foreigns_to_dictionary():
allocate space dynamically for the SQL, and quote quotes
innobase/dict/dict0dict.c:
Remove unnecessary prototypes for static functions
dict_tables_have_same_db(): Remove length limitation
dict_remove_db_name(): Use strchr()
dict_get_db_name_len(): Use strchr()
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
Remove unnecessary strlen() calls
Allocate space dynamically for generated strings
dict_scan_id(): allow quotes within quoted strings
innobase/dict/dict0load.c:
Remove unnecessary strlen() calls
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/dict/dict0mem.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/eval/eval0eval.c:
Make TO_CHAR() work with any machine word width
innobase/fil/fil0fil.c:
Replace mem_alloc()+strlen()+strcpy() with mem_strdup()
innobase/ibuf/ibuf0ibuf.c:
Make some global variables static
Add #ifdef UNIV_IBUF_DEBUG around debug statements
innobase/include/data0data.h:
Add #ifdef UNIV_DEBUG around dtuple_validate()
innobase/include/data0data.ic:
Replace = with == in ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N)
innobase/include/dict0dict.h:
Add const qualifiers
innobase/include/lock0lock.h:
Add UL suffixes to unsigned long masks
innobase/include/log0log.h:
Remove unused parameter "type" of log_group_write_buf()
innobase/include/mem0mem.h:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/mem0mem.ic:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/row0uins.h:
Remove unused parameter "thr" of row_undo_ins()
innobase/include/row0undo.h:
Remvoe unused parameter "thr" of row_undo_search_clust_to_pcur()
innobase/include/ut0byte.h:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/include/ut0mem.h:
Add ut_strlenq(), ut_strcpyq() and ut_memcpyq()
innobase/include/ut0mem.ic:
Add ut_strlenq()
innobase/include/ut0ut.h:
Declare ut_sprintf() as a printf-style function
innobase/lock/lock0lock.c:
lock_clust_rec_modify_check_and_lock(): Remove unused variable "trx"
innobase/log/log0log.c:
Remove unused parameters
innobase/log/log0recv.c:
Remove parameter "type" from log_group_write_buf()
innobase/mem/mem0mem.c:
Simplify the initialization of block->init_block
innobase/mtr/mtr0log.c:
Add a debug assertion to mlog_parse_initial_log_record()
innobase/page/page0cur.c:
Add debug assertion to page_cur_insert_rec_write_log()
Remove hard-coded buffer size in page_cur_parse_insert_rec()
innobase/page/page0page.c:
Remove unneeded variable rec
innobase/pars/pars0opt.c:
Correct a potential buffer overflow
innobase/pars/pars0pars.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/row/row0ins.c:
Replace parameter "thr" with "trx" in row_ins_foreign_report_add_err()
Remove unnecessary strlen() call
Use strchr()
innobase/row/row0mysql.c:
Add row_mysql_is_recovered_tmp_table()
Add row_mysql_is_system_table()
Compare reserved table names with exact match
Use strstr() and strchr() and mem_strdupl()
Compute space needed for generated SQL, and allocate it dynamically
innobase/row/row0purge.c:
Remove unused parameters "thr"
innobase/row/row0row.c:
Simplify row_get_clust_rec()
innobase/row/row0uins.c:
Remove unused parameters "thr"
innobase/row/row0umod.c:
Remove unused variable "index"
row_undo_mod_del_unmark_sec_and_undo_update():
Remove parameter "node" and variable "rec"
Remove unused parameters "thr"
innobase/row/row0undo.c:
Remove unused parameters "thr"
innobase/srv/srv0srv.c:
Replace UT_NOT_USED() with __attribute__((unused))
innobase/srv/srv0start.c:
Remove unnecessary strlen() calls
Remove unused parameter "create_new_db" of open_or_create_log_file()
innobase/trx/trx0roll.c:
Replace mem_alloc()+strlen()+memcpy() with mem_strdup()
innobase/trx/trx0sys.c:
Remove unnecessary strlen() call
innobase/ut/ut0byte.c:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/ut/ut0mem.c:
Add ut_strlenq() and ut_memcpyq()
sql/ha_innodb.cc:
Remove parameter "len" of ut_cmp_in_lower_case()
2004-04-01 16:51:34 +03:00
|
|
|
/* out: database name length */
|
|
|
|
const char* name); /* in: table name in the form
|
|
|
|
dbname '/' tablename */
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
/*************************************************************************
|
|
|
|
Accepts a specified string. Comparisons are case-insensitive. */
|
|
|
|
|
InnoDB cleanup: fixing buffer overflows and quoting of quotes
innobase/dict/dict0crea.c:
Remove unneeded prototypes for static functions
Remove unused parameters from some functions
Replace some assertions with compile-time checks
dict_create_add_foreigns_to_dictionary():
allocate space dynamically for the SQL, and quote quotes
innobase/dict/dict0dict.c:
Remove unnecessary prototypes for static functions
dict_tables_have_same_db(): Remove length limitation
dict_remove_db_name(): Use strchr()
dict_get_db_name_len(): Use strchr()
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
Remove unnecessary strlen() calls
Allocate space dynamically for generated strings
dict_scan_id(): allow quotes within quoted strings
innobase/dict/dict0load.c:
Remove unnecessary strlen() calls
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/dict/dict0mem.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/eval/eval0eval.c:
Make TO_CHAR() work with any machine word width
innobase/fil/fil0fil.c:
Replace mem_alloc()+strlen()+strcpy() with mem_strdup()
innobase/ibuf/ibuf0ibuf.c:
Make some global variables static
Add #ifdef UNIV_IBUF_DEBUG around debug statements
innobase/include/data0data.h:
Add #ifdef UNIV_DEBUG around dtuple_validate()
innobase/include/data0data.ic:
Replace = with == in ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N)
innobase/include/dict0dict.h:
Add const qualifiers
innobase/include/lock0lock.h:
Add UL suffixes to unsigned long masks
innobase/include/log0log.h:
Remove unused parameter "type" of log_group_write_buf()
innobase/include/mem0mem.h:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/mem0mem.ic:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/row0uins.h:
Remove unused parameter "thr" of row_undo_ins()
innobase/include/row0undo.h:
Remvoe unused parameter "thr" of row_undo_search_clust_to_pcur()
innobase/include/ut0byte.h:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/include/ut0mem.h:
Add ut_strlenq(), ut_strcpyq() and ut_memcpyq()
innobase/include/ut0mem.ic:
Add ut_strlenq()
innobase/include/ut0ut.h:
Declare ut_sprintf() as a printf-style function
innobase/lock/lock0lock.c:
lock_clust_rec_modify_check_and_lock(): Remove unused variable "trx"
innobase/log/log0log.c:
Remove unused parameters
innobase/log/log0recv.c:
Remove parameter "type" from log_group_write_buf()
innobase/mem/mem0mem.c:
Simplify the initialization of block->init_block
innobase/mtr/mtr0log.c:
Add a debug assertion to mlog_parse_initial_log_record()
innobase/page/page0cur.c:
Add debug assertion to page_cur_insert_rec_write_log()
Remove hard-coded buffer size in page_cur_parse_insert_rec()
innobase/page/page0page.c:
Remove unneeded variable rec
innobase/pars/pars0opt.c:
Correct a potential buffer overflow
innobase/pars/pars0pars.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/row/row0ins.c:
Replace parameter "thr" with "trx" in row_ins_foreign_report_add_err()
Remove unnecessary strlen() call
Use strchr()
innobase/row/row0mysql.c:
Add row_mysql_is_recovered_tmp_table()
Add row_mysql_is_system_table()
Compare reserved table names with exact match
Use strstr() and strchr() and mem_strdupl()
Compute space needed for generated SQL, and allocate it dynamically
innobase/row/row0purge.c:
Remove unused parameters "thr"
innobase/row/row0row.c:
Simplify row_get_clust_rec()
innobase/row/row0uins.c:
Remove unused parameters "thr"
innobase/row/row0umod.c:
Remove unused variable "index"
row_undo_mod_del_unmark_sec_and_undo_update():
Remove parameter "node" and variable "rec"
Remove unused parameters "thr"
innobase/row/row0undo.c:
Remove unused parameters "thr"
innobase/srv/srv0srv.c:
Replace UT_NOT_USED() with __attribute__((unused))
innobase/srv/srv0start.c:
Remove unnecessary strlen() calls
Remove unused parameter "create_new_db" of open_or_create_log_file()
innobase/trx/trx0roll.c:
Replace mem_alloc()+strlen()+memcpy() with mem_strdup()
innobase/trx/trx0sys.c:
Remove unnecessary strlen() call
innobase/ut/ut0byte.c:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/ut/ut0mem.c:
Add ut_strlenq() and ut_memcpyq()
sql/ha_innodb.cc:
Remove parameter "len" of ut_cmp_in_lower_case()
2004-04-01 16:51:34 +03:00
|
|
|
const char*
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
dict_accept(
|
|
|
|
/*========*/
|
InnoDB cleanup: fixing buffer overflows and quoting of quotes
innobase/dict/dict0crea.c:
Remove unneeded prototypes for static functions
Remove unused parameters from some functions
Replace some assertions with compile-time checks
dict_create_add_foreigns_to_dictionary():
allocate space dynamically for the SQL, and quote quotes
innobase/dict/dict0dict.c:
Remove unnecessary prototypes for static functions
dict_tables_have_same_db(): Remove length limitation
dict_remove_db_name(): Use strchr()
dict_get_db_name_len(): Use strchr()
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
Remove unnecessary strlen() calls
Allocate space dynamically for generated strings
dict_scan_id(): allow quotes within quoted strings
innobase/dict/dict0load.c:
Remove unnecessary strlen() calls
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/dict/dict0mem.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/eval/eval0eval.c:
Make TO_CHAR() work with any machine word width
innobase/fil/fil0fil.c:
Replace mem_alloc()+strlen()+strcpy() with mem_strdup()
innobase/ibuf/ibuf0ibuf.c:
Make some global variables static
Add #ifdef UNIV_IBUF_DEBUG around debug statements
innobase/include/data0data.h:
Add #ifdef UNIV_DEBUG around dtuple_validate()
innobase/include/data0data.ic:
Replace = with == in ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N)
innobase/include/dict0dict.h:
Add const qualifiers
innobase/include/lock0lock.h:
Add UL suffixes to unsigned long masks
innobase/include/log0log.h:
Remove unused parameter "type" of log_group_write_buf()
innobase/include/mem0mem.h:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/mem0mem.ic:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/row0uins.h:
Remove unused parameter "thr" of row_undo_ins()
innobase/include/row0undo.h:
Remvoe unused parameter "thr" of row_undo_search_clust_to_pcur()
innobase/include/ut0byte.h:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/include/ut0mem.h:
Add ut_strlenq(), ut_strcpyq() and ut_memcpyq()
innobase/include/ut0mem.ic:
Add ut_strlenq()
innobase/include/ut0ut.h:
Declare ut_sprintf() as a printf-style function
innobase/lock/lock0lock.c:
lock_clust_rec_modify_check_and_lock(): Remove unused variable "trx"
innobase/log/log0log.c:
Remove unused parameters
innobase/log/log0recv.c:
Remove parameter "type" from log_group_write_buf()
innobase/mem/mem0mem.c:
Simplify the initialization of block->init_block
innobase/mtr/mtr0log.c:
Add a debug assertion to mlog_parse_initial_log_record()
innobase/page/page0cur.c:
Add debug assertion to page_cur_insert_rec_write_log()
Remove hard-coded buffer size in page_cur_parse_insert_rec()
innobase/page/page0page.c:
Remove unneeded variable rec
innobase/pars/pars0opt.c:
Correct a potential buffer overflow
innobase/pars/pars0pars.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/row/row0ins.c:
Replace parameter "thr" with "trx" in row_ins_foreign_report_add_err()
Remove unnecessary strlen() call
Use strchr()
innobase/row/row0mysql.c:
Add row_mysql_is_recovered_tmp_table()
Add row_mysql_is_system_table()
Compare reserved table names with exact match
Use strstr() and strchr() and mem_strdupl()
Compute space needed for generated SQL, and allocate it dynamically
innobase/row/row0purge.c:
Remove unused parameters "thr"
innobase/row/row0row.c:
Simplify row_get_clust_rec()
innobase/row/row0uins.c:
Remove unused parameters "thr"
innobase/row/row0umod.c:
Remove unused variable "index"
row_undo_mod_del_unmark_sec_and_undo_update():
Remove parameter "node" and variable "rec"
Remove unused parameters "thr"
innobase/row/row0undo.c:
Remove unused parameters "thr"
innobase/srv/srv0srv.c:
Replace UT_NOT_USED() with __attribute__((unused))
innobase/srv/srv0start.c:
Remove unnecessary strlen() calls
Remove unused parameter "create_new_db" of open_or_create_log_file()
innobase/trx/trx0roll.c:
Replace mem_alloc()+strlen()+memcpy() with mem_strdup()
innobase/trx/trx0sys.c:
Remove unnecessary strlen() call
innobase/ut/ut0byte.c:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/ut/ut0mem.c:
Add ut_strlenq() and ut_memcpyq()
sql/ha_innodb.cc:
Remove parameter "len" of ut_cmp_in_lower_case()
2004-04-01 16:51:34 +03:00
|
|
|
/* out: if string was accepted, the pointer
|
|
|
|
is moved after that, else ptr is returned */
|
|
|
|
const char* ptr, /* in: scan from this */
|
|
|
|
const char* string, /* in: accept only this string as the next
|
|
|
|
non-whitespace string */
|
|
|
|
ibool* success);/* out: TRUE if accepted */
|
2002-01-28 22:18:49 +02:00
|
|
|
/************************************************************************
|
|
|
|
Decrements the count of open MySQL handles to a table. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_decrement_handle_count(
|
|
|
|
/*==============================*/
|
|
|
|
dict_table_t* table); /* in: table */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Inits the data dictionary module. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_init(void);
|
|
|
|
/*===========*/
|
2003-10-07 17:28:59 +03:00
|
|
|
/************************************************************************
|
|
|
|
Gets the space id of every table of the data dictionary and makes a linear
|
|
|
|
list and a hash table of them to the data dictionary cache. This function
|
|
|
|
can be called at database startup if we did not need to do a crash recovery.
|
|
|
|
In crash recovery we must scan the space id's from the .ibd files in MySQL
|
|
|
|
database directories. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_load_space_id_list(void);
|
|
|
|
/*=========================*/
|
2001-02-17 14:19:19 +02:00
|
|
|
/*************************************************************************
|
|
|
|
Gets the column data type. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dtype_t*
|
|
|
|
dict_col_get_type(
|
|
|
|
/*==============*/
|
|
|
|
dict_col_t* col);
|
NULL MERGE UP to 5.1.
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Fixes:
Bug#9709: InnoDB inconsistensy causes "Operating System Error 32/33"
Bug#22819: SHOW INNODB STATUS crashes the server with an assertion failure under high load
Bug#25645: Assertion failure in file srv0srv.c
Bug#27294: insert into ... select ... causes crash with innodb_locks_unsafe_for_binlog=1
Bug#28138: indexing column prefixes produces corruption in InnoDB
innobase/btr/btr0btr.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1547:
branches/5.0: Merge r1546 from trunk:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug #28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
innobase/buf/buf0buf.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1502:
branches/5.0: Add debug code for Bug 26081. This change has some debug
assertions that have been promoted to normal assertions. These will need
to be undone once we've nailed this bug.
innobase/buf/buf0lru.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1502:
branches/5.0: Add debug code for Bug 26081. This change has some debug
assertions that have been promoted to normal assertions. These will need
to be undone once we've nailed this bug.
innobase/ibuf/ibuf0ibuf.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1547:
branches/5.0: Merge r1546 from trunk:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug #28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
innobase/include/buf0buf.ic:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1502:
branches/5.0: Add debug code for Bug 26081. This change has some debug
assertions that have been promoted to normal assertions. These will need
to be undone once we've nailed this bug.
innobase/include/buf0lru.h:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1502:
branches/5.0: Add debug code for Bug 26081. This change has some debug
assertions that have been promoted to normal assertions. These will need
to be undone once we've nailed this bug.
innobase/include/dict0dict.h:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1547:
branches/5.0: Merge r1546 from trunk:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug #28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
innobase/include/dict0dict.ic:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1547:
branches/5.0: Merge r1546 from trunk:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug #28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
innobase/include/dict0mem.h:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1537:
branches/5.0: merge r1536 and partially r1535
Change the comment to a more appropriate one. Discussed with Heikki on IM.
Document that DICT_MAX_INDEX_COL_LEN should not be changed.
innobase/include/os0file.h:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1417:
branches/5.0: Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
ERROR_LOCK_VIOLATION is encountered during file operation.
This is caused by backup software, so InnoDB should retry while the backup
software is done with the file.
Approved by: Heikki
innobase/include/trx0trx.h:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1463:
branches/5.0: merge r1462 from trunk:
Fix typo in comment.
innobase/lock/lock0lock.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1458:
branches/5.0: Fix Bug#22819, remove assertion. (http://bugs.mysql.com/bug.php?id=22819)
innobase/log/log0log.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1520:
Patch to allow monitor threads to stop before proceeding with normal shutdown.
Also have a separate time counter for tablespace monitor.
reviewed by: Heikki
Revision r1525:
backport of r1524
Log:
Undo bad space formatting introduced in earlier commit r1521
spotted by: Marko
innobase/mtr/mtr0mtr.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1502:
branches/5.0: Add debug code for Bug 26081. This change has some debug
assertions that have been promoted to normal assertions. These will need
to be undone once we've nailed this bug.
innobase/os/os0file.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1417:
branches/5.0: Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
ERROR_LOCK_VIOLATION is encountered during file operation.
This is caused by backup software, so InnoDB should retry while the backup
software is done with the file.
Approved by: Heikki
innobase/rem/rem0rec.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1547:
branches/5.0: Merge r1546 from trunk:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug #28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
innobase/row/row0sel.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1456:
branches/5.0: merge r1452 from trunk:
Fix phantom reads (http://bugs.mysql.com/27197) following Heikki's
patch in the bug followup.
innobase/srv/srv0srv.c:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1460:
branches/5.0: Merge r1459 from trunk:
Fix typo in the comment.
Revision r1520:
Patch to allow monitor threads to stop before proceeding with normal shutdown.
Also have a separate time counter for tablespace monitor.
reviewed by: Heikki
sql/ha_innodb.cc:
Apply innodb-5.0-* snapshots: ss1489 and ss1547.
Revision r1436:
branches/5.0: Fix Bug#27294 by using trx returned by check_trx_exists()
instead of prebuilt->trx. This has been fixed in 5.1 in r782.
Approved by: Heikki
Revision r1443:
branches/5.0: merge r1442 from trunk:
Potential fix for Bug#25645:
"Move innobase_release_stat_resources(trx) outside the 'if' in
ha_innobase::external_lock(). That would add more safety that whatever
MySQL does at a query end, there would be no risk of a hang on the btr
search latch."
Also call innobase_release_temporary_latches() in the beginning of
ha_innobase::close().
Approved by: Heikki
Revision r1454:
branches/5.0: merge r1453 from trunk:
Bugfix: only call innobase_release_temporary_latches() in case of current_thd
is not NULL, otherwise we get NULL pointer dereferencing.
Revision r1504:
branches/5.0: Apply patch for Bug 27650 from MySQL.
Revision r1539:
Backport of r1538 from 5.1
Do not return error in ha_innobase::info if srv_force_recovery >= 4. This is to allow for
normal processing of the query by MySQL instead of generating an error.
Reviewed by: Heikki
2007-07-10 08:16:51 -06:00
|
|
|
#ifdef UNIV_DEBUG
|
|
|
|
/*************************************************************************
|
|
|
|
Assert that a column and a data type match. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ibool
|
|
|
|
dict_col_type_assert_equal(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: TRUE */
|
|
|
|
const dict_col_t* col, /* in: column */
|
|
|
|
const dtype_t* type); /* in: data type */
|
|
|
|
#endif /* UNIV_DEBUG */
|
2001-02-17 14:19:19 +02:00
|
|
|
/*************************************************************************
|
|
|
|
Gets the column number. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_no(
|
|
|
|
/*============*/
|
|
|
|
dict_col_t* col);
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the column position in the clustered index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_clust_pos(
|
|
|
|
/*===================*/
|
|
|
|
dict_col_t* col);
|
2006-04-21 01:07:37 +04:00
|
|
|
/********************************************************************
|
|
|
|
If the given column name is reserved for InnoDB system columns, return
|
|
|
|
TRUE. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_col_name_is_reserved(
|
|
|
|
/*======================*/
|
|
|
|
/* out: TRUE if name is reserved */
|
|
|
|
const char* name); /* in: column name */
|
2001-05-21 19:04:46 +03:00
|
|
|
/************************************************************************
|
2002-07-31 00:47:20 +03:00
|
|
|
Initializes the autoinc counter. It is not an error to initialize an already
|
2001-05-21 19:04:46 +03:00
|
|
|
initialized counter. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_autoinc_initialize(
|
|
|
|
/*==========================*/
|
|
|
|
dict_table_t* table, /* in: table */
|
2002-07-31 00:47:20 +03:00
|
|
|
ib_longlong value); /* in: next value to assign to a row */
|
2001-05-21 19:04:46 +03:00
|
|
|
/************************************************************************
|
2002-07-31 00:47:20 +03:00
|
|
|
Gets the next autoinc value (== autoinc counter value), 0 if not yet
|
|
|
|
initialized. If initialized, increments the counter by 1. */
|
2001-05-21 19:04:46 +03:00
|
|
|
|
|
|
|
ib_longlong
|
|
|
|
dict_table_autoinc_get(
|
|
|
|
/*===================*/
|
|
|
|
/* out: value for a new row, or 0 */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
2002-09-04 18:53:48 +02:00
|
|
|
Decrements the autoinc counter value by 1. */
|
2002-03-21 18:03:09 +02:00
|
|
|
|
2002-09-04 18:53:48 +02:00
|
|
|
void
|
|
|
|
dict_table_autoinc_decrement(
|
|
|
|
/*=========================*/
|
2002-03-21 18:03:09 +02:00
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
2002-09-04 19:01:39 +02:00
|
|
|
Reads the next autoinc value (== autoinc counter value), 0 if not yet
|
|
|
|
initialized. */
|
|
|
|
|
|
|
|
ib_longlong
|
|
|
|
dict_table_autoinc_read(
|
|
|
|
/*====================*/
|
|
|
|
/* out: value for a new row, or 0 */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
2002-07-31 00:47:20 +03:00
|
|
|
Peeks the autoinc counter value, 0 if not yet initialized. Does not
|
|
|
|
increment the counter. The read not protected by any mutex! */
|
|
|
|
|
|
|
|
ib_longlong
|
|
|
|
dict_table_autoinc_peek(
|
|
|
|
/*====================*/
|
|
|
|
/* out: value of the counter */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Updates the autoinc counter if the value supplied is equal or bigger than the
|
2001-05-21 19:04:46 +03:00
|
|
|
current value. If not inited, does nothing. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_autoinc_update(
|
|
|
|
/*======================*/
|
2002-07-31 00:47:20 +03:00
|
|
|
|
2001-05-21 19:04:46 +03:00
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ib_longlong value); /* in: value which was assigned to a row */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Adds a table object to the dictionary cache. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_add_to_cache(
|
|
|
|
/*====================*/
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/**************************************************************************
|
|
|
|
Removes a table object from the dictionary cache. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_remove_from_cache(
|
|
|
|
/*=========================*/
|
|
|
|
dict_table_t* table); /* in, own: table */
|
|
|
|
/**************************************************************************
|
|
|
|
Renames a table object. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_table_rename_in_cache(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
dict_table_t* table, /* in: table */
|
2004-05-17 14:40:31 +03:00
|
|
|
const char* new_name, /* in: new name */
|
2002-03-21 18:03:09 +02:00
|
|
|
ibool rename_also_foreigns);/* in: in ALTER TABLE we want
|
|
|
|
to preserve the original table name
|
|
|
|
in constraints which reference it */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
2003-10-07 17:28:59 +03:00
|
|
|
Change the id of a table object in the dictionary cache. This is used in
|
|
|
|
DISCARD TABLESPACE. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_change_id_in_cache(
|
|
|
|
/*==========================*/
|
|
|
|
dict_table_t* table, /* in: table object already in cache */
|
|
|
|
dulint new_id);/* in: new id to set */
|
|
|
|
/**************************************************************************
|
2001-10-10 22:47:08 +03:00
|
|
|
Adds a foreign key constraint object to the dictionary cache. May free
|
|
|
|
the object if there already is an object with the same identifier in.
|
|
|
|
At least one of foreign table or referenced table must already be in
|
|
|
|
the dictionary cache! */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_foreign_add_to_cache(
|
|
|
|
/*======================*/
|
|
|
|
/* out: DB_SUCCESS or error code */
|
2005-04-12 16:12:34 +03:00
|
|
|
dict_foreign_t* foreign, /* in, own: foreign key constraint */
|
2005-12-06 22:02:40 +03:00
|
|
|
ibool check_charsets);/* in: TRUE=check charset
|
|
|
|
compatibility */
|
2001-10-10 22:47:08 +03:00
|
|
|
/*************************************************************************
|
2004-02-09 23:57:29 +02:00
|
|
|
Checks if a table is referenced by foreign keys. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_table_referenced_by_foreign_key(
|
|
|
|
/*=================================*/
|
|
|
|
/* out: TRUE if table is referenced by a
|
|
|
|
foreign key */
|
|
|
|
dict_table_t* table); /* in: InnoDB table */
|
|
|
|
/*************************************************************************
|
2001-10-10 22:47:08 +03:00
|
|
|
Scans a table create SQL string and adds to the data dictionary
|
|
|
|
the foreign key constraints declared in the string. This function
|
|
|
|
should be called after the indexes for a table have been created.
|
|
|
|
Each foreign key constraint must be accompanied with indexes in
|
|
|
|
bot participating tables. The indexes are allowed to contain more
|
|
|
|
fields than mentioned in the constraint. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_create_foreign_constraints(
|
|
|
|
/*============================*/
|
2004-05-17 14:40:31 +03:00
|
|
|
/* out: error code or DB_SUCCESS */
|
|
|
|
trx_t* trx, /* in: transaction */
|
|
|
|
const char* sql_string, /* in: table create statement where
|
|
|
|
foreign keys are declared like:
|
|
|
|
FOREIGN KEY (a, b) REFERENCES
|
|
|
|
table2(c, d), table2 can be written
|
|
|
|
also with the database
|
|
|
|
name before it: test.table2; the
|
|
|
|
default database id the database of
|
|
|
|
parameter name */
|
2005-09-06 14:38:21 +03:00
|
|
|
const char* name, /* in: table full name in the
|
2004-05-17 14:40:31 +03:00
|
|
|
normalized form
|
|
|
|
database_name/table_name */
|
2005-09-06 14:38:21 +03:00
|
|
|
ibool reject_fks); /* in: if TRUE, fail with error
|
|
|
|
code DB_CANNOT_ADD_CONSTRAINT if
|
|
|
|
any foreign keys are found. */
|
2001-10-10 22:47:08 +03:00
|
|
|
/**************************************************************************
|
2003-04-16 16:45:01 +03:00
|
|
|
Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_foreign_parse_drop_constraints(
|
|
|
|
/*================================*/
|
|
|
|
/* out: DB_SUCCESS or
|
|
|
|
DB_CANNOT_DROP_CONSTRAINT if
|
|
|
|
syntax error or the constraint
|
|
|
|
id does not match */
|
|
|
|
mem_heap_t* heap, /* in: heap from which we can
|
|
|
|
allocate memory */
|
|
|
|
trx_t* trx, /* in: transaction */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint* n, /* out: number of constraints
|
|
|
|
to drop */
|
InnoDB cleanup: fixing buffer overflows and quoting of quotes
innobase/dict/dict0crea.c:
Remove unneeded prototypes for static functions
Remove unused parameters from some functions
Replace some assertions with compile-time checks
dict_create_add_foreigns_to_dictionary():
allocate space dynamically for the SQL, and quote quotes
innobase/dict/dict0dict.c:
Remove unnecessary prototypes for static functions
dict_tables_have_same_db(): Remove length limitation
dict_remove_db_name(): Use strchr()
dict_get_db_name_len(): Use strchr()
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
Remove unnecessary strlen() calls
Allocate space dynamically for generated strings
dict_scan_id(): allow quotes within quoted strings
innobase/dict/dict0load.c:
Remove unnecessary strlen() calls
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/dict/dict0mem.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/eval/eval0eval.c:
Make TO_CHAR() work with any machine word width
innobase/fil/fil0fil.c:
Replace mem_alloc()+strlen()+strcpy() with mem_strdup()
innobase/ibuf/ibuf0ibuf.c:
Make some global variables static
Add #ifdef UNIV_IBUF_DEBUG around debug statements
innobase/include/data0data.h:
Add #ifdef UNIV_DEBUG around dtuple_validate()
innobase/include/data0data.ic:
Replace = with == in ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N)
innobase/include/dict0dict.h:
Add const qualifiers
innobase/include/lock0lock.h:
Add UL suffixes to unsigned long masks
innobase/include/log0log.h:
Remove unused parameter "type" of log_group_write_buf()
innobase/include/mem0mem.h:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/mem0mem.ic:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/row0uins.h:
Remove unused parameter "thr" of row_undo_ins()
innobase/include/row0undo.h:
Remvoe unused parameter "thr" of row_undo_search_clust_to_pcur()
innobase/include/ut0byte.h:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/include/ut0mem.h:
Add ut_strlenq(), ut_strcpyq() and ut_memcpyq()
innobase/include/ut0mem.ic:
Add ut_strlenq()
innobase/include/ut0ut.h:
Declare ut_sprintf() as a printf-style function
innobase/lock/lock0lock.c:
lock_clust_rec_modify_check_and_lock(): Remove unused variable "trx"
innobase/log/log0log.c:
Remove unused parameters
innobase/log/log0recv.c:
Remove parameter "type" from log_group_write_buf()
innobase/mem/mem0mem.c:
Simplify the initialization of block->init_block
innobase/mtr/mtr0log.c:
Add a debug assertion to mlog_parse_initial_log_record()
innobase/page/page0cur.c:
Add debug assertion to page_cur_insert_rec_write_log()
Remove hard-coded buffer size in page_cur_parse_insert_rec()
innobase/page/page0page.c:
Remove unneeded variable rec
innobase/pars/pars0opt.c:
Correct a potential buffer overflow
innobase/pars/pars0pars.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/row/row0ins.c:
Replace parameter "thr" with "trx" in row_ins_foreign_report_add_err()
Remove unnecessary strlen() call
Use strchr()
innobase/row/row0mysql.c:
Add row_mysql_is_recovered_tmp_table()
Add row_mysql_is_system_table()
Compare reserved table names with exact match
Use strstr() and strchr() and mem_strdupl()
Compute space needed for generated SQL, and allocate it dynamically
innobase/row/row0purge.c:
Remove unused parameters "thr"
innobase/row/row0row.c:
Simplify row_get_clust_rec()
innobase/row/row0uins.c:
Remove unused parameters "thr"
innobase/row/row0umod.c:
Remove unused variable "index"
row_undo_mod_del_unmark_sec_and_undo_update():
Remove parameter "node" and variable "rec"
Remove unused parameters "thr"
innobase/row/row0undo.c:
Remove unused parameters "thr"
innobase/srv/srv0srv.c:
Replace UT_NOT_USED() with __attribute__((unused))
innobase/srv/srv0start.c:
Remove unnecessary strlen() calls
Remove unused parameter "create_new_db" of open_or_create_log_file()
innobase/trx/trx0roll.c:
Replace mem_alloc()+strlen()+memcpy() with mem_strdup()
innobase/trx/trx0sys.c:
Remove unnecessary strlen() call
innobase/ut/ut0byte.c:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/ut/ut0mem.c:
Add ut_strlenq() and ut_memcpyq()
sql/ha_innodb.cc:
Remove parameter "len" of ut_cmp_in_lower_case()
2004-04-01 16:51:34 +03:00
|
|
|
const char*** constraints_to_drop); /* out: id's of the
|
2003-04-16 16:45:01 +03:00
|
|
|
constraints to drop */
|
|
|
|
/**************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Returns a table object and memoryfixes it. NOTE! This is a high-level
|
|
|
|
function to be used mainly from outside the 'dict' directory. Inside this
|
|
|
|
directory dict_table_get_low is usually the appropriate function. */
|
|
|
|
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get(
|
|
|
|
/*===========*/
|
2004-05-17 14:40:31 +03:00
|
|
|
/* out: table, NULL if
|
|
|
|
does not exist */
|
|
|
|
const char* table_name, /* in: table name */
|
|
|
|
trx_t* trx); /* in: transaction handle */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
2002-02-14 10:24:27 +02:00
|
|
|
Returns a table object and increments MySQL open handle count on the table.
|
|
|
|
*/
|
|
|
|
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get_and_increment_handle_count(
|
|
|
|
/*======================================*/
|
2004-05-17 14:40:31 +03:00
|
|
|
/* out: table, NULL if
|
|
|
|
does not exist */
|
|
|
|
const char* table_name, /* in: table name */
|
|
|
|
trx_t* trx); /* in: transaction handle or NULL */
|
2002-02-14 10:24:27 +02:00
|
|
|
/**************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Returns a table object, based on table id, and memoryfixes it. */
|
|
|
|
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get_on_id(
|
|
|
|
/*=================*/
|
|
|
|
/* out: table, NULL if does not exist */
|
|
|
|
dulint table_id, /* in: table id */
|
|
|
|
trx_t* trx); /* in: transaction handle */
|
|
|
|
/**************************************************************************
|
|
|
|
Returns a table object, based on table id, and memoryfixes it. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get_on_id_low(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: table, NULL if does not exist */
|
|
|
|
dulint table_id, /* in: table id */
|
|
|
|
trx_t* trx); /* in: transaction handle */
|
|
|
|
/**************************************************************************
|
|
|
|
Releases a table from being memoryfixed. Currently this has no relevance. */
|
|
|
|
UNIV_INLINE
|
|
|
|
void
|
|
|
|
dict_table_release(
|
|
|
|
/*===============*/
|
|
|
|
dict_table_t* table); /* in: table to be released */
|
|
|
|
/**************************************************************************
|
2001-10-10 22:47:08 +03:00
|
|
|
Checks if a table is in the dictionary cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_check_if_in_cache_low(
|
|
|
|
/*==============================*/
|
2004-05-17 14:40:31 +03:00
|
|
|
/* out: table, NULL if not found */
|
|
|
|
const char* table_name); /* in: table name */
|
2001-10-10 22:47:08 +03:00
|
|
|
/**************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Gets a table; loads it to the dictionary cache if necessary. A low-level
|
|
|
|
function. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get_low(
|
|
|
|
/*===============*/
|
2004-05-17 14:40:31 +03:00
|
|
|
/* out: table, NULL if not found */
|
|
|
|
const char* table_name); /* in: table name */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Returns an index object. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_index(
|
|
|
|
/*=================*/
|
|
|
|
/* out: index, NULL if does not exist */
|
|
|
|
dict_table_t* table, /* in: table */
|
2004-05-17 14:40:31 +03:00
|
|
|
const char* name); /* in: index name */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Returns an index object. */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_index_noninline(
|
|
|
|
/*===========================*/
|
|
|
|
/* out: index, NULL if does not exist */
|
|
|
|
dict_table_t* table, /* in: table */
|
2004-05-17 14:40:31 +03:00
|
|
|
const char* name); /* in: index name */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
2004-06-16 13:41:14 +03:00
|
|
|
Prints a table definition. */
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
void
|
2004-06-16 13:41:14 +03:00
|
|
|
dict_table_print(
|
|
|
|
/*=============*/
|
2001-02-17 14:19:19 +02:00
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/**************************************************************************
|
2004-06-16 13:41:14 +03:00
|
|
|
Prints a table data. */
|
2001-10-10 22:47:08 +03:00
|
|
|
|
|
|
|
void
|
2004-06-16 13:41:14 +03:00
|
|
|
dict_table_print_low(
|
|
|
|
/*=================*/
|
2001-10-10 22:47:08 +03:00
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/**************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Prints a table data when we know the table name. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_print_by_name(
|
|
|
|
/*=====================*/
|
2004-05-17 14:40:31 +03:00
|
|
|
const char* name);
|
2001-10-30 17:38:44 +02:00
|
|
|
/**************************************************************************
|
InnoDB cleanup: fixing buffer overflows and quoting of quotes
innobase/dict/dict0crea.c:
Remove unneeded prototypes for static functions
Remove unused parameters from some functions
Replace some assertions with compile-time checks
dict_create_add_foreigns_to_dictionary():
allocate space dynamically for the SQL, and quote quotes
innobase/dict/dict0dict.c:
Remove unnecessary prototypes for static functions
dict_tables_have_same_db(): Remove length limitation
dict_remove_db_name(): Use strchr()
dict_get_db_name_len(): Use strchr()
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
Remove unnecessary strlen() calls
Allocate space dynamically for generated strings
dict_scan_id(): allow quotes within quoted strings
innobase/dict/dict0load.c:
Remove unnecessary strlen() calls
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/dict/dict0mem.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/eval/eval0eval.c:
Make TO_CHAR() work with any machine word width
innobase/fil/fil0fil.c:
Replace mem_alloc()+strlen()+strcpy() with mem_strdup()
innobase/ibuf/ibuf0ibuf.c:
Make some global variables static
Add #ifdef UNIV_IBUF_DEBUG around debug statements
innobase/include/data0data.h:
Add #ifdef UNIV_DEBUG around dtuple_validate()
innobase/include/data0data.ic:
Replace = with == in ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N)
innobase/include/dict0dict.h:
Add const qualifiers
innobase/include/lock0lock.h:
Add UL suffixes to unsigned long masks
innobase/include/log0log.h:
Remove unused parameter "type" of log_group_write_buf()
innobase/include/mem0mem.h:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/mem0mem.ic:
Add mem_strdup(), mem_strdupl(), mem_strdupq(), mem_heap_strdup(),
and mem_heap_strdupl()
innobase/include/row0uins.h:
Remove unused parameter "thr" of row_undo_ins()
innobase/include/row0undo.h:
Remvoe unused parameter "thr" of row_undo_search_clust_to_pcur()
innobase/include/ut0byte.h:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/include/ut0mem.h:
Add ut_strlenq(), ut_strcpyq() and ut_memcpyq()
innobase/include/ut0mem.ic:
Add ut_strlenq()
innobase/include/ut0ut.h:
Declare ut_sprintf() as a printf-style function
innobase/lock/lock0lock.c:
lock_clust_rec_modify_check_and_lock(): Remove unused variable "trx"
innobase/log/log0log.c:
Remove unused parameters
innobase/log/log0recv.c:
Remove parameter "type" from log_group_write_buf()
innobase/mem/mem0mem.c:
Simplify the initialization of block->init_block
innobase/mtr/mtr0log.c:
Add a debug assertion to mlog_parse_initial_log_record()
innobase/page/page0cur.c:
Add debug assertion to page_cur_insert_rec_write_log()
Remove hard-coded buffer size in page_cur_parse_insert_rec()
innobase/page/page0page.c:
Remove unneeded variable rec
innobase/pars/pars0opt.c:
Correct a potential buffer overflow
innobase/pars/pars0pars.c:
Replace mem_heap_alloc()+strlen()+memcpy() with mem_heap_strdup()
innobase/row/row0ins.c:
Replace parameter "thr" with "trx" in row_ins_foreign_report_add_err()
Remove unnecessary strlen() call
Use strchr()
innobase/row/row0mysql.c:
Add row_mysql_is_recovered_tmp_table()
Add row_mysql_is_system_table()
Compare reserved table names with exact match
Use strstr() and strchr() and mem_strdupl()
Compute space needed for generated SQL, and allocate it dynamically
innobase/row/row0purge.c:
Remove unused parameters "thr"
innobase/row/row0row.c:
Simplify row_get_clust_rec()
innobase/row/row0uins.c:
Remove unused parameters "thr"
innobase/row/row0umod.c:
Remove unused variable "index"
row_undo_mod_del_unmark_sec_and_undo_update():
Remove parameter "node" and variable "rec"
Remove unused parameters "thr"
innobase/row/row0undo.c:
Remove unused parameters "thr"
innobase/srv/srv0srv.c:
Replace UT_NOT_USED() with __attribute__((unused))
innobase/srv/srv0start.c:
Remove unnecessary strlen() calls
Remove unused parameter "create_new_db" of open_or_create_log_file()
innobase/trx/trx0roll.c:
Replace mem_alloc()+strlen()+memcpy() with mem_strdup()
innobase/trx/trx0sys.c:
Remove unnecessary strlen() call
innobase/ut/ut0byte.c:
Add const qualifier to ut_cpy_in_lower_case()
Remove parameter "len" of ut_cmp_in_lower_case()
innobase/ut/ut0mem.c:
Add ut_strlenq() and ut_memcpyq()
sql/ha_innodb.cc:
Remove parameter "len" of ut_cmp_in_lower_case()
2004-04-01 16:51:34 +03:00
|
|
|
Outputs info on foreign keys of a table. */
|
2001-10-30 17:38:44 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
dict_print_info_on_foreign_keys(
|
|
|
|
/*============================*/
|
2002-03-21 18:03:09 +02:00
|
|
|
ibool create_table_format, /* in: if TRUE then print in
|
|
|
|
a format suitable to be inserted into
|
|
|
|
a CREATE TABLE, otherwise in the format
|
|
|
|
of SHOW TABLE STATUS */
|
InnoDB: send diagnostic output to stderr or files
instead of stdout or fixed-size memory buffers
innobase/btr/btr0btr.c:
Output to stderr; quote table and index names
innobase/btr/btr0cur.c:
Output to stderr; quote table and index names
innobase/btr/btr0sea.c:
Output to stderr
innobase/buf/buf0buf.c:
Output to stderr; quote table and index names
innobase/buf/buf0flu.c:
Output to stderr
innobase/buf/buf0lru.c:
Output to stderr
innobase/buf/buf0rea.c:
Output to stderr
innobase/data/data0data.c:
Remove dtuple_validate() unless #ifdef UNIV_DEBUG
Remove unnecessary sprintf() calls
Output to stderr
innobase/data/data0type.c:
Output to stderr
innobase/dict/dict0boot.c:
Remove dummy call to printf()
innobase/dict/dict0crea.c:
Output diagnostic information to stream, not to memory
innobase/dict/dict0dict.c:
Output diagnostics to a file, not to a memory buffer
innobase/dict/dict0load.c:
Output to stderr; quote table and index names
innobase/eval/eval0eval.c:
Output to stderr
innobase/fil/fil0fil.c:
Output to stderr
innobase/fsp/fsp0fsp.c:
Output to stderr
Avoid sprintf()
innobase/fut/fut0lst.c:
Output to stderr
innobase/ha/ha0ha.c:
Output to stream, not to memory buffer
innobase/ibuf/ibuf0ibuf.c:
Output to stderr
Avoid sprintf()
innobase/include/buf0buf.h:
Output to stream, not to memory buffer
innobase/include/buf0buf.ic:
Use %p for displaying pointers
innobase/include/data0data.h:
Remove dtuple_sprintf()
innobase/include/dict0dict.h:
Output to stream, not to memory buffer
innobase/include/ha0ha.h:
Output to stream, not to memory buffer
innobase/include/ibuf0ibuf.h:
Output to stream, not to memory buffer
innobase/include/lock0lock.h:
Output to stream, not to memory buffer
innobase/include/log0log.h:
Output to stream, not to memory buffer
innobase/include/mtr0log.ic:
Output to stderr
Display pointers with %p
innobase/include/os0file.h:
Output to stream, not to memory buffer
innobase/include/rem0rec.h:
Remove rec_sprintf()
innobase/include/rem0rec.ic:
Output to stderr
innobase/include/row0sel.ic:
Output to stderr
innobase/include/row0upd.ic:
Quote table and index names
innobase/include/srv0srv.h:
Remove srv_sprintf_innodb_monitor()
innobase/include/sync0arr.h:
Output to stream, not to memory buffer
innobase/include/sync0sync.h:
Output to stream, not to memory buffer
innobase/include/trx0sys.h:
Output to stderr
innobase/include/trx0trx.h:
Output to stream, not to memory buffer
innobase/include/ut0ut.h:
Remove ut_sprintf_buf()
Add ut_print_name(), ut_print_namel() and ut_copy_file()
innobase/lock/lock0lock.c:
Output to stream, not to memory buffer
innobase/log/log0log.c:
Output to stderr
innobase/log/log0recv.c:
Output to stderr
innobase/mem/mem0dbg.c:
Output to stderr
innobase/mtr/mtr0log.c:
Display pointers with %p
innobase/mtr/mtr0mtr.c:
Output to stderr
innobase/os/os0file.c:
Output to stream, not to memory buffer
innobase/os/os0proc.c:
Output to stderr
innobase/os/os0thread.c:
Output to stderr
innobase/page/page0cur.c:
Output to stderr
innobase/page/page0page.c:
Avoid sprintf()
Output to stderr instead of stdout
innobase/pars/pars0opt.c:
Output to stderr instead of stdout
innobase/rem/rem0rec.c:
Remove rec_sprintf()
Output to stderr instead of stdout
innobase/row/row0ins.c:
Output diagnostics to stream instead of memory buffer
innobase/row/row0mysql.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0purge.c:
Output to stderr instead of stdout
innobase/row/row0row.c:
Quote table and index names
innobase/row/row0sel.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0umod.c:
Avoid sprintf()
Quote table and index names
innobase/row/row0undo.c:
Output to stderr instead of stdout
innobase/row/row0upd.c:
Avoid sprintf()
innobase/srv/srv0srv.c:
Output to stderr instead of stdout
innobase/srv/srv0start.c:
Handle srv_monitor_file
Make some global variables static
innobase/sync/sync0arr.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/sync/sync0rw.c:
Output to stderr instead of stdout
innobase/sync/sync0sync.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/trx/trx0purge.c:
Output to stderr instead of stdout
innobase/trx/trx0rec.c:
Quote index and table names
Avoid sprintf()
innobase/trx/trx0roll.c:
Quote identifier names
Output to stderr instead of stdout
innobase/trx/trx0sys.c:
Output to stderr instead of stdout
innobase/trx/trx0trx.c:
Output to stream instead of memory buffer
innobase/trx/trx0undo.c:
Output to stderr instead of stdout
innobase/ut/ut0ut.c:
Declare mysql_get_identifier_quote_char()
Remove ut_sprintf_buf()
Add ut_print_name() and ut_print_namel()
Add ut_copy_file()
sql/ha_innodb.cc:
innobase_mysql_print_thd(): output to stream, not to memory buffer
Add mysql_get_identifier_quote_char()
Remove unused function innobase_print_error()
Display pointers with %p
Buffer InnoDB output via files, not via statically allocated memory
2004-04-06 16:14:43 +03:00
|
|
|
FILE* file, /* in: file where to print */
|
2004-10-01 11:51:59 +03:00
|
|
|
trx_t* trx, /* in: transaction */
|
2001-10-30 17:38:44 +02:00
|
|
|
dict_table_t* table); /* in: table */
|
2003-04-16 16:45:01 +03:00
|
|
|
/**************************************************************************
|
InnoDB: send diagnostic output to stderr or files
instead of stdout or fixed-size memory buffers
innobase/btr/btr0btr.c:
Output to stderr; quote table and index names
innobase/btr/btr0cur.c:
Output to stderr; quote table and index names
innobase/btr/btr0sea.c:
Output to stderr
innobase/buf/buf0buf.c:
Output to stderr; quote table and index names
innobase/buf/buf0flu.c:
Output to stderr
innobase/buf/buf0lru.c:
Output to stderr
innobase/buf/buf0rea.c:
Output to stderr
innobase/data/data0data.c:
Remove dtuple_validate() unless #ifdef UNIV_DEBUG
Remove unnecessary sprintf() calls
Output to stderr
innobase/data/data0type.c:
Output to stderr
innobase/dict/dict0boot.c:
Remove dummy call to printf()
innobase/dict/dict0crea.c:
Output diagnostic information to stream, not to memory
innobase/dict/dict0dict.c:
Output diagnostics to a file, not to a memory buffer
innobase/dict/dict0load.c:
Output to stderr; quote table and index names
innobase/eval/eval0eval.c:
Output to stderr
innobase/fil/fil0fil.c:
Output to stderr
innobase/fsp/fsp0fsp.c:
Output to stderr
Avoid sprintf()
innobase/fut/fut0lst.c:
Output to stderr
innobase/ha/ha0ha.c:
Output to stream, not to memory buffer
innobase/ibuf/ibuf0ibuf.c:
Output to stderr
Avoid sprintf()
innobase/include/buf0buf.h:
Output to stream, not to memory buffer
innobase/include/buf0buf.ic:
Use %p for displaying pointers
innobase/include/data0data.h:
Remove dtuple_sprintf()
innobase/include/dict0dict.h:
Output to stream, not to memory buffer
innobase/include/ha0ha.h:
Output to stream, not to memory buffer
innobase/include/ibuf0ibuf.h:
Output to stream, not to memory buffer
innobase/include/lock0lock.h:
Output to stream, not to memory buffer
innobase/include/log0log.h:
Output to stream, not to memory buffer
innobase/include/mtr0log.ic:
Output to stderr
Display pointers with %p
innobase/include/os0file.h:
Output to stream, not to memory buffer
innobase/include/rem0rec.h:
Remove rec_sprintf()
innobase/include/rem0rec.ic:
Output to stderr
innobase/include/row0sel.ic:
Output to stderr
innobase/include/row0upd.ic:
Quote table and index names
innobase/include/srv0srv.h:
Remove srv_sprintf_innodb_monitor()
innobase/include/sync0arr.h:
Output to stream, not to memory buffer
innobase/include/sync0sync.h:
Output to stream, not to memory buffer
innobase/include/trx0sys.h:
Output to stderr
innobase/include/trx0trx.h:
Output to stream, not to memory buffer
innobase/include/ut0ut.h:
Remove ut_sprintf_buf()
Add ut_print_name(), ut_print_namel() and ut_copy_file()
innobase/lock/lock0lock.c:
Output to stream, not to memory buffer
innobase/log/log0log.c:
Output to stderr
innobase/log/log0recv.c:
Output to stderr
innobase/mem/mem0dbg.c:
Output to stderr
innobase/mtr/mtr0log.c:
Display pointers with %p
innobase/mtr/mtr0mtr.c:
Output to stderr
innobase/os/os0file.c:
Output to stream, not to memory buffer
innobase/os/os0proc.c:
Output to stderr
innobase/os/os0thread.c:
Output to stderr
innobase/page/page0cur.c:
Output to stderr
innobase/page/page0page.c:
Avoid sprintf()
Output to stderr instead of stdout
innobase/pars/pars0opt.c:
Output to stderr instead of stdout
innobase/rem/rem0rec.c:
Remove rec_sprintf()
Output to stderr instead of stdout
innobase/row/row0ins.c:
Output diagnostics to stream instead of memory buffer
innobase/row/row0mysql.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0purge.c:
Output to stderr instead of stdout
innobase/row/row0row.c:
Quote table and index names
innobase/row/row0sel.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0umod.c:
Avoid sprintf()
Quote table and index names
innobase/row/row0undo.c:
Output to stderr instead of stdout
innobase/row/row0upd.c:
Avoid sprintf()
innobase/srv/srv0srv.c:
Output to stderr instead of stdout
innobase/srv/srv0start.c:
Handle srv_monitor_file
Make some global variables static
innobase/sync/sync0arr.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/sync/sync0rw.c:
Output to stderr instead of stdout
innobase/sync/sync0sync.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/trx/trx0purge.c:
Output to stderr instead of stdout
innobase/trx/trx0rec.c:
Quote index and table names
Avoid sprintf()
innobase/trx/trx0roll.c:
Quote identifier names
Output to stderr instead of stdout
innobase/trx/trx0sys.c:
Output to stderr instead of stdout
innobase/trx/trx0trx.c:
Output to stream instead of memory buffer
innobase/trx/trx0undo.c:
Output to stderr instead of stdout
innobase/ut/ut0ut.c:
Declare mysql_get_identifier_quote_char()
Remove ut_sprintf_buf()
Add ut_print_name() and ut_print_namel()
Add ut_copy_file()
sql/ha_innodb.cc:
innobase_mysql_print_thd(): output to stream, not to memory buffer
Add mysql_get_identifier_quote_char()
Remove unused function innobase_print_error()
Display pointers with %p
Buffer InnoDB output via files, not via statically allocated memory
2004-04-06 16:14:43 +03:00
|
|
|
Outputs info on a foreign key of a table in a format suitable for
|
|
|
|
CREATE TABLE. */
|
|
|
|
void
|
2003-04-16 16:45:01 +03:00
|
|
|
dict_print_info_on_foreign_key_in_create_format(
|
|
|
|
/*============================================*/
|
2005-09-23 16:22:27 +03:00
|
|
|
FILE* file, /* in: file where to print */
|
|
|
|
trx_t* trx, /* in: transaction */
|
|
|
|
dict_foreign_t* foreign, /* in: foreign key constraint */
|
|
|
|
ibool add_newline); /* in: whether to add a newline */
|
InnoDB: send diagnostic output to stderr or files
instead of stdout or fixed-size memory buffers
innobase/btr/btr0btr.c:
Output to stderr; quote table and index names
innobase/btr/btr0cur.c:
Output to stderr; quote table and index names
innobase/btr/btr0sea.c:
Output to stderr
innobase/buf/buf0buf.c:
Output to stderr; quote table and index names
innobase/buf/buf0flu.c:
Output to stderr
innobase/buf/buf0lru.c:
Output to stderr
innobase/buf/buf0rea.c:
Output to stderr
innobase/data/data0data.c:
Remove dtuple_validate() unless #ifdef UNIV_DEBUG
Remove unnecessary sprintf() calls
Output to stderr
innobase/data/data0type.c:
Output to stderr
innobase/dict/dict0boot.c:
Remove dummy call to printf()
innobase/dict/dict0crea.c:
Output diagnostic information to stream, not to memory
innobase/dict/dict0dict.c:
Output diagnostics to a file, not to a memory buffer
innobase/dict/dict0load.c:
Output to stderr; quote table and index names
innobase/eval/eval0eval.c:
Output to stderr
innobase/fil/fil0fil.c:
Output to stderr
innobase/fsp/fsp0fsp.c:
Output to stderr
Avoid sprintf()
innobase/fut/fut0lst.c:
Output to stderr
innobase/ha/ha0ha.c:
Output to stream, not to memory buffer
innobase/ibuf/ibuf0ibuf.c:
Output to stderr
Avoid sprintf()
innobase/include/buf0buf.h:
Output to stream, not to memory buffer
innobase/include/buf0buf.ic:
Use %p for displaying pointers
innobase/include/data0data.h:
Remove dtuple_sprintf()
innobase/include/dict0dict.h:
Output to stream, not to memory buffer
innobase/include/ha0ha.h:
Output to stream, not to memory buffer
innobase/include/ibuf0ibuf.h:
Output to stream, not to memory buffer
innobase/include/lock0lock.h:
Output to stream, not to memory buffer
innobase/include/log0log.h:
Output to stream, not to memory buffer
innobase/include/mtr0log.ic:
Output to stderr
Display pointers with %p
innobase/include/os0file.h:
Output to stream, not to memory buffer
innobase/include/rem0rec.h:
Remove rec_sprintf()
innobase/include/rem0rec.ic:
Output to stderr
innobase/include/row0sel.ic:
Output to stderr
innobase/include/row0upd.ic:
Quote table and index names
innobase/include/srv0srv.h:
Remove srv_sprintf_innodb_monitor()
innobase/include/sync0arr.h:
Output to stream, not to memory buffer
innobase/include/sync0sync.h:
Output to stream, not to memory buffer
innobase/include/trx0sys.h:
Output to stderr
innobase/include/trx0trx.h:
Output to stream, not to memory buffer
innobase/include/ut0ut.h:
Remove ut_sprintf_buf()
Add ut_print_name(), ut_print_namel() and ut_copy_file()
innobase/lock/lock0lock.c:
Output to stream, not to memory buffer
innobase/log/log0log.c:
Output to stderr
innobase/log/log0recv.c:
Output to stderr
innobase/mem/mem0dbg.c:
Output to stderr
innobase/mtr/mtr0log.c:
Display pointers with %p
innobase/mtr/mtr0mtr.c:
Output to stderr
innobase/os/os0file.c:
Output to stream, not to memory buffer
innobase/os/os0proc.c:
Output to stderr
innobase/os/os0thread.c:
Output to stderr
innobase/page/page0cur.c:
Output to stderr
innobase/page/page0page.c:
Avoid sprintf()
Output to stderr instead of stdout
innobase/pars/pars0opt.c:
Output to stderr instead of stdout
innobase/rem/rem0rec.c:
Remove rec_sprintf()
Output to stderr instead of stdout
innobase/row/row0ins.c:
Output diagnostics to stream instead of memory buffer
innobase/row/row0mysql.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0purge.c:
Output to stderr instead of stdout
innobase/row/row0row.c:
Quote table and index names
innobase/row/row0sel.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0umod.c:
Avoid sprintf()
Quote table and index names
innobase/row/row0undo.c:
Output to stderr instead of stdout
innobase/row/row0upd.c:
Avoid sprintf()
innobase/srv/srv0srv.c:
Output to stderr instead of stdout
innobase/srv/srv0start.c:
Handle srv_monitor_file
Make some global variables static
innobase/sync/sync0arr.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/sync/sync0rw.c:
Output to stderr instead of stdout
innobase/sync/sync0sync.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/trx/trx0purge.c:
Output to stderr instead of stdout
innobase/trx/trx0rec.c:
Quote index and table names
Avoid sprintf()
innobase/trx/trx0roll.c:
Quote identifier names
Output to stderr instead of stdout
innobase/trx/trx0sys.c:
Output to stderr instead of stdout
innobase/trx/trx0trx.c:
Output to stream instead of memory buffer
innobase/trx/trx0undo.c:
Output to stderr instead of stdout
innobase/ut/ut0ut.c:
Declare mysql_get_identifier_quote_char()
Remove ut_sprintf_buf()
Add ut_print_name() and ut_print_namel()
Add ut_copy_file()
sql/ha_innodb.cc:
innobase_mysql_print_thd(): output to stream, not to memory buffer
Add mysql_get_identifier_quote_char()
Remove unused function innobase_print_error()
Display pointers with %p
Buffer InnoDB output via files, not via statically allocated memory
2004-04-06 16:14:43 +03:00
|
|
|
/************************************************************************
|
|
|
|
Displays the names of the index and the table. */
|
|
|
|
void
|
|
|
|
dict_index_name_print(
|
|
|
|
/*==================*/
|
|
|
|
FILE* file, /* in: output stream */
|
2004-10-01 11:51:59 +03:00
|
|
|
trx_t* trx, /* in: transaction */
|
InnoDB: send diagnostic output to stderr or files
instead of stdout or fixed-size memory buffers
innobase/btr/btr0btr.c:
Output to stderr; quote table and index names
innobase/btr/btr0cur.c:
Output to stderr; quote table and index names
innobase/btr/btr0sea.c:
Output to stderr
innobase/buf/buf0buf.c:
Output to stderr; quote table and index names
innobase/buf/buf0flu.c:
Output to stderr
innobase/buf/buf0lru.c:
Output to stderr
innobase/buf/buf0rea.c:
Output to stderr
innobase/data/data0data.c:
Remove dtuple_validate() unless #ifdef UNIV_DEBUG
Remove unnecessary sprintf() calls
Output to stderr
innobase/data/data0type.c:
Output to stderr
innobase/dict/dict0boot.c:
Remove dummy call to printf()
innobase/dict/dict0crea.c:
Output diagnostic information to stream, not to memory
innobase/dict/dict0dict.c:
Output diagnostics to a file, not to a memory buffer
innobase/dict/dict0load.c:
Output to stderr; quote table and index names
innobase/eval/eval0eval.c:
Output to stderr
innobase/fil/fil0fil.c:
Output to stderr
innobase/fsp/fsp0fsp.c:
Output to stderr
Avoid sprintf()
innobase/fut/fut0lst.c:
Output to stderr
innobase/ha/ha0ha.c:
Output to stream, not to memory buffer
innobase/ibuf/ibuf0ibuf.c:
Output to stderr
Avoid sprintf()
innobase/include/buf0buf.h:
Output to stream, not to memory buffer
innobase/include/buf0buf.ic:
Use %p for displaying pointers
innobase/include/data0data.h:
Remove dtuple_sprintf()
innobase/include/dict0dict.h:
Output to stream, not to memory buffer
innobase/include/ha0ha.h:
Output to stream, not to memory buffer
innobase/include/ibuf0ibuf.h:
Output to stream, not to memory buffer
innobase/include/lock0lock.h:
Output to stream, not to memory buffer
innobase/include/log0log.h:
Output to stream, not to memory buffer
innobase/include/mtr0log.ic:
Output to stderr
Display pointers with %p
innobase/include/os0file.h:
Output to stream, not to memory buffer
innobase/include/rem0rec.h:
Remove rec_sprintf()
innobase/include/rem0rec.ic:
Output to stderr
innobase/include/row0sel.ic:
Output to stderr
innobase/include/row0upd.ic:
Quote table and index names
innobase/include/srv0srv.h:
Remove srv_sprintf_innodb_monitor()
innobase/include/sync0arr.h:
Output to stream, not to memory buffer
innobase/include/sync0sync.h:
Output to stream, not to memory buffer
innobase/include/trx0sys.h:
Output to stderr
innobase/include/trx0trx.h:
Output to stream, not to memory buffer
innobase/include/ut0ut.h:
Remove ut_sprintf_buf()
Add ut_print_name(), ut_print_namel() and ut_copy_file()
innobase/lock/lock0lock.c:
Output to stream, not to memory buffer
innobase/log/log0log.c:
Output to stderr
innobase/log/log0recv.c:
Output to stderr
innobase/mem/mem0dbg.c:
Output to stderr
innobase/mtr/mtr0log.c:
Display pointers with %p
innobase/mtr/mtr0mtr.c:
Output to stderr
innobase/os/os0file.c:
Output to stream, not to memory buffer
innobase/os/os0proc.c:
Output to stderr
innobase/os/os0thread.c:
Output to stderr
innobase/page/page0cur.c:
Output to stderr
innobase/page/page0page.c:
Avoid sprintf()
Output to stderr instead of stdout
innobase/pars/pars0opt.c:
Output to stderr instead of stdout
innobase/rem/rem0rec.c:
Remove rec_sprintf()
Output to stderr instead of stdout
innobase/row/row0ins.c:
Output diagnostics to stream instead of memory buffer
innobase/row/row0mysql.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0purge.c:
Output to stderr instead of stdout
innobase/row/row0row.c:
Quote table and index names
innobase/row/row0sel.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0umod.c:
Avoid sprintf()
Quote table and index names
innobase/row/row0undo.c:
Output to stderr instead of stdout
innobase/row/row0upd.c:
Avoid sprintf()
innobase/srv/srv0srv.c:
Output to stderr instead of stdout
innobase/srv/srv0start.c:
Handle srv_monitor_file
Make some global variables static
innobase/sync/sync0arr.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/sync/sync0rw.c:
Output to stderr instead of stdout
innobase/sync/sync0sync.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/trx/trx0purge.c:
Output to stderr instead of stdout
innobase/trx/trx0rec.c:
Quote index and table names
Avoid sprintf()
innobase/trx/trx0roll.c:
Quote identifier names
Output to stderr instead of stdout
innobase/trx/trx0sys.c:
Output to stderr instead of stdout
innobase/trx/trx0trx.c:
Output to stream instead of memory buffer
innobase/trx/trx0undo.c:
Output to stderr instead of stdout
innobase/ut/ut0ut.c:
Declare mysql_get_identifier_quote_char()
Remove ut_sprintf_buf()
Add ut_print_name() and ut_print_namel()
Add ut_copy_file()
sql/ha_innodb.cc:
innobase_mysql_print_thd(): output to stream, not to memory buffer
Add mysql_get_identifier_quote_char()
Remove unused function innobase_print_error()
Display pointers with %p
Buffer InnoDB output via files, not via statically allocated memory
2004-04-06 16:14:43 +03:00
|
|
|
const dict_index_t* index); /* in: index to print */
|
2001-02-17 14:19:19 +02:00
|
|
|
/************************************************************************
|
|
|
|
Gets the first index on the table (the clustered index). */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_first_index(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: index, NULL if none exists */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the first index on the table (the clustered index). */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_first_index_noninline(
|
|
|
|
/*=================================*/
|
|
|
|
/* out: index, NULL if none exists */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the next index on the table. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_next_index(
|
|
|
|
/*======================*/
|
|
|
|
/* out: index, NULL if none left */
|
|
|
|
dict_index_t* index); /* in: index */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the next index on the table. */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_next_index_noninline(
|
|
|
|
/*================================*/
|
|
|
|
/* out: index, NULL if none left */
|
|
|
|
dict_index_t* index); /* in: index */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of user-defined columns in a table in the dictionary
|
|
|
|
cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_n_user_cols(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: number of user-defined (e.g., not
|
|
|
|
ROW_ID) columns of a table */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of system columns in a table in the dictionary cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_n_sys_cols(
|
|
|
|
/*======================*/
|
|
|
|
/* out: number of system (e.g.,
|
|
|
|
ROW_ID) columns of a table */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of all columns (also system) in a table in the dictionary
|
|
|
|
cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_n_cols(
|
|
|
|
/*==================*/
|
|
|
|
/* out: number of columns of a table */
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the nth column of a table. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_col_t*
|
|
|
|
dict_table_get_nth_col(
|
|
|
|
/*===================*/
|
|
|
|
/* out: pointer to column object */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint pos); /* in: position of column */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the nth column of a table. */
|
|
|
|
|
|
|
|
dict_col_t*
|
|
|
|
dict_table_get_nth_col_noninline(
|
|
|
|
/*=============================*/
|
|
|
|
/* out: pointer to column object */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint pos); /* in: position of column */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the given system column of a table. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_col_t*
|
|
|
|
dict_table_get_sys_col(
|
|
|
|
/*===================*/
|
|
|
|
/* out: pointer to column object */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint sys); /* in: DATA_ROW_ID, ... */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the given system column number of a table. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_sys_col_no(
|
|
|
|
/*======================*/
|
|
|
|
/* out: column number */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint sys); /* in: DATA_ROW_ID, ... */
|
2004-03-17 19:37:48 +02:00
|
|
|
/************************************************************************
|
|
|
|
Checks if a column is in the ordering columns of the clustered index of a
|
|
|
|
table. Column prefixes are treated like whole columns. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_table_col_in_clustered_key(
|
|
|
|
/*============================*/
|
|
|
|
/* out: TRUE if the column, or its prefix, is
|
|
|
|
in the clustered key */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint n); /* in: column number */
|
2001-02-17 14:19:19 +02:00
|
|
|
/***********************************************************************
|
|
|
|
Copies types of columns contained in table to tuple. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_table_copy_types(
|
|
|
|
/*==================*/
|
|
|
|
dtuple_t* tuple, /* in: data tuple */
|
|
|
|
dict_table_t* table); /* in: index */
|
|
|
|
/**************************************************************************
|
2001-10-10 22:47:08 +03:00
|
|
|
Looks for an index with the given id. NOTE that we do not reserve
|
|
|
|
the dictionary mutex: this function is for emergency purposes like
|
|
|
|
printing info of a corrupt database page! */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_index_find_on_id_low(
|
|
|
|
/*======================*/
|
|
|
|
/* out: index or NULL if not found from cache */
|
|
|
|
dulint id); /* in: index id */
|
|
|
|
/**************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Adds an index to dictionary cache. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_index_add_to_cache(
|
|
|
|
/*====================*/
|
|
|
|
/* out: TRUE if success */
|
|
|
|
dict_table_t* table, /* in: table on which the index is */
|
2005-01-14 13:54:23 +02:00
|
|
|
dict_index_t* index, /* in, own: index; NOTE! The index memory
|
2001-02-17 14:19:19 +02:00
|
|
|
object is freed in this function! */
|
2005-01-14 13:54:23 +02:00
|
|
|
ulint page_no);/* in: root page number of the index */
|
2001-02-17 14:19:19 +02:00
|
|
|
/************************************************************************
|
|
|
|
Gets the number of fields in the internal representation of an index,
|
|
|
|
including fields added by the dictionary system. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_fields(
|
|
|
|
/*====================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index); /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of fields in the internal representation of an index
|
|
|
|
that uniquely determine the position of an index entry in the index, if
|
|
|
|
we do not take multiversioning into account: in the B-tree use the value
|
|
|
|
returned by dict_index_get_n_unique_in_tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_unique(
|
|
|
|
/*====================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index); /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of fields in the internal representation of an index
|
|
|
|
which uniquely determine the position of an index entry in the index, if
|
|
|
|
we also take multiversioning into account. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_unique_in_tree(
|
|
|
|
/*============================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index); /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of user-defined ordering fields in the index. In the internal
|
|
|
|
representation we add the row id to the ordering fields to make all indexes
|
|
|
|
unique, but this function returns the number of fields the user defined
|
|
|
|
in the index as ordering fields. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_ordering_defined_by_user(
|
|
|
|
/*======================================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index); /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the nth field of an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_field_t*
|
|
|
|
dict_index_get_nth_field(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: pointer to field object */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint pos); /* in: position of field */
|
|
|
|
/************************************************************************
|
|
|
|
Gets pointer to the nth field data type in an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dtype_t*
|
|
|
|
dict_index_get_nth_type(
|
|
|
|
/*====================*/
|
|
|
|
/* out: data type */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint pos); /* in: position of the field */
|
|
|
|
/************************************************************************
|
|
|
|
Gets the column number of the nth field in an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_nth_col_no(
|
|
|
|
/*======================*/
|
|
|
|
/* out: column number */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint pos); /* in: position of the field */
|
|
|
|
/************************************************************************
|
|
|
|
Looks for column n in an index. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_index_get_nth_col_pos(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: position in internal representation
|
|
|
|
of the index; if not contained, returns
|
|
|
|
ULINT_UNDEFINED */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint n); /* in: column number */
|
|
|
|
/************************************************************************
|
2003-06-22 16:20:06 +03:00
|
|
|
Returns TRUE if the index contains a column or a prefix of that column. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_index_contains_col_or_prefix(
|
|
|
|
/*==============================*/
|
|
|
|
/* out: TRUE if contains the column or its
|
|
|
|
prefix */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint n); /* in: column number */
|
|
|
|
/************************************************************************
|
2004-09-16 20:50:24 +03:00
|
|
|
Looks for a matching field in an index. The column has to be the same. The
|
|
|
|
column in index must be complete, or must contain a prefix longer than the
|
|
|
|
column in index2. That is, we must be able to construct the prefix in index2
|
|
|
|
from the prefix in index. */
|
2003-06-15 01:04:28 +03:00
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_index_get_nth_field_pos(
|
|
|
|
/*=========================*/
|
|
|
|
/* out: position in internal representation
|
|
|
|
of the index; if not contained, returns
|
|
|
|
ULINT_UNDEFINED */
|
|
|
|
dict_index_t* index, /* in: index from which to search */
|
|
|
|
dict_index_t* index2, /* in: index */
|
|
|
|
ulint n); /* in: field number in index2 */
|
|
|
|
/************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Looks for column n position in the clustered index. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_table_get_nth_col_pos(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: position in internal representation
|
|
|
|
of the clustered index */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint n); /* in: column number */
|
|
|
|
/************************************************************************
|
|
|
|
Returns the position of a system column in an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_sys_col_pos(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: position, ULINT_UNDEFINED if not
|
|
|
|
contained */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint type); /* in: DATA_ROW_ID, ... */
|
|
|
|
/***********************************************************************
|
2004-12-02 19:45:07 +02:00
|
|
|
Adds a column to index. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_index_add_col(
|
|
|
|
/*===============*/
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
dict_col_t* col, /* in: column */
|
|
|
|
ulint order, /* in: order criterion */
|
|
|
|
ulint prefix_len); /* in: column prefix length */
|
|
|
|
/***********************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Copies types of fields contained in index to tuple. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_index_copy_types(
|
|
|
|
/*==================*/
|
|
|
|
dtuple_t* tuple, /* in: data tuple */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint n_fields); /* in: number of field types to copy */
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the index tree where the index is stored. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_tree_t*
|
|
|
|
dict_index_get_tree(
|
|
|
|
/*================*/
|
|
|
|
/* out: index tree */
|
|
|
|
dict_index_t* index); /* in: index */
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the field order criterion. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_field_get_order(
|
|
|
|
/*=================*/
|
|
|
|
dict_field_t* field);
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the field column. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_col_t*
|
|
|
|
dict_field_get_col(
|
|
|
|
/*===============*/
|
|
|
|
dict_field_t* field);
|
|
|
|
/**************************************************************************
|
|
|
|
Creates an index tree struct. */
|
|
|
|
|
|
|
|
dict_tree_t*
|
|
|
|
dict_tree_create(
|
|
|
|
/*=============*/
|
|
|
|
/* out, own: created tree */
|
2005-01-14 13:54:23 +02:00
|
|
|
dict_index_t* index, /* in: the index for which to create: in the
|
2001-02-17 14:19:19 +02:00
|
|
|
case of a mixed tree, this should be the
|
|
|
|
index of the cluster object */
|
2005-01-14 13:54:23 +02:00
|
|
|
ulint page_no);/* in: root page number of the index */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Frees an index tree struct. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_tree_free(
|
|
|
|
/*===========*/
|
|
|
|
dict_tree_t* tree); /* in, own: index tree */
|
|
|
|
/**************************************************************************
|
|
|
|
In an index tree, finds the index corresponding to a record in the tree. */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_tree_find_index(
|
|
|
|
/*=================*/
|
|
|
|
/* out: index */
|
|
|
|
dict_tree_t* tree, /* in: index tree */
|
|
|
|
rec_t* rec); /* in: record for which to find correct index */
|
|
|
|
/**************************************************************************
|
|
|
|
In an index tree, finds the index corresponding to a dtuple which is used
|
|
|
|
in a search to a tree. */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_tree_find_index_for_tuple(
|
|
|
|
/*===========================*/
|
|
|
|
/* out: index; NULL if the tuple does not
|
|
|
|
contain the mix id field in a mixed tree */
|
|
|
|
dict_tree_t* tree, /* in: index tree */
|
|
|
|
dtuple_t* tuple); /* in: tuple for which to find index */
|
|
|
|
/***********************************************************************
|
|
|
|
Checks if a table which is a mixed cluster member owns a record. */
|
2004-12-29 12:09:23 +02:00
|
|
|
|
2001-02-17 14:19:19 +02:00
|
|
|
ibool
|
|
|
|
dict_is_mixed_table_rec(
|
|
|
|
/*====================*/
|
|
|
|
/* out: TRUE if the record belongs to this
|
|
|
|
table */
|
|
|
|
dict_table_t* table, /* in: table in a mixed cluster */
|
|
|
|
rec_t* rec); /* in: user record in the clustered index */
|
|
|
|
/**************************************************************************
|
|
|
|
Returns an index object if it is found in the dictionary cache. */
|
|
|
|
|
|
|
|
dict_index_t*
|
|
|
|
dict_index_get_if_in_cache(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: index, NULL if not found */
|
|
|
|
dulint index_id); /* in: index id */
|
|
|
|
/**************************************************************************
|
|
|
|
Checks that a tuple has n_fields_cmp value in a sensible range, so that
|
|
|
|
no comparison can occur with the page number field in a node pointer. */
|
|
|
|
|
|
|
|
ibool
|
|
|
|
dict_tree_check_search_tuple(
|
|
|
|
/*=========================*/
|
|
|
|
/* out: TRUE if ok */
|
|
|
|
dict_tree_t* tree, /* in: index tree */
|
|
|
|
dtuple_t* tuple); /* in: tuple used in a search */
|
|
|
|
/**************************************************************************
|
|
|
|
Builds a node pointer out of a physical record and a page number. */
|
|
|
|
|
|
|
|
dtuple_t*
|
|
|
|
dict_tree_build_node_ptr(
|
|
|
|
/*=====================*/
|
|
|
|
/* out, own: node pointer */
|
|
|
|
dict_tree_t* tree, /* in: index tree */
|
2003-10-07 17:28:59 +03:00
|
|
|
rec_t* rec, /* in: record for which to build node
|
|
|
|
pointer */
|
2001-02-17 14:19:19 +02:00
|
|
|
ulint page_no,/* in: page number to put in node pointer */
|
2001-11-17 13:48:39 +02:00
|
|
|
mem_heap_t* heap, /* in: memory heap where pointer created */
|
2001-11-17 14:18:27 +02:00
|
|
|
ulint level); /* in: level of rec in tree: 0 means leaf
|
2001-11-17 13:48:39 +02:00
|
|
|
level */
|
2001-02-17 14:19:19 +02:00
|
|
|
/**************************************************************************
|
|
|
|
Copies an initial segment of a physical record, long enough to specify an
|
|
|
|
index entry uniquely. */
|
|
|
|
|
|
|
|
rec_t*
|
|
|
|
dict_tree_copy_rec_order_prefix(
|
|
|
|
/*============================*/
|
|
|
|
/* out: pointer to the prefix record */
|
|
|
|
dict_tree_t* tree, /* in: index tree */
|
|
|
|
rec_t* rec, /* in: record for which to copy prefix */
|
2004-12-02 19:45:07 +02:00
|
|
|
ulint* n_fields,/* out: number of fields copied */
|
2001-02-17 14:19:19 +02:00
|
|
|
byte** buf, /* in/out: memory buffer for the copied prefix,
|
|
|
|
or NULL */
|
|
|
|
ulint* buf_size);/* in/out: buffer size */
|
|
|
|
/**************************************************************************
|
|
|
|
Builds a typed data tuple out of a physical record. */
|
|
|
|
|
|
|
|
dtuple_t*
|
|
|
|
dict_tree_build_data_tuple(
|
|
|
|
/*=======================*/
|
|
|
|
/* out, own: data tuple */
|
|
|
|
dict_tree_t* tree, /* in: index tree */
|
|
|
|
rec_t* rec, /* in: record for which to build data tuple */
|
2004-12-02 19:45:07 +02:00
|
|
|
ulint n_fields,/* in: number of data fields */
|
2001-02-17 14:19:19 +02:00
|
|
|
mem_heap_t* heap); /* in: memory heap where tuple created */
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the space id of the root of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_tree_get_space(
|
|
|
|
/*================*/
|
|
|
|
/* out: space id */
|
|
|
|
dict_tree_t* tree); /* in: tree */
|
|
|
|
/*************************************************************************
|
|
|
|
Sets the space id of the root of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
void
|
|
|
|
dict_tree_set_space(
|
|
|
|
/*================*/
|
|
|
|
dict_tree_t* tree, /* in: tree */
|
|
|
|
ulint space); /* in: space id */
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the page number of the root of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_tree_get_page(
|
|
|
|
/*===============*/
|
|
|
|
/* out: page number */
|
|
|
|
dict_tree_t* tree); /* in: tree */
|
|
|
|
/*************************************************************************
|
|
|
|
Sets the page number of the root of index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
void
|
|
|
|
dict_tree_set_page(
|
|
|
|
/*===============*/
|
|
|
|
dict_tree_t* tree, /* in: tree */
|
|
|
|
ulint page); /* in: page number */
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the type of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_tree_get_type(
|
|
|
|
/*===============*/
|
|
|
|
/* out: type */
|
|
|
|
dict_tree_t* tree); /* in: tree */
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the read-write lock of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
rw_lock_t*
|
|
|
|
dict_tree_get_lock(
|
|
|
|
/*===============*/
|
|
|
|
/* out: read-write lock */
|
|
|
|
dict_tree_t* tree); /* in: tree */
|
|
|
|
/************************************************************************
|
|
|
|
Returns free space reserved for future updates of records. This is
|
|
|
|
relevant only in the case of many consecutive inserts, as updates
|
|
|
|
which make the records bigger might fragment the index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_tree_get_space_reserve(
|
|
|
|
/*========================*/
|
|
|
|
/* out: number of free bytes on page,
|
|
|
|
reserved for updates */
|
|
|
|
dict_tree_t* tree); /* in: a tree */
|
|
|
|
/*************************************************************************
|
2001-10-10 22:47:08 +03:00
|
|
|
Calculates the minimum record length in an index. */
|
|
|
|
|
|
|
|
ulint
|
|
|
|
dict_index_calc_min_rec_len(
|
|
|
|
/*========================*/
|
|
|
|
dict_index_t* index); /* in: index */
|
|
|
|
/*************************************************************************
|
|
|
|
Calculates new estimates for table and index statistics. The statistics
|
|
|
|
are used in query optimization. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_update_statistics_low(
|
|
|
|
/*=======================*/
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ibool has_dict_mutex);/* in: TRUE if the caller has the
|
|
|
|
dictionary mutex */
|
|
|
|
/*************************************************************************
|
2001-02-17 14:19:19 +02:00
|
|
|
Calculates new estimates for table and index statistics. The statistics
|
|
|
|
are used in query optimization. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_update_statistics(
|
|
|
|
/*===================*/
|
|
|
|
dict_table_t* table); /* in: table */
|
|
|
|
/************************************************************************
|
|
|
|
Reserves the dictionary system mutex for MySQL. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_mutex_enter_for_mysql(void);
|
|
|
|
/*============================*/
|
|
|
|
/************************************************************************
|
|
|
|
Releases the dictionary system mutex for MySQL. */
|
|
|
|
|
|
|
|
void
|
|
|
|
dict_mutex_exit_for_mysql(void);
|
|
|
|
/*===========================*/
|
2004-04-02 16:25:48 +03:00
|
|
|
/************************************************************************
|
|
|
|
Checks if the database name in two table names is the same. */
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2004-04-02 16:25:48 +03:00
|
|
|
ibool
|
|
|
|
dict_tables_have_same_db(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: TRUE if same db name */
|
|
|
|
const char* name1, /* in: table name in the form
|
|
|
|
dbname '/' tablename */
|
|
|
|
const char* name2); /* in: table name in the form
|
|
|
|
dbname '/' tablename */
|
2003-04-16 16:45:01 +03:00
|
|
|
|
2004-10-14 15:36:36 +03:00
|
|
|
/*************************************************************************
|
|
|
|
Scans from pointer onwards. Stops if is at the start of a copy of
|
|
|
|
'string' where characters are compared without case sensitivity. Stops
|
|
|
|
also at '\0'. */
|
|
|
|
|
|
|
|
const char*
|
|
|
|
dict_scan_to(
|
|
|
|
/*=========*/
|
|
|
|
/* out: scanned up to this */
|
|
|
|
const char* ptr, /* in: scan from */
|
|
|
|
const char* string);/* in: look for this */
|
|
|
|
|
2003-05-04 23:24:23 +03:00
|
|
|
/* Buffers for storing detailed information about the latest foreign key
|
|
|
|
and unique key errors */
|
InnoDB: send diagnostic output to stderr or files
instead of stdout or fixed-size memory buffers
innobase/btr/btr0btr.c:
Output to stderr; quote table and index names
innobase/btr/btr0cur.c:
Output to stderr; quote table and index names
innobase/btr/btr0sea.c:
Output to stderr
innobase/buf/buf0buf.c:
Output to stderr; quote table and index names
innobase/buf/buf0flu.c:
Output to stderr
innobase/buf/buf0lru.c:
Output to stderr
innobase/buf/buf0rea.c:
Output to stderr
innobase/data/data0data.c:
Remove dtuple_validate() unless #ifdef UNIV_DEBUG
Remove unnecessary sprintf() calls
Output to stderr
innobase/data/data0type.c:
Output to stderr
innobase/dict/dict0boot.c:
Remove dummy call to printf()
innobase/dict/dict0crea.c:
Output diagnostic information to stream, not to memory
innobase/dict/dict0dict.c:
Output diagnostics to a file, not to a memory buffer
innobase/dict/dict0load.c:
Output to stderr; quote table and index names
innobase/eval/eval0eval.c:
Output to stderr
innobase/fil/fil0fil.c:
Output to stderr
innobase/fsp/fsp0fsp.c:
Output to stderr
Avoid sprintf()
innobase/fut/fut0lst.c:
Output to stderr
innobase/ha/ha0ha.c:
Output to stream, not to memory buffer
innobase/ibuf/ibuf0ibuf.c:
Output to stderr
Avoid sprintf()
innobase/include/buf0buf.h:
Output to stream, not to memory buffer
innobase/include/buf0buf.ic:
Use %p for displaying pointers
innobase/include/data0data.h:
Remove dtuple_sprintf()
innobase/include/dict0dict.h:
Output to stream, not to memory buffer
innobase/include/ha0ha.h:
Output to stream, not to memory buffer
innobase/include/ibuf0ibuf.h:
Output to stream, not to memory buffer
innobase/include/lock0lock.h:
Output to stream, not to memory buffer
innobase/include/log0log.h:
Output to stream, not to memory buffer
innobase/include/mtr0log.ic:
Output to stderr
Display pointers with %p
innobase/include/os0file.h:
Output to stream, not to memory buffer
innobase/include/rem0rec.h:
Remove rec_sprintf()
innobase/include/rem0rec.ic:
Output to stderr
innobase/include/row0sel.ic:
Output to stderr
innobase/include/row0upd.ic:
Quote table and index names
innobase/include/srv0srv.h:
Remove srv_sprintf_innodb_monitor()
innobase/include/sync0arr.h:
Output to stream, not to memory buffer
innobase/include/sync0sync.h:
Output to stream, not to memory buffer
innobase/include/trx0sys.h:
Output to stderr
innobase/include/trx0trx.h:
Output to stream, not to memory buffer
innobase/include/ut0ut.h:
Remove ut_sprintf_buf()
Add ut_print_name(), ut_print_namel() and ut_copy_file()
innobase/lock/lock0lock.c:
Output to stream, not to memory buffer
innobase/log/log0log.c:
Output to stderr
innobase/log/log0recv.c:
Output to stderr
innobase/mem/mem0dbg.c:
Output to stderr
innobase/mtr/mtr0log.c:
Display pointers with %p
innobase/mtr/mtr0mtr.c:
Output to stderr
innobase/os/os0file.c:
Output to stream, not to memory buffer
innobase/os/os0proc.c:
Output to stderr
innobase/os/os0thread.c:
Output to stderr
innobase/page/page0cur.c:
Output to stderr
innobase/page/page0page.c:
Avoid sprintf()
Output to stderr instead of stdout
innobase/pars/pars0opt.c:
Output to stderr instead of stdout
innobase/rem/rem0rec.c:
Remove rec_sprintf()
Output to stderr instead of stdout
innobase/row/row0ins.c:
Output diagnostics to stream instead of memory buffer
innobase/row/row0mysql.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0purge.c:
Output to stderr instead of stdout
innobase/row/row0row.c:
Quote table and index names
innobase/row/row0sel.c:
Output to stderr instead of stdout
Quote table and index names
innobase/row/row0umod.c:
Avoid sprintf()
Quote table and index names
innobase/row/row0undo.c:
Output to stderr instead of stdout
innobase/row/row0upd.c:
Avoid sprintf()
innobase/srv/srv0srv.c:
Output to stderr instead of stdout
innobase/srv/srv0start.c:
Handle srv_monitor_file
Make some global variables static
innobase/sync/sync0arr.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/sync/sync0rw.c:
Output to stderr instead of stdout
innobase/sync/sync0sync.c:
Output to stderr instead of stdout
Output to stream instead of memory buffer
innobase/trx/trx0purge.c:
Output to stderr instead of stdout
innobase/trx/trx0rec.c:
Quote index and table names
Avoid sprintf()
innobase/trx/trx0roll.c:
Quote identifier names
Output to stderr instead of stdout
innobase/trx/trx0sys.c:
Output to stderr instead of stdout
innobase/trx/trx0trx.c:
Output to stream instead of memory buffer
innobase/trx/trx0undo.c:
Output to stderr instead of stdout
innobase/ut/ut0ut.c:
Declare mysql_get_identifier_quote_char()
Remove ut_sprintf_buf()
Add ut_print_name() and ut_print_namel()
Add ut_copy_file()
sql/ha_innodb.cc:
innobase_mysql_print_thd(): output to stream, not to memory buffer
Add mysql_get_identifier_quote_char()
Remove unused function innobase_print_error()
Display pointers with %p
Buffer InnoDB output via files, not via statically allocated memory
2004-04-06 16:14:43 +03:00
|
|
|
extern FILE* dict_foreign_err_file;
|
2003-05-04 23:24:23 +03:00
|
|
|
extern mutex_t dict_foreign_err_mutex; /* mutex protecting the buffers */
|
2001-02-17 14:19:19 +02:00
|
|
|
|
2001-10-10 22:47:08 +03:00
|
|
|
extern dict_sys_t* dict_sys; /* the dictionary system */
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 23:16:46 +02:00
|
|
|
extern rw_lock_t dict_operation_lock;
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
/* Dictionary system struct */
|
|
|
|
struct dict_sys_struct{
|
|
|
|
mutex_t mutex; /* mutex protecting the data
|
|
|
|
dictionary; protects also the
|
|
|
|
disk-based dictionary system tables;
|
|
|
|
this mutex serializes CREATE TABLE
|
|
|
|
and DROP TABLE, as well as reading
|
|
|
|
the dictionary data for a table from
|
|
|
|
system tables */
|
|
|
|
dulint row_id; /* the next row id to assign;
|
|
|
|
NOTE that at a checkpoint this
|
|
|
|
must be written to the dict system
|
|
|
|
header and flushed to a file; in
|
|
|
|
recovery this must be derived from
|
|
|
|
the log records */
|
|
|
|
hash_table_t* table_hash; /* hash table of the tables, based
|
|
|
|
on name */
|
|
|
|
hash_table_t* table_id_hash; /* hash table of the tables, based
|
|
|
|
on id */
|
|
|
|
hash_table_t* col_hash; /* hash table of the columns */
|
|
|
|
UT_LIST_BASE_NODE_T(dict_table_t)
|
|
|
|
table_LRU; /* LRU list of tables */
|
|
|
|
ulint size; /* varying space in bytes occupied
|
|
|
|
by the data dictionary table and
|
|
|
|
index objects */
|
|
|
|
dict_table_t* sys_tables; /* SYS_TABLES table */
|
|
|
|
dict_table_t* sys_columns; /* SYS_COLUMNS table */
|
|
|
|
dict_table_t* sys_indexes; /* SYS_INDEXES table */
|
|
|
|
dict_table_t* sys_fields; /* SYS_FIELDS table */
|
2003-10-07 17:28:59 +03:00
|
|
|
};
|
2001-02-17 14:19:19 +02:00
|
|
|
|
|
|
|
#ifndef UNIV_NONINL
|
|
|
|
#include "dict0dict.ic"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|