Commit graph

83 commits

Author SHA1 Message Date
Michael Widenius
1a6373e8e2 Merge with MySQL 5.1.53
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
 - Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255 
- Werror is disabled;  Should be enabled after merge with xtradb.
2010-11-25 00:57:34 +02:00
Ramil Kalimullin
b001a5224d Fix for bug#57283: inet_ntoa() crashes
Problem: some call of INET_NTOA() function may lead 
to a crash due to missing its character set initialization.

Fix: explicitly set the character set.


mysql-test/r/func_misc.result:
  Fix for bug#57283: inet_ntoa() crashes
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug#57283: inet_ntoa() crashes
    - test case.
sql/item_strfunc.cc:
  Fix for bug#57283: inet_ntoa() crashes
    - explicitly set buffer's character set.
2010-10-12 23:28:03 +04:00
Michael Widenius
ad6d95d3cb Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue
  - Faster for short unaligneed strings than memcmp()
  - Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
2010-08-27 17:12:44 +03:00
Gleb Shchepa
80aa882497 Bug #54461: crash with longblob and union or update with subquery
Queries may crash, if
  1) the GREATEST or the LEAST function has a mixed list of
     numeric and LONGBLOB arguments and
  2) the result of such a function goes through an intermediate
     temporary table.

An Item that references a LONGBLOB field has max_length of
UINT_MAX32 == (2^32 - 1).

The current implementation of GREATEST/LEAST returns REAL
result for a mixed list of numeric and string arguments (that
contradicts with the current documentation, this contradiction
was discussed and it was decided to update the documentation).

The max_length of such a function call was calculated as a
maximum of argument max_length values (i.e. UINT_MAX32).

That max_length value of UINT_MAX32 was used as a length for
the intermediate temporary table Field_double to hold
GREATEST/LEAST function result.

The Field_double::val_str() method call on that field
allocates a String value.

Since an allocation of String reserves an additional byte
for a zero-termination, the size of String buffer was
set to (UINT_MAX32 + 1), that caused an integer overflow:
actually, an empty buffer of size 0 was allocated.

An initialization of the "first" byte of that zero-size
buffer with '\0' caused a crash.

The Item_func_min_max::fix_length_and_dec() has been
modified to calculate max_length for the REAL result like
we do it for arithmetical operators.


******
Bug #54461: crash with longblob and union or update with subquery

Queries may crash, if
  1) the GREATEST or the LEAST function has a mixed list of
     numeric and LONGBLOB arguments and
  2) the result of such a function goes through an intermediate
     temporary table.

An Item that references a LONGBLOB field has max_length of
UINT_MAX32 == (2^32 - 1).

The current implementation of GREATEST/LEAST returns REAL
result for a mixed list of numeric and string arguments (that
contradicts with the current documentation, this contradiction
was discussed and it was decided to update the documentation).

The max_length of such a function call was calculated as a
maximum of argument max_length values (i.e. UINT_MAX32).

That max_length value of UINT_MAX32 was used as a length for
the intermediate temporary table Field_double to hold
GREATEST/LEAST function result.

The Field_double::val_str() method call on that field
allocates a String value.

Since an allocation of String reserves an additional byte
for a zero-termination, the size of String buffer was
set to (UINT_MAX32 + 1), that caused an integer overflow:
actually, an empty buffer of size 0 was allocated.

An initialization of the "first" byte of that zero-size
buffer with '\0' caused a crash.

The Item_func_min_max::fix_length_and_dec() has been
modified to calculate max_length for the REAL result like
we do it for arithmetical operators.



mysql-test/r/func_misc.result:
  Test case for bug #54461.
  
  ******
  Test case for bug #54461.
mysql-test/t/func_misc.test:
  Test case for bug #54461.
  
  ******
  Test case for bug #54461.
sql/item_func.cc:
  Bug #54461: crash with longblob and union or update with subquery
  
  The Item_func_min_max::fix_length_and_dec() has been
  modified to calculate max_length for the REAL result like
  we do it for arithmetical operators.
  
  ******
  Bug #54461: crash with longblob and union or update with subquery
  
  The Item_func_min_max::fix_length_and_dec() has been
  modified to calculate max_length for the REAL result like
  we do it for arithmetical operators.
2010-08-01 22:12:36 +04:00
unknown
0855019e3a Fix multiple test suite failures in Buildbot due to races in the test cases or missing server features not properly checked
mysql-test/r/func_misc.result:
  Move test that requires query cache from main.func_misc to main.query_cache.
mysql-test/r/mysqltest.result:
  Fix test failure due to race.
  This test case creates > 300 connections in a tight loop, and depending on thread
  scheduling and load, even though each connection is immediately disconnected
  before connecting the next one, the server max connections may still be exceeded
  due to server not being able to free old connections as fast as new ones are made.
mysql-test/r/query_cache.result:
  Move test that requires query cache from main.func_misc to main.query_cache.
  Move test that requires query cache from main.variables to main.query_cache.
mysql-test/r/query_cache_notembedded.result:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/sp_notembedded.result:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/udf.result:
  Move test in main.udf that requires query cache to separate file.
mysql-test/r/udf_query_cache.result:
  Move test in main.udf that requires query cache to separate file.
mysql-test/r/variables.result:
  Move test that requires query cache from main.variables to main.query_cache.
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Fix race where result file may show state "cleaning up" in the small window
  between setting COMMAND to 'Sleep' and clearing STATE.
mysql-test/suite/rpl/r/rpl_temporary.result:
  Fix race with suppression of warning message by fixing the test to not generate the
  warning message in the first place.
  
  Problem was a race between creating an anonymous account and resetting the slave.
  If the slave reset happens before replicating the account, the subsequest deletion
  of the account will fail to replicate correctly due to missing row.
mysql-test/suite/rpl/t/rpl_temporary.test:
  Fix race with suppression of warning message by fixing the test to not generate the
  warning message in the first place.
  
  Problem was a race between creating an anonymous account and resetting the slave.
  If the slave reset happens before replicating the account, the subsequest deletion
  of the account will fail to replicate correctly due to missing row.
mysql-test/t/func_misc.test:
  Move test that requires query cache from main.func_misc to main.query_cache.
  Move test that requires query cache from main.variables to main.query_cache.
mysql-test/t/mysqltest.test:
  Fix test failure due to race.
  This test case creates > 300 connections in a tight loop, and depending on thread
  scheduling and load, even though each connection is immediately disconnected
  before connecting the next one, the server max connections may still be exceeded
  due to server not being able to free old connections as fast as new ones are made.
mysql-test/t/query_cache.test:
  Move test that requires query cache to main.query_cache.
mysql-test/t/query_cache_notembedded.test:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/sp_notembedded.test:
  Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/udf.test:
  Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache-master.opt:
  Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache.test:
  Move test in main.udf that requires query cache to separate file.
mysql-test/t/variables.test:
  Move test that requires query cache from main.variables to main.query_cache.
tests/mysql_client_test.c:
  In tests that require query cache, skip the test if query cache not available.
  Do this dynamically rather than using HAVE_QUERY_CACHE, as there is no guarantee
  that the server we run against was compiled with same preprocessor #define as
  the mysql_client_test program (and since it is trivial to check dynamically).
2010-01-11 14:15:28 +01:00
Michael Widenius
358327618d Speed up of test suite:
- Added --disable_query_log ; begin ; .... commit; --enable_query_log around all while loops that does insert
2009-10-28 09:52:34 +02:00
Leonard Zhou
638c0f073e Merge 5.0 to 5.1 2009-03-27 10:18:06 +08:00
Leonard Zhou
944915cabe BUG#35515 Aliases of variables in binary log are ignored with NAME_CONST.
When add an aliase name after NAME_CONST, the aliase name will be overwrite.
      
NAME_CONST will re-set the field's name only if there isn't an aliase in the
function fix-fields().
If there is an aliase, NAME_CONST doesn't re-set the field's name and keeps the old
name.

mysql-test/r/func_misc.result:
  Test result.
mysql-test/r/rpl_name_const.result:
  Test case.
mysql-test/t/func_misc.test:
  Add NAME_CONST test.
mysql-test/t/rpl_name_const.test:
  Test result.
sql/item.cc:
  Re-set field's name if the name is autogenerated, that mean without aliase.
2009-03-26 15:38:17 +08:00
Ramil Kalimullin
31d908d70b Fix for bug#42014: Crash, name_const with collate
Problem: some queries using NAME_CONST(.. COLLATE ...)
lead to server crash due to failed type cast.

Fix: return the underlying item's type in case of
NAME_CONST(.. COLLATE ...) to avoid wrong casting.


mysql-test/r/func_misc.result:
  Fix for bug#42014: Crash, name_const with coll
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug#42014: Crash, name_const with coll
    - test case.
sql/item.cc:
  Fix for bug#42014: Crash, name_const with coll
    - in case of NAME_CONST('name', 'value' COLLATE collation)
  Item_name_const::type() returns type of 'value' argument 
  to awoid wrong type casting of the Item_name_const items.
2009-02-05 11:43:39 +04:00
Ramil Kalimullin
9ee53cbcc0 Auto-merge 2009-02-05 11:45:30 +04:00
Tatiana A. Nurnberg
730f53f0d2 Bug#35848: UUID() returns UUIDs with the wrong time
offset for time part in UUIDs was 1/1000 of what it
should be. In other words, offset was off.

Also handle the case where we count into the future
when several UUIDs are generated in one "tick", and
then the next call is late enough for us to unwind
some but not all of those borrowed ticks.

Lastly, handle the case where we keep borrowing and
borrowing until the tick-counter overflows by also
changing into a new "numberspace" by creating a new
random suffix.

mysql-test/r/func_misc.result:
  Show that time-part of UUIDs is correct now.
mysql-test/t/func_misc.test:
  Show that time-part of UUIDs is correct now
  by replicating the C-code's resultin SQL.
  Results also decode to expect date-data on
  command-line (external validation).
  
  No test for unwinding of borrowed ticks as
  this a) is a race and b) depends on what timer
  we get.
sql/item_strfunc.cc:
  correct offset for date/time-part of UUID.
  also make sure that when we counted into
  the future earlier (several UUIDs generated
  in same tick), we only give back as many
  "borrowed" ticks as we can without duplicating
  past timestamps. If our tick-counter overflows
  before we can give back, or if the system-clock
  is set back (by user or Daylight Saving Time),
  we create a new random suffix to avoid
  collisions and clear the tick-counter.
2008-07-10 05:24:46 +02:00
Tatiana A. Nurnberg
0833d66847 Bug#35848: UUID() returns UUIDs with the wrong time
offset for time part in UUIDs was 1/1000 of what it
should be. In other words, offset was off.

Also handle the case where we count into the future
when several UUIDs are generated in one "tick", and
then the next call is late enough for us to unwind
some but not all of those borrowed ticks.

Lastly, handle the case where we keep borrowing and
borrowing until the tick-counter overflows by also
changing into a new "numberspace" by creating a new
random suffix.


mysql-test/r/func_misc.result:
  Show that time-part of UUIDs is correct now.
mysql-test/t/func_misc.test:
  Show that time-part of UUIDs is correct now
  by replicating the C-code's resultin SQL.
  Results also decode to expect date-data on
  command-line (external validation).
  
  No test for unwinding of borrowed ticks as
  this a) is a race and b) depends on what timer
  we get.
sql/item_strfunc.cc:
  correct offset for date/time-part of UUID.
  also make sure that when we counted into
  the future earlier (several UUIDs generated
  in same tick), we only give back as many
  "borrowed" ticks as we can without duplicating
  past timestamps. If our tick-counter overflows
  before we can give back, or if the system-clock
  is set back (by user or Daylight Saving Time),
  we create a new random suffix to avoid
  collisions and clear the tick-counter.
2008-07-10 03:58:30 +02:00
Matthias Leich mleich@mysql.com
8d7fcad196 Upmerge of fix for
Bug 36788 Multiple funcs_1 'trig' tests are failing on vanilla builds
2008-06-03 12:21:48 +02:00
Matthias Leich mleich@mysql.com
1544026443 Bug#36788 Multiple funcs_1 'trig' tests are failing on vanilla builds
Fix for this bug and additional improvements/fixes
In detail:
- Remove unicode attribute from several columns
  (unicode properties were nowhere needed/tested)
  of the table tb3
  -> The runnability of these tests depends no more on
     the availibility of some optional collations.
- Use a table tb3 with the same layout for all
  engines to be tested and unify the engine name
  within the protocols.
  -> <engine>_trig_<abc>.result have the same content
- Do not load data into tb3 if these rows have no
  impact on result sets
- Add tests for NDB (they exist already in 5.1)
- "--replace_result" at various places because
  NDB variants of tests failed with "random" row
  order in results
  This fixes a till now unknown weakness within the
  funcs_1 NDB tests existing in 5.1 and 6.0
- Fix the expected result of ndb_trig_1011ext
  which suffered from Bug 32656
  + disable this test
- funcs_1 could be executed with the mysql-test-run.pl
  option "--reorder", which saves some runtime by
  optimizing server restarts.
  Runtimes on tmpfs (one attempt only):
  with    reorder 132 seconds
  without reorder 183 seconds
- Adjust two "check" statements within func_misc.test
  which were incorrect (We had one run with result set
  difference though the server worked good.)
- minor fixes in comments
2008-06-02 21:57:11 +02:00
Matthias Leich mleich@mysql.com
b371ba2e14 Bug#36345 Test 'func_misc' fails on RHAS3 x86_64
Upmerge of fix for this bug and a second similar problem
found during experimenting.

This replaces the first fix (already pushed to 5.1
and merged to 6.0) which
- failed in runs with the embedded server
- cannot be ported back to 5.0
2008-05-29 22:16:22 +02:00
Matthias Leich mleich@mysql.com
200a93632e Bug#36345 Test 'func_misc' fails on RHAS3 x86_64
Fix for this bug and a second similar problem
found during experimenting.

This replaces the first fix (already pushed to 5.1
and merged to 6.0) which
- failed in runs with the embedded server
- cannot be ported back to 5.0
2008-05-29 18:38:10 +02:00
First_name Last_name mleich@mysql.com
8bd3bcf5a1 Fix for
Bug#36345 Test 'func_misc' fails on RHAS3 x86_64
and a second similar problem within this test found
during experimenting.
2008-05-23 17:23:55 +02:00
unknown
e79249f81b Manual merge
configure.in:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/partition_symlink.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/partition_info.cc:
  Auto merged
sql/partition_info.h:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_parse.cc:
  Manual merge. Needs later fix. New code in create table was not
  accepted. Needs to be added to mysql_create_table_no_lock().
2008-03-14 12:02:11 +01:00
unknown
ce86b14625 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2008-03-14 09:48:57 +01:00
unknown
111de516ab Merge mysql.com:/misc/mysql/34749/50-34749
into  mysql.com:/misc/mysql/34749/51-34749


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/ha_ndbcluster_cond.cc:
  Auto merged
sql/ha_ndbcluster_cond.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.h:
  Auto merged
2008-03-10 07:07:56 +01:00
unknown
a0eec8abbb Bug#34749: Server crash when using NAME_CONST() with an aggregate function
NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was
not seen as constant, but as FUNCTION_UNARY_MINUS(constant)
while we are at the same time pretending it was a basic const
item. This confused the aggregate handlers in exciting ways.
We now make NAME_CONST() behave more consistently.


mysql-test/r/func_misc.result:
  show that a combination of NAME_CONST('x', -y) and an aggregate
  no longer crashes the server.
mysql-test/t/func_misc.test:
  show that a combination of NAME_CONST('x', -y) and an aggregate
  no longer crashes the server.
sql/ha_ndbcluster_cond.cc:
  tell cluster about "new" function type NEG_FUNC.
  (this was previous identified as UNKNOWN_FUNC,
  so we just handle it the same way, that's all.)
sql/ha_ndbcluster_cond.h:
  tell cluster about "new" function type NEG_FUNC.
  (this was previous identified as UNKNOWN_FUNC,
  so we just handle it the same way, that's all.)
sql/item.cc:
  make NAME_CONST() transparent in that type() of
  -constant is that of constant, not that of unary
  minus (id est, FUNC_ITEM).
sql/item.h:
  Move constructor to item.cc
sql/item_func.h:
  Revert Bug#30832; we can apply the magic more narrowly
  (just for NAME_CONST() rather than all Item_func_neg).
  
  Introduce new function type "NEG_FUNC."
2008-02-28 14:23:22 +01:00
unknown
f7c575e43c Merge mysql.com:/home/svoj/devel/mysql/BUG34289/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG34289/mysql-5.1-engines


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
2008-02-20 21:22:21 +04:00
unknown
f802cd5123 BUG#34289 - Incorrect NAME_CONST substitution in stored procedures
breaks replication

NAME_CONST() didn't replicate constant character set and collation
correctly.

With this fix NAME_CONST() inherits collation from the value argument.


mysql-test/r/func_misc.result:
  A test case for BUG#34289.
mysql-test/t/func_misc.test:
  A test case for BUG#34289.
sql/item.cc:
  Inherit collation from value argument.
2008-02-19 18:16:17 +04:00
unknown
214ea2063a Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/range.result:
  manual merge
sql/item_cmpfunc.cc:
  manual merge
2007-12-13 16:10:57 +04:00
unknown
9a10c20ba9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/archive.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysys/queues.c:
  Auto merged
sql/events.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  manual merge
mysql-test/r/myisam.result:
  manual merge
mysql-test/r/partition.result:
  manual merge
mysql-test/r/user_var.result:
  manual merge
mysql-test/t/myisam.test:
  manual merge
mysql-test/t/partition.test:
  manual merge
mysql-test/t/user_var.test:
  manual merge
sql/item.h:
  manual merge
sql/item_func.cc:
  manual merge
storage/myisammrg/ha_myisammrg.cc:
  manual merge
2007-12-13 15:56:04 +04:00
unknown
f1d9805422 after merge fix 2007-12-13 15:47:23 +04:00
unknown
33f82b1789 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/func_misc.result:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/func_misc.test:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
sql/sql_insert.cc:
  manual merge
2007-12-13 14:52:49 +04:00
unknown
961e5d3dc7 Merge stella.local:/home2/mydev/mysql-5.0-axmrg
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
2007-12-11 21:38:50 +01:00
unknown
19c7e2c9d5 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/t/disabled.def:
  Auto merged
sql/partition_info.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
mysql-test/r/func_misc.result:
  SCCS merged
mysql-test/t/func_misc.test:
  SCCS merged
2007-12-11 21:37:33 +01:00
unknown
cd34354e6c Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/func_misc.result:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
2007-12-11 17:09:43 +01:00
unknown
b1b2e0d053 Fixed bug #27545.
Both arguments of the function NAME_CONST must be constant expressions.
This constraint is checked in the Item_name_const::fix_fields method. 
Yet if the argument of the function was not a constant expression no
error message was reported. As a result the client hanged waiting for a
response.
Now the function Item_name_const::fix_fields reports an error message
when any of the additional context conditions imposed on the function
NAME_CONST is not satisfied. 


mysql-test/r/func_misc.result:
  Added a test case for bug #26545.
mysql-test/t/func_misc.test:
  Added a test case for bug #26545.
2007-12-07 23:36:58 -08:00
unknown
068b6e4222 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge


client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_ssl.test:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
mysql-test/t/log_state.test:
  Manual merge fix-up
mysql-test/include/mix1.inc:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/r/func_misc.result:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/r/key.result:
  Manual merge
mysql-test/r/log_state.result:
  Manual merge
mysql-test/suite/binlog/t/binlog_killed.test:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
mysql-test/t/key.test:
  Manual merge
sql/item_strfunc.h:
  Manual merge
strings/ctype-simple.c:
  Manual merge
2007-12-05 12:33:36 -07:00
unknown
55a420e134 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
myisam/ft_boolean_search.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/r/func_misc.result:
  Manual merge
mysql-test/t/binlog_killed.test:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
sql/item_strfunc.h:
  Manual merge
strings/ctype-simple.c:
  Manual merge
2007-12-04 20:58:21 -07:00
unknown
6959d20472 Bug #30430 crash:./mtr --embedded-server --ps-protocol cache_innodb func_misc...
PS-protocol data is stored in different format - the MYSQL_RECORDS->data
contains the link to the record content, not to array of the links to
the field's contents. So we have to handle it separately for
embedded-server query cache.


libmysqld/emb_qcache.cc:
  Bug #30430 crash:./mtr --embedded-server --ps-protocol cache_innodb func_misc...
  
  ps_protocol data now stored in it's particular way.
libmysqld/emb_qcache.h:
  Bug #30430 crash:./mtr --embedded-server --ps-protocol cache_innodb func_misc...
  
  Querycache_stream::load_char/store_char  ->
    load_uchar/store_uchar
mysql-test/r/func_misc.result:
  Bug #30430 crash:./mtr --embedded-server --ps-protocol cache_innodb func_misc...
  
  test result
mysql-test/t/func_misc.test:
  Bug #30430 crash:./mtr --embedded-server --ps-protocol cache_innodb func_misc...
  
  the test uses t2 table, so let's make sure it doesn't exist befor the start
2007-11-30 22:17:11 +04:00
unknown
b9c4817058 Merge mysql.com:/home/ram/work/b32559/b32559.5.0
into  mysql.com:/home/ram/work/b32559/b32559.5.1


mysql-test/r/func_misc.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
mysql-test/t/func_misc.test:
  manual merge.
2007-11-29 10:23:30 +04:00
unknown
ba974f8371 Fix for bug #32559: connection hangs on query with name_const
Problem: passing a non-constant name to the NAME_CONST function results in a crash.

Fix: check the NAME_CONST name argument; return fake item type if we got
non-constant argument(s).


mysql-test/r/func_misc.result:
  Fix for bug #32559: connection hangs on query with name_const
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug #32559: connection hangs on query with name_const
    - test case.
sql/item.cc:
  Fix for bug #32559: connection hangs on query with name_const
    - Item_name_const::type() now returns NULL_ITEM if non-constant arguments 
      were used to create the item to avoid wrong type casting.
sql/item.h:
  Fix for bug #32559: connection hangs on query with name_const
    - NAME_CONST name argument checked for invariability.
2007-11-27 09:36:43 +04:00
unknown
6e71a0f99b Merge mysql.com:/home/ram/work/b31349/b31349.5.0
into  mysql.com:/home/ram/work/b31349/b31349.5.1


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2007-10-23 13:55:06 +05:00
unknown
426b551bf6 Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
Problem: lying to the optimizer that a function (Item_func_inet_ntoa)
cannot return NULL values leads to unexpected results (in the case group
keys creation/comparison is broken). 

Fix: Item_func_inet_ntoa::maybe_null should be set properly.


mysql-test/r/func_misc.result:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - test case.
sql/item_strfunc.h:
  Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
    - set Item_func_inet_ntoa::maybe_null flag.
2007-10-19 14:54:05 +05:00
unknown
46f2f2ef11 Merge linux-st28.site:/home/martin/mysql/src/bug30832-again/my50-bug30832-again
into  linux-st28.site:/home/martin/mysql/src/bug30832-again/my51-bug30832-again


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item_func.h:
  Auto merged
2007-10-09 11:37:46 +02:00
unknown
a462f34a94 Bug#30832:Assertion + crash with select name_const('test',now());
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.


mysql-test/r/func_misc.result:
  Bug#30832 completion: test result
mysql-test/t/func_misc.test:
  Bug#30832 completion: test case
  added negative numbers
sql/item_func.h:
  Bug#30832 completion
  The function that represents unary minus is considered a constant if the argument is.
2007-10-09 11:36:05 +02:00
unknown
3b9b52b79a Merge linux-st28.site:/home/martin/mysql/src/bug30832/my50-bug30832
into  linux-st28.site:/home/martin/mysql/src/bug30832/my51-bug30832


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.h:
  Auto merged
2007-10-01 09:11:45 +02:00
unknown
582388e6d2 Bug #30832: Assertion + crash with select name_const('test', now());
The NAME_CONST function is required to work correctly with constants only.
When executed with functions that return types other than those returned by
Item::field_type (string, int, decimal, or real), the result gets cast to
one of those types. This cannot happen for constants.
Fixed by only allowing constants as arguments to NAME_CONST.


mysql-test/r/func_misc.result:
  Bug#30832: Test result
mysql-test/t/func_misc.test:
  Bug#30832: Test case
sql/item.h:
  Bug#30832: The fix
2007-09-28 18:05:23 +02:00
unknown
61e988e712 Bug #30389: connection_id() always return 0 in embedded server
Initialize thd->variables.pseudo_thread_id when a new embedded
thd is created.


libmysqld/lib_sql.cc:
  Add comment regarding duplication of code in create_embedded_thd()
  vs. create_new_thread() and prepare_new_connection_state().  This
  was a cause for not properly initializing the pseudo_thread_id variable.
mysql-test/r/func_misc.result:
  Add test case to ensure connection_id() returns a sane value
mysql-test/t/func_misc.test:
  Add test case to ensure connection_id() returns a sane value
sql/mysqld.cc:
  Add comment warning of the duplication of code between create_new_thread()
  and create_embedded_thd()
sql/sql_connect.cc:
  Add comment warning of the duplication of code between
  prepare_new_connection_state() and create_embedded_thd()
2007-08-27 14:31:27 -06:00
unknown
10ef77fc3b Fixed errors found by pushbuild:
Fixed failing func_misc test for embedded server
Added casts to avoid compiler warnings
Removed Table_locks_immediate as it's depending on log file cacheing
Changed type of get_time() to avoid warnings
Removed testing if purger master logs succeded as this is not deterministic


libmysqld/lib_sql.cc:
  Fixed failing func_misc test for embedded server
mysql-test/mysql-test-run.pl:
  Shut first down slaves, then masters.
  This should avoid some errors in the log file about not being able to connect to master during shutdown
mysql-test/r/func_misc.result:
  Move DROP TABLE's first
mysql-test/r/status.result:
  Removed Table_locks_immediate as it's depending on log file cacheing
mysql-test/suite/ndb/r/ndb_binlog_basic.result:
  Removed testing if purger master logs succeded as this is not deterministic
mysql-test/suite/ndb/t/ndb_binlog_basic.test:
  Removed testing if purger master logs succeded as this is not deterministic
mysql-test/t/func_misc.test:
  Move DROP TABLE's first
mysql-test/t/status.test:
  Removed Table_locks_immediate as it's depending on log file cacheing
sql/log_event.cc:
  Added cast to avoid warnings
sql/log_event.h:
  Changed type of get_time() to avoid warnings
2007-08-16 16:47:31 +03:00
unknown
c6ff8a6500 Added casts to avoid compiler warnings and fixed a wrong type.
---
Added casts and fixed wrong type.
---
Added casts and fixed wrong type.
---
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
---
Don't give warning that readonly variable is forced to be readonly
mysql-test-run run now fails if we have [Warning] and [ERROR] as tags in .err file
Fixed wrong reference to the mysql manual
Fixed wrong prototype that caused some tests to fail on 64 bit platforms
---
Disabled compiler warnings mainly for Win 64.
---
Added casts to remove compiler warnings on windows
Give warnings also for safe_mutex errors found by test system
Added some warnings from different machines in pushbuild
---
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/home/my/mysql-5.1
---
Added escapes for double quotes and parenthesis.
---
Archive db fix plus added non-critical warnings
in ignore list.
---
Fixed previously added patch and added new ignored warning.


client/mysqltest.c:
  Added casts to avoid compiler warnings.
  ---
  Added casts to avoid compiler warnings.
mysql-test/lib/mtr_report.pl:
  Test run now fails if we have [Warning] and [ERROR] as tags in .err file
  Added list of all common 'not fatal' errors to ignore error list
  ---
  Give warnings also for safe_mutex errors
  Added some warnings from different machines in pushbuild
  ---
  Added escapes for double quotes and parenthesis.
  ---
  Added non-critical warnings to be ignored.
  ---
  Fixed a wrong regexp
  Added new non-critical warning
mysql-test/mysql-test-run-shell.sh:
  Fixed some wrong startup options
mysql-test/r/func_misc.result:
  Test case for archive db fix.
mysql-test/t/disabled.def:
  Disable instance manager tests because they generate warnings (and probably don't read the option files correctly)
mysql-test/t/func_misc.test:
  Test case for archive db fix.
mysys/array.c:
  Added casts to avoid compiler warnings.
mysys/hash.c:
  Added casts to avoid compiler warnings.
mysys/my_compress.c:
  Added casts to remove compiler warnings on windows
mysys/my_conio.c:
  To avoid a warning from compiler.
mysys/my_pread.c:
  Archive db fix.
mysys/my_quick.c:
  Added cast to avoid compiler warning.
  ---
  Added cast to avoid compiler warning.
sql/ha_ndbcluster_binlog.cc:
  Ensure we log all binglog errors with the "NDB Binlog" tag
sql/ha_partition.cc:
  result is type bool, so calculation should be forced to
  that also.
sql/log.cc:
  Fixed compiler problem on Solaris.
sql/slave.cc:
  Make errors uniform
sql/sql_class.cc:
  Added cast to remove compiler warnings on windows
sql/sql_map.cc:
  Added casts to avoid compiler warnings.
  ---
  Added casts to avoid compiler warnings.
sql/sql_plugin.cc:
  Fixed wrong type.
  ---
  Don't give warning that readonly variable is forced to be readonly
sql/stacktrace.c:
  Corrected manual reference
storage/archive/azio.c:
  Archive db fix.
  ---
  Fixed previously added patch.
storage/blackhole/ha_blackhole.cc:
  Fixed wrong prototype that caused test to fail on 64 bit platforms
storage/example/ha_example.cc:
  Fixed wrong prototype that caused test to fail on 64 bit platforms
strings/ctype-ucs2.c:
  Fixed wrong type.
  ---
  Fixed wrong type.
support-files/compiler_warnings.supp:
  Added new disabled warnings for Win 64.
2007-05-31 17:45:22 +03:00
unknown
4958eec7ec Added sql_mode PAD_CHAR_TO_FULL_LENGTH (WL#921)
This pads the value of CHAR columns with spaces up to full column length (according to ANSI)
It's not makde part of oracle or ansi mode yet, as this would cause a notable behaviour change.
Added uuid_short(), a generator for increasing 'unique' longlong integers (8 bytes)   


mysql-test/r/func_misc.result:
  Update results
mysql-test/r/sql_mode.result:
  Update results
mysql-test/t/func_misc.test:
  Added test for uuid_short()
mysql-test/t/sql_mode.test:
  Added test for sql_mode=PAD_CHAR_TO_FULL_LENGTH (#WL921)
sql/field.cc:
  Added sql_mode PAD_CHAR_TO_FULL_LENGTH
sql/item.cc:
  Initialize uuid_short()
sql/item_create.cc:
  Added creation of uuid_short()
sql/item_func.cc:
  Added uuid_short()
sql/item_func.h:
  Added uuid_short()
sql/mysql_priv.h:
  Added sql_mode PAD_CHAR_TO_FULL_LENGTH
sql/mysqld.cc:
  Added sql_mode PAD_CHAR_TO_FULL_LENGTH
2007-04-27 01:12:09 +03:00
unknown
93e6eb8037 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-26093
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-26093-merge


mysql-test/r/func_misc.result:
  Auto merged
2007-03-01 19:22:43 -07:00
unknown
0a93be2869 Bug#26093 (SELECT BENCHMARK() for SELECT statements does not produce valid
results)

Before this fix, the function BENCHMARK() would fail to evaluate expressions
like "(select avg(a) from t1)" in debug builds (with an assert),
or would report a time of zero in non debug builds.

The root cause is that evaluation of DECIMAL_RESULT expressions was not
supported in Item_func_benchmark::val_int().

This has been fixed by this change.


mysql-test/r/func_misc.result:
  Added support for DECIMAL_RESULT in Item_func_benchmark::val_int()
mysql-test/t/func_misc.test:
  Added support for DECIMAL_RESULT in Item_func_benchmark::val_int()
sql/item_func.cc:
  Added support for DECIMAL_RESULT in Item_func_benchmark::val_int()
2007-03-01 19:20:47 -07:00
unknown
7c2c9ed741 Update result file for func_misc to 5.1 version format 2006-11-29 10:11:36 +01:00
unknown
5a0b54fd13 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  shakedown.(none):/home/jpipes/dev/mysql-5.0-maint


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
sql/item_func.h:
  Auto merged
mysql-test/r/mysql.result:
  Manual merge
mysql-test/t/mysql.test:
  Manual merge
2006-11-27 14:58:57 -05:00