Commit graph

1073 commits

Author SHA1 Message Date
unknown
24aa92ddff Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1


sql/ha_ndbcluster.cc:
  Auto merged
2006-09-12 16:35:41 +02:00
unknown
e780245acc Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-09-12 16:24:39 +02:00
unknown
8b1d995987 Bug #21378 Alter table from X storage engine to NDB could cause data loss: Added warning if local table shadows ndb table 2006-09-12 16:04:52 +02:00
unknown
0fbd21584d Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into  zim.(none):/tmp/merge-5.1


sql/ha_ndbcluster.cc:
  Auto merged
sql/log.cc:
  Auto merged
2006-09-06 09:23:47 -07:00
unknown
431a67376e Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1


mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
mysql-test/t/ndb_condition_pushdown.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
2006-09-06 11:21:49 +02:00
unknown
545c9b8fde Bug #21056 ndb pushdown equal/setValue error on datetime: only pushdown like of string type fields 2006-09-05 17:07:00 +02:00
unknown
a0b7b2426f Fix for BUG#11151 "LOAD DATA INFILE commits transaction in 5.0".
In 5.0 we made LOAD DATA INFILE autocommit in all engines, while
only NDB wanted that. Users and trainers complained that it affected
InnoDB and was a change compared to 4.1 where only NDB autocommitted.
To revert to the behaviour of 4.1, we move the autocommit logic out of mysql_load() into
ha_ndbcluster::external_lock().
The result is that LOAD DATA INFILE commits all uncommitted changes
of NDB if this is an NDB table, its own changes if this is an NDB
table, but does not affect other engines.
Note: even though there is no "commit the full transaction at end"
anymore, LOAD DATA INFILE stays disabled in routines (re-entrency
problems per a comment of Pem).
Note: ha_ndbcluster::has_transactions() does not give reliable results
because it says "yes" even if transactions are disabled in this engine...


sql/ha_ndbcluster.cc:
  NDB wants to do autocommit if this is LOAD DATA INFILE.
  For this to not affect all other engines, we move the logic
  inside ha_ndbcluster.
sql/sql_load.cc:
  This ha_enable_transaction() in mysql_load() forced an autocommit
  in all engines, while only NDB wants to do that.
  So we move the logic inside ha_ndbcluster.cc.
mysql-test/include/loaddata_autocom.inc:
  test for engines to see if they autocommit or not in LOAD DATA INFILE
mysql-test/r/loaddata_autocom_innodb.result:
  result for InnoDB (no autocommit)
mysql-test/r/loaddata_autocom_ndb.result:
  result for NDB (autocommit)
mysql-test/r/rpl_ndb_innodb_trans.result:
  result for InnoDB+NDB transactions. Observe that when ROLLBACK
  cannot rollback the LOAD DATA INFILE in NDB it issues warning 1196
  as appropriate.
mysql-test/t/loaddata_autocom_innodb.test:
  test that InnoDB does not autocommit in LOAD DATA INFILE.
mysql-test/t/loaddata_autocom_ndb.test:
  test that NDB does autocommit in LOAD DATA INFIL
mysql-test/t/rpl_ndb_innodb_trans-slave.opt:
  need to tell the slave to use innodb
mysql-test/t/rpl_ndb_innodb_trans.test:
  test of transactions mixing NDB and InnoDB. To see if ROLLBACK
  rolls back in both engines, with the exception of LOAD DATA INFILE
  which does not roll back NDB: we see that a LOAD DATA INFILE in NDB
  commits all what has been done in NDB so far, commits its changes,
  but does not commit in other engines.
2006-09-05 16:52:05 +02:00
unknown
d225ffd750 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp:
  Auto merged
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Auto merged
mysql-test/mysql-test-run.pl:
  Merge
storage/ndb/include/ndbapi/ndb_cluster_connection.hpp:
  Merge
2006-09-01 15:26:03 +02:00
unknown
f1a02cad39 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into  zim.(none):/tmp/mysql-5.1-arch


sql/ha_ndbcluster.cc:
  Auto merged
2006-08-31 16:11:57 -07:00
unknown
2dfaa6697c add 2 placeholder values for config and system variables. 2006-08-30 14:27:29 -07:00
unknown
2233201ba7 Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max"
  Strict mode should fail if autoincrement value is out of range


include/my_base.h:
  Add new handler error codes
sql/ha_berkeley.cc:
  handle error in update_auto_increment()
sql/ha_heap.cc:
  handle error in update_auto_increment()
sql/ha_innodb.cc:
  handle error in update_auto_increment()
sql/ha_myisam.cc:
  handle error in update_auto_increment()
sql/ha_myisammrg.cc:
  handle error in update_auto_increment()
sql/ha_ndbcluster.cc:
  handle error in update_auto_increment()
sql/handler.cc:
  return error from handler::update_auto_increment()
sql/handler.h:
  change return type of handler::update_auto_increment() to int
sql/share/errmsg.txt:
  new error message for auto-increment
mysql-test/include/strict_autoinc.inc:
  New BitKeeper file ``mysql-test/include/strict_autoinc.inc''
mysql-test/r/strict_autoinc_1myisam.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_1myisam.result''
mysql-test/r/strict_autoinc_2innodb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_2innodb.result''
mysql-test/r/strict_autoinc_3heap.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_3heap.result''
mysql-test/r/strict_autoinc_4bdb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_4bdb.result''
mysql-test/r/strict_autoinc_5ndb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_5ndb.result''
mysql-test/t/strict_autoinc_1myisam.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_1myisam.test''
mysql-test/t/strict_autoinc_2innodb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_2innodb.test''
mysql-test/t/strict_autoinc_3heap.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_3heap.test''
mysql-test/t/strict_autoinc_4bdb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_4bdb.test''
mysql-test/t/strict_autoinc_5ndb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_5ndb.test''
2006-08-30 13:20:39 -07:00
unknown
d7de5c349b This pulls two function calls which should have been handlerton calls out of handler.cc.
sql/ha_ndbcluster.cc:
  Adding in new handlerton calls.
sql/handler.cc:
  Calls directly made to NDB have been removed.
sql/handler.h:
  Two additional handlerton structure functions.
2006-08-30 12:28:25 -07:00
unknown
3dcf86736a NDBAPI cleanup 2006-08-30 11:41:21 +02:00
unknown
15ede69561 Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-08-29 22:56:23 +02:00
unknown
52ac50b37b Merge gni@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into  dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.1-ndb-bj


sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/ndbapi/ndberror.c:
  Auto merged
2006-08-29 11:04:51 +08:00
unknown
a8e10dde7a Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-5.0/mysql-5.0-ndb-bj


ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
ndb/src/ndbapi/ndberror.c:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2006-08-28 16:18:48 +00:00
unknown
ac11ba6c68 Cleanup of unused variables.
Fixed "discover" in the handler API.

Fixed problem where handlerton was not zero'ed. I need to look around, I suspect this problem is more widespread. 


sql/ha_innodb.h:
  Unused variable
sql/ha_ndbcluster.cc:
  Added "discover" to handlerton.
sql/handler.cc:
  Added plugin loop and correctly now use handler API.
sql/handler.h:
  Removed unused variable. Added discover to handler API
sql/mysqld.cc:
  Removed unused variables.
sql/sql_plugin.cc:
  Fixed DBUG Enter comment (obvious cut paste mistake)
storage/csv/ha_tina.cc:
  Found that if we don't bzero handlerton, that things can go boom!
  
  This probably needs to be fixed for all handlers
2006-08-25 13:31:15 -07:00
unknown
9f5425418e Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


sql/ha_ndbcluster.cc:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
2006-08-23 11:02:27 +02:00
unknown
c251e8a864 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-08-23 11:00:29 +02:00
unknown
977cd20a70 This changest:
Plugins now when compiled or not compiled work correctly with status variables. 
Status variables from plugins now set their own names (removed bit where plugin name was pre-appended this broke Innodb and Cluster)
A few Makefile cleanups. 


sql/ha_innodb.cc:
  Cleanup to make status variables directly in engine
sql/ha_ndbcluster.cc:
  Engine interface now has variables for status
sql/handler.cc:
  handler now makes sure to init status variables
sql/mysqld.cc:
  Removed status variable hacks
sql/sql_delete.cc:
  Removed include file that was not required
storage/myisam/Makefile.am:
  Cleaned up line lengths and addded additional include to not install.
storage/myisam/ha_myisam.cc:
  Removed double plugin include
2006-08-22 16:24:12 -07:00
unknown
9c29363491 correct merge 2006-08-22 22:52:03 +02:00
unknown
6e8d8b622c Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
2006-08-22 20:59:20 +02:00
unknown
df4afa6ed1 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new


mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
mysql-test/t/disabled.def:
  merge
sql/ha_ndbcluster.cc:
  merge
2006-08-22 20:55:28 +02:00
unknown
06b1f15dc3 ndb - post-merge fix 5.0 to 5.0-ndb: number of frags if --without-big-tables
sql/ha_ndbcluster.cc:
  calculate frags with (ulonglong)max_rows in case --without-big-tables
2006-08-22 14:26:56 +02:00
unknown
8e60be5508 merge 2006-08-17 20:51:44 +02:00
unknown
1cf6bc4bfc Merge perch.ndb.mysql.com:/home/jonas/src/51-clean
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
mysql-test/t/disabled.def:
  SCCS merged
sql/ha_ndbcluster.cc:
  e
  merge
2006-08-17 19:49:00 +02:00
unknown
02c63a3e57 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1


mysql-test/t/ndb_lock.test:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
mysql-test/r/ndb_lock.result:
  Merge (using local)
sql/ha_ndbcluster.cc:
  Merge
sql/ha_ndbcluster.h:
  Merge
2006-08-15 14:39:48 +02:00
unknown
6464d62c7b Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: do not release operation records for on-going read_multi_range 2006-08-15 14:31:21 +02:00
unknown
4eb4493538 ndb - bug#20708
init ndb_cache_check_time and honor value in my.cnf


sql/ha_ndbcluster.cc:
  init ndb_cache_check_time and honor value in my.cnf
2006-08-15 14:22:47 +02:00
unknown
115eb7df2e Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0


mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
ndb/include/ndbapi/NdbTransaction.hpp:
  Merge
sql/ha_ndbcluster.cc:
  Merge
sql/ha_ndbcluster.h:
  Merge
2006-08-15 13:37:39 +02:00
unknown
87b7363c5c ndb_lock.test, ndb_lock.result:
bug #18184  SELECT ... FOR UPDATE does not work..: New test case
ha_ndbcluster.h, ha_ndbcluster.cc, NdbConnection.hpp:
  Fix for bug #21059  Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);


mysql-test/r/ndb_lock.result:
  bug #18184  SELECT ... FOR UPDATE does not work..: New test case
mysql-test/t/ndb_lock.test:
  bug #18184  SELECT ... FOR UPDATE does not work..: New test case
ndb/include/ndbapi/NdbConnection.hpp:
  Fix for bug #21059  Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
sql/ha_ndbcluster.cc:
  Fix for bug #21059  Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
sql/ha_ndbcluster.h:
  Fix for bug #21059  Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
2006-08-15 13:12:27 +02:00
unknown
4da4c29dec Merge gni@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into  dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.1-ndb-bj


sql/ha_ndbcluster.cc:
  Auto merged
2006-08-15 18:04:55 +08:00
unknown
7f97c19db8 Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new


mysql-test/t/disabled.def:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
2006-08-15 09:39:26 +02:00
unknown
94fda1911f Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  willster.(none):/home/stewart/Documents/MySQL/5.1/ndb


mysql-test/t/disabled.def:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
2006-08-15 11:28:27 +08:00
unknown
a95e91c646 BUG#20848
sql/ha_ndbcluster.cc:
  post merge fix
2006-08-11 18:01:46 +08:00
unknown
60167cd929 Merge qa3-104.qa.cn.tlan:/mnt/sda7/justin.he/mysql/mysql-5.0-ndb-bj
into  qa3-104.qa.cn.tlan:/mnt/sda7/justin.he/mysql/mysql-5.1-ndb-bj


sql/ha_ndbcluster.cc:
  manual merge
2006-08-11 15:18:40 +08:00
unknown
f7cc4925de BUG#20848 SHOW STATUS LIKE 'NDB%' should be data nodes not storage nodes
use correct termninology


sql/ha_ndbcluster.cc:
  just replace 'number_of_storage_nodes' with 'number_of_data_nodes'
2006-08-11 15:10:08 +08:00
unknown
e34496e5d8 BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
allow handler::info to return an error code (that will be returned to the user)


sql/ha_berkeley.cc:
  update handler::info interface to return int
sql/ha_berkeley.h:
  update handler::info interface to return int
sql/ha_heap.cc:
  update handler::info interface to return int
sql/ha_heap.h:
  update handler::info interface to return int
sql/ha_innodb.cc:
  update handler::info interface to return int
sql/ha_innodb.h:
  update handler::info interface to return int
sql/ha_myisam.cc:
  update handler::info interface to return int
sql/examples/ha_archive.cc:
  update handler::info interface to return int
sql/examples/ha_archive.h:
  update handler::info interface to return int
sql/examples/ha_example.cc:
  update handler::info interface to return int
sql/examples/ha_example.h:
  update handler::info interface to return int
sql/examples/ha_tina.cc:
  update handler::info interface to return int
sql/examples/ha_tina.h:
  update handler::info interface to return int
sql/ha_myisam.h:
  update handler::info interface to return int
sql/ha_myisammrg.cc:
  update handler::info interface to return int
sql/ha_myisammrg.h:
  update handler::info interface to return int
sql/ha_ndbcluster.cc:
  update handler::info interface to return int
sql/ha_ndbcluster.h:
  update handler::info interface to return int
sql/handler.h:
  update handler::info interface to return int
sql/opt_sum.cc:
  If we get an error when using handler::info to get count(*),
  print and return the error.
sql/sql_select.cc:
  if error, set fatal error.
2006-08-10 22:55:20 +08:00
unknown
0cddfc08ed Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


mysql-test/t/ndb_autodiscover3.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-08-10 13:47:20 +02:00
unknown
893ed9fca6 Merge mysql.com:/home/marty/MySQL/mysql-5.0
into  mysql.com:/home/marty/MySQL/mysql-5.1-ndb


mysql-test/r/ndb_read_multi_range.result:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
mysql-test/t/ndb_read_multi_range.test:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
mysql-test/r/ndb_lock.result:
  Merge (using local)
sql/ha_ndbcluster.cc:
  Merge fix for bug #18184  SELECT ... FOR UPDATE does not work..
sql/ha_ndbcluster.h:
  Merge fix for bug #18184  SELECT ... FOR UPDATE does not work..
2006-08-09 15:02:30 +02:00
unknown
d2fd4efc5b Merge mysql.com:/home/marty/MySQL/mysql-4.1
into  mysql.com:/home/marty/MySQL/mysql-5.0


mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Merge
2006-08-08 14:42:05 +02:00
unknown
01543ee274 bug #18184 SELECT ... FOR UPDATE does not work..: Added lockTuple call in close_scan
sql/ha_ndbcluster.cc:
  bug #18184  SELECT ... FOR UPDATE does not work..: Added lockTuple call in closeScan
mysql-test/r/ndb_lock.result:
  bug #18184  SELECT ... FOR UPDATE does not work..: Added lockTuple call in closeScan
mysql-test/t/ndb_lock.test:
  bug #18184  SELECT ... FOR UPDATE does not work..: Added lockTuple call in closeScan
2006-08-08 12:22:23 +02:00
unknown
5a7d7893d7 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit); 2006-08-07 14:48:54 +02:00
unknown
a1fc9e8848 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit); 2006-08-07 13:51:20 +02:00
unknown
312034fa44 Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-bug18775


sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/sql_db.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Manual merge
2006-08-02 18:10:51 +02:00
unknown
ef976d20c9 Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)

The intermediate (not temporary) files of the new table
during ALTER TABLE was visible for SHOW TABLES. These
intermediate files are copies of the original table with
the changes done by ALTER TABLE. After all the data is
copied over from the original table, these files are renamed 
to the original tables file names. So they are not temporary 
files. They persist after ALTER TABLE, but just with another 
name.

In 5.0 the intermediate files are invisible for SHOW TABLES
because all file names beginning with "#sql" were suppressed.

This failed since 5.1.6 because even temporary table names were
converted when making file names from them. The prefix became
converted to "@0023sql". Converting the prefix during SHOW TABLES
would suppress the listing of user tables that start with "#sql".

The solution of the problem is to continue the implementation of
the table name to file name conversion feature. One requirement
is to suppress the conversion for temporary table names.

This change is straightforward for real temporary tables as there
is a function that creates temporary file names.

But the generated path names are located in TMPDIR and have no
relation to the internal table name. This cannot be used for
ALTER TABLE. Its intermediate files need to be in the same
directory as the old table files. And it is necessary to be
able to deduce the same path from the same table name repeatedly.

Consequently the intermediate table files must be handled like normal
tables. Their internal names shall start with tmp_file_prefix
(#sql) and they shall not be converted like normal table names.

I added a flags parameter to all relevant functions that are
called from ALTER TABLE. It is used to suppress the conversion
for the intermediate table files.

The outcome is that the suppression of #sql in SHOW TABLES
works again. It does not suppress user tables as these are
converted to @0023sql on file level.

This patch does also fix ALTER TABLE ... RENAME, which could not 
rename a table with non-ASCII characters in its name.

It does also fix the problem that a user could create a table like
`#sql-xxxx-yyyy`, where xxxx is mysqld's pid and yyyy is the thread
ID of some other thread, which prevented this thread from running 
ALTER TABLE.

Some of the above problems are mentioned in Bug 1405, which can
be closed with this patch.

This patch does also contain some minor fixes for other forgotten
conversions. Still known problems are reported as bugs 21370,
21373, and 21387.


mysql-test/r/alter_table.result:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added test results.
mysql-test/r/backup.result:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added test results.
mysql-test/r/repair.result:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added test results.
mysql-test/t/alter_table.test:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added test cases.
mysql-test/t/backup.test:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added test cases.
mysql-test/t/repair.test:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added a test case.
sql/ha_myisam.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added missing table name mapping calls to backup() and restore().
sql/ha_myisammrg.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/ha_ndbcluster.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/ha_ndbcluster_binlog.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/ha_ndbcluster_binlog.h:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Removed unnecessary check for wrong temp file prefix.
sql/mysql_priv.h:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Extended quick_rm_table(), mysql_rename_table(), and
  build_table_filename() by an flags argument, which can indicate
  temporary table names that should not be converted.
  Added symbolic flag values.
sql/sql_acl.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_base.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Fixed a comment.
  Added DBUG calls.
sql/sql_db.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_delete.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_insert.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_partition.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_rename.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_show.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Reverted the former fix for this bug. tmp_file_prefix is now used
  verbatim in the comparison of file names.
sql/sql_table.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added a check for a tmp_file_prefix file name to
  filename_to_tablename(). These names are now accepted without
  conversion.
  Extended quick_rm_table(), mysql_rename_table(), and
  build_table_filename() by an flags argument, which can indicate
  temporary table names that should not be converted.
  Removed the table to file name conversion from
  build_tmptable_filename().
  Disabled REPAIR TABLE ... USE_FRM for temporary tables.
  Added the forgotten conversion to mysql_alter_table() for the case
  of ALTER TABLE ... RENAME.
  Added comments and DBUG calls.
sql/sql_trigger.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/sql_view.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Added an zero argument for the new 'flags' parameter.
sql/table.cc:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Replaced a literal ".frm" by reg_ext.
  Added DBUG calls.
storage/innobase/row/row0mysql.c:
  Bug#18775 - Temporary table from alter table visible to other threads
  Continued implementation of WL#1324 (table name to filename encoding)
  Changed back the encoded temp file prefix to #sql.
2006-08-02 17:57:06 +02:00
unknown
3657f34629 Post-merge fixes.
mysql-test/mysql-test-run.sh:
  A post-merge fix (apply a change lost during the merge).
sql/ha_ndbcluster.cc:
  A post-merge fix: resolve a merge error.
sql/item.cc:
  Fix a merge error.
sql/item_xmlfunc.cc:
  Use the new signature of agg_arg_charsets.
2006-07-14 02:07:37 +04:00
unknown
3c3f9d9022 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-mysqld_safe-watch.sh~37cbc9a97ffd2555:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/key.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysys/my_handler.c:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/heap/hp_test1.c:
  Auto merged
storage/heap/hp_test2.c:
  Auto merged
strings/ctype-mb.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
sql/table.cc:
  Use local (manual merge)
mysql-test/mysql-test-run.sh:
  Manual merge.
sql/ha_ndbcluster.cc:
  Manual merge.
sql/item.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-07-13 22:09:36 +04:00
unknown
26f0d13d01 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/federated.result:
  Manual merge.
mysql-test/t/federated.test:
  Manual merge.
sql/sql_insert.cc:
  Manual merge.
2006-07-13 00:18:59 +04:00
unknown
c22a898199 Merge dl145k.mysql.com:/data0/mkindahl/bkroot/mysql-5.1-new-rpl
into  dl145k.mysql.com:/data0/mkindahl/bk/MERGE/mysql-5.1-merge


include/my_sys.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_row_create_table.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/rpl_row_create_table.test:
  Auto merged
mysys/my_malloc.c:
  Auto merged
server-tools/instance-manager/parse.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysys/safemalloc.c:
  Merge of mysql-5.1-new-rpl into mysql-5.1
sql/ha_federated.cc:
  d
  Merge of mysql-5.1-new-rpl into mysql-5.1
sql/set_var.cc:
  Merge of mysql-5.1-new-rpl with mysql-5.1
sql/slave.cc:
  Merge of mysql-5.1-new-rpl into mysql-5.1
sql/sql_class.h:
  Merge of mysql-5.1-new-rpl into mysql-5.1
2006-07-11 12:17:19 +02:00