Commit graph

536 commits

Author SHA1 Message Date
unknown
1f695dbf7d Apply malff@weblab.(none) fix for bug 24736 directly to
mysql-5.1-build tree, in order to get it into mysql-5.1
faster.  See comments from Marc's original push for
patch details.
2006-12-04 11:38:40 -07:00
unknown
afc91556fb Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-11-29 23:36:26 +03:00
unknown
0e978328ae Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


libmysql/libmysql.c:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
server-tools/instance-manager/mysql_connection.cc:
  Rollback Monty's removals of explicit casts
tests/mysql_client_test.c:
  SCCS merged
2006-11-29 11:44:37 +03:00
unknown
95b7215869 Merge bk-internal:/home/bk/mysql-5.1
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt


client/mysqltest.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.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_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.cc:
  Auto merged
strings/decimal.c:
  Auto merged
2006-11-28 17:14:16 +01:00
unknown
24bbc92bdd Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/home/my/mysql-5.1


BUILD/SETUP.sh:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/log_event.cc:
  Manual merge
sql/sql_binlog.cc:
  Manual merge
2006-11-27 14:07:52 +02:00
unknown
788ad30f08 Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.


client/mysqldump.c:
  Fixed some compiler warnings
  Added some missing DBUG_RETURN
  Remove copying of 'cluster' database
client/mysqlslap.c:
  Fixed compiler warnings
client/mysqltest.c:
  After merge fix
extra/yassl/taocrypt/include/algebra.hpp:
  Removed compiler warning
mysql-test/include/im_check_env.inc:
  Fixed race condition (mysqld1 could report 'starting' or 'online'
mysql-test/mysql-test-run.pl:
  After merge fixes
  Added missing directory to LD_LIBRARY_PATH
mysql-test/r/ctype_cp1250_ch.result:
  After merge fix
mysql-test/r/im_cmd_line.result:
  Fixed race condition
mysql-test/r/im_daemon_life_cycle.result:
  Fixed race condition
mysql-test/r/im_instance_conf.result:
  Fixed race condition
mysql-test/r/im_life_cycle.result:
  Fixed race condition
mysql-test/r/im_utils.result:
  Fixed race condition
mysql-test/r/log_tables.result:
  Fixed wrong result
mysql-test/t/disabled.def:
  Disabled ndb_restore_partion, as ndb_restore_compate caused it to fail, becasue of table 'cluster/def/schema' which is stored in ndb_backup50
mysys/my_compress.c:
  Removed compiler warnings
mysys/my_getopt.c:
  Ensure we always have at least one space between option name and value
plugin/fulltext/plugin_example.c:
  Removed compiler warnings
server-tools/instance-manager/mysql_connection.cc:
  After merge fix
sql/event_data_objects.cc:
  Fixed compiler warnings
  Fixed platform compatibility issues (%lld is not portable)
sql/event_data_objects.h:
  Fixed compiler warnings
sql/event_db_repository.cc:
  Fixed compiler warnings
sql/event_queue.cc:
  Fixed compiler warnings
sql/event_scheduler.cc:
  Fixed compiler warnings
sql/events.cc:
  Fixed compiler warnings
sql/field.cc:
  Fixed compiler warnings
sql/ha_ndbcluster.cc:
  Fixed compiler warnings
sql/ha_ndbcluster_binlog.cc:
  Fixed compiler warnings
sql/ha_partition.cc:
  Fixed compiler warnings
sql/handler.cc:
  Fixed compiler warnings
sql/item_cmpfunc.cc:
  Fixed DBUG_PRINT style
sql/item_func.cc:
  Fixed compiler warnings
sql/log.cc:
  Fixed compiler warnings
sql/log_event.cc:
  Fixed compiler warnings
sql/mysqld.cc:
  Fixed compiler warnings
sql/opt_range.cc:
  Fixed compiler warnings
sql/repl_failsafe.cc:
  Indentation fixes
sql/rpl_rli.cc:
  Fixed compiler warnings
sql/rpl_tblmap.cc:
  Fixed compiler warnings
sql/set_var.cc:
  Fixed compiler warnings
sql/slave.cc:
  Fixed compiler warnings
sql/sp_head.cc:
  Fixed compiler warnings
sql/sql_base.cc:
  Fixed compiler warnings
  Fixed indentation
sql/sql_binlog.cc:
  Fixed compiler warnings
sql/sql_cache.cc:
  Fixed compiler warnings
sql/sql_class.cc:
  Fixed compiler warnings
sql/sql_handler.cc:
  Fixed compiler warnings
sql/sql_lex.cc:
  Fixed compiler warnings
sql/sql_parse.cc:
  Fixed compiler warnings
sql/sql_partition.cc:
  Fixed compiler warnings
sql/sql_prepare.cc:
  Fixed compiler warnings
sql/sql_table.cc:
  Fixed compiler warnings
sql/sql_test.cc:
  Fixed DBUG_PRINT style
sql/sql_trigger.cc:
  Fixed DBUG_PRINT style
sql/table.cc:
  Fixed compiler warnings
storage/federated/ha_federated.cc:
  Fixed compiler warnings
storage/myisam/mi_rsamepos.c:
  Fixed compiler warnings
storage/ndb/include/ndb_global.h.in:
  After merge fix
storage/ndb/include/util/NdbOut.hpp:
  Inform gcc that ndbout_c takes a printf() string as argument
storage/ndb/include/util/SimpleProperties.hpp:
  After merge fixes
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Fixed compiler warnings
  Fixed usage of uninitialized value (Got help from Jonas with patch)
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/lgman.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/pgman.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/restore.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
  Fixed compiler warnings
  Added missing enum's to switch
storage/ndb/src/kernel/vm/Configuration.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/DLHashTable.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/RWPool.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/WOPool.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
  Initialize possible uninitialized variable
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  Added missing enum's (To avoid compiler warnings)
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/ObjectMap.hpp:
  Fixed compiler warnings
storage/ndb/tools/desc.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/Restore.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/consumer_restore.cpp:
  Fixed compiler warnings
unittest/mytap/t/basic-t.c:
  Fixed compiler warnings
unittest/mytap/tap.c:
  Fixed compiler warnings
2006-11-27 01:47:38 +02:00
unknown
092b8f9e9e Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/mysql-5.1-mrg


BitKeeper/deleted/.del-bdb-deadlock.test:
  Auto merged
Makefile.am:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/deadlock.inc:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  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_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.cc:
  Auto merged
client/mysqltest.c:
  merging
include/my_time.h:
  merging
libmysql/libmysql.c:
  merging
mysql-test/t/order_by.test:
  merging
sql/sql_yacc.yy:
  merging
2006-11-17 19:01:35 +04:00
unknown
0b3eee81df Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string


BUILD/SETUP.sh:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/item_timefunc.cc:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/mysqld.cc.rej:
  manual merge
2006-11-16 14:38:45 +02:00
unknown
418fd54843 Bug#18239 (Possible to overload internal functions with stored functions)
Bug#21025 (misleading error message when creating functions named 'x', or 'y')
Bug#22619 (Spaces considered harmful)

This change contains a fix to report warnings or errors, and multiple tests
cases.

Before this fix, name collisions between:
- Native functions
- User Defined Functions
- Stored Functions
were not systematically reported, leading to confusing behavior.

I) Native / User Defined Function

Before this fix, is was possible to create a UDF named "foo", with the same
name as a native function "foo", but it was impossible to invoke the UDF,
since the syntax "foo()" always refer to the native function.
After this fix, creating a UDF fails with an error if there is a name
collision with a native function.

II) Native / Stored Function

Before this fix, is was possible to create a SF named "db.foo", with the same
name as a native function "foo", but this was confusing since the syntax
"foo()" would refer to the native function. To refer to the Stored Function,
the user had to use the "db.foo()" syntax.
After this fix, creating a Stored Function reports a warning if there is a
name collision with a native function.

III) User Defined Function / Stored Function

Before this fix, creating a User Defined Function "foo" and a Stored Function
"db.foo" are mutually exclusive operations. Whenever the second function is
created, an error is reported. However, the test suite did not cover this
behavior.
After this fix, the  behavior is unchanged, and is now covered by test cases.

Note that the code change in this patch depends on the fix for Bug 21114.


mysql-test/r/sp.result:
  New test cases.
mysql-test/r/udf.result:
  New test cases.
mysql-test/t/sp.test:
  New test cases.
mysql-test/t/udf.test:
  New test cases.
sql/sql_lex.cc:
  Name collisions with native functions.
sql/sql_lex.h:
  Name collisions with native functions.
sql/sql_yacc.yy:
  Name collisions with native functions.
sql/share/errmsg.txt:
  Name collisions with native functions.
mysql-test/r/sp_gis.result:
  New test cases.
mysql-test/t/sp_gis.test:
  New test cases.
2006-11-14 19:34:16 -07:00
unknown
90d14d50a9 Merge mysql.com:/home/hf/work/mysql-5.0.clean
into  mysql.com:/home/hf/work/mysql-5.1.clean


include/my_time.h:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/gis-rtree.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.h:
  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_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/my_decimal.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/records.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.h:
  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
sql-common/my_time.c:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/type_newdecimal.result:
  SCCS merged
mysql-test/t/type_newdecimal.test:
  merging
sql/item.cc:
  merging
sql/item_subselect.cc:
  SCCS merged
sql/item_timefunc.h:
  merging
sql/sql_lex.cc:
  SCCS merged
sql/sql_select.h:
  merging
2006-11-08 19:09:39 +04:00
unknown
2dac6ffdfe Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  example.com:/work/mysql-5.1-runtime-bug22830-new


sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-11-02 13:59:44 +01:00
unknown
63030d767c Better fix for bug#22830
Events: crash with procedure which alters events with function

Post-review CS

This fix also changes the handling of KILL command combined with
subquery. It changes the error message given back to "not supported",
from parse error. The error for CREATE|ALTER EVENT has also been changed
to generate "not supported yet" instead of parse error.
In case of a SP call, the error is "not supported yet". This change
cleans the parser from code which should not belong to there. Still
LEX::expr_allows_subselect is existant because it simplifies the handling
 of SQLCOM_HA_READ which forbids subselects.


mysql-test/r/events_bugs.result:
  update resut
mysql-test/r/events_grant.result:
  update result
mysql-test/r/kill.result:
  the error message has been changed for KILL
mysql-test/t/events_bugs.test:
  Update old tests with the new emitted error
  
  Add a test case for
  BUG#22830 Events: crash with procedure which alters events with function
mysql-test/t/events_grant.test:
  add ORDER BY clause to keep the result deterministic.
mysql-test/t/kill.test:
  use name of the error, and change the error
  from parse error, to not supported
sql/sql_lex.cc:
  Add an auxiliary function that checks whether SP and/or
  tables are used in the statement. This function is helpful for
  statements that cannot handle subqueries ans SP calls. Adding out
  of the parser cleans the latter of handling of special cases and
  letting it do its job of parsing.
sql/sql_lex.h:
  helper function to check whether a table or SP was used
sql/sql_parse.cc:
  Use LEX::table_or_sp_used() for SQLCOM_CREATE_EVENT, SQLCOM_ALTER_EVENT
  and SQLCOM_KILL. SQLCOM_DROP event does not use `expr` rule and thus a check is
  not needed.
sql/sql_yacc.yy:
  Remove usage of LEX::expr_allows_subselect for CREATE|ALTER EVENT
  and KILL. There is only one left occurence - SQLCOM_HAREAD, but it 
  adds one table to the list of tables
2006-11-02 13:51:43 +01:00
unknown
8c6382f5c6 Merge mockturtle.local:/home/dlenev/src/mysql-5.0-hash-2
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge


sql/sp.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
2006-11-01 15:46:40 +03:00
unknown
57c2f22a54 Small cleanup in code handling stored routines/table prelocking.
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.


include/hash.h:
  Introduced auxillary hash_init_opt() macro which simplifies
  lazy initialization of HASH objects.
sql/sp.cc:
  Use lazy initialization for Query_tables_list::sroutines hash.
  This step should significantly decrease amount of memory consumed
  by stored routines as we no longer will allocate chunk of memory
  required for this HASH for each statement in routine.
sql/sql_lex.cc:
  Use lazy initialization for Query_tables_list::sroutines hash.
  This step should significantly decrease amount of memory consumed
  by stored routines as we no longer will allocate chunk of memory
  required for this HASH for each statement in routine.
sql/sql_lex.h:
  Updated comment describing Query_tables_list::sroutines to
  reflect that now we are use lazy initialization for this hash.
  Added constant for initial size of this hash.
2006-11-01 15:41:48 +03:00
unknown
361f0468db Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug8804-r4


sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
2006-11-01 00:54:49 +03:00
unknown
48df3b96a1 BUG#8804: wrong results for NULL IN (SELECT ...)
Evaluate "NULL IN (SELECT ...)" in a special way: Disable pushed-down 
conditions and their "consequences": 
 = Do full table scans instead of unique_[index_subquery] lookups.
 = Change appropriate "ref_or_null" accesses to full table scans in
   subquery's joins.
Also cache value of NULL IN (SELECT ...) if the SELECT is not correlated 
wrt any upper select.


mysql-test/r/subselect.result:
  BUG#8804: wrong results for NULL IN (SELECT ...): 
   - Updated test results
sql/item.h:
  BUG#8804: wrong results for NULL IN (SELECT ...): 
   - Added comments
sql/item_cmpfunc.cc:
  BUG#8804: wrong results for NULL IN (SELECT ...): 
  Made Item_in_optimizer to:
  - cache the value of "NULL IN (uncorrelated select)"
  - Turn off pushed-down predicates when evaluating "NULL IN (SELECT ...)"
sql/item_cmpfunc.h:
  BUG#8804: wrong results for NULL IN (SELECT ...): 
  - Made Item_in_optimizer cache the value of "NULL IN (uncorrelated select)"
  - Added comments
sql/item_subselect.cc:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - When needed, wrap the predicates we push into subquery into an 
    Item_func_trig_cond so we're able to turn them off when evaluating 
    NULL IN (SELECT ...).
  - Added code to evaluate NULL IN (SELECT ...) in a special way:
    = In [unique_]index_subquery, do full table scan to see if there 
      are any rows.
    = For other subqueries, change ref[_or_null] to ALL if the
      ref[_or_null] was created from pushed-down predicate.
sql/item_subselect.h:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - Added Item_subselect::is_correlated
  - Added comments
sql/records.cc:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - Make rr_sequential() non-static
sql/sql_lex.cc:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - Added st_select_lex::is_correlated and Item_subselect::is_correlated.
sql/sql_lex.h:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - Added st_select_lex::is_correlated
sql/sql_select.cc:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - Added KEY_FIELD::outer_ref to keep track of which ref accesses are 
    created from predicates that were pushed down into the subquery.
sql/sql_select.h:
  BUG#8804: wrong results for NULL IN (SELECT ...):
  - Added KEYUSE::outer_ref
mysql-test/r/subselect3.result:
  New BitKeeper file ``mysql-test/r/subselect3.result''
mysql-test/t/subselect3.test:
  New BitKeeper file ``mysql-test/t/subselect3.test''
2006-10-31 20:51:09 +03:00
unknown
37a823b774 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B21809-5.0-opt


sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
2006-10-31 16:15:35 +02:00
unknown
f51d0812a7 Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
The SQL parser was using Item::name to transfer user defined function attributes
to the user defined function (udf). It was not distinguishing between user defined 
function call arguments and stored procedure call arguments. Setting Item::name 
was causing Item_ref::print() method to print the argument as quoted identifiers 
and caused views that reference aggregate functions as udf call arguments (and 
rely on Item::print() for the text of the view to store) to throw an undefined 
identifier error.
Overloaded Item_ref::print to print aggregate functions as such when printing
the references to aggregate functions taken out of context by split_sum_func2()
Fixed the parser to properly detect using AS clause in stored procedure arguments
as an error.
Fixed printing the arguments of udf call to print properly the udf attribute.


mysql-test/r/udf.result:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - test cases
mysql-test/t/udf.test:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - test cases
sql/item.cc:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - Don't print the refs to SUM functions as refs.
sql/item_func.cc:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - print the aliases in the udf calls
sql/item_func.h:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - print the aliases in the udf calls
sql/sql_lex.cc:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - disable aliases for arguments in stored routine calls
sql/sql_lex.h:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - disable aliases for arguments in stored routine calls
sql/sql_yacc.yy:
  Bug #21809: Error 1356 while selecting from view with grouping though underlying
              select OK.
   - disable aliases for arguments in stored routine calls
   - fix bison duplicate symbol warnings
2006-10-24 15:26:41 +03:00
unknown
efcd6b42b4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-10-23 12:06:59 +04:00
unknown
fcbf1509e2 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt


BitKeeper/deleted/.del-bdb.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
include/my_base.h:
  SCCS merged
mysql-test/include/mix1.inc:
  SCCS merged
mysql-test/r/group_by.result:
  SCCS merged
mysql-test/r/innodb_mysql.result:
  SCCS merged
mysql-test/t/group_by.test:
  SCCS merged
sql/sql_select.cc:
  SCCS merged
2006-10-19 16:43:46 +02:00
unknown
990b106b63 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string


BUILD/SETUP.sh:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/events.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/events.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_parse.cc:
  remove_escape() function removed. Manual merge.
sql/table.cc:
  Manually merged. Old line removed.
tests/mysql_client_test.c:
  Manually merged. test_status position now last.
sql/sql_parse.cc.rej:
  undefined
sql/table.cc.rej:
  undefined
tests/mysql_client_test.c.rej:
  undefined
2006-10-17 19:54:44 +03:00
unknown
6101fd25d0 Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
In some cases this resulted in choosing non-optimal execution plans.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.



mysql-test/r/select.result:
  Added a test case for bug #19579.
mysql-test/t/select.test:
  Added a test case for bug #19579.
sql/item_cmpfunc.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_base.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_lex.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_lex.h:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_select.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Now info of such potentially saragable predicates is saved in
  an array and after reading const tables we check whether this
  predicates has become saragable.
2006-10-16 14:25:28 -07:00
unknown
e94087c5dd Changed several char* to LEX_STRING*.
BUILD/SETUP.sh:
  Added check for CCACHE_DISABLE. If set, do not
  use ccache at all.
BUILD/compile-pentium-gcov:
  Moved CCACHE_DISABLE up before going into SETUP.sh.
  
  Added debug_extra_flags to extra_flags.
mysql-test/r/create.result:
  Added tests for incorrect database names.
mysql-test/r/ctype_create.result:
  Added tests for incorrect alter database names.
mysql-test/r/events.result:
  Added tests for incorrect database names.
mysql-test/r/grant.result:
  Output changed to capital letters.
mysql-test/t/alter_table.test:
  Removed extra empty line
mysql-test/t/create.test:
  Added tests for incorrect database names.
mysql-test/t/ctype_create.test:
  Added tests for incorrect name handling
mysql-test/t/events.test:
  Added tests for incorrect database names.
sql/item_timefunc.cc:
  Added dummy case to avoid compiler warning.
sql/mysql_priv.h:
  Changed argument from char pointer to LEX_STRING pointer.
sql/mysqld.cc:
  Added a missing component from struct.
sql/sql_class.h:
  Added function LEX_STRING_make that sets the string and length.
sql/sql_db.cc:
  Changed several char pointers to lex_strings.
sql/sql_lex.cc:
  name is now LEX_STRING
sql/sql_lex.h:
  Changed name to LEX_STRING.
sql/sql_parse.cc:
  Changed several char pointers to lex_strings.
  
  db_length needed a trick, because in old client protocol there
  was an extra char zero added to the string.
  
  check_db_name() now takes LEX_STRING pointer as an argument.
  
  Changed remove_escape() to take LEX_STRING pointer as an argument.
  
  Removed COM_CREATE_DB and COM_DROP_DB. These are obsolete.
sql/sql_table.cc:
  char* -> LEX_STRING*
sql/sql_yacc.yy:
  Changed char* -> LEX_STRING*
sql/table.cc:
  check_db_name() now takes LEX_STRING* as argument instead of char*.
  
  Optimized code a bit.
tests/mysql_client_test.c:
  Added test for (short) status.
  
  After defining out (ifdef) COM_DROP_DB and COM_CREATE_DB
  in mysqld.cc mysql_client_test needed to be informed that
  failing in recognizing these commands is not fatal error
  anymore.
2006-10-16 19:57:33 +03:00
unknown
649f3d5479 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953


mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
2006-10-12 18:33:07 +04:00
unknown
8acc9a9612 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug20953


mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
2006-10-12 18:06:26 +04:00
unknown
6d1fdc7308 BUG#20953: create proc with a create view that uses local vars/params
should fail to create

The problem was that this type of errors was checked during view
creation, which doesn't happen when CREATE VIEW is a statement of
a created stored routine.

The solution is to perform the checks at parse time.  The idea of the
fix is that the parser checks if a construction just parsed is allowed
in current circumstances by testing certain flags, and this flags are
reset for VIEWs.

The side effect of this change is that if the user already have
such bogus routines, it will now get a error when trying to do

  SHOW CREATE PROCEDURE proc;

(and some other) and when trying to execute such routine he will get

  ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)

However there should be very few such users (if any), and they may
(and should) drop these bogus routines.


mysql-test/r/sp-error.result:
  Add result for bug#20953: create proc with a create view that uses
  local vars/params should fail to create.
mysql-test/r/view.result:
  Update results.
mysql-test/t/sp-error.test:
  Add test case for bug#20953: create proc with a create view that uses
  local vars/params should fail to create.
mysql-test/t/view.test:
  Add second test for variable in a view.
  Remove SP variable in a view test, as it tests wrong behaviour.
  Add test for derived table in a view.
sql/sql_lex.cc:
  Remove LEX::variables_used.
sql/sql_lex.h:
  Remove LEX::variables_used and add st_parsing_options structure and
  LEX::parsing_options member.
sql/sql_view.cc:
  Move some error checking to sql/sql_yacc.yy.
sql/sql_yacc.yy:
  Check for disallowed syntax in a CREATE VIEW at parse time to rise a
  error when it is used inside CREATE PROCEDURE and CREATE FUNCTION, as
  well as by itself.
2006-10-12 18:02:57 +04:00
unknown
c689d424fd Merge macbook.gmz:/Users/kgeorge/mysql/work/B21174-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21174-5.1-opt


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
mysql-test/r/ps.result:
  merge 5.0-opt -> 5.1-opt
sql/unireg.cc:
  merge 5.0-opt -> 5.1-opt
2006-09-27 13:03:41 +03:00
unknown
f0bd502ac8 Fixed bug #21646.
Presence of a subquery in the ON expression of a join 
should not block merging the view that contains this join.
Before this patch the such views were converted into 
into temporary table views.


mysql-test/r/view.result:
  Added a test case for bug #21646.
mysql-test/t/view.test:
  Added a test case for bug #21646.
sql/mysql_priv.h:
  Fixed bug #21646.
  Added a new parsing state 'IN_ON', true when
  the parser is in an ON expression of a join.
sql/sql_lex.cc:
  Fixed bug #21646.
  Presence of a subquery in the ON expression of a join 
  should not block merging the view that contains this join.
sql/sql_yacc.yy:
  Fixed bug #21646.
  Added a new parsing state 'IN_ON', true when
  the parser is in an ON expression of a join.
2006-09-25 06:15:14 -07:00
unknown
5222b59093 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1


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/func_time.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/heap_hash.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/row.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_list.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/sp.test:
  SCCS merged
sql/item_cmpfunc.cc:
  SCCS merged
sql/sql_select.cc:
  SCCS merged
2006-09-18 12:57:20 +02:00
unknown
db1a94a7ff Merge bk-internal:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-09-18 12:20:20 +02:00
unknown
58e178c5cc Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information 
to restore correctly the having clause for the second execution.
Saved andor structure of the having conditions at the proper moment
before any calls of split_sum_func2 that could modify the having structure
adding new Item_ref objects. (These additions, are produced not with 
the statement mem_root, but rather with the execution mem_root.)


mysql-test/r/sp.result:
  Added a test case for bug #21493.
mysql-test/t/sp.test:
  Added a test case for bug #21493.
sql/sql_delete.cc:
  Fixed bug #21493: crash for the second execution of a function
  containing a select statement that uses an aggregating IN subquery.
  Added a parameter to the function fix_prepare_information 
  to restore correctly the having clause for the second execution.
sql/sql_insert.cc:
  Fixed bug #21493: crash for the second execution of a function
  containing a select statement that uses an aggregating IN subquery.
  Added a parameter to the function fix_prepare_information 
  to restore correctly the having clause for the second execution.
sql/sql_lex.cc:
  Fixed bug #21493: crash for the second execution of a function
  containing a select statement that uses an aggregating IN subquery.
  Added a parameter to the function fix_prepare_information 
  to restore correctly the having clause for the second execution.
sql/sql_lex.h:
  Fixed bug #21493: crash for the second execution of a function
  containing a select statement that uses an aggregating IN subquery.
  Added a parameter to the function fix_prepare_information 
  to restore correctly the having clause for the second execution.
sql/sql_update.cc:
  Fixed bug #21493: crash for the second execution of a function
  containing a select statement that uses an aggregating IN subquery.
  Added a parameter to the function fix_prepare_information 
  to restore correctly the having clause for the second execution.
2006-09-16 09:50:48 -07:00
unknown
7d131bcde2 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/usr/home/ram/work/mysql-5.1-maint


BitKeeper/etc/ignore:
  auto-union
mysql-test/mysql-test-run.pl:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.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_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
2006-09-15 14:15:09 +05:00
unknown
f1e6d23944 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mockturtle.local:/home/dlenev/src/mysql-5.1-rt-merge


BitKeeper/etc/ignore:
  auto-union
client/mysqltest.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-09-14 23:53:35 +04:00
unknown
fba86d2b7e Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/50
into  maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/51


BUILD/SETUP.sh:
  Auto merged
client/Makefile.am:
  Auto merged
dbug/Makefile.am:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/Makefile.am:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_match.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
mysys/my_seek.c:
  Auto merged
regex/Makefile.am:
  Auto merged
scripts/Makefile.am:
  Auto merged
server-tools/instance-manager/Makefile.am:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.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_repl.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/stacktrace.c:
  Auto merged
sql-common/client.c:
  Auto merged
sql/stacktrace.h:
  Auto merged
storage/innobase/Makefile.am:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
tests/Makefile.am:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
BitKeeper/deleted/.del-mytest.c:
  Delete: libmysql/mytest.c
BitKeeper/deleted/.del-make_win_bin_dist:
  Delete: scripts/make_win_bin_dist
BitKeeper/deleted/.del-message.mc~1:
  Delete: sql/message.mc
Makefile.am:
  Manual merge (use local)
configure.in:
  Manual merge (use local)
BitKeeper/deleted/.del-Makefile.in:
  Manual merge (use local)
client/mysqlbinlog.cc:
  Manual merge (use local)
extra/Makefile.am:
  Manual merge (use local)
extra/comp_err.c:
  Manual merge (use local)
extra/yassl/Makefile.am:
  Manual merge (use local)
extra/yassl/taocrypt/Makefile.am:
  Manual merge (use local)
include/my_dbug.h:
  Manual merge (use local)
mysql-test/mysql-test-run.pl:
  Manual merge (use local)
mysql-test/lib/mtr_process.pl:
  Manual merge (use local)
mysys/Makefile.am:
  Manual merge (use local)
server-tools/Makefile.am:
  Manual merge (use local)
sql/Makefile.am:
  Manual merge (use local)
sql/sp.cc:
  Manual merge
sql/sp_head.cc:
  Manual merge
sql/sql_class.h:
  Manual merge (use local)
sql/sql_select.cc:
  SCCS merged
sql/table.cc:
  Manual merge
storage/archive/ha_archive.cc:
  Manual merge
storage/heap/Makefile.am:
  Manual merge (use local)
storage/myisam/Makefile.am:
  Manual merge (use local)
storage/myisammrg/Makefile.am:
  Manual merge (use local)
strings/Makefile.am:
  Manual merge (use local)
vio/Makefile.am:
  Manual merge (use local)
zlib/Makefile.am:
  Manual merge (use local)
2006-09-13 09:03:52 +02:00
unknown
23a46f410f Merge bk-internal.mysql.com:/data0/bk/mysql-5.1-runtime
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-wl3337


client/mysqltest.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/events.result:
  Auto merged
mysql-test/r/not_embedded_server.result:
  Auto merged
mysql-test/t/events.test:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-09-06 14:35:27 +02:00
unknown
721e941770 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


mysql-test/r/ctype_recoding.result:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/ctype_recoding.test:
  manual merge.
sql/sql_lex.h:
  manual merge.
sql/sql_table.cc:
  manual merge.
2006-09-05 17:27:24 -04:00
unknown
259689f87f Merge bk-internal:/home/bk/mysql-5.0-opt
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-09-04 11:39:58 +02:00
unknown
dd6dc7adea BUG#21477 "memory overruns for certain kinds of subqueries":
make st_select_lex::setup_ref_array() take into account that 
Item_sum-descendant objects located within descendant SELECTs
may be added into ref_pointer_array.


sql/item_sum.cc:
  BUG#21477 "memory overruns for certain kinds of subqueries":
  Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
  that exist within this SELECT.
sql/sql_lex.h:
  BUG#21477 "memory overruns for certain kinds of subqueries":
  Add SELECT_LEX::n_sum_items and SELECT_LEXT::n_child_sum_items.
sql/sql_yacc.yy:
  BUG#21477 "memory overruns for certain kinds of subqueries":
  Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
  that exist within this SELECT.
2006-09-01 13:23:43 +04:00
unknown
5bd9bf5572 Merge maint2.mysql.com:/data/localhome/tsmith/bk/41
into  maint2.mysql.com:/data/localhome/tsmith/bk/50


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
vio/viosocket.c:
  Auto merged
client/mysql.cc:
  Manual merge.
mysql-test/t/ctype_recoding.test:
  Manual merge.
sql/sql_lex.h:
  SCCS merged
sql/sql_table.cc:
  Manual merge.
mysql-test/r/ctype_recoding.result:
  Manual merge
2006-09-01 08:53:56 +02:00
unknown
0a25f54554 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.0-maint


sql/sql_lex.cc:
  Auto merged
2006-08-23 17:37:18 +02:00
unknown
07cc141e99 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new-maint
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.1-maint


sql/sql_lex.cc:
  Auto merged
2006-08-23 17:34:34 +02:00
unknown
2e1bfbd2b4 Cleanup patch for handling of subselects in commands which cannot
handle them.

Problem:
CREATE|ALTER EVENT, HANDLER READ, KILL, Partitioning uses `expr` from the
parser. This rule comes with all the rings and bells including subqueries.
However, these commands are not subquery safe. For this reason there are two
fuse checks in the parser. They were checking by command id. CREATE EVENT
should forbid subquery is the fix for
bug#16394 Events: Crash if schedule contains SELECT
The fix has been incorporated as part of the patch for WL#3337 (Event scheduler
new architecture).

Solution:
A new flag was added to LEX command_forbids_subselect. The fuse checks were
changed. The commands are responsible to set the value to true whenever
they can't handle subselects.


sql/sql_lex.cc:
  initialize the variable
sql/sql_lex.h:
  Add a new flag whether the parser should allow a subselect when
  parsing. This is temporarily turned off by commands like CREATE|ALTER EVENT,
  HA_READ, KILL. Could be used by other parts which reuse `expr` rule of the
  grammar and should not allow subqueries as part of it.
sql/sql_yacc.yy:
  Forbid subselects in some commands in a better way.
  CREATE|ALTER EVENT, HANDLER READ, KILL, are not subselect
  safe for parameters and therefore they should be forbidden already in
  the parser.
  This patch makes it easier for the developer to add new commands in that
  sense similar to the mentioned above.
2006-08-23 16:53:04 +02:00
unknown
b32b2ce7af Merge bk-internal.mysql.com:/data0/bk/tmp_reg
into  bk-internal.mysql.com:/data0/bk/mysql-5.1


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/type_timestamp.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
mysql-test/t/type_timestamp.test:
  Auto merged
server-tools/instance-manager/messages.cc:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-08-17 17:19:41 +02:00
unknown
3ba57ead65 Merge maint1.mysql.com:/data/localhome/cmiller/bug20908/my50-bug20908
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.0-maint


sql/sql_lex.cc:
  Auto merged
2006-08-15 19:34:53 +02:00
unknown
28b95dfae4 Merge maint1.mysql.com:/data/localhome/cmiller/bug20908/my51-bug20908
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.1-new-maint


sql/sql_lex.cc:
  Auto merged
2006-08-15 19:33:51 +02:00
unknown
b03c187107 Merge maint1.mysql.com:/data/localhome/cmiller/bug20908/my50-bug20908
into  maint1.mysql.com:/data/localhome/cmiller/bug20908/my51-bug20908


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/sql_lex.cc:
  Auto merged
2006-08-15 19:30:24 +02:00
unknown
e0bffad3e8 Bug #20908: Crash if select @@""
Zero-length variables caused failures when using the length to look
up the name in a hash.  Instead, signal that no zero-length name can
ever be found and that to encounter one is a syntax error.


mysql-test/r/variables.result:
  Results for test.
mysql-test/t/variables.test:
  Insert tests to prove that zero-length variable names do not cause
  faults.
sql/gen_lex_hash.cc:
  If the length is zero, then there is nothing to look-up in the 
  hash.
sql/sql_lex.cc:
  Names of variables must not be empty.  Signal an error of that 
  happens.
2006-08-15 18:41:21 +02:00
unknown
fe3dee0621 Fix for bug #20695: Charset introducer overrides charset definition for column.
- if there are two character set definitions in the column declaration,
    we replace the first one with the second one as we store both in the LEX->charset
    slot. Add a separate slot to the LEX structure to store underscore charset.
  - convert default values to the column charset of STRING, VARSTRING fields 
    if necessary as well.


mysql-test/r/ctype_recoding.result:
  Fix for bug #20695: Charset introducer overrides charset definition for column.
    - test result.
mysql-test/t/ctype_recoding.test:
  Fix for bug #20695: Charset introducer overrides charset definition for column.
    - test case.
sql/sql_lex.cc:
  Fix for bug #20695: Charset introducer overrides charset definition for column.
    - LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
sql/sql_lex.h:
  Fix for bug #20695: Charset introducer overrides charset definition for column.
    - LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
sql/sql_table.cc:
  Fix for bug #20695: Charset introducer overrides charset definition for column.
    - convert default values to the column charset of VARSTRING, STRING, ENUM, 
      SET fields if necessary.
sql/sql_yacc.yy:
  Fix for bug #20695: Charset introducer overrides charset definition for column.
    - LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
2006-08-15 15:24:07 +05:00
unknown
66fb56f115 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-wl3337
into  example.com:/work/mysql-5.1-runtime-wl3337


BitKeeper/etc/ignore:
  auto-union
client/mysqltest.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/sp_notembedded.result:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/share/errmsg.txt:
  C
mysql-test/r/events_bugs.result:
  update result
  manual merge
mysql-test/r/ps_1general.result:
  update result
  manual merge
sql/sql_yacc.yy:
  manual merge
2006-08-14 15:26:59 +02:00
unknown
21e75cb081 Manual merge 5.0->5.1. Post-merge fixes.
client/mysqldump.c:
  A post-merge fix - 'sock' was renamed to 'mysql'
mysql-test/r/events_bugs.result:
  A post merge fix: now we strip rear comments from the query before
  it gets into the log.
mysql-test/r/func_group.result:
  A post merge fix: default clause is now printed uppercase.
mysql-test/r/im_life_cycle.result:
  Fix my mistake in manual resolve.
mysql-test/r/mysqlcheck.result:
  use test; - after we drop client_test_db there is no current database.
  This cleanup is present in 5.1 only, but the test that was added in 
  5.0 assumes there is a current database, test.
mysql-test/r/mysqldump.result:
  Ignore results of execution of mysqldump: we can't rely on 
  MASTER_LOG_POS in test results, it's different for statement
  and row level logging.
mysql-test/r/mysqlshow.result:
  A post-merge fix: information schema contains a few more tables
  in 5.1
mysql-test/r/mysqltest.result:
  A post merge fix: add 5.1 test end separator.
mysql-test/r/ndb_basic.result:
  A post-merge fix: add test end separators.
mysql-test/r/rpl_switch_stm_row_mixed.result:
  A post merge fix: length of varbinary column is now 3 times less.
  Assuming a side effect of some other change. Length of any
  field is not relevant in this test.
mysql-test/r/rpl_view.result:
  Add an end of test marker.
mysql-test/r/show_check.result:
  Remove duplicate results. Add results from a merged test case.
mysql-test/r/sp-error.result:
  Add test end separators.
mysql-test/r/sp-security.result:
  Post-merge fix: use test after the current database is dropped.
mysql-test/r/sp.result:
  Remove a duplicate result (bad merge that left a copy of
  the test case for Bug#19862 in the test suite).
mysql-test/r/strict.result:
  An after-merge fix for a new test case: in 5.1 we issue a more accurate
  error message: "Incorrect value" instead of "Truncated value". I reason
  it so that in case of an error nothing is truncated, really.
  Also found similar changes in other test cases.
mysql-test/r/type_datetime.result:
  Fix the text of an error.
mysql-test/r/union.result:
  A post-merge fix: CHARACTER SET is now uppercase.
mysql-test/t/mysqlcheck.test:
  A post-merge fix: use test, after current database is dropped, there
  is no current database.
mysql-test/t/mysqldump.test:
  Disable result log: it's dependent on binlog position.
mysql-test/t/sp-security.test:
  use test
sql/item_sum.cc:
  Adjust the call to the constructor after the merge.
sql/sp_head.cc:
  Add a missing DBUG_VOID_RETURN, move security checks out of
  execute_trigger to Table_triggers_list: in 5.1 we check for
  TRIGGER privilege, not SUPER privilege to execute triggers, so these
  checks lack table context inside execute_trigger and have to be
  performed when we have table object on hand.
sql/sql_db.cc:
  A post-merge fix: adjust load_db_opt_by_name and check_db_dir_existence
  (new functions added in 5.0) to be tablename-to-filename encoding 
  friendly.
sql/sql_lex.cc:
  A post-merge fix: make skip_rear_comments operate on const uchar *s.
sql/sql_lex.h:
  A post-merge fix.
sql/sql_show.cc:
  A post-merge fix: fix a bad merge, rename orig_sql_command -> sql_command.
sql/sql_trigger.cc:
  A post-merge fix: move security checks to process_triggers
  from execute_trigger.
sql/sql_view.cc:
  Adjust to the new signature of skip_rear_comments.
sql/sql_yacc.yy:
  Adjust to the new signature of init_strings.
2006-08-14 13:27:11 +04:00