Commit graph

20 commits

Author SHA1 Message Date
brian@zim.(none)
8685747f06 This patch makes ndbcluster_hton not static. I have a second patch for ndbcluster_hton to be static, but I want to talk to Jonas first. 2006-10-01 11:17:59 -07:00
mskold/marty@linux.site
5e60232da9 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1
2006-09-22 21:14:58 +02:00
brian@zim.(none)
7194b6d75a This changes the order of the universe, black is now the new white.
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
2006-09-15 10:28:00 -07:00
mskold/marty@mysql.com/linux.site
4f30db1f26 Bug #21378 Alter table from X storage engine to NDB could cause data loss: don't overwrite local tables when pushing out schema changes 2006-09-12 16:34:12 +02:00
ingo/istruewing@chilla.local
8e4c36ad4a 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.
2006-08-02 17:57:06 +02:00
mskold@mysql.com
38a445fee1 sql_delete.cc:
Bug #18864  TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table: locked lock_OPEN mutex to support TRUNCATE with re-create and cluster binlog
Many files:
  Bug #18864  TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table: adaption to MySQ Cluster replication
ndb_lock.result, ha_ndbcluster.cc:
  Fix for Bug #18184  SELECT ... FOR UPDATE does not work..: Adaption to 5.1 code
NdbDictionaryImpl.hpp:
  Fix of bad merge
2006-06-12 14:23:21 +02:00
tomas@poseidon.ndb.mysql.com
df507201b2 ndb: release LOCK_open during mysqld schema sync and mysqld sync with binlog (create/drop/rename table)
+ increase timeout for sync... which now should never occur
2006-05-31 01:52:14 +02:00
tomas@poseidon.ndb.mysql.com
37e8b5ac06 removing the usage if the ndb local dict cache to adress the 241 errors we get now and then 2006-05-04 13:58:17 +02:00
tomas@poseidon.ndb.mysql.com
85ad10d50d Bug #18932: Cluster binlog mysqld accepts updating although binlog not setup 2006-04-10 16:08:40 +02:00
tomas@poseidon.ndb.mysql.com
57198f85d6 Bug #18472 race condition between multiple mysqld's when setting up cluster/schema
- check that event is the correct one, and only delete if wrong version
2006-03-23 22:49:02 +01:00
tomas@poseidon.ndb.mysql.com
500fa8262a Bug #17827 cluster: rename of several tables in one statement, gets multiply logged
- redo log table query for log, split into separate entries per rename, to avoid duplicates, also to only log renames that relate to ndb tables
2006-03-01 18:23:00 +01:00
mskold@mysql.com
043a16e34a Merge mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new-ndb_improved_on-line_discover
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
2006-02-21 13:54:58 +01:00
tomas@poseidon.ndb.mysql.com
82be07c41b Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
2006-02-20 12:36:10 +01:00
mskold@mysql.com
5db302c834 Added on-line handling of altered frm in binlog thread 2006-02-13 11:23:13 +01:00
tomas@poseidon.ndb.mysql.com
a8f1cffd95 Bug #17038, distribution of schema operation to multiple binlogs missing/multiple entries, partial fix
- log alter table directly in server instead of in handler
- acknowledge alter table _after_ all binlog events have been processed
2006-02-06 11:47:12 +01:00
tomas@poseidon.ndb.mysql.com
a2f7fcf87b wl2325, distribution of schema operations between mysql servers 2006-02-01 01:12:11 +01:00
tomas@poseidon.ndb.mysql.com
933813c0c3 Bug #16851 Cluster: Auto Database Push is not working properly 2006-01-31 15:40:26 +01:00
tomas@poseidon.ndb.mysql.com
f10a7edff5 Bug #16851, log floods with ndb discover messages
+ fix crashing bug when discovering ndb tables outside select context
2006-01-31 01:37:48 +01:00
tomas@poseidon.ndb.mysql.com
826d0066ee fix so that ndb builds --without-ndb-binlog 2006-01-20 12:55:07 +01:00
tomas@poseidon.ndb.mysql.com
4b731ddfb4 wl2325 wl2324 2006-01-12 19:51:02 +01:00