Commit graph

11989 commits

Author SHA1 Message Date
unknown
a2df1eb821 Fix for bug#11057 information_schema: columns table has some questionable contents
fixed BLOB, TEXT(wrong maximum length), BIT and integer types(wrong numeric_precision value)
2005-07-19 14:30:32 +05:00
unknown
11ff7b1654 Bug#11577 'show procedure/function status' doesn't work for user with limited access
changed 'SHOW PROCEDURE' behavoiur to be like INFORMATION_SCHEMA.routines
2005-07-19 13:49:43 +05:00
unknown
3b47b04968 Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main
2005-07-19 15:05:10 +10:00
unknown
9bff6cac03 Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/stewart/Documents/MySQL/4.1/main
2005-07-19 15:04:19 +10:00
unknown
f97fefa866 Merge mysql.com:/Users/emurphy/src/bk-clean/mysql-5.0
into  mysql.com:/Users/emurphy/src/work/mysql-5.0-bug11567
2005-07-18 22:27:20 -04:00
unknown
ded9946481 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  radha.local:/Users/patg/mysql-build/mysql-5.0
2005-07-19 03:18:54 +02:00
unknown
f9e4c6e76e Eric's implentation of OPTIMIZE TABLE and REPAIR TABLE,
as well as changes to the test.


mysql-test/r/federated.result:
  New test results
mysql-test/t/federated.test:
  Removed explains per brian's suggestion since on his 64-bit amd, you get 
  different information, something to be ironed out later, as well as it 
  having nothing to do with federated.
sql/ha_federated.cc:
  - Eric Herman's implementation of repair and optimize!!!
  - Eric's changes to 1EQ0 to FALSE
sql/ha_federated.h:
  Eric's addition of LEN for each SQL string tokens.
2005-07-19 03:04:51 +02:00
unknown
f19af2946f Handle systems where 127.0.0.1 doesn't always map to 'localhost'
first. (Bug #11822)


sql/hostname.cc:
  Short-circuit ip_to_hostname() lookup for INADDR_LOOPBACK to
  always return 'localhost'.
sql/sql_parse.cc:
  Push special handling of 127.0.0.1 into ip_to_hostname().
2005-07-18 17:00:37 -07:00
unknown
5958f22a62 Fix number to date conversion so it always honors the NO_ZERO_DATE,
NO_ZERO_IN_DATE, and INVALID_DATES bits of SQL_MODE. (Bug #5906)


include/my_time.h:
  Pass flags to number_to_datetime() so it can check things
  like NO_ZERO_DATE.
libmysql/libmysql.c:
  Enable fuzzy date handling when converting strings and numbers
  to datetime fields.
mysql-test/r/ps_2myisam.result:
  Update results
mysql-test/r/ps_3innodb.result:
  Update results
mysql-test/r/ps_4heap.result:
  Update results
mysql-test/r/ps_5merge.result:
  Update results
mysql-test/r/ps_6bdb.result:
  Update results
mysql-test/r/ps_7ndb.result:
  Update results
mysql-test/r/strict.result:
  Update results
mysql-test/r/timezone2.result:
  Update results
mysql-test/r/type_datetime.result:
  Update results
mysql-test/t/strict.test:
  Add new regression test
mysql-test/t/timezone2.test:
  Add new test of timestamp values in DST gap
sql-common/my_time.c:
  Expand check_date() to check NO_ZERO_DATE and NO_ZERO_IN_DATE, and
  use it from number_to_datetime() as well as str_to_datetime(). Also,
  make number_to_datetime() return -1 on error so we can distinguish
  between a violation of NO_ZERO_DATE and other errors.
sql/field.cc:
  Update conversion of numbers to date, datetime, and timestamp to
  use number_to_datetime() and report errors and warnings correctly
  and consistently.
2005-07-18 16:12:44 -07:00
unknown
6d29b23b15 Bug #10600
remove_table_from_cache fails to signal other thread and gets
blocked when other thread also gets blocked


include/thr_lock.h:
  Report if any threads was signalled
mysys/thr_lock.c:
  Report if any threads was signalled
sql/lock.cc:
  Report if any threads was signalled
  Use new interface for remove_table_from_cache
sql/mysql_priv.h:
  New interface for remove_table_from_cache
  + mysql_lock_abort_for_thread
sql/sql_base.cc:
  Use new interface of remove_table_cache
  Rewrote remove_table_from_cache to fix bug
sql/sql_table.cc:
  Use new interface of remove_table_from_cache
2005-07-19 00:29:19 +02:00
unknown
481ce989ca BUG#11567 Fixed binlog tests on windows.
sql/log_event.cc:
  BUG#11567 - mysqlbinlog tests failing on Windows.
  Cast was not working as intended with Windows compiler,
  the value of option was being printed instead. Reason
  is that config-win.h has '#define bool BOOL', and on
  Windows BOOL is a typedef for int, which means
  that all casts to bool are really a cast to int. Changed
  to explicitly print a 1 or 0 instead of using cast.
2005-07-18 17:47:26 -04:00
unknown
7f6f31ae73 Merge mysql.com:/home/kostja/mysql/mysql-4.1-root
into  mysql.com:/home/kostja/mysql/mysql-5.0-merge


client/mysqltest.c:
  Auto merged
mysql-test/r/rpl_log.result:
  Auto merged
mysql-test/r/rpl_rotate_logs.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/timezone_grant.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/timezone_grant.test:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
configure.in:
  Manual merge
mysql-test/r/olap.result:
  Manual merge
mysql-test/t/olap.test:
  Manual merge
mysql-test/t/select.test:
  Manual merge
sql/mysqld.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
2005-07-19 00:55:37 +04:00
unknown
5b6c1348c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0


client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
mysys/Makefile.am:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysys/default.c:
  SCCS merged
2005-07-18 19:03:01 +03:00
unknown
3e5cbdbb22 Merge moonbone.local:/work/mysql-4.1-bug-11868
into moonbone.local:/work/mysql-5.0-bug-11482


mysql-test/r/update.result:
  Auto merged
mysql-test/t/update.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-07-18 19:37:42 +04:00
unknown
96c7d12bf8 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into  linux.site:/home/reggie/bk/bug7142


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2005-07-18 08:03:59 -06:00
unknown
750eedd9ab Fix for BUG#12003 "assertion failure in testsuite (double lock of
LOCK_thread_count)" and for BUG#12004 "SHOW BINARY LOGS reports 0
for the size of all binlogs but the current one".
There are a lot of 4.1->5.0 unmerged changes (hardest are in the optimizer), can't merge; still pushing in 4.1 because my changes 
are very small. Feel free to ask me if you have problems merging them.


mysql-test/r/rpl_log.result:
  correcting binlog sizes
mysql-test/r/rpl_rotate_logs.result:
  correcting binlog sizes
sql/mysqld.cc:
  don't lock LOCK_thread_count when you already have it
sql/sql_repl.cc:
  my_open() needs the complete name, not only the base name
2005-07-18 14:46:53 +02:00
unknown
68b4d7b74d Cleanups during review
Changed defaults option --instance to --defaults-group-suffix
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX
mysql_print_defaults now understands --defaults-group-suffix
Remove usage of my_tempnam() (not safe function)
if( -> if ( and while( to while (


BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f:
  Delete: mysys/my_tempnam.c
VC++Files/client/mysqlclient.dsp:
  Remove not used file my_tempnam.c
VC++Files/client/mysqlclient_ia64.dsp:
  Remove not used file my_tempnam.c
VC++Files/libmysql/libmysql.dsp:
  Remove not used file my_tempnam.c
VC++Files/libmysql/libmysql_ia64.dsp:
  Remove not used file my_tempnam.c
VC++Files/mysys/mysys.dsp:
  Remove not used file my_tempnam.c
VC++Files/mysys/mysys_ia64.dsp:
  Remove not used file my_tempnam.c
client/mysql.cc:
  Change to use get_defaults_options()
  Remove compiler warnings
client/mysqldump.c:
  Indentation fixes
  Use quoted table name for 'primary_key_fields'
extra/my_print_defaults.c:
  Add support for --defaults-group-suffix
  change to use get_default_options()
extra/replace.c:
  Replace my_tempnam() with create_tmp_file() to allow us to remove my_tempnam.c
include/config-win.h:
  Added DEFAULT_GROUP_SUFFIX_ENV
include/my_sys.h:
  Change defaults_instance -> defaults_group_suffix
  Change get_defaults_files -> get_defaults_options
libmysql/Makefile.shared:
  Added DEFAULT_GROUP_SUFFIX_ENV
mysys/Makefile.am:
  Added DEFAULT_GROUP_SUFFIX_ENV
  Remove my_tempnam.c
mysys/default.c:
  Changed --instance to --defaults-group-suffix
  Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX and moved the name to Makefile.am
  (mysys shouldn't by MySQL independent)
  Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
mysys/default_modify.c:
  Optimized code to use allocated space more efficently
  Reduce code size
  Ensure that realloc() works independent of argument size
mysys/my_bitmap.c:
  Added missing return
sql/ha_innodb.cc:
  Change if( -> if (
sql/ha_ndbcluster.cc:
  Change while( -> while (
sql/item_cmpfunc.cc:
  Break loop early (simple optimization)
sql/item_strfunc.cc:
  Change if( -> if (
sql/log.cc:
  Fixed comment
sql/mysqld.cc:
  Change if( -> if (
sql/opt_range.cc:
  while( -> while (
  if( -> if (
sql/parse_file.cc:
  Change if( -> if (
sql/sql_cache.cc:
  while( -> while (
sql/sql_parse.cc:
  Change if( -> if (
sql/sql_prepare.cc:
  Added comment
sql/sql_select.cc:
  while( -> while (
  Removed index variable by incrementing pointer
sql/sql_show.cc:
  Change if( -> if (
sql/sql_yacc.yy:
  Change if( -> if (
tests/mysql_client_test.c:
  Added cast to first argument to bzero()
2005-07-18 15:33:18 +03:00
unknown
78625366af Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main


sql/slave.cc:
  Auto merged
2005-07-18 15:02:21 +10:00
unknown
0d0aa7a45a Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  krsna.patg.net:/home/patg/mysql-5.0
2005-07-17 10:20:11 -07:00
unknown
6a88fa48ae select.result, select.test:
Added a test case for bug #11745.
sql_select.cc:
  Fixed bug # 11745.
  Added support of where clause for queries with FROM DUAL.
sql_yacc.yy:
  Fixed bug # 11745.
  Added optional where clause for queries with FROM DUAL.


sql/sql_yacc.yy:
  Fixed bug # 11745.
  Added optional where clause for queries with FROM DUAL.
sql/sql_select.cc:
  Fixed bug # 11745.
  Added support of where clause for queries with FROM DUAL.
mysql-test/t/select.test:
  Added a test case for bug #11745.
mysql-test/r/select.result:
  Added a test case for bug #11745.
2005-07-17 09:46:14 -07:00
unknown
6771f8d0aa Federated Storage Engine, bug 9925 "Federated query processor (step 2 or step 3) not using logic in
WHERE statement"


sql/ha_federated.cc:
  Changes per Jimw's review. 
  
  notes about some suggestions:
  
  1. Tried to replace my_sprintf with strxmov, but had problems. Couldn't 
     get the test suite to run at all, and could not find any particular
     error. Since this is something that is not critical, I'll leave it
     as is for now.
  2. I would like to use my_error to create all of my error messages, but 
     cannot figure out how to get it to take more than one argument to be
     passed to the error message (I tried this once but had errors, and 
     cannot find an example of how to get it to work despite seeing messages
     with obviously more than one arg
  3. Replaced all string building from literals to defined SQL string pieces
     such as "SELECT ", "FROM " ...
  4. Format fixes, spacing fixes completed
  5. Removed records_in_range records calculation functionality
sql/ha_federated.h:
  Formatting changes, new defines for SQL query string tokens
sql/share/errmsg.txt:
  changed 'SRC' to 'SOURCE' per Jimw's review
2005-07-17 04:10:19 +02:00
unknown
89519b677e Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1


sql/sql_select.cc:
  Auto merged
2005-07-16 18:28:09 -07:00
unknown
e155a0c01d func_in.result, func_in.test:
Fixed bug #11885.
sql_select.cc:
  Fixed bug #11885.
  Predicates of the forms 'a IN (v)' 'a NOT IN (v)' now
  is replaced by 'a=v' and 'a<>v' at the parsing stage.
sql_yacc.yy:
  Fixed bug #11885.
  Predicates of the forms 'a IN (v)' 'a NOT IN (v)' now 
  is replaced by 'a=v' and 'a<>v' at the parsing stage.


sql/sql_yacc.yy:
  Fixed bug #11885.
  Predicates of the forms 'a IN (v)' 'a NOT IN (v) now 
  is replaced by 'a=v' and 'a<>v' at the parsing stage.
sql/sql_select.cc:
  Fixed bug #11885.
  Predicates of the forms 'a IN (v)' 'a NOT IN (v) now
  is replaced by 'a=v' and 'a<>v' at the parsing stage.
mysql-test/t/func_in.test:
  Fixed bug #11885.
mysql-test/r/func_in.result:
  Fixed bug #11885.
2005-07-16 18:06:34 -07:00
unknown
e2bd74015c opt_range.cc:
Fixed bug #11853.
  Corrected the code of the range optimization for
  NOT IN and NOT BETWEEN.
range.test, range.result:
  Fixed bug #11853.


mysql-test/t/range.test:
  Fixed bug #11853.
sql/opt_range.cc:
  Fixed bug #11853.
  Corrected the code of the range optimization for
  NOT IN and NOT BETWEEN.
2005-07-16 08:19:20 -07:00
unknown
7bdc4dd0a1 After-merge fixes (4.1 -> 5.0).
mysql-test/r/sp.result:
  Test results fixed: rewritten test for Bug#6129
mysql-test/r/view.result:
  Push a change to the result file from Sanja's patch.
mysql-test/t/sp.test:
  Rewrite the test for Bug#6129 (now that stored procedures don't
  evaluate system variables at parse, the test produced different results).
  The old test failed with 1 in the second invocation (the old
  result was wrong).
sql/item_func.cc:
  After-merge fix.
sql/item_func.h:
  After-merge fix.
sql/mysql_priv.h:
  After-merge fix.
sql/mysqld.cc:
  Rollback the patch for Bug#7403 (it breaks the test suite).
2005-07-16 16:10:42 +04: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
b6f3a37370 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-07-15 18:59:18 -07:00
unknown
cc57265b5d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/mysql-4.1-bug-11868
2005-07-16 05:59:17 +04:00
unknown
560ff1a2ea Fix bug#11868 NOT NULL ref optimization in subquery used in update must be
disabled if ref is built with a key from the updated table

Problem was in add_not_null_conds() optimization function.
It contains following code:
JOIN_TAB *referred_tab= not_null_item->field->table->reginfo.join_tab;
...
add_cond_and_fix(&referred_tab->select_cond, notnull);
For UPDATE described in bug report referred_tab is 0 and dereferencing it
crashes the server.



sql/sql_select.cc:
  Fix bug #11868 NOT NULL ref optimization in subquery used in update must be
  disabled if ref is built with a key from the updated table
mysql-test/r/update.result:
  Test case for bug#11868 Update with subquery with ref built with a key from
  the updated table crashes server.
mysql-test/t/update.test:
  Test case for bug#11868 Update with subquery with ref built with a key from the updated table crashes server
2005-07-16 05:31:16 +04:00
unknown
d887a6924e This is the same patch as 1.1937, with small variable declaration changes, memory
deallocation cleanup


mysql-test/r/federated.result:
  new test results
mysql-test/t/federated.test:
  New tests, and added explains per Timour's suggestion. This will keep
          track of whether changes have been made to the optimiser that might affect
          Federated.
          Also changed the error codes to federated error codes in the error tests
sql/ha_federated.cc:
  1. Not using MAX_REMOTE_SIZE, so removed
           2. Changed all defines that were IO_SIZE to FEDERATED_QUERY_BUFFER_SIZE
           3. Now using Federated Error Codes
           4. Implemented ::info (gets valid 'records' number)
           5. Implemented ::read_range_first - now uses indexes in range operations
           6. Better allocation in get_share
           7. Cleaned up memory bug in get_share
           8. Better initial query "SELECT * FROM t1 WHERE 1=0" for check_foreign_data_src
           9. emit_key_part_name and emit_key_part_element for read_range_first to not
              have redundancy
           10. Made sure all 'append's pass length, and use append("") to ensure proper
               null termination of strings being built.
           11. Better message creation. If ER_QUERY_ON_FOREIGN_DATA_SRC, I also pass
               the actual error code and message from the foreign data src.
           12. Cleaned up how the result set and share->scheme is freed.
sql/share/errmsg.txt:
  New Federated error messages that are more tailored to the type of information
  we want to see when federated has an error.
mysql-test/include/federated.inc:
  New bitkeeper file, include file for separating setup from main test suite
mysql-test/include/federated_cleanup.inc:
  New BitKeeper file ``mysql-test/include/federated_cleanup.inc''
sql/ha_federated.h:
  Added comments where needed, one was already commented about
2005-07-15 17:33:47 -07:00
unknown
7768acb638 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-07-15 16:29:15 -07:00
unknown
d5b80a789e Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root
2005-07-16 03:29:14 +04:00
unknown
bbe806452c Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-07-15 16:29:14 -07:00
unknown
e81337d8b2 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into  linux.site:/home/reggie/bk/bug7403
2005-07-15 17:29:13 -06: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
0f41fb4234 Fix bug#11482 4.1.12 produces different resultset for a complex query
than in previous 4.1.x

Wrongly applied optimization were adding NOT NULL constraint which results in
rejecting valid rows and reduced result set.

The problem was that add_notnull_conds() while checking subquery were adding
NOT NULL constraint to left joined table, to which, normally, optimization 
don't have to be applied.


sql/sql_select.cc:
  Fix bug #11482 Wrongly applied optimization was erroneously rejecting valid rows
  Constraint were added to optimization appliance test.
mysql-test/t/select.test:
  Test case for bug #11482  Wrongly applied optimization was erroneously rejecting valid rows
mysql-test/r/select.result:
  Test case for bug #11482  Wrongly applied optimization was erroneously rejecting valid rows
2005-07-16 03:29:12 +04:00
unknown
8fb495d1c5 post merge changes: added safe_charset_converter to other static functions 2005-07-16 00:52:00 +03:00
unknown
213c05400a Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0


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


BitKeeper/etc/config:
  switch off open logging
mysql-test/r/sp-security.result:
  correct value from current_user() in function run from "security definer"
mysql-test/r/view.result:
  evaluation constant functions in WHERE (BUG#4663)
mysql-test/t/sp-security.test:
  correct value from current_user() in function run from "security definer"
mysql-test/t/view.test:
  evaluation constant functions in WHERE (BUG#4663)
sql/item.cc:
  Item_static_string_func creation if it is need
sql/item.h:
  support of Item_static_string_func creation
sql/item_cmpfunc.cc:
  do not evaluate items during view creation
sql/item_create.cc:
  create Item_func_user
sql/item_strfunc.cc:
  Item_func_sysconst in case of converting value still have to correctly print itself
  => use Item_static_string_func instead of Item_string
      Item_func_user return USER() or CURRENT_USER()
sql/item_strfunc.h:
  support of correct charset conversion procedure in Item_func_sysconst
sql/sql_class.h:
  new method
sql/sql_yacc.yy:
  Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
2005-07-16 00:01:44 +03:00
unknown
d49ddbd705 Merge linux.site:/home/reggie/bk/bug7403
into  linux.site:/home/reggie/bk/mysql-5.0


sql/mysqld.cc:
  merging in changes from 4.1
2005-07-15 12:15:45 -06:00
unknown
2013d566ca Merge mysql.com:/home/jimw/my/mysql-4.1-9979
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_parse.cc:
  Auto merged
2005-07-15 10:52:22 -07:00
unknown
6f619804fc Fixed BUG#9538: SProc: Creation fails if we try to SET system variable
using @@var_name in proc
  Made sure we don't lose the tokenizer state when swapping lex in during SET
  parsing.


mysql-test/r/sp.result:
  New test case for BUG#9538.
mysql-test/t/sp.test:
  New test case for BUG#9538.
sql/sp_head.cc:
  Keep lex->next_state when swapping lex during SP parsing (for SET mainly),
  otherwise the tokenizer gets confused.
2005-07-15 17:24:19 +02:00
unknown
f9e9cd9305 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2005-07-15 17:14:34 +02:00
unknown
435846b840 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2005-07-15 15:40:15 +02:00
unknown
0589559eba Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into  linux.site:/home/reggie/bk/bug7403
2005-07-15 06:15:00 -06:00
unknown
dba3190474 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new


tests/mysql_client_test.c:
  Auto merged
2005-07-15 14:14:59 +02:00
unknown
51229d4ba2 Merge
mysql-test/t/ctype_utf8.test:
  Auto merged
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
ndb/src/common/transporter/Transporter.hpp:
  Auto merged
ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
ndb/include/transporter/TransporterRegistry.hpp:
  SCCS merged
ndb/src/common/transporter/Transporter.cpp:
  SCCS merged
2005-07-15 14:13:23 +02:00
unknown
2a48132e01 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-release
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new


mysql-test/t/ctype_utf8.test:
  Auto merged
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2005-07-15 13:32:08 +02:00
unknown
5549ed0915 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/mysql-5.0
2005-07-15 16:27:59 +05:00
unknown
0ec715a69e NO_DEFAULT_VALUE_FLAG and BLOB_FLAG combined 2005-07-15 16:25:31 +05:00
unknown
f4cd03d03f a fix (bug #9881: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL).
sql/field.cc:
  a fix (bug #9881: ALTER TABLE gives wrong error message with sql-mode TRADITIONAL).
  Don't set def if NO_DEFAULT_VALUE_FLAG is set.
2005-07-15 15:50:57 +05:00
unknown
d7d97e5312 added a comment referring to the bug report 2005-07-15 03:51:55 -06:00
unknown
ba7d8ad734 Improve a comment. 2005-07-15 13:21:08 +04:00
unknown
10b76d41a4 Jim's fix for the #10443.
Fix handling of floats and doubles when using prepared statements             
API in the embedded server. 


sql/sql_prepare.cc:
  Jim's fix for the #10443.
  
  Within the embedded server, there's no need to use float4get()              
  and float8get() for setting parameters, since they are never                
  stored.
2005-07-15 11:17:57 +05:00
unknown
908ff34e04 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-15 01:29:37 +03:00
unknown
7f80ca5493 take into account table lock mode when opening table:
try to find most suitable table, to avouid pickup table with too low locking mode or occupy table with write mode for select when it will be need for update later
(BUG#9597)


mysql-test/r/view.result:
  opening table in correct locking mode test
mysql-test/t/view.test:
  opening table in correct locking mode test
sql/sql_base.cc:
  take into account table lock mode when opening table:
  try to find most suitable table, to avouid pickup table with too low locking mode or occupy table with write mode for select when it will be need for update later
2005-07-15 01:22:14 +03:00
unknown
ef09588661 Post-merge fixes. 2005-07-15 00:41:58 +04:00
unknown
b0641a3bdd Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root


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


mysql-test/r/ps.result:
  Test results fixed: a test case for Bug#11299
mysql-test/t/ps.test:
  A test case for Bug#11299
sql/sql_lex.cc:
  Introduce a new parser token for a parameter marker. Make sure
  that a parameter marker can not be used in a query which, when
  transformed to a binlog query, becomes grammatically incorrect.
sql/sql_yacc.yy:
  The check for COM_PREPARE has been moved into the lexer.
mysql-test/var:
  New BitKeeper file ``mysql-test/var''
2005-07-15 00:01:49 +04:00
unknown
7750905037 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/media/sda1/mysql/mysql-5.0-10760-new
2005-07-14 20:02:38 +04:00
unknown
d12fd45d72 Post-merge fixes.
mysql-test/r/fulltext_order_by.result:
  A post-merge fix.
mysql-test/t/fulltext_order_by.test:
  A post-merge fix (a different plan is chosen for a query in 5.0)
sql/sql_select.cc:
  Post-merge fix.
2005-07-14 20:02:37 +04:00
unknown
53bb8fa6c3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/media/sda1/mysql/mysql-5.0-10760-new


sql/item_func.cc:
  Auto merged
2005-07-14 20:02:36 +04:00
unknown
5858a8cd42 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
sql/field.cc:
  manual merge
tests/mysql_client_test.c:
  manual merge
mysql-test/r/select.result:
  manual merge
mysql-test/t/select.test:
  manual merge
sql/sql_select.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2005-07-14 20:02:32 +04:00
unknown
69ecbbcbf3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root
2005-07-14 20:02:31 +04:00
unknown
96dcb8c20d Merge mysql.com:/home/psergey/mysql-4.1-build-tree
into mysql.com:/home/psergey/mysql-4.1-merge-from-build


sql/item_func.cc:
  Auto merged
2005-07-14 16:02:30 +00:00
unknown
e4f2bd469f Get rid of checking for ETIME return value of pthread_cond_timedwait.
ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on 
Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT.
The standard requirement is that the only additional return value
of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT.
Let us not bloat the application code with redundant checks,
and if we're ever to work on a platform that returns a non-standard 
value, we should write a wrapper for that platform (like we do, e.g., for
Windows).


mysys/my_os2cond.c:
  - fix our implementation of pthread_cond_timedwait on OS2 to return
    ETIMEDOUT instead of ETIME.
sql/item_func.cc:
  - don't check for ETIME
sql/slave.cc:
  - don't check for ETIME
sql/sql_insert.cc:
  - don't check for ETIME
2005-07-14 19:42:56 +04:00
unknown
c0bcf503f5 Fix for BUG#11869: In Item_func_match::fix_index() handle the case when there is no
source table present (this happens for ORDER BY after UNION)


mysql-test/r/fulltext_order_by.result:
  Testcase for BUG#11869
mysql-test/t/fulltext_order_by.test:
  Testcase for BUG#11869
2005-07-14 15:19:26 +00:00
unknown
d91c901f61 Fix for BUG#11700: in add_not_null_conds(), call full fix_fields() for the created NOT NULL.
This is needed because in some cases range optimization is performed twice and added 
  NOT NULL item must have correct const_table_map() value. 


mysql-test/r/select.result:
  Testcase for BUG#11700
mysql-test/t/select.test:
  Testcase for BUG#11700
2005-07-14 15:13:36 +00:00
unknown
20d8170adc Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.0
2005-07-14 17:49:19 +05:00
unknown
9f707ab20b item.cc:
After merge fix.


sql/item.cc:
  After merge fix.
2005-07-14 17:48:17 +05:00
unknown
f32c2053c0 Bug #7403 error "Forcing close of thread 1 user: 'xxx'"
The problem was that on Windows, the socket was in a blocking state 
trying to read.  Setting killed=1 is not enough to break the 
socket out of it's read loop.   You have to cancel the read request
or close the socket (which close_connection does).


sql/mysqld.cc:
  call close_connection on the thread instead of setting killed=1
2005-07-14 06:04:29 -06:00
unknown
7e2defb663 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/media/sda1/mysql/mysql-5.0-10760-new
2005-07-14 15:33:41 +04:00
unknown
fd9f67f8d2 Implement MarkM optimization request to avoid redundnat packet exchange
in cursors.


libmysql/libmysql.c:
  - reset_stmt_handle(): don't reset the server side just because we have 
    an open cursor: the server will close the cursor automatically if 
    needed
sql/sql_prepare.cc:
  - implement Prepared_statement::close_cursor,
  - implicitly close an open cursor in mysql_stmt_execute instead of 
    issuing an error (to reduce the need to explicitly close cursors
    and save network bandwidth).
  - cleanup
sql/sql_select.cc:
  Remove a destructor: cursor destruction can not be done by simply
  calling a destructor, because of cross-references between cursor
  and statement memory.
sql/sql_select.h:
  - add an empty Cursor destructor
tests/mysql_client_test.c:
  - remove a test for dropped functionality
2005-07-14 15:27:24 +04:00
unknown
eb4a309b82 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root
2005-07-14 15:14:40 +04:00
unknown
a16a61d959 A fix and a test case for Bug#9735.
No separate typecode for MEDIUMTEXT/LONGTEXT is added, as we
have no sound decision yet what typecodes and for what types are
sent by the server (aka what constitutes a distinct type in MySQL).



mysql-test/r/ps_2myisam.result:
  Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_3innodb.result:
  Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_4heap.result:
  Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_5merge.result:
  Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_6bdb.result:
  Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_7ndb.result:
  Test results fixed: new longtext/longblob length (2^32)
sql/field.cc:
  A fix for Bug#9735 "mysql_fetch_fields() acts strange on 
  LONGBLOB/LONGTEXT": fix wrong initialization of field_length
  in case of BLOB fields.
tests/mysql_client_test.c:
  A test case for Bug#9735  "mysql_fetch_fields() acts strange on 
  LONGBLOB/LONGTEXT"
2005-07-14 15:13:23 +04:00
unknown
212345b400 Merge mysql.com:/usr/home/bar/mysql-4.1.num-conv
into  mysql.com:/usr/home/bar/mysql-5.0


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/item.cc:
  After merge fix.
2005-07-14 16:11:55 +05:00
unknown
c0e325a35c valgrind error fix(uninitialiased variable)
removed unnecessary operation


sql/sql_lex.cc:
  valgrind error fix(uninitialiased variable)
sql/sql_parse.cc:
  removed unnecessary operation
2005-07-14 15:42:36 +05:00
unknown
86060eb487 Merge mysql.com:/home/stewart/Documents/MySQL/4.1/main
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main


sql/slave.cc:
  Auto merged
2005-07-14 17:43:35 +10:00
unknown
7c57549a58 Merge mysql.com:/home/stewart/Documents/MySQL/4.0/main
into  mysql.com:/home/stewart/Documents/MySQL/4.1/main


sql/slave.cc:
  Auto merged
2005-07-14 17:35:41 +10:00
unknown
7f8b23344a BUG#11384 drop database causes mysqld to core
Only reproducable in 5.1-wl2325, although the missing code is missing from 4.0 and up.


sql/slave.cc:
  Clean up after slave sql thread when exiting.
  
  Wasn't calling close_thread_tables().
  
  This was causing a crashing bug in the 5.1-wl2325 tree. It is conceivable that this
  could cause a problem in earlier versions, but we have not been able to reproduce.
2005-07-14 17:33:35 +10:00
unknown
86cb32b7b0 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.num-conv


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-07-14 10:46:15 +05:00
unknown
8ba10fa95b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-07-14 01:39:40 +04:00
unknown
03cf7ddeb8 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-mysqlproc
2005-07-14 00:11:15 +04:00
unknown
4c197d99a1 Now when we create or drop trigger we will open only subject table and not
all tables suggested by prelocking algorithm.
Added test for bug #11889 "Server crashes when dropping trigger using stored
routine" (which was fixed by previous patch).


mysql-test/r/trigger.result:
  Since we are using open_ltable() now to open table for trigger creation, code
  for error when we try to create trigger on view has changed to equivalent one.
  Added test for bug #11889 "Server crashes when dropping trigger using stored
  routine".
mysql-test/t/trigger.test:
  Since we are using open_ltable() now to open table for trigger creation, code
  for error when we try to create trigger on view has changed to equivalent one.
  Added test for bug #11889 "Server crashes when dropping trigger using stored
  routine".
sql/sql_trigger.cc:
  mysql_create_or_drop_trigger():
    It is better to open only table for which we are going to create or drop
    trigger with open_ltable() since we don't really need working prelocking
    in this case.
2005-07-13 23:51:09 +04:00
unknown
061406ba21 Merge mysql.com:/opt/local/work/mysql-4.1-9379
into  mysql.com:/opt/local/work/mysql-5.0-root


sql/item.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/item_func.cc:
  Manual merge.
2005-07-13 23:49:45 +04:00
unknown
98248f046f A fix and a test case for Bug#9379 (collation of a parameter marker is
binary).


mysql-test/r/ps.result:
  Test results fixed (Bug#9379)
mysql-test/t/ps.test:
  A test case for Bug#9379 (collation of a parameter marker is binary)
sql/item.cc:
  - set Item_param::collation to str_value collation, if Item_param
  is assigned a string. Reset it to default in Item_param::reset() (on 
  the next execution it can be assigned a number).
sql/item_func.cc:
  - now that item collation can change between executions
  (if this item is Item_param), we need to register the change
  of the execution tree in the rollback list.
2005-07-13 23:43:46 +04:00
unknown
51ce56e67a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-07-13 18:15:29 +04:00
unknown
91c97a76fc Merge mysql.com:/opt/local/work/mysql-4.1-11458
into  mysql.com:/opt/local/work/mysql-5.0-root


sql/mysql_priv.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/item.cc:
  Manual merge.
sql/item.h:
  Manual merge.
sql/item_subselect.h:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
2005-07-13 18:05:57 +04:00
unknown
7a0f6d522b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-11458


sql/mysql_priv.h:
  Auto merged
2005-07-13 17:39:48 +04:00
unknown
ece17ba3cf - a fix for Bug#11458 "Prepared statement with subselects return random
data": remove the fix for another bug (8807) that
added OUTER_REF_TABLE_BIT to all subqueries that used a placeholder
to prevent their evaluation at prepare. As this bit hanged in 
Item_subselect::used_tables_cache for ever, a constant subquery with
a placeholder was never evaluated as such, which caused wrong 
choice of the execution plan for the statement.
- to fix Bug#8807 backport a better fix from 5.0
- post-review fixes.


mysql-test/r/ps.result:
  Bug#11458: test results fixed
mysql-test/t/ps.test:
  - add a test case for Bug#11458 "Prepared statement with subselects return 
  random data"
sql/item.cc:
  - remove unnecessary Item_param::fix_fields
  - fix Item_param::set_null to set item_type accordingly (safety:
    Item_param should behave like a basic constant).
sql/item.h:
  Remove Item_param::fix_fields
sql/item_subselect.h:
  Remove no more existing friend.
sql/mysql_priv.h:
  Add UNCACHEABLE_PREPARE to mark all subqueries as uncacheable if
  in statement prepare (backport from 5.0).
sql/sql_lex.h:
  Comment fixed.
sql/sql_parse.cc:
  If in statement prepare, mark all subqueries as uncacheable (backport
  from 5.0)
sql/sql_prepare.cc:
  Switch off the uncacheable flag from all subqueries after statement
  prepare is done (backport from 5.0)
2005-07-13 17:38:55 +04:00
unknown
859ccd3b7a sql_update.cc:
mysql_update(): Call handler::unlock_row()
  also in the first while loop.
  This patch is from Heikki,
  and it was approved by Sergei Golubchik.


sql/sql_update.cc:
  mysql_update(): Call handler::unlock_row()
  also in the first while loop.
  This patch is from Heikki,
  and it was approved by Sergei Golubchik.
2005-07-13 16:13:36 +03:00
unknown
7001961e25 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-mysqlproc
2005-07-13 16:43:13 +04:00
unknown
52adc14e49 Post-merge fix 2005-07-13 16:08:14 +05:00
unknown
9aa1504062 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-mysqlproc


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/share/errmsg.txt:
  Manual merge.
sql/sp.cc:
  Manual merge.
2005-07-13 15:08:13 +04:00
unknown
3b7a17d891 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/5.0


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2005-07-13 16:08:13 +05:00
unknown
11f9e513d7 Implementation of Monty's idea: Now we can open mysql.proc table for lookup
of stored routines definitions even if we already have some tables open and
locked. To avoid deadlocks in this case we have to put certain restrictions
on locking of mysql.proc table.

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


mysql-test/r/sp-error.result:
  Added test which checks that now we can read stored routines definitions
  under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
  added check for restrictions which this ability puts on mysql.proc locking.
  Updated test for bug #9566 to correspond this new situation.
mysql-test/r/sp-threads.result:
  Added test for bug #11554 "Server crashes on statement indirectly using
  non-cached function".
mysql-test/t/sp-error.test:
  Added test which checks that now we can read stored routines definitions
  under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
  added check for restrictions which this ability puts on mysql.proc locking.
  Updated test for bug #9566 to correspond this new situation.
mysql-test/t/sp-threads.test:
  Added test for bug #11554 "Server crashes on statement indirectly using
  non-cached function".
sql/lock.cc:
  get_lock_data():
   To be able to open and lock for reading system tables like 'mysql.proc',
   when we already have some tables opened and locked, and avoid deadlocks
   we have to disallow write-locking of these tables with any other tables.
sql/mysql_priv.h:
  open_table() has new parameter which allows to open table even if some-one
  has done a flush or holding namelock on it.
sql/share/errmsg.txt:
  Added error message saying that one cannot write-lock some of system tables
  with any other tables.
sql/sp.cc:
  open_proc_table_for_read()/close_proc_table():
    Added functions to be able open and close mysql.proc table when we already
    have some tables open and locked.
  open_proc_table_for_update():
    Added function to simplify opening of mysql.proc for updates.
  db_find_routine_aux()/db_find_routine()/db_update_routine()/...
    Moved responsibility for opening mysql.proc table from db_find_routine_aux()
    one level up, since this level knows better which type of table access for
    reading of for update it needs.
  sp_function_exists():
    Removed unused function.
sql/sp.h:
  sp_function_exists():
    Removed unused function.
sql/sql_base.cc:
  open_table():
    Added new parameter which allows to open table even if some-one has done a
    flush or holding namelock on it.
  open_unireg_entry():
    Mark 'mysql.proc' as a system table which has special restrictions on its
    locking, but thanks to them can be open and locked even if we already have
    some open and locked.
sql/sql_class.cc:
  Moved THD members holding information about open and locked tables to separate
  Open_tables_state class to be able to save/restore this state easier.
  Added THD::push_open_tables_state()/pop_open_tables_state() methods for
  saving/restoring this state.
sql/sql_class.h:
  Moved THD members holding information about open and locked tables to separate
  Open_tables_state class to be able to save/restore this state easier.
  Added THD::push_open_tables_state()/pop_open_tables_state() methods for
  saving/restoring this state.
sql/sql_lex.cc:
  Removed LEX::proc_table member which was not really used.
sql/sql_lex.h:
  Removed LEX::proc_table member which was not really used.
sql/sql_table.cc:
  open_table() has new parameter which allows to open table even if some-one
  has done a flush or holding namelock on it.
sql/table.h:
  Added TABLE_SHARE::system_table indicating that this table is system table
  like 'mysql.proc' and we want to be able to open and read-lock it even when
  we already have some tables open and locked (and because of this we have
  to put some restrictions on write locking it).
2005-07-13 13:48:13 +04:00
unknown
3ae23d5b9e Bug #9854 hex() and out of range handling
added out of range handling
2005-07-13 14:23:09 +05:00
unknown
897a8d0f18 Fix for bug#11685 SHOW TABLES; doesn't update Com_show_tables 2005-07-13 13:30:39 +05:00
unknown
4a2af29fe7 ctype_utf8.result:
adding test case
sql_table.cc:
  sql_table.cc:
  - do not create a new item when charsets are the same
  - return ER_INVALID_DEFAULT if default value cannot
    be converted into the column character set.
item.cc:
  - Allow conversion not only to Unicode,
    but also to and from "binary".
  - Adding safe_charset_converter() for Item_num
    and Item_varbinary, returning a fixed const Item.


sql/item.cc:
  - Allow conversion not only to Unicode,
    but also to and from "binary".
  - Adding safe_charset_converter() for Item_num
    and Item_varbinary, returning a fixed const Item.
sql/sql_table.cc:
  sql_table.cc:
  - do not create a new item when charsets are the same
  - return ER_INVALID_DEFAULT if default value cannot
    be converted into the column character set.
mysql-test/r/ctype_utf8.result:
  adding test case
2005-07-13 13:00:17 +05:00
unknown
d52f68f354 Manual merge 2005-07-13 04:00:55 +02:00
unknown
338325a066 Merge mysql.com:/home/bkroot/mysql-5.0
into  mysql.com:/home/bk/mysql-5.0
2005-07-13 02:39:24 +02:00
unknown
327afd65b5 Merge
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-13 02:39:23 +02:00
unknown
c3d276165d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11709


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-13 04:39:22 +04:00
unknown
8daa1c4229 Merge mysql.com:/home/bkroot/mysql-4.1
into  mysql.com:/home/bk/mysql-5.0


BitKeeper/etc/config:
  Auto merged
include/my_global.h:
  Auto merged
sql/des_key_file.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
vio/vio.c:
  Auto merged
vio/viosocket.c:
  Auto merged
sql/log.cc:
  Manual merge
sql/slave.cc:
  Manual merge
2005-07-13 02:13:04 +02:00
unknown
7744e7e700 Merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-12 23:24:35 +04:00
unknown
a578be339d Fix bug#11709 View was ordered by wrong column.
When searching column to sort on, item was compared to field under view
column, but not the column itself. Because names of view column and underlaid
field may differ, it leads to possibly choosing wrong column for sorting on.

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


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


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


sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-12 10:44:31 -07:00
unknown
338259ad3d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug11821-merge
2005-07-12 17:44:30 +00:00
unknown
6c9d93eba6 Fix for BUG#11821 manually merged
sql/item.cc:
  Auto merged
2005-07-12 17:11:24 +00:00
unknown
9d9ef52dbe Merge
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-12 20:49:43 +04:00
unknown
2ae3cdcf97 Fix bug #11399 Column alias was lost during view preraration.
New item created in find_field_in_table() to fix view's item, was created 
without taking into account original item's alias. This patch checks if alias 
is set to the original item and if so sets it to newly created item.


sql/sql_base.cc:
  Fix bug#11399 Alias wasn't set on view column
mysql-test/t/view.test:
  Test case for bug#11399 Use an alias in a select statement on a view
mysql-test/r/view.result:
  Test case for bug#11399 Use an alias in a select statement on a view
2005-07-12 20:45:34 +04:00
unknown
73fd169d02 Fixed some vio code that was using ___WIN__ instead of __WIN__
include/my_global.h:
  set SOCKET_EWOULDBLOCK to the proper windows def WSAEWOULDBLOCK
sql/net_serv.cc:
  fixed typo with using 3 leading underscores instead of 2
vio/vio.c:
  fixed typo with using 3 leading underscores instead of 2
vio/viosocket.c:
  fixed typo with using 3 leading underscores instead of 2
2005-07-12 10:31:09 -06:00
unknown
41b038b548 Merge mysql.com:/home/jimw/my/mysql-4.1-11643
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/item_strfunc.cc:
  Auto merged
BitKeeper/etc/config:
  Resolve conflict
2005-07-12 09:31:07 -07:00
unknown
171fa433e6 Merge mysql.com:/home/bkroot/mysql-4.1
into  mysql.com:/home/bk/b6987-mysql-4.1
2005-07-12 18:31:05 +02:00
unknown
3be7d3fcee Fix for BUG#11821: Make Item_type_holder be able to work with MIN(field),
MAX(field).


mysql-test/r/subselect.result:
  Testcase for BUG#11821
mysql-test/t/subselect.test:
  Testcase for BUG#11821
2005-07-12 16:30:45 +00:00
unknown
831e2c7f61 Bug #7142 Show Fields from fails using Borland's dbExpress interface
The problem here is that columns that have an especially long type 
such as an enum type with many options would be longer than 40 chars
but the type column returned from show columns always was defined
as varchar(40).

This is fixed in 5.0 using info schema.


mysql-test/r/ps_1general.result:
  update columns which will now be reported as blobs
mysql-test/r/ps_2myisam.result:
  update columns which will now be reported as blobs
mysql-test/r/ps_3innodb.result:
  update columns which will now be reported as blobs
mysql-test/r/ps_4heap.result:
  update columns which will now be reported as blobs
mysql-test/r/ps_5merge.result:
  update columns which will now be reported as blobs
sql/item.cc:
  report a column as a particular blob type if it's size warrants
sql/sql_show.cc:
  Add function to iterate over all the fields of a table and determine 
  the longest type name.
  
  We call this function at the top of our show fields code.  We pass in 
  either 40 or max_len whichever is longer to the ctor of
  Item_empty_string.
tests/mysql_client_test.c:
  update columns which will now be reported as blobs
2005-07-12 08:35:30 -06:00
unknown
bc1775ffef Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into igor-inspiron.creware.com:/home/igor/mysql-5.0
2005-07-12 05:31:06 -07:00
unknown
f36db3540a view.result, view.test:
Added a test case for bug #11771.
item.h:
  Fixed bug #11771.
  Added method reset_query_id_processor to be able to adjust
  query_id for fields generated from * in queries like this:
  SELECT * FROM <view> ...
sql_base.cc:
  Fixed bug #11771.
  Adjusted query_id for fields generated from * in queries
  like this: SELECT * FROM <view> ...


sql/sql_base.cc:
  Fixed bug #11771.
  Adjusted query_id for fields generated from * in queries
  like this: SELECT * FROM <view> ...
sql/item.h:
  Fixed bug #11771.
  Added method reset_query_id_processor to be able to adjust
  query_id for fields generated from * in queries like this:
  SELECT * FROM <view> ...
mysql-test/t/view.test:
  Added a test case for bug #11771.
mysql-test/r/view.result:
  Added a test case for bug #11771.
2005-07-12 05:18:05 -07:00
unknown
b4e0ce5631 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into igor-inspiron.creware.com:/home/igor/mysql-4.1
2005-07-12 03:18:43 -07:00
unknown
4c99c0e7db Merge mysql.com:/usr/home/bar/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-5.0


BitKeeper/etc/config:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
vio/viossl.c:
  Auto merged
VC++Files/tests/mysql_client_test.dsp:
  after merge change
sql/field_conv.cc:
  after merge fix.
2005-07-12 13:18:25 +05:00
unknown
9e4eb5f2d5 BUG#6987: Added note when stat is failing on relay log, added mutex for log rotatation.
sql/log.cc:
  Added a note when stat failed on log file
sql/slave.cc:
  Added mutex for relay log rotation
2005-07-12 06:01:26 +02:00
unknown
ed24488149 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0
2005-07-11 19:11:52 +02:00
unknown
cc2ad34947 Post-review fix.
sql/sql_yacc.yy:
  Added explanation to comment.
2005-07-11 19:10:51 +02:00
unknown
e9f74b0a9b Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0
2005-07-11 19:01:14 +02:00
unknown
313bda9eee ha_archive.cc:
Added cast to fix windows compile error


sql/examples/ha_archive.cc:
  Added cast to fix windows compile error
2005-07-11 06:14:42 -06:00
unknown
b18b97aace field_conv.cc:
Identation fix


sql/field_conv.cc:
  Identation fix
2005-07-11 16:51:39 +05:00
unknown
eb314af492 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-07-11 12:46:42 +02:00
unknown
799299a5e5 sql_insert.cc:
Added cast to bool to fix windows compile problem


sql/sql_insert.cc:
  Added cast to bool to fix windows compile problem
2005-07-11 04:33:19 -06:00
unknown
dce0304a42 field_conv.cc:
Bug#11591
  CHAR column with utf8 does not work properly
  (more chars than expected)
  do_cut_string didn't call well_formed_length,
  and copied all data, which was wrong in the
  case of multibyte character set.
ctype_utf8.result, ctype_utf8.test:
  adding test case


sql/field_conv.cc:
  Bug#11591
  CHAR column with utf8 does not work properly
  (more chars than expected)
  do_cut_string didn't call well_formed_length,
  and copied all data, which was wrong in the
  case of multibyte character set.
mysql-test/t/ctype_utf8.test:
  adding test case
mysql-test/r/ctype_utf8.result:
  adding test caser
2005-07-11 13:20:07 +05:00
unknown
83772bc576 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into brian-akers-computer.local:/Users/brian/mysql/optimize-5.0


sql/examples/ha_archive.h:
  Auto merged
2005-07-10 22:27:36 -07:00
unknown
a339be0fb3 Fixed 32bit issue, reworked error logic for open tables, and redid the repair table code so that it uses the extended optimize table code.
sql/examples/ha_archive.cc:
  Fixed issue with 32bit systems giving warnings on bit shift (this is due to the fix by Jim to change to ha_rows). The error logic for opening a table was reworked after studing up on a reported issue. It has been reworked to create a share in all situations. The repair table will just have to figure everything out or toss its own error. The read only filesystem and permission denied problems were solved. Repair table code now rebuilds with the new optimize table extended code (so it no longer does the work itself).
2005-07-10 21:17:03 -07:00
unknown
46f0327e6b Refactoring of write_row() into two parts to allow future additions. Also rewrote the OPTIMIZE TABLE code, to add new extended optimize. This form of optimize rebuilds not only the file, but each individual row.
mysql-test/r/archive.result:
  Update results file for new OPTIMIZE TABLE <foo> EXTENDED command.
mysql-test/t/archive.test:
  Added new test for extended optimize
sql/examples/ha_archive.cc:
  Refactored write_row code into two parts. This will allow me to abstract it out once I add in new row format. This also allowed code sharing for the new optimize command (which will be used for new repair code).
sql/examples/ha_archive.h:
  Added new real_write_row() method for writing out rows.
2005-07-10 18:19:37 -07:00
unknown
fd0d97645c Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/foo-5.0
2005-07-10 10:04:13 -07:00
unknown
d0c69a8264 Manual fixes after merging patch for bug #8406 "Triggers crash if referencing
a table" with main tree.


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


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

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


mysql-test/r/sp-error.result:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/r/sp.result:
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/r/trigger.result:
  Added several tests for triggers using tables.
mysql-test/t/sp-error.test:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/t/sp.test:
  Updated comment about recursive views to reflect current situation.
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/t/trigger.test:
  Added several tests for triggers using tables.
sql/item_func.cc:
  Item_func_sp::cleanup():
    By next statement execution stored function can be dropped or altered so
    we can't assume that sp_head object for it will be still valid.
sql/sp.cc:
  - Added Sroutine_hash_entry structure that represents element in the set of
    stored routines used by statement or routine. We can't as before use
    LEX_STRING for this purprose because we want link all elements of this set
    in list.
  - Replaced sp_add_to_hash() with sp_add_used_routine() which takes into account
    that now we use one hash for stored routines used by statement instead of two
    and which mantains list linking all elelemnts in this hash.
  - Renamed sp_merge_hash() to sp_update_sp_used_routines().
  - Introduced sp_update_stmt_used_routines() for adding elements to the set of
    routines used by statement from another similar set for statement or routine.
    This function will also mantain list linking elements of destination set.
  - Now instead of one sp_cache_routines() function we have family of 
    sp_cache_routines_and_add_tables() functions which are also responsible for
    adding tables used by routines being cached to statement table list. Nice
    optimization - thanks to list linking all elements in the hash of routines
    used by statement we don't need to perform several iterations over this hash
    (as it was before in cases when we have added new elements to it).
sql/sp.h:
  Added declarations of functions used for manipulations with set (hash) of stored
  routines used by statement.
sql/sp_head.cc:
  sp_name::init_qname():
    Now sp_name also holds key identifying routine in the set (hash) of
    stored routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed definition of sp_add_sp_tables_to_table_list() and auxilary functions 
  since now we don't have separate stage on which we add tables used by routines
  used by statement to table list for prelocking. We do it on the same stage as
  we load those routines in SP cache. So all this functionality moved to
  sp_cache_routines_and_add_tables() family of functions.
sql/sp_head.h:
  sp_name:
    Now this class also holds key identifying routine in the set (hash) of stored
    routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed declaration of sp_add_sp_tables_to_table_list() since now we don't have
  separate stage on which we add tables used by routines used by statement to
  table list for prelocking. We do it on the same stage as we load those routines
  in SP cache.
sql/sql_base.cc:
  open_tables():
  - LEX::spfuns/spprocs hashes were replaced with one LEX::sroutines hash.
  - Now instead of doing one pass through all routines used in statement for
    caching them and then doing another pass for adding their tables to table
    list, we do only one pass during which do both things. It is easy to do
    since all routines in the set of routines used by statement are linked in
    the list. This also allows us to calculate table list for prelocking more
    precisely.
  - Now triggers properly inform prelocking algorithm about tables they use.
sql/sql_lex.cc:
  lex_start():
    Replaced LEX::spfuns/spprocs with with one LEX::sroutines hash.
    Added LEX::sroutines_list list linking all elements in this hash.
  st_lex::st_lex():
    Moved definition of LEX constructor to sql_lex.cc file to be able
    use sp_sroutine_key declaration from sp.h in it.
sql/sql_lex.h:
  LEX:
    Replaced two separate hashes for stored routines used by statement with one.
    Added list linking all elements in this hash to be able to iterate through all
    elements and add new elements to this hash at the same time.
    Moved constructor definition to sql_lex.cc.
sql/sql_parse.cc:
  mysql_execute_command():
    Replaced LEX::spfuns/spprocs with one LEX::sroutines hash.
sql/sql_trigger.cc:
  Added missing GNU GPL notice.
  Table_triggers_list::check_n_load()
    Added initialization of sroutines_key which stores key representing
    triggers of this table in the set (hash) of routines used by this statement.
sql/sql_trigger.h:
  Added missing GNU GPL notice.
  Table_triggers_list:
    Added sroutines_key member to store key representing triggers of this
    table in the set (hash) of routines used by this statement.
    Declared sp_cache_routines_and_add_tables_for_triggers() as friend since
    it needs access to sroutines_key and trigger bodies.
sql/sql_yacc.yy:
  - Now we use sp_add_used_routine() instead of sp_add_to_hash() for adding
    elements to the set of stored routines used in statement.
  - Enabled support of subqueries as right sides in assignments to triggers' row
    accessors.
2005-07-09 21:51:59 +04:00
unknown
3096eac938 Fixed indention issue, made scan_rows an ha_rows type, and fixed show table status so archive rows are displayed as being compressed.
sql/examples/ha_archive.h:
  Fixed indention issues, modified scan_rows to being ha_rows, and fixed the diplsay show table status to mention that rows inside of archive are compressed.
2005-07-09 08:57:08 -07:00
unknown
accdff5114 Fixed BUG#11365: Stored Procedure: Crash on Procedure operation
Two separate problems. A key buffer was too small in sp.cc for multi-byte
  fields, and the creation and fixing of mysql.proc in the scripts hadn't been
  updated with the correct character sets and collations (like the other
  system tables had).
  Note: No special test case, as the use of utf8 for mysql.proc will make
  any existing crash (if the buffer overrrun wasn't fixed).


mysql-test/r/sp-error.result:
  Updated test case for too long SP names (as the limit has increased with the use of utf8).
mysql-test/t/sp-error.test:
  Updated test case for too long SP names (as the limit has increased with the use of utf8).
scripts/mysql_create_system_tables.sh:
  Use utf8 for mysql.proc, just like for the other system tables.
scripts/mysql_fix_privilege_tables.sql:
  Use utf8 for mysql.proc, just like for the other system tables.
  (Some tabs also replaced by space)
sql/sp.cc:
  Use a larger key buffer for stored procedures to avoid stack overrun with multi-byte keys.
2005-07-08 16:33:15 +02:00
unknown
b28b0bf466 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into igor-inspiron.creware.com:/home/igor/mysql-4.1


sql/sql_select.cc:
  Auto merged
2005-07-08 06:37:09 -07:00
unknown
86b51de7cd sql_insert.cc:
Use the test() macro instead of assigning a pointer to a bool


sql/sql_insert.cc:
  Use the test() macro instead of assigning a pointer to a bool
2005-07-08 14:59:02 +02:00
unknown
7672befa72 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0
2005-07-08 11:32:13 +02:00
unknown
01b66f3f34 Fix crash caused by calling DES_ENCRYPT() without the --des-key-file
option having been passed to the server. (Bug #11643)


sql/des_key_file.cc:
  Split initialization of mutex to new function, and make sure static
  initialization variable is initialized.
sql/item_strfunc.cc:
  Make sure to initialize mutex before using it
sql/mysql_priv.h:
  Add init_des_key_file() declaration
mysql-test/r/func_des_encrypt.result:
  New BitKeeper file ``mysql-test/r/func_des_encrypt.result''
mysql-test/t/func_des_encrypt.test:
  New BitKeeper file ``mysql-test/t/func_des_encrypt.test''
BitKeeper/etc/config:
  Disable openlogging
2005-07-07 11:49:44 -07:00
unknown
077e335eb3 Fix for bug #8449(Silent column changes)
mysql-test/r/show_check.result:
  test result fixed
mysql-test/r/sql_mode.result:
  test result fixed
mysql-test/r/type_decimal.result:
  test result fixed
mysql-test/r/type_float.result:
  test result fixed
mysql-test/r/type_newdecimal.result:
  test result fixed
mysql-test/t/type_decimal.test:
  test fixed
mysql-test/t/type_float.test:
  test fixed
mysql-test/t/type_newdecimal.test:
  test case added
sql/share/errmsg.txt:
  error messages added
sql/sql_parse.cc:
  now precision/scale parameters are handled in required way
2005-07-07 21:47:18 +05:00
unknown
826b1db224 Merge neptunus.(none):/home/msvensson/mysql/bug11635/my41-bug11635
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-07-07 18:21:20 +02:00
unknown
d98461719e Fix for bug #11708 (real function returns wrongly rounded decimal)
mysql-test/r/type_newdecimal.result:
  test result fixed
mysql-test/t/type_newdecimal.test:
  test case added
sql/item_func.cc:
  Item_real_func::val_decimal implemented
sql/item_func.h:
  Item_real_func::val_decimal declared
2005-07-07 20:28:47 +05:00
unknown
46d472d636 BUG#11635 mysqldump exports TYPE instead of USING for HASH Cluster indexes
- Change output from SHOW CREATE TABLE to use USING instead of TYPE


mysql-test/r/ctype_utf8.result:
  Update test results
mysql-test/r/show_check.result:
  Update test results
mysql-test/r/sql_mode.result:
  Update test results
mysql-test/t/show_check.test:
  Add test for BUG#11635
sql/sql_show.cc:
  Change TYPE to USING as output from SHOW CREATE TABLE
2005-07-07 14:44:28 +02:00
unknown
afdc702665 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-07-07 09:13:49 +02:00
unknown
36421c837b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0


sql/item_strfunc.cc:
  Auto merged
2005-07-07 09:25:16 +03:00
unknown
f56102ae06 Fix typos that crept into ChangeSet for fix for Bug #11045.
sql/ha_federated.cc:
  Fix typo
sql/sql_insert.cc:
  Fix typo
2005-07-06 18:56:10 -07:00
unknown
8a23dd8672 Merge jwinstead@production.mysql.com:my/mysql-5.0-11045
into  mysql.com:/home/jimw/my/mysql-5.0-clean


VC++Files/sql/mysqld.dsp:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/item_strfunc.cc:
  SCCS merged
2005-07-06 16:49:04 -07:00
unknown
abe951abcb Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-07-06 23:24:51 +03:00
unknown
ef4290d569 Merge igor-inspiron.creware.com:/home/igor/mysql-5.0
into igor-inspiron.creware.com:/home/igor/dev/mysql-5.0-0
2005-07-06 09:14:44 -07:00
unknown
39968552a8 view.result, view.test:
Added a test case for bug #6120.
sql_view.cc:
  Fixed bug #6120.
  The SP cache must be invalidated when a view is altered.


sql/sql_view.cc:
  Fixed bug #6120.
  The SP cache must be invalidated when a view is altered.
mysql-test/t/view.test:
  Added a test case for bug #6120.
mysql-test/r/view.result:
  Added a test case for bug #6120.
2005-07-06 09:00:17 -07:00
unknown
23cc601089 Fixed BUG#7088: Stored procedures: labels won't work if character set is utf8.
We used 'IDENT' for labels as a temporary fix for the  parser conflicts
  introduced if the proper rule 'ident' was used. Now a specially tailored
  'label_ident' rule is used for labels instead.


mysql-test/r/sp.result:
  New test cases for BUG#7088.
mysql-test/t/sp.test:
  New test cases for BUG#7088.
sql/sql_yacc.yy:
  Make labels in stored procedures work with other character sets than latin1.
  Using a separate 'label_ident' rule (instead of 'ident') and splitting
  the 'keyword' rule into two got rid of the temporary fix of using 'IDENT' for
  labels (which didn't heed character sets).
2005-07-06 16:37:57 +02:00
unknown
f50ca56059 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2005-07-06 16:59:56 +03:00
unknown
21ca7e7c7e Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-4.1
2005-07-06 15:20:51 +03:00
unknown
310c470522 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2005-07-06 13:10:12 +02:00
unknown
e0df26b1fe Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-07-06 11:50:05 +02:00
unknown
daa3ebb65e Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


client/mysqldump.c:
  Auto merged
2005-07-06 11:47:48 +02:00
unknown
a58fec2688 Merge mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


client/mysqldump.c:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Merge
2005-07-06 11:39:48 +02:00
unknown
bda481ce41 Merge marko@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/marko/mysql-5.0-current
2005-07-06 12:29:20 +03:00
unknown
6ef62738fe Fixed handling of failed primary key update in INSERT .. ON DUPLICATE KEY UPDATE .. 2005-07-06 11:23:36 +02:00
unknown
8165560074 Merge
mysql-test/r/func_str.result:
  SCCS merged
mysql-test/t/func_str.test:
  SCCS merged
2005-07-06 11:36:27 +03:00
unknown
87b7e20ebd init_db.sql:
add new table privileges
Makefile.am:
  Include path to regex dir was accidently removed


sql/Makefile.am:
  Include path to regex dir was accidently removed
mysql-test/lib/init_db.sql:
  add new table privileges
2005-07-06 10:16:36 +02:00
unknown
cf297f60fe Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
2005-07-06 10:03:07 +02:00
unknown
ec6b1999a5 InnoDB: Make the srv_thread_concurrency checks more consistent.
innobase/include/srv0srv.h:
  Define SRV_CONCURRENCY_THRESHOLD
innobase/srv/srv0srv.c:
  Remove srv_thread_concurrency check from srv_conc_enter_innodb()
  and srv_conc_exit_innodb(), as the check is in the (only) caller
  of these functions, in ha_innodb.cc.
  srv_conc_force_enter_innodb(), srv_conc_force_exit_innodb():
  Check for srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD
sql/ha_innodb.cc:
  Make use of SRV_CONCURRENCY_THRESHOLD
2005-07-06 09:38:31 +03:00
unknown
99cee82126 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11394


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
mysql-test/t/sp-error.test:
  Manual merge.
sql/share/errmsg.txt:
  Manual merge.
2005-07-06 10:21:27 +04:00
unknown
8546ddd39a Merge mysql.com:/home/jimw/my/mysql-5.0-6903
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/r/view.result:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/sql_mode.result:
  Merge
mysql-test/t/sql_mode.test:
  Merge
2005-07-05 17:05:31 -07:00
unknown
036cd17369 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/r/query_cache.result:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/grant.result:
  Merge
mysql-test/t/grant.test:
  Merge
2005-07-05 15:23:13 -07:00
unknown
97b4cf0edb Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1-distcheck
2005-07-06 00:15:55 +02:00
unknown
ad0516d91e Merge
BitKeeper/deleted/.del-Makefile.am~6cfa0db5e7778d09:
  Auto merged
BitKeeper/deleted/.del-Makefile.am~41238af048e60515:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
netware/Makefile.am:
  Auto merged
tests/Makefile.am:
  Auto merged
vio/Makefile.am:
  SCCS merged
2005-07-06 00:06:11 +02:00
unknown
b0a6a8e137 Makefile.am:
Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir


client/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
cmd-line-utils/libedit/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
dbug/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
extra/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
heap/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
isam/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
libmysql/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
libmysql_r/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
libmysqld/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
libmysqld/examples/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
merge/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
myisam/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
myisammrg/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
mysql-test/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
mysys/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
netware/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
regex/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
sql/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
strings/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
tests/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
vio/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
tools/Makefile.am:
  Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
2005-07-05 23:24:48 +02:00
unknown
128712c04a Merge mysql.com:/home/jimw/my/mysql-4.1-11440
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_table.cc:
  Auto merged
2005-07-05 12:54:12 -07:00
unknown
83d9aa1441 Merge mysql.com:/home/jimw/my/mysql-4.1-11330
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-07-05 12:51:16 -07:00
unknown
63c5a72b31 Merge mysql.com:/home/jimw/my/mysql-5.0-10214
into  mysql.com:/home/jimw/my/mysql-5.0-clean


include/my_sys.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
tests/mysql_client_test.c:
  Clean up merge of new tests
2005-07-05 09:47:20 -07:00
unknown
7450eef89a Merging 4.1 into 5.0
client/mysqldump.c:
  Auto merged
sql/log_event.cc:
  Removed settings of thd->lex fields since they are not needed in 5.0.
2005-07-05 16:02:03 +02:00
unknown
5842bccf6d Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b11401-mysql-4.1
2005-07-05 14:08:22 +02:00
unknown
28f554af12 Bug#11401: Setting thd->lex so that engines (i.e., InnoDB) recognizes
this as a LOAD DATA ... REPLACE INTO .. statement.


sql/log_event.cc:
  Setting thd->lex so that engines (i.e., InnoDB) recognizes this 
  as a LOAD DATA ... REPLACE INTO .. statement.
2005-07-05 13:55:54 +02:00
unknown
323652f4dc Merge
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-05 13:42:19 +03:00
unknown
906235eea9 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug5-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-07-05 13:39:20 +03:00
unknown
836f5a5a1e fixed environment creation and cleaning up for processing view one by one during checking (BUG#11337)
mysql-test/r/view.result:
  checking views after some view with error (BUG#11337)
mysql-test/t/view.test:
  checking views after some view with error (BUG#11337)
sql/sql_lex.cc:
  environment cleaning up for processing view one by one
sql/sql_lex.h:
  methods for lex cleunup during view processing one by one
sql/sql_table.cc:
  fixed environment creation and cleaning up for processing view one by one (BUG#11337)
2005-07-05 13:37:02 +03:00
unknown
200f03fdd4 added processing of view grants to table grants (BUG#9795)
mysql-test/r/grant.result:
  test of new table privileges
mysql-test/r/system_mysql_db.result:
  added new table priveleges
mysql-test/r/view_grant.result:
  error changed
mysql-test/t/grant.test:
  test of new table privileges
mysql-test/t/view_grant.test:
  error changed
scripts/mysql_create_system_tables.sh:
  add new table privileges
scripts/mysql_fix_privilege_tables.sql:
  fixed system tables fix script
sql/sql_acl.h:
  fixed coding/decoding new tables grants
2005-07-05 13:36:36 +03:00
unknown
cd42770548 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
2005-07-05 12:24:03 +02:00
unknown
2c44736107 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2005-07-05 12:22:36 +02:00
unknown
ee734b4400 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug2-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-5.0
2005-07-05 12:24:04 +03:00
unknown
dd72175d0b post-merge fixes
mysql-test/r/query_cache.result:
  results moved
sql/sql_cache.cc:
  postmerge fixes
2005-07-05 12:23:13 +03:00
unknown
b5fd8cae27 merge 2005-07-05 11:38:05 +03:00
unknown
7ff88ba7a7 merge
sql/item_sum.h:
  Auto merged
2005-07-05 11:21:47 +03:00
unknown
166a489436 Merge mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Merge
2005-07-05 10:01:27 +02:00
unknown
3a0cec0578 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-jul4
2005-07-04 23:40:36 +00:00
unknown
5e212a7231 BUG#9814: post-review fixes: clear thd->net.no_send error after SP instruction
execution, not before.
2005-07-04 23:40:01 +00:00
unknown
b87b32555e Fix for BUG#9814: Clear thd->net.no_send_error before each SP instruction
execution. Failure to do so caused the erroneous statements to send nothing
and hang the client.


mysql-test/r/sp-error.result:
  Testcase for BUG#9814. Note that the result demonstrates that currently
  mysql-test-run ignores errors in multi-statement if they arrive after first 
  resultset has been received.
mysql-test/t/sp-error.test:
  Testcase for BUG#09814.
2005-07-04 23:00:23 +00:00
unknown
e9ac18c204 Fixed indentation 2005-07-04 20:36:38 +02:00
unknown
a1da992f4f Merge marko@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/marko/mysql-5.0-current


sql/ha_innodb.cc:
  Auto merged
2005-07-04 16:12:08 +03:00
unknown
5d82b41e3a After merge fixes
mysql-test/r/group_by.result:
  After merge fix
  (Put test in same order as in 4.1)
mysql-test/t/group_by.test:
  After merge fix
  (Put test in same order as in 4.1)
sql/item_cmpfunc.cc:
  After merge fix (+ simple fix to not allow compiler to do tail optimization)
sql/item_cmpfunc.h:
  After merge fix
2005-07-04 16:01:04 +03:00
unknown
3c82f72091 manual merge
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
2005-07-04 03:50:04 +03:00
unknown
306ebf7b1c Fixes during review of new code
- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling


myisam/mi_unique.c:
  Improved comments
myisam/myisampack.c:
  Updated version number
mysql-test/r/group_by.result:
  Added test that was lost during earlier merge
mysql-test/r/information_schema.result:
  Safety fix: Drop procedures before used
mysql-test/t/group_by.test:
  Added test that was lost during earlier merge
mysql-test/t/information_schema.test:
  Safety fix: Drop procedures before used
mysys/hash.c:
  Updated comment
sql/field.cc:
  false -> FALSE
sql/ha_ndbcluster.cc:
  Fix some style issues
  - No () around argument to 'case'
  - Space before ( in switch and if
  - Removed 'goto'
  - Added {}
  - Added () to make expressions easier to read
  - my_snprintf -> strmov
sql/handler.cc:
  if( -> if (
sql/item.cc:
  Indentation changes
sql/item.h:
  false -> FALSE
sql/item_cmpfunc.cc:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_cmpfunc.h:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_func.cc:
  Indentation fixes
  Fixed wrong goto label
sql/mysqld.cc:
  Remove test for opt_disable_networking as this flag can never be set here
sql/opt_range.cc:
  Simplify code
sql/sql_class.h:
  Move define out from middle of class definition
sql/sql_parse.cc:
  Remove extra empty lines
sql/sql_select.cc:
  use real_item() instead of (Item_ref*) item
  Modifed function comment to be align with others
  Simple optimization
sql/sql_union.cc:
  Portability fix:
  Don't use 'bool_variable|=...'
sql/sql_view.cc:
  Move List_iterator_fast out from loops (rewind is faster than creating a new itearator)
strings/ctype-utf8.c:
  if( -> if (
strings/ctype.c:
  Remove disabled code
strings/decimal.c:
  Indentation fixes
strings/xml.c:
  Indentation fixes
2005-07-04 03:42:33 +03:00
unknown
428830c500 After merge fixes
Better fix for ON DUPLICATE KEY UPDATE


mysql-test/r/group_by.result:
  After merge fixes
mysql-test/r/select.result:
  Reorder test to match 4.1 tests (will make future merges easier)
mysql-test/t/group_by.test:
  Added --disable_ps_protocol to avoid extra warning
mysql-test/t/select.test:
  Reorder test to match 4.1 tests (will make future merges easier)
sql/mysql_priv.h:
  Better fix for ON DUPLICATE KEY UPDATE
sql/sql_base.cc:
  After merge fixes
sql/sql_insert.cc:
  Better fix for ON DUPLICATE KEY UPDATE
  (old solution gave problem with item->cached_table)
sql/sql_prepare.cc:
  Better fix for ON DUPLICATE KEY UPDATE
2005-07-04 03:24:25 +03:00
unknown
fbdfcae6a9 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug_qc-4.1
2005-07-04 01:36:55 +03:00
unknown
b17793f5b5 merge 2005-07-04 01:36:06 +03:00
unknown
eeee5fb10b Merge with 4.1
Makefile.am:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysys/thr_alarm.c:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Keep old
client/mysqldump.c:
  Manual merge
client/mysqltest.c:
  Automatic merge
configure.in:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Auto merge
mysql-test/r/func_str.result:
  Auto merge
mysql-test/r/group_by.result:
  Auto merge
mysql-test/r/insert_select.result:
  Auto merge
mysql-test/r/insert_update.result:
  Auto merge
mysql-test/r/lowercase_table2.result:
  Auto merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/variables.result:
  Auto merge
mysql-test/t/ctype_ucs.test:
  Auto merge
mysql-test/t/func_str.test:
  Auto merge
mysql-test/t/group_by.test:
  Auto merge
mysql-test/t/insert_select.test:
  Auto merge
mysql-test/t/insert_update.test:
  Auto merge
mysql-test/t/ndb_alter_table.test:
  Auto merge
mysql-test/t/select.test:
  Auto merge
mysql-test/t/variables.test:
  Auto merge
mysys/my_access.c:
  Auto merge
scripts/make_win_src_distribution.sh:
  Auto merge
sql/field.cc:
  Manual merge
sql/ha_ndbcluster.cc:
  Auto merge
sql/handler.cc:
  Auto merge
sql/item.cc:
  Auto merge
sql/item.h:
  Manual merge
sql/item_cmpfunc.h:
  Auto merge
sql/item_strfunc.cc:
  Auto merge
sql/item_strfunc.h:
  Auto merge
sql/mysql_priv.h:
  manual merge
sql/mysqld.cc:
  manual merge
sql/opt_range.cc:
  manual merge
sql/set_var.cc:
  Auto merge
sql/sql_base.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_insert.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
  Simplify mysql_prepare_insert by using local variable for select_lex and save old values just before they are changed
sql/sql_parse.cc:
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_prepare.cc:
  New ON DUPLICATE KEY UPDATE handling
sql/sql_select.cc:
  manual merge
sql/sql_table.cc:
  auto merge
sql/sql_yacc.yy:
  auto merge
strings/ctype-ucs2.c:
  auto merge
strings/ctype-utf8.c:
  auto merge
2005-07-03 14:17:52 +03:00
unknown
6d9bc9c8b7 do not register changes of stack variable
sql/item.cc:
  new argument of find_field_in_tables()
sql/mysql_priv.h:
  new argument of find_field_in_tables()
sql/sp.cc:
  new argument of find_field_in_tables()
sql/sql_base.cc:
  new argument of find_field_in_tables()
sql/sql_help.cc:
  new argument of find_field_in_tables()
2005-07-03 00:51:02 +03:00
unknown
2e16838c42 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


sql/sql_select.cc:
  Auto merged
2005-07-02 16:13:35 +03:00
unknown
be515e075c fixed var_samp printing (BUG#10651)
mysql-test/r/view.result:
  Using var_samp with view (BUG#10651)
mysql-test/t/view.test:
  Using var_samp with view (BUG#10651)
sql/item_sum.h:
  fixed var_samp printing
2005-07-02 16:12:32 +03:00
unknown
7e8c38656f fixed difference between ps-protocol and usual execution
mysql-test/r/view.result:
  removed wrong warning
sql/sql_view.cc:
  fix_fields have to be (and will be) made later
2005-07-02 13:16:30 +03:00
unknown
de21d09d8b Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0
2005-07-01 23:16:28 +03:00
unknown
8561600a5a Many files:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE


sql/ha_innodb.cc:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/row/row0mysql.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/row/row0sel.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/trx0trx.ic:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/row0mysql.h:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/trx0trx.h:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/lock/lock0lock.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/trx/trx0trx.c:
  Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
2005-07-01 20:44:35 +03:00
unknown
534ab53c17 fixed create_distinct_group() to make references via ref_pointer_array 2005-07-01 20:13:07 +03:00
unknown
ac480a3764 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0
2005-07-01 17:01:03 +02:00
unknown
d0df504b83 Fix a crash I introduced by the last push. 2005-07-01 19:01:02 +04:00
unknown
607030266f olap.result, olap.test:
Added a test case for bug #11543.
sql_select.cc:
  Fixed bug #11543.
  A ROLLUP query could return a wrong result set when
  its GROUP BY clause contained references to the same
  column.


sql/sql_select.cc:
  Fixed bug #11543.
  A ROLLUP query could return a wrong result set when
  its GROUP BY clause contained references to the same
  column.
mysql-test/t/olap.test:
  Added a test case for bug #11543.
mysql-test/r/olap.result:
  Added a test case for bug #11543.
2005-07-01 07:40:22 -07:00
unknown
407d245be2 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0
2005-07-01 15:52:42 +02:00
unknown
d81f057409 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-11172-new


sql/sql_select.cc:
  Auto merged
2005-07-01 17:52:41 +04:00
unknown
b32d2ac276 Fix a valgrind warning.
sql/sql_prepare.cc:
  A small fix for the previous patch: we should first free the
  prepared statement items, and then free the runtime memory root,
  as some memory used for cleanup is allocated in that mem root.
sql/sql_select.cc:
  - ever free the cursor mem root in close() (it's too early).
2005-07-01 17:51:04 +04:00
unknown
120a2da13e Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0


sql/sql_select.cc:
  Auto merged
2005-07-01 06:42:39 -07:00
unknown
1ff4a0ebf1 Disabled the GOTO feature. (It's non-standard and undocumented.)
We want to have the defacto standard syntax for labels ("L:" instead of "label L;"),
and fix some known bugs, before we enable this again.
The code is left intact (#ifdef'ed SP_GOTO) and the test cases are kept in
sp-goto.test, for the future...


mysql-test/r/sp-error.result:
  Moved all goto tests to sp-goto.test.
mysql-test/r/sp.result:
  Moved all goto tests to sp-goto.test.
mysql-test/t/disabled.def:
  Disabled GOTO/LABEL (until the label syntax and some bugs can be fixed).
  We keep the tests in sp-goto.test for the future, but disable for now.
mysql-test/t/sp-error.test:
  Moved all goto tests to sp-goto.test.
mysql-test/t/sp.test:
  Moved all goto tests to sp-goto.test.
sql/lex.h:
  Disabled GOTO/LABEL (until the label syntax and some bugs can be fixed).
sql/sql_yacc.yy:
  Disabled GOTO/LABEL (until the label syntax and some bugs can be fixed).
2005-07-01 15:25:51 +02:00
unknown
6c8d397588 - fix -ansi -pedantic error 2005-07-01 16:23:05 +04:00
unknown
dc22424bd9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-11172-new


sql/sql_class.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-07-01 15:50:32 +04:00
unknown
d36c14f748 A fix and a test case for Bug#11172 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY date/datetime filter server crash".
The fix adds support for Item_change_list in cursors (proper rollback
of the modified item tree). 


sql/sql_class.cc:
  No need to call fatal_error() twice.
sql/sql_prepare.cc:
  - implement proper cleanup of the prepared statement in mysql_stmt_reset
    if there is a cursor.
  - take into account thd->change_list when fetching data through a
    cursor.
sql/sql_select.cc:
  - take into account thd->change_list when fetching data from a cursor:
    grab it when we open a cursor, and rollback the changes to the parsed
    tree when we close it.
sql/sql_select.h:
  - Cursor::change_list added
tests/mysql_client_test.c:
  - a test case for Bug#11172 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY date/datetime
   filter server crash"
2005-07-01 15:47:45 +04:00
unknown
7dad490f36 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/view.result:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-07-01 03:50:48 -07:00
unknown
8ec6c354ab Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.0
2005-07-01 15:46:53 +05:00
unknown
66b4354a84 view.result:
Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
olap.result, olap.test:
  Added a test case for bug #11639.
sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.


sql/item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.
sql/sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
mysql-test/t/olap.test:
  Added a test case for bug #11639.
mysql-test/r/olap.result:
  Added a test case for bug #11639.
mysql-test/r/view.result:
  Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
2005-07-01 03:46:08 -07:00
unknown
497b88652b fix bugs found by gcc 3.4 compiler
sql/sp_head.h:
  removed unused parameter
sql/sql_lex.cc:
  make correct operation order
sql/sql_yacc.yy:
  removed unused parameter
2005-07-01 13:27:23 +03:00
unknown
da83833964 InnoDB: Optimize [and clarify] a condition in build_template()
sql/ha_innodb.cc:
  build_template(): Optimize (and make more readable) the conditions
  for skipping or including a field.
2005-07-01 13:20:16 +03:00
unknown
0e6a93ece3 sql_table.cc:
Bug#11657 Creation of secondary index fails:

  If TINYBLOB key part length is 255, it is equal
  to field length. For BLOB, unlike for CHAR/VARCHAR,
  we should keep a non-zero key part length, otherwise
  "BLOB/TEXT column used in key specification without a key length"
  error is produced afterwards.

type_blob.result, type_blob.test:
  fixing tests accordinly


sql/sql_table.cc:
  Bug#11657 Creation of secondary index fails
  For TINYBLOB key part length can be equal to field length.
  We should still keep a non-zero key part length,
mysql-test/t/type_blob.test:
  fixing tests accordinly
mysql-test/r/type_blob.result:
  fixing tests accordinly
2005-07-01 15:07:06 +05:00
unknown
0f64a49506 "Fix" for bug #11394 "Recursion in SP crash server" and bug #11600
"Stored procedures: crash with function calling itself".

Disallow recursive stored routines until we either make Item's and LEX
reentrant safe or will use spearate sp_head instances (and thus separate
LEX objects and Item trees) for each routine invocation.


mysql-test/r/sp-error.result:
  Added tests for bug #11394 "Recursion in SP crash server" and
  bug #11600 "Stored procedures: crash with function calling itself".
  (We simply disallow recursion for stored routines).
mysql-test/r/sp.result:
  Disabled test cases containing recursive stored routines until we will
  support for them.
mysql-test/t/sp-error.test:
  Added tests for bug #11394 "Recursion in SP crash server" and
  bug #11600 "Stored procedures: crash with function calling itself".
  (We simply disallow recursion for stored routines).
mysql-test/t/sp.test:
  Disabled test cases containing recursive stored routines until we will
  support for them.
sql/share/errmsg.txt:
  Added error message saying that recursive stored routines are disallowed.
sql/sp_head.cc:
  sp_head::execute():
    Since many Item's and LEX members can't be used in reentrant fashion
    we have to disable recursion for stored routines. So let us track
    routine invocations using sp_head::m_is_invoked member and raise
    error when one attempts to call routine recursively.
sql/sp_head.h:
  sp_head:
    Added m_is_invoked member for tracking of routine invocations and
    preventing recursion.
2005-07-01 13:01:46 +04:00
unknown
b7e409a583 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2005-07-01 10:07:01 +03:00
unknown
df7852f20d Optimization during review
Add extra check to delete [] to ensure we are not deleting not allocated data


sql/sql_select.cc:
  Optimization
  Add extra check to delete [] to ensure we are not deleting not allocated data
2005-07-01 09:40:05 +03:00
unknown
b4f595b95f Name resolution context added (BUG#6443)
include/my_bitmap.h:
  new bitmap operation
mysql-test/r/view.result:
  added warnings
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysql-test/t/view.test:
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysys/my_bitmap.c:
  new bitmap operation
sql/field.h:
  index of field in table added
sql/item.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item.h:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item_cmpfunc.cc:
  table list removed from fix_fields() arguments
sql/item_cmpfunc.h:
  table list removed from fix_fields() arguments
sql/item_func.cc:
  table list removed from fix_fields() arguments
sql/item_func.h:
  table list removed from fix_fields() arguments
sql/item_row.cc:
  table list removed from fix_fields() arguments
sql/item_row.h:
  table list removed from fix_fields() arguments
sql/item_strfunc.cc:
  fixed server crash on NULL argument
sql/item_strfunc.h:
  table list removed from fix_fields() arguments
sql/item_subselect.cc:
  table list removed from fix_fields() arguments
sql/item_subselect.h:
  table list removed from fix_fields() arguments
sql/item_sum.cc:
  table list removed from fix_fields() arguments
sql/item_sum.h:
  table list removed from fix_fields() arguments
sql/item_timefunc.cc:
  table list removed from fix_fields() arguments
sql/item_timefunc.h:
  table list removed from fix_fields() arguments
sql/item_uniq.h:
  table list removed from fix_fields() arguments
sql/log_event.cc:
  Name resolution context added
sql/log_event.h:
  Name resolution context added
sql/mysql_priv.h:
  Name resolution context added
sql/set_var.cc:
  table list removed from fix_fields() arguments
sql/share/errmsg.txt:
  new error message
sql/sp.cc:
  Name resolution context added
sql/sp_head.cc:
  table list removed from fix_fields() arguments
sql/sp_head.h:
  Name resolution context added
sql/sql_base.cc:
  table list removed from fix_fields() arguments
  Name resolution context added
sql/sql_class.cc:
  renamed variable
sql/sql_delete.cc:
  Name resolution context added
sql/sql_derived.cc:
  Name resolution context added
sql/sql_do.cc:
  table list removed from fix_fields() arguments
sql/sql_handler.cc:
  Name resolution context added
sql/sql_help.cc:
  Name resolution context added
sql/sql_insert.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/sql_lex.cc:
  Name resolution context added
sql/sql_lex.h:
  removed resolve mode (information stored into name resolution context)
sql/sql_load.cc:
  table list removed from fix_fields() arguments
sql/sql_olap.cc:
  Name resolution context added
sql/sql_parse.cc:
  Name resolution context added
sql/sql_prepare.cc:
  table list removed from fix_fields() arguments
sql/sql_select.cc:
  table list removed from fix_fields() arguments
sql/sql_show.cc:
  Name resolution context added
sql/sql_trigger.cc:
  table list removed from fix_fields() arguments
sql/sql_udf.h:
  table list removed from fix_fields() arguments
sql/sql_union.cc:
  Name resolution context added
sql/sql_update.cc:
  Name resolution context added
sql/sql_view.cc:
  Name resolution context added
sql/sql_view.h:
  table list removed from fix_fields() arguments
sql/sql_yacc.yy:
  Name resolution context added
sql/table.cc:
  Name resolution context added
  merged view processing moved
sql/table.h:
  merged view processing moved
2005-07-01 07:05:42 +03:00
unknown
6a5ba8fdc2 Fixing comment format in sp_head.cc.
sql/sp_head.cc:
  Fixing comment format.
2005-06-30 18:36:13 +02:00
unknown
a95bb38a7f Fixed BUG#11529: crash server after use stored procedure
Make sure to cleanup the items for a cursor query after each open, otherwise
it's done too late, after the run-time mem_root is freed.


mysql-test/r/sp.result:
  New test case for BUG#11529.
mysql-test/t/sp.test:
  New test case for BUG#11529.
sql/sp_head.cc:
  Add a back pointer from a sp_cursor to its cpush instruction, and use it to set
  the arena and cleanup the items for the cursor's query when opening it.
sql/sp_rcontext.cc:
  Store pointer in sp_cursor to its cpush instruction.
sql/sp_rcontext.h:
  Store pointer in sp_cursor to its cpush instruction.
2005-06-30 18:07:06 +02:00
unknown
9d5a45c2f3 - backport of a compile fix from 4.1 (ChangeSet@1.2260.23.2 2005/05/19 from reggie)
"changed dl_name to udf->dl in mysql_create_function"
2005-06-30 17:33:23 +02:00
unknown
5a13f2a8a6 Fixed Bug#11226 and reverted fix for Bug#6993.
Using 8 bytes for data pointer does not work at least on
all computers. The result may become 0 or negative number.
(mysqld, myisamchk)
 


myisam/mi_create.c:
  Fixed Bug#11226, "Dynamic table >4GB issue".
mysql-test/r/variables.result:
  Restricted myisam_data_pointer_size back to 7.
mysql-test/t/variables.test:
  Restricted myisam_data_pointer_size back to 7.
sql/mysqld.cc:
  Restricted myisam_data_pointer_size back to 7.
2005-06-30 16:13:22 +03:00
unknown
ec9ac3fe5c A fix and a test case for Bug#10794 "mysql_stmt_attr_set no
open cursor after mysql_stmt_execute" + post-review fixes.
The bug was caused by wrong flags in stmt->server_status on the client
side: if there was no cursor, the server didn't send server_status
flags to the client, and the old flags were used to set up the
fetch function of a statement. Consequently, stmt_read_row_from_cursor was
used when there was no cursor. The fix fixes the server to always
send server flags to the client.


include/mysql_com.h:
  Update stale comments.
libmysql/libmysql.c:
  Remove an extra assignment.
libmysqld/lib_sql.cc:
  Update to correspond to the changed signature of send_eof
sql/protocol.cc:
  Actual fix for bug#10794: create a function that writes the eof
  packet to network and use it from send_fields. We need to send
  a full eof packet from send_fields to inform the client about
  the cursor status (that there is no cursor in this case).
sql/protocol.h:
  Remove an unused parameter for send_eof.
tests/mysql_client_test.c:
  A test case for Bug#10794 "mysql_stmt_attr_set no open cursor 
  after mysql_stmt_execute"
2005-06-30 16:17:10 +04:00
unknown
7a5ec7606d Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  linux.site:/home/marty/MySQL/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysys/default.c:
  Auto merged
ndb/include/transporter/TransporterDefinitions.hpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2005-06-30 12:20:52 +02:00
unknown
9996c3d8f1 a fix.
bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs 


mysql-test/r/type_bit.result:
  test case.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs
mysql-test/t/type_bit.test:
  test case.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs
sql/field.h:
  a fix.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs 
  
  - max_length() returns length in bits.
  - introduced set_bit_ptr() function, which sets bit_ptr and bit_ofs.
sql/item.cc:
  a fix.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs
  
  - create Field_bit_as_char in case of MYSQL_TYPE_BIT in the Item::tmp_table_field_from_field_type()
    (we cannot create Field_bit here because of lack of information: bit_ptr, bit_ofs)
sql/mysql_priv.h:
  a fix.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs 
  
  - table_cant_handle_bit_fields parameter added to the create_tmp_field()
sql/sql_select.cc:
  a fix.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs
  
  - create_tmp_field() changes to return create_tmp_field_from_item() result 
    (actually, Field_bit_as_char) if table_cant_handle_bit_fields=1 for bit fields.
  - create_tmp_field() calls accordingly changed 
  - call set_bit_ptr() for bit fields after the move_field() call during 
    temporary table creation.
sql/sql_table.cc:
  a fix.
  bug #10617: Insert from same table to same table give incorrect result for bit(4) column.
  bug #11091: union involving BIT: assertion failure in Item::tmp_table_field_from_field_type
  bug #11572: MYSQL_TYPE_BIT not taken care of in temp. table creation for VIEWs
  
  - changed the create_tmp_field() call
2005-06-30 13:38:29 +05:00
unknown
258d9a9658 Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0
2005-06-29 20:59:21 +03:00
unknown
f946977791 ha_innodb.cc:
Let InnoDB use a consistent read when it initializes the auto-inc counter for a table: this will eliminate spurious deadlocks, but will ignore an UPDATE if that happens at the same time that we init the auto-inc counter; this has to be documented; this path also fixes most of Bug #11633, but not all: if ::external_lock() is not called on the table in SHOW TABLE STATUS, that might cause a crash if someone simultaneously DROPs the table


sql/ha_innodb.cc:
  Let InnoDB use a consistent read when it initializes the auto-inc counter for a table: this will eliminate spurious deadlocks, but will ignore an UPDATE if that happens at the same time that we init the auto-inc counter; this has to be documented; this path also fixes most of Bug #11633, but not all: if ::external_lock() is not called on the table in SHOW TABLE STATUS, that might cause a crash if someone simultaneously DROPs the table
2005-06-29 20:52:22 +03:00
unknown
80089d532b Changed delete_row to always get key from record argument, removed unused function 2005-06-29 16:17:47 +02:00
unknown
e0c17446e0 Changed delete_row to always get key from record argument 2005-06-29 16:13:50 +02:00
unknown
84aa570ddf Applied some Netware related patches.
include/config-netware.h:
  Netware related fix. Some changes needed when building against latest libc (June 2005)
netware/my_print_defaults.def:
  Stack size increase.
sql/mysqld.cc:
  Needed with latest libc.
2005-06-29 14:02:11 +03:00
unknown
c35bb07954 Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2005-06-29 02:44:41 -07:00
unknown
1aa6343fe8 Simple optimization
nsure that delete works not only on table->record[0] for federated tables


sql/field.cc:
  Test OOM condition
sql/ha_federated.cc:
  Simple optimizations
  Ensure that delete works not only on table->record[0]
sql/opt_range.cc:
  Simplify code
2005-06-29 12:44:40 +03:00
unknown
3dcf7083a9 func_str.test:
Added test cases for bug #11469.
item_strfunc.h:
  Fixed bug #11469: wrong implementation of the not_null_tables
  method for CONCAT_WS.


sql/item_strfunc.h:
  Fixed bug #11469: wrong implementation of the not_null_tables
  method for CONCAT_WS.
mysql-test/t/func_str.test:
  Added test cases for bug #11469.
2005-06-29 02:40:25 -07:00
unknown
17bd4e9f6a Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug7-5.0
2005-06-29 11:52:41 +03:00
unknown
c35625416c fixed SP parameter execution
sql/sp_head.cc:
  execute parameters in statement mem_root
sql/sql_union.cc:
  additional assert
2005-06-29 11:50:29 +03:00
unknown
a3d07b1c3e a fix (bug #11215: BIGINT: can't set DEFAULT to minimum end-range)
sql/item.cc:
  a fix (bug #11215: BIGINT: can't set DEFAULT to minimum end-range)
  Pass unsig=1 to the constructor.
2005-06-29 12:03:38 +05:00
unknown
3aca0a0c62 fixed not_null_tables() for IN() (BUG#9393)
(IN() remove NULL rows only for tables from first argument (value which we looking for in IN() list) but not for tables from IN() list)
Also it will be better change Item::not_null_tables() to prohibit this optimisation by default for new created items in 5.0 or 5.1.


mysql-test/r/select.result:
  IN with outer join condition
mysql-test/t/select.test:
  IN with outer join condition
sql/item_cmpfunc.h:
  correct not_null_tables() for IN
2005-06-28 22:20:25 +03:00
unknown
10986dba1b Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0


sql/opt_range.cc:
  Auto merged
2005-06-28 12:04:46 -07:00