Commit graph

4796 commits

Author SHA1 Message Date
ramil@production.mysql.com
f7394c26f5 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/rkalimullin/4.1.b17896
2006-04-24 08:01:10 +02:00
aelkin@mysql.com
a4ff312037 Bug#17263 temporary tables and replication
Backporting a changeset made for 5.0. Comments from there:

  The fix refines the algorithm of generating DROPs for binlog.
  Temp tables with common pseudo_thread_id are clustered into one query.
  Consequently one replication event per pseudo_thread_id is generated.
2006-04-23 12:18:57 +03:00
igor@rurik.mysql.com
510ab81362 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1
into  rurik.mysql.com:/home/igor/mysql-4.1
2006-04-21 08:22:03 -07:00
ramil@production.mysql.com
aed861fd86 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/rkalimullin/4.1.b18643
2006-04-21 13:56:40 +02:00
igor@rurik.mysql.com
fd3e924164 Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2006-04-20 22:34:37 -07:00
igor@rurik.mysql.com
fc7514151f Fixed bug #18767.
The bug caused wrong result sets for union constructs of the form
(SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2.
For such queries order lists were concatenated and limit clause was
completely neglected.
2006-04-20 22:15:38 -07:00
mleich@production.mysql.com
5109b3ce02 Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/mleich/src
2006-04-20 11:31:22 +02:00
igor@rurik.mysql.com
67458961cf Temporarily commented out a query from the test case for bug 14169 to make it pass with --ps-protocol. 2006-04-19 16:08:37 -07:00
igor@rurik.mysql.com
881b55d503 Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-2
2006-04-19 14:42:51 -07:00
evgen@moonbone.local
8b4eae6e4f func_gconcat.result:
Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.
2006-04-20 00:27:43 +04:00
igor@rurik.mysql.com
950214abfc Fixed bug #19079.
The bug caused a reported index corruption in the cases when
key_cache_block_size was not a multiple of myisam_block_size,
e.g. when key_cache_block_size=1536 while myisam_block_size=1024.
2006-04-18 20:57:31 -07:00
mleich@mysql.com
3a18f1e27c Merge mysql.com:/home/matthias/Arbeit/mysql-4.1/src
into  mysql.com:/home/matthias/Arbeit/mysql-4.1/src-1
2006-04-18 14:18:51 +02:00
evgen@moonbone.local
bc1f457194 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14169-bug-4.1-mysql
2006-04-14 17:25:58 +04:00
mleich@mysql.com
3ca1ec8fdc Fixes for Bug#12429: Replication tests fail: "Slave_IO_Running" (?) differs related to
MySQL 4.1
  and Bug#16920 rpl_deadlock_innodb fails in show slave status (reported for MySQL 5.1)
  - backport of several fixes done in MySQL 5.0 to 4.1
  - fix for new discovered instability (see comment on Bug#12429 + Bug#16920)
  - reenabling of testcases
2006-04-13 20:42:48 +02:00
ramil@mysql.com
2398882097 Fix for bug #18643: crazy UNCOMPRESS(). 2006-04-13 16:19:21 +05:00
bar@mysql.com
45293fc346 Bug#18691: Converting number to UNICODE string returns invalid result.
Conversion from int and real numbers to UCS2 didn't work fine: 
CONVERT(100, CHAR(50) UNICODE)
CONVERT(103.9, CHAR(50) UNICODE)

The problem appeared because numbers have binary charset, so,
simple charset recast binary->ucs2 was performed
instead of real conversion.

Fixed to make numbers pretend to be non-binary.
2006-04-13 10:55:48 +05:00
evgen@moonbone.local
ac54aa2aee Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was
used

In a simple queries a result of the GROUP_CONCAT() function was always of 
varchar type.
But if length of GROUP_CONCAT() result is greater than 512 chars and temporary
table is used during select then the result is converted to blob, due to
policy to not to store fields longer than 512 chars in tmp table as varchar
fields.

In order to provide consistent behaviour, result of GROUP_CONCAT() now
will always be converted to blob if it is longer than 512 chars.
Item_func_group_concat::field_type() is modified accordingly.
2006-04-12 23:05:38 +04:00
ingo@mysql.com
2ef6034165 Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug5390
2006-04-11 15:18:16 +02:00
ramil@mysql.com
a2cd8beb96 Merge mysql.com:/usr/home/ram/work/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.1
2006-04-11 13:53:44 +05:00
ramil@mysql.com
4791ce7942 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into  mysql.com:/usr/home/ram/work/mysql-4.0
2006-04-11 10:46:21 +05:00
konstantin@mysql.com
a81ea4a830 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-16365
2006-04-07 23:50:45 +04:00
konstantin@mysql.com
518993312c A fix and a test case for Bug#16365 "Prepared Statements: DoS with
too many open statements". The patch adds a new global variable
@@max_prepared_stmt_count. This variable limits the total number
of prepared statements in the server. The default value of
@@max_prepared_stmt_count is 16382. 16382 small statements
(a select against 3 tables with GROUP, ORDER and LIMIT) consume 
100MB of RAM. Once this limit has been reached, the server will 
refuse to prepare a new statement and return ER_UNKNOWN_ERROR 
(unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
and can accept any value from 0 to 1 million. In case
the new value of the limit is less than the current
statement count, no new statements can be added, while the old
still can be used. Additionally, the current count of prepared 
statements is now available through a global read-only variable 
@@prepared_stmt_count.
2006-04-07 23:37:06 +04:00
konstantin@mysql.com
15b591561f A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?))
gives wrong results". Implement previously missing 
Item_row::cleanup. The bug is not repeatable in 5.0, probably 
due to a coincidence: the problem is present in 5.0 as well.
2006-04-07 22:26:25 +04:00
bar@mysql.com
925ea02b4c This problem has already been fixed by one of the previous changes.
Adding test case to cover queries which worked incorrectly earlier:
Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
2006-04-06 10:51:23 +05:00
evgen@sunlight.local
47f9b46564 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into sunlight.local:/local_work/15560-bug-4.1-mysql
2006-03-30 10:22:03 +04:00
monty@mysql.com
84e7c9633a Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255
Bug #17705 "FT Index corruption occurs with UTF8 data..."
(Actually, the bug had nothing to do with FT index but with general key compression)
2006-03-30 01:50:52 +03:00
evgen@moonbone.local
1c13e54890 Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
The GROUP_CONCAT uses its own temporary table. When ROLLUP is present
it creates the second copy of Item_func_group_concat. This copy receives the
same list of arguments that original group_concat does. When the copy is
set up the result_fields of functions from the argument list are reset to the
temporary table of this copy.
As a result of this action data from functions flow directly to the ROLLUP copy
and the original group_concat functions shows wrong result.
Since queries with COUNT(DISTINCT ...) use temporary tables to store
the results the COUNT function they are also affected by this bug.

The idea of the fix is to copy content of the result_field for the function
under GROUP_CONCAT/COUNT from  the first temporary table to the second one,
rather than setting result_field to point to the second temporary table.
To achieve this goal force_copy_fields flag is added to Item_func_group_concat
and Item_sum_count_distinct classes. This flag is initialized to 0 and set to 1
into the make_unique() member function of both classes.
To the TMP_TABLE_PARAM structure is modified to include the similar flag as
well.
The create_tmp_table() function passes that flag to create_tmp_field().
When the flag is set the create_tmp_field() function will set result_field
as a source field and will not reset that result field to newly created 
field for Item_func_result_field and its descendants. Due to this there
will be created copy func to copy data from old result_field to newly 
created field.
2006-03-29 23:30:34 +04:00
gluh@eagle.intranet.mysql.r18.ru
2545c7d414 Fix for bug#15316 SET value having comma not correctly handled
disallow the use of comma in SET members
2006-03-29 19:52:26 +05:00
bar@mysql.com
4886c53fbb Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15098
2006-03-28 18:32:58 +05:00
bar@mysql.com
8620ac4d64 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15376
2006-03-23 14:29:43 +04:00
bar@mysql.com
d97d48cb26 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17374
2006-03-23 11:51:46 +04:00
bar@mysql.com
da8a68b4ca Bug#17374: select ... like 'A%' operator fails to find value on columuns with key
Fixed that LIKE worked case insensitively for latin2_czech_cs,
which was wrong for a case sensitive collation.
2006-03-20 16:28:25 +04:00
bar@mysql.com
33e446b356 Bug#18004 Connecting crashes server when default charset is UCS2
table.cc:
  Fixing to use system_charset_info instead of default_charset_info.
  Crash happened because the "ctype" array is empty in UCS2,
  and thus cannot be used with my_isspace().
  The reason why UCS2 appeared in this context was because of
  of default_charset_info variable incorrectly substituted to my_isspace().
  As functions check_db_name(), check_table_name() and check_column_name()
  always get values in utf8, system_charset_info must be used instead.
ctype_ucs2_def.test, ctype_ucs2_def-master.opt, ctype_ucs2_def.result:
  new file
2006-03-20 14:43:02 +04:00
ingo@mysql.com
ac287ad34d Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug14980
2006-03-10 22:32:37 +01:00
ingo@mysql.com
d0c6eb885d Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
For "count(*) while index_column = value" an index read
is done. It consists of an index scan and retrieval of
each key.

For efficiency reasons the index scan stores the key in
the special buffer 'lastkey2' once only. At the first 
iteration it notes this fact with the flag 
HA_STATE_RNEXT_SAME in 'info->update'.

For efficiency reasons, the key retrieval for blobs
does not allocate a new buffer, but uses 'lastkey2'...

Now I clear the HA_STATE_RNEXT_SAME flag whenever the 
buffer has been polluted. In this case, the index scan
copies the key value again (and sets the flag again).
2006-03-10 15:03:04 +01:00
msvensson@neptunus.(none)
72f509e228 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137
2006-03-08 11:20:12 +01:00
msvensson@neptunus.(none)
8162610a39 Bug#17137 Running "truncate table" on temporary table leaves the table open on a slave
- Decrease "slave_open_temp_tables" during reopen of truncated table.
 - Add test "rpl_trunc_temp"
2006-03-08 10:15:48 +01:00
serg@serg.mylan
e7504b3468 merged 2006-03-06 18:34:38 +01:00
serg@serg.mylan
0b2f4ac3be kill (subquery) - three years old bugfix that never worked 2006-03-06 18:26:39 +01:00
ramil@mysql.com
78adb4bc15 Fix for bug #17896: MIN of CASE WHEN returns non-minimum value! 2006-03-06 16:38:35 +04:00
bar@mysql.com
e019d60536 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15949
2006-03-06 14:50:34 +04:00
gluh@eagle.intranet.mysql.r18.ru
f1eaf7e8ec Fix for bug#14385 GRANT and mapping to correct user account problems
Check if the host of table hash record exactly matches host from GRANT command
2006-03-06 14:03:40 +04:00
konstantin@mysql.com
40b368af16 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root
2006-03-04 22:33:19 +03:00
bar@mysql.com
a6973ceed0 Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
union.result, union.test:
  Adding test case.
item.cc:
  Allow safe character set conversion in UNION
  - string constant to column's charset
  - to unicode
  Thus, UNION now works the same with CONCAT (and other string functions)
  in respect of aggregating arguments with different character sets.
2006-03-01 17:58:01 +04:00
paul@snake-hub.snake.net
d6654fe9cb mysql-test-run.sh:
Fix URLs.
README:
  Fix URL.
mysqltest.result:
  Update test result for real_sleep error message.
mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.
2006-02-28 15:08:16 -06:00
konstantin@mysql.com
7178f247f5 Remove 'delayed' to make the test deterministic (already
fixed in 5.0).
A post-review fix (Bug#13134)
2006-02-23 23:41:15 +03:00
konstantin@mysql.com
442c2ba8af A fix and a test case for Bug#13134 "Length of VARCHAR() utf8
column is increasing when table is recreated with PS/SP":
make use of create_field::char_length more consistent in the code.
Reinit create_field::length from create_field::char_length
for every execution of a prepared statement (actually fixes the 
bug).
2006-02-21 19:52:20 +03:00
aelkin@mysql.com
0866e4267a Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-4.1
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/mysql-4.1-bug16217
2006-02-13 19:15:02 +02:00
tomas@poseidon.ndb.mysql.com
cbac75de91 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2006-02-10 17:53:13 +01:00
tomas@poseidon.ndb.mysql.com
7050a7586e Bug #17249 ndb, delete statement with join where clause fails when table do not have pk
Bug #17257 ndb, update fails for inner joins if tables do not have Primary Key

change: the allocated area by setValue may not be around for later, store hidden key in special member variable instead
2006-02-10 17:40:22 +01:00