Commit graph

98 commits

Author SHA1 Message Date
unknown
4038218b18 postreview fixes (BUG#5618 & BUG#5590)
sql/field.cc:
  fixed compatibility fields type detection
sql/item.cc:
  fixed compatibility fields detection with using standard method for all fields, also some bugs are fixed
sql/sql_derived.cc:
  some cleanup
2004-09-25 15:07:50 +03:00
unknown
580f12cc04 fixed error handling if creating derived table failed
single row subquery always can return NULL (no rows found) (BUG#5590)


mysql-test/r/subselect.result:
  maybe_null flag returning by subquwery for temporary table creation
mysql-test/t/subselect.test:
  maybe_null flag returning by subquwery for temporary table creation
sql/item.cc:
  storing maybe_null in type holder
sql/item_subselect.cc:
  single row subquery always can return NULL (no rows found)
sql/sql_derived.cc:
  fixed error handling if creating derived table failed
2004-09-17 19:08:46 +03:00
unknown
1230daf8f2 memory leak fixed 2004-09-05 10:57:26 +03:00
unknown
095b686c09 Fix for bug#4912 "mysqld crashs in case a statement is executed
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement 
execute a subtree with negation was replaced with equivalent 
subtree without NOTs.
The problem was that although this transformation was permanent, 
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(), 
  Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
  THD::free_temporary_pool_for_ps_preparing(); they
  were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
  prepared statement, it points at the thd. 
The rest of the patch contains mainly mechanical changes and
cleanups.


mysql-test/r/ps.result:
  Test results updated (test case for Bug#4912)
mysql-test/t/ps.test:
  A test case for Bug#4912 "mysqld crashs in case a statement is 
  executed a second time"
sql/item_cmpfunc.cc:
  current_statement -> current_arena
sql/item_subselect.cc:
  Statement -> Item_arena, current_statement -> current_arena
sql/item_subselect.h:
  Item_subselect does not need to save thd->current_statement.
sql/item_sum.cc:
  Statement -> Item_arena
sql/item_sum.h:
  Statement -> Item_arena
sql/mysql_priv.h:
  Statement -> Item_arena
sql/sql_base.cc:
  current_statement -> current_arena
sql/sql_class.cc:
  - Item_arena
  - convenient set_n_backup_statement, restore_backup_statement
  (nice idea, Sanja)
sql/sql_class.h:
  - Item_arena: backport from 5.0
  - allocate_temporary_pool_for_ps_preparing,
    free_temporary_pool_for_ps_preparing removed.
sql/sql_derived.cc:
  current_statement -> current_arena
sql/sql_lex.cc:
  current_statement -> current_arena
sql/sql_parse.cc:
  Deploy invariant that thd->free_list never contains junk items
  (backport from 5.0).
sql/sql_prepare.cc:
  - backporting Item_arena
  - no need to allocate_temporary_pool_for_ps_preparing().
sql/sql_select.cc:
  Fix for bug#4912 "mysqld crashs in case a statement is 
  executed a second time": if this is the first execute of
  a prepared statement, negation elimination is
  done in memory of the prepared statement.
sql/sql_union.cc:
  Backporting Item_arena from 5.0.
2004-08-21 02:02:46 +04:00
unknown
de6285928d Unused variables removed (many files).
sql/item_func.cc:
  Unused variable 'thd' removed.
sql/item_subselect.cc:
  Unused variable 'type' removed.
sql/slave.cc:
  Unused variable 'return_val' removed.
sql/sql_derived.cc:
  Unused variable 'is_subsel' removed.
sql/sql_parse.cc:
  Unused variables 'pstr' and 'create_info' removed.
sql/sql_prepare.cc:
  Unused variable 'res' removed.
sql/time.cc:
  Unused variable 'str_begin' removed.
2004-06-21 20:39:19 +04:00
unknown
52a62ce0b0 fixed subquery in the FROM clause with parameter (BUG#3020)
sql/sql_derived.cc:
  do not execute subqueries in the FROM clause in PS preparation
tests/client_test.c:
  test of subquery in FROM clause with parameter
2004-04-08 23:28:47 +03:00
unknown
7873b89fc5 Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly


include/mysql_com.h:
  Fixed compiler warning
libmysqld/emb_qcache.cc:
  Removed not used variable
libmysqld/lib_sql.cc:
  Removed not used variable
myisam/mi_locking.c:
  Added comment
myisam/mi_rnext.c:
  Fixed bug in concurrent insert
myisam/mi_rprev.c:
  Simple optimization
mysql-test/r/func_gconcat.result:
  New tests
mysql-test/t/func_gconcat.test:
  New tests
mysql-test/t/func_group.test:
  Cleanup
sql-common/client.c:
  Removed compiler warning
sql/derror.cc:
  Better comments
sql/field.cc:
  Removed not used function/variable
sql/field.h:
  Removed not needed variable
sql/ha_innodb.cc:
  Removed not used function
sql/item.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_func.cc:
  Fixed compiler warning
sql/item_geofunc.cc:
  Fixed compiler warning
sql/item_sum.cc:
  Fixed bugs in group_concat and added more comments
  (Bugs #2695, #3381 and #3319)
  - field->abs_offset was not needed
  - Wrong assumption of field order in temporary table
  - Some not used variables removed
  - Added ORDER BY fields after argument fields so that code in sql_select.cc can move all fields to point to temporary tables, if needed.
  - Optimized loops
sql/item_sum.h:
  Bug fixing and cleanup of group_concat()
sql/log.cc:
  Removed wrong comment
sql/log_event.cc:
  Removed compiler warning
sql/mysqld.cc:
  Set locked_in_memory properly
sql/protocol.cc:
  Removed compiler warning
sql/set_var.cc:
  Code cleanup
sql/slave.cc:
  Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
sql/sql_cache.cc:
  Removed compiler warnings
sql/sql_derived.cc:
  Removed not used variable
sql/sql_insert.cc:
  Removed compiler warnings
sql/sql_lex.cc:
  Removed not used lable
sql/sql_lex.h:
  Removed compiler warnings
sql/sql_parse.cc:
  Removed compiler warnings
sql/sql_prepare.cc:
  Removed compiler warnings
sql/sql_select.cc:
  Removed not used variables
  Added function comments
sql/sql_show.cc:
  Removed compiler warnings
sql/sql_yacc.yy:
  Fix for ORDER BY handling in GROUP_CONCAT()
2004-04-05 13:56:05 +03:00
unknown
c0a9df1aae correct support for a mix of UNION/UNION ALL in the same query.
Bug#1428
2004-03-23 14:43:24 +01:00
unknown
f83cf41440 DBUG_ASSERT(fixed == 0) added to fix_fields()
sql/item.cc:
  layout fixed
  fixed bug in prepared statements with subqueries and outer references
sql/item.h:
  neg_transformer get thd argument to call fix_fields
sql/item_cmpfunc.cc:
  DBUG_ASSERT(fixed == 0) added to fix_fields()
  fixed Item_in_optimizer fixed flag
  neg_arguments(), neg_transformer() call fix_field() on created items to avoid bouble fix field or non-called fixfields()
sql/item_cmpfunc.h:
  neg_transformer get thd argument to call fix_fields
  fixed forgoten cleanup() call of parent class
sql/item_func.cc:
  DBUG_ASSERT(fixed == 0) and fixed flag check added to fix_fields()
sql/item_func.h:
  DBUG_ASSERT(fixed == 0) added to fix_fields()
  fixed forgoten cleanup() call of parent class
sql/item_row.cc:
  DBUG_ASSERT(fixed == 0) added to fix_fields()
  added forgoten 'fixed' flag set
sql/item_subselect.cc:
  DBUG_ASSERT(fixed == 0) added to fix_fields()
  fixed subquery transformation
sql/sql_base.cc:
  check of fixed flag added
sql/sql_derived.cc:
  fixed cleunup union in derived table during EXPLAIN command processing
sql/sql_select.cc:
  thd argument add to function to allow call fix_fields() of new created items
  fixed EXPLAIN double preparation
  check of fixed flag added
  eliminate_not_funcs fixed for corrcet fix_fields call of new created items
sql/sql_select.h:
  thd argument add to function to allow call fix_fields() of new created items
sql/sql_union.cc:
  union processing fixed
tests/client_test.c:
  layout fixed
  new test of outer references fron subqueries
2004-03-17 14:26:26 +02:00
unknown
ecb11989ad after merge & valgrind test fixes (BUG#2120)
sql/sql_derived.cc:
  memory leack fixed
sql/sql_lex.cc:
  flag to avoid double cleaning
sql/sql_lex.h:
  flag to avoid double cleaning
sql/sql_select.cc:
  right way to cleanup JOIN_TAB
sql/sql_select.h:
  right way to cleanup JOIN_TAB
sql/sql_union.cc:
  flag to avoid double cleaning
2004-02-10 02:18:22 +02:00
unknown
61f0e69cb6 ufter revview fix (BUG#2120)
mysql-test/r/derived.result:
  test of error handling in derived tables with UPDATE & DELETE
mysql-test/t/derived.test:
  test of error handling in derived tables with UPDATE & DELETE
sql/mysql_priv.h:
  opened tables counter added to avoid loop of tables calculating in lock_tables
sql/sql_acl.cc:
  opened tables counter added to avoid loop of tables calculating in lock_tables, here it is just for compatibility
sql/sql_base.cc:
  removed unneeded assignment
  opened tables counter added to avoid loop of tables calculating in lock_tables
  commentary fixed
sql/sql_derived.cc:
  mysql_derived made static
  variable res moved in place where it used
  priveleges written in correct place
sql/sql_handler.cc:
  opened tables counter added to avoid loop of tables calculating in lock_tables
sql/sql_parse.cc:
  mistyping in commentary fixed
2004-02-09 14:44:03 +02:00
unknown
1f739ca45e make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
(BUG#2120 sfter merge)


mysql-test/r/derived.result:
  correct results of derived tble EXPLAIN
  test of "Using Index" with derived tables
mysql-test/t/derived.test:
  test of "Using Index" with derived tables
sql/mysql_priv.h:
  way to force derived table save JOIN after execution
sql/sql_derived.cc:
  way to force derived table save JOIN after execution
sql/sql_lex.h:
  way to force derived table save JOIN after execution
sql/sql_select.cc:
  make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
2004-02-01 20:07:44 +02:00
unknown
68c0a29987 now all tables of query are locked in one place (including derived tables)
fixed BUG#2120 and other problem with EXPLAINing derived tables


mysql-test/r/derived.result:
  correct tables names & Co in derived tables
  test case for BUG#2120
mysql-test/t/derived.test:
  test case for BUG#2120
sql/mysql_priv.h:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables)
sql/repl_failsafe.cc:
  correct initialization of TABLE_LIST
sql/sql_acl.cc:
  used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
sql/sql_base.cc:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables)
sql/sql_delete.cc:
  all tables processing is done during opening
sql/sql_derived.cc:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables) to sutisfy "all query tables locking" at the moment
sql/sql_insert.cc:
  all tables processing is done during opening
  correct initialization of TABLE_LIST
sql/sql_lex.cc:
  now table list will be created for whole query
  layout fix
  correct check of updated table in subqueries
sql/sql_lex.h:
  now table list will be created for whole query
  correct check of updated table in subqueries
sql/sql_olap.cc:
  THIS FUNCTION IS USED NOWHERE
  it will be good to remove it at all (handle_olaps)
sql/sql_parse.cc:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables)
sql/sql_prepare.cc:
  new creating list parameters
  all tables processing is done during opening
sql/sql_select.cc:
  all tables processing is done during opening
sql/sql_select.h:
  now it used only within file where is defined
sql/sql_udf.cc:
  used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
sql/sql_update.cc:
  all tables processing is done during opening
2004-02-01 15:30:32 +02:00
unknown
aa35b8c1b1 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-insert-4.1


sql/sql_derived.cc:
  Auto merged
2004-01-17 15:28:56 +02:00
unknown
e6213fe4e7 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-ft_derived-4.1


sql/sql_derived.cc:
  Auto merged
2004-01-17 14:03:22 +02:00
unknown
6eaa5c3a66 assigned correct lex->current_select for derived tables (BUG#2349)
moved LIMIT initialialization, because it is need only for single select derived table


mysql-test/r/derived.result:
  test suite for BUG#2349
mysql-test/t/derived.test:
  test suite for BUG#2349
sql/sql_derived.cc:
  assigned correct lex->current_select (BUG#2349)
  moved LIMIT initialialization, because it is need only for single select
2004-01-14 15:15:42 +02:00
unknown
5e55cd5d0f As far as we cut off derived table branch, we have to close JOINs (BUG#2141)
(test case is absend because it is multi-thread and very big)


sql/sql_derived.cc:
  As far as we cut off this branch, we have to close JOINs
2004-01-06 13:13:04 +02:00
unknown
fc75518a78 fixed unlocking tables during subquery execution (BUG#2048)
mysql-test/r/subselect_innodb.result:
  bug 2048 test
mysql-test/t/subselect_innodb.test:
  bug 2048 test
sql/item_subselect.cc:
  do not unlock tables for subqueries
sql/sql_derived.cc:
  derived table tables can be unlocked
sql/sql_lex.h:
  new interface to pass additional options
sql/sql_union.cc:
  new interface to pass additional options
  do not unlock tables for UNION
2003-12-10 22:46:14 +02:00
unknown
ef43220170 Merge
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_derived.cc:
  keep local copy
sql/sql_union.cc:
  keep local copy
2003-11-28 13:31:38 +02:00
unknown
76bf7d2224 Added missing SSL library (Should be in source distribution)
Fixed compiler warnings (a lot of hidden variables detected by the Forte compiler)
Added a lot of 'version_xxx' strings to 'show variables'
Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
Fixed problem with printing sub selects to debug log


Docs/mysqld_error.txt:
  Updated error messages
Makefile.am:
  Added missing SSL library (Should be in source distribution)
configure.in:
  Added missing SSL library
include/sql_common.h:
  Move duplicated prototypes
innobase/os/os0file.c:
  Added comment for line that could be removed
innobase/srv/srv0srv.c:
  Added comment for line that could be removed
innobase/srv/srv0start.c:
  Added comment for line that could be removed
innobase/trx/trx0sys.c:
  Added cast to remove compiler warning
isam/isamchk.c:
  Fixed compiler warning
libmysql/conf_to_src.c:
  Include files in proper order
myisam/mi_check.c:
  Removed else part that caused compiler warning
myisam/mi_delete.c:
  Added cast
myisam/mi_page.c:
  Added cast
myisam/mi_preload.c:
  Added cast
myisam/mi_write.c:
  Added cast
myisam/myisampack.c:
  changed 'byte' to 'current_byte' to avoid compiler warnings
mysql-test/mysql-test-run.sh:
  Removed start-from as test '<' is not portable and this can easily be done from command line
mysys/hash.c:
  Added cast
mysys/mf_wcomp.c:
  Removed not reached line
mysys/my_append.c:
  Fixed include file order to get this more portable
mysys/my_copy.c:
  Fixed include file order to get this more portable
mysys/my_redel.c:
  Fixed include file order to get this more portable
sql-common/client.c:
  More DBUG_PRINT
sql-common/pack.c:
  Added casts becasue Fortre compiler apparently compares (ulonglong) < (longlong) as signed
sql/ha_heap.cc:
  Changed variable names to not cause hidden variables
sql/ha_innodb.cc:
  Changed variable names to not cause hidden variables
sql/item.cc:
  Changed variable names to not cause hidden variables
sql/item.h:
  Changed variable names to not cause hidden variables
sql/item_cmpfunc.h:
  Changed variable names to not cause hidden variables
sql/item_func.cc:
  Changed variable names to not cause hidden variables
sql/item_subselect.cc:
  Changed variable names to not cause hidden variables
sql/item_subselect.h:
  Changed variable names to not cause hidden variables
sql/item_sum.cc:
  Changed variable names to not cause hidden variables
sql/item_timefunc.cc:
  Changed variable names to not cause hidden variables
sql/log.cc:
  Changed variable names to not cause hidden variables
sql/protocol.cc:
  Changed variable names to not cause hidden variables
sql/protocol.h:
  Changed variable names to not cause hidden variables
  Remove function not declared in protocol.cc
sql/protocol_cursor.cc:
  Changed variable names to not cause hidden variables
sql/set_var.cc:
  Added a lot of 'version_xxx' strings
  Changed 'bdb_version' to 'version_bdb'
sql/sql_class.cc:
  Changed variable names to not cause hidden variables
  Add TMP_TABLE_PARAM::init() to allow one to initialize structure several times
sql/sql_class.h:
  Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
sql/sql_derived.cc:
  Avoid copying TMP_TABLE_PARAM (Use class version instead)
sql/sql_error.cc:
  More DBUG
sql/sql_help.cc:
  Fixed compiler warning
sql/sql_lex.cc:
  Changed variable names to not cause hidden variables
sql/sql_list.h:
  Changed variable names to not cause hidden variables
sql/sql_parse.cc:
  Changed variable names to not cause hidden variables
sql/sql_select.cc:
  Changed variable names to not cause hidden variables
  Ensure that you don't send NULL to printf() for %s
  Fixed problem with printing sub selects to debug log
sql/sql_select.h:
  Changed variable names to not cause hidden variables
sql/sql_union.cc:
  Changed variable names to not cause hidden variables
  Don't use local copy of TMP_TABLE_PARAM (Caused core dump on Solaris)
sql/sql_update.cc:
  Indentation cleanup
sql/sql_yacc.yy:
  Remove warning
strings/conf_to_src.c:
  Fixed include file order
2003-11-28 12:18:13 +02:00
unknown
443a157c6a removed unused variable 2003-11-27 09:34:41 +02:00
unknown
358799ecf7 avoiding coping tmptable_param
sql/sql_union.cc:
  fixed layout
2003-11-26 20:12:26 +02:00
unknown
381a8db6a6 after review fixes
mysql-test/r/union.result:
  new tests, more correct results for old one
mysql-test/t/union.test:
  new tests, more correct results for old one
sql/field.cc:
  new way to make field types csting
sql/field.h:
  new way to make field types csting
sql/item.cc:
  new way to make field types csting
sql/sql_derived.cc:
  fixed typo
sql/sql_lex.h:
  comment added
2003-11-23 21:26:43 +02:00
unknown
3e21b667bc Fixed UNION fields type/length detecting
mysql-test/r/union.result:
  new results with max union field length detecting
  type conversion tests
mysql-test/t/union.test:
  type conversion tests
sql/field.h:
  field converion support
sql/item.cc:
  fixed printing field of internal temporary table of SELECT (reference from HAVING clause)
  layout fix
  new item for storing field type
sql/item.h:
  new item for storing field type
sql/item_subselect.cc:
  new subquery item length/dec detecting
sql/mysql_priv.h:
  we do not need pre-inited tables and fields
sql/sql_base.cc:
  we do not need double fix_fielding
sql/sql_class.h:
  we do not need double fix_fielding
sql/sql_derived.cc:
  preparing moved before temporary table creation
sql/sql_lex.h:
  we do not need pre-inited tables and fields
  new lists to store fields types and fields of temporary table
sql/sql_parse.cc:
  we do not need pre-inited tables and fields
sql/sql_prepare.cc:
  we do not need pre-inited tables and fields
sql/sql_select.cc:
  we do not need pre-inited tables and fields
  support mysql_select call from derived tables after it preparing (in derived table routing)
  support of crreating temporary table fields from Item_type_holder
sql/sql_select.h:
  we do not need pre-inited tables and fields
sql/sql_union.cc:
  we do not need pre-inited tables and fields
  check of columns number in union moved to prepare()
  prepering of SELECTS moved before temporary table creation, fixed union columns type/length detecting
sql/sql_update.cc:
  we do not need pre-inited tables and fields
2003-11-23 02:01:15 +02:00
unknown
47f3a4fd4a Merge
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_derived.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
mysql-test/r/subselect.result:
  SCCS merged
2003-10-22 20:52:47 +03:00
unknown
6795b2642b fixed deleting derived table tree after using (BUG#1536)
mysql-test/r/subselect.result:
  fixed drop table statement
  test for BUG#1536
mysql-test/t/subselect.test:
  fixed drop table statement
  test for BUG#1536
sql/sql_derived.cc:
  all tree of derived table should be deleted
sql/sql_lex.cc:
  delete subtree method
sql/sql_lex.h:
  delete subtree method
2003-10-17 15:18:57 +03:00
unknown
724a6c3c6d subqueries made printable
new EXPLAIN parameter to show real query as it was interpreted
(SCRUM) (WL#1274)


mysql-test/r/subselect.result:
  new explains
mysql-test/r/union.result:
  new explains
mysql-test/t/subselect.test:
  new explains
mysql-test/t/union.test:
  new explains
sql/item.cc:
  fixed printability of Items in SELECT list
sql/item.h:
  fixed printability of Items in SELECT list
sql/item_cmpfunc.cc:
  fixed print()
sql/item_cmpfunc.h:
  fixed print()
sql/item_subselect.cc:
  subqueries made printable
sql/item_subselect.h:
  subqueries made printable
sql/mysql_priv.h:
  union option made looks like options
sql/sql_derived.cc:
  now this link is used
sql/sql_lex.cc:
  subqueries made printable
sql/sql_lex.h:
  subqueries made printable
  new EXPLAIN parameter support
sql/sql_parse.cc:
  new EXPLAIN parameter
sql/sql_select.cc:
  debug output
  new EXPLAIN parameter support
sql/sql_select.h:
  new EXPLAIN parameter support
sql/sql_yacc.yy:
  new EXPLAIN parameter support
  SELECT printability support
2003-10-16 15:54:47 +03:00
unknown
ff8c8fa1ef Merge
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/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_derived.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/subselect.test:
  SCCS merged
2003-10-06 20:55:06 +03:00
unknown
dbb9596727 Merge
include/mysql.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
libmysqld/lib_sql.cc:
  SCCS merged
libmysqld/libmysqld.c:
  SCCS merged
sql/sql_parse.cc:
  SCCS merged
2003-09-26 15:40:26 +05:00
unknown
1705369809 SCRUM:
WL#604 Privileges in embedded library
code added to check privileges in embedded library
NO_EMBEDDED_ACCESS_CHECKS macros inserted in code so we can exclude
access-checking parts. Actually we now can exclude these parts from
standalone server as well. Do we need it?
Access checks are disabled in embedded server by default. One should
edit libmysqld/Makefile manually to get this working.
We definitely need the separate configure for embedded server


include/mysql.h:
  options added so user of embedded library can set the client host
  it will work as if the usual client connects from this host
libmysqld/Makefile.am:
  Usually one doesn't need access checking in embedded library
  we definitely should separate configure for embedded server
libmysqld/lib_sql.cc:
  necessary code for getting passwords and access checks added
libmysqld/libmysqld.c:
  code #ifdef-ed - we use this only when we check permissions
sql-common/client.c:
  one mysql_close left now
sql/item_strfunc.cc:
  #ifndef-s added
sql/log.cc:
  #ifndef-s added
sql/mysql_priv.h:
  #ifndef-s added
  also i removed default parameters from check_access and check_table_access
  definitions to set definitions working
sql/mysqld.cc:
  #ifndef-s added
  localhost renamed to my_localhost
sql/repl_failsafe.cc:
  parameters added
sql/set_var.cc:
  #ifndef-s added
sql/sql_acl.cc:
  #ifndef-s added
sql/sql_acl.h:
  #ifndef-s added
sql/sql_base.cc:
  #ifndef-s added
sql/sql_cache.cc:
  #ifndef-s added
sql/sql_class.cc:
  #ifndef-s added
sql/sql_db.cc:
  #ifndef-s added
sql/sql_derived.cc:
  #ifndef-s added
sql/sql_insert.cc:
  #ifndef-s added
sql/sql_parse.cc:
  a horde of #ifndef-s added
sql/sql_prepare.cc:
  #ifndef-s added
sql/sql_repl.cc:
  parameters added
sql/sql_show.cc:
  #ifndef-s added
sql/sql_update.cc:
  #ifndef-s added
2003-09-26 15:33:13 +05:00
unknown
c4079104f2 Remove 'extern' references from .cc files
mysys/checksum.c:
  Cleanup
mysys/my_static.h:
  Remove not used include file
sql/item_strfunc.cc:
  Remove 'extern' references
sql/lock.cc:
  Remove 'extern' references
sql/log.cc:
  Remove 'extern' references
sql/mysql_priv.h:
  Add 'extern' references
sql/net_serv.cc:
  Added comment
sql/repl_failsafe.cc:
  Remove 'extern' references
sql/set_var.cc:
  Remove 'extern' references
sql/sql_derived.cc:
  Remove 'extern' references
sql/sql_insert.cc:
  Remove 'extern' references
sql/sql_parse.cc:
  Remove 'extern' references
sql/sql_prepare.cc:
  Remove 'extern' references
sql/sql_repl.cc:
  Remove 'extern' references
sql/sql_string.cc:
  Added comment
sql/sql_table.cc:
  Remove 'extern' references
sql/sql_test.cc:
  Remove 'extern' references
sql/sql_yacc.yy:
  Remove 'extern' references
sql/table.cc:
  Remove 'extern' references
2003-09-13 11:35:29 +03:00
unknown
6f607d3aa6 Fix for bug 1176 2003-09-04 17:12:20 +05:00
unknown
93afa26ea7 fixed bug of lack of fix_fields call (after merge bugfix (SCRUM))
fixed bug in Item_sum
fixed bug in dependence remover
after merge fix


mysql-test/r/subselect.result:
  after merge fix
mysql-test/r/union.result:
  new test
mysql-test/t/subselect.test:
  after merge fix
mysql-test/t/union.test:
  new test
sql/item.cc:
  fixed returned value
sql/item.h:
  fixed flag dropper
  (I was not able to find Item whicj need more to be fix_fielded twice)
sql/item_subselect.h:
  fixed initialisation
sql/item_sum.cc:
  fixed absence of walk method of Item_sum
sql/item_sum.h:
  fixed absence of walk method of Item_sum
sql/mysql_priv.h:
  setup_fields reverter
sql/sql_base.cc:
  setup_fields reverter
sql/sql_derived.cc:
  fixed bug of lack of fix_fields call
sql/sql_union.cc:
  fixed bug of lack of fix_fields call
2003-08-23 13:29:38 +03:00
unknown
3808546d8a Code cleanup
sql/item.cc:
  As far as now transformer called after setup_wild() it is impossible to have '*' Item
sql/item.h:
  As far as now transformer called after setup_wild() it is impossible to have '*' Item
sql/item_subselect.cc:
  replaced Item_ref_on_list_position (which need erly ref_array initialisation)
sql/mysql_priv.h:
  setup_ref_array moved to st_select_lex class
sql/sql_delete.cc:
  setup_ref_array moved to st_select_lex class
sql/sql_derived.cc:
  setup_ref_array moved to st_select_lex class
sql/sql_lex.cc:
  removed double initialisation
  select_n_having_items moved to any query initializations, because it used in setup_ref_array method
  setup_ref_array moved to st_select_lex class
sql/sql_lex.h:
  setup_ref_array moved to st_select_lex class
sql/sql_select.cc:
  setup_ref_array moved to st_select_lex class
sql/sql_table.cc:
  setup_ref_array moved to st_select_lex class
sql/sql_union.cc:
  setup_ref_array moved to st_select_lex class
sql/sql_update.cc:
  setup_ref_array moved to st_select_lex class
2003-08-16 13:26:48 +03:00
unknown
2f27bbd977 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-simple_in-4.1


sql/item_sum.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_union.cc:
  Auto merged
2003-08-13 10:12:41 +03:00
unknown
45b145a96e fixed problem with reference on derived table fields (BUG#1031)
mysql-test/r/derived.result:
  test of BUG#1031
mysql-test/t/derived.test:
  test of BUG#1031
sql/item_sum.cc:
  'alias' parameter added to create_tmp_table
sql/sql_derived.cc:
  Derived table should be named (to pass it name to Field and then to Item_field)
sql/sql_select.cc:
  'alias' parameter added to create_tmp_table
sql/sql_select.h:
  'alias' parameter added to create_tmp_table
sql/sql_union.cc:
  'alias' parameter added to create_tmp_table
sql/sql_update.cc:
  'alias' parameter added to create_tmp_table
2003-08-12 15:04:49 +03:00
unknown
e64769909c merge
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/table.h:
  Auto merged
2003-08-11 11:51:33 +03:00
unknown
6496a0dd14 merge
mysql-test/r/innodb.result:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
2003-08-06 18:59:26 +03:00
unknown
6181294dab merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-08-05 09:56:21 +03:00
unknown
0792c1c824 count HAVING clause elements with select list elements, because agregate function can be present in it (BUG#922)
removerd unused loop_id


mysql-test/r/subselect.result:
  test of BUG#922
mysql-test/t/subselect.test:
  test of BUG#922
sql/item.cc:
  removerd unused loop_id
  we need count HAVING clause elements, because agregate function can be present in it
sql/item.h:
  removerd unused loop_id
sql/item_subselect.cc:
  new name of field
sql/sql_derived.cc:
  new name of field
sql/sql_lex.cc:
  new name of field
sql/sql_lex.h:
  new name of field
sql/sql_select.cc:
  new name of field
sql/sql_union.cc:
  new name of field
2003-07-29 13:00:32 +03:00
unknown
5dadac8701 Merge
mysql-test/r/innodb.result:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/table.h:
  Auto merged
2003-07-19 18:49:04 +03:00
unknown
69be8b9d64 (SCRUM)
It looks like samll revolution in SELECT_LEX tree, but it was only natural way to solve problem with name resolution of external fields inside subselect which belongs to global order of union
also it have following advantages:
 - removed mess with current_select type conversion
   - type checking/converting
   - a lot of virtual methods
 - fake select for union execution allocated only once (it was allocated for every subselect with union executing)

changes:
fixed bug with outer fields name resolution of subqueries which belong to global ORDER BY clause
remuved select_lex() function, now thd->lex.current_select always have type SELECT_LEX
new SELECT_LEX (fake_select_lex) will be allocated in case of UNION for using in UNION processing
fake_select_lex allocated for union hold global ORDER BY & LIMIT clauses and have linkage equal to GLOBAL_OPTIONS_TYPE 
new description of SELECT_LEX tree

(SCRUM)


sql/item.cc:
  global parameters moved to fake_select_lex
sql/item_subselect.cc:
  global parameters moved to fake_select_lex
sql/item_sum.cc:
  no need type checking & converion now
sql/sql_delete.cc:
  no need type checking & converion now
sql/sql_derived.cc:
  global parameters moved to fake_select_lex
sql/sql_lex.cc:
  not used fields/mrthods moved from st_select_lex_node to st_select_lex
  global parameters moved to fake_select_lex
sql/sql_lex.h:
  comments about new tree of select_lex s
  not used fields/mrthods moved from st_select_lex_node to st_select_lex
  global parameters moved to fake_select_lex
sql/sql_parse.cc:
  global parameters moved to fake_select_lex
  allocation of fake_select_lex on demand
sql/sql_select.cc:
  now fake_select_lex marked as GLOBAL_OPTIONS_TYPE
sql/sql_union.cc:
  global parameters moved to fake_select_lex
sql/sql_yacc.yy:
  global parameters moved to fake_select_lex
2003-07-03 02:30:52 +03:00
unknown
16aaba7060 merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_derived.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.h:
  Auto merged
mysql-test/r/subselect.result:
  merging (wiil be fixed after building)
sql/item_subselect.cc:
  merging
sql/sql_select.cc:
  merging
2003-06-25 23:52:15 +03:00
unknown
4ac20ad4a9 Derived tables bug fix .......
sql/ha_myisam.cc:
  DISABLE KEYS warnings
sql/sql_table.cc:
  DISABLE KEYS warnings
2003-06-12 16:52:36 +03:00
unknown
3c10f3bc12 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1


sql/sql_derived.cc:
  Auto merged
2003-05-31 18:38:41 +03:00
unknown
c47c564526 Fix for the optimiser problem caused by the fact that with derived
tables one (or more tables) is opened / closed twice.
2003-05-31 18:31:57 +03:00
unknown
145aa40d59 merging
sql/item.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-05-26 15:52:19 +03:00
unknown
22d356c807 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-top-4.1


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-05-26 09:28:56 +03:00
unknown
f72611b4fa After merge fixes
Added initialization of all important global variables


BUILD/SETUP.sh:
  build with readline
client/mysqltest.c:
  Added variable SERVER_VERSION
myisam/mi_key.c:
  Indentation change
myisam/mi_open.c:
  After merge fix
myisam/mi_range.c:
  After merge fix
myisam/mi_rkey.c:
  After merge fix
myisam/mi_search.c:
  After merge fix
myisam/myisamdef.h:
  After merge fix
mysql-test/include/not_embedded.inc:
  Fix test (because of wrong utf8 test)
mysql-test/r/alter_table.result:
  Updated results after merge
mysql-test/r/create.result:
  Updated results after merge
mysql-test/r/ctype_recoding.result:
  Updated results after merge
mysql-test/r/fulltext.result:
  Updated results after merge
mysql-test/r/func_group.result:
  Updated results after merge
mysql-test/r/group_by.result:
  Updated results after merge
mysql-test/r/innodb.result:
  Updated results after merge
mysql-test/r/join_outer.result:
  Updated results after merge
mysql-test/r/null_key.result:
  Updated results after merge
mysql-test/r/order_by.result:
  Updated results after merge
mysql-test/r/query_cache.result:
  Updated results after merge
mysql-test/r/repair.result:
  Updated results after merge
mysql-test/r/rpl_flush_tables.result:
  Updated results after merge
mysql-test/r/union.result:
  Updated results after merge
mysql-test/r/update.result:
  Updated results after merge
mysql-test/t/ansi.test:
  After merge fixes
mysql-test/t/create.test:
  After merge fixes
mysql-test/t/ctype_recoding.test:
  After merge fixes
mysql-test/t/ctype_ujis.test:
  After merge fixes
mysql-test/t/fulltext.test:
  After merge fixes
mysql-test/t/innodb.test:
  After merge fixes
mysql-test/t/join_outer.test:
  After merge fixes
mysql-test/t/loaddata.test:
  After merge fixes
mysql-test/t/order_by.test:
  After merge fixes
mysql-test/t/rpl_flush_tables.test:
  After merge fixes
mysql-test/t/status.test:
  After merge fixes
mysql-test/t/subselect.test:
  After merge fixes
sql/convert.cc:
  Code cleanup
sql/field.cc:
  After merge fixes
sql/filesort.cc:
  Remove compiler warning
sql/item.cc:
  More efficient set_name() (no mallocs)
sql/item_cmpfunc.cc:
  Code Code cleanup
  Item_bool_func2::fix_fields() added to get error handling right for cmp_charset
sql/item_cmpfunc.h:
  New prototypes
sql/item_func.cc:
  After merge fix
sql/item_strfunc.cc:
  Faster check for BINARY
sql/log_event.cc:
  Comment cleanup
sql/mysql_priv.h:
  New prototypes and variables
sql/mysqld.cc:
  Added initialization of all important global variables.
  Cleanup of variable declarations
  This is needed ot make the embedded version restartable
sql/opt_sum.cc:
  After merge fix
sql/set_var.cc:
  Code cleanup
sql/sql_acl.cc:
  After merge fix
  Better error message
sql/sql_db.cc:
  After merge fix
sql/sql_derived.cc:
  After merge fix
sql/sql_insert.cc:
  Indentation cleanups
sql/sql_list.h:
  Added empty() to base_ilist
sql/sql_parse.cc:
  After merge fix
sql/sql_select.cc:
  After merge fix
  Fixed derived name handling in EXPLAIN
sql/sql_show.cc:
  After merge fix
sql/sql_string.cc:
  Made copy_and_convert global
sql/sql_string.h:
  Made copy_and_convert global
sql/sql_update.cc:
  After merge fix
sql/sql_yacc.yy:
  After merge fix
sql/thr_malloc.cc:
  Added sql_strmake_with_convert()
sql/unireg.h:
  Added MAX_ALIAS_NAME
strings/ctype-ujis.c:
  Fixed bug in converting to ujis
2003-05-21 21:39:58 +03:00
unknown
acda3d79b6 fixed memory overrun (bug 380)
mysql-test/r/func_group.result:
  new tests
mysql-test/t/func_group.test:
  new tests
sql/item.cc:
  count items in select list
sql/item_subselect.cc:
  use number of item in select list for array creation
sql/item_sum.cc:
  with_sum_func now is boolean
sql/sql_derived.cc:
  use number of item in select list for array creation
sql/sql_lex.cc:
  create_refs changed with parsing_place enum variable
sql/sql_lex.h:
  added items in select list counter
  create_refs changed with parsing_place enum variable
  with_sum_func now is boolean
sql/sql_select.cc:
  use number of item in select list for array creation
sql/sql_union.cc:
  use number of item in select list for array creation
sql/sql_yacc.yy:
  create_refs changed with parsing_place enum variable
2003-05-17 10:05:07 +03:00