Commit graph

660 commits

Author SHA1 Message Date
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
unknown
f68085c4e7 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
  Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
  Auto merged
BitKeeper/deleted/.del-mysys.dsp~32695fee91189326:
  Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
dbug/dbug.c:
  Auto merged
extra/perror.c:
  Auto merged
extra/yassl/src/yassl_imp.cpp:
  Auto merged
extra/yassl/src/yassl_int.cpp:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/r/cast.result:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/func_compress.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/r/im_utils.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/mysqlcheck.result:
  Auto merged
mysql-test/r/rpl_sp.result:
  Auto merged
mysql-test/r/rpl_trigger.result:
  Auto merged
mysql-test/r/sp-code.result:
  Auto merged
mysql-test/r/sp-security.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/r/user_var.result:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/im_utils.imtest:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
mysql-test/t/mysqlcheck.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/rpl_trigger.test:
  Auto merged
mysql-test/t/sp-security.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.h:
  Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
mysql-test/r/im_life_cycle.result:
  e
  use local
mysql-test/r/ps.result:
  use local
client/Makefile.am:
  Manual merge.
client/mysqlimport.c:
  Manual merge.
configure.in:
  Manual merge.
mysql-test/mysql-test-run.pl:
  Manual merge.
mysql-test/r/mysqldump.result:
  Manual merge.
mysql-test/r/mysqltest.result:
  Manual merge.
mysql-test/r/ndb_basic.result:
  Manual merge.
mysql-test/r/rpl_view.result:
  Manual merge.
mysql-test/r/show_check.result:
  Manual merge.
mysql-test/r/sp-error.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/r/union.result:
  Manual merge.
mysql-test/t/mysqldump.test:
  Manual merge.
mysql-test/t/mysqltest.test:
  Manual merge.
mysql-test/t/ndb_basic.test:
  Manual merge.
mysql-test/t/rpl_sp.test:
  Manual merge.
mysql-test/t/rpl_view.test:
  Manual merge.
mysql-test/t/show_check.test:
  Manual merge.
mysql-test/t/sp-error.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/item_sum.cc:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/sp_head.cc:
  Manual merge.
sql/sql_db.cc:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
sql/sql_lex.h:
  Manual merge.
sql/sql_show.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-12 21:06:51 +04:00
unknown
6017f911e3 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt


client/mysql.cc:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-08-03 16:54:06 +02:00
unknown
3aa28a1202 N'xxx' and _utf8'xxx' are not equivalent
Problem: Unescaping of '\' characters didn't work when processing N'xxx'.
Fix: using get_text() instead of get_token() when scanning nationa strings.


mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
sql/sql_lex.cc:
  Fixing to process national strings using get_tex(),
  i.e. the same way with usual strings, to make
  unescaping work.
2006-07-31 12:47:01 +05:00
unknown
d36f578130 Fix for BUG#20438: CREATE statements for views, stored routines and triggers
can be not replicable.

Now CREATE statements for writing in the binlog are created as follows:
  - the beginning of the statement is re-created;
  - the rest of the statement is copied from the original query.

The problem appears when there is a version-specific comment (produced by
mysqldump), started in the re-created part of the statement and closed in the
copied part -- there is closing comment-parenthesis, but there is no opening
one.

The proper fix could be to re-create original statement, but we can not
implement it in 5.0. So, for 5.0 the fix is just to cut closing
comment-parenthesis. This technique is also used for SHOW CREATE PROCEDURE
statement (so we are able to reuse existing code).


mysql-test/r/rpl_sp.result:
  Updated result file.
mysql-test/r/rpl_trigger.result:
  Updated result file.
mysql-test/r/rpl_view.result:
  Updated result file.
mysql-test/t/rpl_sp.test:
  Added test case for BUG#20438.
mysql-test/t/rpl_trigger.test:
  Added test case for BUG#20438.
mysql-test/t/rpl_view.test:
  Added test case for BUG#20438.
sql/sp.cc:
  Trim comments at the end.
sql/sp_head.cc:
  Moved this code to the separate function to be re-used.
sql/sql_lex.cc:
  Added a new function.
sql/sql_lex.h:
  Added a new function.
sql/sql_trigger.cc:
  Trim comments at the end.
sql/sql_view.cc:
  Trim comments at the end.
2006-07-28 02:49:18 +04:00
unknown
5677612aea Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0


mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/sp-vars.result:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/field_conv.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/information_schema.result:
  Use local
mysql-test/t/information_schema.test:
  Manual merge.
sql/sql_lex.h:
  Manual merge.
2006-07-15 01:04:51 +04:00
unknown
31caa8c433 WL #3337 (Events new architecture)
Final stroke, events should be loaded from disk on server startup.
Also check the validity of their bodies if possible during loading.


sql/event_data_objects.cc:
  Remove Event_job_data::free_sp(), move the code to the destructor
  Change the way we change the security context
  Steal some code from sql_parse.cc
sql/event_data_objects.h:
  Remove free_sp()
  Make compile() public, to be used when booting for verifying the integrity of mysql.event
sql/event_queue.cc:
  Make the queue load events from disk on server boot.
  Compile and thus check for integrity the events.
sql/event_queue.h:
  shift methods around. add queue_loaded boolean.
sql/event_scheduler.cc:
  Rename init_event_thread() to pre_init_event_thread()
  and make it more generic.
  Add post_init_event_thread()
  Export these two as well as deinit_event_thread().
  Now it is quite easy to write code to spawn a new event thread
  whenever needed.
sql/event_scheduler.h:
  export pre_init_event_thread(), post_init_event_thread() and deinit_event_thread()
  to simplify writing of thread functions.
sql/events.cc:
  Events::init() returns only one error code, then make it bool
sql/events.h:
  Events::init() returns only one error code, then make it bool
sql/mysqld.cc:
  Check the return code of Events::init()
sql/sp_head.cc:
  Add trace info
sql/sql_class.cc:
  Reorganize thd::change_security_context() to load main_security_ctx
sql/sql_class.h:
  Reorganize thd::change_security_context() to load main_security_ctx
sql/sql_lex.cc:
  Initialize lex->spname
sql/sql_yacc.yy:
  Add a comment
2006-07-13 10:59:58 +02:00
unknown
d013f9e53a Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0


include/my_sys.h:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/slave.h:
  SCCS merged
mysql-test/r/show_check.result:
  Manual merge.
mysql-test/t/show_check.test:
  Manual merge.
sql/log_event.cc:
  Manual merge.
sql/share/errmsg.txt:
  Manual merge.
sql/sql_class.h:
  Manual merge.
sql/sql_db.cc:
  Manual merge.
2006-07-13 11:43:52 +04:00
unknown
3ff08ab8cb Post-merge fixes for Bug#19399 "Stored Procedures 'Lost Connection'
when dropping/creating tables"


mysql-test/r/ps.result:
  A post-merge fix.
mysql-test/t/ps.test:
  A post-merge fix: all 5.0 tests should go after 4.1 tests.
sql/sql_lex.cc:
  auxilliary -> auxiliary
sql/sql_prepare.cc:
  auxilliary -> auxiliary
sql/table.cc:
  Update st_table_list::reinit_before_use in 5.0 to include 5.0-specific
  cleanups.
sql/table.h:
  st_table_list::reinit_before_use is public.
2006-07-11 23:39:51 +04:00
unknown
d8b447a1b6 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41


ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge: use local.
mysql-test/t/ps.test:
  Manual merge: remove duplicate test cases from ps.test.
sql/sql_lex.cc:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.h:
  Manual merge.
2006-07-11 21:19:57 +04:00
unknown
81a80049aa * Mixed replication mode * :
1) Fix for BUG#19630 "stored function inserting into two auto_increment breaks
statement-based binlog":
a stored function inserting into two such tables may fail to replicate
(inserting wrong data in the slave's copy of the second table) if the slave's
second table had an internal auto_increment counter different from master's.
Because the auto_increment value autogenerated by master for the 2nd table
does not go into binlog, only the first does, so the slave lacks information.
To fix this, if running in mixed binlogging mode, if the stored function or
trigger plans to update two different tables both having auto_increment
columns, we switch to row-based for the whole function.
We don't have a simple solution for statement-based binlogging mode, there
the bug remains and will be documented as a known problem.
Re-enabling rpl_switch_stm_row_mixed.
2) Fix for BUG#20630 "Mixed binlogging mode does not work with stored
functions, triggers, views", which was a documented limitation (in mixed
mode, we didn't detect that a stored function's execution needed row-based
binlogging (due to some UUID() call for example); same for
triggers, same for views (a view created from a SELECT UUID(), and doing
INSERT INTO sometable SELECT theview; would not replicate row-based).
This is implemented by, after parsing a routine's body, remembering in sp_head
that this routine needs row-based binlogging. Then when this routine is used,
the caller is marked to require row-based binlogging too.
Same for views: when we parse a view and detect that its SELECT needs
row-based binary logging, we mark the calling LEX as such.
3) Fix for BUG#20499 "mixed mode with temporary table breaks binlog":
a temporary table containing e.g. UUID has its changes not binlogged,
so any query updating a permanent table with data from the temporary table
will run wrongly on slave. Solution: in mixed mode we don't switch back
from row-based to statement-based when there exists temporary tables.
4) Attempt to test mysqlbinlog on a binlog generated by mysqlbinlog;
impossible due to BUG#11312 and BUG#20329, but test is in place for when
they are fixed.


mysql-test/r/rpl_switch_stm_row_mixed.result:
  testing BUG#19630 "stored function inserting into two auto_increment breaks
  statement-based binlog",
  testing BUG#20930 "Mixed binlogging mode does not work with stored functions,
  triggers, views.
  testing BUG#20499 "mixed mode with temporary table breaks binlog".
  I have carefully checked this big result file, it is correct.
mysql-test/t/disabled.def:
  re-enabling test
mysql-test/t/rpl_switch_stm_row_mixed.test:
  Test for BUG#19630 "stored function inserting into two auto_increment breaks
  statement-based binlog":
  we test that it goes row-based, but only when needed;
  without the bugfix, master and slave's data differed.
  Test for BUG#20499 "mixed mode with temporary table breaks binlog":
  without the bugfix, slave had 2 rows, not 3.
  Test for BUG#20930 "Mixed binlogging mode does not work with stored
  functions, triggers, views".
  Making strings used more different, for easier tracking of "by which routine
  was this binlog line generated".
  Towards the end, an attempt to test mysqlbinlog on a binlog generated by
  the mixed mode; attempt failed because of BUG#11312 and BUG#20929.
sql/item_create.cc:
  fix for build without row-based replication
sql/set_var.cc:
  cosmetic: in_sub_stmt is exactly meant to say if we are in stored
  function/trigger, so better use it.
sql/sp.cc:
  When a routine adds its tables to the top statement's tables, if this routine
  needs row-based binlogging, mark the entire top statement as well.
  Same for triggers.
  Needed for making the mixed replication mode work with stored functions
  and triggers.
sql/sp_head.cc:
  new enum value for sp_head::m_flags, remembers if, when parsing the 
  routine, we found at least one element (UUID(), UDF) requiring row-based
  binlogging.
sql/sp_head.h:
  new enum value for sp_head::m_flags (see sp_head.cc).
  An utility method, intended for attributes of a routine which need
  to propagate upwards to the caller; so far only used for binlogging
  information, but open to any other attribute.
sql/sql_base.cc:
  For BUG#19630 "stored function inserting into two auto_increment
  breaks statement-based binlog":
  When we come to locking tables, we have collected all tables used by
  functions, views and triggers, we detect if we're going to update two tables
  having auto_increment columns. If yes, statement-based binlogging won't work
  (Intvar_log_event records only one insert_id) so, if in mixed binlogging
  mode, switch to row-based.
  For making mixed mode work with stored functions using UUID/UDF:
  when we come to locking tables, we have parsed the whole body so know if
  some elements need row-based. Generation of row-based binlog events
  depends on locked tables, so this is the good place to decide of the binlog
  format.
sql/sql_class.h:
  Fix for BUG#20499 "mixed mode with temporary table breaks binlog".
  Making mixed mode work with stored functions/triggers: don't reset
  back to statement-based if in executing a stored function/trigger.
sql/sql_lex.cc:
  fix for build without row-based replication.
  binlog_row_based_if_mixed moves from st_lex to Query_tables_list, because
  that boolean should not be affected when a SELECT reads the INFORMATION_SCHEMA
  and thus implicitely parses a view or routine's body: this body may
  contain needing-row-based components like UUID() but the SELECT on
  INFORMATION_SCHEMA should not be affected by that and should not use
  row-based; as Query_tables_list is backed-up/reset/restored when parsing
  the view/routine's body, so does binlog_row_based_if_mixed and the
  top SELECT is not affected.
sql/sql_lex.h:
  fix for build without row-based replication.
  binlog_row_based_if_mixed moves from st_lex to Query_tables_list
  (see sql_lex.cc)
sql/sql_parse.cc:
  For the mixed mode to work with stored functions using UUID and UDF, we need
  to move the switch-back-from-row-to-statement out of
  mysql_execute_command() (which is executed for each statement, causing
  the binlogging mode to change in the middle of the function, which would
  not work)
  The switch to row-based is now done in lock_tables(), no need to keep it
  in mysql_execute_command(); in lock_tables() we also switch back from 
  row-based to statement-based (so in a stored procedure, all statements
  have their binlogging mode). We must however keep a resetting in
  mysql_reset_thd_for_next_command() as e.g. CREATE PROCEDURE does not call
  lock_tables().
sql/sql_view.cc:
  When a view's body needs row-based binlogging (e.g. the view is created
  from SELECT UUID()), propagate this fact to the top st_lex.
sql/sql_yacc.yy:
  use TRUE instead of 1, for binlog_row_based_if_mixed.
2006-07-09 17:00:47 +02:00
unknown
8995277acc A fix and a test case for Bug#19399 "res 'Lost Connection' when
dropping/creating tables".

The bug could lead to a crash when multi-delete statements were
prepared and used with temporary tables.

The bug was caused by lack of clean-up of multi-delete tables before
re-execution of a prepared statement. In a statement like
DELETE t1 FROM t1, t2 WHERE ... the first table list (t1) is
moved to lex->auxilliary_table_list and excluded from lex->query_tables
or select_lex->tables. Thus it was unaccessible to reinit_stmt_before_use
and not cleaned up before re-execution of a prepared statement. 


mysql-test/r/ps.result:
  Updated test results (Bug#19399)
mysql-test/t/ps.test:
  A test case for Bug#19399 "Stored Procedures 'Lost Connection' when 
  dropping/creating tables": test that multi-delete
  tables are cleaned up properly before re-execution.
sql/sql_lex.cc:
  Always initialize auxilliary_table_list when we initialize the lex:
  this way we don't have to check that lex->sql_command equals to
  SQLCOM_DELETE_MULTI whenever we need to access auxilliary_table_list.
  In particular, in reinit_stmt_before_use we can simply check that
  auxilliary_table_list is not NULL and clean it up if the check returns
  a true value.
sql/sql_prepare.cc:
  Move the one table clean-up functionality to a method of st_table_list.
  Clean up auxiliary_table_list if it's not empty.
sql/table.cc:
  Implement st_table_list::reinit_before_use().
sql/table.h:
  Declare st_table_list::reinit_before_use().
2006-07-06 23:59:04 +04:00
unknown
0c7bc6e9d7 Remove a couple of unused/barely used names.
sql/sql_lex.cc:
  Remove an unused thread key.
sql/sql_lex.h:
  Remove an unused thread key, current_lex.
sql/sql_parse.cc:
  Remove an unused thread key, current_lex macro.
2006-07-01 00:14:28 +04:00
unknown
9fa9378b2e WL#3337 (Events new architecture)
This cut No 7 should finish the part of fixing the parsing of the events :
- Event_timed is no more used during parsing. Less problems because it has
  a mutex. Event_parse_data class is used during parsing. It is suited only
  for this purpose. It's pretty lightweight
- Late checking of data from parsing is being performed. This should solve
  the problems of nested events in SP or other events (for the situation 
  of no nested bodies). Before if an ALTER EVENT was in a SP, then when the
  SP was compiled, and not executed, the actual init_xxx methods of Event_timed
  were called, which is wrong.
- It could be a side effect of using a specialized class, but test events_stress is
  now 25% quicker.

Cut No8 will start splitting Event_scheduler into 2 parts, the QUEUE will be moved
to Event_queue.


mysql-test/r/events.result:
  update result
mysql-test/t/events.test:
  disabled is actually wrong, should be disable, but because of the early
  checking it was never parsed.
sql/event_data_objects.cc:
  move add init_xxx methods from Event_timed to Event_parse_data
  Event_parse data does not need definer_user and definer_host
  in Event_timed::compile() do not use lex.et, well there is no more lex.et :)
sql/event_data_objects.h:
  move parsing responsibilities from Event_timed to Event_parse_data
sql/event_db_repository.cc:
  No more Event_timed comes from parsing but Event_parse_data
  The initialization of Item*-s from parsing is done late, and not
  during the actual parsing. This is the right way to go because
  if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
  executed (initialized) during parsing, as it was done.
sql/event_db_repository.h:
  No more Event_timed comes from parsing but Event_parse_data
  The initialization of Item*-s from parsing is done late, and not
  during the actual parsing. This is the right way to go because
  if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
  executed (initialized) during parsing, as it was done.
sql/event_scheduler.cc:
  No more Event_timed comes from parsing but Event_parse_data
  The initialization of Item*-s from parsing is done late, and not
  during the actual parsing. This is the right way to go because
  if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
  executed (initialized) during parsing, as it was done.
sql/event_scheduler.h:
  No more Event_timed comes from parsing but Event_parse_data
  The initialization of Item*-s from parsing is done late, and not
  during the actual parsing. This is the right way to go because
  if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
  executed (initialized) during parsing, as it was done.
sql/events.cc:
  No more Event_timed comes from parsing but Event_parse_data
  The initialization of Item*-s from parsing is done late, and not
  during the actual parsing. This is the right way to go because
  if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
  executed (initialized) during parsing, as it was done.
sql/events.h:
  No more Event_timed comes from parsing but Event_parse_data
  The initialization of Item*-s from parsing is done late, and not
  during the actual parsing. This is the right way to go because
  if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
  executed (initialized) during parsing, as it was done.
sql/sql_lex.cc:
  lex->et_compile_phase and lex->et are no more.
  Use lex->event_parse_data
sql/sql_lex.h:
  lex->et_compile_phase and lex->et are no more.
  Use lex->event_parse_data
sql/sql_parse.cc:
  lex->et_compile_phase and lex->et are no more.
  Use lex->event_parse_data
  ACL checks were moved inside the Events subsystem.
  Also ending of the transaction is performed only just
  before doing disk operation. Therefore only when needed.
sql/sql_yacc.yy:
  lex->et and lex->et_parse_phase are no more
  Use the specialized for parsing Event_parse_data
2006-06-29 00:42:25 +02:00
unknown
90cb4c03fd Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.

The solution is to remember that original value.


mysql-test/r/auto_increment.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_compress.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_math.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_system.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_time.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/information_schema.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/query_cache.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_get_lock.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_master_pos_wait.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/show_check.result:
  Add result for bug#17203.
mysql-test/r/subselect.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/type_blob.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/variables.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/view.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/t/show_check.test:
  Add test case for bug#17203.
sql/sql_lex.cc:
  Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
sql/sql_lex.h:
  Add SELECT_LEX::sql_cache field to store original user setting.
sql/sql_select.cc:
  Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
sql/sql_yacc.yy:
  Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive.  Ignore
  SQL_CACHE if SQL_NO_CACHE was used.  Remember what was set by the user.
  Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
2006-06-27 21:28:32 +04:00
unknown
0f9ec6d6e8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


mysql-test/extra/rpl_tests/rpl_log.test:
  Auto merged
mysql-test/r/rpl_ndb_log.result:
  Auto merged
mysql-test/r/rpl_row_log.result:
  Auto merged
mysql-test/r/rpl_row_log_innodb.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/log_event.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_show.cc:
  Auto merged
sql/mysql_priv.h:
  SCCS merged
2006-06-22 12:21:41 +03:00
unknown
f3a56a17da SHOW STATUS does not anymore change local status variables (except com_show_status). Global status variables are still updated.
SHOW STATUS are not anymore put in slow query log because of no index usage.

Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command()
This simplifies code and allows us to remove some if statements all over the code.

Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands.
This allowed some overall simplifaction when testing sql_command.

Fixes bugs:
Bug#10210: running SHOW STATUS increments counters it shouldn't
Bug#19764: SHOW commands end up in the slow log as table scans


mysql-test/r/grant_cache.result:
  Fixed results after SHOW STATUS doesn't anymore affect status variables
mysql-test/r/information_schema.result:
  Added extra test to cover more code
mysql-test/r/query_cache.result:
  Remove resuts from previous tests
mysql-test/r/status.result:
  Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
  (Bug#10210)
mysql-test/r/temp_table.result:
  Fixed results after SHOW STATUS doesn't anymore affect status variables
mysql-test/r/union.result:
  Fixed results after SHOW STATUS is not logged to slow query log
  (Bug#19764)
mysql-test/t/events_microsec.test:
  Disable warnings at init
mysql-test/t/information_schema.test:
  Added extra test to cover more code
mysql-test/t/query_cache.test:
  Remove resuts from previous tests
mysql-test/t/status.test:
  Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
  (Bug #10210)
sql/mysql_priv.h:
  Added 'sql_command_flags'
sql/sql_class.cc:
  New function add_diff_to_status(), used to update global status variables when using SHOW STATUS
sql/sql_class.h:
  New function 'fill_information_schema_tables()'
  (One could not anymore use fill_derived_tables() for this as only_view_structures() is not relevant for information schema tables)
  Added defines for bit flags in sql_command_flags[]
sql/sql_lex.cc:
  Remove orig_sql_command
sql/sql_lex.h:
  Remove orig_sql_command
sql/sql_parse.cc:
  Rename uc_update_queries -> sql_command_flags.
  Enhanced 'sql_command_flags' to better classify SQL commands
  uc_update_queries[] != 0 is changed to (sql_command_flags[] & CF_CHANGES_DATA)
  lex->orig_sql_command == SQLCOM_END is changed to (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0)
  
  Simplify incrementing of thd->status_var.com_stat[] as we don't have to do special handling for SHOW commands.
  
  Split SQLCOM_SELECT handling in mysql_execute_command() to a separate function.
  Added special handling of SHOW STATUS commands in mysql_execute_command() and call common SQLCOM_SELECT handling.
  These changes allows us to easily fix that we save and restore status variables during execution of a SHOW STATUS command.
  Don't log SHOW STATUS commands to slow query log.
  
  This fixes Bug#10210 and Bug#19764 without adding additional 'if' code.
  (The new code is faster than the original as we now have fewer if's than before)
sql/sql_prepare.cc:
  Clean up prepare-check handling of SQLCOM commands by using sql_command_flags[]
  This simplifes code and ensures that code works even if someone forgets to put a new status commands into the switch statement.
sql/sql_select.cc:
  Remove special handling of SHOW STATUS.
  (This is now done in SQLCOM_SHOW_STATUS part in mysql_execute_command())
sql/sql_show.cc:
  Remove orig_sql_command
  Only change sql_command during 'open_normal_and_derived_tables()' (for views) and not for the full duration of generating data.
  Changed 'show status' to use thd->initial_status_var to ensure that the current statement is not affecting the to-be-used values.
  Use thd->fill_information_schema_tables() instead of 'thd->fill_derived_tables()' as the later wrongly checks the value of sql_command.
sql/sql_yacc.yy:
  Remove usage of orig_sql_command.
  One side effect of this is that we need to test for cursors if the current command is a SELECT or a SHOW command.
sql/structs.h:
  Updated comment
2006-06-20 13:20:32 +03:00
unknown
92a14462b5 Merge mysql.com:/usr/home/bar/mysql-5.1-new.b18396
into  mysql.com:/usr/home/bar/mysql-5.1-kt


sql/sql_lex.cc:
  Auto merged
2006-06-19 19:15:03 +05:00
unknown
6a6bedfa05 Bug#18396 Identifiers: Byte with value 255 not allowed
Old FRM files didn't allow byte 255 as a column name part.
Since now we store column names in UTF8, this restriction
is not required anymore: 255 is not a valid byte in UTF8.
Fix: removing checking against 255.


mysql-test/r/ctype_latin1.result:
  Adding test case
mysql-test/t/ctype_latin1.test:
  Adding test case
sql/sql_lex.cc:
  Removing old code, unnecessary anymore.
2006-06-06 22:13:30 +05:00
unknown
3f58283d82 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/data0/mysqldev/my/mysql-5.0


configure.in:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-02 21:41:57 +02:00
unknown
ae26d2aa5a Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/heap_btree.result:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/r/lock_multi.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
mysys/default.c:
  Auto merged
server-tools/instance-manager/guardian.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/heap/hp_write.c:
  Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
  Auto merged
client/mysqlbinlog.cc:
  Manual merge from 5.0
client/mysqldump.c:
  Manual merge from 5.0
configure.in:
  Manual merge from 5.0
mysql-test/r/mysqldump.result:
  Manual merge from 5.0
mysql-test/t/mysqldump.test:
  Manual merge from 5.0
mysql-test/t/rpl_insert_id.test:
  Manual merge from 5.0
server-tools/instance-manager/manager.cc:
  Manual merge from 5.0
sql/field.cc:
  Manual merge from 5.0
sql/ha_ndbcluster.cc:
  Manual merge from 5.0
sql/mysqld.cc:
  Manual merge from 5.0
sql/sql_base.cc:
  Manual merge from 5.0
sql/sql_lex.cc:
  Manual merge from 5.0
sql/sql_select.cc:
  Manual merge from 5.0
sql/sql_table.cc:
  Manual merge from 5.0
2006-05-30 16:07:49 +03:00
unknown
128c3942a8 Bug#17204 "second CALL to procedure crashes Server"
Bug#18282 "INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views"
This bug caused crashes or resulted in wrong data being returned
when one tried to obtain information from I_S tables about views
using stored functions.

It was caused by the fact that we were using LEX representing
statement which were doing select from I_S tables as active LEX
when contents of I_S table were built. So state of this LEX both
affected and was affected by open_tables() calls which happened
during this process. This resulted in wrong behavior and in
violations of some of invariants which caused crashes.

This fix tries to solve this problem by properly saving/resetting
and restoring part of LEX which affects and is affected by the
process of opening tables and views in get_all_tables() routine.
To simplify things we separated this part of LEX in a new class
and made LEX its descendant.


mysql-test/r/information_schema_db.result:
  test case
mysql-test/t/information_schema_db.test:
  test case
sql/sql_lex.cc:
  To simplify saving/resetting and restoring part of LEX which
  affects and is affected by the process of opening tables and
  views we moved it to new class Query_tables_list and made LEX
  descendant of this class. Also introduced two LEX methods 
  which can be used to save and reset or to restore this state.
sql/sql_lex.h:
  To simplify saving/resetting and restoring part of LEX which
  affects and is affected by the process of opening tables and
  views we moved it to new class Query_tables_list and made LEX
  descendant of this class. Also introduced two LEX methods 
  which can be used to save and reset or to restore this state.
sql/sql_show.cc:
  Now in get_all_tables() routine we properly save/reset and
  restore part of LEX (statement table list and information
  about routines used) which affects and is affected by the
  process of opening tables and views.
sql/sql_table.cc:
  Now we clean-up LEX after opening table (view) in two stages.
  In the first stage we call LEX::cleanup_after_one_table_open()
  to clean-up selects lists and derived tables state. In the
  second stage which happens after close_thread_tables() is
  invoked we call Query_tables_list::reset_query_tables_list(FALSE)
  to rollback changes in Query_tables_list.
2006-05-30 10:45:23 +05:00
unknown
4784833f09 Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0


sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-05-26 18:38:34 +02:00
unknown
a3040aa74a Merge mysql.com:/data0/mysqldev/my/mysql-4.1.20-release
into  mysql.com:/data0/mysqldev/my/mysql-4.1


sql/sql_lex.cc:
  Auto merged
2006-05-26 18:31:25 +02:00
unknown
723eed2401 Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
into  mysql.com:/data0/mysqldev/my/mysql-5.1-release


extra/comp_err.c:
  Auto merged
mysql-test/r/ctype_sjis.result:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
2006-05-24 14:37:18 +02:00
unknown
6355f74e4d Merge mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0.22-release


scripts/mysqld_multi.sh:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
extra/comp_err.c:
  merged
2006-05-24 14:22:36 +02:00
unknown
e1227d2bd1 Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release


tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
sql/sql_lex.cc:
  merged
2006-05-24 12:19:39 +02:00
unknown
6a60accef2 don't let bugfix for bug#8303 break the bugfix for bug#8378
revert the fix for bug#8303
correct the test for bug#8378


mysql-test/r/ctype_sjis.result:
  updated
mysql-test/t/ctype_sjis.test:
  updated
sql/sql_lex.cc:
  revert the fix for bug#8303
tests/mysql_client_test.c:
  correct the test for bug#8378
2006-05-24 00:55:53 +02:00
unknown
375749b8af Fixed bug #14927.
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct 
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.



mysql-test/r/having.result:
  Added a test case for bug #14927.
mysql-test/t/having.test:
  Added a test case for bug #14927.
sql/sql_lex.cc:
  Fixed bug #14927.
  Initialized fields for having conditions in  st_select_lex::init_query().
sql/sql_lex.h:
  Fixed bug #14927.
  Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
  Fixed bug #14927.
  Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
  Fixed bug #14927.
  Performed evaluation of constant expressions in having clauses.
  If the having condition contains a constant conjunct that is always false
  an empty result set is returned after the optimization phase.
  In this case the corresponding EXPLAIN command now returns 
  "Impossible HAVING" in the last column.
2006-05-06 23:48:13 -07:00
unknown
edfc33bed0 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_lex.cc:
  manual merge
2006-05-04 22:27:12 +03:00
unknown
afe4715242 Fixed wrong free in sql_view.cc
mysql-test-run now fails in case of warnings


mysql-test/lib/mtr_report.pl:
  Fail if find warnings
mysql-test/mysql-test-run.sh:
  Fail if find warnings
sql/sql_lex.cc:
  Initalize st_lex properly
sql/sql_view.cc:
  Fixed problem with unaligned memory (wrong free)
2006-05-04 22:19:31 +03:00
unknown
791a5d9444 Fixed compiler warnings
Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
Fixed some memory leaks


configure.in:
  Move plugin declarations after system functions have been checked
  (Fixes problem with ndb_config failing becasue SHM is not declared)
mysql-test/t/disabled.def:
  Disabled ndb_load, as it is in 5.0
  (Fails randomly in binlog_close_connection())
mysql-test/t/log_tables.test:
  Update error numbers
mysql-test/t/ndb_config.test:
  Moved test depending on SHM to ndb_config2.test
mysql-test/t/ndb_partition_error.test:
  Update error numbers
sql/event_timed.cc:
  Removed not needed line
sql/ha_berkeley.cc:
  Fixed compiler warning
sql/ha_heap.cc:
  Fixed compiler warning
sql/ha_innodb.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/ha_partition.cc:
  Fixed compiler warning
sql/mysql_priv.h:
  After merge fix
sql/mysqld.cc:
  Fixed memory leak in skip_grant.test
sql/share/errmsg.txt:
  Removed wrong error messages
sql/sql_lex.cc:
  More debugging
  Faster lex_end()
sql/sql_partition.cc:
  Fixed memory leak
sql/sql_view.cc:
  Fixed memory leak
mysql-test/r/ndb_config2.result:
  New BitKeeper file ``mysql-test/r/ndb_config2.result''
mysql-test/t/ndb_config2.test:
  New BitKeeper file ``mysql-test/t/ndb_config2.test''
2006-05-04 19:39:47 +03:00
unknown
328778a1f1 fix for distcheck
configure.in:
  fix the test for distcheck
2006-04-13 09:57:51 +02:00
unknown
b9f6f9bc64 Fixes to the replication mixed mode (patch approved by Monty):
- detect the need for row-based binlogging not at execution stage but earlier at parsing stage; needed for example for CREATE TABLE SELECT UUID().
- more tests of this mixed mode.


mysql-test/r/rpl_switch_stm_row_mixed.result:
  result update
mysql-test/t/rpl_switch_stm_row_mixed.test:
  testing more scenarios for the mixed replication mode.
  Added support for manual testing of UDFs vs the mixed mode (behind a variable in the test).
  Changing old file names to better ones.
sql/item_create.cc:
  at parse time, when we see a UUID(), put up a flag in LEX to say this binlogs properly only with row-based binlogging.
sql/item_func.cc:
  it's not perfect to put up the flag at this execution stage, better do it at parse stage.
sql/item_strfunc.cc:
  it's not perfect to put up the flag at this execution stage, better do it at parse stage
sql/set_var.cc:
  this assertion is wrong, this piece of code can happen in RBR mode too.
sql/sql_lex.cc:
  when we reinitialize the LEX members before every query, we have to reinitialize the new flag
sql/sql_lex.h:
  A new flag, set at parsing stage, which tells if some items seen during parsing stage require row-based replication to binlog/replicate correctly
  when this statement is later executed.
  It has to be in LEX and not directly in THD, for this to work in prepared statements.
sql/sql_parse.cc:
  Parsing stage happened at some time in the past and set up the flag in LEX, now that we execute the statement we actually turn on row-based binlogging
  if the thread's binlog format is "mixed". We then turn it off when leaving mysql_execute_command().
  Some cleanup code was not executed if leaving mysql_execute_command() at the "error" label, fixing this. A better fix than the "goto end" would be
  to modify each "goto error" to "res=1; goto end" but it required changing many lines which I don't want to do now ("make smallest possible patch").
sql/sql_yacc.yy:
  When at parsing stage we see a UDF we put up a flag to say that row-based binlogging is preferred.
2006-03-13 15:34:30 +01:00
unknown
8c3b4b14f1 Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1-new


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp.cc:
  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_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2006-03-09 17:06:04 -08:00
unknown
01d69c4b96 This patch does 1) fix my build breakage 2) Complete the removal of all symbols which could clash with another parser.
sql/mysql_priv.h:
  Porting update
sql/mysqld.cc:
  Porting update
sql/sp.cc:
  Porting update
sql/sql_lex.cc:
  Porting update
sql/sql_lex.h:
  Porting update
sql/sql_parse.cc:
  Porting update
sql/sql_prepare.cc:
  Portinng update
sql/sql_trigger.cc:
  Porting update
sql/sql_view.cc:
  Porting update
2006-03-09 16:44:08 -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
85d705b651 Porting fix that allows others to include compiled code with different parsers.
Makes you wonder what I am up to, doesn't?


configure.in:
  Adjusts bison to not create symbols that clash.
sql/sql_analyse.cc:
  Adding define to make sure sql_yacc.h gets included.
sql/sql_lex.cc:
  Fixing it so that sql_yacc.h is included
sql/sql_lex.h:
  Fixing include rules
sql/sql_parse.cc:
  Adding flag to compile sql_yacc.yy
2006-03-09 10:09:52 -08:00
unknown
99b9f7a45b Merge mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-tree
into  mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.1-merged


client/mysqldump.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/rpl_ddl.result:
  Auto merged
mysql-test/r/rpl_sp.result:
  Auto merged
mysql-test/r/rpl_trigger.result:
  Auto merged
mysql-test/r/sp-security.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/sql_mode.result:
  Auto merged
mysql-test/t/rpl_trigger.test:
  Auto merged
mysql-test/t/skip_grants.test:
  Auto merged
mysql-test/t/sp-security.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  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/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Manually merged.
sql/sp.cc:
  Manually merged.
sql/sql_yacc.yy:
  Manually merged.
2006-03-09 20:41:21 +03:00
unknown
bc6b7859ae Fix for multiple test failures on some platforms.
sql/sql_lex.cc:
  Added a debug assertion that the passed string is not empty.
sql/sql_show.cc:
  Do not quote empty string.
2006-03-09 03:10:39 +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
8300149963 Merge rurik.mysql.com:/home/igor/dev/mysql-4.1-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/t/having.test:
  Auto merged
mysql-test/r/having.result:
  Manual merge
sql/sql_lex.cc:
  Manual merge
sql/sql_lex.h:
  Manual merge
sql/sql_prepare.cc:
  Manual merge
sql/sql_select.cc:
  Manual merge
2006-02-02 21:23:36 -08:00
unknown
a400e7feb9 FIxed bug #14927.
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct 
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.


mysql-test/r/having.result:
  Added A test case for bug #14927.
mysql-test/t/having.test:
  Added A test case for bug #14927.
sql/sql_lex.cc:
  Fixed bug #14927.
  Initialized fields for having conditions in  st_select_lex::init_query().
sql/sql_lex.h:
  Fixed bug #14927.
  Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
  Fixed bug #14927.
  Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
  Fixed bug #14927.
  Performed evaluation of constant expressions in having clauses.
  If the having condition contains a constant conjunct that is always false
  an empty result set is returned after the optimization phase.
  In this case the corresponding EXPLAIN command now returns 
  "Impossible HAVING" in the last column.
2006-01-31 21:48:32 -08:00
unknown
209ff87455 BUG #16596
Moved init to lex_start


sql/sql_lex.cc:
  Added init to lex_start
sql/sql_yacc.yy:
  Removed init from CREATE INDEX code
2006-01-18 16:18:42 -05:00
unknown
bb0b7f5dda WL #1034 (Internal CRON)
merge before push


BUILD/SETUP.sh:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/lex.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
libmysqld/Makefile.am:
  manual merge
mysql-test/r/information_schema.result:
  manual merge
sql/share/errmsg.txt:
  manual merge
sql/sp_head.cc:
  manual merge
sql/sql_lex.h:
  manual merge
sql/sql_yacc.yy:
  manual merge
2006-01-10 21:02:19 +01:00
unknown
6a53fec551 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean


mysql-test/r/sp.result:
  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.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.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_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_base.cc:
  Resolve conflict
2005-12-12 11:57:07 -08:00
unknown
53f8fed437 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.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.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_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-12-10 23:31:03 -08:00
unknown
f1ac6bb975 Merge mysql.com:/home/timka/mysql/src/5.0-2486
into  mysql.com:/home/timka/mysql/src/5.1-dbg


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_insert.cc:
  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.h:
  Auto merged
sql/sql_base.cc:
  SCCS merged
sql/table.cc:
  SCCS merged
2005-12-07 10:47:43 +02:00
unknown
4d891eb91c WL1034 update for latest 5.1 sources
BUILD/SETUP.sh:
  for now no optimizations in debug build - get rid of "value optimized out"
2005-12-02 13:07:02 +01:00
unknown
4fd41f7c0b WL#2486 - Natural/using join according to SQL:2003.
Post-review fixes according to Monty's review.


sql/item.h:
  Unite all code that stores and restores the state of a name resolution context
  into a class to represent the state, and methods to save/restore that
  state.
sql/mysql_priv.h:
  Reorder parameters so that length is after the name of a field,
  and database is before table name.
sql/sql_acl.cc:
  Reorder parameters so that length is after the name of a field,
  and database is before table name.
sql/sql_base.cc:
  * Reorder parameters so that length is after the name of a field,
    and database is before table name.
  * Added new method - Field_iterator_table_ref::get_natural_column_ref
    to avoid unnecessary code when it is knwon that no new columns will
    be created when accessing natural join columns.
sql/sql_insert.cc:
  Unite all code that stores and restores the state of a name resolution context
  into a class to represent the state, and methods to save/restore that
  state.
sql/sql_lex.cc:
  Removed obsolete comment.
sql/sql_lex.h:
  Return error from push_contex() if there is no memory.
sql/sql_list.h:
  Extended base_list_iterator, List_iterator, and List_iterator_fast with an
  empty constructor, and init() methods, so that one doesn't have to construct
  a new iterator object every time one needs to iterate over a new list.
sql/sql_parse.cc:
  Moved common functionality from the parser into one function, and renamed
  the function to better reflect what it does.
sql/sql_yacc.yy:
  Moved common functionality from the parser into one function, and renamed
  the function to better reflect what it does.
sql/table.cc:
  * Extended base_list_iterator, List_iterator, and List_iterator_fast with an
    empty constructor, and init() methods, so that one doesn't have to construct
    a new iterator object every time one needs to iterate over a new list.
  * Added new method Field_iterator_table_ref::get_natural_column_ref to be
    used in cases when it is known for sure that no new columns should be
    created.
sql/table.h:
  - column_ref_it no longer allocated for each new list of columns
  - new method get_natural_join_column for faster/simpler access
    to natural join columns.
2005-11-28 21:57:50 +02:00
unknown
039168c2fa Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.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_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.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_class.cc:
  Auto merged
sql/sql_class.h:
  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_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/field.cc:
  Merge with global tree
sql/sql_base.cc:
  Merge with global tree
sql/table.cc:
  Merge with global tree
2005-11-23 22:58:53 +02:00
unknown
f631b361b6 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table


mysql-test/mysql-test-run.sh:
  Fixed some problems with --gdb option
  Test both with socket and tcp/ip port that all old servers are killed
mysql-test/r/flush_table.result:
  More tests with lock table with 2 threads + flush table
mysql-test/r/information_schema.result:
  Removed old (now wrong) result
mysql-test/r/innodb.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/merge.result:
  Extra flush table test
mysql-test/r/ndb_bitfield.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/ndb_partition_error.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/query_cache.result:
  Remove tables left from old tests
mysql-test/r/temp_table.result:
  Test truncate with temporary tables
mysql-test/r/variables.result:
  Table_cache -> Table_open_cache
mysql-test/t/flush_table.test:
  More tests with lock table with 2 threads + flush table
mysql-test/t/merge.test:
  Extra flush table test
mysql-test/t/multi_update.test:
  Added 'sleep' to make test predictable
mysql-test/t/query_cache.test:
  Remove tables left from old tests
mysql-test/t/temp_table.test:
  Test truncate with temporary tables
mysql-test/t/variables.test:
  Table_cache -> Table_open_cache
mysql-test/valgrind.supp:
  Remove warning that may happens becasue threads dies in different order
mysys/hash.c:
  Fixed wrong DBUG_PRINT
mysys/mf_dirname.c:
  More DBUG
mysys/mf_pack.c:
  Better comment
mysys/mf_tempdir.c:
  More DBUG
  Ensure that we call cleanup_dirname() on all temporary directory paths.
  
  If we don't do this, we will get a failure when comparing temporary table
  names as in some cases the temporary table name is run through convert_dirname())
mysys/my_alloc.c:
  Indentation fix
sql/examples/ha_example.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_example.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/field.cc:
  Update for table definition cache:
  - Field creation now takes TABLE_SHARE instead of TABLE as argument
    (This is becasue field definitions are now cached in TABLE_SHARE)
    When a field is created, one now must call field->init(TABLE) before using it
  - Use s->db instead of s->table_cache_key
  - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
  - make_field() takes TABLE_SHARE as argument instead of TABLE
  - move_field() -> move_field_offset()
sql/field.h:
  Update for table definition cache:
  - Field creation now takes TABLE_SHARE instead of TABLE as argument
    (This is becasue field definitions are now cached in TABLE_SHARE)
    When a field is created, one now must call field->init(TABLE) before using it
  - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
  - make_field() takes TABLE_SHARE as argument instead of TABLE
  - move_field() -> move_field_offset()
sql/ha_archive.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_archive.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_berkeley.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Changed name of argument create() to not hide internal 'table' variable.
  table->s  -> table_share
sql/ha_berkeley.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_federated.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Fixed comments
  Remove index variable and replace with pointers (simple optimization)
  move_field() -> move_field_offset()
  Removed some strlen() calls
sql/ha_federated.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_heap.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Simplify delete_table() and create() as the given file names are now without extension
sql/ha_heap.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisam.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Remove not needed fn_format()
  Fixed for new table->s structure
sql/ha_myisam.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisammrg.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Don't set 'is_view' for MERGE tables
  Use new interface to find_temporary_table()
sql/ha_myisammrg.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Added flag HA_NO_COPY_ON_ALTER
sql/ha_ndbcluster.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Fixed wrong calls to strxnmov()
  Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed
  drop_table -> intern_drop_table()
  table->s -> table_share
  Move part_info to TABLE
  Fixed comments & DBUG print's
  New arguments to print_error()
sql/ha_ndbcluster.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_partition.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  We can't set up or use part_info when creating handler as there is not yet any table object
  New ha_intialise() to work with TDC (Done by Mikael)
sql/ha_partition.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Got set_part_info() from Mikael
sql/handler.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  ha_delete_table() now also takes database as an argument
  handler::ha_open() now takes TABLE as argument
  ha_open() now calls ha_allocate_read_write_set()
  Simplify ha_allocate_read_write_set()
  Remove ha_deallocate_read_write_set()
  Use table_share (Cached by table definition cache)
sql/handler.h:
  New table flag: HA_NO_COPY_ON_ALTER (used by merge tables)
  Remove ha_deallocate_read_write_set()
  get_new_handler() now takes TABLE_SHARE as argument
  ha_delete_table() now gets database as argument
sql/item.cc:
  table_name and db are now LEX_STRING objects
  When creating fields, we have now have to call field->init(table)
  move_field -> move_field_offset()
sql/item.h:
  tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR
   instead of BLOB
sql/item_cmpfunc.cc:
  Fixed call to tmp_table_field_from_field_type()
sql/item_create.cc:
  Assert if new not handled cast type
sql/item_func.cc:
  When creating fields, we have now have to call field->init(table)
  dummy_table used by 'sp' now needs a TABLE_SHARE object
sql/item_subselect.cc:
  Trivial code cleanups
sql/item_sum.cc:
  When creating fields, we have now have to call field->init(table)
sql/item_timefunc.cc:
  Item_func_str_to_date::tmp_table_field() now replaced by call to
   tmp_table_field_from_field_type() (see item_timefunc.h)
sql/item_timefunc.h:
  Simply tmp_table_field()
sql/item_uniq.cc:
  When creating fields, we have now have to call field->init(table)
sql/key.cc:
  Added 'KEY' argument to 'find_ref_key' to simplify code
sql/lock.cc:
  More debugging
  Use create_table_def_key() to create key for table cache
  Allocate TABLE_SHARE properly when creating name lock
  Fix that locked_table_name doesn't test same table twice
sql/mysql_priv.h:
  New functions for table definition cache
  New interfaces to a lot of functions.
  New faster interface to find_temporary_table() and close_temporary_table()
sql/mysqld.cc:
  Added support for table definition cache of size 'table_def_size'
  Fixed som calls to strnmov()
  Changed name of 'table_cache' to 'table_open_cache'
sql/opt_range.cc:
  Use new interfaces
  Fixed warnings from valgrind
sql/parse_file.cc:
  Safer calls to strxnmov()
  Fixed typo
sql/set_var.cc:
  Added variable 'table_definition_cache'
  Variable table_cache renamed to 'table_open_cache'
sql/slave.cc:
  Use new interface
sql/sp.cc:
  Proper use of TABLE_SHARE
sql/sp_head.cc:
  Remove compiler warnings
  We have now to call field->init(table)
sql/sp_head.h:
  Pointers to parsed strings are now const
sql/sql_acl.cc:
  table_name is now a LEX_STRING
sql/sql_base.cc:
  Main implementation of table definition cache
  (The #ifdef's are there for the future when table definition cache will replace open table cache)
  Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places
  Views are not yet cached; For the moment we only cache if a table is a view or not.
  
  Faster implementation of find_temorary_table()
  Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()'
  Drop table is slightly faster as we can use the table definition cache to know the type of the table
sql/sql_cache.cc:
  table_cache_key and table_name are now LEX_STRING
  'sDBUG print fixes
sql/sql_class.cc:
  table_cache_key is now a LEX_STRING
  safer strxnmov()
sql/sql_class.h:
  Added number of open table shares (table definitions)
sql/sql_db.cc:
  safer strxnmov()
sql/sql_delete.cc:
  Use new interface to find_temporary_table()
sql/sql_derived.cc:
  table_name is now a LEX_STRING
sql/sql_handler.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_insert.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_lex.cc:
  Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_lex.h:
  Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_load.cc:
  Safer strxnmov()
sql/sql_parse.cc:
  Better error if wrong DB name
sql/sql_partition.cc:
  part_info moved to TABLE from TABLE_SHARE
  Indentation changes
sql/sql_select.cc:
  Indentation fixes
  Call field->init(TABLE) for new created fields
  Update create_tmp_table() to use TABLE_SHARE properly
sql/sql_select.h:
  Call field->init(TABLE) for new created fields
sql/sql_show.cc:
  table_name is now a LEX_STRING
  part_info moved to TABLE
sql/sql_table.cc:
  Use table definition cache to speed up delete of tables
  Fixed calls to functions with new interfaces
  Don't use 'share_not_to_be_used'
  Instead of doing openfrm() when doing repair, we now have to call
  get_table_share() followed by open_table_from_share().
  Replace some fn_format() with faster unpack_filename().
  Safer strxnmov()
  part_info is now in TABLE
  Added Mikaels patch for partition and ALTER TABLE
  Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER
sql/sql_test.cc:
  table_name and table_cache_key are now LEX_STRING's
sql/sql_trigger.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
  safer strxnmov()
  Removed compiler warnings
sql/sql_update.cc:
  Call field->init(TABLE) after field is created
sql/sql_view.cc:
  safer strxnmov()
  Create common TABLE_SHARE object for views to allow us to cache if table is a view
sql/structs.h:
  Added SHOW_TABLE_DEFINITIONS
sql/table.cc:
  Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects
  
  The table opening process now works the following way:
  - Create common TABLE_SHARE object
  - Read the .frm file and unpack it into the TABLE_SHARE object
  - Create a TABLE object based on the information in the TABLE_SHARE
    object and open a handler to the table object
  
  open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats
sql/table.h:
  TABLE objects for the same database table now share a common TABLE_SHARE object
  In TABLE_SHARE the most common strings are now LEX_STRING's
sql/unireg.cc:
  Changed arguments to rea_create_table() to have same order as other functions
  Call field->init(table) for new created fields
sql/unireg.h:
  Added OPEN_VIEW
strings/strxnmov.c:
  Change strxnmov() to always add end \0
  This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
2005-11-23 22:45:02 +02:00
unknown
33a2716a85 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new


Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
extra/Makefile.am:
  Auto merged
include/Makefile.am:
  Auto merged
include/my_global.h:
  Auto merged
libmysqld/examples/Makefile.am:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_load.cc:
  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_table.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/docs/Makefile.am:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
libmysqld/Makefile.am:
  Merged from 5.0 to 5.1.
sql/ha_berkeley.cc:
  Merged from 5.0 to 5.1.
sql/lex.h:
  Merged from 5.0 to 5.1.
sql/set_var.cc:
  Merged from 5.0 to 5.1.
sql/share/errmsg.txt:
  Merged from 5.0 to 5.1.
sql/sql_lex.h:
  Merged from 5.0 to 5.1.
sql/sql_show.cc:
  Merged from 5.0 to 5.1.
sql/sql_yacc.yy:
  Merged from 5.0 to 5.1.
2005-11-23 14:57:00 +02:00
unknown
c3c232a88c Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.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.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  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_lex.h:
  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
2005-11-22 23:00:57 -08:00
unknown
fe63e09581 Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.


sql/field.cc:
  Inefficient usage of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
  A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
  Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
  Bad examples of usage of a string with its length fixed.
sql/handler.cc:
  Inefficient usage of String::append() fixed.
sql/item.cc:
  Bad examples of usage of a string with its length fixed.
sql/item.h:
  A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
  Inefficient using of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
  Bad examples of usage of a string with its length fixed.
sql/key.cc:
  Bad examples of usage of a string with its length fixed.
sql/log.cc:
  Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
  Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
  The dummy parser hook allocated.
sql/opt_range.cc:
  Inefficient usage of String::append() fixed.
sql/parse_file.cc:
  Bad examples of usage of a string with its length fixed.
  A hook for unknown keys added to the parser.
sql/parse_file.h:
  A hook for unknown keys added to the parser.
sql/protocol.cc:
  A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
  Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
  A warning for old format config file.
sql/slave.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
  Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
  The macro definition moved to sql_string.h to
    be accessible in all parts of server.
sql/sql_table.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
  Bad examples of usage of a string with its length fixed.
  The incorrect length in the trigger file configuration descriptor
    fixed (BUG#14090).
  The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
  A dummy  hook used for parsing views.
sql/structs.h:
  The macro definition moved to sql_string.h to be
    accessible in all parts of server.
sql/table.cc:
  A bad example of usage of a string with its length fixed.
sql/tztime.cc:
  A bad example of usage of a string with its length fixed.
2005-11-20 20:47:07 +02: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
2c748c3ef9 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_func.cc:
  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_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/mysql_priv.h:
  Manual merge
2005-11-13 17:56:20 -08:00
unknown
d090acf320 1. sys_variables[] array is removed.
2. All have_xxx variables are now selectable.


sql/set_var.cc:
  1. sys_have_xxx variables added.
  2. Removed sys_var *sys_variables[] array as we don't need it any more.
  3. void set_var_init() changed to use sys_var_xxx chain insted of sys_variables[] array.
sql/set_var.h:
  1. add_sys_var() method added to the sys_var class. It's called from constructors
  to chain all successor objects. The first one is stored in the 'static sys_var *first'.
  The total number of variables is in the 'static uint sys_vars'. Each sys_var successor object
  has the 'sys_var *next' pointer to the next one in the chain. 
  2. sys_var_have_variable class introduced to make all have_xxx variables selectable.
sql/sql_lex.cc:
  trg_new_row_fake_var(0, 0) replaced with '(sys_var*) 0x01' as we don't want to have such fake variables in the sys_var_xxx chain.
sql/sql_lex.h:
  Proper use of the changed trg_new_row_fake_var.
sql/sql_yacc.yy:
  Proper use of the changed trg_new_row_fake_var.
2005-11-06 01:36:40 +01:00
unknown
2361720c98 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


BUILD/FINISH.sh:
  Auto merged
BitKeeper/deleted/.del-makefilewin.i~5c8479dcb8a455b2:
  Auto merged
BitKeeper/deleted/.del-makefilewin~13888739357b3025:
  Auto merged
BitKeeper/deleted/.del-makefilewin~14f24a4a173e2fcd:
  Auto merged
BitKeeper/deleted/.del-makefilewin~15e9e5c9e8fa870b:
  Auto merged
BitKeeper/deleted/.del-makefilewin~1c53f31b88dd36e:
  Auto merged
BitKeeper/deleted/.del-makefilewin~1dbc058d76ebf1db:
  Auto merged
BitKeeper/deleted/.del-makefilewin~2e0407fe123f8365:
  Auto merged
BitKeeper/deleted/.del-makefilewin~2fc379bd4065c995:
  Auto merged
BitKeeper/deleted/.del-makefilewin~389ee2dcf79afb79:
  Auto merged
BitKeeper/deleted/.del-makefilewin~4d139e182457e553:
  Auto merged
BitKeeper/deleted/.del-makefilewin~5104767c73775697:
  Auto merged
BitKeeper/deleted/.del-makefilewin~608ed49dcd88e0f7:
  Auto merged
BitKeeper/deleted/.del-makefilewin~63acd666293282a:
  Auto merged
BitKeeper/deleted/.del-makefilewin~6ba64863bce3d0b8:
  Auto merged
BitKeeper/deleted/.del-makefilewin~72a64128bacce71b:
  Auto merged
BitKeeper/deleted/.del-makefilewin~78000390c783b1c5:
  Auto merged
BitKeeper/deleted/.del-makefilewin~7a9d7d5a42bbfaf5:
  Auto merged
Makefile.am:
  Auto merged
BitKeeper/deleted/.del-makefilewin~a40ea12eebdd6ef0:
  Auto merged
BitKeeper/deleted/.del-makefilewin~aeea7c82f21f7cf5:
  Auto merged
BitKeeper/deleted/.del-makefilewin~b643e38d8da389ac:
  Auto merged
BitKeeper/deleted/.del-makefilewin~c7b621c745e5de95:
  Auto merged
BitKeeper/deleted/.del-makefilewin~c8273a47b90f52bb:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d1a9d1f7d33fcb73:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d37b6b303348c871:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d90f35fdc3f2ee5f:
  Auto merged
BitKeeper/deleted/.del-makefilewin~dc4b8ad5ea53bd:
  Auto merged
BitKeeper/deleted/.del-makefilewin~dea10ec1c94f7be:
  Auto merged
BitKeeper/deleted/.del-makefilewin~ef3a208fa0e9b0db:
  Auto merged
BitKeeper/deleted/.del-makefilewin~f1e3b890aa1c9ea3:
  Auto merged
BitKeeper/deleted/.del-makefilewin~f4b7b99a887b7de:
  Auto merged
BitKeeper/deleted/.del-makefilewin~fdda94ad32fa9e34:
  Auto merged
BitKeeper/deleted/.del-my_cnf~977f69858affc57b:
  Auto merged
BitKeeper/etc/config:
  Auto merged
VC++Files/libmysqld/libmysqld.dsp:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
include/base64.h:
  Auto merged
include/my_base.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ndb_basic.result:
  Auto merged
mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/base64.c:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.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_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/heap/_check.c:
  Auto merged
storage/heap/hp_create.c:
  Auto merged
storage/innobase/include/Makefile.am:
  Auto merged
storage/innobase/include/rem0rec.h:
  Auto merged
storage/innobase/include/rem0rec.ic:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0upd.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_rnext_same.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/myrg_queue.c:
  Auto merged
storage/ndb/config/type_util.mk.am:
  Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp:
  Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
storage/ndb/include/mgmapi/ndbd_exit_codes.h:
  Auto merged
storage/ndb/include/transporter/TransporterCallback.hpp:
  Auto merged
storage/ndb/src/common/mgmcommon/IPCConfig.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp:
  Auto merged
storage/ndb/src/common/transporter/Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
storage/ndb/src/common/util/Makefile.am:
  Auto merged
storage/ndb/src/common/util/Parser.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
  Auto merged
storage/ndb/src/kernel/vm/FastScheduler.cpp:
  Auto merged
storage/ndb/src/kernel/vm/TransporterCallback.cpp:
  Auto merged
storage/ndb/src/kernel/vm/VMSignal.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBackup.cpp:
  Auto merged
storage/ndb/test/ndbapi/testOperations.cpp:
  Auto merged
storage/ndb/test/src/HugoCalculator.cpp:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
BUILD/SETUP.sh:
  manual merge
configure.in:
  manual merge
mysql-test/r/alter_table.result:
  manual merge
sql/handler.cc:
  manual merge
sql/mysql_priv.h:
  manual merge
sql/records.cc:
  manual merge
sql/share/errmsg.txt:
  manual merge
sql/sql_table.cc:
  manual merge
  Fix labels
sql/sql_update.cc:
  manual merge
sql/table.cc:
  manual merge
sql/unireg.cc:
  manual merge
storage/ndb/config/type_ndbapi.mk.am:
  manual merge
2005-11-05 01:32:55 +02: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
cd49e32407 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.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-10-22 19:35:37 -07:00
unknown
ccc051cd40 fix for bug #12595 (ESCAPE must be exactly 1 character long)
ESCAPE has length of 1 if specified and sql_mode is NO_BACKSLASH_ESCAPES
or has length of 0 or 1 in every other situation.
(approved patch applied on a up-to-date tree re-commit) 


mysql-test/r/select.result:
  results of test for bug 12595
mysql-test/t/select.test:
  test for bug #12595 (ESCAPE must be exactly one character long)
sql/item_cmpfunc.cc:
  if ESCAPE was in the statement check whether its length is
  different than 1. In NO_BACKSLASH_ESCAPES mode only length of 1 is
  allowed, otherwise the length could be 0 or 1 character (code point
  in the sense of Unicode).
sql/item_cmpfunc.h:
  pass variable from the parsing stage - whether
  ESCAPE clause was found in the statement
sql/sql_help.cc:
  pass FALSE for escape_used_in_parsing because we
  want the default mode of no error checking - our internal code.
sql/sql_lex.cc:
  initialized variable used to transfer information during
  parsing up in the stack when reducing in the grammar
sql/sql_lex.h:
  new variable used for transfering information when
  reducing in the grammar.
sql/sql_yacc.yy:
  initialize Lex->escape_used and then use it when reducing.
  This is needed as fix for bug #12595 to distinguish between
  situation where ESCAPE was found and when not because internally
  we may pass a string an empty string and there is no other way
  to find out whether this is correct or not in case of 
  NO_BACKSLASH_ESCAPES mode, which allows only length of 1 if
  ESCAPE is part of the SQL statement.
2005-10-21 04:01:52 +03:00
unknown
6a0695fe93 Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.


mysql-test/r/func_gconcat.result:
  Changed a query when fixing bug #12762.
mysql-test/r/subselect.result:
  Added test cases for bug #12762.
  Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
mysql-test/t/func_gconcat.test:
  Changed a query when fixing bug #12762.
mysql-test/t/subselect.test:
  Added test cases for bug #12762.
  Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
sql/item.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
  Changed Item_field::fix_fields to calculate attributes used when checking context conditions
  for set functions.
  Allowed alliases for set functions defined in outer subqueries.
sql/item.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_cmpfunc.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_func.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_row.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_strfunc.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_subselect.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/item_sum.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added Item_sum methods to check context conditions imposed on set functions.
sql/item_sum.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added Item_sum methods to check context conditions imposed on set functions.
sql/mysql_priv.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a type of bitmaps to be used for nesting constructs.
sql/sql_base.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_class.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_class.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_delete.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_lex.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_lex.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_parse.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries.
sql/sql_prepare.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
sql/sql_select.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_update.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_yacc.yy:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries.
2005-10-15 14:32:37 -07:00
unknown
785b7dbccf Manual merge of bug fix #7672
sql/sql_lex.h:
  Auto merged
2005-10-13 16:00:26 +04:00
unknown
a46e8e230e select.test, sql_select.cc, sql_lex.cc, item.cc:
Bug #7672 after merge fix


sql/item.cc:
  Bug #7672 after merge fix
sql/sql_lex.cc:
  Bug #7672 after merge fix
sql/sql_select.cc:
  Bug #7672 after merge fix
mysql-test/t/select.test:
  Bug #7672 after merge fix
2005-10-13 00:58:59 +04:00
unknown
b455f7c575 Manual merge, fix for bug #7672
mysql-test/r/select.result:
  Manual merge
mysql-test/t/select.test:
  Manual merge
sql/item.cc:
  Manual merge
sql/sql_lex.cc:
  Manual merge
sql/sql_lex.h:
  Manual merge
sql/sql_select.cc:
  Manual merge
2005-10-12 03:32:14 +04:00
unknown
f3f84ed8a0 Fix bug#7672 Unknown column error in order clause
When fixing Item_func_plus in ORDER BY clause field c is searched in all
opened tables, but because c is an alias it wasn't found there.

This patch adds a flag to select_lex which allows Item_field::fix_fields() 
to look up in select's item_list to find aliased fields.


sql/item.cc:
  Fix bug#7672 Unknown column error in order clause
  When fixing fields in ORDER BY clause allow Item_field::fix_fields() to look up items in select's item list to find aliased fields.
sql/sql_lex.cc:
   Fix bug#7672 Unknown column error in order clause
sql/sql_lex.h:
  Fix bug#7672 Unknown column error in order clause
  Added flag to select_lex allowing Item_field::fix_fields to look up items in select's item list.
sql/sql_select.cc:
  Fix bug#7672 Unknown column error in order clause
mysql-test/t/select.test:
  Test case for bug#7672 Unknown column error in order clause
mysql-test/r/select.result:
  Test case for bug#7672 Unknown column error in order clause
2005-10-09 23:05:44 +04:00
unknown
69bfcd9c40 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysys/my_init.c:
  Auto merged
sql/sql_update.cc:
  Auto merged
Makefile.am:
  Manual merge
mysql-test/r/cast.result:
  Manual merge
mysql-test/t/cast.test:
  Manual merge
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Manual merge
sql/ha_ndbcluster.cc:
  Manual merge
sql/item.h:
  Manual merge
sql/opt_sum.cc:
  Manual merge
sql/sql_delete.cc:
  Manual merge
sql/sql_lex.cc:
  Manual merge
sql/sql_load.cc:
  Manual merge
sql/sql_prepare.cc:
  Manual merge
2005-09-28 11:34:53 +02:00
unknown
466b46a66a Fixed error found during review of new pushed code
client/mysql.cc:
  Don't use c_ptr() for cgets() and ensure buffer is not overwritten
mysql-test/r/cast.result:
  More test for CAST(0x.... as signed)
sql/opt_sum.cc:
  Fix bugs found during review
  - Changed code to be able to remove one if
  - Ensure that count == 0 only if is_exact_count == TRUE
sql/sql_delete.cc:
  Ensure 'allow_sum_func' is reset before call to setup_conds
sql/sql_lex.cc:
  allow_sum_func doesn't have to be reset for each query
  (It's to be reset in setup_fields() or before call to setup_conds()
sql/sql_load.cc:
  Move set of auto_increment_field_not_null so that it's not set if field value is NULL
sql/sql_prepare.cc:
  allow_sum_func doesn't have to be reset for each query
  (It's to be reset in setup_fields() or before call to setup_conds()
sql/sql_update.cc:
  Ensure 'allow_sum_func' is reset before call to setup_conds
2005-09-25 21:22:23 +03:00
unknown
c64d0fc634 Manual merge
mysql-test/r/update.result:
  Auto merged
mysql-test/t/update.test:
  Auto merged
2005-09-22 02:38:14 +04:00
unknown
1b02a815dd Fix bug #13180 thd->allow_sum_funcs wasn't reset before query processing.
thd->allow_sum_func was left 'true' after previous statement thus allowing
sum funcs to be present in conditions.

thd->allow_sum_func should be set to 0 for each query and each prepared
statement reinitialization. This is done in lex_start() and 
reset_stmt_for_execute().


sql/sql_lex.cc:
  Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing.
  thd->allow_sum_func is set to 0 in lex_start().
sql/sql_prepare.cc:
  Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing.
  thd->allow_sum_func is set to 0 in  reset_stmt_for_execute().
mysql-test/t/update.test:
  Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query
  processing.
mysql-test/r/update.result:
  Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query
  processing.
2005-09-22 01:38:39 +04:00
unknown
b763c011b0 merge
sql/ha_federated.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  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_table.cc:
  Auto merged
2005-09-15 07:36:47 +02:00
unknown
d5303b8ab8 Fix for bug #12704 "Server crashes during trigger execution".
This bug occurs when some trigger for table used by DML statement is created
or changed while statement was waiting in lock_tables(). In this situation
prelocking set which we have calculated becames invalid which can easily lead
to errors and even in some cases to crashes.

With proposed patch we no longer silently reopen tables in lock_tables(),
instead caller of lock_tables() becomes responsible for reopening tables and
recalculation of prelocking set.


mysql-test/t/trigger.test:
  Added tests for bug #12704 "Server crashes during trigger execution".
  Unfortunately these tests rely on the order in which tables are locked
  by statement so they are non-determenistic and therefore should be disabled.
sql/lock.cc:
  mysql_lock_tables():
    Now instead of always reopening altered or dropped tables by itself
    mysql_lock_tables() can notify upper level and rely on caller doing this.
sql/mysql_priv.h:
  Now mysql_lock_tables() can either reopen deleted or altered tables by itself
  or notify caller about such situation through 'need_reopen' argument and rely
  on it in this.
  Also lock_tables() has new 'need_reopen' out parameter through which it
  notifies caller that some tables were altered or dropped so he needs to reopen
  them (and rebuild prelocking set some triggers may change or simply appear).
sql/sp.cc:
  sp_add_used_routine():
    To be able to restore LEX::sroutines_list to its state right after parsing
    we now adjust  LEX::sroutines_list_own_last/sroutines_list_own_elements when
    we add directly used routine.
  sp_remove_not_own_routines():
    Added procedure for restoring LEX::sroutines/sroutines_list to their state
    right after parsing (by throwing out non-directly used routines).
  sp_cache_routines_and_add_tables_for_view()/sp_update_stmt_used_routines():
    We should use LEX::sroutines_list instead of LEX::sroutines as source of
    routines used by view, since LEX::sroutines is not availiable for view
    on second attempt to open it (see comment in open_tables() about it).
sql/sp.h:
  sp_remove_not_own_routines():
    Added procedure for restoring LEX::sroutines/sroutines_list to their state
    right after parsing (by throwing out non-directly used routines).
sql/sp_head.cc:
  Removed assert which is no longer always true.
sql/sql_base.cc:
  reopen_table():
    When we re-open table and do shallow copy of TABLE object we should adjust
    pointers to it in associated Table_triggers_list object. Removed nil
    operation.
  open_tables():
    Now this function is able to rebuild prelocking set for statement if it is
    needed. It also correctly handles FLUSH TABLES which may occur during its
    execution.
  lock_tables():
    Instead of allowing mysql_lock_tables() to silently reopen altered or dropped
    tables let us notify caller and rely on that it will do reopen itself.
    This solves the problem when trigger suddenly appears or changed during
    mysq_lock_tables().
  close_tables_for_reopen():
    Added routine for properly preparing for reopening of tables and recalculation
    of set of prelocked tables.
sql/sql_handler.cc:
  Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_insert.cc:
  Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_lex.cc:
  LEX:
    Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
    which are used for keeping state in which 'sroutines_list' was right after
    statement parsing (and for restoring of this list to this state).
sql/sql_lex.h:
  LEX:
    Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
    which are used for keeping state in which 'sroutines_list' was right after
    statement parsing (and for restoring of this list to this state).
    Added chop_off_not_own_tables() method to simplify throwing away list
    of implicitly used (prelocked) tables.
sql/sql_prepare.cc:
  Now instead of silently reopening altered or dropped tables in
  lock_tables() we notify caller and rely on that the caller will
  reopen tables.
sql/sql_table.cc:
  Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_trigger.cc:
  Added Table_triggers_list::set_table() method to adjust Table_triggers_list
  to new pointer to TABLE instance.
sql/sql_trigger.h:
  Added Table_triggers_list::set_table() method to adjust Table_triggers_list
  to new pointer to TABLE instance.
sql/sql_update.cc:
  Now instead of silently reopening altered or dropped tables in
  lock_tables() we notify caller and rely on that the caller will
  reopen tables.
2005-09-15 03:56:09 +04:00
unknown
f6c1d4191c Merge
Makefile.am:
  Auto merged
BitKeeper/etc/config:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  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_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/innobase/include/page0page.ic:
  Auto merged
storage/innobase/include/univ.i:
  Auto merged
storage/innobase/row/row0mysql.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_static.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/include/kernel/signaldata/SignalData.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/StartFragReq.hpp:
  Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/StartRec.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp:
  Auto merged
storage/ndb/src/kernel/main.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Emulator.cpp:
  Auto merged
sql/log_event.cc:
  SCCS merged
sql/sql_prepare.cc:
  SCCS merged
sql/share/errmsg.txt:
  merge
2005-09-06 09:20:15 +02:00
unknown
c910050a76 Implement WL#2661 "Prepared Statements: Dynamic SQL in Stored Procedures".
The idea of the patch is to separate statement processing logic,
such as parsing, validation of the parsed tree, execution and cleanup, 
from global query processing logic, such as logging, resetting
priorities of a thread, resetting stored procedure cache, resetting
thread count of errors and warnings.
This makes PREPARE and EXECUTE behave similarly to the rest of SQL
statements and allows their use in stored procedures.
This patch contains a change in behaviour:
until recently for each SQL prepared statement command, 2 queries
were written to the general log, e.g.
[Query]   prepare stmt from @stmt_text;
[Prepare] select * from t1 <-- contents of @stmt_text
The chagne was necessary to prevent [Prepare] commands from being written
to the general log when executing a stored procedure with Dynamic SQL.
We should consider whether the old behavior is preferrable and probably
restore it.
This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs
in Dynamic SQL reported before it was disabled).


mysql-test/r/not_embedded_server.result:
  Since we don't want to log Dynamic SQL in stored procedures,
  now the general log gets only one log entry per SQL statement.
mysql-test/r/sp-error.result:
  - remove obsolete tests
  - a better error message for the case when a stored procedure that
  returns a result set is called from a function
mysql-test/r/trigger.result:
  - a better error message for the case when a stored procedure that
  returns a result set is called from a trigger
mysql-test/t/sp-error.test:
  - a better error message for the case when a stored procedure that
    returns a result set is called from a function.
  - move the comment to its place (end of file).
mysql-test/t/trigger.test:
  - a better error message for the case when a stored procedure that
  returns a result set is called from a trigger
sql/item_func.cc:
  - we need to pass sql_command explicitly to get_var_with_binlog, because
  when creating a query for SQL prepared statement thd->lex->sql_command
  points at SQLCOM_EXECUTE, which is not listed in the list of update
  queries.
sql/log_event.h:
  - remove an extra copy of the previous sentence
sql/mysql_priv.h:
  - fix declarations of sql_prepare.cc API
sql/share/errmsg.txt:
  - a new error message, when one attempts to execute a prepared statement
  which is currently being executed (this can happen only in Dynamic SQL
  at the moment).
sql/sp_head.cc:
  - extend sp_multi_results_command to return different flags for a
  command (and rename it)
  - add support for SQLCOM_PREPARE,SQLCOM_EXECUTE, SQLCOM_DEALLOCATE
    to sp_get_flags_for_command
  - replace multiple boolean sp_head members with uint m_flags
  - a fix for a crash when user variables are used in a stored procedure
    and binlog is on. A temporary fix for Bug#12637 "SP crashes the server 
   if it has update query with user var & binlog is enabled", which actually
   stands for stored functions: now instead of a crash we break
   replication if a user variable is used in a stored function which 
   is executed in prelocked mode.
sql/sp_head.h:
  - replace multiple boolean flags of sp_head with uint m_flags;
  - add flag CONTAINS_DYNAMIC_SQL
  - use this flag to error if a stored procedure with Dynamic SQL is
    called from a function or trigger.
sql/sql_class.cc:
  - Statement_map::insert should not delete a statement if it exists,
    now it's done externally to be able to handle the case when the
    statement being deleted is in use.
  - remove extra code (free_list is already reset in free_items)
sql/sql_lex.cc:
  - add lex->stmt_prepare_mode; we can't rely on thd->command any more,
    because we don't reset it any more (Dynamic SQL requirement is that
    PS are as little intrusive as possible).
sql/sql_lex.h:
  - declare bool LEX::stmt_prepare_mode
sql/sql_parse.cc:
  - move prepared statement code to sql_prepare.cc
  - change declarations (refactored code)
  - better error message when one attempts to use Dynamic SQL or a 
    stored procedure that returns a result set in a function or trigger.
sql/sql_prepare.cc:
  - major refactoring to ensure PREPARE/EXECUTE commands do not reset global THD
    state and allow their use in stored procedures.
  - add Prepared_statement::flags and use it to ensure no recursive execution
    of a prepared statement is possible
  - better comments
sql/sql_yacc.yy:
  - enable PREPARE/EXECUTE/DEALLOCATE in stored procedures
  - produce an error message on attempt to use PREPARE/EXECUTE/DEALLOCATE
    in a stored function or trigger
mysql-test/r/sp-dynamic.result:
  - sp-dynamic.test results
mysql-test/t/sp-dynamic.test:
  - a new test for PREPARE/EXECUTE/DEALLOCATE in stored procedures.
2005-09-03 03:13:18 +04:00
unknown
dc92221300 Rename:
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed 
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to 
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.


sql/item.cc:
  Rename.
sql/item_cmpfunc.cc:
  Rename.
sql/item_func.cc:
  Rename.
sql/item_subselect.cc:
  Rename.
sql/item_subselect.h:
  Remove an unused forward declaration.
sql/item_sum.h:
  Remove an unused forward declaration.
sql/mysql_priv.h:
  Remove an unused forward declaration.
sql/sp.cc:
  Rename.
sql/sp_head.cc:
  Rename.
sql/sql_base.cc:
  Rename.
sql/sql_class.cc:
  Rename.
sql/sql_class.h:
  Rename.
sql/sql_lex.cc:
  Rename.
sql/sql_parse.cc:
  Rename.
sql/sql_prepare.cc:
  Rename.
sql/sql_select.cc:
  Rename.
sql/sql_show.cc:
  Rename.
sql/sql_union.cc:
  Rename.
sql/sql_view.cc:
  Rename.
sql/table.cc:
  Rename.
2005-09-02 17:21:19 +04:00
unknown
9ea1d5e293 Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1

Resolved to minor issues. 


BitKeeper/etc/config:
  Auto merged
Makefile.am:
  Auto merged
VC++Files/sql/mysqld.vcproj:
  Auto merged
extra/perror.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/t/alter_table.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/Makefile.am:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/lex.h:
  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/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.h:
  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_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.h:
  Auto merged
storage/innobase/lock/lock0lock.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
configure.in:
  Fixed the resolve of versions.
mysql-test/r/alter_table.result:
  Fixed results.
2005-08-30 14:40:02 -07:00
unknown
5c0dc1ace8 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1


BitKeeper/deleted/.del-Grep.cpp~ad798e9ae519d667:
  Auto merged
BitKeeper/deleted/.del-Grep.hpp~b05e3af6cfabe387:
  Auto merged
BitKeeper/deleted/.del-GrepInit.cpp~df28ab3a892455fd:
  Auto merged
BitKeeper/deleted/.del-Makefile.am~f73be89578d3b6cc:
  Auto merged
BitKeeper/deleted/.del-Makefile~b293ae88e4394490:
  Auto merged
BitKeeper/deleted/.del-Makefile~e0b7d67078f0fae0:
  Auto merged
BitKeeper/deleted/.del-grep_systab_test.cpp~c7305578bec8cb62:
  Auto merged
BitKeeper/etc/config:
  Auto merged
config/ac-macros/ha_ndbcluster.m4:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
BitKeeper/deleted/.del-testGrep.cpp~2106eb0a6bf2a1b5:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.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_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/heap/hp_delete.c:
  Auto merged
storage/innobase/btr/btr0pcur.c:
  Auto merged
storage/innobase/btr/btr0sea.c:
  Auto merged
storage/innobase/include/read0read.h:
  Auto merged
storage/innobase/include/srv0srv.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/include/univ.i:
  Auto merged
storage/innobase/lock/lock0lock.c:
  Auto merged
storage/innobase/read/read0read.c:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/row/row0umod.c:
  Auto merged
storage/innobase/row/row0upd.c:
  Auto merged
storage/innobase/srv/srv0srv.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisammrg/myrg_static.c:
  Auto merged
storage/ndb/include/kernel/AttributeDescriptor.hpp:
  Auto merged
storage/ndb/include/kernel/BlockNumbers.h:
  Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
  Auto merged
storage/ndb/include/kernel/kernel_types.h:
  Auto merged
storage/ndb/include/kernel/signaldata/AlterTable.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
storage/ndb/include/portlib/NdbTCP.h:
  Auto merged
storage/ndb/src/common/debugger/BlockNames.cpp:
  Auto merged
storage/ndb/src/common/logger/LogHandler.cpp:
  Auto merged
storage/ndb/src/common/portlib/NdbTCP.cpp:
  Auto merged
storage/ndb/src/common/portlib/win32/NdbTCP.c:
  Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
storage/ndb/src/kernel/Makefile.am:
  Auto merged
storage/ndb/src/kernel/SimBlockList.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/Makefile.am:
  Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
  Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
  Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
storage/ndb/tools/Makefile.am:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Manual 5.0 - 5.1 merge
configure.in:
  Manual 5.0 - 5.1 merge
sql/mysql_priv.h:
  Manual 5.0 - 5.1 merge
sql/share/errmsg.txt:
  Manual 5.0 - 5.1 merge
sql/sql_base.cc:
  Manual 5.0 - 5.1 merge
sql/sql_prepare.cc:
  Manual 5.0 - 5.1 merge
storage/ndb/src/common/util/version.c:
  Manual 5.0 - 5.1 merge
storage/ndb/src/kernel/blocks/dblqh/Makefile.am:
  Manual 5.0 - 5.1 merge
2005-08-25 13:11:38 -04:00
unknown
8a5e527453 Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs.
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.


mysql-test/r/rpl_sp.result:
  Fix for BUG#12335: updated test cases/results
mysql-test/t/rpl_sp.test:
  Fix for BUG#12335: updated test cases/results
sql/item.cc:
  Fix for BUG#12335 (SP replication): 
   - Added Item_name_const 'function'
   - Addede 'delete reuse' to call dtor on item reuse
sql/item.h:
  Fix for BUG#12335 (SP replication) : Added Item_name_const 'function' + code cleanup
sql/item_create.cc:
   Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_create.h:
   Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_func.cc:
  Fix for BUG#12335 (SP replication) : binary log is now constrolled from within execute_function.
sql/lex.h:
  Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/log.cc:
  Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
  one to temporary disable binlogging but collect a 'union' information about binlog write
  calls.
sql/mysql_priv.h:
  Fix for BUG#12335 (SP replication)
sql/sp_head.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sp_head.h:
  Comments added
sql/sp_pcontext.h:
  Comments added
sql/sp_rcontext.h:
  Comments added
sql/sql_class.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sql_class.h:
  Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
  one to temporary disable binlogging but collect a 'union' information about binlog write
  calls.
sql/sql_delete.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_insert.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_lex.cc:
  Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
  the tokenizer.
sql/sql_lex.h:
  Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
  the tokenizer.
sql/sql_parse.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sql_update.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_yacc.yy:
  Fix for BUG#12335 (SP replication) : When creating Item_splocal, remember where it is located
  in the query.
2005-08-25 17:34:34 +04:00
unknown
72340a481a Cleanup during review of new pushed code
include/my_global.h:
  Safer macros to avoid possible overflows
sql/item_cmpfunc.cc:
  Simple optimization
sql/sp_head.cc:
  Indentation fixes
  Remove not needed "else" levels
  Added error checking for 'new'
  Simpler reseting of thd->spcont in execute_procedure
sql/sql_base.cc:
  Faster new
sql/sql_lex.cc:
  Use 'TRUE' instead of 'true'
sql/sql_parse.cc:
  Faster new
sql/sql_view.cc:
  No need to set 'tables' as it's not used
sql/table.cc:
  Simpler DBUG_ASSERT()
2005-08-22 01:13:37 +03:00
unknown
88a7d01eba Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/10624-bug-5.0-mysql


sql/sql_lex.cc:
  Auto merged
2005-08-18 22:46:17 +04:00
unknown
44086a625b Cleanups and optimization during review of new code
mysql-test/t/kill.test:
  Moved --disable_reconnect earlier to avoid race condition
sql/sql_help.cc:
  Cleanup during review of new code
  (Moved variable definitions first in function
sql/sql_insert.cc:
  Cleanup during review of new code
sql/sql_lex.cc:
  Cleanup during review of new code
sql/sql_parse.cc:
  Cleanup during review of new code
  Changed potential problem with previous_table_ref where it dependent that TABLE_LIST first element would be next_local
  Rearanged code in add_table_to_list() to remove extra if
  Combined 2 calls to calloc() to one
sql/sql_view.cc:
  Remove extra indentation level
  Combined common 'on error' exit
sql/sql_yacc.yy:
  Fixed comment style
sql/table.cc:
  Cleanup during review of new code
  - Changed while() loops to for() loop (to make code more readable)
  - Removed not needed initialization of variables
  - Removed not needed 'else' cases
  - Removed trivial ASSERT's that was checked by previous code
  - Moved comment setting last in Natural_join_column::check_grants()
2005-08-18 03:12:42 +03:00
unknown
def42df9fe Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect
results.

st_select_lex_unit::print() was losing UNION ALL if in statement were present
UNION DISTINCT.


mysql-test/r/view.result:
  Test case for bug #10624  Views with multiple UNION and UNION ALL produce incorrect results.
mysql-test/t/view.test:
  Test case for bug #10624  Views with multiple UNION and UNION ALL produce incorrect results.
sql/sql_lex.cc:
  Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect results.
2005-08-15 23:05:05 +04:00
unknown
2b53b711d8 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge


mysql-test/r/errors.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/fulltext_order_by.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/join_nested.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/errors.test:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join_nested.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  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_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_insert.cc:
  merge WL#2486
sql/sql_show.cc:
  merge WL#2486
2005-08-12 19:27:54 +03:00
unknown
7517d7e112 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task


mysql-test/include/ps_query.inc:
  Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
  The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
  More detailed error message.
mysql-test/r/innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
  More detailed error message.
mysql-test/r/join.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one failing test case which is commented with
  WL#2486 in the test file.
mysql-test/r/subselect.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
  More detailed error message.
mysql-test/t/bdb.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
  More detailed error message.
mysql-test/t/innodb.test:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
  More detailed error message.
mysql-test/t/join.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
  More detailed error message.
sql/item.cc:
  - extra parameter to find_field_in_tables
  - find_field_in_real_table renamed to find_field_in_table
  - fixed comments/typos
sql/item.h:
  - added [first | last]_name_resolution_table to class
    Name_resolution_context
  - commented old code
  - standardized formatting
sql/mysql_priv.h:
  - refactored the find_field_in_XXX procedures,
  - added a new procedure for natural join table references,
  - renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
  - pass the top-most list of the FROM clause to setup_tables
  - extra parameter to find_field_in_tables
sql/sql_acl.cc:
  - renamed find_field_in_table => find_field_in_table_ref
  - extra parameter to find_field_in_table_ref
  - commented old code
sql/sql_base.cc:
  This file contains the core of the implementation of the processing
  of NATURAL/USING joins (WL#2486).
  - added many comments to old code
  - refactored the group of find_field_in_XXX procedures, and added a
    new procedure for natural joins. There is one find_field_in_XXX procedure
    per each type of table reference (stored table, merge view, or natural
    join); one meta-procedure that selects the correct one depeneding on the
    table reference; and one procedure that goes over a list of table
    referenes.
  - NATURAL/USING joins are processed through the procedures:
      mark_common_columns, store_natural_using_join_columns,
      store_top_level_join_columns, setup_natural_join_row_types.
    The entry point to processing NATURAL/USING joins is the
    procedure 'setup_natural_join_row_types'.
  - Replaced the specialized Field_iterator_XXX iterators with one
    generic iterator over the fields of a table reference.
  - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
    the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
  - Commented old code.
sql/sql_delete.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_help.cc:
  - pass the end name resolution table to find_field_in_tables
  - adjust the list of tables for name resolution
sql/sql_insert.cc:
  - Changed the code that saves and restores the current context to
    support the list of tables for name resolution -
    context->first_name_resolution_table, and
    table_list->next_name_resolution_table.
    Needed to support an ugly trick to resolve inserted columns only in
    the first table.
  - Added Name_resolution_context::[first | last]_name_resolution_table.
  - Commented old code
sql/sql_lex.cc:
  - set select_lex.parent_lex correctly
  - set correct state of the current name resolution context
sql/sql_lex.h:
  - Added a stack of name resolution contexts to support local
    contexts for JOIN ... ON conditions.
  - Commented old code.
sql/sql_load.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
  - correctly set SELECT_LEX::parent_lex
  - set the first table of the current name resoltion context
  - added support for NATURAL/USING joins
  - commented old code
sql/sql_select.cc:
  - Pass the FROM clause to setup_tables.
  - Pass the end table to find_field_in_tables
  - Improved comments
sql/sql_show.cc:
  - Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
  - Added support for a stack of name resolution contexts needed to
    implement name resolution for JOIN ... ON. A context is pushed
    for each new JOIN ... ON, and popped afterwards.
  - Added support for NATURAL/USING joins.
sql/table.cc:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
sql/table.h:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
  Adjusted according to standard NATURAL JOIN syntax.
2005-08-12 17:57:19 +03:00
unknown
aca6f88ebb Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1


BitKeeper/etc/config:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/default.c:
  Auto merged
scripts/Makefile.am:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.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/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/include/os0file.h:
  Auto merged
storage/innobase/include/read0read.h:
  Auto merged
storage/innobase/include/read0types.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/read/read0read.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/srv/srv0srv.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0sys.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
  Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
  Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.hpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  Manual merge 5.0 -> 5.1
mysql-test/t/alter_table.test:
  Manual merge 5.0 -> 5.1
sql/share/errmsg.txt:
  Manual merge 5.0 -> 5.1
storage/ndb/tools/Makefile.am:
  Manual merge 5.0 -> 5.1
2005-08-05 18:01:34 -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
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
36b6bf2ef3 Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-ctype_cp932.test:
  Auto merged
BitKeeper/deleted/.del-isam.test~834fb0ee8196c445:
  Auto merged
include/thr_lock.h:
  Auto merged
mysql-test/t/alias.test:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/archive.test:
  Auto merged
mysql-test/t/backup.test:
  Auto merged
mysql-test/t/bool.test:
  Auto merged
mysql-test/t/connect.test:
  Auto merged
mysql-test/t/count_distinct2.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ctype_many.test:
  Auto merged
mysql-test/t/ctype_ucs_binlog.test:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/delayed.test:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/distinct.test:
  Auto merged
mysql-test/t/drop.test:
  Auto merged
mysql-test/t/endspace.test:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/func_compress.test:
  Auto merged
mysql-test/t/func_concat.test:
  Auto merged
mysql-test/t/func_date_add.test:
  Auto merged
mysql-test/t/func_equal.test:
  Auto merged
mysql-test/t/func_if.test:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_set.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/gis-rtree.test:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/grant2.test:
  Auto merged
mysql-test/t/grant_cache.test:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
mysql-test/t/heap_btree.test:
  Auto merged
mysql-test/t/heap_hash.test:
  Auto merged
mysql-test/t/init_connect.test:
  Auto merged
mysql-test/t/insert_select.test:
  Auto merged
mysql-test/t/insert_update.test:
  Auto merged
mysql-test/t/key.test:
  Auto merged
mysql-test/t/keywords.test:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
mysql-test/t/lock.test:
  Auto merged
mysql-test/t/lowercase_table.test:
  Auto merged
mysql-test/t/lowercase_table3.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/mysqlbinlog2.test:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  Auto merged
mysql-test/t/ndb_autodiscover.test:
  Auto merged
mysql-test/t/ndb_charset.test:
  Auto merged
mysql-test/t/ndb_grant.later:
  Auto merged
mysql-test/t/ndb_index_ordered.test:
  Auto merged
mysql-test/t/ndb_index_unique.test:
  Auto merged
mysql-test/t/ndb_restore.test:
  Auto merged
mysql-test/t/ndb_types.test:
  Auto merged
mysql-test/t/ndb_update.test:
  Auto merged
mysql-test/t/null.test:
  Auto merged
mysql-test/t/null_key.test:
  Auto merged
mysql-test/t/olap.test:
  Auto merged
mysql-test/t/openssl_1.test:
  Auto merged
mysql-test/t/order_by.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
mysql-test/t/ps_4heap.test:
  Auto merged
mysql-test/t/ps_5merge.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/replace.test:
  Auto merged
mysql-test/t/row.test:
  Auto merged
mysql-test/t/rpl000001.test:
  Auto merged
mysql-test/t/rpl000015.test:
  Auto merged
mysql-test/t/rpl000017.test:
  Auto merged
mysql-test/t/rpl000018.test:
  Auto merged
mysql-test/t/rpl_EE_error.test:
  Auto merged
mysql-test/t/rpl_change_master.test:
  Auto merged
mysql-test/t/rpl_charset.test:
  Auto merged
mysql-test/t/rpl_create_database.test:
  Auto merged
mysql-test/t/rpl_ddl.test:
  Auto merged
mysql-test/t/rpl_deadlock.test:
  Auto merged
mysql-test/t/rpl_empty_master_crash.test:
  Auto merged
mysql-test/t/rpl_error_ignored_table.test:
  Auto merged
mysql-test/t/rpl_flush_log_loop.test:
  Auto merged
mysql-test/t/rpl_flush_tables.test:
  Auto merged
mysql-test/t/rpl_get_lock.test:
  Auto merged
mysql-test/t/rpl_heap.test:
  Auto merged
mysql-test/t/rpl_loaddata.test:
  Auto merged
mysql-test/t/rpl_loaddata_rule_m.test:
  Auto merged
mysql-test/t/rpl_log.test:
  Auto merged
mysql-test/t/rpl_log_pos.test:
  Auto merged
mysql-test/t/rpl_max_relay_size.test:
  Auto merged
mysql-test/t/rpl_multi_query.test:
  Auto merged
mysql-test/t/rpl_openssl.test:
  Auto merged
mysql-test/t/rpl_redirect.test:
  Auto merged
mysql-test/t/rpl_relayrotate.test:
  Auto merged
mysql-test/t/rpl_replicate_do.test:
  Auto merged
mysql-test/t/rpl_reset_slave.test:
  Auto merged
mysql-test/t/rpl_server_id2.test:
  Auto merged
mysql-test/t/rpl_temporary.test:
  Auto merged
mysql-test/t/rpl_timezone.test:
  Auto merged
mysql-test/t/rpl_user_variables.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/t/synchronization.test:
  Auto merged
mysql-test/t/system_mysql_db.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
mysql-test/t/temp_table.test:
  Auto merged
mysql-test/t/timezone2.test:
  Auto merged
mysql-test/t/timezone_grant.test:
  Auto merged
mysql-test/t/type_float.test:
  Auto merged
mysql-test/t/type_ranges.test:
  Auto merged
mysql-test/t/type_timestamp.test:
  Auto merged
mysql-test/t/union.test:
  Auto merged
mysql-test/t/update.test:
  Auto merged
mysql-test/t/user_var-binlog.test:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8:
  Simple merge
mysql-test/r/ps_grant.result:
  Simple merge
mysql-test/t/analyse.test:
  Simple merge
mysql-test/t/auto_increment.test:
  Simple merge
mysql-test/t/bdb.test:
  Simple merge
mysql-test/t/bigint.test:
  Simple merge
mysql-test/t/case.test:
  Simple merge
mysql-test/t/cast.test:
  Simple merge
mysql-test/t/check.test:
  Simple merge
mysql-test/t/count_distinct.test:
  Simple merge
mysql-test/t/ctype_latin1_de.test:
  Simple merge
mysql-test/t/ctype_uca.test:
  Simple merge
mysql-test/t/ctype_ucs.test:
  Simple merge
mysql-test/t/ctype_utf8.test:
  Simple merge
mysql-test/t/delete.test:
  Simple merge
mysql-test/t/flush_block_commit.test:
  Simple merge
mysql-test/t/func_default.test:
  Simple merge
mysql-test/t/func_gconcat.test:
  Simple merge
mysql-test/t/func_group.test:
  Aligned code with 4.1
mysql-test/t/func_in.test:
  Simple merge
mysql-test/t/func_math.test:
  Simple merge
mysql-test/t/func_misc.test:
  Simple merge
mysql-test/t/func_test.test:
  Simple merge
mysql-test/t/func_time.test:
  Simple merge
mysql-test/t/group_by.test:
  Simple merge
mysql-test/t/having.test:
  Simple merge
mysql-test/t/innodb.test:
  Simple merge
mysql-test/t/insert.test:
  Simple merge
mysql-test/t/join_outer.test:
  Simple merge
mysql-test/t/kill.test:
  Simple merge
mysql-test/t/loaddata.test:
  Simple merge
mysql-test/t/lock_multi.test:
  Simple merge
mysql-test/t/multi_update.test:
  Simple merge
mysql-test/t/mysqlbinlog.test:
  Simple merge
mysql-test/t/mysqldump.test:
  Aligned code with 4.1
mysql-test/t/mysqltest.test:
  Simple merge
mysql-test/t/ndb_basic.test:
  Simple merge
mysql-test/t/ndb_cache.test:
  Simple merge
mysql-test/t/ndb_subquery.test:
  Simple merge
mysql-test/t/ps_grant.test:
  Simple merge
mysql-test/t/range.test:
  Simple merge
mysql-test/t/rpl_drop_temp.test:
  Simple merge
mysql-test/t/rpl_loaddata_rule_s.test:
  Simple merge
mysql-test/t/rpl_loaddatalocal.test:
  Simple merge
mysql-test/t/rpl_rotate_logs.test:
  Simple merge
mysql-test/t/rpl_until.test:
  Simple merge
mysql-test/t/rpl_variables.test:
  Simple merge
mysql-test/t/select.test:
  Simple merge
mysql-test/t/sql_mode.test:
  Simple merge
mysql-test/t/type_blob.test:
  Simple merge
mysql-test/t/type_decimal.test:
  Simple merge
mysql-test/t/user_var.test:
  Simple merge
mysql-test/t/variables.test:
  Simple merge
sql/lock.cc:
  Simple optimization
sql/mysql_priv.h:
  Simple merge
sql/sql_table.cc:
  Simple merge
sql/table.cc:
  Simple merge
sql/unireg.cc:
  Simple merge
2005-07-28 17:09:54 +03:00
unknown
53f40f95f8 Moved test for 'show full processlist' to not_embedded_server.test becasue it could fail on a slow computer where previous connections has not yet disconnected
mysql-test/r/ps_grant.result:
  Deallocate prepare statements
  Moved test for 'show full processlist' to not_embedded_server.test becasue it's shouldn't be here and it could fail on a slow computer where previous connections has not yet disconnected
mysql-test/t/ps_grant.test:
  Deallocate prepare statements
  Moved test for 'show full processlist' to not_embedded_server.test becasue it's shouldn't be here and it could fail on a slow computer where previous connections has not yet disconnected
sql/sql_lex.cc:
  Fixed typo
mysql-test/r/not_embedded_server.result:
  New BitKeeper file ``mysql-test/r/not_embedded_server.result''
mysql-test/t/not_embedded_server.test:
  New BitKeeper file ``mysql-test/t/not_embedded_server.test''
BitKeeper/etc/ignore:
  added ndb/tools/ndb_config
2005-07-27 13:45:06 +03:00
unknown
cd483c5520 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00
unknown
ef09588661 Post-merge fixes. 2005-07-15 00:41:58 +04:00
unknown
b0641a3bdd Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root


regex/regerror.c:
  Auto merged
sql/sql_lex.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
2005-07-15 00:31:09 +04:00
unknown
cb7a5b53cc A fix and a test case for Bug#11299 "prepared statement makes wrong SQL
syntax in binlog which stops replication":
disallow the use of parameter markers which can lead to generation
of malformed binlog queries. 


mysql-test/r/ps.result:
  Test results fixed: a test case for Bug#11299
mysql-test/t/ps.test:
  A test case for Bug#11299
sql/sql_lex.cc:
  Introduce a new parser token for a parameter marker. Make sure
  that a parameter marker can not be used in a query which, when
  transformed to a binlog query, becomes grammatically incorrect.
sql/sql_yacc.yy:
  The check for COM_PREPARE has been moved into the lexer.
mysql-test/var:
  New BitKeeper file ``mysql-test/var''
2005-07-15 00:01:49 +04:00
unknown
c0e325a35c valgrind error fix(uninitialiased variable)
removed unnecessary operation


sql/sql_lex.cc:
  valgrind error fix(uninitialiased variable)
sql/sql_parse.cc:
  removed unnecessary operation
2005-07-14 15:42:36 +05:00
unknown
9aa1504062 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-mysqlproc


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/share/errmsg.txt:
  Manual merge.
sql/sp.cc:
  Manual merge.
2005-07-13 15:08:13 +04:00
unknown
11f9e513d7 Implementation of Monty's idea: Now we can open mysql.proc table for lookup
of stored routines definitions even if we already have some tables open and
locked. To avoid deadlocks in this case we have to put certain restrictions
on locking of mysql.proc table.

This allows to use stored routines safely under LOCK TABLES without explicitly
mentioning mysql.proc in the list of locked tables. It also fixes bug #11554
"Server crashes on statement indirectly using non-cached function".


mysql-test/r/sp-error.result:
  Added test which checks that now we can read stored routines definitions
  under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
  added check for restrictions which this ability puts on mysql.proc locking.
  Updated test for bug #9566 to correspond this new situation.
mysql-test/r/sp-threads.result:
  Added test for bug #11554 "Server crashes on statement indirectly using
  non-cached function".
mysql-test/t/sp-error.test:
  Added test which checks that now we can read stored routines definitions
  under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
  added check for restrictions which this ability puts on mysql.proc locking.
  Updated test for bug #9566 to correspond this new situation.
mysql-test/t/sp-threads.test:
  Added test for bug #11554 "Server crashes on statement indirectly using
  non-cached function".
sql/lock.cc:
  get_lock_data():
   To be able to open and lock for reading system tables like 'mysql.proc',
   when we already have some tables opened and locked, and avoid deadlocks
   we have to disallow write-locking of these tables with any other tables.
sql/mysql_priv.h:
  open_table() has new parameter which allows to open table even if some-one
  has done a flush or holding namelock on it.
sql/share/errmsg.txt:
  Added error message saying that one cannot write-lock some of system tables
  with any other tables.
sql/sp.cc:
  open_proc_table_for_read()/close_proc_table():
    Added functions to be able open and close mysql.proc table when we already
    have some tables open and locked.
  open_proc_table_for_update():
    Added function to simplify opening of mysql.proc for updates.
  db_find_routine_aux()/db_find_routine()/db_update_routine()/...
    Moved responsibility for opening mysql.proc table from db_find_routine_aux()
    one level up, since this level knows better which type of table access for
    reading of for update it needs.
  sp_function_exists():
    Removed unused function.
sql/sp.h:
  sp_function_exists():
    Removed unused function.
sql/sql_base.cc:
  open_table():
    Added new parameter which allows to open table even if some-one has done a
    flush or holding namelock on it.
  open_unireg_entry():
    Mark 'mysql.proc' as a system table which has special restrictions on its
    locking, but thanks to them can be open and locked even if we already have
    some open and locked.
sql/sql_class.cc:
  Moved THD members holding information about open and locked tables to separate
  Open_tables_state class to be able to save/restore this state easier.
  Added THD::push_open_tables_state()/pop_open_tables_state() methods for
  saving/restoring this state.
sql/sql_class.h:
  Moved THD members holding information about open and locked tables to separate
  Open_tables_state class to be able to save/restore this state easier.
  Added THD::push_open_tables_state()/pop_open_tables_state() methods for
  saving/restoring this state.
sql/sql_lex.cc:
  Removed LEX::proc_table member which was not really used.
sql/sql_lex.h:
  Removed LEX::proc_table member which was not really used.
sql/sql_table.cc:
  open_table() has new parameter which allows to open table even if some-one
  has done a flush or holding namelock on it.
sql/table.h:
  Added TABLE_SHARE::system_table indicating that this table is system table
  like 'mysql.proc' and we want to be able to open and read-lock it even when
  we already have some tables open and locked (and because of this we have
  to put some restrictions on write locking it).
2005-07-13 13:48:13 +04:00
unknown
d0c69a8264 Manual fixes after merging patch for bug #8406 "Triggers crash if referencing
a table" with main tree.


mysql-test/r/trigger.result:
  Temporalily disable part of test which exposes bug #11554 (work on which is in
  progress).
mysql-test/t/sp-error.test:
  After merge fix.
    Fixed wrong delimiter command.
mysql-test/t/trigger.test:
  Temporalily disable part of test which exposes bug #11554 (work on which is in
  progress).
sql/sp.cc:
  After merge fix.
    Item_arena was renamed to Query_arena.
sql/sp.h:
  After merge fix.
    Item_arena was renamed to Query_arena.
sql/sql_lex.cc:
  After merge fix.
    LEX::spfuns/spprocs hashes were replaces with one LEX::sroutines hash.
2005-07-09 23:11:17 +04:00
unknown
eef5f17bde Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg8406


mysql-test/r/sp.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
mysql-test/t/sp-error.test:
  Manual merge.
sql/sp_head.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2005-07-09 22:04:18 +04:00
unknown
14b1f91ba4 Enable support of access to tables from triggers. Thus fix bug #8406 "Triggers
crash if referencing a table" and several other related bugs.
Fix for bug #11834 "Re-execution of prepared statement with dropped function
crashes server." which was spotted during work on previous bugs.

Also couple of nice cleanups:
- Replaced two separate hashes for stored routines used by statement with one.
- Now instead of doing one pass through all routines used in statement for
  caching them and then doing another pass for adding their tables to table
  list, we do only one pass during which do both things.


mysql-test/r/sp-error.result:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/r/sp.result:
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/r/trigger.result:
  Added several tests for triggers using tables.
mysql-test/t/sp-error.test:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/t/sp.test:
  Updated comment about recursive views to reflect current situation.
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/t/trigger.test:
  Added several tests for triggers using tables.
sql/item_func.cc:
  Item_func_sp::cleanup():
    By next statement execution stored function can be dropped or altered so
    we can't assume that sp_head object for it will be still valid.
sql/sp.cc:
  - Added Sroutine_hash_entry structure that represents element in the set of
    stored routines used by statement or routine. We can't as before use
    LEX_STRING for this purprose because we want link all elements of this set
    in list.
  - Replaced sp_add_to_hash() with sp_add_used_routine() which takes into account
    that now we use one hash for stored routines used by statement instead of two
    and which mantains list linking all elelemnts in this hash.
  - Renamed sp_merge_hash() to sp_update_sp_used_routines().
  - Introduced sp_update_stmt_used_routines() for adding elements to the set of
    routines used by statement from another similar set for statement or routine.
    This function will also mantain list linking elements of destination set.
  - Now instead of one sp_cache_routines() function we have family of 
    sp_cache_routines_and_add_tables() functions which are also responsible for
    adding tables used by routines being cached to statement table list. Nice
    optimization - thanks to list linking all elements in the hash of routines
    used by statement we don't need to perform several iterations over this hash
    (as it was before in cases when we have added new elements to it).
sql/sp.h:
  Added declarations of functions used for manipulations with set (hash) of stored
  routines used by statement.
sql/sp_head.cc:
  sp_name::init_qname():
    Now sp_name also holds key identifying routine in the set (hash) of
    stored routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed definition of sp_add_sp_tables_to_table_list() and auxilary functions 
  since now we don't have separate stage on which we add tables used by routines
  used by statement to table list for prelocking. We do it on the same stage as
  we load those routines in SP cache. So all this functionality moved to
  sp_cache_routines_and_add_tables() family of functions.
sql/sp_head.h:
  sp_name:
    Now this class also holds key identifying routine in the set (hash) of stored
    routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed declaration of sp_add_sp_tables_to_table_list() since now we don't have
  separate stage on which we add tables used by routines used by statement to
  table list for prelocking. We do it on the same stage as we load those routines
  in SP cache.
sql/sql_base.cc:
  open_tables():
  - LEX::spfuns/spprocs hashes were replaced with one LEX::sroutines hash.
  - Now instead of doing one pass through all routines used in statement for
    caching them and then doing another pass for adding their tables to table
    list, we do only one pass during which do both things. It is easy to do
    since all routines in the set of routines used by statement are linked in
    the list. This also allows us to calculate table list for prelocking more
    precisely.
  - Now triggers properly inform prelocking algorithm about tables they use.
sql/sql_lex.cc:
  lex_start():
    Replaced LEX::spfuns/spprocs with with one LEX::sroutines hash.
    Added LEX::sroutines_list list linking all elements in this hash.
  st_lex::st_lex():
    Moved definition of LEX constructor to sql_lex.cc file to be able
    use sp_sroutine_key declaration from sp.h in it.
sql/sql_lex.h:
  LEX:
    Replaced two separate hashes for stored routines used by statement with one.
    Added list linking all elements in this hash to be able to iterate through all
    elements and add new elements to this hash at the same time.
    Moved constructor definition to sql_lex.cc.
sql/sql_parse.cc:
  mysql_execute_command():
    Replaced LEX::spfuns/spprocs with one LEX::sroutines hash.
sql/sql_trigger.cc:
  Added missing GNU GPL notice.
  Table_triggers_list::check_n_load()
    Added initialization of sroutines_key which stores key representing
    triggers of this table in the set (hash) of routines used by this statement.
sql/sql_trigger.h:
  Added missing GNU GPL notice.
  Table_triggers_list:
    Added sroutines_key member to store key representing triggers of this
    table in the set (hash) of routines used by this statement.
    Declared sp_cache_routines_and_add_tables_for_triggers() as friend since
    it needs access to sroutines_key and trigger bodies.
sql/sql_yacc.yy:
  - Now we use sp_add_used_routine() instead of sp_add_to_hash() for adding
    elements to the set of stored routines used in statement.
  - Enabled support of subqueries as right sides in assignments to triggers' row
    accessors.
2005-07-09 21:51:59 +04:00
unknown
8a23dd8672 Merge jwinstead@production.mysql.com:my/mysql-5.0-11045
into  mysql.com:/home/jimw/my/mysql-5.0-clean


VC++Files/sql/mysqld.dsp:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/item_strfunc.cc:
  SCCS merged
2005-07-06 16:49:04 -07:00
unknown
323652f4dc Merge
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-05 13:42:19 +03:00
unknown
836f5a5a1e fixed environment creation and cleaning up for processing view one by one during checking (BUG#11337)
mysql-test/r/view.result:
  checking views after some view with error (BUG#11337)
mysql-test/t/view.test:
  checking views after some view with error (BUG#11337)
sql/sql_lex.cc:
  environment cleaning up for processing view one by one
sql/sql_lex.h:
  methods for lex cleunup during view processing one by one
sql/sql_table.cc:
  fixed environment creation and cleaning up for processing view one by one (BUG#11337)
2005-07-05 13:37:02 +03:00
unknown
497b88652b fix bugs found by gcc 3.4 compiler
sql/sp_head.h:
  removed unused parameter
sql/sql_lex.cc:
  make correct operation order
sql/sql_yacc.yy:
  removed unused parameter
2005-07-01 13:27:23 +03:00
unknown
b4f595b95f Name resolution context added (BUG#6443)
include/my_bitmap.h:
  new bitmap operation
mysql-test/r/view.result:
  added warnings
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysql-test/t/view.test:
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysys/my_bitmap.c:
  new bitmap operation
sql/field.h:
  index of field in table added
sql/item.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item.h:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item_cmpfunc.cc:
  table list removed from fix_fields() arguments
sql/item_cmpfunc.h:
  table list removed from fix_fields() arguments
sql/item_func.cc:
  table list removed from fix_fields() arguments
sql/item_func.h:
  table list removed from fix_fields() arguments
sql/item_row.cc:
  table list removed from fix_fields() arguments
sql/item_row.h:
  table list removed from fix_fields() arguments
sql/item_strfunc.cc:
  fixed server crash on NULL argument
sql/item_strfunc.h:
  table list removed from fix_fields() arguments
sql/item_subselect.cc:
  table list removed from fix_fields() arguments
sql/item_subselect.h:
  table list removed from fix_fields() arguments
sql/item_sum.cc:
  table list removed from fix_fields() arguments
sql/item_sum.h:
  table list removed from fix_fields() arguments
sql/item_timefunc.cc:
  table list removed from fix_fields() arguments
sql/item_timefunc.h:
  table list removed from fix_fields() arguments
sql/item_uniq.h:
  table list removed from fix_fields() arguments
sql/log_event.cc:
  Name resolution context added
sql/log_event.h:
  Name resolution context added
sql/mysql_priv.h:
  Name resolution context added
sql/set_var.cc:
  table list removed from fix_fields() arguments
sql/share/errmsg.txt:
  new error message
sql/sp.cc:
  Name resolution context added
sql/sp_head.cc:
  table list removed from fix_fields() arguments
sql/sp_head.h:
  Name resolution context added
sql/sql_base.cc:
  table list removed from fix_fields() arguments
  Name resolution context added
sql/sql_class.cc:
  renamed variable
sql/sql_delete.cc:
  Name resolution context added
sql/sql_derived.cc:
  Name resolution context added
sql/sql_do.cc:
  table list removed from fix_fields() arguments
sql/sql_handler.cc:
  Name resolution context added
sql/sql_help.cc:
  Name resolution context added
sql/sql_insert.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/sql_lex.cc:
  Name resolution context added
sql/sql_lex.h:
  removed resolve mode (information stored into name resolution context)
sql/sql_load.cc:
  table list removed from fix_fields() arguments
sql/sql_olap.cc:
  Name resolution context added
sql/sql_parse.cc:
  Name resolution context added
sql/sql_prepare.cc:
  table list removed from fix_fields() arguments
sql/sql_select.cc:
  table list removed from fix_fields() arguments
sql/sql_show.cc:
  Name resolution context added
sql/sql_trigger.cc:
  table list removed from fix_fields() arguments
sql/sql_udf.h:
  table list removed from fix_fields() arguments
sql/sql_union.cc:
  Name resolution context added
sql/sql_update.cc:
  Name resolution context added
sql/sql_view.cc:
  Name resolution context added
sql/sql_view.h:
  table list removed from fix_fields() arguments
sql/sql_yacc.yy:
  Name resolution context added
sql/table.cc:
  Name resolution context added
  merged view processing moved
sql/table.h:
  merged view processing moved
2005-07-01 07:05:42 +03:00
unknown
94d1d88658 Clean up warnings and build problems on Windows. (Bug #11045)
VC++Files/sql/mysqld.dsp:
  Link debug server against debug yassl
sql/examples/ha_archive.cc:
  Fix type for variables used to store number of rows
  Add cast when reading current position
sql/examples/ha_archive.h:
  Fix variables used to store rows to ha_rows
sql/ha_federated.cc:
  Remove unused variables, fix type of variable used to store query id
sql/item_strfunc.cc:
  Remove unused variables
sql/sql_acl.cc:
  Remove unused variables
sql/sql_lex.cc:
  Add casts to fix type used for counting number of rows
sql/sql_lex.h:
  Fix size of options to be ulong again
sql/sql_insert.cc:
  Fix type of query id value
sql/sql_union.cc:
  Cast value for number of rows to ha_rows
sql/sql_yacc.yy:
  Remove unused variable
sql/table.cc:
  Add casts for handling key_part lengths
2005-06-18 01:55:42 +02:00
unknown
c0918af2c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-10736


sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-17 23:27:23 +04:00
unknown
63c21c07fc Rename all prepared statements COM_ commands to prefix with COM_STMT_
libmysql/libmysql.c:
  Rename.
libmysqld/lib_sql.cc:
  Rename.
sql/item_cmpfunc.cc:
  Use proper method to check for stmt prepare, only_prepare is removed.
sql/mysql_priv.h:
  Remove an obsolete define. Rename mysql_stmt_free to mysql_stmt_close.
sql/sql_class.h:
  Remove THD::only_prepare.
  Rename.
sql/sql_lex.cc:
  Rename COM_PREPARE -> COM_STMT_PREPARE
sql/sql_parse.cc:
  Rename.
sql/sql_prepare.cc:
  Rename.
sql/sql_yacc.yy:
  Rename.
tests/mysql_client_test.c:
  Rename.
2005-06-17 23:26:25 +04:00
unknown
f1e42a0b35 renamed:
Item_buff -> Cached_item
  Item_arena -> Query_arena
  TEST_ASSERT -> YYERROR_UNLESS


sql/item.h:
  renamed:
    Item_buff -> Cached_item
sql/item_buff.cc:
  renamed:
    Item_buff -> Cached_item
sql/item_func.cc:
  renamed:
    Item_arena -> Query_arena
sql/item_subselect.cc:
  renamed:
    Item_arena -> Query_arena
sql/sp_head.cc:
  renamed:
    Item_arena -> Query_arena
sql/sp_head.h:
  renamed:
    Item_arena -> Query_arena
sql/sql_base.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_class.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_class.h:
  renamed:
    Item_arena -> Query_arena
sql/sql_lex.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_prepare.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_select.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_select.h:
  renamed:
    Item_buff -> Cached_item
    Item_arena -> Query_arena
sql/sql_union.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_view.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_yacc.yy:
  renamed:
    TEST_ASSERT -> YYERROR_UNLESS
sql/table.cc:
  renamed:
    Item_arena -> Query_arena
2005-06-15 19:58:35 +02:00
unknown
936688feb5 A followup patch for Bug#7306 (limit in prepared statements):
don't evaluate subqueries during statement prepare, even if they
are not correlated.
With post-review fixes.


sql/mysql_priv.h:
  Add UNCACHEABLE_PREPARE to mark subqueries as non-constant in 
  mysql_stmt_prepare
sql/sql_lex.cc:
  Add a missing assert: noone can call unit::set_limit from 
  mysql_stmt_prepare.
sql/sql_lex.h:
  Comment fixed.
sql/sql_parse.cc:
  Mark new SELECT_LEXes as uncacheable if they created during 
  statement prepare.
sql/sql_prepare.cc:
  Switch off the uncacheable flag when prepare is done.
2005-06-08 00:34:53 +04:00
unknown
5188f031ae Patch two (the final one) for Bug#7306 "the server side preparedStatement
error for LIMIT placeholder".
The patch adds grammar support for LIMIT ?, ? and changes the
type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*,
so that it can point to Item_param.


mysql-test/include/ps_modify.inc:
  Fix existing tests: now LIMIT can contain placeholders.
mysql-test/include/ps_query.inc:
  Fix existing tests: now LIMIT can contain placeholders.
mysql-test/r/ps.result:
  Add basic test coverage for LIMIT ?, ? and fix test results.
mysql-test/r/ps_2myisam.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_3innodb.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_4heap.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_5merge.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_6bdb.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_7ndb.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/t/ps.test:
  Add basic test coverage for LIMIT ?, ?.
sql/item.h:
  Add a short-cut for (ulonglong) val_int() to Item.
  Add a constructor to Item_int() that accepts ulonglong.
  Simplify Item_uint constructor by using the c-tor above.
sql/item_subselect.cc:
  Now select_limit has type Item *.
  We can safely create an Item in Item_exists_subselect::fix_length_and_dec():
  it will be allocated in runtime memory root and freed in the end of
  execution.
sql/sp_head.cc:
  Add a special initalization state for stored procedures to 
  be able to easily distinguish the first execution of a stored procedure
  from prepared statement prepare.
sql/sql_class.h:
  Introduce new state 'INITIALIZED_FOR_SP' to be able to easily distinguish
  the first execution of a stored procedure from prepared statement prepare.
sql/sql_derived.cc:
  - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
    evreryplace. Add a warning about use of set_limit in 
  mysql_derived_filling.
sql/sql_error.cc:
  - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
    evreryplace.
  - this change is also aware of bug#11095 "show warnings limit 0 returns 
  all rows instead of zero rows", so the one who merges the bugfix from
  4.1 can use local version of sql_error.cc.
sql/sql_handler.cc:
  - use unit->set_limit() to initalize 
  unit->select_limit_cnt,offset_limit_cnt everyplace.
sql/sql_lex.cc:
  Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_lex.h:
  Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_parse.cc:
  - use unit->set_limit() to initalize 
  unit->select_limit_cnt,offset_limit_cnt everyplace. 
  - we can create an Item_int to set global limit of a statement:
  it will be created in the runtime mem root and freed in the end of
  execution.
sql/sql_repl.cc:
  Use unit->set_limit to initialize limits.
sql/sql_select.cc:
  - select_limit is now Item* so the proper way to check for default value
  is to compare it with NULL.
sql/sql_union.cc:
  Evaluate offset_limit_cnt using the new type of ST_SELECT_LEX::offset_limit
sql/sql_view.cc:
  Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_yacc.yy:
  Add grammar support for LIMIT ?, ? clause.
2005-06-07 14:11:36 +04:00
unknown
5cdac99069 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-7306-new


sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-30 20:56:11 +04:00
unknown
78422442df Preparatory (and the most problematic) patch for Bug#7306
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.


mysql-test/r/group_min_max.result:
  Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
sql/item_subselect.cc:
  Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS 
  subqueries to one place: Item_exists_subselect::fix_length_and_dec().
  This implies that unit->select_limit_cnt is not set until the item is 
  fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
sql/mysql_priv.h:
  setup_tables no longer needs a special flag for the case when
  it's called from JOIN::reinit() (we don't need to call setup_tables
  between two executions of a correlated subquery).
sql/opt_range.cc:
  Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
  not field data, to evaluate max_used_key_length, which is then
  used for explain.
sql/sp.cc:
  - setup_tables signature changed.
sql/sql_base.cc:
  - setup_tables no longer needs a special mode for subqueries.
    Unused checks were removed.
sql/sql_delete.cc:
  - setup_tables signature changed
sql/sql_help.cc:
  - setup_tables signature changed
sql/sql_insert.cc:
  - setup_tables signature changed
sql/sql_lex.cc:
  Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
  in one place, and hence remove it from st_select_lex::test_limit().
sql/sql_lex.h:
  Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
sql/sql_load.cc:
  - setup_tables signature changed
sql/sql_olap.cc:
  - setup_tables signature changed
sql/sql_parse.cc:
  - st_select_lex_unit::set_limit() signature changed
sql/sql_select.cc:
  Move setting of JOIN::select_limit from JOIN::prepare
  to JOIN::optimize. At prepare, limit is unknown yet.
  Remove excessive cleanups from JOIN::reinit which were overwriting
  join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
  by the change in item_subselect.cc.
sql/sql_union.cc:
  Class st_select_lex_unit was changed to avoid calls to 
   st_select_lex_unit::set_limit from places where it may be unknown.
  Now unit->select_limit_cnt is set at ::exec(). 
  st_select_lex_unit::init_prepare_fake_select_lex(): 
   - move out set_limit functionality
   - remove a few lines of dead code.
  st_select_lex_unit::prepare():
    - now we don't call set_limit at the time of prepare, so the value  
      of unit->select_limit_cnt may be unknown here. Use sl->select_limit
      instead.
  st_select_lex_unit::exec():
    - cleanup
    - call set_limit explicitly as it has been moved out of 
     init_prepare_fake_select_lex.
sql/sql_update.cc:
  - setup_tables signature changed
2005-05-30 20:54:37 +04:00
unknown
6e79678dee Merge from 4.1
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
client/sql_string.cc:
  Auto merged
client/sql_string.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysys/my_open.c:
  Auto merged
mysys/raid.cc:
  Auto merged
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.cc:
  Auto merged
sql/item_uniq.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_analyse.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/opt_range.cc:
  Manual merge
sql/sql_parse.cc:
  Use select_lex pointer instead of lex->select_lex
sql/sql_repl.cc:
  Function moved to log.cc, fix made there instead
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-26 21:01:55 +02:00
unknown
549f56dc3d Cleanup during code review
Faster detection of wrong table names (like PRN) on windows


include/my_sys.h:
  Added check_if_legal_filename()
mysys/my_access.c:
  Added check_if_legal_filename()
  Set errno if my_access() fails
mysys/my_fopen.c:
  USe check_if_legal_filename() instead of my_access() to detect wrong file names on windows
mysys/my_open.c:
  USe check_if_legal_filename() instead of my_access() to detect wrong file names on windows
sql/sql_lex.cc:
  Portability fix
sql/sql_parse.cc:
  Simple cleanup
sql/sql_repl.cc:
  Cleanup during code review
2005-05-25 12:56:47 +03:00
unknown
5082d2d0b4 Fixed references to uninitialized memory
sql/sp.cc:
  Simpe fix to avoid reference to unallocated memory (only opened was needed, but I reset both to make things safer and simpler)
2005-05-19 04:48:22 +03:00
unknown
d93806ef7d Fix warnings from icc
Added BUILD scripts for icc
Fixed (one time) memory leak in grant handling


config/ac-macros/misc.m4:
  Remove warnings flags from icc when compiling with -Werror
configure.in:
  Remove warnings flags from icc when compiling with -Werror
extra/replace.c:
  Fix warnings from icc
include/my_dbug.h:
  Fix warnings from icc
sql/gen_lex_hash.cc:
  Fix warnings from icc
sql/mysql_priv.h:
  Add missing variables
sql/mysqld.cc:
  Fix warnings from icc:
  - made a lot of variables static
  - Removing some not used variables
  - Fixed wrong printf()
  - removed extern "C" from some functions
sql/spatial.h:
  Fix warnings from icc
sql/sql_acl.cc:
  Fixed memory leak
sql/sql_lex.cc:
  Fix warnings from icc
sql/sql_lex.h:
  Fix warnings from icc
2005-05-18 19:00:21 +03:00
unknown
e2d9929d2c BUG#9922 - INSERT SELECT with UNIONs allows concurrent INSERTs
don't set lex->lock_option=TL_READ in the parser for SELECT
2005-04-15 19:20:15 +02:00
unknown
daddf263e5 fixed mechanism of detection selection from table wich we update
(BUG##9398, BUG#8703)
fixed wrong join view detection in multi-delete which lead to server crash


mysql-test/r/lowercase_view.result:
  added new tests of updation and selection from the same table
mysql-test/r/view.result:
  added new tests of updation and selection from the same table
  added test of multidelete command over join view which lead to server crash
  test suite from bugs #9398 and #8703
mysql-test/t/lowercase_view.test:
  added new tests of updation and selection from the same table
mysql-test/t/view.test:
  added new tests of updation and selection from the same table
  added test of multidelete command over join view which lead to server crash
  test suite from bugs #9398 and #8703
sql/sql_base.cc:
  changed procedure of finding tables
sql/sql_class.cc:
  added derived table procession detection
sql/sql_class.h:
  added derived table procession detection
sql/sql_delete.cc:
  fixed detection of selection from table which update for multidelete
sql/sql_derived.cc:
  added derived table procession detection
sql/sql_lex.cc:
  added detection os SELECTs processed inside derived tables
  removed old mechanism of multidelete/multiupdate table duplication detection (which can't work with views)
sql/sql_lex.h:
  added detection os SELECTs processed inside derived tables
  removed old mechanism of multidelete/multiupdate table duplication detection (which can't work with views)
sql/sql_parse.cc:
  removed wrong test of join view (for multidelete in can be not only first table)
sql/sql_prepare.cc:
  added detection os SELECTs processed inside derived tables (reset it for reusing in PS/SP)
sql/sql_select.cc:
  added detection os SELECTs processed inside derived tables
sql/sql_update.cc:
  fixed detection of selection from table which update for multiupdate
2005-03-28 15:13:31 +03:00
unknown
b1095fb0cd Manual merge SP-locking improvements patch with current tree.
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_rcontext.cc:
  Auto merged
sql/sql_acl.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_prepare.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/sp_head.cc:
  Manual merge.
sql/sql_class.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2005-03-04 17:46:45 +03:00
unknown
ac9f68b9fa Better approach for prelocking of tables for stored routines execution
and some SP-related cleanups.

- We don't have separate stage for calculation of list of tables
  to be prelocked and doing implicit LOCK/UNLOCK any more.
  Instead we calculate this list at open_tables() and do implicit
  LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
  Also now we support cases when same table (with same alias) is
  used several times in the same query in SP.

- Cleaned up execution of SP. Moved all common code which handles
  LEX and does preparations before statement execution or complex
  expression evaluation to auxilary sp_lex_keeper class. Now 
  all statements in SP (and corresponding instructions) that
  evaluate expression which can contain subquery have their
  own LEX.


mysql-test/r/lock.result:
  Replaced wrong error code with the correct one after fixing bug in
  SP-locking.
mysql-test/r/mysqldump.result:
  Added dropping of view which is used in test to its beginning.
mysql-test/r/sp.result:
  Added tests for improved SP-locking.
  Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
  (Until Monty will allow to open mysql.proc under LOCK TABLES without
  mentioning it in lock list).
  Replaced wrong results of test for bug #5240 with correct results after
  fixing bug in handling of cursors.
mysql-test/t/lock.test:
  Replaced wrong error code with the correct one after fixing bug in
  SP-locking.
mysql-test/t/mysqldump.test:
  Added dropping of view which is used in test to its beginning.
mysql-test/t/sp.test:
  Added tests for improved SP-locking.
  Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
  (Until Monty will allow to open mysql.proc under LOCK TABLES without
  mentioning it in lock list).
  Removed test for bug #1654 since we already test exactly this function
  in one of SP-locking tests.
  Removed comment about cursor's wrong behavior in test for bug #5240
  after fixing bug which was its cause.
sql/item_func.cc:
  Removed comment which is no longer true.
sql/mysql_priv.h:
  Changed open_tables() signature.
  Now its 2nd parameter is in/out since it can add elements to table list.
sql/sp.cc:
  sp_find_procedure():
   Added one more parameter which enforces cache only lookup.
  
  sp_merge_hash():
   Now uses its return value to indicate that first of two hashes changed
   as result of merge.
  
  sp_cache_routines():
   This function caches all stored routines used in query now.
sql/sp.h:
  - sp_find_procedure() now has one more parameter which enforces cache only
    lookup.
  - sp_merge_hash() now uses its return value to indicate that first of two
    hashes changed as result of merge.
  - sp_cache_routines() caches all stored routines now. So it does not need
    third argument any more.
sql/sp_head.cc:
  sp_head::sp_head():
   Added initialization of new m_spfuns and m_spprocs members.
  
  sp_head::execute():
   Let us save/restore part of thread context which can be damaged by
   execution of instructions.
  sp_head::execute_function()/execute_procedure():
   Now it is responsibility of caller to close tables used in
   subqueries which are passed as routine parameters.
  
  sp_head::restore_lex():
   Let us accumulate information about routines used by this one
   in new m_spfuns, m_spprocs hashes.
  
  sp_lex_keeper::reset_lex_and_exec_core()
   Main method of new auxilary sp_lex_keeper class to which instructions 
   delegate responsibility for handling LEX and preparations before
   executing statement or calculating complex expression.
  
  Since all instructions which calculate complex expression or execute
  command now use sp_lex_keeper they have to implement
  sp_instr::exec_core() method. Most of instruction specific logic
  has moved from sp_instr::execute() to this new method.
  
  Removed sp_instr_set_user_var class which is no longer used, because
  nowdays we allow execution of statements in stored functions and
  triggers.
  
  sp_merge_table_list() became sp_head::merge_table_list() method. It
  also treats sp_head::m_sptabs as multi-set of tables now.
  
  sp_hash_to_table_list() became sp_head::add_used_tables_to_table_list().
  It takes into account that sp_head::m_sptabs is multi-set and allocates
  object into persistent arena of PS.
  
  Removed sp_merge_table_hash(), sp_open_and_lock_tables(),
  sp_unlock_tables(), sp_merge_routine_tables() methods since they are not
  used by new prelocking mechanism.
  
  Added sp_add_sp_tables_to_table_list() which serves for adding tables needed
  by routines used in query to the query table list for prelocking.
sql/sp_head.h:
  class sp_head:
  - Added m_spfuns, m_spprocs members for storing names of routines used
    by this routine.
  - Added add_used_tables_to_table_list() method which allows to add
    tables needed by this routine to query's table list.
  - Converted sp_merge_table_list() to sp_head::merge_table_list() method.
  - Changed semantics of THD::m_sptabs. Now it is multi-set which contains
    only tables which are used by this routine and not routines that are
    called from this one.
  
  Removed sp_merge_routine_tables(), sp_merge_table_hash(),
  sp_open_and_lock_tables(), sp_unlock_tables() calls since they are not
  used for our prelocking list calculation.
  
  Added auxilary sp_lex_keeper class to which instructions delegate
  responsibility for handling LEX and preparations before executing
  statement or calculating complex expression. This class uses
  new sp_instr::exec_core() method which is responsible for executing
  instruction's core function after all preparations were made.
  
  All instructions which hold and calculate complex expression now have
  their own LEX (by aggregating sp_lex_keeper instance). sp_instr_stmt
  now uses sp_lex_keeper too.
  
  Removed sp_instr_set_user_var class which is no longer used, because
  nowdays we allow execution of statements in stored functions and
  triggers.
sql/sp_rcontext.cc:
  Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
sql/sp_rcontext.h:
  Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
sql/sql_acl.cc:
  acl_init(), grant_init():
    Now we use simple_open_n_lock_tables() instead of explicit
    calls to open_tables() and mysql_lock_tables().
sql/sql_base.cc:
  Implemented support for execution of statements in "prelocked" mode.
  
  When we have statement which uses stored routines explicitly or
  implicitly (via views or triggers) we have to open and lock all tables
  for these routines at the same time as tables for the main statement.
  In fact we have to do implicit LOCK TABLES at the begining of such
  statement and implict UNLOCK TABLES at its end. We call such mode
  "prelocked".
  
  When open_tables() is called for the statement tables which are needed
  for execution of routines used by it are added to its tables list
  (this process also caches all routines used). Implicit use of routines
  is discovered when we open view or table with trigger and apropriate
  tables are added to the table list at this moment. Statement which has
  such extra tables in its list (well actually any that uses functions)
  is marked as requiring prelocked mode for its execution.
  
  When lock_tables() sees such statement it will issue implicit LOCK TABLES
  for this extended table list instead of doing usual locking, it will also
  set THD::prelocked_mode to indicate that we are in prelocked mode.
  
  When open_tables()/lock_tables() are called for statement of stored
  routine (substatement), they notice that we are running in prelocked mode
  and use one of prelocked tables from those that are not used by upper
  levels of execution.
  
  close_thread_tables() for substatement won't really close tables used
  but will mark them as free for reuse instead.
  
  Finally when close_thread_tables() is called for the main statement it
  really unlocks and closes all tables used.
  
  Everything will work even if one uses such statement under real LOCK
  TABLES (we are simply not doing implicit LOCK/UNLOCK in this case).
sql/sql_class.cc:
  Added initialization of THD::prelocked_mode member.
sql/sql_class.h:
  - Added prelocked_mode_type enum and THD::prelocked_mode member
    which are used for indication whenever "prelocked mode" is on 
    (i.e. that statement uses stored routines and is executed under
     implicit LOCK TABLES).
  - Removed THD::shortcut_make_view which is no longer needed.
    We use TABLE_LIST::prelocking_placeholder for the same purprose
    now.
sql/sql_handler.cc:
  Changed open_tables() invocation.
  Now its 2nd parameter is in/out since it can add elements to table list.
sql/sql_lex.cc:
  lex_start():
    Added initialization of LEX::query_tables_own_last.
    Unused LEX::sptabs member was removed.
  st_lex::unlink_first_table()/link_first_table_back():
    We should update LEX::query_tables_last properly if table list
    contains(ed) only one element.
sql/sql_lex.h:
  LEX:
  - Removed sptabs member since it is no longer used.
  - Added query_tables_own_last member, which if non-0 indicates that
    statement requires prelocking (implicit LOCK TABLES) for its execution
    and points to last own element in query table list. If it is zero
    then this query does not need prelocking.
  - Added requires_prelocking(), mark_as_requiring_prelocking(),
    first_not_own_table() inline methods to incapsulate and simplify
    usage of this new member.
sql/sql_parse.cc:
  dispatch_command():
    To properly leave prelocked mode when needed we should call
    close_thread_tables() even if there are no open tables.
  mysql_execute_command():
  - Removed part of function which were responsible for doing implicit
    LOCK TABLES before statement execution if statement used stored 
    routines (and doing UNLOCK TABLES at the end).
    Now we do all this in open_tables()/lock_tables()/close_thread_tables()
    instead.
  - It is also sensible to reset errors before execution of statement
    which uses routines.
  - SQLCOM_DO, SQLCOM_SET_OPTION, SQLCOM_CALL
    We should always try to open tables because even if statement has empty
    table list, it can call routines using tables, which should be preopened
    before statement execution.
  - SQLCOM_CALL
    We should not look up routine called in mysql.proc, since it should be
    already cached by this moment by open_tables() call.
  - SQLCOM_LOCK_TABLES
    it is better to use simple_open_n_lock_tables() since we want to avoid
    materialization of derived tables for this command.
sql/sql_prepare.cc:
  mysql_test_update():
    Changed open_tables() invocations. Now its 2nd parameter is in/out
    since it can add elements to table list.
  check_prepared_statement():
    Since now we cache all routines used by statement in open_tables() we 
    don't need to do it explicitly.
  mysql_stmt_prepare():
    Now we should call close_thread_tables() when THD::lex points to the
    LEX of statement which opened tables.
  reset_stmt_for_execute():
    Commented why we are resetting all tables in table list.
sql/sql_trigger.h:
  Table_triggers_list::process_triggers():
    We should surpress sending of ok packet when we are calling trigger's
    routine, since now we allow statements in them.
sql/sql_update.cc:
  Changed open_tables() invocations.
  Now its 2nd parameter is in/out since it can add elements to table list.
sql/sql_view.cc:
  mysql_make_view():
  - Removed handling of routines used in view. Instead we add tables which
    are needed for their execution to statement's table list in 
    open_tables().
  - Now we use TABLE_LIST::prelocking_placeholder instead of 
    THD::shortcut_make_view for indicating that view is opened
    only to discover which tables and routines it uses (this happens
    when we build extended table list for prelocking). Also now we try
    to avoid to modify main LEX in this case (except of its table list).
  - Corrected small error we added tables to the table list of the main
    LEX without updating its query_tables_last member properly.
sql/sql_yacc.yy:
  Now each expression which is used in SP statements and can contain
  subquery has its own LEX. This LEX is stored in corresponding sp_instr
  object and used along with Item tree for expression calculation.
  
  We don't need sp_instr_set_user_var() anymore since now we allow
  execution of statements in stored functions and triggers.
sql/table.h:
  Added TABLE_LIST::prelocking_placeholder member for distinguishing
  elements of table list which does not belong to the statement itself
  and added there only for prelocking (as they are to be used by routines
  called by this statement).
sql/tztime.cc:
  my_tz_init():
    Now we use more simplier simple_open_n_lock_tables() call instead of 
    open_tables()/lock_tables() pair.
2005-03-04 16:35:28 +03:00
unknown
0c88d48d50 After merge fix.
sql/sql_lex.cc:
  No need to change options here.
2005-03-03 15:37:14 +04:00
unknown
61a88ff0a1 Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-xa


configure.in:
  Auto merged
mysql-test/r/drop_temp_table.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-02-18 12:02:46 +01:00
unknown
90cc9c6bb6 Merge
BitKeeper/triggers/post-commit:
  Auto merged
mysql-test/r/lowercase_table2.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/system_mysql_db.result:
  Update results
scripts/mysql_create_system_tables.sh:
  Merge fix for Bug #7617, making enum fields in grant tables
  case-insensitive.
scripts/mysql_fix_privilege_tables.sql:
  Merge fix for Bug #7617, and fix additional enum/set columns.
sql/sql_acl.cc:
  Hand-merge due to whitespace change
sql/sql_lex.cc:
  Hand-merge bug fix.
2005-02-17 16:16:58 -08:00
unknown
7aa1d93fd4 Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-xa


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
sql/ha_innodb.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/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-02-17 14:00:44 +01:00
unknown
53944e1c22 Fix for bug#7915: crash,JOIN VIEW, subquery, SELECT .. FROM INFORMATION_SCHEMA.COLUMNS 2005-02-16 13:00:03 +03:00
unknown
2d8b51991c manually merged
client/mysqlbinlog.cc:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
mysql-test/include/varchar.inc:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/mysqlbinlog2.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/user_var.test:
  Auto merged
mysys/hash.c:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  ul
mysql-test/r/drop_temp_table.result:
  ul
mysql-test/r/innodb.result:
  ul
mysql-test/r/insert_select.result:
  ul
mysql-test/r/mix_innodb_myisam_binlog.result:
  ul
mysql-test/r/rpl_change_master.result:
  ul
mysql-test/r/rpl_charset.result:
  ul
mysql-test/r/rpl_error_ignored_table.result:
  ul
mysql-test/r/rpl_flush_log_loop.result:
  ul
mysql-test/r/rpl_flush_tables.result:
  ul
mysql-test/r/rpl_loaddata.result:
  ul
mysql-test/r/rpl_loaddata_rule_m.result:
  ul
mysql-test/r/rpl_log.result:
  ul
mysql-test/r/rpl_max_relay_size.result:
  ul
mysql-test/r/rpl_relayrotate.result:
  ul
mysql-test/r/rpl_replicate_do.result:
  ul
mysql-test/r/rpl_rotate_logs.result:
  ul
mysql-test/r/rpl_temporary.result:
  ul
mysql-test/r/rpl_timezone.result:
  ul
mysql-test/r/rpl_until.result:
  ul
mysql-test/r/rpl_user_variables.result:
  ul
mysql-test/r/user_var.result:
  ul
2005-02-14 21:50:09 +01:00
unknown
f4eef98e6e Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean


mysql-test/r/view.result:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-02-09 02:54:08 +04:00
unknown
91db48e35a Precision Math implementation
BitKeeper/etc/ignore:
  Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
2005-02-09 02:50:45 +04:00
unknown
3f24932124 WL#2130: Table locking for stored FUNCTIONs
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.


mysql-test/r/information_schema.result:
  Updated result for WL#2130.
mysql-test/r/lock.result:
  Updated result for WL#2130.
mysql-test/r/sp-error.result:
  Updated result for WL#2130.
mysql-test/r/sp.result:
  Updated result for WL#2130.
mysql-test/r/view.result:
  Updated result for WL#2130.
mysql-test/t/information_schema.test:
  Disabled one test case due to a bug involving LOCK TABLES,
  which shows up with WL#2130.
mysql-test/t/lock.test:
  New error message with WL#2130. This change is under debate and might change
  in the future, but will do for now.
mysql-test/t/sp-error.test:
  Updated for WL#2130. Some tests are voided when table access does work from
  functions.
mysql-test/t/sp.test:
  Updated for WL#2130.
mysql-test/t/view.test:
  Updated for WL#2130.
sql/item_func.cc:
  We now have to set net.no_send_ok for functions too, with WL#2130.
sql/share/errmsg.txt:
  Reused an error code since the old use was voided by WL#2130, but a new
  one was needed instead (similar, but more specific restriction).
sql/sp.cc:
  Fixed error handling and collection of used tables for WL#2130.
sql/sp.h:
  Fixed error handling and collection of used tables for WL#2130.
sql/sp_head.cc:
  Added support functions for collecting and merging hash tables and lists
  of used tables from SPs and substatements, for WL#2130.
sql/sp_head.h:
  Added support functions for collecting and merging hash tables and lists
  of used tables from SPs and substatements, for WL#2130.
sql/sql_base.cc:
  Changed the way table->query_id is tested and set during with locked tables
  in effect. This makes some SP test cases work with WL#2130, but has a side
  effect on some error cases with explicit LOCK TABLES. It's still debated if
  this is the correct way, so it might change.
sql/sql_class.h:
  Added flags for circumventing some interference between WL#2130 and mysql_make_view().
sql/sql_derived.cc:
  Added some missing initializations. (Potential bugs.)
sql/sql_lex.cc:
  Clear the new hash tables for WL#2130.
sql/sql_lex.h:
  Added hash tables for procedures and tables too (as for functions), for WL#2130.
sql/sql_parse.cc:
  WL#2130: Make table accesses from stored functions work by adding an implicit
  LOCK TABLES around (most) executed statements. To do this, we have to go through
  a loop where we collect all SPs and tables in mysql_execute_statement.
sql/sql_prepare.cc:
  Cache both functions and procedures for WL#2130.
sql/sql_show.cc:
  Added some missing initializations. (Potential bugs.)
sql/sql_view.cc:
  Shortcut mysql_make_view() if thd->shortcut_make_view is true during
  the pre-open phase for collecting tables in WL#2130. Otherwise, the
  similar mechanism here causes interference.
sql/sql_yacc.yy:
  For WL#2130, added caching of procedures and disallowed LOCK/UNLOCK TABLES in SPs.
2005-02-08 20:52:50 +01:00
unknown
7814366660 Merge mysql.com:/home/jimw/my/mysql-5.0-6368
into mysql.com:/home/jimw/my/mysql-5.0-clean


sql/sql_lex.cc:
  Auto merged
2005-02-07 12:20:08 -08:00
unknown
5cf29b3b60 Fixed bug detected by sp-tests
Cleanup during reviews of new pushed code


BUILD/compile-pentium-debug-max:
  Use --debug=full as default
BUILD/compile-pentium-debug:
  Use --debug=full as default
mysys/my_alloc.c:
  More debugging
sql/item_func.cc:
  Cleanup new code
  Don't call insert_id() for last_insert_id(value) to avoid side effects
sql/item_subselect.cc:
  Fixed DBUG output
sql/sp_head.cc:
  Simple cleanup
sql/sql_lex.cc:
  Moved usage of arguments first in lex_start to make their usage clearer
  Remove sl->expr_list.deleete_elements() becasue:
  - It didn't do anything (delete_elements on a list of list is a no-op operation)
  - The deleted for loop used SELECT_LEX elements that was allocated in mysql_new_select() in sp-head, but freed
  when sphead->mem_root was freed. (delete sphead doesn't remove used SELECT_LEX elements from the global all_selects_list)
sql/sql_parse.cc:
  More DBUG entries
2005-02-05 16:05:46 +02:00
unknown
3443fdf954 Handle backslashes correctly in strings that also have doubled quotes when
we are using the NO_BACKSLASH_ESCAPES SQL mode. (Bug #6368)


mysql-test/t/sql_mode.test:
  Add regression test for Bug #6368
mysql-test/r/sql_mode.result:
  Add new results
sql/sql_lex.cc:
  Handle NO_BACKSLASH_ESCAPES mode when copying string that
  also has escapes due to doubled quotes
2005-02-03 16:14:02 -08:00
unknown
d41473f3c6 Fix error in parsing string literals containing a backslash followed
by a multi-byte character with a second byte of 0x5c (\). (Bug #8903)


sql/sql_lex.cc:
  Fix lex error when multi-byte character containing 0x5c (\) follows a
  backslash
mysql-test/t/ctype_sjis.test:
  Add regression test for Bug #8303
mysql-test/r/ctype_sjis.result:
  Add test results
2005-02-03 16:07:32 -08:00
unknown
4f1cbb6031 4.1 -> 5.0 merge
BitKeeper/etc/logging_ok:
  auto-union
Build-tools/Do-compile:
  Auto merged
client/mysqladmin.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
extra/perror.c:
  Auto merged
innobase/buf/buf0rea.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/include/rem0rec.ic:
  Auto merged
innobase/include/univ.i:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/ut/ut0ut.c:
  Auto merged
mysql-test/r/derived.result:
  Auto merged
mysql-test/r/func_str.result:
  Simple merge
mysql-test/r/subselect.result:
  Automatic merge
mysql-test/t/derived.test:
  Automatic merge
mysql-test/t/func_str.test:
  Simple merge
mysql-test/t/subselect.test:
  Automatic merge
mysys/my_handler.c:
  Automatic merge
ndb/src/kernel/blocks/backup/Backup.cpp:
  Automatic merge
scripts/make_binary_distribution.sh:
  Automatic merge
scripts/mysql_install_db.sh:
  Automatic merge
sql/examples/ha_archive.cc:
  Simple merge
sql/ha_innodb.cc:
  Automatic merge
sql/item.cc:
  Merge
sql/item_cmpfunc.h:
  Automatic merge
sql/item_func.cc:
  Simple merge
sql/item_func.h:
  Automatic merge
sql/item_strfunc.cc:
  Automatic merge
sql/item_strfunc.h:
  Automatic merge
sql/item_subselect.cc:
  Automatic merge
sql/mysqld.cc:
  Automatic merge
sql/set_var.cc:
  Automatic merge
sql/sql_base.cc:
  Automatic merge
sql/sql_class.cc:
  Automatic merge
sql/sql_class.h:
  Automatic merge
sql/sql_lex.cc:
  Automatic merge
sql/sql_lex.h:
  Automatic merge
sql/sql_parse.cc:
  Automatic merge
sql/sql_select.cc:
  Automatic merge
sql/sql_table.cc:
  Automatic merge
sql/sql_update.cc:
  Simple merge
strings/ctype-big5.c:
  Automatic merge
strings/ctype-bin.c:
  Automatic merge
strings/ctype-gbk.c:
  Automatic merge
strings/ctype-latin1.c:
  Automatic merge
strings/ctype-mb.c:
  Automatic merge
strings/ctype-simple.c:
  Automatic merge
strings/ctype-sjis.c:
  Automatic merge
strings/ctype-tis620.c:
  Automatic merge
strings/ctype-ucs2.c:
  Automatic merge
strings/ctype-utf8.c:
  Automatic merge
vio/viosocket.c:
  Automatic merge
vio/viossl.c:
  Automatic merge
2005-02-03 13:18:30 +02:00
unknown
9fe76ad98b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1


sql/item.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-01 11:05:29 +02:00
unknown
bf89dc063a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-tzbug


sql/item_timefunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
2005-01-28 09:32:43 +03:00
unknown
20bd0bd6fd Fix for bug #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ() function
does not work well together". Now using simplier and more correct
implementation of st_lex::unlink_first_table()/link_first_table_back() 
(It also nicely handles case when global table list is created because
of implictly used time zone tables). (2nd attempt)

Fix for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index
column". Implemented new approach for caching objects for constant
time zone arguments. Now instead of determining whenever these arguments
are constants and performing time zone lookup at fix_fields() stage, we
do it on first get_date() invocation.

Cleanup of global @@time_zone variable handling.


mysql-test/r/timezone2.result:
  Added test for bugs #7705 "CONVERT_TZ() crashes with subquery/WHERE on
  index column" and #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ()
  function does not work well together".
mysql-test/t/timezone2.test:
  Added test for bugs #7705 "CONVERT_TZ() crashes with subquery/WHERE on
  index column" and #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ()
  function does not work well together".
sql/item_timefunc.cc:
  Item_func_convert_tz():
    New approach for caching objects for constant time zone arguments.
    Now instead of determining whenever these arguments are constants
    and performing time zone lookup at fix_fields() stage, we do it
    on first get_date() invocation. This works better in cases when 
    const_item() for these arguments returns true only on get_date()
    stage but not on fix_fields() stage (e.g. this happens in quries
    with joins or derived tables).
sql/item_timefunc.h:
  Item_func_convert_tz():
    Added from_tz_cached/to_tz_cached members indicating whenever we
    already have Time_zone object representing one of constant time zone
    arguments.
sql/set_var.cc:
  Cleaned up global @@time_zone variable handling. Now we use proper
  locking when we are setting or reading its value.
sql/set_var.h:
  Removed declaration of sys_var_thd_time_zone::get_tz_ptr() method, which
  no longer used.
sql/sql_lex.cc:
  st_lex::unlink_first_table(), st_lex::link_first_table_back():
   Simplify implementation according to Monty's suggestion.
   Instead doing something special if global and local table lists
   are the same, we simply save/restore pointers to first elements
   of both global and local lists (which works even when this lists
   are the same!). This handles nicely the case when we have separate
   global table list becuase time zone tables are implicitly used.
sql/tztime.cc:
  Backport of Monty's fixes from 5.0, which give us nicer error messages
  if we haven't found time zone with such name or its description.
2005-01-26 22:25:02 +03:00
unknown
a82fd1eaec merged
BitKeeper/deleted/.del-sort.c~e2e56b5a37ce86f4:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
myisam/ft_boolean_search.c:
  Auto merged
myisam/mi_packrec.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
tests/client_test.c:
  Auto merged
2005-01-24 19:41:42 +01:00
unknown
8bdb500105 fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
unknown
7aecbab85c Merge with global tree
BitKeeper/etc/logging_ok:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/t/order_by.test:
  Merge
sql/sql_lex.cc:
  Merge
sql/sql_yacc.yy:
  Use local copy
2005-01-18 04:03:26 +02:00
unknown
1aa2d73da5 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1


sql/sql_lex.cc:
  Auto merged
2005-01-18 01:15:02 +02:00
unknown
f6f90e7dc1 Bug #7966 query cache doesn't work properly with batch statements
sql_lex.cc:
  Set query to not cacheable if we are using multistatements and there are multiple statements in this query


sql/sql_lex.cc:
  Set query to not cacheable if we are using multistatements and there are multiple statements in this query
2005-01-17 13:40:36 -06:00
unknown
3c9170ed17 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1


sql/sql_lex.cc:
  Auto merged
2005-01-16 18:36:50 +02:00
unknown
7f586778f3 postreview changes
sql/sql_lex.cc:
  layout fixed
2005-01-16 18:36:13 +02:00
unknown
88bd301d36 XA (not completely polished out yet)
include/my_pthread.h:
  cleanup. don't use gcc extensions
innobase/include/trx0sys.ic:
  Jan's fix for innobase_xa_prepare
innobase/read/read0read.c:
  Jan's fix for innobase_xa_prepare
innobase/trx/trx0trx.c:
  Jan's fix for innobase_xa_prepare
mysql-test/include/varchar.inc:
  test fix
mysql-test/r/ctype_ucs.result:
  new log event - all binlog positions are changed :(
mysql-test/r/drop_temp_table.result:
  new log event - all binlog positions are changed :(
mysql-test/r/insert_select.result:
  new log event - all binlog positions are changed :(
mysql-test/r/mix_innodb_myisam_binlog.result:
  new log event - all binlog positions are changed :(
mysql-test/r/myisam.result:
  test fix
mysql-test/r/rpl000015.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_change_master.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_charset.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_error_ignored_table.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_flush_log_loop.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_flush_tables.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_loaddata.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_loaddata_rule_m.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_loaddata_rule_s.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_log.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_log_pos.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_max_relay_size.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_relayrotate.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_replicate_do.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_reset_slave.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_rotate_logs.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_server_id1.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_server_id2.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_temporary.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_timezone.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_until.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_user_variables.result:
  new log event - all binlog positions are changed :(
mysql-test/r/user_var.result:
  new log event - all binlog positions are changed :(
mysql-test/t/ctype_ucs.test:
  new log event - all binlog positions are changed :(
mysql-test/t/mix_innodb_myisam_binlog.test:
  new log event - all binlog positions are changed :(
mysql-test/t/mysqlbinlog.test:
  new log event - all binlog positions are changed :(
mysql-test/t/mysqlbinlog2.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_charset.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_error_ignored_table.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_loaddata_rule_m.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_loaddata_rule_s.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_log.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_log_pos.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_user_variables.test:
  new log event - all binlog positions are changed :(
mysql-test/t/user_var.test:
  new log event - all binlog positions are changed :(
mysys/hash.c:
  typo fixed
sql/ha_berkeley.cc:
  handlerton framework
sql/ha_berkeley.h:
  handlerton framework
sql/ha_innodb.cc:
  handlerton framework
sql/ha_innodb.h:
  handlerton framework
sql/handler.cc:
  new transaction handling, handlerton framework, two-phase commit, XA support
sql/handler.h:
  new transaction handling, handlerton framework, two-phase commit, XA support
sql/lex.h:
  XA commands
sql/log.cc:
  new transaction handling, handlerton framework, two-phase commit,
  XA support, tc-logging, TC_LOG_MMAP class
sql/log_event.cc:
  Xid_log_event
sql/log_event.h:
  Xid_log_event, LOG_EVENT_BINLOG_CLOSED_F flag
sql/mysql_priv.h:
  wrapper for query_id++
sql/mysqld.cc:
  new command-line options --log-tc, --log-tc-size, --tc-heuristic-recover,
  new status variables Tc_log_page_size, Tc_log_max_pages_used, Tc_log_page_waits.
  init/stop tc logging
sql/set_var.h:
  warning fixed
sql/share/errmsg.txt:
  XA error messages
sql/sp_head.cc:
  s/query_id++/next_query_id()/
sql/sql_base.cc:
  typo fixed. new transaction handling.
sql/sql_class.cc:
  cleanup of THD.transaction
sql/sql_class.h:
  TC_LOG classes, new status variables, new savepoint handling, XA support
sql/sql_insert.cc:
  comments
sql/sql_lex.cc:
  s/found_colon/found_semicolon/
sql/sql_lex.h:
  SQLCOM_XA_xxx, XA related changes in Lex
sql/sql_parse.cc:
  cleanup, XA commands, new savepoint handling
sql/sql_repl.cc:
  two functions moved to log.cc
sql/sql_repl.h:
  two functions moved to log.cc
sql/sql_trigger.cc:
  s/lex.name_and_length/lex.ident/
sql/sql_yacc.yy:
  XA commands, cleanup
2005-01-16 13:16:23 +01:00
unknown
e7b38aa7bd Fixes for two compile-time failures.
ndb/src/common/transporter/TransporterRegistry.cpp:
  make it compile with -ansi -pedantic
sql/sql_lex.cc:
  a fix for compile-time failure
2005-01-11 15:32:23 +03:00
unknown
489bd55741 error of parsing can occur in any SELECT, so all SELECTs have to be checked 2005-01-11 11:53:39 +02:00
unknown
73c9909750 Merge with 4.1 tree to get fix for INSERT IGNORE ... ON DUPLICATE KEY
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
innobase/log/log0recv.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/r/cast.result:
  Auto merged
mysql-test/r/drop.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/drop.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
ndb/include/ndb_global.h.in:
  Auto merged
ndb/src/kernel/blocks/suma/Suma.cpp:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/time.cc:
  Auto merged
innobase/row/row0upd.c:
  Trivial merge
mysql-test/t/func_concat.test:
  Keep local code
mysql-test/t/multi_update.test:
  auto merge
sql/ha_ndbcluster.cc:
  manual merge
sql/item_timefunc.cc:
  manual merge
sql/mysql_priv.h:
  manual merge
sql/sql_class.h:
  manual merge
sql/sql_delete.cc:
  manual merge
sql/sql_insert.cc:
  manual merge
sql/sql_lex.cc:
  manual merge
sql/sql_lex.h:
  manual merge
sql/sql_load.cc:
  manual merge
sql/sql_parse.cc:
  manual merge
sql/sql_table.cc:
  manual merge
sql/sql_update.cc:
  manual merge
2005-01-03 23:04:52 +02:00
unknown
2419fa2684 Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
This allows use to use INSERT IGNORE ... ON DUPLICATE ...


mysql-test/r/drop.result:
  safety fix
mysql-test/t/drop.test:
  safety fix
mysql-test/t/multi_update.test:
  ensure we cover all possible errors
sql/log_event.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/log_event.h:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/mysql_priv.h:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_class.h:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_delete.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_insert.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.h:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_load.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_parse.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.h:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_select.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_table.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_union.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_update.cc:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_yacc.yy:
  Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
2004-12-31 12:04:35 +02:00
unknown
12a215b083 Merge with global tree
BitKeeper/etc/logging_ok:
  auto-union
client/mysqltest.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
libmysql/errmsg.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.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_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.h:
  Auto merged
2004-12-31 00:50:30 +02:00
unknown
2e8d13c73e After merge fixes
config/ac-macros/character_sets.m4:
  Added latin1_spanish_ci
dbug/dbug_analyze.c:
  Remove compiler warnings
include/my_handler.h:
  Reorder structure arguments to be more optimal
innobase/dict/dict0load.c:
  Fixed wrong define tag (for MySQL 5.0)
innobase/fil/fil0fil.c:
  Fixed compiler warning
innobase/os/os0file.c:
  Fixed compiler warning
myisam/ft_boolean_search.c:
  Fixed compiler warning
myisam/ft_static.c:
  Update to use new HA_KEYSEG structure
myisam/mi_open.c:
  Simple optimization
myisammrg/myrg_static.c:
  Removed compiler warning
mysql-test/r/grant.result:
  Update results after merge
mysql-test/r/index_merge.result:
  Update results after merge
mysql-test/r/information_schema_inno.result:
  Add missing drop table
mysql-test/r/lowercase_table.result:
  safety fix
mysql-test/r/multi_update.result:
  safety fix
mysql-test/r/ps_1general.result:
  safety fix
mysql-test/r/ps_2myisam.result:
  Update results after merge
  (set is not anymore of binary type)
mysql-test/r/ps_3innodb.result:
  Update results after merge
mysql-test/r/ps_4heap.result:
  Update results after merge
mysql-test/r/ps_5merge.result:
  Update results after merge
mysql-test/r/ps_6bdb.result:
  Update results after merge
mysql-test/r/show_check.result:
  Update results after merge
mysql-test/r/subselect.result:
  Update results after merge
  (added missing quotes)
mysql-test/r/timezone2.result:
  Update results after merge
mysql-test/r/view.result:
  Update results after merge
  (note that INSERT IGNORE will work again after next merge from 4.1)
mysql-test/t/derived.test:
  Removed empty line
mysql-test/t/grant.test:
  Update results after merge
mysql-test/t/information_schema_inno.test:
  added missing drop table
mysql-test/t/lowercase_table.test:
  safety fix
mysql-test/t/multi_update.test:
  safety fix
mysql-test/t/ps_1general.test:
  safety fix
mysql-test/t/view.test:
  update error codes after merge
ndb/src/mgmsrv/main.cpp:
  after merge fix
ndb/tools/ndb_test_platform.cpp:
  removed compiler warnings
regex/main.c:
  remove compiler warnings
sql/field.cc:
  Remove compiler warning
sql/gen_lex_hash.cc:
  Added DBUG support
sql/ha_myisam.cc:
  Removed warning from valgrind
sql/ha_ndbcluster.cc:
  Remove compiler warning
sql/item_cmpfunc.cc:
  Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element
sql/mysqld.cc:
  Remove compiler warning
sql/sql_acl.cc:
  More debugging
sql/sql_lex.cc:
  Remove unnecessary 'else'
sql/sql_parse.cc:
  After merge fixes
  Simplify reset of thd->server_status for SQLCOM_CALL
sql/sql_prepare.cc:
  After merge fixes
  Removed possible core dump in mysql_stmt_fetch()
sql/sql_update.cc:
  After merge fixes (together with Sanja)
strings/ctype-czech.c:
  Remove compiler warning
strings/ctype-ucs2.c:
  Remove compiler warning
strings/ctype-win1250ch.c:
  Remove compiler warning
strings/xml.c:
  Remove compiler warning
tests/client_test.c:
  Fix test to work with 5.0
vio/test-sslserver.c:
  Portability fix
2004-12-31 00:44:00 +02:00
unknown
bb2d3eaa30 Merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
Build-tools/Do-compile:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
client/Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_base.h:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/dict/dict0load.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/srv/srv0srv.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_rnext_same.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_ujis.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/metadata.result:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/insert_update.result:
  Auto merged
mysql-test/r/timezone2.result:
  Auto merged
mysql-test/r/type_enum.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
ndb/include/ndbapi/NdbConnection.hpp:
  Auto merged
ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
ndb/src/common/util/version.c:
  Auto merged
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp:
  Auto merged
ndb/src/kernel/blocks/dbacc/Makefile.am:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhInit.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Auto merged
ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
ndb/src/ndbapi/NdbConnection.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionary.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Auto merged
ndb/src/ndbapi/NdbOperationExec.cpp:
  Auto merged
ndb/src/ndbapi/NdbScanOperation.cpp:
  Auto merged
ndb/test/ndbapi/Makefile.am:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_create.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_row.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/password.c:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_do.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/strfunc.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.h:
  Auto merged
sql/udf_example.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
Makefile.am:
  Simple merge
client/mysqldump.c:
  Simple merge
configure.in:
  Simple merge
libmysqld/lib_sql.cc:
  Automatic merge
mysql-test/r/func_str.result:
  Automatic merge
mysql-test/r/grant.result:
  simple merge
mysql-test/r/multi_update.result:
  automatc merge
mysql-test/r/ps.result:
  automatic merge
mysql-test/r/ps_2myisam.result:
  Automatic merge
mysql-test/r/ps_3innodb.result:
  Automatic merge
mysql-test/r/ps_4heap.result:
  Automatic merge
mysql-test/r/ps_5merge.result:
  Automatic merge
mysql-test/r/ps_6bdb.result:
  Automatic merge
mysql-test/r/ps_7ndb.result:
  Automatic merge
mysql-test/r/show_check.result:
  Automatic merge
mysql-test/r/subselect.result:
  Automatic merge
mysql-test/t/grant.test:
  Automatic merge
mysql-test/t/multi_update.test:
  Automatic merge
mysql-test/t/ps.test:
  Automatic merge
mysql-test/t/show_check.test:
  Automatic merge
ndb/docs/wl2077.txt:
  merge
ndb/src/mgmsrv/main.cpp:
  merge
scripts/mysql_fix_privilege_tables.sh:
  merge
sql/item.cc:
  Merge (difficult)
sql/item.h:
  simple merge
sql/item_cmpfunc.h:
  Automatic merge
sql/item_subselect.cc:
  Simple merge
sql/item_subselect.h:
  Automatic merge
sql/mysql_priv.h:
  Simple merge
sql/slave.h:
  Automatic merge
sql/sql_base.cc:
  Removed code that was backported to 4.1
sql/sql_class.h:
  Merge (some code moved to sql_insert.cc)
sql/sql_db.cc:
  simple merge
sql/sql_insert.cc:
  Merge (difficult as logic had changed both in 4.1 and 5.0)
  Some coded moved here from sql_class.h
sql/sql_parse.cc:
  Merge (difficult)
sql/sql_prepare.cc:
  Simple merge
sql/sql_select.cc:
  Automatic merge
sql/sql_table.cc:
  Simple merge
sql/sql_update.cc:
  Difficult merge because of different logic for multi-updates
sql/sql_yacc.yy:
  Simple merge
tests/client_test.c:
  Simple merge
2004-12-22 13:54:39 +02:00
unknown
52793e03c0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-tzbug


sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-12-19 11:32:21 +03:00
unknown
d7285006cf bit type 2004-12-17 18:06:05 +04:00
unknown
bc152db579 Fix for bug #6849 "Crash while preparing query containing const expr with
IN and CONVERT_TZ()" (with after review changes).

Now we add implicitly used time zone tables to global table list right
at the parsing stage instead of doing it later in mysql_execute_command()
or in check_prepared_statement().

No special test-case needed since this bug also manifests itself as
timezone2.test failure if one runs it with --ps-protocol option.


sql/sql_base.cc:
  relink_tables_for_multidelete(): 
   presence of implicitly used time zone tables is no longer condition for
   propagation of TABLE pointers from global table list to local table
   lists (since now global list is always created...)
sql/sql_lex.cc:
  - Added LEX::add_time_zone_tables_to_query_tables() function which adds
    implicitly used time zone tables to global table list.
  - Definition of fake_time_zone_tables_list moved to tztime.cc, since
    it is no longer used in parser.
sql/sql_lex.h:
  - Since now we add implicitly used time zone tables right at parsing
    stage, LEX::time_zone_tables_used is either zero or points to valid
    time zone tables list. Updated its description to reflect that.
  - Added LEX::add_time_zone_tables_to_query_tables() function which adds
    implicitly used time zone tables to global table list.
  - Declaration of fake_time_zone_tables_list moved to tztime.h,
    since it is no longer used in parser.
sql/sql_parse.cc:
  mysql_execute_command():
    Removed adding list of implicitly used time zone tables to global table
    list, since now we do this right at the parsing stage.
sql/sql_yacc.yy:
  Let us add implicitly used time zone tables to global table list
  right at the parsing stage instead of doing it later in
  mysql_execute_command() or in check_prepared_statement().
sql/tztime.cc:
  Moved fake_time_zone_tables_list definition from sql_lex.cc to
  tztime.cc since now it is used only for error reporting from
  my_tz_get_table_list() function.
sql/tztime.h:
  Moved fake_time_zone_tables_list declaration from sql_lex.h to
  tztime.h since now it is used only for error reporting from
  my_tz_get_table_list() function.
2004-12-17 15:34:48 +03:00
unknown
46364ddb19 WL#2274 - INSERT..SELECT..UPDATE
UPDATE clause conflicts with SELECT for use of item_list field.
  Alter UPDATE clause to use new lex field update_list
  Tests included


mysql-test/r/insert_update.result:
  WL#2274
    New tests for INSERT..SELECT..UPDATE
mysql-test/t/insert_update.test:
  WL#2274
    New tests for INSERT..SELECT..UPDATE
sql/mysql_priv.h:
  Remove function - insert_select_precheck()
sql/sql_class.h:
  WL#2274
    New constructor for class select_insert
sql/sql_insert.cc:
  WL#2274
    Move code into mysql_prepare_insert
    Add checks as param values may be NULL
sql/sql_lex.cc:
  WL#2274
    initialize lex->update_list
sql/sql_lex.h:
  WL#2274
    New field in LEX: update_list
sql/sql_parse.cc:
  WL#2274
    INSERT..UPDATE clause now populates lex->update_list
    Remove redundant function: insert_select_precheck()
sql/sql_prepare.cc:
  WL#2274
    invoke insert_precheck() instead of insert_select_precheck()
sql/sql_yacc.yy:
  WL#2274
    Enable INSERT..SELECT..UPDATE syntax
    New rule - insert_update_list, to populate lex->update_list
2004-12-13 12:26:28 +00:00
unknown
a1fba2dacc After merge fixes
Fixed compiler warnings
Fix core dump when sending SIGHUP to mysqld


mysql-test/r/drop_temp_table.result:
  After merge fixes
mysql-test/r/grant.result:
  After merge fixes
mysql-test/r/group_min_max.result:
  After merge fixes
mysql-test/r/innodb.result:
  After merge fixes
mysql-test/r/insert_select.result:
  After merge fixes
mysql-test/r/rpl_charset.result:
  After merge fixes
mysql-test/r/rpl_create_database.result:
  After merge fixes
mysql-test/r/rpl_loaddata_rule_m.result:
  After merge fixes
mysql-test/t/rpl_charset.test:
  After merge fixes
mysql-test/t/rpl_create_database.test:
  After merge fixes
sql-common/client.c:
  After merge fixes
sql/item.cc:
  After merge fixes
sql/mysqld.cc:
  Fix core dump when sending SIGHUP to mysqld
sql/sql_acl.cc:
  Better comment
sql/sql_derived.cc:
  Fixed comment
  Added missing DBUG_RETURN
sql/sql_insert.cc:
  Fixed compiler warnings
  After merge fixes
sql/sql_lex.cc:
  After merge fixes
  Removed compiler warnings
sql/sql_parse.cc:
  After merge fixes
sql/sql_select.cc:
  More debugging
sql/sql_table.cc:
  Added missing DBUG_VOID_RETURN
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_view.cc:
  Added missing DBUG_RETURN
  Fixed compiler warnings
  Added flag to signal that the view is a derived table
2004-12-06 17:15:54 +02:00
unknown
796bd7de96 Merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
BUILD/SETUP.sh:
  Auto merged
Build-tools/Do-compile:
  Auto merged
client/mysqladmin.cc:
  Auto merged
configure.in:
  Auto merged
innobase/include/lock0lock.h:
  Auto merged
innobase/os/os0file.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/insert_select.result:
  Auto merged
mysql-test/r/lowercase_table3.result:
  Auto merged
mysql-test/r/rpl_start_stop_slave.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/rpl_until.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_rename.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/log_event.cc:
  Merge with 4.1
  Trivial cleanup
2004-12-06 11:38:56 +02:00
unknown
a49025d2c8 now we create temporary join for all queries with subqueries to make correct cleunup of tables and avoid too early unlock (BUG#6841)
mysql-test/t/subselect_innodb.test:
  possible early unlock
sql/sql_lex.cc:
  subqueries presence flag
sql/sql_lex.h:
  subqueries presence flag
sql/sql_parse.cc:
  subqueries presence flag
sql/sql_select.cc:
  removed some too optimistic optimisation, now we create temporary join for all queries with subqueries to make correct cleunup of tables and avoid too early unlock
2004-11-30 21:41:12 +02:00
unknown
d777a9aa6a Change sql_mode BROKEN_NOT to HIGH_NOT_PRECEDENCE 2004-11-27 19:26:46 +00:00
unknown
a352372170 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-join-5.0


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  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_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
2004-11-25 02:27:02 +02:00
unknown
239cdc27dc Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/table.h:
  Auto merged
2004-11-24 20:01:34 +02:00
unknown
c774eb0e6d fixed problem in MacOS
correct printing of aliases


mysql-test/r/lowercase_view.result:
  aliases in VIEWs
mysql-test/t/lowercase_view.test:
  aliases in VIEWs
sql/item.cc:
  tracking using aliases in indentifiers
sql/item.h:
  tracking using aliases in indentifiers
sql/sql_base.cc:
  tracking using aliases in indentifiers
sql/sql_lex.cc:
  tracking using aliases in indentifiers
sql/sql_lex.h:
  tracking using aliases in indentifiers
sql/table.h:
  tracking using aliases in indentifiers
2004-11-24 19:48:30 +02:00
unknown
c3da2d12f7 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).


mysql-test/r/trigger.result:
  Added test which attempts to create trigger for table referencing to
  field which does not exist in this table.
mysql-test/t/trigger.test:
  Added test which attempts to create trigger for table referencing to
  field which does not exist in this table.
sql/item.cc:
  Item_trigger_field::setup_field() now returns void. If any error
  will occur we will report it at fix_fields() stage.
sql/item.h:
  Item_trigger_field:
  - Added next_trg_field member for linking all such objects in trigger
    in one list.
  - Also setup_field() now returns void. If any error will occur we will
    report it at fix_fields() stage.
sql/mysql_priv.h:
  Added SQL_LIST::push_back() method which allows to add another SQL_LIST
  to the end of this SQL_LIST.
sql/sp_head.cc:
  sp_head::init()/reset_lex()/restore_lex():
   In order to fill global LEX::trg_table_fields (list of all 
   Item_trigger_field objects for trigger) we should init the same list
   in LEX of substatement before its parsing and merge it to global list
   after parsing.
sql/sp_head.h:
  sp_instr_trigger_field:
    Made trigger_field member public to be able to add it more easily to
    global list of all Item_trigger_field objects in trigger.
sql/sql_lex.cc:
  LEX::trg_table was removed.
sql/sql_lex.h:
  Now we are binding Item_trigger_field's to TABLE object by passing
  through specially constructed list of all such objects in this trigger
  instead of doing this during trigger definition parsing at table open.
  So we no longer need LEX::trg_table, we use LEX::trg_table_fields list
  instead.
sql/sql_parse.cc:
  mysql_execute_command():
    Since now we use trigger body for some checks in
    mysql_create_or_drop_trigger() we should destroy it only
    after calling this function.
sql/sql_trigger.cc:
  Now instead of binding Item_trigger_field to TABLE objects during
  trigger definition parsing at table open, we perform pass through
  special list of all such objects in trigger. This allows easily check
  all references to fields in old/new version of row in trigger during
  execution of CREATE TRIGGER statement (this is more courtesy for users
  since we can't check everything anyway).
  We also report that such reference is bad by returning error from
  Item_trigger_field::fix_fields() method (instead of setup_field())
  This means that if trigger is broken we will bark during trigger
  execution instead of trigger definition parsing at table open.
  (i.e. now we allow to open tables with broken triggers).
  
  Table_triggers_list::prepare_old_row_accessors() method was added to be
  able to reuse code creating Field objects referencing TABLE::record[1]
  buffer instead of TABLE::record[0].
sql/sql_trigger.h:
  Added Table_triggers_list::prepare_old_row_accessors() method to be
  able to reuse code creating Field objects referencing to TABLE::record[1]
  instead of record[0].
sql/sql_yacc.yy:
  Now instead of performing binding of Item_trigger_field objects
  to TABLE object during trigger definition parsing at table open,
  we perform this binding by passing through specially constructed
  list of all such items in trigger.
  We also check value returned from memory allocation functions.
2004-11-24 12:24:02 +03:00
unknown
5a00a868b7 merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-11-21 20:08:12 +02:00
unknown
c9497e2365 post merge 2004-11-21 19:33:49 +02:00
unknown
191fa29932 WL#638 - Fix precedence for parsing NOT ... LIKE expression s
Rework parser expression rules
  Rework handling for "||" concat/or
  Eliminate some shift/reduce conflicts
  Add support for "xxx IS [ NOT ] truth_value"


mysql-test/r/ansi.result:
  Fix test for new BROKEN_NOT mode bit
mysql-test/r/bool.result:
  WL#638
    New test for BROKEN_NOT mode
    New test for "expr IS [NOT] truth_value" syntax
mysql-test/r/sql_mode.result:
  Fix test for new BROKEN_NOT mode bit
mysql-test/t/bool.test:
  WL#638
    New test for BROKEN_NOT mode
    New test for "expr IS [NOT] truth_value" syntax
sql/lex.h:
  WL#638
    "&&" and "AND" return different tokens,
    NOT token changed to NOT_SYM
    OR_OR_CONCAT token changed to OR_OR_SYM
    New token "UNKNOWN"
sql/mysql_priv.h:
  WL#638
    New mode: BROKEN_NOT
sql/mysqld.cc:
  WL#638
    New mode: BROKEN_NOT
sql/set_var.cc:
  WL#638
    New mode: BROKEN_NOT
    BROKEN_NOT is set in MYSQL323 and MYSQL40 modes
sql/sql_lex.cc:
  Bug#638
    Alter tokens returned by lexer depending upon sql_mode:
    Return NOT2_SYM token instead of NOT_SYM when in BROKEN_NOT mode
    Return OR2_SYM token instead of OR_OR_SYM when not in PIPES_AS_CONCAT mode
sql/sql_yacc.yy:
  WL#638
    Change grammar to respect proper SQL syntax for NOT
    Clean up grammar, eliminate >100 shift/reduce conflicts
    New support for "expr IS [NOT] truth_value" SQL syntax
    Remove or_or_concat() support func. New support func is_truth_value()
2004-11-17 15:49:10 +00:00
unknown
b685909d6a moved procedure list initialization (BUG#6517)
mysql-test/r/subselect.result:
  Subselect in non-select command just after connection
mysql-test/t/subselect.test:
  Subselect in non-select command just after connection
sql/sql_lex.cc:
  moved procedure initialization
sql/sql_parse.cc:
  moved procedure initialization
2004-11-15 14:37:40 +02:00
unknown
ac0cd2d3ac marge
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/share/french/errmsg.txt:
  Auto merged
sql/share/greek/errmsg.txt:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/share/portuguese/errmsg.txt:
  Auto merged
sql/share/romanian/errmsg.txt:
  Auto merged
sql/share/serbian/errmsg.txt:
  Auto merged
sql/share/spanish/errmsg.txt:
  Auto merged
sql/share/swedish/errmsg.txt:
  Auto merged
sql/mysql_priv.h:
  merge
sql/sql_parse.cc:
  merge
sql/sql_show.cc:
  merge
2004-11-13 19:45:36 +02:00
unknown
7281d2e3ae WL#1629: SHOW with WHERE(partially) &
WL#173:  Create Data Dictionary Tables for SHOW Commands
2004-11-13 13:56:39 +03:00
unknown
067863e184 merge
include/mysqld_error.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/rpl_charset.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/rpl_charset.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_row.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/repl_failsafe.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/share/czech/errmsg.txt:
  Auto merged
sql/share/danish/errmsg.txt:
  Auto merged
sql/share/dutch/errmsg.txt:
  Auto merged
sql/share/english/errmsg.txt:
  Auto merged
sql/share/estonian/errmsg.txt:
  Auto merged
sql/share/french/errmsg.txt:
  Auto merged
sql/share/german/errmsg.txt:
  Auto merged
sql/share/greek/errmsg.txt:
  Auto merged
sql/share/hungarian/errmsg.txt:
  Auto merged
sql/share/italian/errmsg.txt:
  Auto merged
sql/share/japanese/errmsg.txt:
  Auto merged
sql/share/korean/errmsg.txt:
  Auto merged
sql/share/norwegian-ny/errmsg.txt:
  Auto merged
sql/share/norwegian/errmsg.txt:
  Auto merged
sql/share/polish/errmsg.txt:
  Auto merged
sql/share/portuguese/errmsg.txt:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
sql/share/romanian/errmsg.txt:
  Auto merged
sql/share/russian/errmsg.txt:
  Auto merged
sql/share/serbian/errmsg.txt:
  Auto merged
sql/share/slovak/errmsg.txt:
  Auto merged
sql/share/spanish/errmsg.txt:
  Auto merged
sql/share/swedish/errmsg.txt:
  Auto merged
sql/share/ukrainian/errmsg.txt:
  Auto merged
2004-11-12 15:36:31 +02:00
unknown
9e921615a1 post-review fixes
mysql-test/r/rpl_rotate_logs.result:
  removed host dependence in error messages
mysql-test/t/rpl_rotate_logs.test:
  removed host dependence in error messages
mysys/my_error.c:
  comment about using my_error family functions
sql/filesort.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/ha_innodb.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/handler.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_cmpfunc.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_func.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_strfunc.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_subselect.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_sum.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/lock.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/log.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/mysql_priv.h:
  error check moved to fill_record
sql/mysqld.cc:
  fixed error messages
sql/parse_file.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol_cursor.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/repl_failsafe.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/set_var.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/slave.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sp.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_head.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_rcontext.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_acl.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_analyse.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_base.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
  error check moved to fill_record
sql/sql_class.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_class.h:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_db.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_delete.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
  error check moved to fill_record
sql/sql_handler.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_help.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_insert.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
  error check moved to fill_record
sql/sql_lex.cc:
  layout fixed
sql/sql_load.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_map.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_parse.cc:
  error check moved to fill_record
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_prepare.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_rename.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_repl.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_select.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_show.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_table.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_trigger.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_udf.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_union.cc:
  error check moved to fill_record
sql/sql_update.cc:
  error check moved to fill_record
sql/sql_view.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_yacc.yy:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/table.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/unireg.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
2004-11-12 14:34:00 +02:00
unknown
3bc1fcd409 merge
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-11-11 21:18:10 +02:00
unknown
cd16e4c9c7 Simple optimization to avoid a malloc for each query 2004-11-09 15:50:33 +02:00
unknown
8b0ece5e88 new lock for multiupdate:
- open and create derived tables
- detect which tables should be locked for write
- lock and fill derived tables
some unitialized variables fixed


mysql-test/r/lock_multi.result:
  correct results returned
mysql-test/r/multi_update.result:
  correct results returned
mysql-test/r/view.result:
  correct results returned
mysql-test/t/multi_update.test:
  correct results returned
mysql-test/t/view.test:
  correct results returned
sql/mysql_priv.h:
  derived tables processing splited on table creation and table filling
sql/sql_base.cc:
  derived tables processing splited on table creation and table filling
sql/sql_class.h:
  function to detect when we need fill derived tables
sql/sql_derived.cc:
  derived tables processing splited on table creation and table filling
sql/sql_lex.cc:
  fixed uninitialized value
sql/sql_load.cc:
  fixed uninitialized value
sql/sql_parse.cc:
  initialization muved (will be done for all queries)
sql/sql_prepare.cc:
  preparation of multiupdate changed a bit because new locking procedure
sql/sql_update.cc:
  new lock for multiupdate:
  - open and create derived tables
  - detect which tables should be locked for write
  - lock and fill derived tables
sql/table.h:
  place to store select_result between creation and filling tables
2004-11-05 17:29:47 +02:00
unknown
f095274fe8 merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/triggers/post-commit:
  Auto merged
Docs/Support/texi2html:
  Auto merged
Makefile.am:
  Auto merged
client/Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/my_time.h:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
innobase/buf/buf0buf.c:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/examples/Makefile.am:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/include/ps_modify.inc:
  Auto merged
mysql-test/install_test_db.sh:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/ctype_latin1_de.result:
  Auto merged
mysql-test/r/ctype_recoding.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_if.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/insert.test:
  merge with 4.1
  Fixed test case to not use 'if exists' when it shouldn't
mysql-test/t/range.test:
  merge with 4.1
  Added missing drop table
sql/ha_ndbcluster.cc:
  merge with 4.1
  Simple optimization: use max() instead of ? :
sql/item_func.cc:
  merge with 4.1
  (Added back old variable names for easier merges)
sql/opt_range.cc:
  merge with 4.1
  Removed argument 'parent_alloc' from QUICK_RANGE_SELECT as this was not used
  Added assert if using QUICK_GROUP_MIN_MAX_SELECT with parent_alloc as the init() function can't handle this
  Changed back get_quick_select_for_ref() to use it's own alloc root becasue this function may be called several times for one query
sql/sql_handler.cc:
  merge with 4.1
  change variable 'err' to 'error' as same function had a label named 'err'
sql/sql_update.cc:
  Use multi-update code from 5.0 instead of 4.1
  We will fix the locking code shortly in 5.0 to be faster than in 4.1
2004-10-29 19:26:52 +03:00