Commit graph

61 commits

Author SHA1 Message Date
marko
e87b68e001 row_vers_build_for_semi_consistent_read(): rec_trx_id was uninitialized
in a comparison.  Initialize it.
2006-08-14 11:18:18 +00:00
marko
2d45f76523 Merge code from MySQL:
ChangeSet@1.2181.173.1  2006-08-02 17:57:06+02:00  ingo@local

Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Changed back the encoded temp file prefix to #sql.
2006-08-14 07:34:26 +00:00
marko
b758497312 Correct all URLs pointing to the MySQL manual. (Bug #21467) 2006-08-08 10:54:57 +00:00
marko
e79ebe8315 After ut_print_timestamp(), always display " InnoDB:" (note two spaces). 2006-08-02 06:52:44 +00:00
marko
52c09c8c9c row_rename_table_for_mysql(): Restore the row_mysql_unlock_data_dictionary()
call that was accidentally removed in r674.
2006-07-31 11:05:14 +00:00
marko
cef9a0265f Remove the special treatment of tables
rsql_IDENTIFIER_recover_innodb_tmp_table, which is redundant and
was broken with the introduction of the "safe" file name encoding of
identifiers.  (Bug #21313)
2006-07-27 18:41:37 +00:00
osku
fb6d2015dc Revert r622 (innodb_sql table) as it was decided it's not appropriate for
the GPL InnoDB version.
2006-06-09 06:37:41 +00:00
osku
7f836357b5 Don't take unnecessary locks on supremum records when the
srv_locks_unsafe_for_binlog option is enabled. Fixes an assertion failure in
the innodb_unsafe_binlog testcase when compiled with UNIV_DEBUG.
2006-06-08 06:14:09 +00:00
osku
0049d987bc Add special 'innodb_sql' table that can be used to pass SQL commands to
InnoDB through MySQL.
2006-06-08 06:12:29 +00:00
osku
487da7028a Add support for lock waits in the SQL parser. 2006-06-08 06:08:23 +00:00
osku
124d970fcb Changes to InnoDB's SQL parser:
-Change default mode of SELECT from "lock in share mode" to "consistent
 read".

 -Remove support from SELECT for specifying "consistent read".

 -Add support in SELECT for specifying "lock in share mode".

 -Change all uses of SQL parser to specify "lock in share mode".
2006-05-31 05:34:18 +00:00
marko
90d0009b25 Merge r596 from branches/5.0: row_sel_try_search_shortcut(): Do not return
SEL_FOUND when the record was not found.  This bug was introduced in
MySQL/InnoDB 5.0.3, but luckily it should never manifest itself, given
that existing InnoDB SQL code never makes use of consistent reads.
2006-05-29 12:02:24 +00:00
osku
5adcddab31 Disable prefetch and adaptive hash index for tables with rows over 1024
bytes in InnoDB's SQL parser.
2006-05-26 11:01:39 +00:00
marko
85ccc78fe3 Adapt InnoDB to the new tablename to filename encoding in MySQL 5.1.
ut_print_name(), ut_print_namel(): Add parameter table_id for distinguishing
names of tables from other identifiers (names of indexes, columns and
constraints).

innobase_convert_from_table_id(), innobase_convert_from_id(),
innobase_convert_from_filename(), innobase_get_charset(): New functions.

dict_accept(), dict_scan_id(), dict_scan_col(), dict_scan_table_name(),
dict_skip_word(), dict_create_foreign_constraints_low():
Add parameter "cs", so that isspace() can be replaced with my_isspace(),
whose operation depends on the connection character set.

dict_scan_id(): Convert the identifier to UTF-8.

dict_str_starts_with_keyword(): New extern function, to replace dict_accept()
in row_search_for_mysql().

mysql_get_identifier_quote_char(): Replaced with innobase_print_identifier().

ha_innobase::create(): Remove the thd->convert_string() call.
Pass the statement to InnoDB in the connection character set
and let InnoDB convert the identifiers to UTF-8.
2006-05-24 10:27:17 +00:00
osku
5fbd019220 Optimize BLOB selects by using prebuilt->blob_heap directly instead of first
reading BLOB data to a temporary heap and then copying it to
prebuilt->blob_heap.
2006-05-23 11:35:58 +00:00
osku
135e5219e0 Fetch externally stored fields when using InnoDB's internal SQL parser. 2006-05-23 05:49:17 +00:00
osku
f2651a69ba row_sel_store_mysql_rec(): Remove useless call to rec_get_nth_field
when handling an externally stored column.
2006-05-22 07:29:00 +00:00
osku
a6ce71b013 Move trx_commit_for_mysql(trx) calls in row0mysql.c before calls to
row_mysql_unlock_data_dictionary(trx), fixing bug #19727.
2006-05-12 11:13:18 +00:00
osku
32fa3568a3 row_fetch_print: Handle SQL NULL values without crashing. 2006-05-05 07:24:03 +00:00
osku
032df406cb Remove remnants of the obsolete concept of memoryfixing tables and indexes.
Remove unused dict_table_LRU_trim().

Remove unused 'trx' parameter from the functions dict_table_get_on_id_low,
dict_table_get and dict_table_get_and_increment_handle_count.
2006-04-24 09:39:13 +00:00
osku
20694fdb8f Use bound literals in row_rename_table_for_mysql. 2006-04-17 08:14:04 +00:00
osku
177a588be9 Use bound literals in row_discard_tablespace_for_mysql. 2006-04-13 06:22:52 +00:00
osku
9f461c9082 Use bound literals in row_drop_table_for_mysql. 2006-04-12 18:17:47 +00:00
osku
bb73e5897e Use bound literals in row_truncate_table_for_mysql. 2006-04-12 18:14:06 +00:00
osku
b6e02dd207 Fix bug #18934, "InnoDB crashes when table uses column names like
DB_ROW_ID", by refusing tables that use reserved column names.

Add dict_mem_table_free(), use it instead of duplicating the code everywhere.

Use already existing dict_mem_index_free().

Fix memory leaks in row_create_table_for_mysql() in rare corner cases.
2006-04-11 14:01:17 +00:00
marko
738611672f Remove code related to clustered tables. They were never implemented, and
the implementation would be challenging with ROW_FORMAT=COMPACT.

Remove the table types DICT_TABLE_CLUSTER_MEMBER and DICT_TABLE_CLUSTER and
all related tests and functions.

dict_table_t: Remove mix_id, mix_len, mix_id_len, mix_id_buf, and
cluster_name.

plan_t: Remove mixed_index.

dict_create_sys_tables_tuple(): Set MIX_ID=0, MIX_LEN=0 and CLUSTER_NAME=NULL
when inserting into SYS_TABLES.

dict_tree_check_search_tuple(): Enclose in #ifdef UNIV_DEBUG.
2006-04-11 12:51:34 +00:00
osku
e19af6d512 row_mysql_is_system_table(): Use strncmp, not memcmp, since we don't know
how long the input string is.
2006-04-11 06:53:19 +00:00
osku
ef56c53e9a Add row_fetch_store_uint4(). 2006-04-07 07:15:03 +00:00
osku
a0553ca9ae Support user-function callbacks for processing results of FETCH statements
in InnoDB's SQL parser.
2006-03-29 11:20:29 +00:00
jan
1bd22ab327 Setting a isolation level of the transaction to read committed
weakens the locks for this session similarly like the option
innodb_locks_unsafe_for_binlog. This patch removes almost all
gap locking (used in next-key locking) and makes MySQL to release
the row locks on the rows which does not belong to result set.
Additionally, nonlocking selects on INSERT INTO SELECT,
UPDATE ... (SELECT ...), and CREATE ... SELECT ... use a
nonlocking consistent read. If a binlog is used, then binlog
format should be set to row based binloging to make the execution
of the complex SQL statements.
2006-03-27 05:33:30 +00:00
osku
f58fa91cdc fetch_step(): Print a more useful error message when the cursor is closed. 2006-03-22 13:23:07 +00:00
heikki
49da24d881 Remove yet another typo from my last commit. 2006-03-22 12:28:19 +00:00
heikki
4e048a2a16 Fix yet another typo in my previous commit. 2006-03-22 09:47:01 +00:00
heikki
564547b2a5 Fix a typo in my previous commit. 2006-03-21 16:08:43 +00:00
heikki
2f2c5642f6 Fix MySQL-5.1 bug http://bugs.mysql.com/bug.php?id=17992 and its
duplicate http://bugs.mysql.com/bug.php?id=17134 : MySQL's partitioned 
table code does not set prebuilt->sql_stat_start right if it does an 
insert in the same statement after doing a search first in the same 
partition table. We now write trx id always to the buffer, not just when 
flag sql_stat_start is on. This will waste CPU time very slightly.
2006-03-21 15:57:55 +00:00
marko
ea96a298fe Merge r355 from branches/5.0: Remove a memory leak when trying to insert
a duplicate record to a clustered index comprising
more than about 90 columns.  (Bug #18384)

row_ins_duplicate_error_in_clust(): Call mem_heap_free(heap) at func_exit
if needed.
2006-03-21 09:15:28 +00:00
marko
43a21f6ed4 Merge r328:340 from branches/5.0:
r340: Fix http://bugs.mysql.com/bug.php?id=18283 in ha_innodb.cc and
http://bugs.mysql.com/bug.php?id=18238 in InnoDB

r339: Remove disk space leak on update of BLOB columns (Bug #18252).

btr_cur_pessimistic_update(): Invoke rec_get_offsets() after
rec_set_field_extern_bits().

btr_store_big_rec_extern_fields(): Note that offsets will no longer be
valid after calling this function.

r338: Fix bug 18238 : check in pessimistic insert and update if the buffer
pool is exhausted by locks
2006-03-17 08:20:14 +00:00
marko
2a574b90b3 Merge r328 from branches/5.0:
Remove UNIV_RELEASE_NOT_YET_STABLE and related checks.

page_rec_is_comp(): Remove the bounds check.

row_sel_field_store_in_mysql_format(): Turn the assertions on mbminlen,
mbmaxlen and templ->type into debug assertions.
2006-03-15 11:02:14 +00:00
osku
7340e52d1f Port parts of r297 from branches/fts:
row_upd_index_replace_new_col_vals_index_pos(): Add a parameter, "ibool
order_only", for limiting the replacement to the ordering fields of the
index. Adjust callers.

 In this port, the comment for the parameter was adjusted to make it clear
 that it only supports clustered indexes.
2006-03-10 11:06:33 +00:00
osku
52d2051e95 Change ut_print_buf() and mem_analyze_corruption() to take a void*, not a
byte*. Remove redundant casts from callers.
2006-03-06 09:45:04 +00:00
osku
d98d98e200 row0mysql.c: Replace tabs within strings with spaces. 2006-03-02 07:35:23 +00:00
jan
e671330bb0 Fix for bug #12456: Cursor shows incorrect data - DML does not affect,
probably caching. Fixed test results.

This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications 
done by the creating transaction after the cursor is created or 
future transactions are not visible. But those modifications that 
transaction did before the cursor was created are visible.
2006-03-01 07:47:14 +00:00
osku
1a8f28e6dd Remove "ibool comp" from dict_table_t and replace it with "ulint flags"
which can contain the new flag DICT_TF_COMPACT. Change dict_mem_table_create
to take a flags argument. Add dict_table_is_comp(). Adapt all users.

Change some places to explicitly assume that system tables do not use the
compact page format.
2006-02-27 09:11:57 +00:00
osku
ab8517f396 Fix invalid brace positioning and spaces before tabs. 2006-02-24 09:53:01 +00:00
osku
591e526f93 Remove tabs from within printed strings and two instances of trailing
whitespace.
2006-02-24 09:41:20 +00:00
marko
e9b3cc0de9 Add dummy return statements to the #ifdef UNIV_HOTBACKUP branches of some
functions that are excluded from InnoDB Hot Backup builds.
2006-02-23 13:12:36 +00:00
osku
ac69f8c21b Style cleanups: Convert spaces to tabs, remove trailing whitespace, other
misc cleanups.
2006-02-21 12:37:54 +00:00
marko
9596f6d82d Merge r102 from hotbackup/trunk.
Corrected some comments.

os_file_create_tmpfile(): Remove the implementation from InnoDB Hot Backup.

In InnoDB Hot Backup builds, do not define dict_casedn_str(),
which is invoked in fil_load_single_table_tablespace() on
Windows.  This function depends on innobase_casedn_str() and
my_casedn_str().

Define btr_check_node_ptr() and data_error only #ifdef UNIV_DEBUG.
They are only being used in ut_ad() assertions.

Replace the occurrences of the type uint with ulint, because InnoDB
Hot Backup does not define any uint data type.

Disable lock_validate() in InnoDB Hot Backup builds.

Disable some unused static variables of srv0srv.c in InnoDB Hot Backup builds.

Disable some srv_table_...() functions in InnoDB Hot Backup builds.

Disable some unused static variables in srv0start.c in
InnoDB Hot Backup builds.

Disable io_handler_thread() in InnoDB Hot Backup builds.

Disable srv_calc_low32() and srv_calc_high32() in InnoDB Hot Backup builds
to avoid warnings about unused functions.

In fil_node_open_file(), avoid bogus assertions in InnoDB Hot Backup builds.

In fil_load_single_table_tablespace(), remove the call to dict_casedn_str(),
as it depends on MySQL code.

Copy the code of recv_reset_log_files_for_backup() from InnoDB Hot Backup.

Disable innobase_mysql_cmp(), cmp_whole_field(), cmp_data_data_slow(),
cmp_dtuple_rec_with_match() and cmp_rec_rec_with_match()
in InnoDB Hot Backup builds, as they depend on MySQL code.

Adapt dtype_set_mblen() and dtype_get_fixed_size() for InnoDB Hot Backup
builds, assuming that they will only be called on system tables, which
do not contain multi-byte characters.

Disable the static functions row_ins_set_exclusive_rec_lock() and
row_ins_dupl_error_with_rec() in InnoDB Hot Backup builds
to avoid warnings about unused functions.

In row_sel_field_store_in_mysql_format(), disable some UTF-8 related
assertions #ifndef UNIV_RELEASE_NOT_YET_STABLE.
2006-02-21 08:43:31 +00:00
osku
44a14a1791 Fix all function declarations to have the correct number of '=' characters. 2006-02-20 12:12:22 +00:00
marko
3dc3f2a83e Replace assertions on constant conditions with preprocessor conditions. 2006-02-15 09:00:03 +00:00