Commit graph

24828 commits

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


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


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


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


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


mysql-test/t/range.test:
  Fixed bug #11853.
sql/opt_range.cc:
  Fixed bug #11853.
  Corrected the code of the range optimization for
  NOT IN and NOT BETWEEN.
2005-07-16 08:19:20 -07:00
unknown
7bdc4dd0a1 After-merge fixes (4.1 -> 5.0).
mysql-test/r/sp.result:
  Test results fixed: rewritten test for Bug#6129
mysql-test/r/view.result:
  Push a change to the result file from Sanja's patch.
mysql-test/t/sp.test:
  Rewrite the test for Bug#6129 (now that stored procedures don't
  evaluate system variables at parse, the test produced different results).
  The old test failed with 1 in the second invocation (the old
  result was wrong).
sql/item_func.cc:
  After-merge fix.
sql/item_func.h:
  After-merge fix.
sql/mysql_priv.h:
  After-merge fix.
sql/mysqld.cc:
  Rollback the patch for Bug#7403 (it breaks the test suite).
2005-07-16 16:10:42 +04:00
unknown
40efb3622d Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/media/sda1/mysql/mysql-5.0-merge


mysql-test/r/select.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/ps.result:
  Manual merge (again).
mysql-test/t/ps.test:
  Manual merge (again).
mysql-test/t/select.test:
  Manual merge (again).
sql/item_func.cc:
  Manual merge (again).
sql/item_func.h:
  Manual merge (again).
sql/set_var.h:
  Manual merge (again).
2005-07-16 13:45:32 +04:00
unknown
7adfe96d9e Added test for Bug #11521
"Negative integer keys incorrectly substituted for 0 during range analysis."

The problem is that the range optimizer incorrectly replaces any negative
constant with '0' for all types except BIGINT because the method save_in_field()
casts negative integers to non-negative. This causes incorrect query
results where (0 = any_negative_number).

The problem caused by this bug is fixed by the patch for BUG#11185.
That patch constitutes an optimization due to which the problem code is
never called with negative constants. This patch adds a test so we are sure
that the problem does not reappear.


mysql-test/r/select.result:
  Test for BUG#11521.
mysql-test/t/select.test:
  Test for BUG#11521.
2005-07-16 10:30:25 +03:00
unknown
0789b177e5 cs fixes 2005-07-16 09:19:23 +02:00
unknown
757ad317a5 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql-5.0


tests/mysql_client_test.c:
  Auto merged
2005-07-16 09:13:31 +02:00
unknown
58f67c6d88 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
2005-07-16 08:35:21 +03:00
unknown
90002cdc7b Restore previous used client charset in mysql_reconnect
Moved mysql_set_character_set function to client.c
Changed function prototype for mysql_set_character_set (as suggested
by Konstantin)


include/mysql.h:
  Changed function prototype
libmysql/libmysql.c:
  moved mysql_set_character_set to client.c
sql-common/client.c:
  moved mysql_set_character_set to client.c
2005-07-16 07:13:40 +02:00
unknown
b6f3a37370 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-07-15 18:59:18 -07:00
unknown
cc57265b5d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/mysql-4.1-bug-11868
2005-07-16 05:59:17 +04:00
unknown
560ff1a2ea Fix bug#11868 NOT NULL ref optimization in subquery used in update must be
disabled if ref is built with a key from the updated table

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



sql/sql_select.cc:
  Fix bug #11868 NOT NULL ref optimization in subquery used in update must be
  disabled if ref is built with a key from the updated table
mysql-test/r/update.result:
  Test case for bug#11868 Update with subquery with ref built with a key from
  the updated table crashes server.
mysql-test/t/update.test:
  Test case for bug#11868 Update with subquery with ref built with a key from the updated table crashes server
2005-07-16 05:31:16 +04:00
unknown
2f4fd88a72 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/foo-5.0
2005-07-15 17:37:17 -07:00
unknown
48995b9ab8 Added federated to max base test.
BUILD/SETUP.sh:
  Added federated to base_max tests.
2005-07-15 17:36:20 -07:00
unknown
d887a6924e This is the same patch as 1.1937, with small variable declaration changes, memory
deallocation cleanup


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


mysql-test/r/ps.result:
  - test results fixed (Bug#9359).
mysql-test/t/ps.test:
  - add a test case for Bug#9359 "Prepared statements take snapshot
   of system vars at PREPARE time"
sql/item_func.cc:
  - implement Item_func_get_system_var: we should not evaluate system
  variables in the parser, but instead should create an item which 
  is evaluated to a constant at execute.
  - remove an unused function
sql/item_func.h:
  Add a new item, Item_func_get_system_var
sql/mysql_priv.h:
  Move necessary declarations to make set_var.h objects visible in 
  item_func.h
sql/set_var.cc:
  - we should not print to network from get_system_var: if it's called
  from prepared statement prepare, we get packets out of order when using
  the binary protocol. Instead report the error to be sent to the user later.
  This is a backport from 5.0.
sql/set_var.h:
  - declaration of enum_var_type moved to mysql_priv.h
2005-07-16 03:29:13 +04:00
unknown
0f41fb4234 Fix bug#11482 4.1.12 produces different resultset for a complex query
than in previous 4.1.x

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

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


sql/sql_select.cc:
  Fix bug #11482 Wrongly applied optimization was erroneously rejecting valid rows
  Constraint were added to optimization appliance test.
mysql-test/t/select.test:
  Test case for bug #11482  Wrongly applied optimization was erroneously rejecting valid rows
mysql-test/r/select.result:
  Test case for bug #11482  Wrongly applied optimization was erroneously rejecting valid rows
2005-07-16 03:29:12 +04:00
unknown
a6274dde40 fix for bug#11893
increased version number for shared lib to 15


configure.in:
  increased shared lib version number to 15.0.0
2005-07-16 00:23:33 +02:00
unknown
8fb495d1c5 post merge changes: added safe_charset_converter to other static functions 2005-07-16 00:52:00 +03:00
unknown
213c05400a Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0


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


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


sql/mysqld.cc:
  merging in changes from 4.1
2005-07-15 12:15:45 -06:00
unknown
ba52e741de Removed dead options, fixed pentium script to no longer ask for isam (its not included in 5.0).
BUILD/SETUP.sh:
  Removed dead options, added blackhole option
BUILD/compile-pentium-debug-max-no-embedded:
  Updated option to remove unused option
2005-07-15 11:15:44 -07:00
unknown
2013d566ca Merge mysql.com:/home/jimw/my/mysql-4.1-9979
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_parse.cc:
  Auto merged
2005-07-15 10:52:22 -07:00
unknown
51308e2327 Post-review fix: Made test bug9538 test robust.
mysql-test/r/sp.result:
  Made test bug9538 test robust.
mysql-test/t/sp.test:
  Made test bug9538 test robust.
2005-07-15 19:46:44 +02:00
unknown
5bbb1a6985 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/home/pem/work/mysql-5.0
2005-07-15 19:46:43 +02:00
unknown
b5d9a7644e Bug#9442, moved ps ucs2 test from ps.test to ctype_ucs.test 2005-07-15 19:46:42 +02:00
unknown
3a92d85afe Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0


tests/mysql_client_test.c:
  Auto merged
2005-07-15 17:27:26 +02:00
unknown
6f619804fc Fixed BUG#9538: SProc: Creation fails if we try to SET system variable
using @@var_name in proc
  Made sure we don't lose the tokenizer state when swapping lex in during SET
  parsing.


mysql-test/r/sp.result:
  New test case for BUG#9538.
mysql-test/t/sp.test:
  New test case for BUG#9538.
sql/sp_head.cc:
  Keep lex->next_state when swapping lex during SP parsing (for SET mainly),
  otherwise the tokenizer gets confused.
2005-07-15 17:24:19 +02:00
unknown
d2e6f23bcf Merge lgrimmer@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/space/my/mysql-5.0


mysql-test/t/ctype_utf8.test:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2005-07-15 17:19:25 +02:00
unknown
c5d4befbde Made .c files compile with a C compiler.
ndb/src/common/portlib/NdbMutex.c:
  Turned into C code.
ndb/src/common/portlib/NdbThread.c:
  Turned into C code.
2005-07-15 17:19:25 +02:00
unknown
9e1cf0e2e1 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0


tests/mysql_client_test.c:
  Auto merged
2005-07-15 17:19:24 +02:00
unknown
f9e9cd9305 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2005-07-15 17:14:34 +02:00
unknown
e54cc5b995 minor fix for restoring the previous characterset in
test_client_character_set


tests/mysql_client_test.c:
  minor fix for restoring the previous characterset.
2005-07-15 17:05:00 +02:00
unknown
435846b840 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2005-07-15 15:40:15 +02:00
unknown
d4c6b820c2 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql-5.0
2005-07-15 15:06:47 +02:00
unknown
6fcb9c8e80 Fix for bug #11037.
When all rows are fetched subsequent calls to mysql_stmt_fetch return
now MYSQL_NO_DATA instead of errorcode 1.


libmysql/libmysql.c:
  fix for bug#11037
tests/mysql_client_test.c:
  added new testcase for bug #11037
2005-07-15 14:30:47 +02:00
unknown
0589559eba Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into  linux.site:/home/reggie/bk/bug7403
2005-07-15 06:15:00 -06:00
unknown
dba3190474 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new


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