Commit graph

11677 commits

Author SHA1 Message Date
unknown
21bd55afec Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/33334/my50-33334


client/mysqltest.c:
  Auto merged
2008-03-23 21:53:36 +04:00
unknown
070a233415 Merge host.loc:/home/uchum/work/PA/5.0-opt-34763
into  host.loc:/home/uchum/work/5.0-opt


sql/item.cc:
  Auto merged
2008-03-20 00:29:50 +04:00
unknown
e12afb1e8d Merge kaamos.(none):/data/src/opt/bug34512/my50
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-03-19 16:30:56 +03:00
unknown
4018b13915 Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
Before breaking the connection we have to check that there's no query
  executing at the moment. Otherwise it can lead to crash in embedded server.


client/mysqltest.c:
  Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
  
  Wait until the query thread is finished before we break the connection.
  Waiting part moved to a separate wait_query_thread_end() function
mysql-test/r/flush.result:
  Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
  
  test result
mysql-test/t/flush.test:
  Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
  
  test case
2008-03-19 15:51:22 +04:00
unknown
9699767c95 Fixed bug #34763.
Queries like:

  SELECT ROW(1, 2) IN (SELECT t1.a, 2)
    FROM t1 GROUP BY t1.a

or 

  SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
    FROM t1 GROUP BY t1.a

lead to assertion failure in the
Item_in_subselect::row_value_transformer method in debugging
build, or to unexpected error message in release build:

  ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                      reference in item list)

Unexpected error message and assertion failure have been
eliminated.


mysql-test/r/subselect3.result:
  Added test case for bug #34763.
mysql-test/t/subselect3.test:
  Added test case for bug #34763.
sql/item.cc:
  Fixed bug #34763.
  The Item_ref::fix_fields method has been modified to silently
  ignore not fixed outer references: by the definition, those
  references should be fixed later by the call to the
  fix_inner_refs function.
sql/item_subselect.cc:
  Fixed bug #34763.
  The Item_in_subselect::row_value_transformer method has been
  modified to eliminate assertion failure on not fixed outer
  references: by the definition those references are allowed in
  this context and should be fixed later by the call to the
  fix_inner_refs function.
2008-03-14 23:11:59 +04:00
unknown
09f8a4af63 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


client/mysql.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
scripts/mysql_config.sh:
  Manual merge.
2008-03-12 10:59:15 +03:00
unknown
0abcb8ca5e Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/34749/50-34749


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2008-03-10 07:11:12 +01:00
unknown
a104844dda Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B34909-5.0-opt
2008-03-07 11:17:31 +02:00
unknown
99c0b5e10f Bug #34909: mysqldump returns a 0 status on error when using
--master-data

No error code was returned by mysqldump if it detects that binary
logging is not enabled on the server.
Fixed by returning error code.


client/mysqldump.c:
  Bug #34909: add error code
mysql-test/r/mysqldump-no-binlog.result:
  Bug #34909: test case
mysql-test/t/mysqldump-no-binlog-master.opt:
  Bug #34909: test case
mysql-test/t/mysqldump-no-binlog.test:
  Bug #34909: test case
2008-03-07 11:15:49 +02:00
unknown
8270d9875f Fix for bug #34512: CAST( AVG( double ) AS DECIMAL )
returns wrong results

Casting AVG() to DECIMAL led to incorrect results when the arguments
had a non-DECIMAL type, because in this case
Item_sum_avg::val_decimal() performed the division by the number of
arguments twice.

Fixed by changing Item_sum_avg::val_decimal() to not rely on
Item_sum_sum::val_decimal(), i.e. calculate sum and divide using
DECIMAL arithmetics for DECIMAL arguments, and utilize val_real() with
subsequent conversion to DECIMAL otherwise.


mysql-test/r/func_group.result:
  Added a test case for bug #34512.
mysql-test/t/func_group.test:
  Added a test case for bug #34512.
sql/item_sum.cc:
  Do not use Item_sum_sum::val_decimal() in Item_sum_avg::val_decimal()
  because the first one, depending on the arguments type, may return
  either the sum of the arguments, or the average calculated by the
  virtual val_real() method of Item_sum_avg. Instead, do our own
  calculation based on the arguments type.
2008-03-06 18:19:47 +03:00
unknown
cd9f2d1c28 BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
- Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
  to before the late NULLs filtering code.
- Backport function comments from 6.0.


mysql-test/r/null_key.result:
  BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
  - Testcase
mysql-test/t/null_key.test:
  BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
  - Testcase
sql/sql_select.cc:
  BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
  - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
    to before the late NULLs filtering code.
  - Backport function comments from 6.0
2008-03-03 20:35:44 +03:00
unknown
2cb35cd680 test case fix 2008-03-03 15:02:34 +04:00
unknown
4460f5a5b1 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


mysql-test/t/symlink.test:
  Auto merged
mysql-test/r/symlink.result:
  after merge fix
2008-02-29 16:58:20 +04:00
unknown
be59a0ea7f test fix
mysql-test/r/symlink.result:
  result fix
2008-02-29 16:56:41 +04:00
unknown
fa9e35b48d after merge fix 2008-02-29 15:04:00 +04:00
unknown
8bdb243fd7 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/mysql_priv.h:
  Auto merged
mysql-test/r/symlink.result:
  manual merge
mysql-test/t/symlink.test:
  manual merge
sql/mysqld.cc:
  manual merge
sql/sql_parse.cc:
  manual merge
2008-02-29 14:05:38 +04:00
unknown
ab60425901 Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0)
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of mysql data home directory in
DATA DIRECTORY & INDEX DIRECTORY is disallowed.


mysql-test/r/symlink.result:
  test result
mysql-test/t/symlink.test:
  test case
sql/mysql_priv.h:
  new variable mysql_unpacked_real_data_home
sql/mysqld.cc:
  new variable mysql_unpacked_real_data_home
sql/sql_parse.cc:
  added new function test_if_data_home_dir() which checks that
  path does not contain mysql data home directory.
  Using of mysql data home directory in
  DATA DIRECTORY & INDEX DIRECTORY is disallowed.
2008-02-29 13:55:00 +04:00
unknown
7f572871ad Merge host.loc:/home/uchum/work/PP/5.0-opt-34620
into  host.loc:/home/uchum/work/5.0-opt
2008-02-28 22:57:22 +04:00
unknown
d40ca16156 Fixed bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*):
Assertion `0' failed

If ROW item is a part of an expression that also has
aggregate function calls (COUNT/SUM/AVG...), a
"splitting" with an Item::split_sum_func2 function
is applied to that ROW item.
Current implementation of Item::split_sum_func2
replaces this Item_row with a newly created
Item_aggregate_ref reference to it.
Then the row cache tries to work with the
Item_aggregate_ref object as with the Item_row object:
row cache calls row-emulation methods such as cols and
element_index. Item_aggregate_ref (like it's parent
Item_ref) inherits dummy implementations of those
methods from the hierarchy root Item, and call to
them leads to failed assertions and wrong data
output.

Row-emulation virtual functions (cols, element_index, addr,
check_cols, null_inside and bring_value) of Item_ref have
been overloaded to forward calls to an underlying item
reference.




mysql-test/r/row.result:
  Added test case for bug #34620.
mysql-test/t/row.test:
  Added test case for bug #34620.
sql/item.h:
  Fixed bug #34620.
  Row-emulation virtual functions (cols, element_index, addr,
  check_cols, null_inside and bring_value) of Item_ref have
  been overloaded to forward calls to an underlying item
  reference.
2008-02-28 22:53:31 +04:00
unknown
1164e2bc7a Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210
The problem is that passing anything other than a integer to a limit
clause in a prepared statement would fail. This limitation was introduced
to avoid replication problems (e.g: replicating the statement with a
string argument would cause a parse failure in the slave).

The solution is to convert arguments to the limit clause to a integer
value and use this converted value when persisting the query to the log.


mysql-test/r/limit.result:
  Update test case result.
mysql-test/r/ps.result:
  Add test case result for Bug#33851
mysql-test/r/rpl_user_variables.result:
  Test case result for replication of prepared statement with
  limit clause.
mysql-test/t/limit.test:
  Test parameters to limit clause.
mysql-test/t/ps.test:
  Add test case for Bug#33851
mysql-test/t/rpl_user_variables.test:
  Test replication of a parameter which value is converted.
sql/item.cc:
  Convert value to integer if it's a parameter to a limit clause.
sql/item.h:
  Flag signal that item is a parameter to a limit clause.
sql/item_func.cc:
  Const member functions, object is not mutated.
sql/sql_class.h:
  Const member functions, object is not mutated.
sql/sql_yacc.yy:
  Flag that item is a parameter to a limit clause.
2008-02-28 11:34:08 -03:00
unknown
56e6b531d2 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B34747-5.0-opt
2008-02-28 15:27:50 +02: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
f28612eae2 Bug #34747: crash in debug assertion check after derived table
Was a double-free of the Unique member of Item_func_group_concat.
This was not causing a crash because the Unique is a descendent of
Sql_alloc.
Fixed to free the Unique only if it was allocated for the instance 
of Item_func_group_concat it was referenced from


mysql-test/r/func_gconcat.result:
  Bug #34747: test case
mysql-test/t/func_gconcat.test:
  Bug #34747: test case
sql/item_sum.cc:
  Bug #34747: free the Unique only if it was allocated
  for this instance of Item_func_group_concat
2008-02-28 13:31:19 +02:00
unknown
7ca90d539f Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-27 18:17:25 +03:00
unknown
c8885dfb73 Fixed test suite failures with --ps-protocol introduced in PB by
the patch for bug #33834.
2008-02-27 18:12:08 +03:00
unknown
a86e504f59 Merge quad.:/mnt/raid/alik/MySQL/devel/5.0
into  quad.:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


mysql-test/r/view.result:
  Auto merged
2008-02-26 19:23:37 +03:00
unknown
25620347fc Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/sql_yacc.yy:
  Auto merged
2008-02-26 16:10:31 +03:00
unknown
4f3eab5804 Fix for bug #33834: FRAC_SECOND: Applicability not clear in
documentation

While the manual mentions FRAC_SECOND only for the TIMESTAMPADD()
function, it was also possible to use FRAC_SECOND with DATE_ADD(),
DATE_SUB() and +/- INTERVAL.

Fixed the parser to match the manual, i.e. using FRAC_SECOND for 
anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a 
syntax error.

Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/
TIMESTAMPDIFF and marks FRAC_SECOND as deprecated.


mysql-test/r/func_time.result:
  Added a test case for bug #33834.
mysql-test/t/func_time.test:
  Added a test case for bug #33834.
sql/sql_yacc.yy:
  Reject FRAC_SECOND for anything other than TIMESTAMPADD() or
  TIMESTAMPDIFF().
  Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF().
  Warn about FRAC_SECOND being a deprecated unit.
2008-02-25 13:25:57 +03:00
unknown
62ba88327f Merge kaamos.(none):/data/src/opt/bug33049/my50-bug33790
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-22 21:25:11 +03:00
unknown
1bee6a3c7c Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
  Auto merged
2008-02-22 16:36:09 +01:00
unknown
4368dcdc2d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30604-5.0-opt
2008-02-22 15:36:27 +02:00
unknown
d702cb12b2 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/mysql-5.0-opt
2008-02-22 15:04:24 +04:00
unknown
012aab7d8b Fix for bug #33049: Assert while running test-as3ap test(mysql-bench
suite)

Under some circumstances a combination of aggregate functions and
GROUP BY in a SELECT query over a VIEW could lead to incorrect
calculation of the result type of the aggregate function. This in
turn could result in incorrect results, or assertion failures on debug
builds.

Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that
the argument's item is dereferenced before calling its type() method.


mysql-test/r/view.result:
  Added a test case for bug #33049.
mysql-test/t/view.test:
  Added a test case for bug #33049.
sql/item_sum.cc:
  When calculating the result type of an aggregate function, dereference
  the argument's item before calling its type() method.
2008-02-22 11:34:18 +03:00
unknown
1a8be8bccb Bug#23588 SHOW COLUMNS on a temporary table causes locking issues
skip lock_type update for temporary tables


mysql-test/r/tablelock.result:
  test result
mysql-test/t/tablelock.test:
  test case
sql/sql_base.cc:
  skip lock_type update for temporary tables
2008-02-22 12:30:17 +04:00
unknown
315665cf67 Bug#32890 Crash after repeated create and drop of tables and views
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.

The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.


mysql-test/r/ps.result:
  Add test case result for Bug#32890
mysql-test/t/ps.test:
  Add test case for Bug#32890
sql/item.h:
  Restore original field name if name is auto generated.
sql/sql_prepare.cc:
  Validate and prepare a CREATE VIEW statement for execution.
sql/sql_view.cc:
  Move privileges check to it's own function.
sql/sql_view.h:
  Export function which check privileges of a CREATE VIEW statement.
2008-02-21 14:58:29 -03:00
unknown
fa7707addf Bug#32025 ndb_waiter does too many roundtrips to ndb_mgmd
- fix test failures that was already there but now are
   more consistent when the 1 second sleep has been removed from
   ndb_waiter


mysql-test/t/ndb_autodiscover.test:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/t/ndb_autodiscover3.test:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/include/ndb_wait_connected.inc:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
2008-02-21 13:23:58 +01:00
unknown
fa08b28085 Fix for Bug#34337: Server crash when Altering a view using
a table name.
  
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
  
The fix is to ensure that an error is thrown even if the table
is in the cache.

(This is a backport of the original patch for 5.1)


mysql-test/r/view.result:
  Fix result file.
mysql-test/r/view_grant.result:
  Fix result file.
mysql-test/t/view.test:
  Add a test case for Bug#34337: Server crash when Altering a view
  using a table name.
mysql-test/t/view_grant.test:
  Fix order-dependency.
sql/sql_view.cc:
  Report an error if we're going to work with a table.
2008-02-21 12:17:32 +03:00
unknown
463edf377e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33266-bug-5.0-opt-mysql
2008-02-20 18:01:53 +03:00
unknown
daffceb4e2 Bug#33266: Incorrect test case for the bug#31048 failing on some platforms.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.

The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.


mysql-test/t/subselect.test:
  Corrected test case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected test case for the bug#31048.
2008-02-20 17:41:39 +03:00
unknown
1ac319248f Bug #30604: different flagging of time_zone_used in normal
and ps-protocol
Finding a routine should be a transparent operation as 
far as the binary log is concerned.
But it was influencing the binary log because of the TIMESTAMP
column in the proc table.

Fixed by preserving and restoring the time_zone usage flag when
searching for a stored routine in the proc table.


mysql-test/r/binlog_innodb.result:
  Bug #30604: test case
mysql-test/r/ctype_cp932_binlog.result:
  Bug #30604: updated test results (a procedure call before that)
mysql-test/t/binlog_innodb.test:
  Bug #30604: test case
sql/sp.cc:
  Bug #30604: finding a routine should be a transparent operation as 
  far as the binary log is concerned.
  Fixed by preserving and restoring the time_zone usage flag.
2008-02-19 17:27:18 +02:00
unknown
18f885ed4c Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/32942/my50-32942


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  merging
mysql-test/t/select.test:
  merging
2008-02-18 19:18:44 +04:00
unknown
787dbacab2 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-17 16:57:07 +03:00
unknown
d6be1a9b95 Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
Problem is not about intervals and doesn't actually cause 'full table scan'.
We have an optimization for DISTINCT when we have
'DISTINCT field_from_first_join_table' we don't need to read all the
rows from the JOIN-ed table if we found one conforming row.
It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
that case in the evaluate_join_record() and that doesn't break the
recordreading loop in sub_select().

Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.


mysql-test/r/select.result:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan".
  
  test result
mysql-test/t/select.test:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
  
  test case
sql/sql_select.cc:
  Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
  
  return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from
  this table anymore
2008-02-17 15:48:17 +04:00
unknown
4a834b4b12 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
2008-02-17 14:37:39 +03:00
unknown
0529125af1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt


sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2008-02-15 18:34:03 +02:00
unknown
cc2e929ac4 Bug #31887: DML Select statement not returning same results
when executed in version 5

Zero fill is a field attribute only. So we can't always 
propagate  constants for zerofill fields : the values and 
expression results don't have that flag.

Fixed by converting the const value to a string and 
using that in const propagation when the context allows it. 
Disable const propagation for fields with ZEROFILL flag in
all the other cases.


mysql-test/r/compare.result:
  Bug #31887: test case
mysql-test/t/compare.test:
  Bug #31887: test case
sql/item.cc:
  Bug #31887: If the context allows conversion
  of an int constant to a zero-filled string constant
  put the string constant instead of the int constant
  when doing const propagation
sql/mysql_priv.h:
  Bug #31887: a macro to get all the Field_num
  descendant fields.
2008-02-15 15:47:32 +02:00
unknown
c4fc5b096e Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-14 12:48:25 +03:00
unknown
be891fc611 Merge host.loc:/home/uchum/work/5.0-opt-gca
into  host.loc:/home/uchum/work/5.0-opt
2008-02-13 19:47:39 +04:00
unknown
7a290b55f7 Fixed bug#31194: Privilege ordering does not order properly
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.

The get_sort function has been modified to ignore escaped
wildcards as usual.



mysql-test/r/grant3.result:
  Added test case for bug#31194.
mysql-test/t/grant3.test:
  Added test case for bug#31194.
sql/sql_acl.cc:
  Fixed bug#31194.
  The server used the wild_prefix escape character (usually \-character)
  like % and _ wildcards in the get_sort function for sorting weights
  calculation.
  
  The get_sort function has been modified to ignore escaped wildcards
  and alone escapes like in the wild_case_compare function.
2008-02-13 19:34:12 +04:00
unknown
247efb9cf0 Fixed bug#33764: Wrong result with IN(), CONCAT() and implicit
type conversion.

Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.


mysql-test/r/select.result:
  Added test case for bug#33764.
mysql-test/t/select.test:
  Added test case for bug#33764.
sql/item_cmpfunc.cc:
  Fixed bug#33764.
  Copying of a pointer has been replaced with an optional copying of
  a whole array to a newly allocated memory space in case of a
  functional source item.
2008-02-13 19:32:19 +04:00