into mysql.com:/home/dlenev/src/mysql-4.1-secfix
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
he has SELECT and INSERT privileges for table with primary key"
Now we set lex->duplicates= DUP_UPDATE right in parser if INSERT has
ON DUPLICATE KEY UPDATE clause, this simplifies insert_precheck()
function (this also fixes a bug) and some other code.
mysql-test/r/grant2.result:
Added test for bug #6173 "One can circumvent missing UPDATE privilege if
he has SELECT and INSERT privileges for table with primary key"
mysql-test/t/grant2.test:
Added test for bug #6173 "One can circumvent missing UPDATE privilege if
he has SELECT and INSERT privileges for table with primary key"
sql/mysql_priv.h:
insert_precheck() don't need "update" parameter any longer since
now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
KEY UPDATE clause.
sql/sql_parse.cc:
insert_precheck() don't need "update" parameter any longer since
now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
KEY UPDATE clause, so it can determine whenever it is needed to
require UPDATE_ACL by itself. Also calling of mysql_insert() is
simplified.
sql/sql_prepare.cc:
insert_precheck() don't need "update" parameter any longer since
now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
KEY UPDATE clause, so it can determine whenever it is needed to
require UPDATE_ACL by itself. Also calling of mysql_insert() is
simplified.
sql/sql_yacc.yy:
It is better to set Lex->duplicates= DUP_UPDATE right in parser if we
have INSERT with ON DUPLICATE KEY UPDATE clause, rather doing this later.
into mishka.local:/home/my/mysql-4.1
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
doesn't need to have it's own recovery mechanism.
sql/item.cc:
Deployment of centralized Item change registry, step 2: Item_ref
doesn't need to have it's own recovery mechanism, so it was simplified.
sql/item.h:
Deployment of centralized Item change registry, step 2: Item_ref
doesn't need to have it's own recovery mechanism, so it was simplified.
sql/item_cmpfunc.cc:
- Item::split_sum_func now requires THD
- use THD::register_item_tree_change
sql/item_cmpfunc.h:
- Item::split_sum_func now requires THD
sql/item_func.cc:
- Item::split_sum_func now requires THD
- use THD::register_item_tree_change
sql/item_func.h:
- Item::split_sum_func now requires THD
sql/item_row.cc:
- Item::split_sum_func now requires THD
- use THD::register_item_tree_change
sql/item_row.h:
- Item::split_sum_func now requires THD
sql/item_strfunc.cc:
- Item::split_sum_func now requires THD
- use THD::register_item_tree_change to register changes in the item
tree
sql/item_strfunc.h:
- Item::split_sum_func now requires THD
sql/item_subselect.cc:
- use updated Item_ref constructor
sql/sql_base.cc:
- Item::split_sum_func now requires THD
sql/sql_select.cc:
- Item::split_sum_func now requires THD
sql/sql_yacc.yy:
- use updated Item_ref constructor
Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code
include/hash.h:
Added back function that's was used in 4.0
mysql-test/r/delete.result:
Update results after merge
mysql-test/r/flush_table.result:
Update results after merge
mysql-test/r/func_str.result:
Update results after merge
mysql-test/r/handler.result:
Update results after merge
Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/r/multi_update.result:
More startup cleanups
mysql-test/r/rename.result:
More startup-cleanups
mysql-test/r/select.result:
More startup cleanups
mysql-test/r/show_check.result:
More startup-cleanups
mysql-test/t/ctype_latin1_de.test:
Cleanup
mysql-test/t/derived.test:
Portability fix
mysql-test/t/handler.test:
Update results after merge
Change is big becasue in MySQL 4.1 you are not allowed to qualify the handler alias with a databasename
mysql-test/t/multi_update.test:
More startup cleanups
mysql-test/t/range.test:
More comments
mysql-test/t/rename.test:
More startup cleanups
mysql-test/t/select.test:
More startup cleanups
mysql-test/t/show_check.test:
More startup cleanups
mysql-test/t/type_timestamp.test:
Add back test deleted during merge
sql/item_cmpfunc.cc:
After merge fixes
sql/item_func.cc:
Remove compiler warning
sql/mysql_priv.h:
After merge fixes
sql/mysqld.cc:
After merge fixes
sql/sql_acl.cc:
More debugging
sql/sql_base.cc:
After merge fixes
(This fix was needed bacause of multi-table-update reopens tables)
sql/sql_handler.cc:
After merge fixes
sql/sql_lex.h:
After merge fixes
sql/sql_select.cc:
After merge fixes
sql/sql_show.cc:
After merge fixes
sql/sql_table.cc:
After merge fixes
Simple cleanup of mysql_discard_or_import_tablespace
sql/sql_update.cc:
After merge fixes
Rework mysql_multi_update to take into account derived tables.
sql/sql_yacc.yy:
After merge fixes
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-ctype-latin1_de.c~c5d8f9208bceb98e:
Auto merged
Build-tools/mysql-copyright-2:
Auto merged
acinclude.m4:
Auto merged
client/mysqladmin.c:
Auto merged
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/myisam.h:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/buf/buf0buf.c:
Auto merged
ltmain.sh:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/fsp/fsp0fsp.c:
Auto merged
innobase/include/dict0dict.h:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/log/log0log.c:
Auto merged
innobase/log/log0recv.c:
Auto merged
innobase/pars/pars0opt.c:
Auto merged
innobase/row/row0row.c:
Auto merged
innobase/sync/sync0arr.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_close.c:
Auto merged
myisam/mi_create.c:
Auto merged
myisam/mi_locking.c:
Auto merged
myisam/myisampack.c:
Auto merged
mysql-test/r/delete.result:
Auto merged
mysql-test/r/func_if.result:
Auto merged
Build-tools/mysql-copyright:
Merge with 4.0 (too most of the code from 4.0)
Makefile.am:
merge
client/mysql.cc:
Used 4.1 code
configure.in:
merge
innobase/os/os0file.c:
merge
innobase/row/row0mysql.c:
merge
mysql-test/r/ctype_latin1_de.result:
merge
mysql-test/r/flush_table.result:
merge
mysql-test/r/func_str.result:
merge
mysql-test/r/handler.result:
merge
mysql-test/r/multi_update.result:
merge
mysql-test/r/type_timestamp.result:
Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/r/update.result:
merge
mysql-test/t/delete.test:
merge
mysql-test/t/flush_table.test:
merge
mysql-test/t/func_str.test:
merge
mysql-test/t/handler.test:
merge
mysql-test/t/multi_update.test:
merge
mysql-test/t/type_timestamp.test:
Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/t/update.test:
merge
mysys/errors.c:
merge
mysys/my_fstream.c:
merge
mysys/my_pread.c:
merge
mysys/my_write.c:
merge
mysys/mysys_priv.h:
merge
scripts/mysqlhotcopy.sh:
merge
sql/field.cc:
Keep code from 4.1
sql/field.h:
Keep code from 4.1
sql/ha_innodb.cc:
Don't merge lock code from 4.0; Heikki will look at this
sql/ha_myisam.cc:
merge
sql/handler.cc:
merge
sql/item_cmpfunc.cc:
merge
sql/item_cmpfunc.h:
merge
sql/item_strfunc.cc:
merge
sql/mysql_priv.h:
merge
sql/mysqld.cc:
merge
sql/protocol.cc:
merge
sql/records.cc:
merge
sql/repl_failsafe.cc:
merge
mysql-test/r/lock_multi.result:
merge
mysql-test/t/ctype_latin1_de.test:
merge
mysql-test/t/func_if.test:
merge
mysql-test/t/lock_multi.test:
merge
sql/repl_failsafe.h:
merge
Remove unnessessary header protection
sql/slave.h:
merge
sql/sql_acl.cc:
merge
sql/sql_base.cc:
merge
sql/sql_cache.cc:
auto merge
sql/sql_class.cc:
merge
sql/sql_class.h:
merge
sql/sql_delete.cc:
merge
sql/sql_handler.cc:
Get new HANDLER code into 4.1
sql/sql_parse.cc:
Keep old file
sql/sql_repl.cc:
merge
sql/sql_repl.h:
merge
sql/sql_show.cc:
merge
sql/sql_table.cc:
merge
sql/sql_union.cc:
Applied the examine_rows bug fix from 4.0 by hand
sql/sql_update.cc:
New multi-update-grant-check code from 4.0
sql/sql_yacc.yy:
New multi-update-grant-check code from 4.0
sql/stacktrace.c:
merge
sql/table.h:
merge
Ensures that WRITE lock is not obtained on all tables referenced.
mysql-test/r/lock_multi.result:
Bug#4118
New test for multi-update locking
mysql-test/r/multi_update.result:
Bug#4118
Fix test
mysql-test/t/lock_multi.test:
Bug#4118
New test for multi-update locking
mysql-test/t/multi_update.test:
Bug#4118
Fix test
sql/sql_parse.cc:
Bug#4118
Split multi-update to its own case statement in sql_parse.cc
sql/sql_update.cc:
Bug#4118
Overview of locking checking:
1. Open and acquire READ lock
2. Check to see which tables need WRITE lock
3. Unlock tables and relock
sql/sql_yacc.yy:
Bug#4118
Split multi-update to its own case statement in sql_parse.cc
column types TIMESTAMP is NOT NULL by default, so in order to have
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).
Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
mysql-test/r/type_timestamp.result:
Added test for TIMESTAMP columns which are able to store NULL values.
mysql-test/t/type_timestamp.test:
Added test for TIMESTAMP columns which are able to store NULL values.
sql/field.cc:
Added support for TIMESTAMP fields holding NULL values.
We don't need Field_timestamp::set_timestamp_offsets() anymore.
Instead we need Field_timestamp::get_auto_set_type() function
which will convert TIMESTAMP auto-set type stored in Field in
unireg_check to value from timestamp_auto_set_type_enum.
(We can't replace this function with additional Field_timestamp member
and some code in constructor because then we will have troubles
with Field::new_field() method).
We should also set field to not null in Field_timestamp::set_time() now.
sql/field.h:
Added support for TIMESTAMP fields holding NULL values.
We don't need Field_timestamp::set_timestamp_offsets() anymore.
Instead we need Field_timestamp::get_auto_set_type() function,
which will convert TIMESTAMP auto-set type stored in Field in
unireg_check to value from timestamp_auto_set_type_enum.
We also have to support NULL values in Field_timestamp::get_timestamp()
function.
sql/field_conv.cc:
Added comment clarifying behavior in case of TIMESTAMP fields which are
able to store NULL values.
sql/ha_berkeley.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_heap.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_innodb.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_isam.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_isammrg.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_myisam.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_myisammrg.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_ndbcluster.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/handler.cc:
handler::update_timestamp() is no longer needed since now we use
Field_timestamp::set_time() instead.
(we can't use handler::update_timestamp() anyway since field position
only is not enough for TIMESTAMP fields which are able to store NULLs)
sql/handler.h:
handler::update_timestamp() is no longer needed since now we use
Field_timestamp::set_time() instead.
sql/item_timefunc.cc:
Since now TIMESTAMP fields can hold NULL values we should take this into
account.
sql/sql_base.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
(Here we use Field_timestamp::get_auto_set_type() to setup its value
before further statement execution).
sql/sql_insert.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_load.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_parse.cc:
Added support for TIMESTAMP fields holding NULL values.
We should distinguish NULL default values and non-specified default
values for such fields (because latter could mean DEFAULT NOW()
ON UPDATE NOW() in some cases).
sql/sql_show.cc:
Added support for TIMESTAMP fields holding NULL values.
Unlike all other fields these are NOT NULL by default
so we have to specify NULL attribute explicitly for them.
sql/sql_table.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_update.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_yacc.yy:
Added support for TIMESTAMP fields holding NULL values.
Unlike all other fields these are NOT NULL by default
(so we have to set NOT_NULL_FLAG properly for them).
sql/table.h:
Added timestamp_auto_set_type enum which values are used for indicating
during which operations we should automatically set TIMESTAPM field
value to current timestamp.
TABLE: Replaced timestamp_default_now/on_update_now members with
timestamp_auto_set_type flag (Now when TIMESTAMP field are able to
store NULL values, single position of field in record is not enough
for updating this field anyway).
configure.in:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/t/merge.test:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/mysqld.cc:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/danish/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/share/dutch/errmsg.txt:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/estonian/errmsg.txt:
Auto merged
sql/share/french/errmsg.txt:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/italian/errmsg.txt:
Auto merged
sql/share/japanese/errmsg.txt:
Auto merged
sql/share/korean/errmsg.txt:
Auto merged
sql/share/norwegian-ny/errmsg.txt:
Auto merged
sql/share/norwegian/errmsg.txt:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/slovak/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/share/swedish/errmsg.txt:
Auto merged
sql/share/ukrainian/errmsg.txt:
Auto merged
mysql-test/r/union.result:
Merge with 4.0
mysql-test/t/union.test:
Merge with 4.0
sql/ha_innodb.cc:
Merge with 4.0
sql/share/german/errmsg.txt:
Merge with 4.0
sql/share/portuguese/errmsg.txt:
Merge with 4.0
sql/share/russian/errmsg.txt:
Merge with 4.0
sql/sql_parse.cc:
Merge with 4.0
sql/sql_union.cc:
Merge with 4.0 (Keep 4.1 code)
mysql-test/r/negation_elimination.result:
new tests of negation elimination
mysql-test/t/negation_elimination.test:
new tests of negation elimination
sql/item.h:
test of boolean functions added
sql/item_cmpfunc.cc:
NOT subtree is already checked, so wee need to return just argument
sql/item_cmpfunc.h:
test of boolean functions added
sql/mysql_priv.h:
'place' to detect WHERE clause
sql/sql_parse.cc:
function for creation negated expression
sql/sql_select.cc:
removed unused function
sql/sql_select.h:
removed unused function
sql/sql_yacc.yy:
'place' to detect WHERE clause
sql/item_cmpfunc.cc:
NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
sql/item_cmpfunc.h:
NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
sql/sql_select.cc:
NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
sql/sql_yacc.yy:
NOT elimination moved in parsing
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4:
Auto merged
Build-tools/Bootstrap:
Auto merged
Build-tools/mysql-copyright:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
VC++Files/innobase/innobase.dsp:
Auto merged
client/mysql.cc:
Auto merged
include/my_global.h:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/include/mtr0log.h:
Auto merged
innobase/include/mtr0log.ic:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/include/ut0dbg.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
libmysql/Makefile.am:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/conf_to_src.c:
Auto merged
libmysql/dll.c:
Auto merged
libmysql/errmsg.c:
Auto merged
libmysql/manager.c:
Auto merged
libmysql_r/Makefile.am:
Auto merged
myisam/mi_key.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/having.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/type_float.result:
Auto merged
mysql-test/t/having.test:
Auto merged
mysql-test/t/heap.test:
Auto merged
mysql-test/t/type_date.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/type_uint.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.h:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.h:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_analyse.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/danish/errmsg.txt:
Auto merged
sql/share/dutch/errmsg.txt:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/estonian/errmsg.txt:
Auto merged
sql/share/french/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/japanese/errmsg.txt:
Auto merged
sql/share/korean/errmsg.txt:
Auto merged
sql/share/norwegian-ny/errmsg.txt:
Auto merged
sql/share/norwegian/errmsg.txt:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/portuguese/errmsg.txt:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/share/slovak/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/share/swedish/errmsg.txt:
Auto merged
sql/share/ukrainian/errmsg.txt:
Auto merged
mysql-test/r/func_gconcat.result:
fix of test queries
mysql-test/r/subselect.result:
resolving fields of grouped outer SELECT
mysql-test/t/func_gconcat.test:
fix of test queries
mysql-test/t/subselect.test:
resolving fields of grouped outer SELECT
sql/item.cc:
skip resolving field in table list if table list is not accessable due to groupping
layout fixed
sql/item_subselect.cc:
detection of place of subquery
sql/item_subselect.h:
detection of place of subquery
sql/mysql_priv.h:
enum_parsing_place made global type
sql/sql_lex.cc:
enum_parsing_place made global type
sql/sql_lex.h:
enum_parsing_place made global type
sql/sql_yacc.yy:
enum_parsing_place made global type
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
or setting of @@time_zone variable we should open and lock them with the rest of
statement's table (so we should add them to global table list) and after that use such
pre-opened tables for loading info about time zones.
mysql-test/r/timezone2.result:
Added test for bug #4508
mysql-test/t/timezone2.test:
Added test for bug #4508
scripts/mysql_create_system_tables.sh:
Added one more test time zone to time zone tables which is needed for test for bug #4508.
sql/item_create.cc:
CONVERT_TZ() now is treated as special function.
sql/item_create.h:
CONVERT_TZ() now is treated as special function.
sql/item_timefunc.cc:
Item_func_convert_tz now uses list of pre-opened time zone tables instead of trying to
open them ad-hoc. Also it avoid calling of current_thd.
sql/item_timefunc.h:
Added comment describing special nature of CONVERT_TZ() function.
Optimization: Added own fix_fields() method and tz_tables member for caching pointer
to list of open time zone tables to Item_func_convert_tz class.
sql/lex.h:
CONVERT_TZ() now is treated as special function.
sql/mysql_priv.h:
Removed function which is no longer used.
sql/set_var.cc:
Now my_tz_find() accepts list of pre-opened time zone tables as last argument
and no longer needs pointer to current THD.
sql/set_var.h:
Exported sys_time_zone, which is now used in sql_yacc.yy for quick finding out if we are
setting @@time_zone variable.
sql/sql_base.cc:
Moved propagation of pointers to open tables from global list to local select lists to
open_and_lock_tables(), also added implicit usage of time zone tables as condition for
such propagation.
sql/sql_lex.cc:
Added fake_time_zone_tables_list which is used to indicate that time zone tables are
implicitly used in statement.
st_select_lex_unit::create_total_list(): if time zone tables are implicitly used in
statement add them to global tables list.
sql/sql_lex.h:
Added LEX::time_zone_tables_used member which is used to indicate that time zone tables
are implicitly used in this statement (by pointing to fake_time_zone_table_list) and
for holding pointer to those tables after they've been opened.
sql/sql_parse.cc:
We should also create global table list if statement uses time zone tables implicitly.
Added initialization of LEX::time_zone_tables_used to mysql_query_init().
sql/sql_prepare.cc:
We should also create global table list if statement uses time zone tables implicitly.
sql/sql_select.cc:
Removed functions which are no longer used.
sql/sql_yacc.yy:
CONVERT_TZ() and @@time_zone variable are handled in special way since they implicitly
use time zone tables.
sql/tztime.cc:
Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
If statement uses CONVERT_TZ() function or @@time_zone variable is set then it implicitly
uses time zone tables. We need to open and lock such tables with all other tables of
such statement.
All code responsible for opening table was removed from tz_load_from_db() and function was
renamed to tz_load_from_open_tables() (which uses list of pre-opened tables).
We also have new functions for construction and initialization of table list of time
zone tables.
my_tz_find() now always require list of pre-opened time zone tables and no longer needs
current THD. So we have to pre-open them in my_tz_init().
Also now we try to open time zone tables only if they were found during startup.
sql/tztime.h:
New function for construction of table list of time zone tables my_tz_get_table_list().
Now my_tz_find() requires list of pre-pened time zone tables instead of current thread.
mysql-test/r/func_group.result:
fixed
mysql-test/r/ps.result:
SHOW TABLE STATUS test
mysql-test/t/ps.test:
SHOW TABLE STATUS test
sql/sql_parse.cc:
Use lex->describe instead of lex->select_lex.options
sql/sql_yacc.yy:
removed unneed initialization of lex->select_lex.options
mysql-test/r/flush_table.result:
after merge fixed
duplicated tests removed
mysql-test/t/flush_table.test:
after merge fixed
duplicated tests removed
sql/sql_yacc.yy:
alias is not db-qualified
into mysql.com:/home/kostja/mysql/mysql-4.1-4030
sql/field.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/tztime.cc:
Auto merged
work (prepared statements)" and after-review fixes:
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- functions str_to_time and str_to_TIME moved to sql-common
- send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
MYSQL_TIME_DATETIME types of user input buffers.
- few more comments in the client library
- a test case added.
VC++Files/libmysql/libmysql.dsp:
new file: my_time.c
VC++Files/libmysqld/libmysqld.dsp:
new file: my_time.c
VC++Files/sql/mysqld.dsp:
new file: my_time.c
include/Makefile.am:
- mysql_time.h added to the list of installed client library headers
include/mysql.h:
- declarations for MYSQL_TIME and enum_mysql_timestamp_type moved to
mysql_time.h, which is in shared use of client library and mysys.
libmysql/Makefile.shared:
- my_time.lo added to the list of libmysql objects
libmysql/libmysql.c:
Fix for bug#4030 "Client side conversion string -> date type doesn't work
(prepared statements)" and cleanup.
- added case labels for TIME/DATE/DATETIME types to send_data_str
- comments for read_binary_{date,time,datetime}, fetch_result_*, fetch_results.
libmysqld/Makefile.am:
- my_time.c added
sql-common/Makefile.am:
- my_time.c added to the list of files included into source distribution.
sql/Makefile.am:
my_time.c added to the list of mysqld sources.
sql/field.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/item.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/item_timefunc.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/mysql_priv.h:
- added typedefs for TIME and timestamp_type
- removed declarations for str_to_time and str_to_TIME (now this functions
reside in mysys)
sql/mysqld.cc:
- log_10_int moved to mysys (it's used by str_to_TIME and str_to_time)
- enum values TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
sql/set_var.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
sql/set_var.h:
- fixed timestamp_type usage to be compatible with typedef.
sql/sql_prepare.cc:
- TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
- embedded library implementation of set_param_{time,date,datetime} is
much simplier now, as MYSQL_TIME is the same as TIME.
sql/sql_yacc.yy:
- s/\<TIMESTAMP_/MYSQL_TIMESTAMP/gc
sql/structs.h:
- declarations for TIME and timestamp_type replaced with typedefs
- str_to_datetime arguments moved to mysys headers
sql/time.cc:
- str_to_time and str_to_TIME moved to mysys
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...} as these names are now
exported to client.
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- str_to_TIME_with_warn renamed accordingly
sql/tztime.cc:
- TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to
MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
tests/client_test.c:
- a test case for Bug#4030 "Client side conversion string -> date type
doesn't work (prepared statements)"
mysql-test/r/union.result:
test of correct parser stack overflow handling
mysql-test/t/union.test:
test of correct parser stack overflow handling
sql/sql_parse.cc:
parameter of my_yyoverflow made independed from YYSIZE_T
sql/sql_yacc.yy:
parameter of my_yyoverflow made independed from YYSIZE_T
configure.in:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
sql/field.cc:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/lex.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
mysql-test/r/alter_table.result:
Test case for BUG#3899
mysql-test/t/alter_table.test:
Test case for BUG#3899
sql/sql_yacc.yy:
Fix for BUG#3899: call ALTER_INFO::reset to clear ALTER_INFO::drop_list and ALTER_INFO::alter_list
into brandersnatch.localdomain:/home/dlenev/src/mysql-4.1-bg4200
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Now ESCAPE in LIKE will accept not only string literal but constant
delimited expression.
mysql-test/r/func_like.result:
Added test for bug# 4200 "Parse error on LIKE ESCAPE with parameter binding"
mysql-test/t/func_like.test:
Added test for bug# 4200 "Parse error on LIKE ESCAPE with parameter binding"
sql/item_cmpfunc.cc:
Added support for accepting of constant delimited expression as ESCAPE argument to
Item_func_like.
sql/item_cmpfunc.h:
Now ESCAPE clause in LIKE will accept not only string literal but constant delimited
expression. Thus added member to Item_func_like for storing Item corresponding to this
expression and changed third argument of cons to be Item* instead of char*.
sql/sql_help.cc:
Item_func_like now accepts Item* as third argument.
sql/sql_yacc.yy:
Now ESCAPE clause of LIKE accepts not only string literal but constant delimited expression
(the most important case is prepared statement parameter of course).
Fixed problem with NULL and derived tables (Bug #4097)
Cleanup of new pushed code
BitKeeper/etc/ignore:
added mysql-test/ndb/ndbcluster
client/mysqltest.c:
simple cleanup
innobase/os/os0file.c:
fix for netware
libmysql/libmysql.c:
Fixed some byte order bugs with prepared statements on machines with
high-byte-first. (Bug #4173)
myisam/ft_boolean_search.c:
Comment cleanup
myisam/mi_check.c:
Removed not needed check (check is done in check_index())
myisam/mi_unique.c:
crc must be of type ha_checksum.
myisam/myisamchk.c:
Portability fix.
mysql-test/mysql-test-run.sh:
Simple cleanup
mysql-test/r/subselect.result:
Test problem with NULL and derived tables (Bug #4097)
mysql-test/t/subselect.test:
Test problem with NULL and derived tables (Bug #4097)
sql/mysqld.cc:
Remove not used defines
sql/sql_select.cc:
Fixed problem with NULL and derived tables (Bug #4097)
Indentation fixes
sql/sql_string.cc:
Code cleanup
sql/sql_yacc.yy:
Allow one to use DROP PREPARE ...
mysql-test/r/ps.result:
Better error message
mysys/my_error.c:
Comments added
sql/item.cc:
Moved a chunk of code from sql_prepare.cc to Item_param::set_from_user_var
sql/item.h:
Moved a chunk of code from sql_prepare.cc to Item_param::set_from_user_var
sql/item_func.cc:
Code cleanup
sql/mysql_priv.h:
Code cleanup
sql/sql_class.cc:
Code cleanup
sql/sql_parse.cc:
use user_var_entry::val_str in PREPARE stmt FROM @var.
sql/sql_prepare.cc:
Post-review fixes and code cleanup.
sql/sql_yacc.yy:
Coding style fixes