Commit graph

21 commits

Author SHA1 Message Date
unknown
af2ab040cc BUG#8807 Select crash server
- Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare.


mysql-test/include/ps_query.inc:
  Adde new test case
mysql-test/r/ps_2myisam.result:
  Update test result
mysql-test/r/ps_3innodb.result:
  Update test result
mysql-test/r/ps_4heap.result:
  Update test result
mysql-test/r/ps_5merge.result:
  Update test result
mysql-test/r/ps_6bdb.result:
  Update test result
mysql-test/r/ps_7ndb.result:
  Update test result
sql/item.cc:
  Add function Item_param::fix_fields, which will mark any subselects they are part of as not being a constant expression unless the param value is specified, ie. it will be not be constant during prepare phase.
sql/item.h:
  Adde Item_param::fix_fields
sql/item_subselect.h:
  Make Item_param::fix_field friend of Item_subselect
2005-03-30 12:14:37 +02:00
unknown
cd89ed9ab6 1. Item now uses my_charset_bin by default,
not default_charset_into. It fixes the
problem that in some cases numbers where
treated as CHAR(N), not as BINARY(N), e.g.
wrong 'charsetnr' when sent to the client side.
2. IFNULL didn't aggregate argument charsets
and collations, so IFNULL(1,'a') produced
a CHAR(N). Now produces a BINARY(N).
3. SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
4. Tests were fixed accordingly. No new tests were
made, as the old onces cover everything.


mysql-test/r/analyse.result:
  SELECT PROCEDURE ANALIZE now returns
  BINARY columns, which is much better than it worked
  previously: CHAR with the default character set.
  But in the future it's worth to fix the fields
  'Field_name' and 'Optimal_fieldtype' to use UTF8,
  and 'Min_value' and 'Max_value' to inherit their charsets
  from the original items. But it is not important,
  and BINARY(N) is OK for now.
mysql-test/r/case.result:
  Test fix according to the changes
mysql-test/r/metadata.result:
  Test fix according to the changes
mysql-test/r/ps_1general.result:
  Test fix according to the changes
mysql-test/r/ps_2myisam.result:
  Test fix according to the changes
mysql-test/r/ps_3innodb.result:
  Test fix according to the changes
mysql-test/r/ps_4heap.result:
  Test fix according to the changes
mysql-test/r/ps_5merge.result:
  Test fix according to the changes
mysql-test/r/ps_6bdb.result:
  Test fix according to the changes
mysql-test/r/ps_7ndb.result:
  Test fix according to the changes
mysql-test/r/union.result:
  Test fix according to the changes
sql/item.cc:
  Item is now BINARY by default
sql/item_cmpfunc.cc:
  IFNULL now collects arguments collations/charsets
  like other functions do.
2005-01-18 17:41:06 +04:00
unknown
0e302f5e8b Merged fixes for bug #7297 "Two digit year should be interpreted
correctly even with zero month and day" and bug #7515 "from_unixtime(0)
now returns NULL instead of the Epoch" into 4.1 tree.


mysql-test/r/ps_2myisam.result:
  Updated test result after merging fix for bug #7297 "Two digit year should
  be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_3innodb.result:
  Updated test result after merging fix for bug #7297 "Two digit year should
  be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_4heap.result:
  Updated test result after merging fix for bug #7297 "Two digit year should
  be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_5merge.result:
  Updated test result after merging fix for bug #7297 "Two digit year should
  be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_6bdb.result:
  Updated test result after merging fix for bug #7297 "Two digit year should
  be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_7ndb.result:
  Updated test result after merging fix for bug #7297 "Two digit year should
  be interpreted correctly even with zero month and day" into 4.1
sql-common/my_time.c:
  Merged fix for bug #7297 "Two digit year should be interpreted correctly
  even with zero month and day" into 4.1
sql/item_timefunc.cc:
  Small fix after merging patch solving bug #7515 "from_unixtime(0) now
  returns NULL instead of the Epoch" into 4.1.
2004-12-30 23:44:42 +03:00
unknown
bd8f96f759 Small bug fix
ps-modify1 used the user variables @1, @2, @100 set within ps_query and 
           ps_modify. That architecture was wrong, because the dependence
           of ps_modify1 on ps_query and ps_modify makes the test script
           maintenance and the use of these test cases during bug fixing/
           debugging of single sub test cases very uncomfortable.
Therefore these user variables (@1, @2, @100) are also set within ps-modify1.

The result files of the test cases ps_2myisam, ps_3innodb, ps_4heap, ps_6bdb,
ps_7ndb will be affected by that change and show 3 additional lines, but
nothing else will change.    


mysql-test/include/ps_modify1.inc:
  Initialization of three user variables, with values derived from ps_query
  and ps_modify
mysql-test/r/ps_2myisam.result:
  updated result set
mysql-test/r/ps_3innodb.result:
  updated result set
mysql-test/r/ps_4heap.result:
  updated result sset
mysql-test/r/ps_6bdb.result:
  updated result set
mysql-test/r/ps_7ndb.result:
  updated result set
2004-12-13 21:00:43 +01:00
unknown
21f2d3aa3f Fixed thar proper charset was not set in Field_set::val_str() 2004-12-06 16:22:51 +04:00
unknown
c5e6941e75 1. When mixing NULL to a character string,
the result takes its charset/collation
attributes from the character string,
e.g.  SELECT func(NULL, _latin2'string')
now returns a latin2 result. This is
done by introducing a new derivation
(aka coercibility) level DERIVATION_IGNORABLE,
which is used with Item_null.
2. 'Pure' NULL is now BINARY(0), not CHAR(0).
I.e. NULL is now more typeless.


mysql-test/r/metadata.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/null.result:
  Testing mixing NULL with a character string with a number of functions.
mysql-test/r/ps_2myisam.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_3innodb.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_4heap.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_5merge.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_6bdb.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_7ndb.result:
  Fixing test results:
  CHAR(0) -> BINARY(0) for NULLs
mysql-test/t/null.test:
  Testing mixing NULL with a character string with a number of functions.
sql/item.cc:
  New derivation level.
sql/item.h:
  New derivation level.
2004-11-10 14:05:28 +04:00
unknown
aee1e78aa1 As it is wrong and confusing to associate any
character set with NULL, @a should be latin2
after this query sequence:

   SET @a=_latin2'string';
   SET @a=NULL;

I.e. the second query should not change the charset
to the current default value, but should keep the
original value assigned during the first query.
In order to do it, we don't copy charset
from the argument if the argument is NULL
and the variable has previously been initialized.


mysql-test/r/ps_6bdb.result:
  t
mysql-test/r/ps_5merge.result:
  t
mysql-test/r/ps_3innodb.result:
  t
mysql-test/r/ps_7ndb.result:
  t
mysql-test/r/ps_4heap.result:
  t
mysql-test/r/ps_2myisam.result:
  t
sql/item_func.cc:
  t
2004-11-05 13:37:36 +04:00
unknown
d46c7366eb Enable REPLACE ... SELECT in prepared statements.
mysql-test/include/ps_modify.inc:
  replace ... select now works.
mysql-test/r/ps_2myisam.result:
  replace ... select now works.
mysql-test/r/ps_3innodb.result:
  replace ... select now works.
mysql-test/r/ps_4heap.result:
  replace ... select now works.
mysql-test/r/ps_5merge.result:
  replace ... select now works.
mysql-test/r/ps_6bdb.result:
  replace ... select now works.
mysql-test/r/ps_7ndb.result:
  replace ... select now works.
mysql-test/t/ps_7ndb.test:
  replace ... select now works.
sql/sql_prepare.cc:
  Enable SQLCOM_REPLACE_SELECT: no need for any code changes but
  enable this SQLCOM in the switch.
2004-10-30 17:17:52 +04:00
unknown
910e7daa94 another order by fix for ndb 2004-10-11 20:58:48 +00:00
unknown
9acec233d3 more order by fixes 2004-10-07 12:36:37 +00:00
unknown
1d7ae13349 more order by for ndb 2004-10-07 09:51:30 +00:00
unknown
48923804cb added order by to give same order results on different endian and different sized clusters 2004-10-07 09:27:39 +00:00
unknown
22cca35841 Some of the recently pushed prepared statements
tests were disabled due to failures caused by floating point conversion
issues on optimized builds).


mysql-test/include/ps_conv.inc:
  Disable some of the tests for the test suite to pass on an optimized 
  build (floating point issues...).
mysql-test/include/ps_query.inc:
  Disable some of the tests for the test suite to pass on an optimized 
  build (floating point issues...).
mysql-test/r/ps_2myisam.result:
  Fix test results.
mysql-test/r/ps_3innodb.result:
  Fix test results.
mysql-test/r/ps_4heap.result:
  Fix test results.
mysql-test/r/ps_5merge.result:
  Fix test results.
mysql-test/r/ps_6bdb.result:
  Fix test results.
mysql-test/r/ps_7ndb.result:
  Fix test results.
2004-09-28 21:44:42 +04:00
unknown
9ff04fe526 Results of WL#1856 "Conversion of client_test.c tests cases to mysqltest
if possible"
        - many new test cases
        - more and improved comments
      New files: t/ps_7ndb.test       test suite for NDB tables
                 r/ps_7ndb.result     expected results
                 include/ps_conv.inc  conversion test cases
+ review comments and fixes.


mysql-test/include/ps_create.inc:
  Rename of t_many_col_types -> t9
mysql-test/include/ps_modify.inc:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Rename: t_many_col_types -> t9
  Cleanups and comments.
  New test cases (derived from client_test.c)
mysql-test/include/ps_modify1.inc:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Rename: t_many_col_types -> t9
  Cleanups and comments.
  New test cases (derived from client_test.c)
mysql-test/include/ps_query.inc:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Rename: t_many_col_types -> t9
  Cleanups and comments.
  New test cases (derived from client_test.c)
mysql-test/include/ps_renew.inc:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Rename: t_many_col_types -> t9
mysql-test/r/ps_1general.result:
  Results updated.
mysql-test/r/ps_2myisam.result:
  Resutls updated.
mysql-test/r/ps_3innodb.result:
  Results updated.
mysql-test/r/ps_4heap.result:
  Results updated.
mysql-test/r/ps_5merge.result:
  Results updated.
mysql-test/r/ps_6bdb.result:
  Results updated.
mysql-test/t/ps_1general.test:
  WL#1856 "Conversion of client_test.c tests cases to mysqltest if
   possible": new test cases added.
mysql-test/t/ps_2myisam.test:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Call of file include/ps_conv.inc (with new test cases) and 
  fulltext test case added.
mysql-test/t/ps_3innodb.test:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Call of file include/ps_conv.inc (with new test cases) added.
mysql-test/t/ps_4heap.test:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Call of file include/ps_conv.inc (with new test cases) added.
mysql-test/t/ps_5merge.test:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
  Call of file include/ps_conv.inc (with new test cases) added.
mysql-test/t/ps_6bdb.test:
  WL#1856 Conversion of client_test.c tests cases to mysqltest if possible.
  Call of file include/ps_conv.inc (with new test cases) added.
2004-09-25 19:08:02 +04:00
unknown
5a53ee4fc9 These modifications were part of WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
They are separated from the other WL#1856 stuff, because they improve the behaviour of the current tests.  

Make the result sets (order of rows) more predictable by using ORDER BY.


mysql-test/include/ps_modify.inc:
  Make the result sets more predictable by using ORDER BY
mysql-test/include/ps_modify1.inc:
  Make the result sets more predictable by using ORDER BY
mysql-test/r/ps_2myisam.result:
  updated results
mysql-test/r/ps_3innodb.result:
  updated results
mysql-test/r/ps_4heap.result:
  updated results
mysql-test/r/ps_5merge.result:
  updated results
mysql-test/r/ps_6bdb.result:
  updated results
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-09-20 13:10:47 +02:00
unknown
52683755d3 A fix and test case for bug#5510 "inserting Null in AutoIncrement primary
key Column Fails".


mysql-test/r/ps.result:
  Test results updated: a test case for Bug#5510 "inserting Null in 
  AutoIncrement primary key Column Fails".
mysql-test/r/ps_2myisam.result:
  Bug#5510: a different warning in case of NULL->default truncation.This is 
  OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_3innodb.result:
  Bug#5510: a different warning in case of NULL->default truncation.This is 
  OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_4heap.result:
  Bug#5510: a different warning in case of NULL->default truncation.This is 
  OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_5merge.result:
  Bug#5510: a different warning in case of NULL->default truncation.This is 
  OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_6bdb.result:
  Bug#5510: a different warning in case of NULL->default truncation.This is 
  OK, the new warning is the same as produced by conventional execution.
mysql-test/t/ps.test:
  A test case for Bug#5510 "inserting Null in AutoIncrement primary key Column 
  Fails".
sql/item.cc:
  A fix for bug#5510 "inserting Null in AutoIncrement primary key Column 
  Fails": use proper Field API function for NULL placholeders.
2004-09-18 01:10:09 +04:00
unknown
e177c9586d Return character strings in table, type, possible_keys, key fields
of EXPLAIN SELECT, rather than binary strings.
2004-09-16 14:47:39 +05:00
unknown
3db7442e28 Fix the test case to make it more predictable (cause: 4.1.5 test failure
on intelxeon3 (Solaris x86))


mysql-test/r/ps_2myisam.result:
  Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_3innodb.result:
  Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_4heap.result:
  Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_5merge.result:
  Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_6bdb.result:
  Test results fixed (order by for a couple of statements in the PS test).
2004-09-15 14:25:58 +04:00
unknown
a5e453e608 Fix for bug #4492.
TIMESTAMP columns should be unsigned to preserve compatibility with 4.0
(Or else InnoDB will return different internal TIMESTAMP values when user upgrades to 4.1).

Altough this fix will introduce problems with early 4.1 -> 4.1 upgrades (tables with 
TIMESTAMP field should be reloaded using mysqldump) it will allow easy 4.0 -> 4.1 
upgrade (which is more important since 4.1 is still beta).


mysql-test/r/metadata.result:
  TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_2myisam.result:
  TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_3innodb.result:
  TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_4heap.result:
  TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_5merge.result:
  TIMESTAMP should be UNSIGNED as in 4.0.
sql/field.cc:
  TIMESTAMP should be UNSIGNED to preserve compatiblity with 4.0.
  (Or else InnoDB will return different internal TIMESTAMP values when user upgrades to 4.1).
2004-07-28 10:49:21 +04:00
unknown
cb35648ec8 fixed ORDER BY ?
new tests to ensure that prepared statement *really* work
(and that MySQL not picks up some number from arbitrary location
that happens to match the parameter's value)


mysql-test/include/ps_query.inc:
  new tests to ensure that prepared statement *really* work
  (and that MySQL not picks up some number from arbitrary location
  that happens to match the parameter's value)
mysql-test/r/ps_2myisam.result:
  results updated
mysql-test/r/ps_3innodb.result:
  results updated
mysql-test/r/ps_4heap.result:
  results updated
mysql-test/r/ps_5merge.result:
  results updated
mysql-test/r/ps_6bdb.result:
  results updated
sql/sql_select.cc:
  don't shortcut - it backfires!
  (in particular - when itemptr is Item_param :)
2004-07-21 19:17:07 +02:00
unknown
f2e036aa5f WL#1564 Intensive test of prepared statements via 'mysqltest'
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-07-01 16:30:29 +02:00