Commit graph

970 commits

Author SHA1 Message Date
konstantin@mysql.com
75454b0a1d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/work/mysql-4.1-4912
2004-08-21 02:08:20 +04:00
konstantin@mysql.com
568c6e8526 Fix for bug#4912 "mysqld crashs in case a statement is executed
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement 
execute a subtree with negation was replaced with equivalent 
subtree without NOTs.
The problem was that although this transformation was permanent, 
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(), 
  Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
  THD::free_temporary_pool_for_ps_preparing(); they
  were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
  prepared statement, it points at the thd. 
The rest of the patch contains mainly mechanical changes and
cleanups.
2004-08-21 02:02:46 +04:00
serg@serg.mylan
050bf6a89f merged 2004-08-20 21:56:29 +02:00
guilhem@mysql.com
5db56a106b Making FLUSH TABLES WITH READ LOCK block COMMITs of existing transactions,
in a deadlock-free manner. This splits locking the global read lock in two steps.
This fixes a consequence of this bug, known as:
BUG#4953 'mysqldump --master-data may report incorrect binlog position if using InnoDB'
And a test.
2004-08-20 16:35:23 +02:00
guilhem@mysql.com
0db5b4d202 (manual port from 4.0 - was needed)
Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
2004-08-19 23:24:35 +02:00
pem@mysql.comhem.se
2d7f4c30a7 Fixed symbol name problems that made build fail. 2004-08-19 20:48:00 +02:00
guilhem@mysql.com
42d30b758b Fix for BUG#4971 "CREATE TABLE ... TYPE=HEAP SELECT ... stops slave (wrong DELETE in binlog)":
replacing the no_log argument of mysql_create_table() by some safer method
(temporarily setting OPTION_BIN_LOG to 0) which guarantees that even the automatic
DELETE FROM heap_table does not get into the binlog when a not-yet-existing HEAP table
is opened by mysql_create_table().
2004-08-19 00:29:11 +02:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
bar@mysql.com
1c8b328e16 CSC issue # 3299 fix:
ENUM and SET type didn't compute their length correctly.
That showed up for example while converting into a CHAR column.
2004-08-13 19:06:24 +05:00
dlenev@brandersnatch.localdomain
f49d4f5350 Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
or setting of @@time_zone variable we should open and lock them with the rest of 
statement's table (so we should add them to global table list) and after that use such 
pre-opened tables for loading info about time zones.
2004-08-10 12:42:31 +04:00
dlenev@brandersnatch.localdomain
f325a92b0a Fix for bug #4491 "timestamp(19) doesn't work".
We should allow 19 as length of newly created TIMESTAMP fields.
2004-08-06 12:15:40 +04:00
bell@sanja.is.com.ua
a1b6f6db0e LEX initialization fixed 2004-07-21 22:44:12 +03:00
monty@mysql.com
79b3b220be Don't close already closed files in vio (not critical) 2004-07-12 07:38:46 +03:00
monty@mysql.com
c1032fe9eb Cleanup of db option cacheing
Some bug fixes to last pushed code
2004-07-09 10:55:16 +03:00
bar@mysql.com
a5025f4ca6 WL#807 Optimize loading database options in load_db_opt
also known as
BUG#2326 Charset of table is determined by charset of db only if "USE db;"
2004-07-08 15:03:01 +05:00
serg@serg.mylan
3236093b8b removed using lex->select_lex.options is SHOW TABLE [STATUS] commands (BUG#4288) 2004-06-27 00:34:05 +02:00
monty@mysql.com
c3eb936040 Merge mysql.com:/home/my/mysql-3.23 into mysql.com:/home/my/mysql-4.0 2004-06-25 18:55:03 +03:00
bell@sanja.is.com.ua
5db861c3e4 parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204) 2004-06-24 22:15:15 +03:00
bell@sanja.is.com.ua
7483b3cf96 parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204) 2004-06-24 02:57:57 +03:00
bell@sanja.is.com.ua
cb0f607c5e Merge 2004-06-22 12:38:23 +03:00
konstantin@mysql.com
b793142c8f Unused variables removed (many files). 2004-06-21 20:39:19 +04:00
monty@mysql.com
d69a36d118 merge 2004-06-21 10:24:40 +03:00
guilhem@mysql.com
6b45c24d39 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1-874
2004-06-18 23:51:15 +02:00
guilhem@mysql.com
19dbf58eec API change: mysql_shutdown() now requires a 2nd argument, the shutdown level.
mysqld >=4.1.3 will however understand shutdown requests sent by clients <4.1.3.
And mysqld <4.1.3 will understand shutdown requests sent by clients >=4.1.3
(it will ignore the level). Those shutdown level are just PLACEHOLDERS now.
So this change is just to make the 4.1 API suitable before it is frozen. Later
we will actually implement the shutdown levels.
2004-06-18 23:50:04 +02:00
dlenev@brandersnatch.localdomain
09ba29e539 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.
2004-06-18 10:11:31 +04:00
monty@mysql.com
b11d258835 Merge with 4.0.21 2004-06-18 04:38:58 +03:00
heikki@hundin.mysql.fi
0db8e42c77 Cset exclude: heikki@hundin.mysql.fi|ChangeSet|20040617084849|64488 2004-06-17 11:53:17 +03:00
heikki@hundin.mysql.fi
918dd73f4f Cset exclude: guilhem@mysql.com|ChangeSet|20040609132715|17355 2004-06-17 11:48:49 +03:00
guilhem@mysql.com
f1fda6387e API change: mysql_shutdown() now needs a 2nd parameter, the shutdown level.
Server will however still accept shutdown without specified level; so that old
mysqladmin can still shut server down.
I would like your comments on the names of shutdown level which I chose. You
are welcome to propose better names. Please however check WL#709 before.
Reason for the names I propose is to be accurate, thus leaving possibility
for other levels which we may imagine in the future; that's why I have rejected
names like "fast", "smart", "graceful" so far. My position is that WAIT_ALL_BUFFERS
or WAIT_CRITICAL_BUFFERS say what the shutdown does, whereas for "smart", "fast" you
need to remember what it does.
This should be pushed in 4.1.3 but only after your comments.
2004-06-15 11:35:23 +02:00
bell@sanja.is.com.ua
d2c585df31 fixed field resolving mode fo INSERT/REPLACE and CRETE with SELECT (BUG#4090) 2004-06-13 22:39:09 +03:00
serg@serg.mylan
035e03c1f6 merged 2004-06-11 20:55:08 +02:00
serg@serg.mylan
78fa465b92 bug#3964 and related issues: FTB problems with charsets where one byte can match many
correct prefix compare with my_strnncoll
2004-06-10 21:18:57 +02:00
guilhem@mysql.com
e816a757db WL#1689 "Map OPTIMIZE TABLE to ALTER TABLE for InnoDB"
exactly it's mapped to "ALTER TABLE t; ANALYZE TABLE t;"
2004-06-10 16:41:24 +02:00
monty@mysql.com
17db9de543 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-06-10 12:36:11 +03:00
monty@mysql.com
c56a16b598 Cleanup 2004-06-10 11:58:16 +03:00
guilhem@mysql.com
9799c5ba33 complement to previous fix (which was for SQLCOM_DROP_DB), for COM_DROP_DB. 2004-06-09 15:27:15 +02:00
guilhem@mysql.com
e76a332165 Fix for BUG#4066 "DROP DATABASE case sensitive even if lower-case-table-names > 0" 2004-06-09 15:22:31 +02:00
serg@serg.mylan
a8a8da3920 different (simpler and more compatible) fix for bug#4046 2004-06-09 00:08:24 +02:00
sergefp@mysql.com
1e05e6cb82 Post review fixes for "SQL Syntax for Prepared Statements". 2004-06-07 12:09:10 +04:00
sergefp@mysql.com
bec20d1fd7 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-06-04 05:37:14 +04:00
guilhem@mysql.com
da835a0a06 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
2004-06-03 23:19:01 +02:00
guilhem@mysql.com
86e8ecc965 Implementation of WL#1824 "Add replication of character set variables in 4.1",
by binlogging some SET ONE_SHOT CHARACTER_SETetc,
which will be enough until we have it more compact and more complete in 5.0. With the present patch,
replication will work ok between 4.1.3 master and slaves, as long as:
- master and slave have the same GLOBAL.COLLATION_SERVER
- COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used
- application does not use the fact that table is created with charset of the USEd db (BUG#2326).
all of which are not too hard to fulfill. 
ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets,
so we give error if used for non-charset vars.
Fix for BUG#3875 "mysqlbinlog produces wrong ouput  if query uses
 variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated
 properly after SET NAMES".
Detecting that master and slave have different global charsets or server ids.
2004-06-03 23:17:18 +02:00
sergefp@mysql.com
bd04f52552 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-06-03 20:54:46 +04:00
monty@mysql.com
70c2256d2f Merge with 4.0 to get fixes for netware 2004-06-02 00:09:14 +03:00
jani@a80-186-24-72.elisa-laajakaista.fi
2953c23ab0 Changed --log-warnings to be integer instead of boolean. Given --skip-log-warnings
will disable warnings, --log-warnings will increment warning level by one, or the
level can be given as an optional argument. Default level is 1.

Changed aborted connection warning to be logged only if the level is > 1.
2004-06-01 17:29:24 +03:00
serg@serg.mylan
2e1ded2fe1 backport wild_compare fix from 4.1 - bug#3924 2004-05-29 17:52:20 +02:00
sergefp@mysql.com
d7dd97089e Manually merged, requirees more merging 2004-05-25 08:15:50 +04:00
konstantin@mysql.com
f207b33a7b Support for character set conversion in binary protocol: another go
after Monty's review.
- Item_param was rewritten.
- it turns out that we can't convert string data to character set of
  connection on the fly, because they first should be written to the binary
  log.
  To support efficient conversion we need to rewrite prepared statements
  binlogging code first.
2004-05-25 02:03:49 +04:00
sergefp@mysql.com
ef260fa754 Merge 2004-05-24 21:13:38 +04:00
sergefp@mysql.com
700adb9ae9 Added support for PREPARE stmt1 FROM @var,
Fixed the problem of previous patch with replication,
More post-review fixes
2004-05-24 21:08:22 +04:00