Commit graph

40 commits

Author SHA1 Message Date
marko
ead23091ae Merge a change from MySQL AB:
ChangeSet@1.2456.1.3, 2007-02-27 20:06:37+02:00, monty@mysql.com +2 -0
  Fix (last) compiler warnings

  storage/innobase/pars/lexyy.c@1.23, 2007-02-27 20:06:36+02:00, monty@mysql.com +1 -1
    Fix compiler warnings (fix is also in pars0lex.l)
2007-03-01 15:24:14 +00:00
marko
ed18169c68 Merge changes from MySQL AB:
ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
  Fixed compiler warnings
  ...
  Fixed compiler warnings detected on windows64
2007-03-01 15:21:12 +00:00
marko
4c643e0e1a Merge r1239 from
branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
2007-01-18 21:27:31 +00:00
marko
b0b266a9c6 Merge a change from MySQL AB:
ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0
  Many files:
    Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
    Adjusted year(s) in copyright header 
    Added GPL copyright text
2007-01-11 09:36:27 +00:00
osku
a2a7c6cab5 Revamp the line splits done in r763 and r764 that can now be done better,
thanks to r826.
2006-09-19 07:22:21 +00:00
marko
79644bdb8e dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
so that all integer fields can be packed into 64 bits.  (Bug #20877)

dtype_t: Change the type of all bit-fields to unsigned.

dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
dict_table_get_sys_col(), dict_field_get_col(): Return const
dict_col_t*, so that changes to dict_col_t can be detected more
easily.  Add const to many dict_col_t* declarations.

dict_index_get_nth_type(): Replace with dict_index_get_nth_col().

dict_col_get_type(): Replace with dict_col_copy_type().

dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
dict_col_get_sql_null_size(): New functions.

dtype_get_at_most_n_mbchars(): Replace the parameter dtype
with the parameters prtype, mbminlen, mbmaxlen.

dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
cmp_whole_field(): Replace the dtype_t* parameter with the ulint
parameters mtype, prtype.

dtype_copy(): Add a const qualifier to type2 (the one being copied from).

dtype_set_mblen(): Replaced with dtype_get_mblen().

dtype_get_fixed_size_low(), dtype_get_min_size_low(),
dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
dtype_get_min_size(), and dtype_get_max_size().  These are used by the
dict_col_get_{fixed,min,max}_size() functions.

cmp_types_are_equal(): Replace with cmp_cols_are_equal().

dict_table_get_col_name(): Add a const qualifier parameter to the
parameter "table".

dtype_binary, dtype_binary_val: Remove.

dtype_is_fixed_size(): Remove.
2006-09-18 11:51:38 +00:00
osku
3729812895 Add dict_table_get_col_name() in preparation for getting rid of
dict_col_t::name, and use it instead of col->name everywhere.
2006-09-18 09:46:05 +00:00
marko
1c1026ec0d Reduce the size of the data dictionary cache. (Bug #20877)
dtype_t: Remove unused field "prec", which was supposed to be used for
the precision of decimal columns in stand-alone InnoDB.

dtype_get_prec(): Remove.

dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".

dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
into bit-fields.

dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.

dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.

Replace the default clust_pos value ULINT_UNDEFINED with
REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
the accessor function dict_col_get_clust_pos().

dict_field_t: Turn prefix_len and fixed_len into bit-fields.

dict_tree_t: Remove pad[64].

dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
cached, flags, stat_initialized, and autoinc_inited into bit-fields.
Remove does_not_fit_in_memory from non-debug builds.

dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.

dict_foreign_struct: Turn n_fields and type into bit-fields.

rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
Omit level unless #defined UNIV_SYNC_DEBUG.

Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
2006-09-12 14:06:46 +00:00
marko
27dffa4f7d Split lines before binary operators, not after them. 2006-08-29 08:27:56 +00:00
marko
917941e44c Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
2006-08-29 07:33:51 +00:00
marko
8f18616ef0 Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).  From now on, the following Emacs cc-mode settings apply
when indenting C function bodies in InnoDB:

(setq c-basic-offset 8)
(setq c-label-minimum-indentation 0)
(add-to-list 'c-offsets-alist '(c . 0))
(add-to-list 'c-offsets-alist '(label . [0]))

The indentation rules for function declarations still have not been
formalized, and they must be formatted manually.

Try to limit all lines to at most 79 characters (assuming TAB stops every
8 characters) by splitting lines before opening parenthesis, or at
string constants.

Fix some grammar mistakes in diagnostic output:
 match to, match with -> match
 found from -> found in
 trying rename -> trying to rename

Fix an error in page_check_dir(): it said "supremum not pointed to"
when the infimum was not pointed to.

Enclose commented-out code snippets in #if 0 ... #endif instead of /* ... */.
Add (void*) casts to some %p parameters in fprintf() calls.  Try to
split lines before a binary operator, not after one.  (These three fixes
were not made everywhere.)
2006-08-28 17:42:45 +00:00
osku
be6eaf9a6a SQL parser: Modify syntax so that the only valid top-level statement is a
procedure definition, since it's the only the one that actually works.
2006-06-01 07:19:16 +00:00
osku
e41eec23b0 pars_sql(): Remove redundant call to strlen. 2006-05-31 10:20:38 +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
osku
03e2996446 Add support for DATA_CHAR type in bound literals in the SQL parser. 2006-05-10 06:37:13 +00:00
osku
e8b80a5afe Add support for bound ids in InnoDB's SQL parser. 2006-05-08 05:13:09 +00:00
osku
5fa4d38e0f pars_info_add_*(): In debug builds (UNIV_DEBUG), check that the given name
is not already used.
2006-04-15 14:58:17 +00:00
jan
7631ed9cde Add general function to evaluate a sql query. Add function to evaluate
dulints in host variables.
2006-04-12 10:40:22 +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
690ac61570 Allow access to system columns like DB_ROW_ID in InnoDB's SQL parser. 2006-04-10 12:05:03 +00:00
osku
024530e8c1 Rename ib_vector typedef to ib_vector_t. 2006-04-06 10:02:44 +00:00
osku
ed93b381e5 Since the function definitions in pars_info_t are accessed after pars_sql()
returns in the query graph execution stage, we can't free pars_info_t in
pars_sql(). Instead, make pars_sql() transfer ownership of pars_info_t to
the created query graph, and make que_graph_free() free it if needed.
2006-04-06 07:52:14 +00:00
osku
6461de977a Rewrite pars_info datatypes and APIs, add a few helper functions. 2006-04-06 05:20:59 +00:00
osku
f3bd718c5c Allow bound literals of type non-INTEGER to be of length 0. 2006-04-04 05:05:19 +00:00
marko
adbda85e8d sym_tab_add_bound_lit(): Remove warning about possibly uninitialized 'len'. 2006-04-03 11:29:59 +00:00
osku
25ec27f3e7 Support DATA_VARCHAR for bound literals.
pars_bound_lit_t: Change 'address' from 'void*' to 'const void*'.
2006-04-01 09:41:58 +00:00
osku
727354aeea Add support for bound literals in the SQL parser. 2006-04-01 06:06:59 +00:00
osku
a19d860bd6 pars_set_dfield_type():
Remove never-reached duplicate code.

 Replace "if (!cond) ut_error" with "ut_a(cond)".
2006-03-31 05:50:42 +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
osku
c56a927e68 Support quoted identifiers in InnoDB's SQL parser. Original patch by marko,
testing and a few fixes by me.
2006-03-29 11:18:20 +00:00
osku
0c87a9abcc sym_tab_add_id(): Fix bug where we generated a string one character too
long.
2006-03-28 09:35:33 +00:00
osku
05e97fc7c7 Add make_flex.sh and update lexer/parser generation documentation. 2006-03-28 09:32:48 +00:00
osku
57341d4425 Port r371 and r372 from branches/fts:
Add support for the EXIT keyword in InnoDB's SQL parser.

Add short introduction to query graphs.
2006-03-28 06:41:31 +00:00
osku
f015b825fe Add support for UNSIGNED types in InnoDB's SQL parser.
Remove trailing whitespace from flex/bison input files.
2006-03-17 12:44:34 +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
ac69f8c21b Style cleanups: Convert spaces to tabs, remove trailing whitespace, other
misc cleanups.
2006-02-21 12:37:54 +00:00
osku
460042ef0d Remove the concept of "field order", as we will not support descending order
indexes.
2006-02-20 12:38:10 +00:00
osku
5ea7253fae Enhance InnoDB SQL parser:
Add support for NOT NULL in column definitions.

 Support INTEGER as an alias for INT.

 Add pars/make_bison.sh to automate parser generation.
2006-02-20 07:51:37 +00:00
osku
e3d753ab40 Add support for BINARY(n) and BLOB types in the InnoDB SQL parser. 2006-02-16 14:01:42 +00:00
osku
2903c72469 Import 5.0 code. 2005-10-27 07:29:40 +00:00