Commit graph

496 commits

Author SHA1 Message Date
mskold/marty@linux.site
6f0e7a2631 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2006-12-01 21:12:13 +01:00
gni/root@ts3-168.ts.cn.tlan
24b1feea03 Merge ts3-168.ts.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb-bj
into  ts3-168.ts.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb
2006-12-01 11:35:05 +08:00
monty@mysql.com/narttu.mysql.fi
3a35c30027 Fixed compiler warnings (Mostly VC++):
- Removed not used variables
- Changed some ulong parameters/variables to ulonglong (possible serious bug)
- Added casts to get rid of safe assignment from longlong to long (and similar)
- Added casts to function parameters
- Fixed signed/unsigned compares
- Added some constructores to structures
- Removed some not portable constructs

Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown"
(Added new parameter to net_clear() to define when we want the communication buffer to be emptied)
2006-11-30 03:40:42 +02:00
monty@mysql.com/nosik.monty.fi
fa81a82e7f Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.
2006-11-27 01:47:38 +02:00
lars@black.(none)
63c906f749 Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
2006-11-13 12:45:31 +01:00
lars/lthalmann@dl145h.mysql.com
3776e9622b Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-11-07 19:26:31 +01:00
anozdrin/alik@alik.
18fb4abff4 Merge alik.:/mnt/raid/alik/MySQL/devel/5.1-monty
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2006-11-03 14:00:35 +03:00
bar@mysql.com/bar.intranet.mysql.r18.ru
45ac13658b After merge fix for BUG#18908 ERROR 1406 (22001): Data too long for column :: using utf8 2006-11-03 10:18:13 +04:00
monty@mysql.com/nosik.monty.fi
ca99516cc7 Fixed a lot of compiler warnings (Mainly in mysqld and instance manager)
Fixed some possible fatal wrong arguments to printf() style functions
Initialized some not initialized variables
Fixed bug in stored procedure and continue handlers
(Fixes Bug#22150)
2006-11-01 19:41:09 +02:00
petr/cps@mysql.com/owlet.local
f01df1fd0a fix test failures in the runtime tree 2006-10-25 12:54:59 +04:00
petr/cps@owlet.local
eda71e24c3 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/home/cps/mysql/devel/5.1-rename-bug
2006-10-24 17:00:23 +04:00
petr/cps@mysql.com/owlet.local
6846f8d9c4 Fix for Bug #17544 "Cannot do atomic log rotate",
Bug #21785 "Server crashes after rename of the log table" and
Bug #21966 "Strange warnings on create like/repair of the log
            tables"

According to the patch, from now on, one should use RENAME to
perform a log table rotation (this should also be reflected in
the manual).

Here is a sample:

use mysql;
CREATE TABLE IF NOT EXISTS general_log2 LIKE general_log;
RENAME TABLE general_log TO general_log_backup, general_log2 TO general_log;

The rules for Rename of the log tables are following:
      IF   1. Log tables are enabled
      AND  2. Rename operates on the log table and nothing is being
              renamed to the log table.
      DO   3. Throw an error message.
      ELSE 4. Perform rename.
 
The very RENAME query will go the the old (backup) table. This is
consistent with the behavoiur we have with binlog ROTATE LOGS
statement.

Other problems, which are solved by the patch are:

1) Now REPAIR of the log table is exclusive operation (as it should be), this
   also eliminates lock-related warnings. and
2) CREATE LIKE TABLE now usese usual read lock on the source table rather
   then name lock, which is too restrictive. This way we get rid of another
   log table-related warning, which occured because of the above fact
   (as a side-effect, name lock resulted in a warning).
2006-10-13 17:26:46 +04:00
dli@dev3-76.dev.cn.tlan
01c02f34a9 ndb - fixed for BUG#15021, binlog_index table become inconsistent if errors during purge of binlogs.
if EMFILE error occured while purging binary logs, stop purging logs and report error message to user.
2006-10-13 12:48:05 +08:00
lars@black.(none)
0b4e65e12b Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.1-merge
2006-10-10 21:59:23 +02:00
mats@romeo.(none)
cb1fdf5165 Fix to build on 64-bit systems where sizeof(unsigned long long)
> sizeof(unsigned long).
2006-10-06 08:41:34 +02:00
mats@romeo.(none)
93ea3261eb Post-merge fixes. 2006-10-05 22:16:19 +02:00
mats@romeo.(none)
fe97fd4bdb Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b20265-mysql-5.1-new-rpl
2006-10-05 15:22:41 +02:00
mats@romeo.(none)
a4e0b4e61f I had forgotten to delete an already disabled line of C++ code.
---
BUG#20265 (Replication of CREATE-SELECT does not work correctly):
Fixing bug by making binary log handle statement transactions.
The binary log transaction cache can now be truncated to remove 
events inserted during this statement or transaction. Also, the
binary log participate in XA transaction handling, although not
as a full 2pc resource.
2006-10-05 10:46:14 +02:00
brian@zim.(none)
faff46eefe Added license information display to output of plugins schema, and tagged all plugins with GPL flag. 2006-10-05 00:41:29 -07:00
msvensson@neptunus.(none)
ca21b57992 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-10-03 09:28:44 +02:00
tsmith/tim@siva.hindu.god
4c6dc3c461 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  siva.hindu.god:/usr/home/tim/m/bk/wl3516/51
2006-10-02 13:42:30 -06:00
brian@zim.(none)
46ae2113ba This patch adds handlerton passing to functions. NDB and Innodb still require a global hanlderton in the main code due to the nature of the sql_cache call back function (should be solveable... another patch).
Partitioning now has a flag to allow disabling of engines from being compatible with partitioning. Cleaned up heap naming convention on panic call.
2006-09-30 12:49:46 -07:00
tsmith/tim@siva.hindu.god
5ceadf8987 Merge siva.hindu.god:/usr/home/tim/m/bk/wl3516/50
into  siva.hindu.god:/usr/home/tim/m/bk/wl3516/51
2006-09-29 14:12:57 -06:00
tsmith/tim@siva.hindu.god
b7d0ec2422 WL #3516: MySQL Enterprise: implement Version Display Specification
Print version_comment after server version in:
mysql.cc:  Welcome message and 'status' command output
log.cc: Top of log files
2006-09-29 12:52:48 -06:00
brian@zim.(none)
4bce203fdf Merge zim.(none):/home/brian/mysql/merge-5.1
into  zim.(none):/home/brian/mysql/arch-5.1
2006-09-26 22:51:53 -07:00
brian@zim.(none)
f9a02811da Removed Field (this came in as an idea from a previous patch by Serg) 2006-09-26 21:26:04 -07:00
lars/lthalmann@dl145j.mysql.com
57a74ea4af Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-09-21 00:23:20 +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
lars/lthalmann@dl145j.mysql.com
a3adcfe52d Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-09-15 01:46:47 +02:00
guilhem@gbichot3.local
a8836b7dde Fixing problems I identified in my auto_increment work pushed in July
(as part of the auto_increment cleanup of WL#3146; let's not be
sad, that monster push still removed serious bugs):
one problem with INSERT DELAYED (unexpected interval releases),
one with stored functions (wrong auto_inc binlogging).
These bugs were not released.
2006-09-12 15:42:13 +02:00
rburnett@production.mysql.com
db89fb33aa log.cc:
Fixing failed merge
2006-09-12 04:46:41 +02:00
lars/lthalmann@dl145j.mysql.com
1dfc84986e Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-09-11 13:34:44 +02:00
rburnett@bk-internal.mysql.com
e70867872b Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
2006-09-07 04:48:29 +02:00
rburnett@production.mysql.com
926d98d973 Merge production.mysql.com:/usersnfs/rburnett/tmp_merge2
into  production.mysql.com:/usersnfs/rburnett/mysql-5.1
2006-09-06 18:27:26 +02:00
brian@zim.(none)
1ac47c9513 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into  zim.(none):/tmp/merge-5.1
2006-09-06 09:23:47 -07:00
jonas@perch.ndb.mysql.com
fe808115e9 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-09-04 14:34:42 +02:00
jonas@perch.ndb.mysql.com
0b65cbaf5f bug#21965
merge to 5.1 - yet another merge fix
2006-09-04 14:26:18 +02:00
jonas@perch.ndb.mysql.com
f4392a98eb Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/51-work
2006-09-04 14:08:15 +02:00
jonas@perch.ndb.mysql.com
7ff631e890 Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/50-work
2006-09-04 13:46:56 +02:00
jonas@perch.ndb.mysql.com
96ff8b4c52 bug#21965 - replication
fix deadlock if master switches log file in parallell with "show master logs"
2006-09-04 13:43:34 +02:00
acurtis/antony@xiphis.org/ltantony.xiphis.org
38a59efbc9 add 2 placeholder values for config and system variables. 2006-08-30 14:27:29 -07:00
holyfoot/hf@mysql.com/deer.(none)
75be244cc7 Merge mysql.com:/home/hf/work/mysql-4.1.13717
into  mysql.com:/home/hf/work/mysql-5.0-mrg
2006-08-20 20:46:26 +05:00
mats@romeo.(none)
a982db81e4 Merging with mysql-5.1-new-rpl tree 2006-08-16 15:59:41 +02:00
mats@romeo.(none)
691355b6a3 BUG#20863 (if binlog format is changed between update and unlock table, wrong binlogging):
Fix to allow the binlog format to be changed between the LOCK and
UNLOCK tables, as well as under MIXED mode.
2006-08-16 14:55:57 +02:00
petr/cps@mysql.com/owlet.
be2ce2614b Fix Bug #18559 "log tables cannot change engine, and
gets deadlocked when dropping w/ log on"

Log tables rely on concurrent insert machinery to add data.
This means that log tables are always opened and locked by
special (artificial) logger threads. Because of this, the thread
which tries to drop a log table starts to wait for the table
to be unlocked. Which will happen only if the log table is disabled.
Alike situation happens if one tries to alter a log table.
However in addition to the problem above, alter table calls
check_if_locking_is_allowed() routine for the engine. The
routine does not allow alter for the log tables. So, alter
doesn't start waiting forever for logs to be disabled, but 
returns with an error.
Another problem is that not all engines could be used for
the log tables. That's because they need concurrent insert.

In this patch we:
(1) Explicitly disallow to drop/alter a log table if it
    is currently used by the logger.
(2) Update MyISAM to support log tables
(3) Allow to drop log tables/alter log tables if log is
    disabled
At the same time we (4) Disallow to alter log tables to
unsupported engine (after this patch CSV and MyISAM are 
alowed)
Recommit with review fixes.
2006-08-03 21:28:15 +04:00
holyfoot/hf@mysql.com/deer.(none)
21f721c6f5 bug #13717 embedded library dumps warnings on STDERR directly
Here i just disabled STDERR warnings in embedded server
Later we should get more defined about logs in the embedded server
2006-08-01 15:18:21 +05:00
mkindahl@dl145k.mysql.com
9415b24139 Merge dl145k.mysql.com:/data0/mkindahl/bkroot/mysql-5.1-new-rpl
into  dl145k.mysql.com:/data0/mkindahl/bk/MERGE/mysql-5.1-merge
2006-07-11 12:17:19 +02:00
guilhem@gbichot3.local
1cc3c80070 fixes after merge. Updates to test's results.
We now reset the THD members related to auto_increment+binlog in
MYSQL_LOG::write(). This is better than in THD::cleanup_after_query(),
which was not able to distinguish between SELECT myfunc1(),myfunc2()
and INSERT INTO t SELECT myfunc1(),myfunc2() from a binlogging point
of view.
Rows_log_event::exec_event() now calls lex_start() instead of
mysql_init_query() because the latter now does too much (it resets
the binlog format).
2006-07-10 18:41:03 +02:00
guilhem@gbichot3.local
0594e1b84b WL#3146 "less locking in auto_increment":
this is a cleanup patch for our current auto_increment handling:
new names for auto_increment variables in THD, new methods to manipulate them
(see sql_class.h), some move into handler::, causing less backup/restore
work when executing substatements. 
This makes the logic hopefully clearer, less work is is needed in
mysql_insert().
By cleaning up, using different variables for different purposes (instead
of one for 3 things...), we fix those bugs, which someone may want to fix
in 5.0 too:
BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate
statement-based"
BUG#20341 "stored function inserting into one auto_increment puts bad
data in slave"
BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE"
(now if a row is updated, LAST_INSERT_ID() will return its id)
and re-fixes:
BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT"
(already fixed differently by Ramil in 4.1)
Test of documented behaviour of mysql_insert_id() (there was no test).
The behaviour changes introduced are:
- LAST_INSERT_ID() now returns "the first autogenerated auto_increment value
successfully inserted", instead of "the first autogenerated auto_increment
value if any row was successfully inserted", see auto_increment.test.
Same for mysql_insert_id(), see mysql_client_test.c.
- LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY
UPDATE, see auto_increment.test. Same for mysql_insert_id(), see
mysql_client_test.c.
- LAST_INSERT_ID() does not change if no autogenerated value was successfully 
inserted (it used to then be 0), see auto_increment.test.
- if in INSERT SELECT no autogenerated value was successfully inserted,
mysql_insert_id() now returns the id of the last inserted row (it already
did this for INSERT VALUES), see mysql_client_test.c.
- if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X
(it already did this for INSERT VALUES), see mysql_client_test.c.
- NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE,
the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID
influences not only the first row now.

Additionally, when unlocking a table we check that the thread is not keeping
a next_insert_id (as the table is unlocked that id is potentially out-of-date);
forgetting about this next_insert_id is done in a new
handler::ha_release_auto_increment().

Finally we prepare for engines capable of reserving finite-length intervals
of auto_increment values: we store such intervals in THD. The next step
(to be done by the replication team in 5.1) is to read those intervals from
THD and actually store them in the statement-based binary log. NDB
will be a good engine to test that.
2006-07-09 17:52:19 +02:00
cmiller@zippy.(none)
6110a83a0e Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
2006-07-03 11:35:58 -04:00