Commit graph

13692 commits

Author SHA1 Message Date
unknown
06d4636bb6 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  mysql.com:/home/kent/bk/tmp3/mysql-5.0-build
2007-07-30 13:38:40 +02:00
unknown
113229b3c6 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-07-30 11:18:50 +02:00
unknown
987ef94079 SSL/Makefile.am mysql-test/Makefile.am:
Moved CERT files to where they are used, avoids conflict
  between two make files trying to install the same CERTs
SSL/*.pem, 
  Move: SSL/*.pem -> mysql-test/std_data/


mysql-test/std_data/cacert.pem:
  Rename: SSL/cacert.pem -> mysql-test/std_data/cacert.pem
mysql-test/std_data/client-cert.pem:
  Rename: SSL/client-cert.pem -> mysql-test/std_data/client-cert.pem
mysql-test/std_data/client-key.pem:
  Rename: SSL/client-key.pem -> mysql-test/std_data/client-key.pem
mysql-test/std_data/server-cert.pem:
  Rename: SSL/server-cert.pem -> mysql-test/std_data/server-cert.pem
mysql-test/std_data/server-key.pem:
  Rename: SSL/server-key.pem -> mysql-test/std_data/server-key.pem
SSL/Makefile.am:
  Moved CERT files to where they are used, avoids conflict
  between two make files trying to install the same CERTs
2007-07-27 17:39:07 +02:00
unknown
766725c502 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG29957/mysql-5.0-engines
2007-07-27 14:36:43 +05:00
unknown
e92ce5d56c BUG#29957 - alter_table.test fails
INSERT/DELETE/UPDATE followed by ALTER TABLE within LOCK TABLES
may cause table corruption on Windows.

That happens because ALTER TABLE writes outdated shared state
info into index file.

Fixed by removing obsolete workaround.

Affects MyISAM tables on Windows only.


myisam/mi_extra.c:
  On windows when mi_extra(HA_EXTRA_PREPARE_FOR_DELETE) is called,
  we release external lock and close index file. If we're in LOCK
  TABLES, MyISAM state info doesn't get updated until UNLOCK TABLES.
  
  That means when we release external lock and we're in LOCK TABLES,
  we may write outdated state info.
  
  As SQL layer closes all table instances, we do not need this
  workaround anymore.
mysql-test/r/alter_table.result:
  A test case for BUG#29957.
mysql-test/t/alter_table.test:
  A test case for BUG#29957.
2007-07-27 14:30:25 +05:00
unknown
e1feaa848c Merge debian.(none):/M50/rowlock-5.0
into  debian.(none):/M50/push-5.0
2007-07-26 18:26:04 +02:00
unknown
d8c8c3437f Remove the "row_lock" suite from the sources.
For more information, see WL#3866 and the bugs numbered 28685 and 20390.


BitKeeper/deleted/.del-readme.txt:
  Delete: mysql-test/suite/row_lock/readme.txt
BitKeeper/deleted/.del-summary_of_sel_test.txt:
  Delete: mysql-test/suite/row_lock/summary_of_sel_test.txt
BitKeeper/deleted/.del-innodb_row_lock_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_1.result
BitKeeper/deleted/.del-innodb_row_lock_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_2.result
BitKeeper/deleted/.del-innodb_row_lock_3.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_3.result
BitKeeper/deleted/.del-innodb_row_lock_4.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_4.result
BitKeeper/deleted/.del-innodb_row_lock_5.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_5.result
BitKeeper/deleted/.del-innodb_row_lock_big_tab.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_big_tab.result
BitKeeper/deleted/.del-innodb_row_lock_big_tab_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_big_tab_1.result
BitKeeper/deleted/.del-innodb_row_lock_big_tab_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_big_tab_2.result
BitKeeper/deleted/.del-innodb_row_lock_trig_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_trig_1.result
BitKeeper/deleted/.del-innodb_row_lock_trig_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_trig_2.result
BitKeeper/deleted/.del-innodb_row_lock_view_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_1.result
BitKeeper/deleted/.del-row_lock.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock.inc
BitKeeper/deleted/.del-row_lock_big_tab.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_big_tab.inc
BitKeeper/deleted/.del-row_lock_big_tab_1.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_big_tab_1.inc
BitKeeper/deleted/.del-row_lock_big_tab_2.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_big_tab_2.inc
BitKeeper/deleted/.del-row_lock_trig.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_trig.inc
BitKeeper/deleted/.del-row_lock_view.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_view.inc
BitKeeper/deleted/.del-row_lock_view_mix.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_view_mix.inc
BitKeeper/deleted/.del-row_lock_view_storedp.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_view_storedp.inc
BitKeeper/deleted/.del-row_lock_view_trig.inc:
  Delete: mysql-test/suite/row_lock/include/row_lock_view_trig.inc
BitKeeper/deleted/.del-innodb_row_lock_view_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_2.result
BitKeeper/deleted/.del-innodb_row_lock_view_mix_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_mix_1.result
BitKeeper/deleted/.del-innodb_row_lock_view_mix_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_mix_2.result
BitKeeper/deleted/.del-innodb_row_lock_view_storedp_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_storedp_1.result
BitKeeper/deleted/.del-innodb_row_lock_view_storedp_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_storedp_2.result
BitKeeper/deleted/.del-innodb_row_lock_view_trig_1.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_trig_1.result
BitKeeper/deleted/.del-innodb_row_lock_view_trig_2.result:
  Delete: mysql-test/suite/row_lock/r/innodb_row_lock_view_trig_2.result
BitKeeper/deleted/.del-ndb_row_lock_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_1.result
BitKeeper/deleted/.del-ndb_row_lock_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_2.result
BitKeeper/deleted/.del-ndb_row_lock_3.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_3.result
BitKeeper/deleted/.del-ndb_row_lock_4.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_4.result
BitKeeper/deleted/.del-ndb_row_lock_5.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_5.result
BitKeeper/deleted/.del-ndb_row_lock_big_tab.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_big_tab.result
BitKeeper/deleted/.del-ndb_row_lock_big_tab_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_big_tab_1.result
BitKeeper/deleted/.del-ndb_row_lock_big_tab_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_big_tab_2.result
BitKeeper/deleted/.del-ndb_row_lock_trig_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_trig_1.result
BitKeeper/deleted/.del-ndb_row_lock_trig_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_trig_2.result
BitKeeper/deleted/.del-ndb_row_lock_view_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_1.result
BitKeeper/deleted/.del-ndb_row_lock_view_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_2.result
BitKeeper/deleted/.del-innodb_row_lock_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_1.test
BitKeeper/deleted/.del-innodb_row_lock_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_2.test
BitKeeper/deleted/.del-innodb_row_lock_3.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_3.test
BitKeeper/deleted/.del-innodb_row_lock_4.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_4.test
BitKeeper/deleted/.del-innodb_row_lock_5.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_5.test
BitKeeper/deleted/.del-innodb_row_lock_big_tab.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_big_tab.test
BitKeeper/deleted/.del-innodb_row_lock_big_tab_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_big_tab_1.test
BitKeeper/deleted/.del-innodb_row_lock_big_tab_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_big_tab_2.test
BitKeeper/deleted/.del-innodb_row_lock_trig_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_trig_1.test
BitKeeper/deleted/.del-innodb_row_lock_trig_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_trig_2.test
BitKeeper/deleted/.del-innodb_row_lock_view_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_1.test
BitKeeper/deleted/.del-innodb_row_lock_view_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_2.test
BitKeeper/deleted/.del-innodb_row_lock_view_mix_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_mix_1.test
BitKeeper/deleted/.del-ndb_row_lock_view_mix_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_mix_1.result
BitKeeper/deleted/.del-ndb_row_lock_view_mix_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_mix_2.result
BitKeeper/deleted/.del-ndb_row_lock_view_storedp_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_storedp_1.result
BitKeeper/deleted/.del-ndb_row_lock_view_storedp_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_storedp_2.result
BitKeeper/deleted/.del-ndb_row_lock_view_trig_1.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_trig_1.result
BitKeeper/deleted/.del-ndb_row_lock_view_trig_2.result:
  Delete: mysql-test/suite/row_lock/r/ndb_row_lock_view_trig_2.result
BitKeeper/deleted/.del-innodb_row_lock_view_mix_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_mix_2.test
BitKeeper/deleted/.del-innodb_row_lock_view_storedp_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_storedp_1.test
BitKeeper/deleted/.del-innodb_row_lock_view_storedp_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_storedp_2.test
BitKeeper/deleted/.del-innodb_row_lock_view_trig_1.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_trig_1.test
BitKeeper/deleted/.del-innodb_row_lock_view_trig_2.test:
  Delete: mysql-test/suite/row_lock/t/innodb_row_lock_view_trig_2.test
BitKeeper/deleted/.del-ndb_row_lock_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_1.test
BitKeeper/deleted/.del-ndb_row_lock_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_2.test
BitKeeper/deleted/.del-ndb_row_lock_3.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_3.test
BitKeeper/deleted/.del-ndb_row_lock_4.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_4.test
BitKeeper/deleted/.del-ndb_row_lock_5.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_5.test
BitKeeper/deleted/.del-ndb_row_lock_big_tab.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_big_tab.test
BitKeeper/deleted/.del-ndb_row_lock_big_tab_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_big_tab_1.test
BitKeeper/deleted/.del-ndb_row_lock_big_tab_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_big_tab_2.test
BitKeeper/deleted/.del-ndb_row_lock_trig_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_trig_1.test
BitKeeper/deleted/.del-ndb_row_lock_trig_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_trig_2.test
BitKeeper/deleted/.del-ndb_row_lock_view_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_1.test
BitKeeper/deleted/.del-ndb_row_lock_view_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_2.test
BitKeeper/deleted/.del-ndb_row_lock_view_mix_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_mix_1.test
BitKeeper/deleted/.del-ndb_row_lock_view_mix_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_mix_2.test
BitKeeper/deleted/.del-ndb_row_lock_view_storedp_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_storedp_1.test
BitKeeper/deleted/.del-ndb_row_lock_view_storedp_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_storedp_2.test
BitKeeper/deleted/.del-ndb_row_lock_view_trig_1.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_trig_1.test
BitKeeper/deleted/.del-ndb_row_lock_view_trig_2.test:
  Delete: mysql-test/suite/row_lock/t/ndb_row_lock_view_trig_2.test
Makefile.am:
  Remove the "row_lock" suite from the "test-bt" target.
  
  Also, a formatting change: empty line for better readability.
2007-07-26 17:25:03 +02:00
unknown
b7eca8bc16 Merge xiphis.org:/anubis/antony/work/mysql-5.0-engines
into  xiphis.org:/anubis/antony/work/mysql-5.0-engines.merge
2007-07-26 07:56:37 -07:00
unknown
690f0df5a2 Merge debian.(none):/M50/mysql-5.0
into  debian.(none):/M50/push-5.0
2007-07-26 15:37:45 +02:00
unknown
2df3b7b0ea Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


mysql-test/t/create.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/create.result:
  Merge with 5.0 (main).
2007-07-26 03:33:43 +05:00
unknown
b42247bca8 Bug#25679
"Federated Denial of Service"
  Federated storage engine used to attempt to open connections within
  the ::create() and ::open() methods which are invoked while LOCK_open
  mutex is being held by mysqld. As a result, no other client sessions
  can open tables while Federated is attempting to open a connection.
  Long DNS lookup times would stall mysqld's operation and a rogue
  connection string which connects to a remote server which simply
  stalls during handshake can stall mysqld for a much longer period of
  time.
  This patch moves the opening of the connection much later, when the
  federated actually issues queries, by which time the LOCK_open mutex is
  no longer being held.


mysql-test/r/federated.result:
  change of test/results due to patch for bug25679
mysql-test/t/federated.test:
  change of test/results due to patch for bug25679
sql/ha_federated.cc:
  bug25679
    remove function check_foreign_fata_source()
    ha_federated::open() no longer opens the federated connection.
    ha_federated::create() no longer opens and tests connection.
    ha_federated::real_connect() opens connection and tests presence of table.
    ha_federated::real_query() sends query, calling real_connect() if neccessary.
sql/ha_federated.h:
  bug25679
    new methods real_query() and real_connect()
2007-07-25 12:23:24 -07:00
unknown
78207030bb Updated/fixed test and result files to 5.0.46
Note datadict files do not include wrong is_updatable wrong value 
     as a result of bug 30020.


mysql-test/suite/funcs_1/datadict/datadict_master.inc:
  Updated test file
mysql-test/suite/funcs_1/r/innodb__datadict.result:
  Updated test file
mysql-test/suite/funcs_1/r/innodb_func_view.result:
  Updated test file
mysql-test/suite/funcs_1/r/innodb_trig_0102.result:
  Updated test file
mysql-test/suite/funcs_1/r/innodb_trig_08.result:
  Updated test file
mysql-test/suite/funcs_1/r/innodb_trig_09.result:
  Updated test file
mysql-test/suite/funcs_1/r/innodb_views.result:
  Updated test file
mysql-test/suite/funcs_1/r/memory__datadict.result:
  Updated test file
mysql-test/suite/funcs_1/r/memory_func_view.result:
  Updated test file
mysql-test/suite/funcs_1/r/memory_trig_0102.result:
  Updated test file
mysql-test/suite/funcs_1/r/memory_trig_08.result:
  Updated test file
mysql-test/suite/funcs_1/r/memory_trig_09.result:
  Updated test file
mysql-test/suite/funcs_1/r/memory_views.result:
  Updated test file
mysql-test/suite/funcs_1/r/myisam__datadict.result:
  Updated test file
mysql-test/suite/funcs_1/r/myisam_func_view.result:
  Updated test file
mysql-test/suite/funcs_1/r/myisam_trig_0102.result:
  Updated test file
mysql-test/suite/funcs_1/r/myisam_trig_08.result:
  Updated test file
mysql-test/suite/funcs_1/r/myisam_trig_09.result:
  Updated test file
mysql-test/suite/funcs_1/r/myisam_views.result:
  Updated test file
mysql-test/suite/funcs_1/triggers/triggers_0102.inc:
  Updated test file
mysql-test/suite/funcs_1/views/func_view.inc:
  Updated test file
2007-07-24 21:31:25 -07:00
unknown
607ab14cf7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-07-24 22:57:26 +04:00
unknown
c4d53e31b0 Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT.
When the SQL_BIG_RESULT flag is specified SELECT should store items from the
select list in the filesort data and use them when sending to a client.
The get_addon_fields function is responsible for creating necessary structures
for that. But this function was allowed to do so only for SELECT and
INSERT .. SELECT queries. This makes the SQL_BIG_RESULT useless for
the CREATE .. SELECT queries.

Now the get_addon_fields allows storing select list items in the filesort
data for the CREATE .. SELECT queries.


mysql-test/t/create.test:
  Added a test case for the bug#15130: CREATE .. SELECT was denied to use
  advantages of the SQL_BIG_RESULT.
mysql-test/r/create.result:
  Added a test case for the bug#15130: CREATE .. SELECT was denied to use
  advantages of the SQL_BIG_RESULT.
sql/filesort.cc:
  Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT.
  Now the get_addon_fields allows storing select list items in the filesort
  data for the CREATE .. SELECT queries.
2007-07-24 18:15:44 +04:00
unknown
594d71a449 Merge xiphis.org:/anubis/antony/work/p2-bug25714.1
into  xiphis.org:/anubis/antony/work/p2-bug25714.1.merge-5.0
2007-07-23 23:57:50 -07:00
unknown
0f85ae9f2c Bug#25714
"getGeneratedKeys() does not work with FEDERATED table"
  mysql_insert() expected the storage engine to update the row data
  during the write_row() operation with the value of the new auto-
  increment field. The field must be updated when only one row has
  been inserted as mysql_insert() would ignore the thd->last_insert.
  This patch implements HA_STATUS_AUTO support in ha_federated::info()
  and ensures that ha_federated::write_row() does update the row's
  auto-increment value.
  The test case was written in C as the protocol's 'id' value is
  accessible through libmysqlclient and not via SQL statements.
  mysql-test-run.pl was extended to enable running the test binary.


mysql-test/mysql-test-run.pl:
  bug25714
    implement support to run C test for bug25714
sql/ha_federated.cc:
  bug25714
    The storage engine instance property auto_increment_value was not
    being set.
    mysql_insert() requires that the storage engine updates the row with
    the auto-increment value, especially when only inserting one row.
    Implement support for ha_federated::info(HA_STATUS_AUTO)
tests/Makefile.am:
  bug25714
    build C test for bug
mysql-test/include/have_bug25714.inc:
  New BitKeeper file ``mysql-test/include/have_bug25714.inc''
mysql-test/r/federated_bug_25714.result:
  New BitKeeper file ``mysql-test/r/federated_bug_25714.result''
mysql-test/r/have_bug25714.require:
  New BitKeeper file ``mysql-test/r/have_bug25714.require''
mysql-test/t/federated_bug_25714.test:
  New BitKeeper file ``mysql-test/t/federated_bug_25714.test''
tests/bug25714.c:
  New BitKeeper file ``tests/bug25714.c''
2007-07-23 23:35:43 -07:00
unknown
c29002a5b6 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B29644-5.0-opt


sql/ha_innodb.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  5.0-opt merge
mysql-test/t/innodb_mysql.test:
  5.0-opt merge
2007-07-23 17:07:29 +03:00
unknown
d50caace5f Fixed bug #29611.
If a primary key is defined over column c of enum type then 
the EXPLAIN command for a look-up query of the form
  SELECT * FROM t WHERE c=0
said that the query was with an impossible where condition though the
query correctly returned non-empty result set when the table indeed 
contained rows with error empty strings for column c. 

This kind of misbehavior was due to a bug in the function 
Field_enum::store(longlong,bool) that erroneously returned 1 if
the the value to be stored was equal to 0. 
Note that the method 
Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
correctly returned 0 if a value of the error empty string 
was stored. 


mysql-test/r/type_enum.result:
  Added a test case for bug #29661.
mysql-test/t/type_enum.test:
  Added a test case for bug #29661.
sql/field.cc:
  Fixed bug #29611.
  If a primary key was defined over column c of enum type then 
  the EXPLAIN command for a look-up query of the form
    SELECT * FROM t WHERE c=0
  said that the query was with an impossible where condition though the
  query correctly returned non-empty result set when the table indeed 
  contained rows with error empty strings for column c. 
  
  This kind of misbehavior was due to a bug in the function 
  Field_enum::store(longlong,bool) that erroneously returned 1 if
  the the value to be stored was equal to 0. 
  Note that the method 
  Field_enum::store(const char *from,uint length,CHARSET_INFO *cs)
  correctly returned 0 if a value of the error empty string 
  was stored.
2007-07-22 18:26:16 -07:00
unknown
0a6543687c Merge chilla.local:/home/mydev/mysql-5.0-amain
into  chilla.local:/home/mydev/mysql-5.0-axmrg


sql/sql_table.cc:
  Auto merged
2007-07-22 19:08:25 +02:00
unknown
240bb90ef1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28951-5.0-opt


mysql-test/t/innodb_mysql.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  merge of 5.0-opt
2007-07-22 19:23:29 +03:00
unknown
5f0036eb9f Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2007-07-21 15:46:02 -07:00
unknown
9260c30d36 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29338
into  gleb.loc:/home/uchum/work/bk/5.0-opt


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Merge with local tree.
2007-07-22 01:52:13 +05:00
unknown
9cad4f08db sp.test, sp.result:
Additional test case fix for bug #29338.


mysql-test/t/sp.test:
  Additional test case fix for bug #29338.
mysql-test/r/sp.result:
  Additional test case fix for bug #29338.
2007-07-22 01:49:41 +05:00
unknown
7507cbaaf0 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29911
2007-07-21 13:36:33 -07:00
unknown
aed9a5fee3 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29338
into  gleb.loc:/home/uchum/work/bk/5.0-opt


mysql-test/r/sp.result:
  Merge with local tree
mysql-test/t/sp.test:
  Merge with local tree
2007-07-22 00:40:14 +05:00
unknown
3520da5b25 Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug29911
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29911


mysql-test/t/having.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/having.result:
  SCCS merged
2007-07-21 12:34:18 -07:00
unknown
be7b4043b9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime


mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-07-21 17:52:16 +04:00
unknown
72c6c789cf Fixed bug #29911.
This bug manifested itself for join queries with GROUP BY and HAVING clauses
whose SELECT lists contained DISTINCT. It occurred when the optimizer could
deduce that the result set would have not more than one row.
The bug could lead to wrong result sets for queries of this type because
HAVING conditions were erroneously ignored in some cases in the function
remove_duplicates.   


mysql-test/r/having.result:
  Added a test case for bug #29911.
mysql-test/t/having.test:
  Added a test case for bug #29911.
2007-07-20 22:56:19 -07:00
unknown
4049faa492 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-29788
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-21 05:15:16 +05:00
unknown
47507276aa Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kent/bk/tmp3/mysql-5.0-build


libmysql/libmysql.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
2007-07-21 01:53:19 +02:00
unknown
cff531ffc1 Fixed bug #29788.
After dumping triggers mysqldump copied 
the value of the OLD_SQL_MODE variable to the SQL_MODE
variable. If the --compact option of the mysqldump was
not set the OLD_SQL_MODE variable had the value
of the uninitialized SQL_MODE variable. So
usually the NO_AUTO_VALUE_ON_ZERO option of the
SQL_MODE variable was discarded.

This fix is for non-"--compact" mode of the mysqldump,
because mysqldump --compact never set SQL_MODE to the
value of NO_AUTO_VALUE_ON_ZERO.

The dump_triggers_for_table function has been modified
to restore previous value of the SQL_MODE variable after
dumping triggers using the SAVE_SQL_MODE temporary
variable.


client/mysqldump.c:
  Fixed bug #29788.
  The dump_triggers_for_table function has been modified
  to restore previous value of the SQL_MODE variable after
  dumping triggers using the SAVE_SQL_MODE temporary
  variable.
mysql-test/r/mysqldump.result:
  Updated test case for bug #29788.
mysql-test/t/mysqldump.test:
  Updated test case for bug #29788.
2007-07-21 04:50:11 +05:00
unknown
524a40a982 Merge chilla.local:/home/mydev/mysql-5.0-amain
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-07-21 01:34:55 +02:00
unknown
4ae56e219d Merge chilla.local:/home/mydev/mysql-5.0-ateam
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-07-21 01:33:25 +02:00
unknown
95a8c6c327 Bug #28591: MySQL need not sort the records in case of
ORDER BY primary_key on InnoDB table

Queries that use an InnoDB secondary index to retrieve
data don't need to sort in case of ORDER BY primary key
if the secondary index is compared to constant(s).
They can also skip sorting if ORDER BY contains both the
the secondary key parts and the primary key parts (in
that order).
This is because InnoDB returns the rows in order of the
primary key for rows with the same values of the secondary
key columns.
Fixed by preventing temp table sort for the qualifying 
queries.


mysql-test/r/innodb_mysql.result:
  Bug #28591: test case
mysql-test/t/innodb_mysql.test:
  Bug #28591: test case
sql/sql_select.cc:
  Bug #28591: Use the primary key as suffix when testing
  if the key can be used for ORDER BY on supporting engines.
sql/table.cc:
  Bug #28591: can use the primary key
  as a suffix for the secondary keys
2007-07-20 21:05:29 +03:00
unknown
d758b1e629 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29898-bug-5.0-opt-mysql
2007-07-20 22:05:20 +04:00
unknown
eea5c2a3c5 Bug #29644: alter table hangs if records locked in share mode
by long running transaction

On Windows opened files can't be deleted. There was a special
upgraded lock mode (TL_WRITE instead of TL_WRITE_ALLOW_READ) 
in ALTER TABLE to make sure nobody has the table opened
when deleting the old table in ALTER TABLE. This special mode
was causing ALTER TABLE to hang waiting on a lock inside InnoDB.
This special lock is no longer necessary as the server is 
closing the tables it needs to delete in ALTER TABLE.
Fixed by removing the special lock.
Note that this also reverses the fix for bug 17264 that deals with
another consequence of this special lock mode being used.


mysql-test/r/innodb_mysql.result:
  Bug #29644: test case
mysql-test/t/innodb_mysql.test:
  Bug #29644: test case
sql/ha_innodb.cc:
  Bug #29644: reverse the (now excessive) fix
  for bug 17264 (but leave the test case).
sql/sql_base.cc:
  Bug #29644: don't need a special lock mode for Win32 anymore: 
  the table is closed before the drop.
2007-07-20 14:17:15 +03:00
unknown
db31d3c96d Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-07-20 04:15:50 +05:00
unknown
a131428f04 Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
The Item_date_typecast::val_int function doesn't reset null_value flag.
This makes all values that follows the first null value to be treated as nulls
and led to a wrong result.

Now the Item_date_typecast::val_int function correctly sets the null_value flag
for both null and non-null values.


mysql-test/t/cast.test:
  Added a test case for the bug#29898:  Item_date_typecast::val_int doesn't reset
  the null_value flag.
mysql-test/r/cast.result:
  Added a test case for the bug#29898:  Item_date_typecast::val_int doesn't reset
  the null_value flag.
sql/item_timefunc.cc:
  Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
  Now the Item_date_typecast::val_int function correctly sets the null_value flag
  for both null and non-null values.
2007-07-20 00:06:35 +04:00
unknown
92de7b7bb2 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-07-19 20:04:35 +02:00
unknown
d0020607b3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29850-bug-5.0-opt-mysql
2007-07-19 21:40:12 +04:00
unknown
7f6a816484 Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs
a temporary table.

The result string of the Item_func_group_concat wasn't initialized in the 
copying constructor of the Item_func_group_concat class. This led to a
wrong charset of GROUP_CONCAT result when the select employs a temporary
table.

The copying constructor of the Item_func_group_concat class now correctly
initializes the charset of the result string.


mysql-test/t/func_gconcat.test:
  Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result
  when the select employs a temporary table.
mysql-test/r/func_gconcat.result:
  Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result
  when the select employs a temporary table.
sql/item_sum.cc:
  Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs
  a temporary table.
  The copying constructor of the Item_func_group_concat class now correctly
  initializes the charset of the result string.
2007-07-19 20:21:23 +04:00
unknown
c865b22514 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/ha_myisam.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-07-19 19:57:53 +05:00
unknown
36f1e4848c Fixed bug #29338.
Optimization of queries with DETERMINISTIC functions in the
WHERE clause was not effective: sequential scan was always
used.
Now a SF with the DETERMINISTIC flags is treated as constant
when it's arguments are constants (or a SF doesn't has arguments).


sql/item_func.h:
  Fixed bug #29338.
  The Item_func_sp::used_tables has been removed
  (virtual Item_func::used_tables function is enough).
  The virtual Item_func_sp::update_used_tables function
  has been added.
sql/item_func.cc:
  Fixed bug #29338.
  The Item_func_sp::update_used_tables and the
  Item_func_sp::fix_field functions have been modified
  to take into account the DETERMINISTIC flag of SF definition.
mysql-test/r/sp.result:
  Updated test case for bug #29338.
mysql-test/t/sp.test:
  Updated test case for bug #29338.
2007-07-19 18:39:01 +05:00
unknown
2486c23ca6 BUG#26325 - TEMPORARY TABLE "corrupt" after first read, according
to CHECK TABLE

CHECK/REPAIR TABLE reports "File not found" error when issued
against temporary table.

Fixed by disabling a brunch of code (in case it gets temporary table)
that is responsible for updating frm version as it is not needed
for temporary tables.


mysql-test/r/check.result:
  A test case for BUG#26325.
mysql-test/t/check.test:
  A test case for BUG#26325.
sql/handler.cc:
  No need to update frm version in case table was created or checked
  by server with the same version. This also ensures that we do not
  update frm version for temporary tables as this code doesn't support
  temporary tables.
2007-07-19 13:51:31 +05:00
unknown
8b59beaebe Merge gleb.loc:/home/uchum/work/bk/5.0-opt-28524
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-19 10:54:39 +05:00
unknown
2bfe84d434 Fixed bug #28524.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view 
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.


client/mysqldump.c:
  Fixed bug #28524.
  The mysqldump utility has been modified to unconditionally drop
  temporary tables before the creation of views.
mysql-test/t/mysqldump.test:
  Updated test case for bug #28524 and updated result of previous tests.
mysql-test/r/mysqldump.result:
  Updated test case for bug #28524 and updated result of previous tests.
2007-07-18 19:14:48 +05:00
unknown
6981af6ff5 Add a test case for Bug#22427 create table if not exists + stored
function results in inconsistent behavior.

The bug itself was fixed by the patch for bug 20662.


mysql-test/r/sp-prelocking.result:
  Update results (Bug#22427)
mysql-test/t/sp-prelocking.test:
  Add a test case for Bug#22427 create table if not exists + stored 
  function results in inconsistent behavior
2007-07-18 17:09:03 +04:00
unknown
c0277a1192 A fix and a test case for Bug#26104 Bug on foreign key class constructor.
Fix the typo in the constructor. Cover a semantic check that previously
never worked with a test.


mysql-test/r/create.result:
  Update results (Bug#26104)
mysql-test/r/innodb.result:
  Update results.
mysql-test/t/create.test:
  Add a test case for Bug#26104 Bug on foreign key class constructor
mysql-test/t/innodb.test:
  Return a new error number (MySQL error instead of internal InnoDB error).
sql/sql_class.h:
  A fix for Bug#26104 Bug on foreign key class constructor -- fix
  the typo in the constructor
2007-07-18 16:22:05 +04:00
unknown
5f462f9626 Add a test case for Bug#27248 Triggers: error if insert affects temporary
table.
The bug itself is yet another manifestation of Bug 26141.


mysql-test/r/trigger.result:
  Update results.
mysql-test/t/trigger.test:
  Add a test case for Bug#27248 Triggers: error if insert affects temporary
  table
2007-07-18 14:42:06 +04:00
unknown
c3e1eaba62 Merge trift2.:/MySQL/M50/bug21023-25486-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-07-17 21:44:36 +02:00