Commit graph

382 commits

Author SHA1 Message Date
unknown
d0394c7070 view.result, view.test:
Corrected test case for the bug#21261
sql_parse.cc:
  Corrected fix for bug#21261


mysql-test/t/view.test:
  Corrected test case for the bug#21261
mysql-test/r/view.result:
  Corrected test case for the bug#21261
sql/sql_parse.cc:
  Corrected fix for bug#21261
2006-08-24 03:05:13 +04:00
unknown
f96ee72fb0 Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.

The fix is to check length of user/host name in parser and if string is too
long, throw an error.


mysql-test/r/grant.result:
  Updated result file.
mysql-test/r/sp.result:
  Updated result file.
mysql-test/r/trigger.result:
  Updated result file.
mysql-test/r/view.result:
  Updated result file.
mysql-test/t/grant.test:
  Added test for BUG#16899.
mysql-test/t/sp.test:
  Added test for BUG#16899.
mysql-test/t/trigger.test:
  Added test for BUG#16899.
mysql-test/t/view.test:
  Added test for BUG#16899.
sql/mysql_priv.h:
  Added prototype for new function.
sql/share/errmsg.txt:
  Added new resources.
sql/sql_acl.cc:
  Remove outdated checks.
sql/sql_parse.cc:
  Add a new function for checking string length.
sql/sql_yacc.yy:
  Check length of user/host name.
2006-08-23 21:31:00 +04:00
unknown
1cbebc6e18 ndb_condition_pushdown.result:
Corrected test case result after fix for bug#18165
view.result, view.test:
  Corrected test case for bug#21261


mysql-test/t/view.test:
  Corrected test case for bug#21261
mysql-test/r/view.result:
  Corrected test case for bug#21261
mysql-test/r/ndb_condition_pushdown.result:
  Corrected test case result after fix for bug#18165
2006-08-17 18:50:53 +04:00
unknown
c234aaa0ed Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sunlight.local:/local_work/21261-bug-5.0-mysql


sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2006-08-16 18:17:58 +04:00
unknown
a23d1792bc Fixed bug#21261: Wrong access rights was required for an insert into a view
SELECT right instead of INSERT right was required for an insert into to a view.
This wrong behaviour appeared after the fix for bug #20989. Its intention was
to ask only SELECT right for all tables except the very first for a complex
INSERT query. But that patch has done it in a wrong way and lead to asking 
a wrong access right for an insert into a view.

The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.


mysql-test/t/view.test:
  Added a test case for bug#21261: Wrong access rights was required for an insert into a view
mysql-test/r/view.result:
  Added a test case for bug#21261: Wrong access rights was required for an insert into a view
sql/sql_update.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_select.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_load.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_insert.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_delete.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_base.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  The setup_tables_and_check_access() function now accepts two want_access
  parameters. One will be used for the first table and the second for other
  tables.
sql/mysql_priv.h:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  The setup_tables_and_check_access() function now accepts two want_access
  parameters.
2006-08-15 21:45:24 +04:00
unknown
c2ef98ad4c Fixed bug#15950: NOW() optimized away in VIEWs
This bug is a side-effect of bug fix #16377. NOW() is optimized in
BETWEEN to integer constants to speed up query execution. When view is being
created it saves already modified query and thus becomes wrong.

The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
for their results only if the current query isn't CREATE VIEW or SHOW CREATE
VIEW.


mysql-test/t/view.test:
  Added a test case for bug#15950: NOW() optimized away in VIEWs
mysql-test/r/view.result:
  Added a test case for bug#15950: NOW() optimized away in VIEWs
sql/item_cmpfunc.cc:
  Fixed bug#15950: NOW() optimized away in VIEWs
  The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
  for their results only if the current query isn't CREATE VIEW or SHOW CREATE
  VIEW.
2006-08-15 21:02:55 +04:00
unknown
8ce7848a52 Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_view.cc:
  SCCS merged
2006-08-01 20:52:21 +04:00
unknown
464cb603f0 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B11551-5.0-opt


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2006-07-31 21:17:20 +03:00
unknown
b74cb62348 Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
made DROP VIEW to continue on error and report an aggregated error 
 at its end. This makes it similar to DROP TABLE.


mysql-test/r/view.result:
  Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
   - test case
   - changed error message
mysql-test/t/view.test:
  Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
   - test case
sql/sql_view.cc:
  Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
   - made DROP VIEW to continue on error and report an aggregated error
2006-07-31 20:56:06 +03:00
unknown
4acf6de89b Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21080-5.0-opt


mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2006-07-31 17:40:09 +03:00
unknown
c8673b09b8 Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
When executing ALTER TABLE all the attributes of the view were overwritten.
  This is contrary to the user's expectations.
  So some of the view attributes are preserved now : namely security and 
  algorithm. This means that if they are not specified in ALTER VIEW
  their values are preserved from CREATE VIEW instead of being defaulted.


mysql-test/r/view.result:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - test suite
mysql-test/t/view.test:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - test suite
sql/sql_lex.h:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
sql/sql_view.cc:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - open the view to get it's attributes and put then as defaults 
     for ALTER VIEW
sql/sql_yacc.yy:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
sql/table.h:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
2006-07-31 17:33:37 +03:00
unknown
ddb91478e8 Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
  Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
  Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
  Auto merged
BitKeeper/deleted/.del-mysqldump.dsp~a8bd23547d3fc27e:
  Auto merged
BitKeeper/deleted/.del-mysqldump_ia64.dsp~a2aabe898be35b31:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/time.cc:
  Auto merged
storage/ndb/test/ndbapi/Makefile.am:
  Auto merged
strings/decimal.c:
  Auto merged
mysql-test/r/analyse.result:
  Manual merge
mysql-test/r/bigint.result:
  Manual merge
mysql-test/r/create.result:
  Manual merge
mysql-test/r/information_schema.result:
  Manual merge
mysql-test/r/ps_2myisam.result:
  Manual merge
mysql-test/r/ps_3innodb.result:
  Manual merge
mysql-test/r/ps_4heap.result:
  Manual merge
mysql-test/r/ps_5merge.result:
  Manual merge
mysql-test/r/ps_6bdb.result:
  Manual merge
mysql-test/r/rpl_insert_id.result:
  Manual merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/sp.result:
  Manual merge
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/information_schema.test:
  Manual merge
mysql-test/t/rpl_insert_id.test:
  Manual merge
sql/field.h:
  Manual merge
sql/item.cc:
  Manual merge
sql/item.h:
  Manual merge
sql/item_strfunc.h:
  Manual merge
sql/item_sum.cc:
  Manual merge
sql/mysql_priv.h:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
sql/sql_class.h:
  Manual merge
sql/sql_select.cc:
  Manual merge
2006-07-30 00:33:24 +04:00
unknown
1b3cdb6085 Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
When executing INSERT over a view with calculated columns it was assuming all
  elements of the fields collection are actually Item_field instances.
  This may not be true when inserting into a view and that view has columns that are 
  such expressions that allow updating (like setting a collation for example).
  Corrected to access field information through the filed_for_view_update() function and 
  retrieve correctly the field info even for "update-friendly" non-Item_field items.


mysql-test/r/view.result:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - test suite
mysql-test/t/view.test:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - test suite
sql/item_strfunc.h:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - obvious typo fixed
sql/sql_base.cc:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - must access field information through the filed_for_view_update() function to retrieve
     correctly the field info even for "update-friendly" non-Item_field items.
2006-07-25 18:42:49 +03:00
unknown
f8dda7bfb9 Added a test case with views for bug #17526.
mysql-test/r/func_str.result:
  Adjusted results for the test case of bug 17526.
sql/item_strfunc.cc:
  Post-merge modification
2006-07-19 16:42:19 -07:00
unknown
1e44259440 Fixed bug #19714.
DESCRIBE returned the type BIGINT for a column of a view if the column
was specified by an expression over values of the type INT.
    
E.g. for the view defined as follows:
  CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1
DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are
columns of the INT type.
At the same time DESCRIBE returned type INT for the only column of the table
defined by the statement:
  CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1.
    
This inconsistency was removed by the patch.

Now the code chooses between INT/BIGINT depending on the
precision of the aggregated column type.
 
Thus both DESCRIBE commands above returns type INT for v1 and t2.
 


mysql-test/r/analyse.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/bigint.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/create.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/olap.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_2myisam.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_3innodb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_4heap.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_5merge.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_6bdb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_7ndb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/sp.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/subselect.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/type_ranges.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/view.result:
  Added a test case for bug #19714.
mysql-test/t/view.test:
  Added a test case for bug #19714.
2006-07-13 20:48:26 -07:00
unknown
41c7aece39 Added a test case with views for bug 18243 (see also func_str.test). 2006-07-06 14:41:01 -07:00
unknown
e08ff11534 Bug #16110: insert permitted into view col w/o default value
When compiling INSERT statements the check whether columns are provided values
depends on the flag whether a field is used in that query (Field::query_id).
However the check for updatability of VIEW columns (check_view_insertability())
was calling fix_fields() and thus setting the Field::query_id even for the 
view fields that are not referenced in the current INSERT statement.
So the correct check for columns without default values 
( check_that_all_fields_are_given_values() ) is assuming that all the VIEW
columns were mentioned in the INSERT field list and was issuing no 
warnings or errors.
Fixed check_view_insertability() to turn off the flag whether or not to set
Field::query_id (THREAD::set_query_id) before calling fix fields and restore
it when it's done.


mysql-test/r/view.result:
  Bug #16110: insert permitted into view col w/o default value
    * test case
mysql-test/t/view.test:
  Bug #16110: insert permitted into view col w/o default value
    * test case
sql/sql_insert.cc:
  Bug #16110: insert permitted into view col w/o default value
    * avoid setting the "field used" flag for fields when checking view columns 
      for updatability.
    * a missing DBUG_RETURN added.
2006-07-04 12:10:12 +03:00
unknown
9933c3bd3a Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge


mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/extra/rpl_tests/rpl_ddl.test:
  Auto merged
mysql-test/r/rpl_ddl.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/rpl_ndb_charset.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/trigger-grant.result:
  Auto merged
mysql-test/t/archive.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger-grant.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/create.result:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
sql/handler.cc:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
sql/sql_class.h:
  Manual merge
sql/sql_delete.cc:
  Manual merge
sql/sql_insert.cc:
  Manual merge
sql/sql_table.cc:
  Manual merge
2006-06-16 01:15:19 +02:00
unknown
d0dad4bf38 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


BitKeeper/deleted/.del-generate_prefix_files.pl:
  Delete: extra/yassl/include/openssl/generate_prefix_files.pl
BitKeeper/deleted/.del-prefix_crypto.h:
  Delete: extra/yassl/include/openssl/prefix_crypto.h
BitKeeper/deleted/.del-prefix_ssl.h:
  Delete: extra/yassl/include/openssl/prefix_ssl.h
BitKeeper/deleted/.del-Makefile.am~abb265028eb9b6a7:
  Auto merged
BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7:
  Auto merged
BitKeeper/deleted/.del-yassl.m4~e55e55c1e863abaf:
  Auto merged
client/mysqltest.c:
  Auto merged
extra/yassl/include/openssl/crypto.h:
  Auto merged
extra/yassl/include/openssl/ssl.h:
  Auto merged
extra/yassl/include/yassl_int.hpp:
  Auto merged
extra/yassl/src/Makefile.am:
  Auto merged
extra/yassl/src/ssl.cpp:
  Auto merged
extra/yassl/src/template_instnt.cpp:
  Auto merged
extra/yassl/src/yassl_int.cpp:
  Auto merged
extra/yassl/testsuite/Makefile.am:
  Auto merged
extra/yassl/yassl.vcproj:
  Auto merged
include/violite.h:
  Auto merged
libmysql/Makefile.am:
  Auto merged
libmysql_r/Makefile.am:
  Auto merged
libmysqld/examples/Makefile.am:
  Auto merged
mysql-test/include/common-tests.inc:
  Auto merged
mysql-test/r/analyze.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/key_cache.result:
  Auto merged
mysql-test/r/preload.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/analyze.test:
  Auto merged
mysql-test/t/explain.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
server-tools/instance-manager/Makefile.am:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
vio/Makefile.am:
  Auto merged
client/Makefile.am:
  Manual merge
libmysqld/Makefile.am:
  Manual merge
mysql-test/r/compress.result:
  Manual merge
mysql-test/r/explain.result:
  Manual merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/view.result:
  Manual merge
mysql-test/t/select.test:
  Manual merge
mysql-test/t/view.test:
  Manual merge
sql/sql_base.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
2006-06-09 00:23:59 -07:00
unknown
7f19b1cc05 Added --pipe option for faster compile
Changed error to be more descriptive when you are refering to a not existing key
Fixed core dump in view test and changed to better error message


BUILD/compile-pentium64-debug-max:
  Added --pipe option for faster compile
  (This changset was missing in the tree I used to rebuild a new 5.1 tree)
BUILD/compile-pentium64-debug:
  Added --pipe option for faster compile
  (This changset was missing in the tree I used to rebuild a new 5.1 tree)
mysql-test/include/common-tests.inc:
  Changed error to be more descriptive
mysql-test/r/compress.result:
  Changed error to be more descriptive
mysql-test/r/explain.result:
  Changed error to be more descriptive
mysql-test/r/key_cache.result:
  Changed error to be more descriptive
mysql-test/r/preload.result:
  Changed error to be more descriptive
mysql-test/r/select.result:
  Changed error to be more descriptive
mysql-test/r/ssl.result:
  Changed error to be more descriptive
mysql-test/r/ssl_compress.result:
  Changed error to be more descriptive
mysql-test/r/view.result:
  Changed error to be more descriptive
mysql-test/t/disabled.def:
  Disable im_instance_conf and im_options  until Bug#20294 (Instance manager test im_instance_conf fails randomly) is fixed
mysql-test/t/explain.test:
  Changed error to be more descriptive
mysql-test/t/select.test:
  Changed error to be more descriptive
mysql-test/t/view.test:
  Changed error to be more descriptive
sql/share/errmsg.txt:
  Fix that ER_KEY_DOES_NOT_EXISTS has same SQLSTATE as ER_KEY_COLUMN_DOES_NOT_EXISTS
sql/sql_base.cc:
  Fixed core dump in view test
  Changed to correct error message that also shows the name of the faulty table
BUILD/compile-pentium64:
  New BitKeeper file ``BUILD/compile-pentium64''
2006-06-06 20:21:36 +03:00
unknown
ddc2569826 Bug#19066 (DELETE FROM inconsistency for NDB):
Under row-based replication, DELETE FROM will now always be
replicated as individual row deletions, while TRUNCATE TABLE will
always be replicated as a statement.


mysql-test/extra/rpl_tests/rpl_ddl.test:
  Using --echo instead of SELECT to print message.
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change.
mysql-test/r/federated.result:
  Result change.
mysql-test/r/range.result:
  Result change.
mysql-test/r/rpl_sp_effects.result:
  Result change.
mysql-test/r/show_check.result:
  Result change.
mysql-test/r/sp-error.result:
  Result change.
mysql-test/r/sp.result:
  Result change.
mysql-test/r/timezone2.result:
  Result change.
mysql-test/r/trigger-grant.result:
  Result change.
mysql-test/r/type_datetime.result:
  Result change.
mysql-test/r/type_ranges.result:
  Result change.
mysql-test/r/type_timestamp.result:
  Result change.
mysql-test/r/view.result:
  Result change.
mysql-test/t/archive.test:
  Test contain statements that only works for statement-based logging.
mysql-test/t/disabled.def:
  Disabling test due to reported bug.
mysql-test/t/federated.test:
  Adding ORDER BY clause to SELECT statements
mysql-test/t/range.test:
  Adding ORDER BY clause to SELECT (sub-)statement
mysql-test/t/rpl_sp_effects.test:
  Adding ORDER BY clause to SELECT statement.
mysql-test/t/show_check.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/sp-error.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/sp.test:
  Adding ORDER BY clause to SELECT statement.
mysql-test/t/timezone2.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/trigger-grant.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/type_datetime.test:
  Adding ORDER BY clause to SELECT statement.
mysql-test/t/type_ranges.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/type_timestamp.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/view.test:
  Adding ORDER BY clause to SELECT statement.
sql/sql_class.h:
  Adding member function to set replication to statement-based.
sql/sql_delete.cc:
  When row-based replication is used, DELETE FROM will always delete the
  contents of the table row-by-row and not use delete_all_rows().
mysql-test/extra/rpl_tests/rpl_truncate.test:
  New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_truncate.test''
mysql-test/extra/rpl_tests/rpl_truncate_helper.inc:
  New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_truncate_helper.inc''
mysql-test/r/rpl_truncate_2myisam.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_2myisam.result''
mysql-test/r/rpl_truncate_3innodb.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_3innodb.result''
mysql-test/r/rpl_truncate_7ndb.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_7ndb.result''
mysql-test/t/rpl_truncate_2myisam.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_2myisam.test''
mysql-test/t/rpl_truncate_3innodb.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_3innodb.test''
mysql-test/t/rpl_truncate_7ndb.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb.test''
2006-06-01 11:53:27 +02:00
unknown
76343a5dce Post-merge fixes 2006-05-31 22:55:45 -07:00
unknown
5c398ce055 Manually merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
2006-05-24 20:52:57 +04:00
unknown
960578fdfd Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/sql_select.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge
mysql-test/t/view.test:
  Manual merge
2006-05-20 19:10:43 -07:00
unknown
db5d197414 Fixed bug #19089.
When a CREATE TABLE command created a table from a materialized
view id does not inherit default values from the underlying table.
Moreover the temporary table used for the view materialization
does not inherit those default values.
In the case when the underlying table contained ENUM fields it caused
misleading error messages. In other cases the created table contained
wrong default values.
The code was modified to ensure inheritance of default values for
materialized views.


mysql-test/r/view.result:
  Added a test case for bug #19089.
mysql-test/t/view.test:
  Added a test case for bug #19089.
sql/field.cc:
  Fixed bug ##19089.
  Added field dflt_field to the class Field.
  This field is set for temp table fields that inherits
  default values of items from which they are created.
sql/field.h:
  Fixed bug ##19089.
  Added field dflt_field to the class Field.
  This field is set for temp table fields that inherits
  default values of items from which they are created.
sql/sql_select.cc:
  Fixed bug #19089.
  When a CREATE TABLE command created a table from a materialized
  view id does not inherit default values from the underlying table.
  Moreover the temporary table used for the view materialization
  does not inherit those default values.
  The code was modified to ensure inheritance of default values for
  materialized views.
2006-05-20 18:54:43 -07:00
unknown
650fea23b1 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean


include/my_pthread.h:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/rpl_temporary.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
storage/ndb/test/ndbapi/Makefile.am:
  Auto merged
storage/ndb/test/ndbapi/testInterpreter.cpp:
  Auto merged
sql/set_var.cc:
  Resolve conflict
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Resolve conflict
2006-05-19 19:07:33 -07:00
unknown
33c439ce58 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2


sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2006-05-18 11:30:42 -07:00
unknown
1c6beaee06 Fixed bug#19077: A nested materialized derived table is used before being populated.
The convert_constant_item() function converts constant items to ints on
prepare phase to optimize execution speed. In this case it tries to evaluate
subselect which contains a derived table and is contained in a derived table. 
All derived tables are filled only after all derived tables are prepared.
So evaluation of subselect with derived table at the prepare phase will
return a wrong result.

A new flag with_subselect is added to the Item class. It indicates that
expression which this item represents is a subselect or contains a subselect.
It is set to 0 by default. It is set to 1 in the Item_subselect constructor
for subselects.
For Item_func and Item_cond derived classes it is set after fixing any argument
in Item_func::fix_fields() and Item_cond::fix_fields accordingly.
The convert_constant_item() function now doesn't convert a constant item
if the with_subselect flag set in it. 


mysql-test/t/view.test:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/t/subselect.test:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/r/view.result:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/r/subselect.result:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
sql/item_subselect.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  The Item_subselect class constructor sets new with_subselect flag to 1.
sql/item_func.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  
  The Item_func::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
sql/item_cmpfunc.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  The convert_constant_item() function now doesn't convert a constant item
  with the with_subselect flag set.
  The Item_cond::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
sql/item.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  Set new with_subselect flag to default value - 0 in the Item constructor.
sql/item.h:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  A new flag with_subselect is added to the Item class. It indicates that
  expression which this item represents is a subselect or contains a subselect.
  It is set to 0 by default.
2006-05-18 00:55:28 +04:00
unknown
8df5fdb933 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-05-17 11:46:21 -07:00
unknown
f1efd0883d Fixed bug #19573.
The select statement that specified a view could be
slightly changed when the view was saved in a frm file.
In particular references to an alias name in the HAVING
clause could be substituted for the expression named by
this alias.
This could result in an error message for a query of
the form SELECT * FROM <view>. Yet no such message
appeared when executing the query specifying the view.


mysql-test/r/having.result:
  Adjusted results after fixing bug #19573.
mysql-test/r/view.result:
  Added a test case for bug #19573.
mysql-test/t/view.test:
  Added a test case for bug #19573.
2006-05-16 22:19:44 -07:00
unknown
7bb4f77828 Fixed bug #19490. The bug that caused server crash manifested
itself when executing queries referring to a view with GROUP BY
an expression containing non-constant interval.
It happened because Item_date_add_interval::eq neglected the
fact that the method can be applied to an expression of the form
    date(col) + interval time_to_sec(col) second
at the time when col could not be evaluated yet.
An attempt to evaluate time_to_sec(col) in this method resulted
in a crash.


mysql-test/r/view.result:
  Added a test case for bug #19490.
mysql-test/t/view.test:
  Added a test case for bug #19490.
sql/item_timefunc.cc:
  Fixed bug #19490. The bug that caused server crash manifested
  itself when executing queries referring to a view with GROUP BY
  an expression containing non-constant interval.
  It happened because Item_date_add_interval::eq neglected the
  fact that the method can be applied to an expression of the form
      date(col) + interval time_to_sec(col) second
  at the time when col could not be evaluated yet.
  An attempt to evaluate time_to_sec(col) in this method resulted
  in a crash.
  The code of Item_date_add_interval::eq was corrected.
2006-05-12 18:24:38 -07:00
unknown
225330cd5b Merge mysql.com:/extern/mysql/5.1/generic/mysql-5.0-merge
into  mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new


mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/timezone_grant.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/lex.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
mysql-test/r/rpl_insert_id.result:
  Manual merge.
mysql-test/t/disabled.def:
  Manual merge.
mysql-test/t/rpl_insert_id.test:
  Manual merge.
sql/item_func.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge - not complete yet.
2006-04-25 16:20:49 +02:00
unknown
4cfc649d25 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.1


configure.in:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/share/errmsg.txt:
  merge
2006-04-24 13:32:07 +03:00
unknown
dc526db887 Fix for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs".
Error was emitted when one tried to select information from view which used
merge algorithm and which also had CONVERT_TZ() function in its select list.

This bug was caused by wrong assumption that global table list for view
which is handled using merge algorithm begins from tables belonging to
the main select of this view. Nowadays the above assumption is not true only
when one uses convert_tz() function in view's select list, but in future
other cases may be added (for example we may support merging of views
with subqueries in select list one day). Relying on this false assumption
led to the usage of wrong table list for field lookups and therefor errors. 

With this fix we explicitly use pointer to the beginning of main select's
table list.


mysql-test/r/timezone_grant.result:
  Added additional test case for bug#15153 "CONVERT_TZ() is not allowed in
  all places in VIEWs" that checks that usage of CONVERT_TZ() function in view
  does not require additional privileges.
mysql-test/r/view.result:
  Added test case for bug#15153 "CONVERT_TZ() is not allowed in all places in 
  VIEWs".
mysql-test/t/timezone_grant.test:
  Added additional test case for bug#15153 "CONVERT_TZ() is not allowed in
  all places in VIEWs" that checks that usage of CONVERT_TZ() function in view
  does not require additional privileges.
mysql-test/t/view.test:
  Added test case for bug#15153 "CONVERT_TZ() is not allowed in all places in 
  VIEWs".
sql/sql_view.cc:
  mysql_make_view():
    We should not assume that global table list for view which is handled using
    merge algorithm begins from tables belonging to the main select of this
    view. Nowadays the above assumption is not true only when one uses
    convert_tz() function in view's select list, but in future other cases
    may be added (for example we may support merging of views with subqueries
    in select list one day). So let us instead explicitly use pointer to the
    beginning of main select's table list.
2006-04-22 11:54:25 +04:00
unknown
8dbb580748 The check for recursive view definitions added. (BUG#14308)
mysql-test/r/view.result:
  BUG#14308 test suite.
mysql-test/t/view.test:
  BUG#14308 test suite.
sql/share/errmsg.txt:
  New error message about a recursive view.
sql/sql_view.cc:
  The check of view recursion.
2006-04-13 23:12:26 +03:00
unknown
69e54f84ec Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2006-04-10 17:48:17 -07:00
unknown
e536c8eca7 Fixed bug #16069.
The function agg_cmp_type in item_cmpfunc.cc neglected the fact that 
the first argument in a BETWEEN/IN predicate could be a field of a view.
As a result in the case when the retrieved table was hidden by a view 
over it and the arguments in the BETWEEN/IN predicates are of 
the date/time type the function did not perform conversion of 
the constant arguments to the same format as the first field argument.
If formats of the arguments differed it caused wrong a evaluation of
the predicates.


mysql-test/r/view.result:
  Added a test case for bug #16069.
mysql-test/t/view.test:
  Added a test case for bug #16069.
2006-04-08 11:42:09 -07:00
unknown
ef4309284d Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/opt_sum.cc:
  Auto merged
2006-04-05 14:00:54 -07:00
unknown
e77888f530 Fixed bug #18237.
The code in opt_sum_query that prevented the COUNT/MIN/MAX 
optimization from being applied to outer joins  was not adjusted 
after introducing nested joins. As a result if an outer join
contained a reference to a view as an inner table the code of
opt_sum_query missed the presence of an on expressions and
erroneously applied the mentioned optimization.


mysql-test/r/view.result:
  Added a test case for bug #18237.
mysql-test/t/view.test:
  Added a test case for bug #18237.
2006-04-04 12:55:02 -07:00
unknown
6da39a4c1f Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


include/mysql.h:
  Auto merged
mysql-test/lib/mtr_timer.pl:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql-common/client.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
2006-03-27 18:30:40 -08:00
unknown
b0654461df Fixed bug #18386.
An invalid assertion in Item_direct_view_ref::eq caused 
an assertion abort in the debug version.


mysql-test/r/view.result:
  Added a test case for bug #18386.
mysql-test/t/view.test:
  Added a test case for bug #18386.
sql/item.cc:
  Fixed bug #18386.
  An invalid assertion in Item_direct_view_ref::eq caused 
  an assertion abort in the debug version.
  Changed the assertion.
2006-03-27 18:28:55 -08:00
unknown
4f3a18d5b5 Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1-new


configure.in:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-03-09 10:39:40 -08:00
unknown
cc7a75e6fd Fixed bug#17726: Not checked empty list caused endless loop
When the Item_cond::fix_fields() function reduces cond tree, it in loop
scans it's own list and when it founds Item_cond with same function (AND
or OR) it does next things: 1) replaces that item with item's list. 2)
empties item's list. Due to this operation is done twice - for update and
for view, at the update phase cond's list of lower view is already empty.
Empty list returns ref to itself, thus making endless loop by replacing
list with itself, emptying, replacing again and so on. This results in
server hung up.

To the Item_cond::fix_fields() function added check that ensures that
list being replaced with isn't empty.


mysql-test/t/view.test:
  Added test for bug#17726: Not checked empty list caused endless loop
mysql-test/r/view.result:
  Added test for bug#17726: Not checked empty list caused endless loop
sql/item_cmpfunc.cc:
  Fixed bug#17726: Not checked empty list caused endless loop
  To the Item_cond::fix_fields() function added check that ensures that
  list being replaced with isn't empty.
2006-03-03 16:19:57 +03:00
unknown
e54ecf09be Merge mysql.com:/home/dlenev/src/mysql-5.0-bg13525
into  mysql.com:/home/dlenev/src/mysql-5.1-merges2


client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisammrg/myrg_queue.c:
  Auto merged
sql/sql_rename.cc:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2006-02-27 20:00:07 +03:00
unknown
0aae3cd515 Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0
into  selena.:H:/MYSQL/src/#15943-mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2006-02-27 20:00:03 +03:00
unknown
0afb6ff660 Fixes to embedded server to be able to run tests with it
(Needed for "list of pushes" web page and autopush)


include/mysql.h:
  Fix to embedded server to be able to run tests on it
libmysql/libmysql.c:
  Fix to embedded server to be able to run tests on it
libmysqld/emb_qcache.cc:
  Fix to embedded server to be able to run tests on it
libmysqld/embedded_priv.h:
  Fix to embedded server to be able to run tests on it
libmysqld/lib_sql.cc:
  Fix to embedded server to be able to run tests on it
libmysqld/libmysqld.c:
  Fix to embedded server to be able to run tests on it
mysql-test/mysql-test-run.sh:
  Fix to embedded server to be able to run tests on it
mysql-test/r/binlog.result:
  Updated test for embedded server
mysql-test/r/ctype_cp932.result:
  Updated test for embedded server
mysql-test/r/innodb.result:
  Updated test for embedded server
mysql-test/r/mysqltest.result:
  Updated test for embedded server
mysql-test/r/query_cache.result:
  Updated test for embedded server
mysql-test/r/query_cache_notembedded.result:
  Updated test for embedded server
mysql-test/r/sp-error.result:
  Updated test for embedded server
mysql-test/r/sp.result:
  Updated test for embedded server
mysql-test/r/subselect.result:
  Updated test for embedded server
mysql-test/r/view.result:
  Updated test for embedded server
mysql-test/r/view_grant.result:
  Updated test for embedded server
mysql-test/t/backup.test:
  Updated test for embedded server
mysql-test/t/binlog.test:
  Updated test for embedded server
mysql-test/t/blackhole.test:
  Updated test for embedded server
mysql-test/t/compress.test:
  Updated test for embedded server
mysql-test/t/ctype_cp932.test:
  Updated test for embedded server
mysql-test/t/delayed.test:
  Updated test for embedded server
mysql-test/t/handler.test:
  Updated test for embedded server
mysql-test/t/innodb.test:
  Updated test for embedded server
mysql-test/t/mysql.test:
  Updated test for embedded server
mysql-test/t/mysql_client_test.test:
  Updated test for embedded server
mysql-test/t/mysqltest.test:
  Updated test for embedded server
mysql-test/t/query_cache.test:
  Updated test for embedded server
mysql-test/t/query_cache_notembedded.test:
  Updated test for embedded server
mysql-test/t/read_only.test:
  Updated test for embedded server
mysql-test/t/skip_grants.test:
  Updated test for embedded server
mysql-test/t/sp-destruct.test:
  Updated test for embedded server
mysql-test/t/sp-error.test:
  Updated test for embedded server
mysql-test/t/sp-threads.test:
  Updated test for embedded server
mysql-test/t/sp.test:
  Updated test for embedded server
mysql-test/t/subselect.test:
  Updated test for embedded server
mysql-test/t/temp_table.test:
  Updated test for embedded server
mysql-test/t/view.test:
  Updated test for embedded server
mysql-test/t/view_grant.test:
  Updated test for embedded server
mysql-test/t/wait_timeout.test:
  Updated test for embedded server
mysys/mf_dirname.c:
  Review fix: Don't access data outside of array
mysys/my_bitmap.c:
  Remove compiler warnings
scripts/mysql_fix_privilege_tables.sql:
  Add flush privileges to .sql script so that one doesn't have to reboot mysqld when one runs the mysql_fix_privilege_script
sql-common/client.c:
  Updated test for embedded server
sql/item.cc:
  Remove DBUG_PRINT statement that can cause crashes when running with --debug
sql/mysqld.cc:
  Fix to embedded server to be able to run tests on it
sql/protocol.cc:
  Fix to embedded server to be able to run tests on it
  (Trivial reconstruction of code)
sql/protocol.h:
  Fix to embedded server to be able to run tests on it
sql/sql_base.cc:
  Better comment
sql/sql_class.cc:
  Fix to embedded server to be able to run tests on it
sql/sql_class.h:
  Fix to embedded server to be able to run tests on it
sql/sql_cursor.cc:
  Fix to embedded server to be able to run tests on it
sql/sql_parse.cc:
  Fix to embedded server to be able to run tests on it
  Don't crash for disabled commands when using embedded server
sql/sql_prepare.cc:
  Fix to embedded server to be able to run tests on it
mysql-test/r/ctype_cp932_notembedded.result:
  New BitKeeper file ``mysql-test/r/ctype_cp932_notembedded.result''
mysql-test/r/innodb_notembedded.result:
  New BitKeeper file ``mysql-test/r/innodb_notembedded.result''
mysql-test/r/sp.result.orig:
  New BitKeeper file ``mysql-test/r/sp.result.orig''
mysql-test/r/sp_notembedded.result:
  New BitKeeper file ``mysql-test/r/sp_notembedded.result''
mysql-test/r/subselect_notembedded.result:
  New BitKeeper file ``mysql-test/r/subselect_notembedded.result''
mysql-test/t/ctype_cp932_notembedded.test:
  New BitKeeper file ``mysql-test/t/ctype_cp932_notembedded.test''
mysql-test/t/innodb_notembedded.test:
  New BitKeeper file ``mysql-test/t/innodb_notembedded.test''
mysql-test/t/sp.test.orig:
  New BitKeeper file ``mysql-test/t/sp.test.orig''
mysql-test/t/sp_notembedded.test:
  New BitKeeper file ``mysql-test/t/sp_notembedded.test''
mysql-test/t/subselect_notembedded.test:
  New BitKeeper file ``mysql-test/t/subselect_notembedded.test''
2006-02-24 18:34:15 +02:00
unknown
559abcf5d9 Fixes bug #15943. resets error flag for show create view command, to allow
proper processing of multiple sql statements sent as a single command.


mysql-test/r/view.result:
  result file update for #15943 test case
mysql-test/t/view.test:
  test case added for bug #15943
2006-02-13 19:53:34 +03:00
unknown
d7becbc2c8 Merge mysql.com:/home/kostja/mysql/mysql-5.0-root
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge


BitKeeper/deleted/.del-ndb_load.result:
  Delete: mysql-test/r/ndb_load.result
BitKeeper/deleted/.del-ndb_load.test:
  Delete: mysql-test/t/ndb_load.test
extra/perror.c:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/ndb_blob.result:
  Auto merged
mysql-test/r/sp-code.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/sp-destruct.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  Auto merged
storage/ndb/src/kernel/main.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
storage/ndb/tools/delete_all.cpp:
  Auto merged
mysql-test/t/disabled.def:
  Manual merge.
2006-02-09 13:35:59 +03:00
unknown
7ea60ae91e Fixed bug #16382.
When an ambiguous field name is used in a group by clause a warning is issued
in the find_order_in_list function by a call to push_warning_printf.
An expression that was not always valid was passed to this call as the field
name parameter.


mysql-test/r/view.result:
  Added a test case for bug #16382.
mysql-test/t/view.test:
  Added a test case for bug #16382.
2006-02-01 20:43:43 -08:00
unknown
b114f4ef81 Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var
into  neptunus.(none):/home/msvensson/mysql/mysqltest_var/my51-mysqltest_var


mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
  Auto merged
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_EE_err.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_stm_000001.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Auto merged
mysql-test/r/backup.result:
  Auto merged
mysql-test/r/loaddata.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/rpl_loaddata_s.result:
  Auto merged
mysql-test/r/rpl_replicate_do.result:
  Auto merged
mysql-test/r/rpl_rewrt_db.result:
  Auto merged
mysql-test/r/rpl_stm_000001.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/backup.test:
  Auto merged
mysql-test/t/loaddata.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/ndb_autodiscover.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_000015-slave.sh:
  Auto merged
mysql-test/t/rpl_flushlog_loop-master.opt:
  Auto merged
mysql-test/t/rpl_flushlog_loop-master.sh:
  Auto merged
mysql-test/t/rpl_flushlog_loop-slave.opt:
  Auto merged
mysql-test/t/rpl_flushlog_loop-slave.sh:
  Auto merged
mysql-test/t/rpl_loaddata_s.test:
  Auto merged
mysql-test/t/rpl_replicate_do.test:
  Auto merged
mysql-test/t/rpl_rewrt_db.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/sp-destruct.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/user_var-binlog.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Merge 5.0 -> 5.1
mysql-test/r/binlog_stm_blackhole.result:
  Merge 5.0 -> 5.1
mysql-test/r/mysqltest.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_loaddata.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_loaddata_m.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_stm_log.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_timezone.result:
  Merge 5.0 -> 5.1
mysql-test/t/mysqlbinlog.test:
  Merge 5.0 -> 5.1
mysql-test/t/mysqlbinlog2.test:
  Merge 5.0 -> 5.1
mysql-test/t/mysqltest.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_drop_db.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_loaddata.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_loaddata_m.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_timezone.test:
  Merge 5.0 -> 5.1
mysql-test/t/trigger-compat.test:
  Merge 5.0 -> 5.1
mysql-test/t/trigger-grant.test:
  Merge 5.0 -> 5.1
2006-01-24 14:10:48 +01:00
unknown
8f760dc08c Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var
into  neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var-integration


mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/rpl000001.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/rpl000001.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/type_varchar.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/mysqltest.result:
  Manual merge
mysql-test/t/mysqltest.test:
  Manual merge
mysql-test/t/trigger-compat.test:
  Manual merge, remove the "--text" argument, not portable
mysql-test/t/trigger-grant.test:
  Manual merge, remove the "--text" argument, not portable
2006-01-24 08:43:34 +01:00
unknown
d40f7056ae Make it possible to run mysql-test-run.pl with default test suite in different vardir.
mysql-test/include/have_outfile.inc:
  Use MYSQLTEST_VARDIR
mysql-test/include/test_outfile.inc:
  Use MYSQLTEST_VARDIR
mysql-test/mysql-test-run.pl:
  Create variable $MYSQLTEST_VARDIR that points to  the vardir
  Don't create a symlink from var/ to the physical vardir if it's somewhere else
  Setup a symlink(or copy dir on windows) for std_data so it is available in the physical vardir
  Use "../tmp" as slave-load-tmpdir, since the server is started in var/master-data and slave in var/slave-data they will both find the dumps in "../tmp"
mysql-test/mysql-test-run.sh:
  Export MYSQLTEST_VARDIR, always pointing at mysql-test/var
mysql-test/r/backup.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/blackhole.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/loaddata.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/mysqlbinlog.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/mysqltest.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/outfile.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/query_cache.result:
  Add missing drop function
mysql-test/r/rpl000001.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl000004.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_innodb.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddata.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddata_rule_m.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddata_rule_s.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddatalocal.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/rpl_log.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_misc_functions.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/rpl_replicate_do.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_rewrite_db.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_timezone.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/symlink.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/trigger.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/view.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/warnings.result:
  Use "../std_data_ln" to find std_data files
mysql-test/t/backup-master.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/backup.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/blackhole.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/ctype_ucs_binlog.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/im_daemon_life_cycle-im.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/im_options_set.imtest:
  Use MYSQLTEST_VARDIR
mysql-test/t/im_options_unset.imtest:
  Use MYSQLTEST_VARDIR
mysql-test/t/loaddata.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/myisam.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/mysqlbinlog.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/mysqlbinlog2.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/mysqldump.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/mysqltest.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/ndb_autodiscover.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/outfile.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/query_cache.test:
  Add missing drop function
mysql-test/t/repair.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl000001.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl000004.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl000009.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl000015-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl000017-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_EE_error.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_charset.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_drop_db.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-master.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-master.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-slave.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_innodb.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddata.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddata_rule_m.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddata_rule_s.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddatalocal.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_log.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_misc_functions-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_misc_functions.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_replicate_do.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_rewrite_db.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_rotate_logs-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_rotate_logs.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_timezone.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/show_check.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/sp-destruct.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/symlink.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/temp_table-master.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/trigger-compat.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/trigger-grant.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/trigger.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/type_varchar.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/user_var-binlog.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/view.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/warnings.test:
  Use "../std_data_ln" to find std_data files
mysql-test/include/sourced.inc:
  New BitKeeper file ``mysql-test/include/sourced.inc''
mysql-test/include/sourced1.inc:
  New BitKeeper file ``mysql-test/include/sourced1.inc''
2006-01-24 08:30:54 +01:00
unknown
d07932a3f1 Merge bk@192.168.21.1:mysql-5.1-new into mysql.com:/home/hf/work/5.1.emb
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/handler.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2006-01-19 18:05:57 +04:00
unknown
6731dd6380 Embedded-server related tests fixes
BitKeeper/deleted/.del-ctype_cp932_notembedded.test~7c748e8e7ae6e7fe:
  Delete: mysql-test/t/ctype_cp932_notembedded.test
mysql-test/r/innodb.result:
  result fixed
mysql-test/r/query_cache.result:
  result fixed
mysql-test/r/query_cache_notembedded.result:
  result fixed
mysql-test/r/sp-error.result:
  result fixed
mysql-test/r/sp.result:
  result fixed
mysql-test/r/view.result:
  result fixed
mysql-test/r/view_grant.result:
  result fixed
mysql-test/t/sp-destruct.test:
  test disabled
mysql-test/t/view.test:
  lines moved to view_grant.test
mysql-test/t/view_grant.test:
  lines moved from view.test
2006-01-19 13:25:12 +04:00
unknown
bdbf423457 Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/opt_sum.cc:
  Auto merged
2006-01-06 23:26:20 -08:00
unknown
312c2f4759 Fixed bug #16016: MIN/MAX optimization was not applied to views.
mysql-test/r/view.result:
  Added a test case for bug #16016.
mysql-test/t/view.test:
  Added a test case for bug #16016.
sql/opt_sum.cc:
  Fixed bug #16016: MIN/MAX optimization was not applied to views.
  The fix employs the standard way of handling direct references to view fields.
2006-01-06 22:28:26 -08:00
unknown
91881b44c3 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean


include/config-win.h:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/bdb.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/field.cc:
  Resolve conflict
sql/ha_ndbcluster.cc:
  Resolve conflict
sql/log_event.cc:
  Resolve conflict
2006-01-06 10:42:58 -08:00
unknown
29fde52802 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/r/create.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/t/disabled.def:
  Manual merge
sql/mysqld.cc:
  Manual merge
sql/sp_head.cc:
  Manual merge
sql/sql_trigger.cc:
  Manual merge
2006-01-06 01:08:48 +02:00
unknown
64206b1850 Review fixes of new pushed code
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
  - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
  - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null


mysql-test/r/create.result:
  Update results after removing wrong warnings for CREATE ... SELECT
  New tests
mysql-test/r/handler.result:
  Drop used tables
mysql-test/r/kill.result:
  Make test portable
mysql-test/r/mysqlshow.result:
  Drop tables used by previous test
mysql-test/r/trigger.result:
  Reuse old procedure name
mysql-test/r/view.result:
  Extra tests
mysql-test/t/create.test:
  New tests to test fix of removing wrong warnings for CREATE ... SELECT
mysql-test/t/disabled.def:
  Enable 'kill' test (should now be portable)
mysql-test/t/handler.test:
  Drop used tables
mysql-test/t/kill.test:
  Make test portable even if kill doesn't work at once
mysql-test/t/mysqlshow.test:
  Drop tables used by previous test
mysql-test/t/trigger.test:
  Reuse old procedure name
mysql-test/t/view.test:
  Extra tests
sql/field.cc:
  Removed compiler warning
sql/ha_federated.cc:
  my_snprintf -> strmake()
  (Simple optimization)
sql/ha_ndbcluster.cc:
  Indentation cleanups and trival optimization
sql/item.cc:
  Moved save_org_in_field() to item.cc to make it easier to test
  Remove setting of null_value as this is not needed
sql/item.h:
  Moved save_org_in_field() to item.cc to make it easier to test
sql/log_event.cc:
  Remove inline of slave_load_file_stem()
  Added 'extension' parameter to slave_load_file_stem() to get smaller code
  Removed not critical (or needed) DBUG_ASSERT()'s
  Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths
  Indentation fixes
sql/opt_range.cc:
  Moved code from declaration to function body
  (To make it more readable)
sql/parse_file.cc:
  Fixed DBUG_PRINT
sql/sp.cc:
  Simple cleanups
  - Removed not needed {} level
  - Ensure saved variables starts with old_
sql/sp_head.cc:
  Indentation fixes
  Remove core dump when using --debug when m_next_cached_sp == 0
  Fixed compiler warnings
  Trivial optimizations
sql/sp_head.h:
  Changed argument to set_definer() to const
  Added THD argument to recursion_level_error() to avoid call to current_thd
sql/sql_acl.cc:
  Removed not needed test (first_not_own_table is the guard)
sql/sql_base.cc:
  Removed extra empty line
sql/sql_handler.cc:
  Don't test table version in mysql_ha_read() as this is already tested in lock_tables()
  Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables
  (Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash)
sql/sql_insert.cc:
  Mark fields that are set in CREATE ... SELECT as used
  (Removed wrong warnings about field not having a default value)
sql/sql_parse.cc:
  Removed not needed test of 'tables' (first_not_own_table is the guard)
  Simplify code
sql/sql_select.cc:
  Use group->field to check if value is null instead of item called by 'save_org_in_field'
  This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null)
sql/sql_trigger.cc:
  Move sql_modes_parameters outside of function
  Indentation fixes
  Fixed compiler warning
  Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access()
  (This allows us to remove the extra test in check_grant() and check_table_access())
2006-01-06 00:47:49 +02:00
unknown
c000e8a11c Merge bk@192.168.21.1:mysql-5.1-new into mysql.com:/home/hf/work/5.1.emb
mysql-test/t/backup.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-01-04 14:28:41 +04:00
unknown
6b27acbdf4 Big patch to make embedded-server working in 5.x
Now it supports queries returning several results
(particularly important with the SP)


include/mysql.h:
  embedded_query_result structure added
libmysql/libmysql.c:
  embedded-server related fixes
libmysqld/emb_qcache.cc:
  multiple-result support added
libmysqld/embedded_priv.h:
  embedded_query_result struct implemented
libmysqld/lib_sql.cc:
  multiple-result support added
libmysqld/libmysqld.c:
  small fixes
mysql-test/t/backup.test:
  test fixed
mysql-test/t/binlog_stm_binlog.test:
  test fixed
mysql-test/t/binlog_stm_blackhole.test:
  test fixed
mysql-test/t/binlog_stm_ctype_cp932.test:
  test fixed
mysql-test/t/compress.test:
  test fixed
mysql-test/t/delayed.test:
  test fixed
mysql-test/t/federated.test:
  test fixed
mysql-test/t/federated_archive.test:
  test fixed
mysql-test/t/federated_bug_13118.test:
  test fixed
mysql-test/t/federated_transactions.test:
  test fixed
mysql-test/t/flush_table.test:
  test fixed
mysql-test/t/handler.test:
  test fixed
mysql-test/t/init_connect.test:
  test fixed
mysql-test/t/innodb.test:
  test fixed
mysql-test/t/mysql.test:
  test fixed
mysql-test/t/mysql_client_test.test:
  test fixed
mysql-test/t/mysqltest.test:
  test fixed
mysql-test/t/query_cache.test:
  test fixed
mysql-test/t/query_cache_notembedded.test:
  test fixed
mysql-test/t/read_only.test:
  test fixed
mysql-test/t/skip_grants.test:
  test fixed
mysql-test/t/sp-destruct.test:
  test fixed
mysql-test/t/sp-error.test:
  test fixed
mysql-test/t/sp-threads.test:
  test fixed
mysql-test/t/sp.test:
  test fixed
mysql-test/t/view.test:
  test fixed
mysql-test/t/wait_timeout.test:
  test fixed
sql-common/client.c:
  small fixes
sql/mysqld.cc:
  embedded-server related fix
sql/protocol.cc:
  embedded-server related fix
sql/protocol.h:
  embedded-server related fix
sql/sql_class.cc:
  embedded-server related fix
sql/sql_class.h:
  embedded-server related fix
sql/sql_cursor.cc:
  embedded-server related fix
sql/sql_parse.cc:
  embedded-server related fix
sql/sql_prepare.cc:
  embedded-server related fix
2006-01-04 14:20:28 +04:00
unknown
eff9369d10 Merge mysql.com:/home/dlenev/src/mysql-5.0-bg14836
into  mysql.com:/home/dlenev/src/mysql-5.1-merges


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_show.cc:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
storage/ndb/tools/ndb_size.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Manual merge.
mysql-test/t/information_schema.test:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
2005-12-24 20:13:51 +03:00
unknown
c7a440d1c6 Fix for bug#14861 aliased column names are not preserved.
Create tmp table filed using original item name when it's necessary


mysql-test/r/view.result:
  Fix for bug#14861 aliased column names are not preserved.
    test case
mysql-test/t/view.test:
  Fix for bug#14861 aliased column names are not preserved.
    test case
2005-12-19 15:36:03 +04:00
unknown
346694bddf Merge mysql.com:/home/dlenev/src/mysql-5.0-merges
into  mysql.com:/home/dlenev/src/mysql-5.1-merges


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2005-12-12 14:59:14 +03:00
unknown
24af7680d4 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11555-2


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
sql/sp.cc:
  Manual merge.
sql/sp.h:
  Manual merge.
sql/sql_base.cc:
  Manual merge.
2005-12-07 12:47:25 +03:00
unknown
361977c0da Fix for bug #11555 "Stored procedures: current SP tables locking make
impossible view security".

We should not expose names of tables which are explicitly or implicitly (via
routine or trigger) used by view even if we find that they are missing.
So during building of list of prelocked tables for statement we track which
routines (and therefore tables for these routines) are used from views. We
mark elements of LEX::routines set which correspond to routines used in views
by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST
object for topmost view which uses routine. We propagate this mark to all
routines which are used by this routine and which we add to this set. We also
mark tables used by such routine which we add to the list of tables for
prelocking as belonging to this view.


mysql-test/r/sp-error.result:
  Added test for bug #11555 "Stored procedures: current SP tables locking make 
  impossible view security".
mysql-test/r/view.result:
  We should not expose tables which are expicitly/implicitly used in view in
  check table statement.
mysql-test/t/sp-error.test:
  Added test for bug #11555 "Stored procedures: current SP tables locking make 
  impossible view security".
mysql-test/t/view.test:
  Removed comment obsoleted by bugfix.
sql/sp.cc:
  We should not expose names of tables which are explicitly or implicitly
  (via routine or trigger) used by view even if we find that they are missing.
  So during building of list of prelocked tables for statement we track which
  routines (and therefore tables for these routines) are used from views. We
  mark elements of LEX::routines set which correspond to routines used in views
  by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST
  object for topmost view which uses routine. We propagate this mark to all
  routines which are used by this routine and which we add to this set. We also
  mark tables used by such routine which we add to the list of tables for
  prelocking as belonging to this view.
sql/sp.h:
  sp_cache_routines_and_add_tables_for_view()/for_triggers():
    To be able to determine correctly uppermost view which uses this view/table
    with trigger we have to pass pointer to TABLE_LIST object instead of pointer
    to view's LEX or to Table_triggers_list object.
sql/sp_head.cc:
  sp_head::add_used_tables_to_table_list():
    Added new argument which allows to mark tables which are added to table
    list for prelocking as belonging to view (this allows properly hide names
    of tables which are used in routines used by views).
sql/sp_head.h:
  sp_head::add_used_tables_to_table_list():
    Added new argument which allows to mark tables which are added to table
    list for prelocking as belonging to view (this allows properly hide names
    of tables which are used in routines used by views).
sql/sql_base.cc:
  open_tables():
    sp_cache_routines_and_add_tables_for_view()/for_triggers() now accept
    pointer to table list element as last argument, this allows them to determine
    correctly uppermost view which uses this view/table with trigger.
sql/sql_trigger.h:
  Table_triggers_list:
    sp_cache_routines_and_add_tables_for_triggers() now accept pointer to table
    list element as last argument, this allows to determine correctly uppermost
    view which uses this table with trigger.
2005-12-07 12:27:17 +03:00
unknown
099d2bfbb1 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.1


configure.in:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_cache.cc:
  merge
sql/sql_lex.h:
  merge
2005-12-03 08:56:00 +02:00
unknown
5dac7516e2 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge1-5.0


sql/sp_head.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-12-02 21:20:25 +02:00
unknown
4202271065 Now we shall store only position (index of first character)
of SELECT from query begining, to be independet of query buffer
allocation.
Correct procedure used to find beginning of the current statement
during parsing (BUG#14885).


mysql-test/r/view.result:
  BUG#14885 test suite.
mysql-test/t/view.test:
  BUG#14885 test suite.
sql/sp_head.cc:
  The debug print statement fixed to prevent crash in case of NULL
  in m_next_cached_sp.
sql/sql_lex.h:
  Now we shall store only position (index of first character)
  of SELECT from query beginning.
sql/sql_view.cc:
  Position of the SELECT used to output it to .frm.
sql/sql_yacc.yy:
  Now we shall store only position (index of first character)
  of SELECT from query beginning.
  Correct procedure used to find beginning of the current statement
  during parsing.
2005-12-02 21:18:12 +02:00
unknown
3e4d4a3656 View creation code fixed to expect empty TABLE_LIST::table pointer (BUG#15096).
mysql-test/r/view.result:
  BUG#15096 test suite.
mysql-test/t/view.test:
  BUG#15096 test suite.
sql/sql_view.cc:
  View placed in a function never get TABLE during view creation,
  because we have never executed that function in this process.
  So we should expect empty TABLE_LIST::table pointer.
2005-12-01 12:15:48 +02:00
unknown
380690316f Merge mysql.com:/home/mysql_src/mysql-5.0-van
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0
(2nd try; Pekka kindly accepted to fix storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
and storage/ndb/src/kernel/vm/SimulatedBlock.cpp after I push).


configure.in:
  Auto merged
mysql-test/r/ndb_charset.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysys/base64.c:
  Auto merged
sql/ha_archive.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/ndb/include/kernel/AttributeDescriptor.hpp:
  Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.hpp:
  Auto merged
storage/ndb/tools/ndb_size.pl:
  Auto merged
storage/ndb/tools/ndb_size.tmpl:
  Auto merged
mysql-test/t/disabled.def:
  merge
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  used "ul", Pekka said he'll fix
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
  used "ul", Pekka said he'll fix
2005-11-19 10:43:28 +01:00
unknown
41de6f9a7c Merge mysql.com:/home/mysql_src/mysql-5.0
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)


BitKeeper/etc/ignore:
  auto-union
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbImpl.hpp:
  Auto merged
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  merge
mysql-test/r/ps_1general.result:
  merge ("ul", will fix)
sql/examples/ha_tina.cc:
  merge
sql/ha_innodb.cc:
  merge
sql/handler.h:
  merge
sql/log.cc:
  merge
sql/set_var.cc:
  merge
sql/share/errmsg.txt:
  merge (bad, will fix)
sql/sql_show.cc:
  merge (bad, will fix)
sql/sql_yacc.yy:
  merge
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  merge
2005-11-18 16:38:01 +01:00
unknown
18ca0d6302 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/13622-bug-5.0-mysql


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-11-18 17:26:44 +03:00
unknown
283962473c WL#2486 - natural/using joins according to SQL:2003.
Enabled view tests that didn't work before.


mysql-test/r/view.result:
  Enabled natural outer join tests with views - now they work after WL#2486 was pushed.
mysql-test/t/view.test:
  Enabled natural outer join tests with views - now they work after WL#2486 was pushed.
2005-11-18 10:51:46 +02:00
unknown
d29438f25e Manually merged
sql/sql_view.cc:
  Auto merged
2005-11-18 01:16:15 +03:00
unknown
9de8e3b0ef Merge
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-11-16 02:08:20 +03:00
unknown
0a9badeca4 Fix bug #14816 test_if_order_by_key() expected only Item_fields.
test_if_order_by_key() expected only Item_fields to be in order->item, thus
failing to find available index on view's field, which results in reported
error.

Now test_if_order_by_key() calls order->item->real_item() to get field for
choosing index.


sql/sql_select.cc:
  Fix bug #14816 test_if_order_by_key() expected only Item_fields.
  Make test_if_order_by_key() use real_item() to get field.
mysql-test/r/view.result:
  Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
mysql-test/t/view.test:
  Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
2005-11-14 22:10:34 +03:00
unknown
6c708fadcb Fix bug #14850 Item_ref's null_value wasn't updated
Item_ref's null_value wasn't updated in save_org_in_field() causing reported
error.


sql/item.h:
  Fix bug #14850 Item_ref's null_value wasn't updated
  Make save_org_in_field() update Item_ref's null_value.
mysql-test/r/view.result:
  Test case for bug #14850 Item_ref's null_value wasn't updated
mysql-test/t/view.test:
   Test case for bug #14850 Item_ref's null_value wasn't updated
2005-11-14 21:52:39 +03:00
unknown
56f43d9d02 Fix bug #13622 Wrong view .frm created if some field's alias contain \n
View .frm parser assumes that query string will take only 1 line, with \n in
aliases query stringmay take several lines thus produces bad .frm file.

'query' parameter type changed from 'string' to 'escaped string'


sql/sql_view.cc:
  Fix bug #13622 \n in column alias results in broken .frm
  'query' parameter type changed to 'escaped string'
mysql-test/r/view.result:
  Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
mysql-test/t/view.test:
  Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
2005-11-11 20:03:32 +03:00
unknown
7dbea7df27 WL#2818 (Add creator to the trigger definition for privilege
checks on trigger activation)


mysql-test/r/information_schema.result:
  Update result file: a new column DEFINER has been added to
  INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/mysqldump.result:
  Update result file: a new column DEFINER has been added to
  INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_ddl.result:
  Update result file: a new column DEFINER has been added to
  INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_sp.result:
  Update result file: a new clause DEFINER has been added to
  CREATE TRIGGER statement.
mysql-test/r/rpl_trigger.result:
  Results for new test cases were added.
mysql-test/r/skip_grants.result:
  Error message has been changed.
mysql-test/r/trigger.result:
  Added DEFINER column.
mysql-test/r/view.result:
  Error messages have been changed.
mysql-test/r/view_grant.result:
  Error messages have been changed.
mysql-test/t/mysqldump.test:
  Drop created procedure to not affect further tests.
mysql-test/t/rpl_trigger.test:
  Add tests for new column in information schema.
mysql-test/t/skip_grants.test:
  Error tag has been renamed.
mysql-test/t/view.test:
  Error tag has been renamed.
mysql-test/t/view_grant.test:
  Error tag has been changed.
sql/item_func.cc:
  Fix typo in comments.
sql/mysql_priv.h:
  A try to minimize copy&paste:
    - introduce operations to be used from sql_yacc.yy;
    - introduce an operation to be used from trigger and
      view processing code.
sql/share/errmsg.txt:
  - Rename ER_NO_VIEW_USER to ER_MALFORMED_DEFINER in order to
    be shared for view and trigger implementations;
  - Fix a typo;
  - Add a new error code for trigger warning.
sql/sp.cc:
  set_info() was split into set_info() and set_definer().
sql/sp_head.cc:
  set_info() was split into set_info() and set_definer().
sql/sp_head.h:
  set_info() was split into set_info() and set_definer().
sql/sql_acl.cc:
  Add a new check: exit from the cycle if the table is NULL.
sql/sql_lex.h:
  - Rename create_view_definer to definer, since it is used for views
    and triggers;
  - Change st_lex_user to LEX_USER, since st_lex_user is a structure.
    So, formally, it should be "struct st_lex_user", which is longer
    than just LEX_USER;
  - Add trigger_definition_begin.
sql/sql_parse.cc:
  - Add a new check: exit from the cycle if the table is NULL;
  - Implement definer-related functions.
sql/sql_show.cc:
  Add DEFINER column.
sql/sql_trigger.cc:
  Add DEFINER support for triggers.
sql/sql_trigger.h:
  Add DEFINER support for triggers.
sql/sql_view.cc:
  Rename create_view_definer to definer.
sql/sql_yacc.yy:
  Add support for DEFINER-clause in CREATE TRIGGER statement.
  
  Since CREATE TRIGGER and CREATE VIEW can be similar at the start,
  yacc is unable to distinguish between them. So, had to modify both
  statements in order to make it parsable by yacc.
mysql-test/r/trigger-compat.result:
  Result file for triggers backward compatibility test.
mysql-test/r/trigger-grant.result:
  Result file of the test for WL#2818.
mysql-test/t/trigger-compat.test:
  Triggers backward compatibility test: check that the server
  still can load triggers w/o definer attribute and modify
  tables with such triggers (add a new trigger, etc).
mysql-test/t/trigger-grant.test:
  Test for WL#2818 -- check that DEFINER support in triggers
  works properly
2005-11-10 22:25:03 +03:00
unknown
b5e8347f81 Fixed BUG#14719: Views DEFINER grammar is incorrect
Corrected the syntax for the current_user() case.
  (It's "definer = current_user[()]", not just "current_user[()]".)


mysql-test/r/view.result:
  New test case for BUG#14719
mysql-test/t/view.test:
  New test case for BUG#14719
sql/sql_yacc.yy:
  Corrected the CREATE VIEW syntax for the current_user() DEFINER case.
  (It's "definer = current_user[()]", not just "current_user[()]".)
2005-11-09 16:51:00 +01:00
unknown
6b3a9caef9 Make storage engines "pluggable", handlerton work
Makefile.am:
  Changes to autoconf subst
config/ac-macros/ha_berkeley.m4:
  simplify
config/ac-macros/ha_ndbcluster.m4:
  simplify
config/ac-macros/ha_partition.m4:
  simplify
configure.in:
  strip configure of storage engine specific cruft and simplify
extra/Makefile.am:
  changes to autoconf/automake subst
libmysqld/Makefile.am:
  only compile storage engines if required.
  make find object file a little smarter
libmysqld/examples/Makefile.am:
  changes to autoconf subst
mysql-test/Makefile.am:
  remove storage engine specific cruft
mysql-test/r/ps_1general.result:
  cannot gaurantee order of results from 'show storage engines'
mysql-test/r/show_check.result:
  fix test - frm file fails to be deleted if it is invalid
mysql-test/r/sql_mode.result:
  isam does not exist, test may need to be redone/fixed in 5.0
mysql-test/r/warnings.result:
  isam no longer exists
mysql-test/t/ps_1general.test:
  cannot gaurantee order of results from 'show storage engines'
mysql-test/t/show_check.test:
  fix test - frm file fails to be deleted if it is invalid
mysql-test/t/sql_mode.test:
  isam does not exist, test may need to be redone/fixed in 5.0
mysql-test/t/system_mysql_db_fix.test:
  change isam to myisam
mysql-test/t/view.test:
  change isam to myisam
mysql-test/t/warnings.test:
  isam no longer exists
sql/Makefile.am:
  Make storage engines "pluggable" stage 1
  only compile storage engines if included
sql/examples/ha_example.cc:
  handlerton work
sql/examples/ha_example.h:
  handlerton work
sql/examples/ha_tina.cc:
  handlerton work
sql/examples/ha_tina.h:
  handlerton work
sql/ha_archive.cc:
  handlerton work
sql/ha_archive.h:
  handlerton work
sql/ha_berkeley.cc:
  handlerton work
sql/ha_berkeley.h:
  handlerton work
sql/ha_blackhole.cc:
  handlerton work
sql/ha_federated.cc:
  handlerton work
sql/ha_federated.h:
  handlerton work
sql/ha_heap.cc:
  handlerton work
sql/ha_innodb.cc:
  handlerton work
sql/ha_innodb.h:
  handlerton work
sql/ha_myisam.cc:
  handlerton work
sql/ha_myisammrg.cc:
  handlerton work
sql/ha_ndbcluster.cc:
  handlerton work
sql/ha_ndbcluster.h:
  handlerton work
sql/ha_partition.cc:
  handlerton work
sql/handler.cc:
  start removing storage engine specific cruft
sql/handler.h:
  start removing storage engine specific cruft
  db_type for binlog handlerton
  handlerton flag for not-user-selectable storage engines
sql/lex.h:
  start removing storage engine specific cruft
sql/log.cc:
  handlerton work
  give binlog handlerton a 'real' db_type
sql/mysql_priv.h:
  start removing storage engine specific cruft
sql/mysqld.cc:
  start removing storage engine specific cruft
sql/set_var.cc:
  start removing storage engine specific cruft
sql/sp_head.cc:
  start removing storage engine specific cruft
sql/sql_class.cc:
  start removing storage engine specific cruft
sql/sql_class.h:
  start removing storage engine specific cruft
sql/sql_lex.h:
  start removing storage engine specific cruft
sql/sql_manager.cc:
  start removing storage engine specific cruft
sql/sql_manager.h:
  start removing storage engine specific cruft
sql/sql_parse.cc:
  start removing storage engine specific cruft
sql/sql_partition.cc:
  start removing storage engine specific cruft
sql/sql_prepare.cc:
  start removing storage engine specific cruft
sql/sql_show.cc:
  start removing storage engine specific cruft
sql/sql_table.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
  start removing storage engine specific cruft
sql/sql_update.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/sql_yacc.yy:
  start removing storage engine specific cruft
  test if we should throw error
sql/table.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/table.h:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/unireg.cc:
  changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
storage/ndb/include/kernel/kernel_types.h:
  added my_config.h
storage/ndb/include/ndb_global.h.in:
  added my_config.h
storage/ndb/include/ndb_types.h.in:
  added my_config.h
config/ac-macros/storage.m4:
  New BitKeeper file ``config/ac-macros/storage.m4''
sql/handlerton.cc.in:
  New BitKeeper file ``sql/handlerton.cc.in''
2005-11-07 16:25:06 +01:00
unknown
a67e6fdf8b Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2005-11-05 22:45:54 -08:00
unknown
a7956c817e Post-merge fixes 2005-11-03 12:38:46 +03:00
unknown
883b38a2cd Merged 2005-11-03 10:28:12 +03:00
unknown
2b1652046d Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2005-11-02 22:24:36 -08:00
unknown
3e2e44f044 Post review fixes.
sql/sql_table.cc:
  Post review fixes
2005-11-02 22:13:10 -08:00
unknown
8a80936517 #view.test#:
new file
sql_table.cc, handler.h:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
view.test, view.result:
  Added a test case for bug #14540.
errmsg.txt:
  Fixed bug #14540.
  Added error ER_CHECK_NOT_BASE_TABLE.


mysql-test/r/view.result:
  Added a test case for bug #14540.
mysql-test/t/view.test:
  Added a test case for bug #14540.
sql/handler.h:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
sql/share/errmsg.txt:
  Added error ER_CHECK_NOT_BASE_TABLE.
sql/sql_table.cc:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
2005-11-02 13:44:58 -08:00
unknown
17fcbcf772 BUG#14026: When doing the end-of-prepare fix up for TABLE_LISTs used in the PS, do the fixup
for underlying tables of a merge VIEWs, too.


mysql-test/r/view.result:
  Testcase for BUG#14026
mysql-test/t/view.test:
  Testcase for BUG#14026
2005-11-02 07:05:19 +03:00
unknown
7dd86f7570 Fix bug #14466 lost sort order in GROUP_CONCAT() in a view
Item_func_group_concat::print() wasn't printing sort order thus creating wrong
view. This results in reported error.


sql/item_sum.cc:
  Fix bug #14466 lost sort order in GROUP_CONCAT() in a view
  Now Item_func_group_concat::print() prints sort order.
mysql-test/r/view.result:
  Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
mysql-test/t/view.test:
  Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
2005-11-01 17:27:10 +03:00
unknown
25d1e01409 Fixed BUG#14256: definer in view definition is not fully qualified
Changed the parser test for wildcards in hostname to checking for empty
  strings instead (analogous with the test in default_view_definer()),
  since wildcards do appear in the definer's host-part sometimes.


mysql-test/r/view.result:
  Updated result.
mysql-test/r/view_grant.result:
  Added test for BUG#14256.
mysql-test/t/view.test:
  Changed test for explicit definer; wildcards in host are ok, empty host-part is not.
mysql-test/t/view_grant.test:
  Added test for BUG#14256.
sql/sql_yacc.yy:
  Changed test for wildcards in hostpart of explicit view definer to test for empty
  host part instead. (Analogous with sql_parse.cc:default_view_definer().)
2005-10-28 12:11:32 +02:00
unknown
706157f025 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
server-tools/instance-manager/instance.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_manager.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
2005-10-12 00:59:52 +03:00
unknown
0ce12f70ed Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code


client/mysqldump.c:
  Simple optimizations of new code
  Indentation fixes
client/mysqltest.c:
  Removed not needed variable
include/mysql_com.h:
  Made octec2hex() more usable
mysql-test/r/ctype_utf8.result:
  CHAR() now returns binary string as default
mysql-test/r/func_str.result:
  CHAR() now returns binary string as default
mysql-test/r/range.result:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/r/user_var-binlog.result:
  CHAR() now returns binary string as default
mysql-test/r/view.result:
  More tests of view rename
mysql-test/t/ctype_utf8.test:
  CHAR() now returns binary string as default
mysql-test/t/func_str.test:
  CHAR() now returns binary string as default
mysql-test/t/range.test:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/t/view.test:
  More tests of view rename
mysys/mf_keycache.c:
  Indentation changes
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/my_os2cond.c:
  Fix to MySQL coding style
  Optimized functions
mysys/thr_lock.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/thr_mutex.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/instance.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/thread_registry.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/ha_federated.cc:
  Use octet2hex()
sql/ha_ndbcluster.cc:
  Removed not used variable
sql/handler.cc:
  Simplify code
  Use *NONE* instead of 'none' for not existing storage engine
  Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
sql/item.h:
  Remove not needed test for *ref.  (If ref is set, it should never point at 0)
sql/item_func.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  Simplify code
  More comments
  Require that last argument to find_and_check_access() is given
  (Made code shorter and faster)
sql/item_strfunc.cc:
  Changed CHAR() to return result in binary collation
  CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
  
  Bar will shortly add the following syntax:
  CHAR(.... USING character_set)
  and ensure that
  CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings
  Use ocet2hex()
sql/item_strfunc.h:
  CHAR() now returns a binary string
sql/log_event.cc:
  Use octet2hex()
  Simplify code
sql/parse_file.cc:
  Indentation fixes
  Use for() instead of while()
sql/password.c:
  Make octet2hex() more generally usable by returning pointer to end 0
sql/slave.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_base.cc:
  Indentation fixes
sql/sql_insert.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_manager.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_parse.cc:
  Don't check thd->db when checking for function privileges
sql/sql_prepare.cc:
  Fixed wrong merge
sql/sql_select.cc:
  Fixed new bug for NOT BETWEEN X and X
sql/sql_show.cc:
  Removed not used variable
sql/sql_table.cc:
  Indentation fixed
  Removed DBUG_PRINT that is obvious from context
sql/sql_view.cc:
  Simplify code
sql/unireg.cc:
  Use octet2hex()
2005-10-12 00:58:22 +03:00
unknown
ee5795f2f4 Fix bug#13327 check_equality() wasn't checking view's fields
check_equality() finds equalities among field items. It checks input items
to be Item_fields thus skipping view's fields, which are represented by
Item_direct_view_ref. Because of this index wasn't applied in all cases
it can be.

To fix this problem check_equality() now takes real item of
Item_direct_view_ref, except outer view refs (with depended_from set).


sql/sql_select.cc:
  Fix bug #13327 VIEW performs index scan
   For proper views fields handling check_equality() now takes real item from Item_direct_view_ref, with exception of outer view refs.
mysql-test/r/view.result:
  Test case for bug#13327 VIEW performs index scan
mysql-test/t/view.test:
  Test case for bug#13327 VIEW performs index scan
2005-10-10 18:53:57 +04:00
unknown
58263844c7 Fix for BUG#13410 - qualified reference to a view column in the HAVING clause cannot be resolved.
The problem was then when a column reference was resolved to a view column, the new Item
created for this column contained the name of the view, and not the view alias.


mysql-test/r/view.result:
  Additional test for BUG#13410.
mysql-test/t/view.test:
  Additional test for BUG#13410.
sql/item.cc:
  Correctly cast 'cur_field' to Item_ident because if the original item is
  an Item_field, the cur_field is either an Item_field or an Item_ref.
  Thus we have to cast cur_field to a common super-class of both.
sql/item.h:
  - real_item() may be called before Item_ref::ref is set
    (i.e. the Item_ref object was resolved).
  - To avoid a crash and to return some meaningful value
    in such cases we return 'this'.
sql/sql_base.cc:
  - 'item' may be an Item_ref, so we test for the type of the actual
    referenced item.
  - Correctly cast 'cur_field' to Item_ident because if the original
    item is an Item_field, the cur_field is either an Item_field or an
    Item_ref. Thus we have to cast cur_field to a common super-class
    of both.
sql/table.cc:
  - When creating a new Item for a reference to a view column, use the view alias,
    and not the real view name.
  - Removed old code
2005-10-01 09:35:30 +03:00
unknown
d7e4e1a561 item.cc:
Fixed bug #13410.
  Fixed name resolution for qualified reference to a view column
  in the HAVING clause.
view.result, view.test:
  Added a test case for bug #13410.


mysql-test/t/view.test:
  Added a test case for bug #13410.
mysql-test/r/view.result:
  Added a test case for bug #13410.
sql/item.cc:
  Fixed bug #13410.
  Fixed name resolution for qualified reference to a view column
  in the HAVING clause.
2005-09-26 23:29:02 -07:00
unknown
f6a552b1cb sql_base.cc, item.cc:
Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
view.result, view.test:
  Added a test case for bug #13411.


mysql-test/t/view.test:
  Added a test case for bug #13411.
mysql-test/r/view.result:
  Added a test case for bug #13411.
sql/item.cc:
  Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
sql/sql_base.cc:
  Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
2005-09-26 20:18:59 -07:00
unknown
cbad9e2c69 test case fixed to pass w/o innodb 2005-09-25 15:44:05 +02:00
unknown
015d55b754 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/bugs/mysql-5.0-master


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2005-09-19 05:32:38 +02:00
unknown
bf58b698e2 Fix for bug#5508 after Sanja's review
mysql-test/r/view.result:
  test results for rename table view1 to view2
mysql-test/t/view.test:
  tests for rename table view1 to view2
sql/share/errmsg.txt:
  added new errormessage (schema change not allowed in rename table view)
sql/sql_rename.cc:
  added support for renaming views
sql/sql_view.cc:
  added new function mysql_rename_view
sql/sql_view.h:
  added prototype mysql_rename_view
2005-09-16 17:13:21 +02:00
unknown
d01927dc7e Merge
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-09-15 20:50:10 +04:00
unknown
de4fbc212c Fix bug #11416 Server crash if using a view that uses function convert_tz
When parser parses function convert_tz it loads available timezone tables in
thd->lex->time_zone_tables_used. But view have another lex that main query.
Thus time_zone_tables_used of main query left uninitialized.
When Item_func_conver_tz is fixed it takes timezone tables from main query
and later when it executed it assumes that timezone tables are loaded and
failed that assertion.



sql/sql_view.cc:
  Fix bug #11416 Server crash if using a view that uses function convert_tz
mysql-test/r/view.result:
  Test case for bug#11416 Server crash if using a view that uses function convert_tz
mysql-test/t/view.test:
  Test case for bug#11416 Server crash if using a view that uses function convert_tz
2005-09-15 00:08:12 +04:00
unknown
97bea9092e Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-13000


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-09-14 20:32:59 +04:00
unknown
b214671e09 Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().


mysql-test/r/func_time.result:
  Fixed new results for testcases containing EXPLAIN EXTENDED SELECT ...
   WEEKDAY ... DAYNAME. The new results are correct and correspond to
   the changes in create_func_weekday() and create_func_dayname().
mysql-test/r/view.result:
  Fixed some testcases results (bugs #12963, #13000).
mysql-test/t/view.test:
  Added testcases for for bugs #12963, #13000.
sql/item_create.cc:
  Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
   DAYOFWEEK(), and WEEKDAY().
   Modified create_func_dayname(), create_func_dayofweek(), and
   create_func_weekday(). They don´t insert Item_func_to_days
   object now.
sql/item_timefunc.cc:
  Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
   DAYOFWEEK(), and WEEKDAY().
   Modified Item_func_weekday::val_int(). The argument of weekday should
   not be considered now to be Item_func_to_days object.
sql/item_timefunc.h:
  Fixed bugs #12963, 13000: wrong VIEW creation with DAYNAME(),
   DAYOFWEEK(), and WEEKDAY.
   Modified Item_func_weekday::func_name(). It returns now different
   names depending on the odbc_type attribute value.
2005-09-14 20:25:00 +04:00
unknown
d0a78e6fa6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0


sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/func_in.result:
  merge
mysql-test/r/lowercase_view.result:
  merge
mysql-test/r/mysqldump.result:
  merge
mysql-test/r/sql_mode.result:
  merge
mysql-test/r/temp_table.result:
  merge
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2005-09-14 11:07:04 +03:00
unknown
f7aeb6f9fd part 1 (ver 2, postreview fix) of WL#2787
view definer information syntax/storage/replication
fixed SOURCE field of .frm


mysql-test/r/func_in.result:
  definer information added to CREATE VIEW
mysql-test/r/lowercase_view.result:
  definer information added to CREATE VIEW
mysql-test/r/mysqldump.result:
  definer information added to CREATE VIEW
mysql-test/r/rpl_view.result:
  check log of queries
mysql-test/r/skip_grants.result:
  --skip-grants do not allow use user information
mysql-test/r/sql_mode.result:
  definer information added to CREATE VIEW
mysql-test/r/temp_table.result:
  definer information added to CREATE VIEW
mysql-test/r/view.result:
  definer information added to CREATE VIEW
  test of storing/restoring definer information
mysql-test/r/view_grant.result:
  test of grant check of definer information
  definer information added to CREATE VIEW
mysql-test/t/rpl_view.test:
  check log of queries
mysql-test/t/skip_grants.test:
  --skip-grants do not allow use user information
mysql-test/t/view.test:
  test of storing/restoring definer information
mysql-test/t/view_grant.test:
  test of grant check of definer information
sql/mysql_priv.h:
  CREATE/ALTER VIEW print support
  set current user as definer procedure
sql/share/errmsg.txt:
  new errors/warnings
sql/sql_acl.cc:
  make find_acl_user public to allow to check user
sql/sql_acl.h:
  make find_acl_user public to allow to check user
sql/sql_lex.h:
  storing definer information
sql/sql_parse.cc:
  send CREATE/ALTER VIEW for replication with full list of options
  set current user as definer procedure
sql/sql_show.cc:
  new CREATE VIEW options printed
sql/sql_view.cc:
  check of definer clause
  changes in .frm file
  definer information storage support
  now we store only original SELECT in SOURCE field of .frm
sql/sql_yacc.yy:
  definer information sintax support
  getting SOURCE field information for .frm
sql/table.h:
  definer information storage
2005-09-14 10:53:09 +03:00
unknown
849273bcfb Merge
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-09-13 22:22:51 +04:00
unknown
d2789003b3 Fix for BUG#6808.
The problem was in that add_table_to_list was testing for duplicate tables
in a list of tables that included the created view.


mysql-test/r/view.result:
  Test for BUG#6808
mysql-test/t/view.test:
  Test for BUG#6808
sql/sql_parse.cc:
  When testing for table name uniquness, skip the first table the current
  statement is CREATE VIEW. Notice that the first table is skipped differently
  for CREATE TABLE ... SELECT ... statements, so we don't have to handle that
  case here (see production 'create_select', the call 'to save_and_clear').
2005-09-12 17:01:17 +03:00
unknown
b3dc4ea3e3 Fix bug #12993 View column rename broken in subselect
When view column aliased in subselect alias is set on ref which represents
field. When tmp table is created for subselect, it takes name of original field
not ref. Because of this alias on view column in subselect is lost. Which
results in reported error.

Now when alias is set on ref, it's set on ref real item too.


mysql-test/r/view.result:
  Test case for bug #12993  View column rename broken in subselect
mysql-test/t/view.test:
  Test case for bug #12993  View column rename broken in subselect
sql/sql_base.cc:
  Fix bug #12993 View column rename broken in subselect
  Now when alias is set on ref, it's set on ref real item too.
2005-09-12 02:46:35 +04:00
unknown
dfc328e104 Manual merge 2005-09-07 22:55:49 +04:00
unknown
792221e365 Fix bug #12922 if(sum(),...) with group from view returns wrong results
Fields of view represented by Item_direct_view_ref. When complex expression
such as if(sum()>...,...) is splited in simpler parts by refs was ignored.
Beside this direct ref doesn't use it's result_field and thus can't store
it's result in tmp table which is needed for sum() ... group.
All this results in reported bug.

Item::split_sum_func2() now converts Item_direct_view_ref to Item_ref to
make fields from view being storable in tmp table.


sql/item.h:
  Fix bug #12922 if(sum(),...) with group from view returns wrong results
  Added function ref_type() to distinguish Item_ref subclasses
sql/item.cc:
  Fix bug #12922 if(sum(),...) with group from view returns wrong results
   Item::split_sum_func2() now converts Item_direct_view_ref to Item_ref to make fields from view being storable in tmp table.
mysql-test/t/view.test:
  Test case for bug#12922 if(sum(),...) with group from view returns wrong results
mysql-test/r/view.result:
  Test case for bug#12922 if(sum(),...) with group from view returns wrong results
2005-09-07 22:38:36 +04:00
unknown
3003e5a0eb Fix for BUG#12941: in create_tmp_field(), if the passed item is an Item_ref, put newly
created item into item->result_field, not *(item->ref)->result_field.


mysql-test/r/view.result:
  Tescase for BUG#12941
mysql-test/t/view.test:
  Tescase for BUG#12941
2005-09-07 11:50:41 +04:00
unknown
7e2024b4f4 postmerge changes
mysql-test/t/lowercase_view.test:
  error code changed after merege
mysql-test/t/view.test:
  error code changed after merege
sql/item.cc:
  inline function used instead of frequently used expression
  removed old TODO
sql/sql_base.cc:
  layoutfixed
  inline function used instead of frequently used expression
sql/sql_insert.cc:
  inline function used instead of frequently used expression
2005-09-02 09:50:17 +03:00
unknown
a8fc85cbe3 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


BitKeeper/etc/config:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-09-01 22:42:37 +03:00
unknown
a2d8ab0bb5 Fix for spelling miss and eol junk
client/mysqltest.c:
  Fix spelling error
mysql-test/t/information_schema.test:
  Eol junk detected, added #
mysql-test/t/rpl_slave_status.test:
  Missing ;
mysql-test/t/sp.test:
  Eol junk detected, added #
mysql-test/t/view.test:
  Eol junk detected, added #
2005-09-01 20:02:08 +02:00
unknown
0ccb16d636 Fix bug #12489 wrongly printed strcmp() function results in creation of broken
view.

For Item_func_strcmp print() was not defined and for this class was called
print_op of it's parent class. Because of this strcmp() was printed wrongly
and this results int creation of broken view.

Added function Item_func_strcmp::print() which correctly prints strcmp()
function.


sql/item_cmpfunc.h:
  Fix bug #12489 wrongly printed strcmp() function results in creation of broken view.
mysql-test/r/view.result:
  Test case for bug #12489 wrongly printed strcmp() function results in creation of broken view.
mysql-test/t/view.test:
  Test case for bug #12489 wrongly printed strcmp() function results in creation of broken view.
2005-08-31 00:54:41 +04:00
unknown
f5d7dca964 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0


sql/sql_view.cc:
  Auto merged
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2005-08-25 17:47:18 +03:00
unknown
750a05887f fix for bug #12533 (crash on DESCRIBE <view> after renaming base table column)
mysql-test/r/view.result:
  result of test for bug #12533
mysql-test/t/view.test:
  test for bug #12533 (crash on DESCRIBE <view> after renaming base table column)
sql/sql_show.cc:
  close thread tables even if process_table bails out
2005-08-25 09:24:21 +02:00
unknown
eb7c4ff2db Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


BitKeeper/etc/config:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
sql/share/errmsg.txt:
  merge
sql/sql_insert.cc:
  merge
sql/table.h:
  merge
2005-08-23 23:17:36 +03:00
unknown
2e804faa0d Manual merge 2005-08-18 15:18:26 -07:00
unknown
c9fa6a47bd view.test:
Added a test case for bug #10970.
view.result:
  Added a test case for bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).


sql/share/errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).
sql/sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
mysql-test/r/view.result:
  Fixed bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
mysql-test/t/view.test:
  Added a test case for bug #10970.
2005-08-17 22:19:12 -07:00
unknown
cf7b1241d1 sql_view.cc:
correct exit from mysql_create_view to restore ennvironment (BUG#12468)
view.result, view.test:
  test of CRETE VIEW in SP


mysql-test/t/view.test:
  test of CRETE VIEW in SP
mysql-test/r/view.result:
  test of CRETE VIEW in SP
sql/sql_view.cc:
  correct exit from mysql_create_view to restore ennvironment
2005-08-17 22:42:53 +03:00
unknown
d32c4314ed Fix bug #12298 Typo in timestampdiff() function name results in erroneous
view being created.

Item_func_timestamp_diff::func_name() were returning function name as
"timestamp_diff" thus when view was executed function parameters wasn't 
properly recognized and error was raised.


mysql-test/r/func_time.result:
  Fix test result after bugfix #12298
sql/item_timefunc.h:
  Fix bug #12298 Typo in timestampdiff() function name results in wrong view being created.
mysql-test/t/view.test:
  Test case for bug #12298 Typo in timestampdiff()  function name results in erroneous view being created.
mysql-test/r/view.result:
  Test case for bug #12298 Typo in timestampdiff() function name results in erroneous view being created.
2005-08-12 22:42:50 +04:00
unknown
8282261289 sql_base.cc:
Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
view.test:
  Added a test case for bug #12470.


mysql-test/t/view.test:
  Added a test case for bug #12470.
sql/sql_base.cc:
  Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
2005-08-12 01:27:04 -07:00
unknown
743fde2404 sql_base.cc:
Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
view.result, view.test:
  Added a test case for bug #12382.


mysql-test/t/view.test:
  Added a test case for bug #12382.
mysql-test/r/view.result:
  Added a test case for bug #12382.
sql/sql_base.cc:
  Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
2005-08-11 16:10:34 -07:00
unknown
502e97f875 Fix for BUG#12228: SP cache code:
* Cleanup SP Cache code, now SP Cache only deletes sp_head objects in 
  sp_cache_flush_obsolete() invalidates all pointers to routines in the cache.
* Use new SP Cache use contract in the code.

There is no test case because it doesn't seem to be possible to cause thread races to end
the same way they end in heavy-load test. This patch removes the crash in heavy test.


mysql-test/r/type_bit.result:
  Drop the tables this test tries to create
mysql-test/r/view.result:
  Drop function this test creates
mysql-test/t/type_bit.test:
  Drop the tables this test tries to create
mysql-test/t/view.test:
  Drop function this test creates
sql/sp.cc:
  Fix for BUG#12228: When a routine is deleted/modified, invalidate all cached SPs in all
  threads. We need to do so because sp_lex_keeper::{prelocking_tables, query_tables_own_last}
  in one SP may depend on another SP sp_lex_keeper::m_lex is using.
sql/sp_cache.cc:
  Fix for BUG#12228:
  * Move class sp_cache to here from sp_cache.h, document the functions.
  * sp_cache_insert, sp_cache_remove, sp_cache_invalidate and sp_cache_lookup must not delete
    sp_head* objects as they may be called during SP execution when sp_head objects are used.
  * Added sp_cache_flush_obsolete() function that may delete sp_head objects.
  * Removed sp_cache_remove as there is no need for it now - when we change one SP we should
    invalidate all other SPs, because sp_lex_keeper::{prelocking_tables, 
    query_tables_own_last} from one SP depend on content of another SP (used in 
    sp_lex_keeper::m_lex).
sql/sp_cache.h:
  Fix for BUG#12228:
  * Move class sp_cache to sp_cache.cc it is not needed in .h file
  * Added comments
sql/sql_parse.cc:
  Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before running the query
sql/sql_prepare.cc:
  Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before preparing/executing a PS
2005-08-08 23:23:34 +00:00
unknown
c5bcb9f01c Manual merge of #11335 bugfix
sql/item_sum.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge
mysql-test/t/view.test:
  Manual megre
sql/sql_select.cc:
  Manual merge
2005-08-05 00:34:42 +04:00
unknown
e442059c0d Manual merge
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
2005-08-03 03:47:07 +00:00
unknown
705118d1f6 issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function


BitKeeper/etc/config:
  logging switching off
mysql-test/r/lowercase_view.result:
  hided view underlying tables from error message
mysql-test/r/view.result:
  hided view underlying tables from error message
mysql-test/t/lowercase_view.test:
  hided view underlying tables from error message
mysql-test/t/view.test:
  hided view underlying tables from error message
sql/mysql_priv.h:
  subroutine which return correct error message
sql/share/errmsg.txt:
  new error message
sql/sql_base.cc:
  subroutine which issue correct error message in case of view presence for duplicated table on update
sql/sql_delete.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_insert.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_parse.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_update.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_view.cc:
  frequently used command sequence replaced with inline function
sql/table.cc:
  frequently used command sequence replaced with inline function
sql/table.h:
  frequently used command sequence replaced with inline function
2005-08-02 22:54:49 +03:00
unknown
6b3478ec12 Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.


client/client_priv.h:
  Added OPT_TRIGGERS (to get rid of compiler warning)
client/mysql.cc:
  Added cast to get rid of compiler warning
client/mysqldump.c:
  Added OPT_TRIGGERS (to get rid of compiler warning)
  Abort if we can't write to outfile (even if --ignore-errors is given)
client/mysqltest.c:
  Added --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
include/my_sys.h:
  Make my_progname const
include/my_time.h:
  Avoid using 'bool' in C programs
mysql-test/lib/init_db.sql:
  Align with mysql_create_system_tables
  (Ideally this file should be auto-generated from the above script)
mysql-test/r/mysqltest.result:
  Test for --enable_parsing
mysql-test/r/variables.result:
  Update results after fix for overflow checking of max_heap_table_size
mysql-test/t/information_schema.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/mysqltest.test:
  Test for --enable_parsing
mysql-test/t/sp.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/variables.test:
  Portability fix for 64 bit systems
mysql-test/t/view.test:
  USe --enable/disable parsing instead of comments
mysys/my_init.c:
  May my_progname const
mysys/my_static.c:
  May my_progname const
mysys/thr_lock.c:
  Remove not needed casts
sql-common/my_time.c:
  Change bool -> my_bool as bool is not portable in C programs
sql/field.cc:
  Test number_to_datetime() for -1 instead of < 0 (Safety fix)
  New prototype for TIME_to_timestamp()
sql/item.h:
  Don't have prototypes for both uint32 and ulong as these 'may' be the same thing
sql/item_timefunc.cc:
  New prototype for TIME_to_timestamp()
sql/log.cc:
  Remove compiler warnings
sql/mysql_priv.h:
  New prototype for TIME_to_timestamp()
  Added function for comparing LEX_STRING
sql/set_var.cc:
  Added overflow checking when setting ulong variable
sql/sql_base.cc:
  Added function is_equal()
  Changed strncmp -> is_equal() as strncmp() to not match "V" (instead of "VIEW")
sql/sql_class.cc:
  Added comment
sql/sql_select.cc:
  Portability fixes
  After review fixes
sql/sql_trigger.cc:
  Use 'tables_alias_charset' for comparing database name
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/sql_view.cc:
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/time.cc:
  New prototype for TIME_to_timestamp() to allow easyer mapping to C function
sql/tztime.cc:
  bool -> my_bool (to allow calling C code from C++ code)
sql/tztime.h:
  bool -> my_bool (to allow calling C code from C++ code)
2005-07-31 12:49:55 +03:00
unknown
11abe15eab Added Non-prelocked SP execution: Now a PROCEDURE doesn't enter/leave prelocked mode for
its body, but lets each statement to get/release its own locks. This allows a broader set
of statements to be executed inside PROCEDUREs (but breaks replication)
This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126


mysql-test/r/sp-security.result:
  Drop tables this test attempts to create
mysql-test/r/sp-threads.result:
  Update test results
mysql-test/r/sp.result:
  Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/r/view.result:
  Enabled a test case that now works with prelocking-free SPs
mysql-test/t/sp-security.test:
  Drop tables this test attempts to create
mysql-test/t/sp.test:
  Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/t/view.test:
  Enabled a test case that now works with prelocking-free SPs
sql/handler.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/item_func.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sp.cc:
  Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
  "CALL proc(...)" statements.
sql/sp.h:
  Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
  "CALL proc(...)" statements.
sql/sp_cache.h:
  Added comments
sql/sp_head.cc:
  Non-prelocked SP execution:
  * Try to unlock tables after PROCEDURE arguments have been evaluated.
  * Make sp_lex_keeper be able to execute in 2 modes: A) when already in prelocked mode
    B) when its statement enters/leaves prelocked mode itself.
sql/sp_head.h:
  Non-prelocked SP execution:  Make sp_lex_keeper to additionally keep list of tables it 
  needs to prelock when its statement enters/leaves prelocked mode on its own.
sql/sql_base.cc:
  Non-prelocked SP execution: Make open_tables() to
   * detect 'CALL proc(...)' and not to do prelocking for procedure body statements.
   * Make lex->query_tables_last to point precisely to a boundary in lex->query_tables 
     list where 'own' tables and views' tables end and added-for-prelocking tables begin.
     (it was not true before - view's tables could end up after query_tables_own_last)
sql/sql_class.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_class.h:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_lex.cc:
  Non-prelocked SP execution: More rigourous cleanup in st_lex::cleanup_after_one_table_open()
sql/sql_parse.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt, remove outdated comments
sql/sql_trigger.h:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
2005-07-30 08:19:57 +00:00
unknown
a292b42436 Fix bug #11335 View redefines TinyInt(1) column definition
Item_type_holder doesn't store information about length and exact type of
original item which results in redefining length to max_length and geometry 
type to longtext.

Changed the way derived tables except unions are built. Now they are created
from original field list instead of list of Item_type_holder.


mysql-test/r/subselect.result:
  Fixed wrong test case result. bug#11335
mysql-test/r/view_grant.result:
   Fixed wrong test case result. bug#11335
mysql-test/r/view.result:
  Added test case for bug #11335. Fixed wrong test case result.
mysql-test/t/view.test:
  Test case for bug #11335 View  redefines TinyInt(1) column definition.
sql/sql_union.cc:
  Fix bug #11335 View redefines TinyInt(1) column definition.
  Changed the way derived tables except unions are built. Now they are created from original field list instead of list of Item_type_holders.
sql/sql_select.cc:
  Fix bug #11335 View redefines TinyInt(1) column definition.
  Added special handling of DATE/TIME fields to preserve field's type in tmp field creation.
  In create_tmp_field() for Item_field added special handling of case when item have to be able to store NULLs but underlaid field is NOT NULL.
sql/item_sum.cc:
  Fix bug #11335 View redefines TinyInt(1) column definition.
  Added special handling of DATE/TIME fields to preserve field's type while tmp
  field created in Item_sum_hybrid::create_tmp_field().
2005-07-30 05:53:35 +04:00
unknown
1c3f8cc214 sql_select.cc:
Fixed bug #11412.
  Reversed the patch of cs 1.1934 for the function 
  create_tmp_table. Modified the function to support
  tem_ref objects created for view fields.
item_buff.cc:
  Fixed bug #11412.
  Modified implementation of new_Cached_item to support
  cacheing of view fields.
item.h:
  Fixed bug #11412.
  Changed implementation of Item_ref::get_tmp_table_field and
  added Item_ref::get_tmp_table_item to support Item_ref objects
  created for view fields.
view.test, view.result:
  Added a test case for bug #11412.


mysql-test/r/view.result:
  Added a test case for bug #11412.
mysql-test/t/view.test:
  Added a test case for bug #11412.
sql/item.h:
  Fixed bug #11412.
  Changed implementation of Item_ref::get_tmp_table_field and
  added Item_ref::get_tmp_table_item to support Item_ref objects
  created for view fields.
sql/item_buff.cc:
  Fixed bug #11412.
  Modified implementation of new_Cached_item to support
  cacheing of view fields.
sql/sql_select.cc:
  Fixed bug #11412.
  Reversed the patch of cs 1.1934 for the function 
  create_tmp_table. Modified the function to support
  tem_ref objects created for view fields.
2005-07-25 12:57:23 -07:00
unknown
038631da3b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11760


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-20 06:59:31 +04:00
unknown
c816f29713 Fix bug #11760 Typo in Item_func_add_time::print() results in NULLs returned
by subtime() in view

Item_func_add_time::print() were printing arg[0] instead of arg[1] which
results in wrongly created view. Functions addtime() and subtime were
affected by this bug.


sql/item_timefunc.cc:
  Fix bug #11760 Typo in Item_func_add_time::print() results in wrongly created view
mysql-test/t/view.test:
  Test case for bug #11760  Typo in Item_func_add_time::print() results in wrongly created view
mysql-test/r/view.result:
  Test case for bug #11760  Typo in Item_func_add_time::print() results in wrongly created view
mysql-test/r/date_formats.result:
  Fixed wrong test result. Affected by bug#11760
2005-07-20 06:55:51 +04:00
unknown
a32bf7fb82 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"


mysql-test/r/information_schema.result:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/r/information_schema_db.result:
  INFORMATION_SCHEMA.TRIGGERS view was added.
mysql-test/r/rpl_sp.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/r/trigger.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/r/view.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/information_schema.test:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/t/rpl_sp.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/trigger.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/t/view.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
sql/handler.cc:
  Added .TRN tho the list of known file extensions assoicated with tables.
sql/item.h:
  trg_action_time_type/trg_event_type enums:
    Added TRG_ACTION_MAX/TRG_EVENT_MAX elements which should be used instead of
    magical values in various loops where we iterate through all types of trigger
    action times or/and trigger event types.
sql/lex.h:
  Added new symbol "TRIGGERS".
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger name (.TRN) files.
sql/mysqld.cc:
  Added statistical variable for SHOW TRIGGERS command.
sql/share/errmsg.txt:
  Added error message saying that one attempts to create trigger in wrong schema.
sql/sp.cc:
  Replaced magical values with TRG_EVENT_MAX/TRG_ACTION_MAX constants.
sql/sql_base.cc:
  open_unireg_entry():
    Now Table_triggers_list::check_n_load() has one more argument which
    controls whether we should prepare Table_triggers_list with fully functional
    triggers or load only their names.
sql/sql_lex.h:
  Added element for new SHOW TRIGGERS command to enum_sql_command enum.
sql/sql_parse.cc:
  prepare_schema_table():
    Added support for SHOW TRIGGERS statement.
sql/sql_show.cc:
  Added new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
sql/sql_table.cc:
  mysql_rm_table_part2():
    Replaced simple deletion of .TRG file with call to
    Table_triggers_list::drop_all_triggers which will also delete .TRN files
    for all triggers associated with table.
sql/sql_trigger.cc:
  Now triggers have database wide namespace. To support it we create special .TRN
  file with same name as trigger for each trigger. This file contains name of
  trigger's table so one does not need to specify it explicitly in DROP TRIGGER.
  Moreover DROP TRIGGER treats first part of trigger identifier as database name
  now. Updated mysql_create_or_drop_trigger() routine and
  Table_triggers_list::create_trigger()/drop_trigger()/check_n_load() methods
  accordingly. Added add_table_for_trigger() routine and
  Table_triggers_list::drop_all_triggers() method.
  
  Added Table_triggers_list::get_trigger_info() for obtaining trigger metadata.
sql/sql_trigger.h:
  Table_triggers_list:
    Use TRG_EVENT_MAX, TRG_ACTION_MAX instead of magic values.
    Added get_trigger_info() method for obtaining trigger's meta-data.
    Added drop_all_triggers() method which drops all triggers for table.
    Added declarations of trg_action_time_type_names/trg_event_type_names
    arrays which hold names of triggers action time types  and event types.
sql/sql_yacc.yy:
  Changed grammar for CREATE/DROP TRIGGER to support database wide trigger
  namespace. Added new SHOW TRIGGERS statement.
sql/table.h:
  enum enum_schema_tables:
    Added constant for new INFORMATION_SCHEMA.TRIGGERS view.
2005-07-19 20:06:49 +04:00
unknown
213c05400a Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0


BitKeeper/etc/config:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp-security.result:
  merge
mysql-test/r/view.result:
  merge
mysql-test/t/sp-security.test:
  merge
mysql-test/t/view.test:
  merge
sql/item_cmpfunc.cc:
  merge
sql/sql_class.h:
  merge
2005-07-16 00:17:05 +03:00
unknown
e84229b010 stop evaluation constant functions in WHERE (BUG#4663)
correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)


BitKeeper/etc/config:
  switch off open logging
mysql-test/r/sp-security.result:
  correct value from current_user() in function run from "security definer"
mysql-test/r/view.result:
  evaluation constant functions in WHERE (BUG#4663)
mysql-test/t/sp-security.test:
  correct value from current_user() in function run from "security definer"
mysql-test/t/view.test:
  evaluation constant functions in WHERE (BUG#4663)
sql/item.cc:
  Item_static_string_func creation if it is need
sql/item.h:
  support of Item_static_string_func creation
sql/item_cmpfunc.cc:
  do not evaluate items during view creation
sql/item_create.cc:
  create Item_func_user
sql/item_strfunc.cc:
  Item_func_sysconst in case of converting value still have to correctly print itself
  => use Item_static_string_func instead of Item_string
      Item_func_user return USER() or CURRENT_USER()
sql/item_strfunc.h:
  support of correct charset conversion procedure in Item_func_sysconst
sql/sql_class.h:
  new method
sql/sql_yacc.yy:
  Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
2005-07-16 00:01:44 +03:00
unknown
7f80ca5493 take into account table lock mode when opening table:
try to find most suitable table, to avouid pickup table with too low locking mode or occupy table with write mode for select when it will be need for update later
(BUG#9597)


mysql-test/r/view.result:
  opening table in correct locking mode test
mysql-test/t/view.test:
  opening table in correct locking mode test
sql/sql_base.cc:
  take into account table lock mode when opening table:
  try to find most suitable table, to avouid pickup table with too low locking mode or occupy table with write mode for select when it will be need for update later
2005-07-15 01:22:14 +03:00
unknown
327afd65b5 Merge
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-13 02:39:23 +02:00
unknown
c3d276165d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11709


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-13 04:39:22 +04:00
unknown
8c182f9734 view.result, view.test:
Fix for test case for bug#11709


mysql-test/t/view.test:
  Fix for test case for bug#11709
mysql-test/r/view.result:
  Fix for test case for bug#11709
2005-07-13 04:10:19 +04:00
unknown
7744e7e700 Merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-12 23:24:35 +04:00
unknown
a578be339d Fix bug#11709 View was ordered by wrong column.
When searching column to sort on, item was compared to field under view
column, but not the column itself. Because names of view column and underlaid
field may differ, it leads to possibly choosing wrong column for sorting on.

This patch makes Item_direct_view_ref::eq(Item *item,...) compare
item's name with it's own name proir to comparing to *ref item.


sql/item.cc:
  Fix bug #11709 View was ordered by wrong column
sql/item.h:
  Fix bug #11709 View was ordered by wrong column
mysql-test/t/view.test:
  Test case for bug #11709 View was ordered by wrong column.
mysql-test/r/view.result:
  Test case for bug #11709 View was ordered by wrong column.
2005-07-12 23:22:08 +04:00
unknown
f628028455 view.test, view.result:
Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
sql_view.cc:
  Expanded the fix for bug #6120 to cover the case of
  DROP VIEW / CREATE_VIEW.


sql/sql_view.cc:
  Expanded the fix for bug #6120 to cover the case of
  DROP VIEW / CREATE_VIEW.
mysql-test/r/view.result:
  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
mysql-test/t/view.test:
  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
2005-07-12 10:44:32 -07:00
unknown
51f8821af0 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into igor-inspiron.creware.com:/home/igor/mysql-5.0


sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-12 10:44:31 -07:00
unknown
9d9ef52dbe Merge
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-12 20:49:43 +04:00
unknown
2ae3cdcf97 Fix bug #11399 Column alias was lost during view preraration.
New item created in find_field_in_table() to fix view's item, was created 
without taking into account original item's alias. This patch checks if alias 
is set to the original item and if so sets it to newly created item.


sql/sql_base.cc:
  Fix bug#11399 Alias wasn't set on view column
mysql-test/t/view.test:
  Test case for bug#11399 Use an alias in a select statement on a view
mysql-test/r/view.result:
  Test case for bug#11399 Use an alias in a select statement on a view
2005-07-12 20:45:34 +04:00
unknown
f36db3540a view.result, view.test:
Added a test case for bug #11771.
item.h:
  Fixed bug #11771.
  Added method reset_query_id_processor to be able to adjust
  query_id for fields generated from * in queries like this:
  SELECT * FROM <view> ...
sql_base.cc:
  Fixed bug #11771.
  Adjusted query_id for fields generated from * in queries
  like this: SELECT * FROM <view> ...


sql/sql_base.cc:
  Fixed bug #11771.
  Adjusted query_id for fields generated from * in queries
  like this: SELECT * FROM <view> ...
sql/item.h:
  Fixed bug #11771.
  Added method reset_query_id_processor to be able to adjust
  query_id for fields generated from * in queries like this:
  SELECT * FROM <view> ...
mysql-test/t/view.test:
  Added a test case for bug #11771.
mysql-test/r/view.result:
  Added a test case for bug #11771.
2005-07-12 05:18:05 -07:00
unknown
c31a78c863 portability fix: the Max_data_length replaced with # 2005-07-08 16:25:07 +05:00