Commit graph

760 commits

Author SHA1 Message Date
malff/marcsql@weblab.(none)
a1b260df75 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-11733_topdown
2006-11-30 18:48:16 -07:00
malff/marcsql@weblab.(none)
e1bdc140d1 WL#3602
Post review changes
the --read-only option is not enforced for the slave thread in replication, or for the SUPER user.
2006-11-30 18:43:33 -07:00
monty@mysql.com/narttu.mysql.fi
3d40956039 Fixed portability issue in my_thr_init.c (was added in my last push)
Fixed compiler warnings (detected by VC++):
- Removed not used variables
- Added casts
- Fixed wrong assignments to bool
- Fixed wrong calls with bool arguments
- Added missing argument to store(longlong), which caused wrong store method to be called.
2006-11-30 18:25:05 +02: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
msvensson@neptunus.(none)
b5603af7d5 Merge 192.168.0.5:mysql/mysql-5.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-11-29 23:53:07 +01:00
msvensson@neptunus.(none)
298edec4c1 Merge neptunus.(none):/home/msvensson/mysql/bug19731/my51-bug19731
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
2006-11-29 23:09:57 +01:00
msvensson@neptunus.(none)
d3090cc3fe Merge neptunus.(none):/home/msvensson/mysql/bug19731/my50-bug19731
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-29 23:08:35 +01:00
msvensson@neptunus.(none)
a50f80636c Merge neptunus.(none):/home/msvensson/mysql/bug19731/my50-bug19731
into  neptunus.(none):/home/msvensson/mysql/bug19731/my51-bug19731
2006-11-29 23:05:33 +01:00
gkodinov@dl145s.mysql.com
32c9e11df9 Merge bk-internal:/home/bk/mysql-5.1
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
2006-11-28 17:14:16 +01:00
gkodinov@dl145s.mysql.com
e74c9add47 Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-11-27 16:25:52 +01: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
monty@nosik.monty.fi
89570bf966 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2006-11-22 14:11:36 +02:00
malff/marcsql@weblab.(none)
070f5ad497 WL#3602 (SET GLOBAL READONLY)
Bug#11733 (COMMITs should not happen if read-only is set)
Bug#22009 (Can write to a read-only server under some circumstances)

See the work log for details

The change consist of
a) acquiring the global read lock in SET GLOBAL READONLY
b) honoring opt_readonly in ha_commit_trans(),
c) honoring opt_readonly in mysql_lock_tables().

a) takes care of the server stability,
b) makes the transactional tables safe (Bug 11733)
c) makes the non transactional tables safe (Bug 22009)
2006-11-20 20:40:35 -07:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
holyfoot/hf@deer.(none)
7d190dd6b1 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/mysql-5.1-mrg
2006-11-17 19:01:35 +04:00
holyfoot/hf@mysql.com/deer.(none)
e95e23b0f3 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-0mrg
2006-11-17 10:30:16 +04: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
msvensson@neptunus.(none)
4c26bf9c1d Bug#19371 VARBINARY() have trailing zeros after upgrade from 4.1
- Detect if a table has field of type MYSQL_TYPE_VAR_STRING while running
   "CHECK TABLE t FOR UPGRADE" and indicate it need to be fixed
   with "REPAIR TABLE t".
 - When running a "REPAIR TABLE t" or "ALTER TABLE t FORCE" on the above
   table, install a special copy function to trim off the trailing spaces
   which we safely can say that the pre 5.0 mysqld didn't put there.
2006-11-09 12:00:27 +01:00
anozdrin/alik@alik.
9421205b49 Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt
2006-11-08 22:20:58 +03: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
baker@bk-internal.mysql.com
079506b5a0 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
2006-11-07 06:59:51 +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
baker@bk-internal.mysql.com
5214ed48e7 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
2006-11-02 08:35:55 +01:00
kostja@bodhi.local
965669d1f9 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-11-02 03:24:11 +03:00
monty@nosik.monty.fi
d745fe49fe Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-11-01 19:46:23 +02: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
holyfoot/hf@deer.(none)
f8d4202c56 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/21790/my51-21790
2006-11-01 16:51:49 +04:00
holyfoot/hf@deer.(none)
28d610dfec Merge mysql.com:/home/hf/work/21790/my50-21790
into  mysql.com:/home/hf/work/21790/my51-21790
2006-11-01 16:44:00 +04:00
mats@romeo.(none)
83f8e17258 BUG#18581 (Creation of system tables recorded in binlog causing slave failure):
Not replicating the mysql database *at all* any more. All changes to
mysql tables are replicated by replicating the statements that do
the changes.
2006-11-01 09:49:03 +01:00
brian@zim.(none)
31e47a9511 Adding in an ha_end() call. This is the first part of the patch I and Monty have agreed on. In the future engines will have the option of shutting down more quickly via the panic call, or just shutting down during the unloading of a plugin. 2006-10-31 20:10:32 -08:00
mskold/marty@mysql.com/linux.site
bf365af0bd Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings 2006-10-25 15:34:47 +02:00
mskold/marty@mysql.com/linux.site
0dea24947d Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-10-25 12:21:45 +02:00
mskold/marty@mysql.com/linux.site
44e55e3b43 Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings 2006-10-25 11:44:40 +02: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
mskold/marty@mysql.com/linux.site
a1b40c1679 Bug #21072 Duplicate key error in NDB references wrong key: use MAX_KEY to signal unknown key: Added string initialization 2006-10-19 15:22:50 +02:00
mskold/marty@mysql.com/linux.site
b97dff67c9 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-10-19 15:00:46 +02:00
mskold/marty@mysql.com/linux.site
240cd87dbf Bug #21072 Duplicate key error in NDB references wrong key: use MAX_KEY to signal unknown key: Added string initialization 2006-10-19 14:57:04 +02:00
mskold/marty@mysql.com/linux.site
18d2e733d8 Bug #21072 Duplicate key error in NDB references wrong key: Added new printout for duplicate key error when key is unknown 2006-10-16 12:14:38 +02:00
mskold/marty@mysql.com/linux.site
e7f69b424a Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-10-16 10:07:19 +02: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
brian@zim.(none)
5c4a6807c1 Panic was being called twice!
Both on its own and in the plugin shutdown.... not so good. The code is a bit simpler, and we could now technically remove the panic all entirely if we wanted to.
2006-10-11 18:02:12 -07:00
holyfoot/hf@mysql.com/deer.(none)
e1f31863ab bug #21790 (UNKNOWN ERROR message in geometry)
We issued UNKNOWN ERROR initially in this place and forgot to
fix it when we implemented informative error message for this
2006-10-01 16:36:26 +05:00
brian@zim.(none)
56505c01f9 This patch updates to remove most global hton needs. Cleans up wrong message in partition. 2006-09-30 18:31:13 -07: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
brian@zim.(none)
a756fd36ef This removes the passing of global hton to engine instance. 2006-09-29 17:19:02 -07:00
mskold/marty@mysql.com/linux.site
c854ecebf9 Bug #21072 Duplicate key error in NDB references wrong key: wrong indent for code block 2006-09-21 16:54:54 +02:00
mskold/marty@mysql.com/linux.site
42d64e4275 Bug #21072 Duplicate key error in NDB references wrong key: use MAX_KEY to signal unknown key 2006-09-21 16:49:07 +02:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
844df8f085 post merge fixes 2006-09-18 15:52:16 -07:00
acurtis/antony@ltamd64.xiphis.org
424857e0e4 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/engines-merge
2006-09-18 12:16:03 -07:00
svoj@april.(none)
419a51c5a5 Merge april.(none):/home/svoj/devel/bk/mysql-5.1
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.1-engines
2006-09-18 19:43:33 +05: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
istruewing@chilla.local
22d8c89d6e Merge chilla.local:/home/mydev/mysql-5.1--main
into  chilla.local:/home/mydev/mysql-5.1-toteam
2006-09-14 21:44:17 +02:00
svoj@april.(none)
8dba18f742 After merge fix. 2006-09-12 21:38:57 +05:00
svoj@april.(none)
a59d7a2c78 Merge april.(none):/home/svoj/devel/bk/mysql-5.0-engines
into  april.(none):/home/svoj/devel/mysql/BUG20256/mysql-5.0-push
2006-09-12 18:53:51 +05:00
svoj@april.(none)
6e13c29717 Merge april.(none):/home/svoj/devel/mysql/BUG20256/mysql-5.0-engines
into  april.(none):/home/svoj/devel/mysql/BUG20256/mysql-5.1-engines
2006-09-12 18:42:10 +05:00
svoj@april.(none)
44f167ee1d BUG#20256 - LOCK WRITE - MyISAM
Only MyISAM tables locked with LOCK TABLES ... WRITE were affected.

A query that is optimized with index_merge doesn't reflect rows
inserted within LOCK TABLES.

MyISAM doesn't flush a state within LOCK TABLES. index_merge
optimization creates a copy of the handler, which thus gets
outdated MyISAM state.

New handler->clone() method is introduced to fix this problem.
For non-MyISAM storage engines it allocates a handler and opens
it with ha_open(). For MyISAM it additionally copies MyISAM state
pointer to cloned handler.
2006-09-12 18:25:35 +05:00
msvensson@shellback.(none)
e03a0617a0 Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-09-08 16:01:51 +02:00
msvensson@shellback.(none)
31df5d1d0d Merge bk-internal:/home/bk/mysql-5.1-new-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-08-31 10:33:35 +02:00
acurtis/antony@xiphis.org/ltantony.xiphis.org
678e15174e Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max"
  Strict mode should fail if autoincrement value is out of range
2006-08-30 13:20:39 -07:00
brian@zim.(none)
7ae3682dc8 This pulls two function calls which should have been handlerton calls out of handler.cc. 2006-08-30 12:28:25 -07:00
brian@zim.(none)
5c3ac45ca4 Re'ordering of startup. Fixed Execution path issues. Added function for de'initing everything. This includes Antony's suggestions (bk collapse uber alles!) 2006-08-29 11:58:12 -07:00
brian@zim.(none)
7216b5bc7a Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into  zim.(none):/home/brian/mysql/arch-5.1
2006-08-25 14:07:30 -07:00
brian@zim.(none)
e831273902 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-arch
into  zim.(none):/home/brian/mysql/arch-5.1
2006-08-25 13:32:06 -07:00
brian@zim.(none)
baa914e66d 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.
2006-08-25 13:31:15 -07:00
acurtis/antony@xiphis.org/ltantony.xiphis.org
b68f0437e7 fix for windows build 2006-08-24 22:10:55 -07:00
msvensson@shellback.(none)
92f908dcae Fix VC 2005 compile problem 2006-08-23 15:41:52 +02:00
petr/cps@owlet.local
2763504be4 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
2006-08-23 16:48:39 +04:00
brian@zim.(none)
b518763728 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.
2006-08-22 16:24:12 -07:00
brian@zim.(none)
f68ce0ddef This changeset moves the ha_myisam files to their storage directories. It also includes updates for all engines include patch for windows builds. 2006-08-19 17:38:42 -07:00
brian@zim.(none)
800e348740 Update to push all of merge into the merge storage directory. 2006-08-19 10:23:22 -07:00
brian@zim.(none)
849fac1496 Moved heap into its own directory. 2006-08-19 08:02:52 -07:00
andrey@example.com
081b865936 Cleanup patch.
There is an existing macros for initializing LEX_STRINGs
with constant strings -> C_STRING_WITH_LEN. Change existing code to use it.
(char *) STRING_WITH_LEN -> C_STRING_WITH_LEN
2006-08-17 18:13:45 +02:00
brian@zim.(none)
e8289bfbc1 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new-maint
into  zim.(none):/home/brian/mysql/remove-bdb-5.1
2006-08-10 13:44:04 -07:00
brian@zim.(none)
65e9ae97b0 This is the second patch for bdb removeal. This takes care of all options and variables that rely on bdb. 2006-08-10 01:50:37 -07:00
kroki/tomash@moonlight.intranet
e79876362e Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-rt-merge
2006-08-09 16:42:21 +04:00
patg@govinda.patg.net
8d1e5a5bb1 Merge govinda.patg.net:/home/patg/mysql-build/mysql-5.0-holyfoot
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.1-5.0-merge2

Push by holyfoot@production.mysql.com on Tue Jul 25 13:41:40 2006:

bk clone -l -r'holyfoot/hf@mysql.com/deer.(none)|ChangeSet|20060725085017|41021' mysql-5.0 tmp_merge
2006-08-08 09:01:32 -07: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
acurtis/antony@xiphis.org/ltantony.xiphis.org
95197805e2 Merge bk://anubis/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/merge/mysql-5.0
2006-07-21 10:14:25 -07:00
tsmith/tim@siva.hindu.god
24f96519de Finish the merge of the patch for bug #15195 from 4.1 -> 5.0
- Adapt it to work with the handlerton class
2006-07-20 13:41:00 -06:00
jimw@rama.(none)
8b91a02728 Merge bk-internal:/home/bk/mysql-5.0-engines
into  rama.(none):/home/jimw/my/mysql-5.0-17608
2006-07-18 10:25:04 -07:00
ramil/ram@mysql.com/myoffice.izhnet.ru
b57efe738a --{skip-}merge option added which allows the user to disable merge engine and
to avoid the potential security problem.
(see bug #15195: Security Breach with MERGE table)
2006-07-14 16:26:58 +05:00
jimw@rama.(none)
005c2a05d4 Bug #17766: The server accepts to create MERGE tables which cannot work
Changed the error reporting (and a crash) when inserting data into a
 MERGE table that has no underlying tables or no INSERT_METHOD specified
 by reporting that it is read-only.
2006-07-11 17:28:50 -07: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
guilhem@gbichot3.local
dd84ef1b8a Merge gbichot3.local:/home/mysql_src/mysql-5.0-20524
into  gbichot3.local:/home/mysql_src/mysql-5.0
2006-07-06 14:42:47 +02:00
guilhem@mysql.com
140b488c96 Fix for BUG#20524 "auto_increment_* not observed when inserting
a too large value": the bug was that if MySQL generated a value for an
auto_increment column, based on auto_increment_* variables, and this value
was bigger than the column's max possible value, then that max possible
value was inserted (after issuing a warning). But this didn't honour
auto_increment_* variables (and so could cause conflicts in a master-master
replication where one master is supposed to generated only even numbers,
and the other only odd numbers), so now we "round down" this max possible
value to honour auto_increment_* variables, before inserting it.
2006-07-06 14:37:09 +02:00
guilhem@mysql.com
a43c4b0265 Fix for BUG#20188 "REPLACE or ON DUPLICATE KEY UPDATE in
auto_increment breaks binlog":
if slave's table had a higher auto_increment counter than master's (even
though all rows of the two tables were identical), then in some cases,
REPLACE and INSERT ON DUPLICATE KEY UPDATE failed to replicate
statement-based (it inserted different values on slave from on master).
write_record() contained a "thd->next_insert_id=0" to force an adjustment
of thd->next_insert_id after the update or replacement. But it is this
assigment introduced indeterminism of the statement on the slave, thus
the bug. For ON DUPLICATE, we replace that assignment by a call to
handler::adjust_next_insert_id_after_explicit_value() which is deterministic
(does not depend on slave table's autoinc counter). For REPLACE, this
assignment can simply be removed (as REPLACE can't insert a number larger
than thd->next_insert_id).
We also move a too early restore_auto_increment() down to when we really know
that we can restore the value.
2006-07-05 14:41:35 +02:00
monty@mysql.com
7ec5a7ecc5 Fixed memory leak (found by rpl_row_inexist_tbl) 2006-06-23 10:35:45 +03:00
monty@narttu.mysql.fi
a168d1396c Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-06-23 03:03:03 +03:00
monty@mysql.com
4697deb436 Remove compiler warnings
Fixed wrong table flags type in ndbcluster that caused previous commit to fail
2006-06-23 02:49:19 +03:00
monty@mysql.com
649157954b Fixed failure with rpl_truncate_7ndb.test when using statement based replication.
is_injective -> table_flag() HA_HAS_OWN_BINLOGGING
(Faster and easier to understand)
Allow cluster_binlogging also in mixed replication mode.
2006-06-22 22:44:21 +03:00
mats@mysql.com
3b830e4b9f Patch to handle some bad situations resulting from the fix for BUG#19995. 2006-06-22 13:28:04 +02:00
lars@mysql.com
b6b23c1037 After merge fixes 2006-06-16 02:52:17 +02:00
lars@mysql.com
5f37fc4a76 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
2006-06-16 01:15:19 +02:00
mats@mysql.com
cf46736746 Fixing code to avoid compile problem on Solaris (aCC). 2006-06-15 10:11:50 +02:00
acurtis@xiphis.org
62729fcdfe Bug#20168
"Change in behavior --default-storage-engine=ndb or ndbcluster"
  Reduce use of legacy_db_type, some code cleanup
  (serg read my mind and implemented desired mysqld.cc changes)
2006-06-12 06:50:11 -07:00
monty@mysql.com
63ed470566 Manually reapplied msvenssons changes to new BK tree:
Add definition of YASSL_PREFIX to Cmake file
Change "and" to "&&"
Remove the "static" directive SunCC can't use the function
2006-06-06 13:40:15 +03:00
monty@mysql.com
430347f126 After merge fixes
Remove compiler warnings
2006-06-05 06:16:08 +03:00
monty@mysql.com
c46fb742b8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-06-04 21:05:22 +03:00
monty@mysql.com
74cc73d461 This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.
2006-06-04 18:52:22 +03:00
guilhem@mysql.com
7921811e1f Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/mysql_src/mysql-5.1-new-WL3146-handler
2006-06-02 22:22:59 +02:00
guilhem@mysql.com
a4e778f34d First push for WL#3146 "less locking in auto_increment". It is a 0-real-change patch.
New prototype for get_auto_increment() (but new arguments not yet used), to be able
to reserve a finite interval of auto_increment values from cooperating engines.
A hint on how many values to reserve is found in handler::estimation_rows_to_insert,
filled by ha_start_bulk_insert(), new wrapper around start_bulk_insert().
NOTE: this patch changes nothing, for all engines. But it makes the API ready for those
engines which will want to do reservation.
More csets will come to complete WL#3146.
2006-06-02 22:21:32 +02:00
mats@mysql.com
7e381404b0 Bug#19995 (Extreneous table maps generated for statements that does not generate rows):
Comment change.
2006-06-02 15:47:06 +02:00
bell@sanja.is.com.ua
364c53101d Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-5.1
2006-06-01 23:25:23 +03:00
bell@sanja.is.com.ua
60b738b62b interface for transaction log management added to handlerton
iterators creation interface added to handlerton
2006-06-01 21:47:15 +03:00
mats@mysql.com
4092292c90 Bug#19995 (Extreneous table maps generated for statements that do not generate rows):
Switched to writing out table maps for tables that are locked when
the first row in a statement is seen.
2006-05-31 19:21:52 +02:00
serg@sergbook.mysql.com
2e16f1eccc after review fixes 2006-05-31 18:07:32 +02:00
serg@sergbook.mysql.com
71657322fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.1
2006-05-28 14:54:28 +02:00
serg@sergbook.mysql.com
fe97dbb587 handlerton cleanup:
duplicate fields removed, st_mysql_storage_engine added to support
run-time handlerton initialization (no compiler warnings), handler API
is now tied to MySQL version, handlerton->plugin mapping added
(slot-based), dummy default_hton removed, plugin-type-specific
initialization generalized, built-in plugins are now initialized too,
--default-storage-engine no longer needs a list of storage engines
in handle_options().

mysql-test-run.pl bugfixes
2006-05-28 14:51:01 +02:00
holyfoot@deer.(none)
034508f6ca bug #14573 (Error on adding auto_increment on to a column with '0' values) 2006-05-12 18:02:42 +05:00
monty@mysql.com
8c7783c1e0 Don't use row level logging on optimize or repair table.
(Fixes core dump in rpl_failed_optimize.test)
Ensure we end active transcations if we do an admin command (like optimize, repair etc)
2006-05-05 20:08:40 +03:00
monty@mysql.com
8f6ed291a7 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-05-04 01:58:21 +03:00
monty@mysql.com
d689f2fa70 Cleanups after review of WL#602
Fixed warnings from test suite
Some fixes in mysql-test-run script to catch more warnings
2006-05-03 19:40:52 +03:00
monty@mysql.com
343644dd5d Added support for key_block_size for key and table level (WL#602)
Added support for key_block_size to MyISAM.
Simplify interface to 'new Key' to make it easier to add new key options.
mysqld option --new is used to define where key options are printed.
(In 5.3 we should move all key options to after key part definition to avoid problem with reserved names)
Fixed some compiler warnings and a memory leak in ssl
2006-05-03 15:59:17 +03:00
acurtis@xiphis.org
35166137f0 WL#3201
Fixes after first review
2006-04-20 10:03:15 -07:00
acurtis@xiphis.org
4e11a4d941 WL#3201
" Configure support for server plugins "
2006-04-13 13:49:29 -07:00
grog@mysql.com[grog]
3eb783813f foo2 2006-04-13 17:22:56 +09:30
grog@mysql.com[grog]
b2cd3a963a foo1 2006-04-13 17:20:33 +09:30
mats@mysql.com
e31aacc158 Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/b18436-mysql-5.1-new
2006-03-31 13:34:30 +02:00
monty@mysql.com
c3e7c7aa4b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-03-29 17:28:40 +03:00
monty@mysql.com
1994ed49ec Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.

Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
2006-03-29 14:27:36 +03:00
msvensson@shellback.
1d30dfdc00 Remove unused variable 2006-03-28 19:34:44 +02:00
brian@zim.(none)
f940472d5a Fix to remove engine dependency from handler.cc file, the last one for functions. 2006-03-26 01:32:52 -08:00
mats@mysql.com
2afb356b5c Bug#18436 (RBR: Replication to partition engine triggers assertion on slave side):
Partial fix for resolving the problem. Swapping contents of record[0]
and record[1] since this is what some storage engines expect.
2006-03-23 20:13:44 +01:00
brian@zim.(none)
bdfb7180ca Refactored some code to remove ifdef and removed dead code related to un-useable sync code. 2006-03-23 05:51:31 -08:00
mats@mysql.com
4440b71dda Bug#18280 (RBR: Extreneous maps when writing to general_log and slow_log):
Filter out replication general_log and slow_log entirely from binary
log. Caching result of table share-specific tests.
2006-03-17 18:11:07 +01:00
lars@mysql.com
418a8656d9 Fix to not replicate mysql.event table
Test fixes
2006-03-09 15:59:29 +01:00
mats@mysql.com
0ffd1be87d WL#3023 (RBR: Use locks in a statement-like manner):
More adaptions to make it work with existing code base.
2006-03-03 09:49:46 +01:00
mats@mysql.com
1e66bc0d16 Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new
2006-02-28 10:06:58 +01:00
guilhem@mysql.com
0071749595 WL#2977 and WL#2712 global and session-level variable to set the binlog format (row/statement),
and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
TEMPORARY TABLE was not binlogged so temp table is not known on slave),  or if NDB is enabled (because
NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
including in prepared statements and in stored procedures and functions.
Caveats:
a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
b) for the same reason, changing the thread's binlog format inside a stored function is
refused with an error message.
c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
Dmitri).
Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
(not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
phantom protection).
Plus fixes for compiler warnings.
2006-02-25 22:21:03 +01:00
mats@mysql.com
13a61982a9 Merge mysqldev@production.mysql.com:my/mysql-5.1-release
into  mysql.com:/home/bk/w3023-mysql-5.1-new
2006-02-24 16:31:38 +01:00
holyfoot@deer.(none)
942503927a WL#2645 (CHECK FOR UPGRADE)
5.1-related fixes
2006-02-17 13:37:37 +04:00
holyfoot@mysql.com
be02944df6 Merging 5.0->5.1 2006-02-17 11:26:03 +04:00
holyfoot@deer.(none)
053d90a234 WL#2645 (CHECK TABLE FOR UPGRADE)
necessary implementation in the server
mysql_upgrade script added
2006-02-17 10:52:32 +04:00
mats@mysql.com
43bc3c4068 Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new
2006-02-16 08:46:45 +01:00
mats@mysql.com
2884408c75 WL#3023 (Use locks in a statement-like manner):
Table maps are now written on aquiring locks to tables and released
  at the end of each logical statement.
2006-02-16 08:30:53 +01:00
ingo@mysql.com
b9bc1e9108 Merge mysql.com:/home/mydev/mysql-5.1
into  mysql.com:/home/mydev/mysql-5.1-wl1563-msg
2006-02-10 20:00:22 +01:00
aivanov@mysql.com
f8f8af970e Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/alexi/innodb/mysql-5.1-merged
2006-02-10 01:15:45 +03:00
aivanov@mysql.com
e22d2f1150 Fixed BUG#9680: Wrong error from cascading update
Applied 9680.patch (by Osku Salerma)
2006-02-09 20:43:10 +03: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
ingo@mysql.com
8906937757 Merge mysql.com:/home/mydev/mysql-5.1
into  mysql.com:/home/mydev/mysql-5.1-wl1563-msg
2006-02-03 17:57:23 +01:00
mats@mysql.com
5f7956094c WL#3023 (RBR: Use locks in a statment-like manner):
Interface changes pushed early.
  Separation of public and implementation interface for external_lock()
  in preparation for implementation.
2006-01-26 09:25:37 +01:00
ingo@mysql.com
b6e28c99d0 WL#1563 - Modify MySQL to support fast CREATE/DROP INDEX
Change "duplicate key" message to print key name
instead of key number.
2006-01-23 12:17:05 +01:00
cps@outpost.site
c08d4aa703 Fix the tree: plugin-related changes, necessary for
CSV storage engine to be statically compiled.
Derived from antony's patch.
2006-01-20 00:40:56 +03:00
mikron@c-1e0be253.1238-1-64736c10.cust.bredbandsbolaget.se
e802a94284 WL #2604: Partition Management
Optimised version of ADD/DROP/REORGANIZE partitions for
non-NDB storage engines.
New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
Quite a few bug fixes
2006-01-17 08:40:00 +01:00
knielsen@mysql.com
ae9c76b9cb Solaris compile fixes. 2006-01-14 11:06:44 +01:00
tomas@poseidon.ndb.mysql.com
e648a8fe52 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  poseidon.ndb.mysql.com:/home/tomas/v7
2006-01-13 03:17:09 +01:00
tomas@poseidon.ndb.mysql.com
4b731ddfb4 wl2325 wl2324 2006-01-12 19:51:02 +01:00
ingo@mysql.com
16437321cb WL#1563 - Modify MySQL to support fast CREATE/DROP INDEX
NDB cluster is not fully supported. This will be added with
WL 1892 (NDB Handler: Add support for CREATE/DROP INDEX).
Some preparatory code for this is already present though.
A change for the "duplicate key" error message is planned
for another changeset.
2006-01-12 10:05:07 +01:00
gluh@eagle.intranet.mysql.r18.ru
be4ebd9038 WL#2506: Information Schema tables for PARTITIONing
added I_S 'PARTITIONS' table
2006-01-10 19:44:04 +04:00
knielsen@mysql.com
848383feb8 Fix template problem with Sun compiler by using anonymous namespace instead
of static for referenged function.
2006-01-09 11:08:23 +01:00
serg@serg.mylan
923e7cfd73 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into serg.mylan:/usr/home/serg/Abk/mysql-5.1
2006-01-07 14:50:03 +01:00
jimw@mysql.com
96ae7c2e78 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-01-06 10:42:58 -08:00
jimw@mysql.com
d8a4aafe33 Merge mysql.com:/home/jimw/my/mysql-5.0-14212
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-01-06 08:34:55 -08:00
joerg@mysql.com
4a0fe7348a Compile fix: An "int" function had accidentally lost its "return 0;", re-add it. 2006-01-06 12:21:15 +01:00
jimw@mysql.com
7d551b8a4e Merge mysql.com:/home/jimw/my/mysql-5.0-15185
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-01-05 10:27:06 -08:00
mats@mysql.com
d2277ec43d Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/b15942-mysql-5.1-new
2006-01-04 13:57:02 +01:00
serg@serg.mylan
533b18c8f9 cleanup of SHOW STATUS code, as a preparation for WL#2935
(MySQL plugin interface: status variables)

adding SHOW_FUNC, removing SHOW_some_specific_value,
only generic SHOW_LONG/SHOW_CHAR/etc are recognized.
changing to use SHOW_FUNC instead of ha_update_statistics
2006-01-02 15:41:13 +01:00
bar@mysql.com
6ff211329f WL#1324 table name to file name encoding
- Encoding itself, implemented as a charset
  "filename". Originally planned to use '.'
  as an escape character, but now changed to '@'
  for two reasons: "ls" does not return
  file names starting with '.' considering them
  as a kind of hidden files; some platforms
  do not allow several dots in a file name.
- replacing many calls of my_snprintf() and
  strnxmov() to the new build_table_filename().
- Adding MY_APPEND_EXT mysys flag, to append
  an extention rather that replace it.
- Replacing all numeric constants in fn_format
  flag arguments to their mysys definitions, e.g.
  MY_UNPACK_FILENAME,
- Predictability in several function/methods:
  when a table name can appear with or withot .frm
  extension. Some functions/methods were changed
  so accept names strictly with .frm, other - strictly
  without .frm extensions. Several DBUG_ASSERTs were
  added to check whether an extension is passed.
Many files:
  table name to file name encoding
mysql_priv.h:
  Prototypes for new table name encoding tools.
ctype-utf8.c:
  Implementing "filename" charset for
  table name to file name encoding.
row0mysql.c:
  Fixing table name prefix.
mf_format.c:
  Adding MY_APPEND_EXT processing.
Many files:
  Fixing tests.
my_sys.h:
  Adding new flag to append rather than replace an extension.
m_ctype.h:
  Adding "filename" charset definition.
2005-12-31 09:01:26 +04:00
mats@mysql.com
3440170618 Bug#15942 (RBR ignored --binlog_ignore_db and tries to map table on slave for writes):
Added code to do the filtering (seems to have gone away).
2005-12-27 12:06:48 +01:00
serg@serg.mylan
d5d6b51422 remove "defined(HAVE_ARCHIVE_DB) && !defined(__NETWARE__)" unmaintainably scattered all over the source 2005-12-24 14:32:50 +01:00
lars@mysql.com
ad126d90e0 WL#1012: All changes as one single changeset.
This includes both code and test cases.
2005-12-22 06:39:02 +01:00
acurtis@xiphis.org
9e3a6897c9 plugin version changes 2005-12-21 12:50:50 -08:00
acurtis@xiphis.org
13a776778c Finalize storage engine plugins
Give BerkeleyDB savepoints
Remove "enum db_type" from most of the code
2005-12-21 10:18:40 -08:00
jimw@mysql.com
5bb966a9b6 Fix crash when trying to open table using a disabled storage engine. (Bug #15185) 2005-12-14 15:01:02 -08:00
jani@a193-229-222-105.elisa-laajakaista.fi
b7c52afb57 Disabled archive db for Netware. 2005-12-14 02:08:48 +02:00
jimw@mysql.com
d07a57c03a Fix crash in BDB from improper cleanup of transactions, and avoid problem
in NDB that the fix would cause due to improper registration of a transaction
that isn't meant to be seen by the handler layer. (Bug #14212)

Thanks to Sergei Golubchik for helping with this.
2005-12-09 15:00:33 -08:00
monty@mysql.com
b0aecee8af Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC
2005-11-24 06:23:51 +02:00
monty@mysql.com
1502692322 Added bitmap_buffer_size()
Removed valgrind warnings when using not aligned bitmap buffer size
Added setting of thread_stack
2005-11-24 06:15:35 +02:00
monty@mysql.com
4575a662cb Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC
2005-11-23 22:58:53 +02:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
5273071265 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
2005-11-23 14:57:00 +02:00
bell@sanja.is.com.ua
7f162c7899 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
2005-11-21 21:15:48 +02:00
msvensson@neptunus.(none)
9301123eb3 Bug #14514 Creating table with packed key fails silently
- Backport from 5.0
2005-11-21 12:27:58 +01:00
bell@sanja.is.com.ua
806f9e24ff Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
2005-11-20 20:47:07 +02:00
dlenev@mysql.com
d1eb512948 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg13825
2005-11-19 15:11:57 +03:00
dlenev@mysql.com
574e711209 Fix for bug #13825 "Triggers: crash if release savepoint" and for general
handling of savepoints in stored routines.

Fixed ha_rollback_to_savepoint()/ha_savepoint()/ha_release_savepoint()
functions to properly handle savepoints inside of stored functions and
triggers.
Also now when we invoke stored function or trigger we create new savepoint
level. We destroy it at the end of function/trigger execution and return back
to old savepoint level.
2005-11-19 15:09:23 +03:00
acurtis@poseidon.ndb.mysql.com
c01a3b5e5f Make storage engines "pluggable", handlerton work 2005-11-07 16:25:06 +01:00
ramil@ndbmaster.mysql.com
7678149864 WL #528: Faster free_tmp_table 2005-11-06 08:29:03 +01:00
monty@mysql.com
cdf64f0f57 Fix of crashed 5.1 tree (wrong merge + wrong pullout patch forced us to create a new 5.1 tree)
This is a merge of 5.0 -> 5.1 + some code from old 5.1 tree to get all tests to work and keep the .frm format the same as the old 5.1 tree.
2005-11-05 13:20:35 +02:00
monty@mysql.com
a6f5375cb0 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2005-11-05 01:32:55 +02:00
konstantin@mysql.com
d702915356 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-14210
2005-11-03 15:24:55 +03:00
konstantin@mysql.com
7e3f757f2d A fix and a test case for Bug#14210 "Simple query with > operator on
large table gives server crash": make sure that when a MyISAM temporary
table is created for a cursor, it's created in its memory root,
not the memory root of the current query.
2005-11-03 14:20:13 +03:00
msvensson@neptunus.(none)
8e7dfad543 BUG#14514 Creating table with packed key fails silently 2005-11-02 15:53:04 +01:00
monty@mysql.com
49a30ef513 Fixes during review of new pushed code 2005-10-13 19:40:46 +03:00
monty@mysql.com
5513ab69b7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-12 00:59:52 +03:00
monty@mysql.com
f5fdf3e87a Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
2005-10-12 00:58:22 +03:00
svoj@mysql.com
eb8ab30046 Store and read engine type string in extra block of .frm. 2005-10-10 23:01:45 +05:00
tomas@poseidon.ndb.mysql.com
620b7bafb0 Merge 2005-10-06 10:54:07 +02:00
brian@zim.(none)
2a42afd132 Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers.
May changes were to simplify storage engine setup and support for legacy call to show storage engines.
2005-10-03 18:42:30 -07:00
brian@zim.(none)
0ba8ca2a17 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/fix-5.0
2005-10-02 20:13:18 -07:00
brian@zim.(none)
54a958993c Next big patch for loadable storage engines!
Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail.
2005-10-02 19:44:28 -07:00
eric@mysql.com
5008a5f208 Move handler specific options into handlerton flag check
BUG#13108
2005-09-30 16:26:48 -07:00
brian@zim.(none)
da101b3b5a Moving archive from example to sql. 2005-09-28 19:04:51 -07:00
serg@serg.mylan
e9d8f0940b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-09-24 21:45:30 +02:00
osku@127.(none)
d61708d1c9 Fix bug #3443, better foreign key error messsages. 2005-09-23 16:22:27 +03:00
serg@serg.mylan
d4eaa0ecc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-09-23 14:36:38 +02:00
brian@zim.(none)
f5c00b0dbd Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/fix-5.0
2005-09-22 19:46:16 -07:00
brian@zim.(none)
8eea3e5be0 This fixed bug 13369. Note, I dislike goto's as well.
The alias structure now is a bit more simple and just uses a pointer to replace with the currect name. The giant case statement should go away in the next patch.
2005-09-22 16:58:09 -07:00
konstantin@mysql.com
2d4c54ba1b Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-09-23 00:46:59 +04:00
serg@serg.mylan
40c43365c5 fixed a memory leak in ha_tina.cc 2005-09-22 16:05:05 +02:00
konstantin@mysql.com
6f8d3c4844 A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc
2005-09-22 02:11:21 +04:00
brian@zim.(none)
e3c87e16ae Fixed a typo in handler.cc if CSV was built. I also added CSV to the default MAX builds so that more people test it. 2005-09-20 15:26:10 -07:00
brian@zim.(none)
c10323fdf2 Cleanups for storage engine patch. Changed two test results to now reflect the changes in storage engines and a couple of comment changes in the code. 2005-09-19 22:08:22 -07:00
brian@zim.(none)
616c324436 Cleanup for handlerton structure to allow for loadable engine work. This is the first in a series of patches. 2005-09-19 12:06:23 -07:00
msvensson@neptunus.(none)
fb63290635 Merge neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my51-bug10713_new
2005-09-14 09:43:56 +02:00
monty@mishka.mysql.fi
f348f62cc3 Added option --valgrind-mysqltest to mysql-test-run
Added flag to Field::store(longlong) to specify if value is unsigned.
This fixes bug #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
Fixed warning from valgrind in CREATE ... SELECT
Fixed double free of mysql.options if reconnect failed
2005-09-14 01:41:44 +03:00
ndbdev@dl145b.mysql.com
46cc62e216 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-09-09 15:26:47 +02:00
serg@serg.mylan
c8ae9f964e don't crash when in XA PREPARE not all storage engines are 2pc-capable 2005-09-07 18:03:07 +02:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
02056f8e3a Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-25 13:11:38 -04:00
monty@mishka.local
f16c7b3c5c After merge fixes 2005-08-25 09:38:06 +03:00
serg@sergbook.mysql.com
f5ff607c14 BUG#12162 - one can start two transactions with the same XID.
Now we keep all active XID's in a hash
2005-08-12 21:15:01 +02:00
serg@serg.mylan
0952c3ea53 void handler::print_error(): cleanup 2005-08-08 20:35:51 +02:00
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
69acde961f Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-05 18:01:34 -04:00
sergefp@mysql.com
de02193bdd Added Non-prelocked SP execution: Now a PROCEDURE doesn't enter/leave prelocked mode for
its body, but lets each statement to get/release its own locks. This allows a broader set
of statements to be executed inside PROCEDUREs (but breaks replication)
This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126
2005-07-30 08:19:57 +00:00
ndbdev@dl145b.mysql.com
f4fe2c3b71 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-07-21 08:06:26 +02:00
pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se
6026054ead Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into  c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
2005-07-21 01:29:57 -04:00
tomas@poseidon.ndb.mysql.com
6ca09e8b8f Bug #12055 NDB temp tables created by ALTER TABLE are usable
- do not discover temporary files and make them visible
2005-07-20 18:40:55 +02:00
tulin@dl145b.mysql.com
a6c21a0791 merge 2005-07-19 21:56:10 +02:00
konstantin@mysql.com
e3af1b6ec6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kostja/mysql/mysql-5.0-10760-new
2005-07-19 22:22:12 +04:00
konstantin@mysql.com
14344b658a A fix and a test case for Bug#10760 and complementary cleanups.
The idea of the patch
is that every cursor gets its own lock id for table level locking.
Thus cursors are protected from updates performed within the same 
connection. Additionally a list of transient (must be closed at
commit) cursors is maintained and all transient cursors are closed
when necessary. Lastly, this patch adds support for deadlock
timeouts to TLL locking when using cursors.
+ post-review fixes.
2005-07-19 22:21:12 +04:00
dlenev@mysql.com
8a3e723b74 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"
2005-07-19 20:06:49 +04:00
mronstrom@mysql.com
67087e2aa7 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00
tomas@poseidon.ndb.mysql.com
674b6bb151 Merge 2005-07-12 20:01:22 +02:00
monty@mysql.com
86d7b02199 Merge with 4.1 2005-07-03 14:17:52 +03:00
monty@mishka.local
7398252d02 Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning
2005-06-27 20:31:00 +03:00
msvensson@neptunus.(none)
85b9ffc4ca Merged from mysql-4.1 to mysql-5.0 2005-06-22 14:10:02 +02:00
tulin@dl145b.mysql.com
07b4a42e18 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-06-18 09:21:50 +02:00
acurtis@xiphis.org
51dd521dfc Bug#6877 MySQL should give an error if the requested table type is not available
Implement new SQL mode - NO_ENGINE_SUBSTITUTION
2005-06-17 22:14:44 +01:00
msvensson@neptunus.(none)
4602b1809f BUG10365 Cluster handler uses non-standard error code
- Updated after review
2005-06-16 15:17:47 +02:00
msvensson@neptunus.(none)
8771c73258 BUG#10365 Cluster handler uses non-standard error codes
- Added better error messages when trying to open a table that can't be discovered or unpacked. The most likely cause of this is that it does not have any frm data, probably since it has been created from NdbApi or is a NDB system table.
 - Separated functionality that was in ha_create_table_from_engine into two functions. One that checks if the table exists and another one that tries to create the table from the engine.
2005-06-08 13:31:59 +02:00
ndbdev@dl145b.mysql.com
74f1b22b86 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-06-07 13:42:57 +02:00
dlenev@brandersnatch.localdomain
270b695f59 Fix for bug #10015 "Crash in InnoDB if stored routines are used".
We should not allow explicit or implicit transaction commits inside
of stored functions or triggers (so in autocommit mode we should not
do commits after execution of sub-statement).
Also since we don't support nested statement transactions in 5.0,
we shouldn't commit or rollback stmt transactions while we are inside
stored functions or triggers. This should be fixed in later (>=5.1)
releases.
2005-06-07 14:53:08 +04:00
ndbdev@dl145b.mysql.com
2fb1fb5877 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-06-07 06:50:50 +02:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03:00
serg@serg.mylan
6a5349028c a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
2005-06-03 23:46:03 +03:00
tomas@poseidon.ndb.mysql.com
644906bf9c bitmap bug fixes and interface change 2005-06-02 18:40:25 +02:00
tomas@poseidon.ndb.mysql.com
bef102ec90 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1
2005-06-02 09:50:47 +02:00
kent@mysql.com
f0fcc54b0c Merge 2005-06-02 04:45:09 +02:00
kent@mysql.com
bd48eed988 tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
2005-06-02 02:43:32 +02:00
tomas@poseidon.ndb.mysql.com
5088b28d09 Merge 2005-05-31 14:37:47 +02:00
msvensson@neptunus.(none)
697cfe7f07 Merge from 4.1 2005-05-26 21:01:55 +02:00
msvensson@neptunus.(none)
83d430353e Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"
2005-05-26 12:09:14 +02:00
tulin@dl145c.mysql.com
03590c20bd merge 2005-05-18 22:26:23 +02:00
monty@mysql.com
c1b512fad3 Change update_auto_increment to return 1 if get_auto_increment() returned ~(ulonglong)
This makes it easier to give an error in the handler if there was a problem generating an auto-increment value
2005-05-18 10:41:35 +03:00
tulin@dl145c.mysql.com
23f79bd1f2 merge 2005-05-17 10:17:53 +02:00
monty@mysql.com
d06bb6fa39 After merge fixes 2005-05-16 15:21:35 +03:00
mronstrom@mysql.com
c33a0673a6 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/Users/mikron/wl1682
2005-05-12 12:01:01 +02:00
mronstrom@mysql.com
cf642995f6 Many fixes 2005-05-12 11:20:50 +02:00