Commit graph

218 commits

Author SHA1 Message Date
unknown
3e3990433a Merge bodhi.local:/opt/local/work/mysql-4.1-4968
into  bodhi.local:/opt/local/work/mysql-5.0-4968-pull-from-4.1


sql/sql_insert.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/mysql_priv.h:
  Manual merge.
sql/sql_class.h:
  Manual merge.
sql/sql_lex.cc:
  Manual merge.
sql/sql_lex.h:
  Manual merge.
sql/sql_list.h:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_show.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2006-12-12 01:23:30 +03:00
unknown
e47ded8114 A fix and test cases for
Bug#4968 "Stored procedure crash if cursor opened on altered table"
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
stored procedure."
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"

Test cases for bugs 4968, 19733, 6895 will be added in 5.0.

Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE 
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).
In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).

The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table were not
re-execution friendly: during their operation they used to modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc 
for drop_it.remove() and similar patterns to find evidence.

The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement. 

To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.

The problem of crashing bug 22060 stemmed from the fact that the above 
metnioned functions were not only modifying HA_CREATE_INFO structure in 
LEX, but also were changing it to point to areas in volatile memory of 
the execution memory root.
 
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO (note that code in 5.1 already creates and
uses a copy of this structure in mysql_create_table()/alter_table(),
but this approach didn't work well for CREATE TABLE SELECT statement).


mysql-test/r/ps.result:
  Update test results (Bug#19182, Bug#22060)
mysql-test/t/ps.test:
  Add a test case for Bug#19182, Bug#22060 (4.1-only parts)
sql/mysql_priv.h:
  LEX::key_list and LEX::create_list were moved to LEX::alter_info.
  Update declarations to use LEX::alter_info instead of these two
  members.
sql/sql_class.h:
  Replace pair<columns, keys> with an instance of Alter_info in
  select_create constructor. We create a new copy of Alter_info
  each time we re-execute SELECT .. CREATE prepared statement.
sql/sql_insert.cc:
  Adjust to a new signature of create_table_from_items.
sql/sql_lex.cc:
  Implement Alter_info::Alter_info that would make a "deep" copy
  of all definition lists (keys, columns).
sql/sql_lex.h:
  Move key_list and create_list to class Alter_info. Implement
  Alter_info::Alter_info that can be used with PS and SP.
sql/sql_list.h:
  Implement a copy constructor of class List that makes a deep copy
  of all list nodes.
sql/sql_parse.cc:
  Adjust to new signatures of mysql_create_table, mysql_alter_table,
  select_create. Functions mysql_create_index and mysql_drop_index has
  become identical after initialization of alter_info was moved to the 
  parser, and were merged. Flag enable_slow_log was not updated for 
  SQLCOM_DROP_INDEX, which is a bug. Just like CREATE INDEX, DROP INDEX
  is currently done via complete table rebuild and is rightfully a slow
  administrative statement.
sql/sql_show.cc:
  Adjust mysqld_show_create_db to a new signature.
sql/sql_table.cc:
  Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
  mysql_prepare_table to new signatures.
sql/sql_yacc.yy:
  LEX::key_list and LEX::create_list moved to class Alter_info
2006-12-08 02:20:09 +03:00
unknown
dea988a048 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint


BitKeeper/etc/collapsed:
  auto-union
BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
  Auto merged
include/Makefile.am:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/parser.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/parser.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/system_mysql_db_fix30020.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
mysql-test/r/sp.result:
  Manual merge
mysql-test/r/udf.result:
  Manual merge
mysql-test/t/events_bugs.test:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
support-files/mysql.spec.sh:
  Manual merge
2006-12-04 19:11:55 +01:00
unknown
6ea42e6779 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.1
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt


mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-30 12:27:04 +01:00
unknown
6e791795a2 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-30 12:22:32 +01:00
unknown
56219e755e Merge dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.0-opt
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.1-opt


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-11-29 15:24:51 +01:00
unknown
004aadd6f7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/20327-bug-5.0-opt-mysql


sql/sql_base.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-11-29 15:03:53 +03:00
unknown
fe499575af Bug#20327: Marking of a wrong field leads to a wrong result on select with view,
prepared statement and subquery.

When a field of a view from an outer select is resolved the find_field_in_view
function creates an Item_direct_view_ref object that references the 
corresponding view underlying field. After that the view_ref is marked
as a dependent one. While resolving view underlying field it also get
marked as a dependent one due to current_select still points to the subselect.
Marking the view underlying field is wrong and lead to attaching conditions
to a wrong table and thus to the wrong result of the whole statement.

Now mark_select_range_as_dependent() function isn't called for fields from a 
view underlying table.


sql/sql_base.cc:
  Bug#20327: Marking of a wrong field leads to a wrong result on select with view, prepared statement and subquery.
  
  Now mark_select_range_as_dependent() function isn't called for fields from a
  view underlying table.
mysql-test/r/ps.result:
  Added a test case for bug#20327: Marking of a wrong field leads to a wrong result on select with view, prepared statement and subquery.
mysql-test/t/ps.test:
  Added a test case for bug#20327: Marking of a wrong field leads to a wrong result on select with view,prepared statement and subquery.
2006-11-29 14:52:11 +03:00
unknown
0e978328ae Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


libmysql/libmysql.c:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
server-tools/instance-manager/mysql_connection.cc:
  Rollback Monty's removals of explicit casts
tests/mysql_client_test.c:
  SCCS merged
2006-11-29 11:44:37 +03:00
unknown
5e1c2e3644 Update after merge.
Use mutex when reading prepared_stmt_count global status variable.

Update test case for bug 16365 and bug 23159: add test for
prepared_stmt_count being decreased when some connection that had
prepared statements is closed.


mysql-test/r/ps.result:
  Update result for bug#16365 and bug#23159.
mysql-test/t/ps.test:
  Update test case for bug#16365 and bug#23159: add test for
  prepared_stmt_count being decreased when some connection that had
  prepared statements is closed.
sql/mysqld.cc:
  Use mutex when reading prepared_stmt_count global status variable.
2006-11-21 17:23:54 +03:00
unknown
8b4a32afcd Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug23159


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  SCCS merged
2006-11-21 17:00:42 +03:00
unknown
fdc37f0666 Fix after manual merge.
mysql-test/r/ps.result:
  Fix after manual merge: update for different error message.
mysql-test/t/ps.test:
  Fix after manual merge: use right error codes.
2006-11-21 16:57:23 +03:00
unknown
596e29c253 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug23159
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159


mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/set_var.cc:
  Manual merge.
2006-11-21 16:53:33 +03:00
unknown
7a45fb546f BUG#23159: prepared_stmt_count should be status variable
Make Prepared_stmt_count a global status variable, accessible via
SHOW STATUS LIKE 'Prepared_stmt_count';.  Documentation should be
updated.


mysql-test/r/ps.result:
  Update result for bug#16365: Prepared Statements: DoS with too many
  open statements, according to bug#23159: prepared_stmt_count should be
  status variable.
mysql-test/t/ps.test:
  Update test case for bug#16365: Prepared Statements: DoS with too many
  open statements, according to bug#23159: prepared_stmt_count should be
  status variable.
sql/mysqld.cc:
  Add Prepared_stmt_count as global status variable.
sql/set_var.cc:
  Remove prepared_stmt_count as system variable.
2006-11-21 16:49:18 +03:00
unknown
a2beabfe10 Bug#23983 ps.test fails to open shared library
- When a shared library argument is supplied, it's checked for an OS
specific directory separator. The expected error is different
depending on the separator used. Create OS specific versions of these
tests.


mysql-test/r/ps.result:
  Bug#23983 ps.test fails to open shared library
  - Moving to OS specific results.
mysql-test/r/windows.result:
  Bug#23983 ps.test fails to open shared library
  - OS Specific result for shared library argument with path
mysql-test/t/ps.test:
  Bug#23983 ps.test fails to open shared library
  - Moving to OS specific tests.
mysql-test/t/windows.test:
  Bug#23983 ps.test fails to open shared library
  - OS Specific test for shared library argument with path
mysql-test/r/ps_not_windows.result:
  Bug#23983 ps.test fails to open shared library
  - OS Specific result for shared library argument with path
mysql-test/t/ps_not_windows.test:
  Bug#23983 ps.test fails to open shared library
  - OS Specific test for shared library argument with path
2006-11-20 15:18:57 -05:00
unknown
9eb09ef219 Merge amd64.:D:/src/mysql-5.1-maint
into  amd64.:D:/src/mysql-5.1-maint_bug23983


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
2006-11-17 17:34:55 -05:00
unknown
3ee0d5de3f Bug#23983 ps.test fails to open shared library.
- When a shared library argument is supplied, it's checked for an OS
specific directory separator.  The expected error is different
depending on the separator used. Created OS specific versions of these
tests.


mysql-test/r/ps.result:
  Bug#23983 ps.test fails to open shared library.
  - Moving to OS specific results.
mysql-test/r/windows.result:
  Bug#23983 ps.test fails to open shared library.
  - OS Specific result for shared library argument with path
mysql-test/t/ps.test:
  Bug#23983 ps.test fails to open shared library.
  - Moving to OS specific tests.
mysql-test/t/windows.test:
  Bug#23983 ps.test fails to open shared library.
  - OS Specific test for shared library argument with path
mysql-test/r/ps_not_windows.result:
  Bug#23983 ps.test fails to open shared library.
  - OS Specific result for shared library argument with path
mysql-test/t/ps_not_windows.test:
  Bug#23983 ps.test fails to open shared library.
  - OS Specific test for shared library argument with path
2006-11-17 16:52:41 -05:00
unknown
b84e9d10b4 Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).


mysql-test/r/func_time.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/gis.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/r/grant2.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/innodb_notembedded.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/ps.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/r/query_cache.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/query_cache_notembedded.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/rpl_sp.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Move test for SF-calls in different replication modes to its own file, rpl_sf.
mysql-test/r/rpl_sp_effects.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/sp.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/r/timezone2.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/func_time.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/gis.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/t/grant2.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/innodb_notembedded.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/ps.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache_notembedded.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp_effects.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/sp.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/t/timezone2.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
sql/item_func.cc:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  If 'log_bin_trust_function_creators' variable is set, don't throw an error
  on calling a non-deterministc function in statement-based replication (SBR).
sql/sql_parse.cc:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP)
  while doing statement-based replication (SBR), as the routine body is
  executed statement-by-statement.
mysql-test/r/rpl_sf.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Test for stored function (SF) calls in different replication modes.
  NON DETERMINISTIC SFs are not allowed while doing
  statement-based replication (SBR).
mysql-test/t/rpl_sf.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Test for stored function (SF) calls in different replication modes.
  NON DETERMINISTIC SFs are not allowed while doing
  statement-based replication (SBR).
2006-11-17 21:30:28 +01:00
unknown
2975d65cd8 Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
Before this change, the functions BENCHMARK, ENCODE, DECODE and FORMAT could
only accept a constant for some parameters.

After this change, this restriction has been removed. An implication is that
these functions can also be used in prepared statements.

The change consist of changing the following classes:
- Item_func_benchmark
- Item_func_encode
- Item_func_decode
- Item_func_format
to:
- only accept Item* in the constructor,
- and evaluate arguments during calls to val_xxx()
which fits the general design of all the other functions.

The 'TODO' items identified in item_create.cc during the work done for
Bug 21114 are addressed by this fix, as a natural consequence of aligning
the design.

In the 'func_str' test, a single very long test line involving an explain
extended select with many functions has been rewritten into multiple
separate tests, to improve maintainability.
The result of explain extended select decode(encode(...)) has changed,
since the encode and decode functions now print all their parameters.


mysql-test/r/func_str.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/parser.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/ps.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/func_str.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/parser.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/ps.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_create.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.h:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.h:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
2006-11-16 09:03:47 -07:00
unknown
e50678f1ce Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged-2


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/kill.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_timefunc.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/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/time.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manually merged.
sql/sql_parse.cc:
  Manually merged.
2006-11-07 16:24:35 +03:00
unknown
75ed6f1a3b Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


BitKeeper/deleted/.del-CMakeLists.txt~1:
  Auto merged
BitKeeper/deleted/.del-make_win_bin_dist:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/log_tables.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
netware/BUILD/mwenv:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.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/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.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_prepare.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_union.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
include/my_time.h:
  manual merge.
mysql-test/mysql-test-run.pl:
  manual merge.
mysql-test/r/ps.result:
  manual merge.
mysql-test/t/disabled.def:
  manual merge.
mysql-test/t/ps.test:
  manual merge.
2006-11-02 17:51:59 -05:00
unknown
f0364b7b84 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.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_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_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge.
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
2006-11-02 17:39:52 -05:00
unknown
0af0c44329 Post merge fix 2006-11-02 14:02:07 -07:00
unknown
74a15e2f8e A post-merge fix. 2006-11-02 08:58:51 +03:00
unknown
31a87fde6a Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
mysql-test/r/ps.result:
  SCCS merged
2006-11-02 03:24:11 +03:00
unknown
2886e07d3f Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.local:/opt/local/work/mysql-4.1-runtime


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2006-11-02 01:08:39 +03:00
unknown
de304106ca Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21856


sql/sql_parse.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
2006-10-19 14:53:50 +04:00
unknown
f9b9c89061 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21856
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21856


sql/sql_parse.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
2006-10-19 14:49:16 +04:00
unknown
ef2d2165d1 BUG#21856: Prepared Statements: crash if bad create
When statement to be prepared contained CREATE PROCEDURE, CREATE FUNCTION
or CREATE TRIGGER statements with a syntax error in it, the preparation
would fail with syntax error message, but the memory could be corrupted.

The problem occurred because we switch memroot when parse stored
routine or trigger definitions, and on parse error we restored the
original memroot only after performing some memory operations.  In more
detail:
 - prepared statement would activate its own memory root to parse
   the definition of the stored procedure.
 - SP would reset this memory root with its own memory root to
   parse SP statements
 - a syntax error would happen
 - prepared statement would restore the original memory root
 - stored procedure would restore what it thinks was the original
   memory root, but actually was the statement memory root.
That led to double free - in destruction of the statement and in
a next call to mysql_parse().

The solution is to restore memroot right after the failed parsing.


mysql-test/r/ps.result:
  Add result for bug#21856: Prepared Statements: crash if bad create.
mysql-test/t/ps.test:
  Add test case for bug#21856: Prepared Statements: crash if bad create.
sql/sql_parse.cc:
  On parse error if thd->lex->sphead is set we have to free sp_head object
  to restore statement memroot, if it was switched during parsing.
  
  The change here is for safety, currently query_cache_abort() and
  lex->unit.cleanup() calls do not use current memroot.
sql/sql_prepare.cc:
  On parse error if thd->lex->sphead is set we have to free sp_head object
  to restore statement memroot, if it was switched during parsing.
2006-10-19 14:43:52 +04:00
unknown
099d87419e Update ps and show_check results to account for new -master.opt settings.
mysql-test/r/ps.result:
  Update test results to account for new ps-master.opt settings
mysql-test/r/show_check.result:
  Update test results to account for new show_check-master.opt settings
2006-10-17 12:15:14 -06:00
unknown
1e8c450dea Merge siva.hindu.god:/usr/home/tim/m/bk/b19764/50
into  siva.hindu.god:/usr/home/tim/m/bk/tmp/mrgOct16/50


sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-10-16 20:15:14 -06:00
unknown
d0172194e3 Merge siva.hindu.god:/usr/home/tim/m/bk/b19764/50
into  siva.hindu.god:/usr/home/tim/m/bk/b19764/51


mysql-test/r/union.result:
  Manual merge (use local)
sql/sql_lex.cc:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
sql/sql_parse.cc:
  Manual merge (use local)
sql/sql_prepare.cc:
  Manual merge (use local)
sql/sql_yacc.yy:
  SCCS merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/r/show_check.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
mysql-test/t/show_check.test:
  Manual merge
2006-10-16 18:42:22 -06:00
unknown
99d42667d6 Bug #19764: SHOW commands end up in the slow log as table scans
Do not consider SHOW commands slow queries, just because they don't use proper indexes.

This bug fix is not needed in 5.1, and the code changes will be null merged.  However, the test cases will be propogated up to 5.1.


mysql-test/t/show_check-master.opt:
  Rename: BitKeeper/deleted/.del-show_check-master.opt -> mysql-test/t/show_check-master.opt
mysql-test/r/ps.result:
  Add test case for bug 19764
mysql-test/r/show_check.result:
  Add test case for bug 19764
mysql-test/r/union.result:
  Adjust test case results based on bug #19764 changes
mysql-test/t/ps.test:
  Add test case for bug 19764
mysql-test/t/show_check.test:
  Add test case for bug 19764
sql/sql_parse.cc:
  Do not log SHOW commands as slow queries just because they don't use indexes.
sql/sql_prepare.cc:
  Save stmt_backup.lex->orig_sql_command for use in log_slow_statement()
mysql-test/t/ps-master.opt:
  Add log-slow-queries and --log-queries-not-using indexes, to test bug #19764
2006-10-12 17:10:34 -06:00
unknown
6b3953286d BUG#21524 ps.test updated to meet recent changes in SQL parser
mysql-test/r/ps.result:
  brand new ps.result recorded out of updated ps.test output
mysql-test/t/disabled.def:
  ps.test enabled anew
mysql-test/t/ps.test:
  ps.test updated to ensure FLUSH/RESET are not allowed in stored functions at both
  parse and execution time
2006-10-11 15:53:56 +04:00
unknown
46a3e809fc BUG#21524 ER_CANT_OPEN_LIBRARY output message used to confuse mysqltest on Solaris. Varying part of the message is now suppressed
mysql-test/r/ps.result:
  ps.result updated
mysql-test/t/ps.test:
  The error code and the additional output grepped out of ER_CANT_OPEN_LIBRARY message due to the output varies across different platforms
2006-10-11 07:08:32 +04:00
unknown
de443be6b5 BUG#21524 ps.test updated to meet recent changes in SQL parser
mysql-test/r/ps.result:
  brand new ps.result recorded out of updated ps.test output
mysql-test/t/disabled.def:
  ps.test enabled anew
mysql-test/t/ps.test:
  ps.test updated to ensure FLUSH/RESET are not allowed in stored functions at both parse and execution time
2006-10-11 02:36:36 +04:00
unknown
c3627cdbe4 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-runtime
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21354


mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
2006-10-10 18:14:06 +04:00
unknown
bc51362441 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354


mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
2006-10-10 18:11:10 +04:00
unknown
0540c6ad4b Fix after manual merge. 2006-10-10 18:06:08 +04:00
unknown
c370208a4c Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21354


mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
2006-10-10 17:28:11 +04:00
unknown
e32f277c61 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21354
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354


mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/item_sum.h:
  Manual merge.
2006-10-10 17:18:36 +04:00
unknown
3177e8ebc4 BUG#21354: (COUNT(*) = 1) not working in SELECT inside prepared
statement.

The problem was that during statement re-execution if the result was
empty the old result could be returned for group functions.

The solution is to implement proper cleanup() method in group
functions.


mysql-test/r/ps.result:
  Add result for bug#21354: (COUNT(*) = 1) not working in SELECT inside
  prepared statement.
mysql-test/t/func_gconcat.test:
  Add a comment that the test case is from bug#836.
mysql-test/t/ps.test:
  Add test case for bug#21354: (COUNT(*) = 1) not working in SELECT inside
  prepared statement.
sql/item_sum.cc:
  Call clear() in Item_sum_count::cleanup().
sql/item_sum.h:
  Add comments.
  Add proper cleanup() methods.
  Change Item_sum::no_rows_in_result() to call clear() instead of reset(),
  as the latter also issues add(), and there is nothing to add when there
  are no rows in result.
2006-10-10 17:08:47 +04:00
unknown
e634094680 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


BitKeeper/etc/collapsed:
  auto-union
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-10-03 13:27:48 +02:00
unknown
dc62ff5560 Merge mysql.com:/usr/home/bar/mysql-4.1.b8663
into  mysql.com:/usr/home/bar/mysql-4.1-rpl


mysql-test/r/cast.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-10-03 11:53:01 +05:00
unknown
2e2198633e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2006-10-02 22:53:10 +04:00
unknown
f849da24c4 Merge siva.hindu.god:/usr/home/tim/m/bk/50
into  siva.hindu.god:/usr/home/tim/m/bk/mrg/51


include/my_global.h:
  Auto merged
include/mysql_com.h:
  Auto merged
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/func_time.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/func_time.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_cmpfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.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_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Manual merge (use local)
mysql-test/t/ctype_utf8.test:
  Manual merge (use local)
mysql-test/r/ps.result:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
sql/unireg.cc:
  Manual merge
2006-09-29 18:04:34 -06:00
unknown
8a67e3cc46 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21081
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21081


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
2006-09-27 23:26:13 +04:00
unknown
7efdc62f9d BUG#21081: SELECT inside stored procedure returns wrong results
Re-execution of a parametrized prepared statement or a stored routine
with a SELECT that use LEFT JOIN with second table having only one row
could yield incorrect result.

The problem appeared only for left joins with second table having only
one row (aka const table) and equation conditions in ON or WHERE clauses
that depend on the argument passed.  Once the condition was false for
second const table, a NULL row was created for it, and any field involved
got NULL-value flag, which then was never reset.

The cause of the problem was that Item_field::null_value could be set
without being reset for re-execution.  The solution is to reset
Item_field::null_value in Item_field::cleanup().


mysql-test/r/ps.result:
  Add result for bug#21081: SELECT inside stored procedure returns wrong
  results.
mysql-test/t/ps.test:
  Add test case for bug#21081: SELECT inside stored procedure returns wrong
  results.
sql/item.cc:
  Reset Item_field::null_value flag for re-execution.
2006-09-27 23:11:45 +04:00
unknown
76b354dcf7 Post-merge corrections. 2006-09-19 12:18:24 -07:00
unknown
4095b98598 Merge rurik.mysql.com:/home/igor/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
sql/sql_select.cc:
  Manual merge
2006-09-19 10:09:02 -07:00
unknown
c46151d961 Fixed bug #22085: Crash on the execution of a prepared
statement that uses an aggregating IN subquery with 
HAVING clause.
A wrong order of the call of split_sum_func2 for the HAVING
clause of the subquery and the transformation for the 
subquery resulted in the creation of a andor structure
that could not be restored at an execution of the prepared
statement.


mysql-test/r/ps.result:
  Added a test cases for bug #22085.
mysql-test/t/ps.test:
  Added a test cases for bug #22085.
2006-09-16 11:50:00 -07:00
unknown
5fab3969af Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-safemerge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


BitKeeper/deleted/.del-im_check_os.inc:
  Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
  Auto merged
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
  Auto merged
configure.in:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/r/im_utils.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/type_varchar.result:
  Auto merged
mysql-test/r/view.result:
  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/sp-error.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/type_varchar.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  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_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_cache.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/mysql-test-run.pl:
  Use local. Alik will merge his changes manually.
mysql-test/lib/mtr_process.pl:
  Use local.
mysql-test/r/grant.result:
  Use local.
mysql-test/r/sp.result:
  Use local.
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/grant.test:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/Makefile.am:
  Manual merge.
sql/field.cc:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/share/errmsg.txt:
  Manual merge.
sql/sp.cc:
  Manual merge.
sql/sp_head.h:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_view.cc:
  Manual merge.
2006-08-30 03:00:19 +04:00
unknown
965a3970c9 BUG#21166: Prepared statement causes signal 11 on second execution
Changes in an item tree done by optimizer weren't properly
registered and went unnoticed, which resulted in preliminary freeing
of used memory.


mysql-test/r/ps.result:
  Add result for bug#21166: Prepared statement causes signal 11
  on second execution.
mysql-test/t/ps.test:
  Add test case for bug#21166: Prepared statement causes signal 11
  on second execution.
sql/item.cc:
  Move Item::transform() and Item_default_value::transform() from
  item.h here and use THD::change_item_tree() instead of plain
  assignment.
  Change Item_field::set_no_const_sub() to be used with Item::walk()
  instead of Item::transform().
sql/item.h:
  Move definition of Item::transform() and Item_default_value::transform()
  to item.cc.
  Change Item::set_no_const_sub() to be used with Item::walk()
  instead of Item::transform().
sql/item_cmpfunc.cc:
  Use Item::walk() to execute Item::set_no_const_sub().
  Use THD::change_item_tree() instead of plain assignment.
sql/item_func.cc:
  Add assert and comment to Item_func::traverse_cond().
sql/item_row.cc:
  Use THD::change_item_tree() instead of plain assignment.
sql/item_strfunc.cc:
  Move Item_func_make_set::transform() from item_strfunc.h here and use
  THD::change_item_tree() instead of plain assignment.
sql/item_strfunc.h:
  Move definition of Item_func_make_set::transform() to item_strfunc.cc.
2006-08-24 15:49:12 +04:00
unknown
7a37eeae62 Fix for bug #20665 All commands supported in Stored Procedures
should work in Prepared Statements. Post-review changeset.

Problem: There are some commands which are avaiable to be executed in SP
         but cannot be prepared. This patch fixes this and makes it possible
         prepare these statements.

Changes: The commands later are made available in PS. RESET has been forbidden
         in SF/Trigger.

Solution: All current server commands where checked and those missing (see later)
          we added. Tests for all of the commands with repeated executions were
          added - testing with SP, SF and PS.

SHOW BINLOG EVENTS
SHOW (MASTER | SLAVE) STATUS
SHOW (MASTER | BINARY) LOGS
SHOW (PROCEDURE | FUNCTION) CODE (parsable only in debug builds)
SHOW CREATE (PROCEDURE | FUNCTION | EVENT | TABLE | VIEW)
SHOW (AUTHORS | CONTRIBUTORS | WARNINGS | ERRORS)
CHANGE MASTER
RESET (MASTER | SLAVE | QUERY CACHE)
SLAVE (START | STOP)
CHECKSUM (TABLE | TABLES)
INSTALL PLUGIN
UNINSTALL PLUGIN
CACHE INDEX
LOAD INDEX INTO CACHE
GRANT
REVOKE
KILL
(CREATE | RENAME | DROP) DATABASE
(CREATE | RENAME | DROP) USER
FLUSH (TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES |
       LOGS | STATUS | MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES)


mysql-test/r/ps.result:
  update result
mysql-test/r/ps_1general.result:
  update result
mysql-test/r/ps_grant.result:
  update result
mysql-test/r/sp-dynamic.result:
  update result
mysql-test/t/ps.test:
  Add more statements, probably all currently missing which are possible in
  a SP but not preparable.
  Every statement is tested in a SP, in a SF and attempted to prepare.
mysql-test/t/ps_1general.test:
  - Enable some of the statements, which are already possible in SP.
  - 1295 -> ER_UNSUPPORTED_PS
mysql-test/t/ps_grant.test:
  Enable statements already possible in SP.
sql/sp_head.cc:
  - Reorder to keep some alphabet order.
  - Add missing SHOW_SCHEDULER_STATUS.
sql/sql_prepare.cc:
  Add possibility to prepare statements, which are already allowed in SP.
2006-08-23 15:50:06 +02:00
unknown
a0efaba363 A post-merge fix. 2006-08-02 19:39:47 +04:00
unknown
f3919e9284 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


include/mysql.h:
  Auto merged
include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-02 14:13:01 +04:00
unknown
d10db4cf6c Merge rama.(none):/home/jimw/my/tmp_merge
into  rama.(none):/home/jimw/my/mysql-5.1-clean


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
extra/yassl/include/openssl/ssl.h:
  Auto merged
extra/yassl/include/yassl_int.hpp:
  Auto merged
extra/yassl/src/ssl.cpp:
  Auto merged
extra/yassl/src/template_instnt.cpp:
  Auto merged
extra/yassl/src/yassl_imp.cpp:
  Auto merged
extra/yassl/src/yassl_int.cpp:
  Auto merged
include/mysql.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/embedded_priv.h:
  Auto merged
BitKeeper/deleted/.del-mysql_explain_log.sh~5ddc62808e16bd57:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/mysqldump-max.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_string.h:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/time.cc:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
BitKeeper/deleted/.del-have_case_sensitive_file_system.inc:
  Delete: mysql-test/include/have_case_sensitive_file_system.inc
BitKeeper/deleted/.del-case_sensitive_file_system.require:
  Delete: mysql-test/r/case_sensitive_file_system.require
mysql-test/lib/mtr_cases.pl:
  Resolve conflict
mysql-test/mysql-test-run.pl:
  Resolve conflict
mysql-test/r/mysqldump.result:
  Resolve conflict
mysql-test/t/mysqldump.test:
  Resolve conflict
sql/sql_parse.cc:
  Resolve conflict
2006-07-28 15:51:48 -07:00
unknown
23c514508e 4.1 -> 5.0 merge fixes 2006-07-14 05:56:30 -07:00
unknown
35bfad1e3d 4.1 -> 5.0 merge
client/mysql.cc:
  Auto merged
client/sql_string.h:
  Auto merged
configure.in:
  Auto merged
myisam/mi_create.c:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_string.h:
  Auto merged
sql/table.cc:
  Auto merged
2006-07-13 16:35:25 -07: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
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
df9b4754b7 Merge bodhi.netgear:/opt/local/work/tmp_merge
into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0


mysql-test/r/create.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_strfunc.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_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
include/my_sys.h:
  Manual merge (second attempt).
mysql-test/r/bdb.result:
  Manual merge (second attempt).
mysql-test/t/bdb.test:
  Manual merge (second attempt).
mysys/my_malloc.c:
  Manual merge (second attempt).
mysys/safemalloc.c:
  Manual merge (second attempt).
sql/ha_federated.cc:
  Manual merge (second attempt).
sql/log_event.cc:
  Manual merge (second attempt).
sql/set_var.cc:
  Manual merge (second attempt).
sql/set_var.h:
  Manual merge (second attempt).
sql/slave.cc:
  Manual merge (second attempt).
sql/slave.h:
  Manual merge (second attempt).
sql/sql_class.h:
  Manual merge (second attempt).
sql/sql_table.cc:
  Manual merge (second attempt).
sql/sql_udf.cc:
  Manual merge (second attempt).
sql/sql_yacc.yy:
  Manual merge (second attempt).
2006-07-06 22:55:48 +04:00
unknown
d6bcbfbe92 A fix and a test case for
Bug#19022 "Memory bug when switching db during trigger execution"
 Bug#17199 "Problem when view calls function from another database."
 Bug#18444 "Fully qualified stored function names don't work correctly in
            SELECT statements"

 Documentation note: this patch introduces a change in behaviour of prepared
 statements.

 This patch adds a few new invariants with regard to how THD::db should
 be used. These invariants should be preserved in future:

  - one should never refer to THD::db by pointer and always make a deep copy
    (strmake, strdup)
  - one should never compare two databases by pointer, but use strncmp or
    my_strncasecmp
  - TABLE_LIST object table->db should be always initialized in the parser or
    by creator of the object.

    For prepared statements it means that if the current database is changed
    after a statement is prepared, the database that was current at prepare
    remains active. This also means that you can not prepare a statement that
    implicitly refers to the current database if the latter is not set.
    This is not documented, and therefore needs documentation. This is NOT a
    change in behavior for almost all SQL statements except:
     - ALTER TABLE t1 RENAME t2 
     - OPTIMIZE TABLE t1
     - ANALYZE TABLE t1
     - TRUNCATE TABLE t1 --
     until this patch t1 or t2 could be evaluated at the first execution of
     prepared statement. 

     CURRENT_DATABASE() still works OK and is evaluated at every execution
     of prepared statement.

     Note, that in stored routines this is not an issue as the default
     database is the database of the stored procedure and "use" statement
     is prohibited in stored routines.

  This patch makes obsolete the use of check_db_used (it was never used in the
  old code too) and all other places that check for table->db and assign it
  from THD::db if it's NULL, except the parser.

 How this patch was created: THD::{db,db_length} were replaced with a
 LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were
 manually checked and:
  - if the place uses thd->db by pointer, it was fixed to make a deep copy
  - if a place compared two db pointers, it was fixed to compare them by value
    (via strcmp/my_strcasecmp, whatever was approproate)
 Then this intermediate patch was used to write a smaller patch that does the
 same thing but without a rename.

 TODO in 5.1:
   - remove check_db_used
   - deploy THD::set_db in mysql_change_db

 See also comments to individual files.


mysql-test/r/create.result:
  Modify the result file: a database can never be NULL.
mysql-test/r/ps.result:
  Update test results (Bug#17199 et al)
mysql-test/r/sp.result:
  Update test results (Bug#17199 et al)
mysql-test/t/create.test:
  Update the id of the returned error.
mysql-test/t/ps.test:
  Add test coverage for prepared statements and current database. In scope of
  work on Bug#17199 "Problem when view calls function from another database."
mysql-test/t/sp.test:
  Add a test case for Bug#17199 "Problem when view calls function from another
  database." and Bug#18444 "Fully qualified stored function names don't work
  correctly in SELECT statements". Test a complementary problem.
sql/item_strfunc.cc:
  Touch the code that reads thd->db (cleanup).
sql/log_event.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.h:
  Remove a declaration for a method that is used only in one module.
sql/sp.cc:
  Rewrite sp_use_new_db: this is a cleanup that I needed in order to understand
  this function and ensure that it has no bugs.
sql/sp.h:
  Add a new declaration for sp_use_new_db (uses LEX_STRINGs) and a comment.
sql/sp_head.cc:
  - drop sp_name_current_db_new - a creator of sp_name class that was used
  when sp_name was created for an identifier without an explicitly initialized
  database. Now we pass thd->db to constructor of sp_name right in the 
  parser.
  - rewrite sp_head::init_strings: name->m_db is always set now
  - use the new variant of sp_use_new_db
  - we don't need to update thd->db with SP MEM_ROOT pointer anymore when
  parsing a stored procedure, as noone will refer to it (yes!)
sql/sp_head.h:
  - remove unneded methods and members
sql/sql_class.h:
  - introduce 3 THD  methods to work with THD::db:
    .set_db to assign the current database
    .reset_db to reset the current database (temporarily) or set it to NULL
    .opt_copy_db_to - to deep-copy thd->db to a pointer if it's not NULL
sql/sql_db.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_insert.cc:
  - replace checks with asserts: table_list->db must be always set in the parser.
sql/sql_lex.h:
  - add a comment
sql/sql_parse.cc:
  - implement the invariant described in the changeset comment.
  - remove juggling with lex->sphead in SQLCOM_CREATE_PROCEDURE:
    now db_load_routine uses its own LEX object and doesn't damage the main
    LEX.
  - add DBUG_ASSERT(0) to unused "check_db_used"
sql/sql_table.cc:
  - replace a check with an assert (table_ident->db)
sql/sql_trigger.cc:
  While we are at it, replace direct access to thd->db with a method.
  Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_udf.cc:
  - use thd->set_db instead of direct modification of to thd->db
sql/sql_view.cc:
  - replace a check with an assert (view->db)
sql/sql_yacc.yy:
  - make sure that we always copy table->db or name->db or ident->db or
    select_lex->db from thd->db if the former is not set. If thd->db
    is not set but is accessed, return an error.
sql/tztime.cc:
  - be nice, never copy thd->db by pointer.
2006-06-27 00:47:52 +04:00
unknown
a1017b09b4 Bug#8663 cant use bgint unsigned as input to cast
Problem: cast to unsigned limited result to 
max signed bigint 9223372036854775808,
instead of max unsigned bigint 18446744073709551615.

Fix: don't use args[0]->val_int() when casting from
a floating point number, use val() instead, with range checkings,
special to unsigned data type.

item_func.cc:
  Special handling of cast from REAL_RESULT
  to unsigned int: we cannot execute args[0]->val_int()
  because it cuts max allowed value to LONGLONG_INT,
  instead of ULONGLONG_INT required.
count_distinct3.test:
  Getting rid of "Data truncated; out of range ..." warnings.
cast.test, cast.result:
  Adding test case.
ps.result:
  Fixing that cast from 6570515219.6535 
  to unsigned didn't round to 6570515220,
  and returned 6570515219 instead.


mysql-test/r/cast.result:
  Adding test case.
mysql-test/r/ps.result:
  Fixing that cast from 6570515219.6535 
  to unsigned didn't round to 6570515220,
  and returned 6570515219 instead.
mysql-test/t/cast.test:
  Adding test case.
mysql-test/t/count_distinct3.test:
  Get rid of "wring unsigned value"
  warnings.
sql/item_func.cc:
  Special handling of cast from REAL)RESULT
  to unsigned int: we cannot execute args[0]->val_int()
  because it cuts max allowed value to LONGLONG_INT,
  instead of ULONGLONG_INT required.
2006-06-14 13:40:21 +05:00
unknown
a68a9cb693 Re-apply missing changeset, orignally pushed by elliot
Add define YASSL_PREFIX when compiling yassl

Import patch from yaSSL
- avoid allocating memory for each call to 'EVP_md5' and 
  'EVP_des_ede3_cbc' which were not released until server was stopped
- Those functions are used from the SQL function 'des_encrypt' and
  'des_decrypt'.

Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files

Bug#20022 mysql-test-run can't be run with secure connections turned on for all testcases
- Part 1, fixes rpl- and federated-tests where connection is made to 127.0.0.1

- Include prefix files that renames all public functions in yaSSLs
  OpenSSL API to ya<function_name>. They will otherwise conflict
  with OpenSSL functions if loaded by an application that uses OpenSSL
  as well as libmysqlclient with yaSSL support.

Bug#18235: assertion/crash when windows mysqld is ended with ctrl-c
  
Two threads both try a shutdown sequence which creates a race to the
de-init/free of certain resources.
  
This exists in similar form in the client as 17926: "mysql.exe crashes
when ctrl-c is pressed in windows."

Update after merge to 5.0

BUG#18669: Session COM_STATISTICS breaks mysqladmin status.
Changed COM_STATISTICS to display the global status, instead of thead status, for slow queries and table opens.

- In function 'handle_grant_struct' when searching the memory structures for an 
  entry to modify, convert all entries here host.hostname is NULL to "" and compare that 
  with the host passed in argument "user_from".
- A user created with hostname "" is stored in "mysql.user" table as host="" but when loaded into 
  memory it'll be stored as host.hostname NULL. Specifiying "" as hostname means
  that "any host" can connect. Thus is's correct to turn on allow_all_hosts
  when such a user is found. 
- Review and fix other places where host.hostname may be NULL.

BUG#19394 OPT_INNODB_THREAD_CONCURRENCY duplicated
Removed duplication (not a user-visible change)


client/Makefile.am:
  Remove $yassl_includes
client/mysqltest.c:
  Turn on ssl_verify_server_cert only if host is "localhost"
extra/yassl/include/openssl/crypto.h:
  Add prefix file for ssl.h
extra/yassl/include/openssl/ssl.h:
  Add include file "prefix_crypto.h" to rename SSL_* functions to yaSSL_*
extra/yassl/include/yassl_int.hpp:
  Import patch yassl.diff
extra/yassl/src/Makefile.am:
  Add defined YASSL_PREFIX when building yassl/testsuite
extra/yassl/src/ssl.cpp:
  Import patch yassl.diff
extra/yassl/src/template_instnt.cpp:
  Import patch yassl.diff
extra/yassl/src/yassl_int.cpp:
  Import patch yassl.diff
extra/yassl/testsuite/Makefile.am:
  Add defined YASSL_PREFIX when building yassl/testsuite
extra/yassl/yassl.vcproj:
  Add define YASSL_PREFIX when compiling yassl
include/violite.h:
  Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files
libmysql/Makefile.am:
  Remove yassl_includes
libmysql_r/Makefile.am:
  Remove yassl_includes
libmysqld/Makefile.am:
  Remove yassl_includes
libmysqld/examples/Makefile.am:
  Remove yassl_includes
mysql-test/r/analyze.result:
  Add missing drop table
mysql-test/r/grant.result:
  Reorder test result
  Add test cases for users with hostname ""
mysql-test/r/ps.result:
  Add missing drop table
mysql-test/t/analyze.test:
  Add missing drop table
mysql-test/t/grant.test:
  Add "use test"
  Add test cases for users with hostname ""
  - Test create, grant and drop as well as connecting as the user with hostname "".
mysql-test/t/ps.test:
  Add missing drop table
server-tools/instance-manager/Makefile.am:
  Remove yassl_includes
sql/Makefile.am:
  Remove yassl_includes
sql/mysqld.cc:
  We have three potential ways of hitting the iceberg:
  - unireg_end()   has basic de-init
  - unireg_abort() has extended de-init
  - main() has a de-init sequence similar to unireg_abort()
  
  In the Windows version of the server, Control-C is handled
  in a different thread from the one main() is in.  The main
  loop is told to end, then unireg_abort() is called.  Its
  de-init and that of main() will then race each other for
  mutex- and cond-var-destroys, free(), and finally exit().
  
  This patch introduces a special case for Windows that will eliminate
  the race by ending the signal-handler via unireg_end() instead if
  SIGINT is signalled.  This seems the least intrusive fix that still
  fixes user-visible behaviour.
  
  Two of the startup options for mysqld, innodb_commit_concurrency
  and innodb_thread_concurrency, were using the same enumeration
  value. Changed to give innodb_commit_concurrency it's own value.
sql/sql_acl.cc:
  Add check if host is NULL
  Add check if grant_name->host.hostname is null
  Convert places where host.hostname is NULL to "" before using it.
sql/sql_parse.cc:
  Calculate and display the global statistics.
vio/Makefile.am:
  Remove yassl_includes
extra/yassl/include/openssl/generate_prefix_files.pl:
  New BitKeeper file ``extra/yassl/include/openssl/generate_prefix_files.pl''
extra/yassl/include/openssl/prefix_crypto.h:
  New BitKeeper file ``extra/yassl/include/openssl/prefix_crypto.h''
extra/yassl/include/openssl/prefix_ssl.h:
  New BitKeeper file ``extra/yassl/include/openssl/prefix_ssl.h''
2006-06-06 14:21:07 +03:00
unknown
5c1b4afb44 Add missing drop table 2006-05-29 16:27:45 +02:00
unknown
5d8f7471af Merge mysql.com:/home/dlenev/mysql-5.0-bg11081
into  mysql.com:/home/dlenev/mysql-5.1-merges


VC++Files/mysql.sln:
  Auto merged
VC++Files/mysys/mysys.vcproj:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/timezone2.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/tztime.h:
  Auto merged
tests/Makefile.am:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-05-02 23:16:53 +04:00
unknown
f28b9a3423 A fix and a test case for Bug#19308 "REPAIR/OPTIMIZE/ANALYZE
supported in SP but not in PS": just enable them in prepared
statements, the supporting functionality was implemented when
they were enabled in stored procedures.


mysql-test/r/ps.result:
  Bug#19308: test results fixed.
mysql-test/r/ps_1general.result:
  Adjust existing test cases (ANALYZE/OPTIMIZE/REPAIR are now
  allowed in prepared statements.
mysql-test/r/sp-dynamic.result:
  Adjust existing test cases (ANALYZE/OPTIMIZE/REPAIR are now
  allowed in prepared statements.
mysql-test/t/ps.test:
  Add a test case for Bug#19308 "REPAIR/OPTIMIZE/ANALYZE supported 
  in SP but not in PS"
mysql-test/t/ps_1general.test:
  Adjust existing test cases (ANALYZE/OPTIMIZE/REPAIR are now
  allowed in prepared statements.
sql/sql_prepare.cc:
  Enable ANALYZE, OPTIMIZE, REPAIR in prepared statements.
2006-04-25 04:27:23 +04:00
unknown
222cd6e891 Merge mysql.com:/opt/local/work/tmp_merge
into  mysql.com:/opt/local/work/mysql-5.1-merge


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/set_var.cc:
  Manual merge.
sql/set_var.h:
  Manual merge.
sql/share/errmsg.txt:
  Manual merge.
2006-04-19 21:12:24 +04:00
unknown
c5ed5c4b1c Post-merge fixes. Add a new error message for max_prepared_stmt_count
limit.


mysql-test/r/ps.result:
  Post-merge fixes.
mysql-test/t/ps.test:
  Post-merge fixes.
sql/share/errmsg.txt:
  Add a new error message for max_prepared_stmt_count limit,
  we can do it in 5.0
sql/sql_class.cc:
  Post-merge fixes.
sql/sql_class.h:
  Post-merge fixes.
sql/sql_prepare.cc:
  Post-merge fixes.
2006-04-13 01:46:44 +04:00
unknown
f37d610147 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-16365


sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge
mysql-test/t/ps.test:
  Manual merge
2006-04-07 23:50:45 +04:00
unknown
5b5530daa5 A fix and a test case for Bug#16365 "Prepared Statements: DoS with
too many open statements". The patch adds a new global variable
@@max_prepared_stmt_count. This variable limits the total number
of prepared statements in the server. The default value of
@@max_prepared_stmt_count is 16382. 16382 small statements
(a select against 3 tables with GROUP, ORDER and LIMIT) consume 
100MB of RAM. Once this limit has been reached, the server will 
refuse to prepare a new statement and return ER_UNKNOWN_ERROR 
(unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
and can accept any value from 0 to 1 million. In case
the new value of the limit is less than the current
statement count, no new statements can be added, while the old
still can be used. Additionally, the current count of prepared 
statements is now available through a global read-only variable 
@@prepared_stmt_count.


mysql-test/r/ps.result:
  Test results fixed (a test case for Bug#16365)
mysql-test/t/ps.test:
  A test case for Bug#16365 "Prepared Statements: DoS with too many 
  open statements". Also fix statement leaks in other tests.
sql/mysql_priv.h:
  Add declarations for new global variables.
sql/mysqld.cc:
  Add definitions of max_prepared_stmt_count, prepared_stmt_count.
sql/set_var.cc:
  Implement support for @@prepared_stmt_count and 
  @@max_prepared_stmt_count. Currently these variables are queried
  without acquiring LOCK_prepared_stmt_count due to limitations of
  the set_var/sys_var class design. Updates are, however, protected 
  with a lock.
sql/set_var.h:
  New declarations to add support for @@max_prepared_stmt_count.
  Implement a new class, where the lock to be used when updating
  a variable is a parameter.
sql/sql_class.cc:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_class.h:
  Add accounting of the total number of prepared statements in the
  server to the methods of Statement_map.
sql/sql_prepare.cc:
  Statement_map::insert will now send a message in case of an
  error.
2006-04-07 23:37:06 +04:00
unknown
9b6e83f4b8 A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?))
gives wrong results". Implement previously missing 
Item_row::cleanup. The bug is not repeatable in 5.0, probably 
due to a coincidence: the problem is present in 5.0 as well.


mysql-test/r/ps.result:
  Update the result file (Bug#16248)
mysql-test/t/ps.test:
  Add a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) gives 
  wrong results"
sql/item_row.cc:
  Implement Item_row::cleanup(): we should reset used_tables_cache
  before reexecution of a prepared statement. In case ROW
  arguments contain a placeholder, used_tables_cache has PARAM_TABLE
  bit set in statement prepare. As a result, when executing a statement,
  the condition push down algorithm (make_cond_for_table) would think
  that the WHERE clause belongs to the non-existent PARAM_TABLE and
  wouldn't attach the WHERE clause to any of the real tables, 
  effectively optimizing the clause away.
sql/item_row.h:
  Remove a never used member 'array_holder'. Add declaration for
  Item_row::cleanup.
2006-04-07 22:26:25 +04:00
unknown
fb5677b8a0 Merge mysql.com:/opt/local/work/tmp_merge2
into  mysql.com:/opt/local/work/mysql-5.1-merge


mysql-test/r/ps.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp-prelocking.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/field.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
mysql-test/t/sp-prelocking.test:
  Manual merge.
2006-03-30 19:12:10 +04:00
unknown
537ec1e6df Post review fixes for BUG#16474: SP crashed MySQL.
mysql-test/r/ps.result:
  Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/r/sp.result:
  Added reference to test case for BUG#16474.
mysql-test/t/ps.test:
  Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/t/sp.test:
  Added reference to test case for BUG#16474.
sql/sql_select.cc:
  Fixed comment and test for basic_const_item() instead of is_splocal().
2006-03-28 14:16:21 +02:00
unknown
e54ecf09be Merge mysql.com:/home/dlenev/src/mysql-5.0-bg13525
into  mysql.com:/home/dlenev/src/mysql-5.1-merges2


client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisammrg/myrg_queue.c:
  Auto merged
sql/sql_rename.cc:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2006-02-27 20:00:07 +03:00
unknown
475eb3e917 Fixed test results after bad auto-merge. 2006-02-27 20:00:06 +03:00
unknown
ea9ea952be Remove 'delayed' to make the test deterministic (already
fixed in 5.0).
A post-review fix (Bug#13134)


mysql-test/r/heap.result:
  Remove 'delayed' to make the test deterministic.
mysql-test/r/ps.result:
  Remove an unneeded drop table (test case for Bug#13134)
mysql-test/t/heap.test:
  Remove 'delayed' to make the test deterministic.
mysql-test/t/ps.test:
  A post-review fix (Bug#13134)
2006-02-23 23:41:15 +03:00
unknown
9cf3f255bd A fix and a test case for Bug#13134 "Length of VARCHAR() utf8
column is increasing when table is recreated with PS/SP":
make use of create_field::char_length more consistent in the code.
Reinit create_field::length from create_field::char_length
for every execution of a prepared statement (actually fixes the 
bug).


mysql-test/r/ps.result:
  Test results fixed (Bug#13134)
mysql-test/t/ps.test:
  A test case for Bug#13134 "Length of VARCHAR() utf8 column is 
  increasing when table is recreated with PS/SP"
sql/field.cc:
  Move initialization of create_field::char_length to the constructor
  of create_field.
sql/field.h:
  Rename chars_length to char_length (to be consistent with
  how this term is used throughout the rest of the code).
sql/sql_parse.cc:
  Initialize char_length in add_field_to_list. This function
  effectively works as another create_field constructor.
sql/sql_table.cc:
  Reinit length from char_length for every field in 
  mysql_prepare_table. This is not needed if we're executing
  a statement for the first time, however, at subsequent executions
  length contains the number of bytes, not characters (as it's expected 
  to).
2006-02-21 19:52:20 +03:00
unknown
6aaed7330c Fix for BUG#9412: Triggers: should have trigger privilege.
Implement table-level TRIGGER privilege to control access to triggers.
Before this path global SUPER privilege was used for this purpose, that
was the big security problem.

In details, before this patch SUPER privilege was required:
  - for the user at CREATE TRIGGER time to create a new trigger;
  - for the user at DROP TRIGGER time to drop the existing trigger;
  - for the definer at trigger activation time to execute the trigger (if the
    definer loses SUPER privilege, all its triggers become unavailable);

This patch changes the behaviour in the following way:
  - TRIGGER privilege on the subject table for trigger is required:
    - for the user at CREATE TRIGGER time to create a new trigger;
    - for the user at DROP TRIGGER time to drop the existing trigger;
    - for the definer at trigger activation time to execute the trigger
      (if the definer loses TRIGGER privilege on the subject table, all its
      triggers on this table become unavailable).
  - SUPER privilege is still required:
    - for the user at CREATE TRIGGER time to explicitly set the trigger
      definer to the user other than CURRENT_USER().

When the server works with database of the previous version (w/o TRIGGER
privilege), or if the database is being upgraded from the previous versions,
TRIGGER privilege is granted to whose users, who have CREATE privilege.


mysql-test/r/grant.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/information_schema.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/lowercase_table_grant.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/ps.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/sp.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/trigger-compat.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/r/trigger-grant.result:
  Updated the result file after adding TRIGGER privilege.
mysql-test/t/trigger-compat.test:
  Grant table-level TRIGGER privilege instead of global SUPER one.
mysql-test/t/trigger-grant.test:
  1. Grant table-level TRIGGER privilege instead of global SUPER one.
  2. Updated the test case to check that SUPER is required to specify
  the user other than the current as a definer.
scripts/mysql_create_system_tables.sh:
  Added TRIGGER privilege.
scripts/mysql_fix_privilege_tables.sql:
  Added TRIGGER privilege.
sql/sql_acl.cc:
  Added TRIGGER privilege.
sql/sql_acl.h:
  Added TRIGGER privilege.
sql/sql_show.cc:
  Added TRIGGER privilege.
sql/sql_trigger.cc:
  Check TRIGGER privilege instead of SUPER.
sql/sql_yacc.yy:
  Added TRIGGER privilege.
2006-02-01 13:28:45 +03:00
unknown
9853390f4c Merge mysql.com:/opt/local/work/mysql-5.0-for-merge
into  mysql.com:/opt/local/work/mysql-5.1-merge1


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-01-26 16:36:33 +03:00
unknown
17ccdd1a05 A fix for Bug#13337 "ps test fails if configure wo/ usc2"
mysql-test/r/ctype_ucs.result:
  Test results changed (Bug#13337)
mysql-test/r/ps.result:
  Test results changed (Bug#13337)
mysql-test/t/ctype_ucs.test:
  Fix Bug#13337 (move the test that uses UCS character set to 
  ctype_ucs)
mysql-test/t/ps.test:
  Fix Bug#13337 (move the test that uses UCS character set to 
  ctype_ucs)
2006-01-17 01:03:03 +03:00
unknown
4e107f1147 A post-merge fix (Bug#12734)
mysql-test/r/ps.result:
  A post-merge fix.
2006-01-14 21:20:42 +03:00
unknown
04a7810627 A fix and a test case for Bug#12734 " prepared statement may
return incorrect result set for a select SQL request"


mysql-test/r/ps.result:
  Test results fixed (Bug#12734)
mysql-test/t/ps.test:
  A test case for Bug#12734
sql/item_cmpfunc.cc:
  Reset canDoTurboBM in Item_func_like::cleanup()
sql/item_cmpfunc.h:
  Add Item_func_like::cleanup()
2006-01-14 04:55:07 +03: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
1ef97f1f3b WL #1034 (Internal CRON) pre-push updates
- fixed test results
- fixed bug caught by information_schema.test . Bison temporal
  variables are very nice but extremely error-prone (Count one more
  time just to be sure).


mysql-test/r/connect.result:
  fix result for WL#1034 (internal CRON)
mysql-test/r/events.result:
  fix result for WL#1034 (internal CRON)
mysql-test/r/grant.result:
  fix result for WL#1034 (internal CRON)
mysql-test/r/information_schema.result:
  fix result for WL#1034 (internal CRON)
mysql-test/r/lowercase_table_grant.result:
  fix result for WL#1034 (internal CRON)
mysql-test/r/ps.result:
  fix result for WL#1034 (internal CRON)
mysql-test/r/system_mysql_db.result:
  fix result for WL#1034 (internal CRON)
mysql-test/t/events.test:
  fix result for WL#1034 (internal CRON)
sql/sql_yacc.yy:
  - fix bug introduced by me when making usage of temporal
    bison variables. COUNT 7 times then write!
2006-01-10 19:16:58 +01:00
unknown
01e1d1a0af add missing DROP TABLE [IF EXISTS] clauses 2005-12-26 10:16:36 +03:00
unknown
858eef452f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b12956


mysql-test/r/ps.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
2005-12-02 11:57:26 +04:00
unknown
4b50aca58a Merge mysql.com:/home/jimw/my/mysql-5.0-14956
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/t/ps.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/ps.result:
  SCCS merged
2005-11-28 10:51:54 -08:00
unknown
6cc4218f21 Fix for bug #12956: cast make differ rounding.
sql/item_func.cc:
  Fix for bug #12956: cast make differ rounding.
  - call rint() as we do in the Field_*int*::store(double)
2005-11-28 14:52:38 +04:00
unknown
2e79201c72 Post-merge fixes. 2005-11-25 18:53:55 +03:00
unknown
2a1ae3a5e3 A fix and a test case for Bug#14410 "Crash in Enum or Set type in
CREATE TABLE and PS/SP": make sure that 'typelib' object for
ENUM values and 'Item_string' object for DEFAULT clause are 
created in the statement memory root.


mysql-test/r/ps.result:
  Test results has been fixed (Bug#14410)
mysql-test/t/ps.test:
  A test case for Bug#14410 "Crash in Enum or Set type in CREATE 
  TABLE and PS/SP"
sql/mysql_priv.h:
  typelib() function declaration has been changed.
sql/sql_table.cc:
  Supply the statement memory root to use in typelib() and
  safe_charset_converter() functions to ensure that objects 
  created during the first execution of CREATE TABLE statement
  are allocated in persistent memory of the statement.
sql/table.cc:
  Change typelib() function to require MEM_ROOT.
2005-11-25 13:25:31 +03:00
unknown
0f64a6222e Fix result of ROW_COUNT() after 'EXECUTE prepstmt'. (Bug #14956)
mysql-test/r/ps.result:
  Add new results
mysql-test/t/ps.test:
  Add new test
sql/sql_parse.cc:
  Don't reset row_count after processing EXECUTE statement.
2005-11-23 14:57:26 -08:00
unknown
f257163824 fix for bug #12651 (item of a prepared query allocated on non-permanent
are thus dangling later)


mysql-test/r/ps.result:
  test for bug #12651
  (data allocated on thd's arena but not on permanent arena)
mysql-test/t/ps.test:
  test for bug #12651
  (data allocated on thd's arena but not on permanent arena)
sql/sql_base.cc:
  if there is tree transformation then backup the current arena
  and use permanent one (for PS) otherwise the data will be deallocated
  after the prepare process is finished.
  this bug was introduced with the recent natural join patch
2005-09-08 21:30:05 +02:00
unknown
5618d0217e Merge sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-mrg-5.0


configure.in:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_math.test:
  Auto merged
mysql-test/t/ps.test:
  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/sql_cache.cc:
  Auto merged
sql/sql_cache.h:
  Auto merged
2005-09-06 20:51:15 +03:00
unknown
61a5fac1cc Bug #6172 RAND(a) should only accept constant values as arguments(2nd version)
Argument of RAND function can be constant value only
2005-09-06 16:19:59 +05:00
unknown
40efb3622d Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/media/sda1/mysql/mysql-5.0-merge


mysql-test/r/select.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge (again).
mysql-test/t/ps.test:
  Manual merge (again).
mysql-test/t/select.test:
  Manual merge (again).
sql/item_func.cc:
  Manual merge (again).
sql/item_func.h:
  Manual merge (again).
sql/set_var.h:
  Manual merge (again).
2005-07-16 13:45:32 +04:00
unknown
e83e105331 A fix and a test case for Bug#9359 "Prepared statements take snapshot
of system vars at PREPARE time": implement a special Item
to handle system variables. This item substitutes itself with 
a basic constant containing variable value at fix_fields.


mysql-test/r/ps.result:
  - test results fixed (Bug#9359).
mysql-test/t/ps.test:
  - add a test case for Bug#9359 "Prepared statements take snapshot
   of system vars at PREPARE time"
sql/item_func.cc:
  - implement Item_func_get_system_var: we should not evaluate system
  variables in the parser, but instead should create an item which 
  is evaluated to a constant at execute.
  - remove an unused function
sql/item_func.h:
  Add a new item, Item_func_get_system_var
sql/mysql_priv.h:
  Move necessary declarations to make set_var.h objects visible in 
  item_func.h
sql/set_var.cc:
  - we should not print to network from get_system_var: if it's called
  from prepared statement prepare, we get packets out of order when using
  the binary protocol. Instead report the error to be sent to the user later.
  This is a backport from 5.0.
sql/set_var.h:
  - declaration of enum_var_type moved to mysql_priv.h
2005-07-16 03:29:13 +04:00
unknown
b5d9a7644e Bug#9442, moved ps ucs2 test from ps.test to ctype_ucs.test 2005-07-15 19:46:42 +02:00
unknown
ef09588661 Post-merge fixes. 2005-07-15 00:41:58 +04:00