Commit graph

8792 commits

Author SHA1 Message Date
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
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
b18b97aace field_conv.cc:
Identation fix


sql/field_conv.cc:
  Identation fix
2005-07-11 16:51:39 +05: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
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
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
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
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
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
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
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
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
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
e9ac18c204 Fixed indentation 2005-07-04 20:36:38 +02: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
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
534ab53c17 fixed create_distinct_group() to make references via ref_pointer_array 2005-07-01 20:13:07 +03: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
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
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
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
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
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
2637338014 fixed substring() length calculation in case of constant negative argument (BUG#10269)
mysql-test/r/func_str.result:
  Correct length reporting from substring()
mysql-test/t/func_str.test:
  Correct length reporting from substring()
sql/item_strfunc.cc:
  fixed substring() length calculation in case of constant negative argument
2005-06-28 21:45:11 +03:00
unknown
d8edc2db59 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-06-28 05:33:40 -07:00
unknown
05c7edf648 Move reset of insert_values to ensure it's done also during error conditions
This fixed a failure of insert_update.test on some platforms


mysys/thr_alarm.c:
  Fixed problem noticed by valgrind
sql/opt_range.cc:
  Simple optimization for common case
sql/sql_base.cc:
  Safety assert
sql/sql_insert.cc:
  Added comment
2005-06-28 15:06:16 +03:00
unknown
69f2934891 Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0


sql/sql_select.cc:
  Auto merged
2005-06-28 03:24:06 -07:00
unknown
27478af9d5 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1


sql/field.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-28 03:20:00 -07:00
unknown
67abd491a1 group_by.result, group_by.test:
Added a test case for bug #11414.
sql_select.cc:
  Fixed bug #11414: crash on Windows with some simple
  GROUP BY queries.
  It happened to an allocation of an array containing
  0 Copy_field elements in setup_copy_fields.
  The bug had been already fixed in 5.0.


sql/sql_select.cc:
  Fixed bug #11414: crash on Windows with some simple
  GROUP BY queries.
  It happened to an allocation of an array containing
  0 Copy_field elements in setup_copy_fields.
  The bug had been already fixed in 5.0.
mysql-test/t/group_by.test:
  Added a test case for bug #11414.
mysql-test/r/group_by.result:
  Added a test case for bug #11414.
2005-06-28 03:18:37 -07:00
unknown
f7780a1cc2 opt_range.cc:
Added missing `;' to DBUG_RETURN()


sql/opt_range.cc:
  Added missing `;' to DBUG_RETURN()
2005-06-28 04:33:06 +02:00
unknown
e45709dfbd abort storing query to query cache if warnings appeared (BUG#9414)
mysql-test/r/query_cache.result:
  Query with warning prohibited to query cache
mysql-test/t/query_cache.test:
  Query with warning prohibited to query cache
sql/sql_error.cc:
  abort storing query to query cache if warnings appeared
2005-06-28 00:52:21 +03:00
unknown
76d444fcb6 Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning


client/mysqldump.c:
  Cleanup
  Ensure we free allocated memory
  Portability fixes
client/mysqltest.c:
  Cleanup of code during review
  Portability fixes (Don't use 'bool')
mysql-test/r/func_encrypt.result:
  NULL as argument to encrypt/decrypt should return NULL without a warning
mysql-test/r/func_encrypt_nossl.result:
  Added test of NULL argument
mysql-test/t/func_encrypt_nossl.test:
  Added test of NULL argument
sql/handler.cc:
  Cleanup during code review
sql/item_strfunc.cc:
  NULL as argument to encrypt/decrypt should return NULL without a warning
sql/sql_parse.cc:
  Fix wrong merge (fix was not needed as the previous code was reverted)
sql/sql_table.cc:
  Removed extra new line
2005-06-27 20:31:00 +03:00
unknown
6c46a993d7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mishka.local:/home/my/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-06-27 16:47:44 +03:00
unknown
d10877ce8c Better bug fix for:
#9728  'Decreased functionality in "on duplicate key update
#8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'

This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part


mysql-test/r/insert_select.result:
  More tests for bug #9728 and #8147
mysql-test/r/insert_update.result:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysql-test/t/insert_select.test:
  More tests for bug #9728 and #8147
mysql-test/t/insert_update.test:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysys/my_access.c:
  Cleanup (shorter loop variable names)
sql/ha_ndbcluster.cc:
  Indentation fixes
sql/item.cc:
  Remove item_flags
sql/item.h:
  Remove item_flags
sql/mysql_priv.h:
  New arguments to mysql_prepare_insert
sql/sql_base.cc:
  Remove old fix for bug #8147
sql/sql_insert.cc:
  Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE
sql/sql_parse.cc:
  Revert fix for #9728
  Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause
sql/sql_prepare.cc:
  New arguments to mysql_prepare_insert
sql/sql_yacc.yy:
  Revert bug fix for #9728
2005-06-27 16:46:41 +03:00
unknown
f40f711e0c Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-06-27 09:53:11 +02:00
unknown
3f499c32d4 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into rurik.mysql.com:/home/igor/mysql-4.1
2005-06-25 05:45:50 -07:00
unknown
a7e66efc2c Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
Moved the key statistics update to info().
The table is not locked in open(). This made wrong stats possible.

No test case for the test suite.
This happens only with heavy concurrency.
A test script is added to the bug report.


mysql-test/r/heap_hash.result:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Updated test results to reflect the new  statistics behaviour.
mysql-test/t/heap_hash.test:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Added a FLUSH TABLES to avoid statistics differences between normal 
  and ps-protocol tests.
sql/ha_heap.cc:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Moved the key statistics update to info().
  The table is not locked in open(). This made wrong stats possible.
sql/ha_heap.h:
  Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
  Added an element to track the validity of the key statistics.
2005-06-24 17:47:09 +02:00
unknown
5aa793f72b backport for #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument. 2005-06-24 14:04:48 +05:00
unknown
0cc6dd83c4 temporary tables of subquery in the from clause just skipped during processing QC tables (BUG#11522)
mysql-test/r/query_cache.result:
  queries with subquery in the FROM clause
mysql-test/t/query_cache.test:
  queries with subquery in the FROM clause
sql/sql_cache.cc:
  temporary tables of subquery in the from clause just skipped during processing QC tables
2005-06-23 20:06:35 +03:00
unknown
aa4ccff7f7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-06-23 19:06:35 +02:00
unknown
5d12a0bf49 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/timka/mysql/src/4.1-virgin
2005-06-23 20:06:35 +03:00
unknown
d9a7e4e0dc Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-1
2005-06-23 10:06:35 -07:00
unknown
1093237174 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug10151
2005-06-23 19:06:34 +02:00