Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)

[es] :: MySQL :: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)

Strane: 1 2

[ Pregleda: 6885 | Odgovora: 34 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)25.05.2009. u 14:21 - pre 181 meseci
Imam upit (InnoDB tabela) koji se povremeno izvršava jako sporo

UPDATE tabela_log SET
ip = '192.168.90.34',
vrijeme = '6480',
ulaz = '0' << 32 | '12310',
izlaz = '0' << 32 | '49724',
upd_vrijeme = '2009-05-25 10:31:47'
WHERE id_sesije = '8150019b'
AND korisnik = 'dzontravolta'
AND koncip = '192.168.90.2';

Pri cemu su polja id_sesije, korisnik, koncip indeksirana.

Baza radi tako da se 1 unos upise u tabelu i nakon toga se rade periodični update (na svakih 5-10 minuta).

Tabela je bila na MyISAM-u ali sam je prebacio na InnoDB jer sam primjetio jako loš omjer Lock-Wait (sa 1:16 se popravio na 0 : 20613)

Problem je što se gore navedeni upit povremeno izvršava jako sporo (5-20sec) a ne mogu skontati u čemu je problem. Uključio sam logovanje sporih upita i upita sa lošim indeksom (tako sam i pronašao da je do njega i da on pravi problem) ali ne vidim ništa što bi blokiralo ovu tabelu pa da posumnjam ...

Inače na ovoj tabeli se jako rijetko radi brisanje (max 5 brisanja dnevno) pa smatram da ovo nije uzrok (tipa zaključana tabela isl.)

Inače InnoDB buffer je svega 50% zauzet.

__ InnoDB Buffer Pool __________________________________________________
Usage 179.33M of 384.00M %Used: 46.70
Read hit 99.59%

Što se tiče operacija za bazom situacija je 70% su UPDATE upiti, 25% SELECT i oko 5% INSERT. Ova tabela je jedina na InnoDB-u.

Ja sam nekoliko puta ručno pokretao upit sa različitom podacima i svaki put sam dobijao vremena reda 0.03-0.06 sec.

Svaka pomoć i diskusija je dobrodošla.





[Ovu poruku je menjao tarla dana 25.05.2009. u 15:49 GMT+1]

[Ovu poruku je menjao tarla dana 25.05.2009. u 15:50 GMT+1]


 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)25.05.2009. u 18:09 - pre 181 meseci
bez tacnog izgleda tabele ne mogu sa sigurnoscu da ti kazem ali mislim da je u pitanju jedan stari bug.

Ako ti je to jedina tabela u innodb tablespace-u, 99.999% je bug .. ako ima jos neka onda bi teoretski mogli da uvatimo sta je .. ako je neki lock ..

uradi sledece

Code:

EXPLAIN EXTENDED SELECT * FROM tabela_log
WHERE id_sesije = '8150019b'
AND korisnik = 'dzontravolta'
AND koncip = '192.168.90.2'\G

ANALYZE TABLE tabela_log;

EXPLAIN EXTENDED SELECT * FROM tabela_log
WHERE id_sesije = '8150019b'
AND korisnik = 'dzontravolta'
AND koncip = '192.168.90.2'\G



dalje ... ovih 70% update-a, da li se updateuje i primarni kljuc ili samo "ostalo"?

Da li ti je ukljucen low_priority_update?

e sad ... 5.0.45 je BIBLIJA ... dakle digni to na novi mysql http://www.mysql.rs/category/new-release/ .. 5.0.82 je "current" u vreme pisanja poruke .. mozes i na 5.1 da predjes, ako ne koristis nove stvar - tj. koristis ga kao 5.0, brzi je i bolji od 5.0 .. u 5.1 jos uvek nije sve kako treba sa nekim novositma (partitioning, federated, RBR/MIXED .. etc) .. inace sve ono standardno iz 5.0 sljaka 1/1

evo samo mali spisak popravljenih bagova od 5.0.45 do 5.0.81 ( 5.0.82 u stvari izlazi za koji dan)

[quote]
Changes in MySQL 5.0.82 (Not yet released)

Bugs fixed:

*

Replication: Restarting the replication slave — either by using STOP SLAVE plus START SLAVE, or by restarting the slave mysqld process — could sometimes cause the slave to crash when using a debug version of the server. (Bug#38694)
*

Replication: Killing the thread executing a DDL statement, after it had finished its execution but before it had written the binlog event, caused the error code in the binlog event to be set (incorrectly) to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED, which caused replication to fail. (Bug#37145)
*

Replication: Column alises used inside subqueries were ignored in the binary log. (Bug#35515)
*

Replication: The statements DROP PROCEDURE IF EXISTS and DROP FUNCTION IF EXISTS were not written to the binary log if the procedure or function to be dropped did not exist. (Bug#13684)
* Use of HANDLER statements with INFORMATION_SCHEMA tables caused a server crash. Now HANDLER is prohibited with such tables. (Bug#44151)

* myisamchk could display a negative Max keyfile length value. (Bug#43950)

* On Windows, a server crash occurred for attempts to insert a floating-point value into a CHAR column with a maximum length less than the converted floating-point value length. (Bug#43833)

* UNION of floating-point numbers did unnecessary rounding. (Bug#43432)

* Certain statements might open a table and then wait for an impending global read lock without noticing whether they hold a table being waiting for by the global read lock, causing a hang. Affected statements are SELECT ... FOR UPDATE, LOCK TABLES ... WRITE, TRUNCATE TABLE, and LOAD DATA INFILE. (Bug#43230)

* The InnoDB btr_search_drop_page_hash_when_freed() function had a race condition. (Bug#42279)

* Compressing a table with the myisampack utility caused the server to produce Valgrind warnings when it opened the table. (Bug#41541)

* For a MyISAM table with DELAY_KEY_WRITE enabled, the index file could be corrupted without the table being marked as crashed if the server was killed. (Bug#41330)

* Multiple-table UPDATE statements did not properly activate triggers. (Bug#39953)

* An UPDATE statement that updated a column using the same DES_ENCRYPT() value for each row actually updated different rows with different values. (Bug#35087)

* For shared-memory connections, the read and write methods did not properly handle asynchronous close events, which could lead to the client locking up waiting for a server response. For example, a call to mysql_real_query() would block forever on the client side if the executed statement was aborted on the server side. Thanks to Armin Schöffmann for the bug report and patch. (Bug#33899)

* CHECKSUM TABLE was not killable with KILL QUERY. (Bug#33146)

* myisamchk and myisampack were not being linked with the library that enabled support for * filename pattern expansion. (Bug#29248)

* COMMIT did not delete savepoints if there were no changes in the transaction. (Bug#26288)

* Several memory allocation functions were not being checked for out-of-memory return values. (Bug#25058)

Release Notes for MySQL Community Server 5.0.81 (01 May 2009)

Functionality added or changed:

* The MD5 algorithm now uses the Xfree implementation. (Bug#42434)

* The libedit library was upgraded to version 2.11. (Bug#42433)

* The query cache now checks whether a SELECT statement begins with SQL_NO_CACHE to determine whether it can skip checking for the query result in the query cache. This is not supported when SQL_NO_CACHE occurs within a comment. (Bug#37416)

Bugs fixed:

*

Replication: An INSERT DELAYED into a TIMESTAMP column issued concurrently with a an insert on the same column not using DELAYED, but applied after the other insert, was logged using the same timestamp as generated by the other (non-DELAYED) insert. (Bug#41719)
*

Replication: Server IDs greater than 2147483647 (232 − 1) were represented by negative numbers in the binary log. (Bug#37313)
*

Replication: The --replicate-*-table options were not evaluated correctly when replicating multi-table updates.

As a result of this fix, replication of multi-table updates no longer fails when an update references a missing table but does not update any of its columns. (Bug#37051)
*

Replication: When its disk becomes full, a replication slave may wait while writing the binary log, relay log or MyISAM tables, continuing after space has been made available. The error message provided in such cases was not clear about the frequency with which checking for free space is done (once every 60 seconds), and how long the server waits after space has been freed before continuing (also 60 seconds); this caused users to think that the server had hung.

These issues have been addressed by making the error message clearer, and dividing it into two separate messages:
1. The error message Disk is full writing 'filename' (Errcode: error_code). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space) is printed only once.
2. The warning Retry in 60 secs, Message reprinted in 600 secs is printed once every for every 10 times that the check for free space is made; that is, the check is performed once each 60 seconds, but the reminder that space needs to be freed is printed only once every 10 minutes (600 seconds).

(Bug#22082)
* An attempt by a user who did not have the SUPER privilege to kill a system thread could cause a server crash. (Bug#43748)

* Use of USE INDEX hints could cause EXPLAIN EXTENDED to crash. (Bug#43354)

* mysql crashed if a request for the current database name returned an empty result, such as after the client has executed a preceding SET sql_select_limit=0 statement. (Bug#43254)

* On 32-bit Windows, mysqld could not use large buffers due to a 2GB user mode address limit. (Bug#43082)

* The strings/CHARSET_INFO.txt file was not included in source distributions. (Bug#42937)

* The use by libedit of the __weak_reference() macro caused compilation failure on FreeBSD. (Bug#42817)

* mysqldump included views that were excluded with the --ignore-table option. (Bug#42635)

* An optimization introduced for Bug#37553 required an explicit cast to be added for some uses of TIMEDIFF() because automatic casting could produce incorrect results. (It was necessary to use TIME(TIMEDIFF(...)).) (Bug#42525)

* Passing an unknown time zone specification to CONVERT_TZ() resulted in a memory leak. (Bug#42502)

* Tables could enter open table cache for a thread without being properly cleaned up, leading to a server crash. (Bug#42419)

* The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)

* Dependent subqueries such as the following caused a memory leak proportional to the number of outer rows:

SELECT COUNT(*) FROM t1, t2 WHERE t2.b IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a);

(Bug#42037)
* mysqldumpslow parsed the --debug and --verbose options incorrectly. (Bug#42027)

* Some queries using NAME_CONST(.. COLLATE ...) led to a server crash due to a failed type cast. (Bug#42014)

* On Mac OS X, some of the universal client libraries were not actually universal and were missing code for one or more architectures. (Bug#41940)

* String reallocation could cause memory overruns. (Bug#41868)

* With more than two arguments, LEAST(), GREATEST(), and CASE could unnecessarily return Illegal mix of collations errors. (Bug#41627)

* Queries that used the loose index scan access method could return no rows. (Bug#41610)

* In InnoDB recovery after a server crash, rollback of a transaction that updated a column from NULL to NULL could cause another crash. (Bug#41571)

* If InnoDB reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#41529)

* The mysql client could misinterpret its input if a line was longer than an internal buffer. (Bug#41486)

* DATE_FORMAT() could cause a server crash for year-zero dates. (Bug#41470)

* When substituting system constant functions with a constant result, the server was not expecting NULL function return values and could crash. (Bug#41437)

* For a TIMESTAMP NOT NULL DEFAULT ... column, storing NULL as the return value from some functions caused a cannot be NULL error. NULL returns now correctly cause the column default value to be stored. (Bug#41370)

* Use of SELECT * allowed users with rights to only some columns of a view to access all columns. (Bug#41354)

* In the help command output displayed by mysql, the description for the \c (clear) command was misleading. (Bug#41268)

* The server did not robustly handle problems hang if a table opened with HANDLER needed to be re-opened because it had been altered to use a different storage engine that does not support HANDLER. The server also failed to set an error if the re-open attempt failed. These problems could cause the server to crash or hang. (Bug#41110, Bug#41112)

* For prepared statements, multibyte character sets were not taking into account when calculating max_length for string values and mysql_stmt_fetch() could return truncated strings. (Bug#41078)

* The Windows installer displayed incorrect product names in some images. (Bug#40845)

* The mysql_change_user() C API function changed the value of the sql_big_selects session variable. (Bug#40363)

* For a view that references a table in another database, mysqldump wrote the view name qualified with the current database name. This makes it impossible to reload the dump file into a different database. (Bug#40345)

* The query cache stored only partial query results if a statement failed while the results were being sent to the client. This could cause other clients to hang when trying to read the cached result. Now if a statement fails, the result is not cached. (Bug#40264)

* For an InnoDB table, DROP TABLE or ALTER TABLE ... DISCARD TABLESPACE could take a long time or cause a server crash. (Bug#39939)

* perror did not produce correct output for error codes 153 to 163. (Bug#39370)

* The expression ROW(...) IN (SELECT ... FROM DUAL) always returned TRUE. (Bug#39069)

* The greedy optimizer could cause a server crash due to improper handling of nested outer joins. (Bug#38795)

* Use of COUNT(DISTINCT) prevented NULL testing in the HAVING clause. (Bug#38637)

* Enabling the sync_frm system variable had no effect on the handling of .frm files for views. (Bug#38145)

* Comparisons between row constructors, such as (a, b) = (c, d) resulted in unnecessary Illegal mix of collations errors for string columns. (Bug#37601)

* An argument to the MATCH() function that was an alias for an expression other than a column name caused a server crash. (Bug#36737)

* The query cache stored packets containing the server status of the time when the cached statement was run. This might lead to an incorrect transaction status on the client side if a statement was cached during a transaction and later served outside a transaction context (or vice versa). (Bug#36326)

* If the system time was adjusted backward during query execution, the apparent execution time could be negative. But in some cases these queries would be written to the slow query log, with the negative execution time written as a large unsigned number. Now statements with apparent negative execution time are not written to the slow query log. (Bug#35396)

* The use of NAME_CONST() can result in a problem for CREATE TABLE ... SELECT statements when the source column expressions refer to local variables. Converting these references to NAME_CONST() expressions can result in column names that are different on the master and slave servers, or names that are too long to be legal column identifiers. A workaround is to supply aliases for columns that refer to local variables.

Now a warning is issued in such cases that indicate possible problems. (Bug#35383)
* For DROP FUNCTION with names that were qualified with a database name, the database name was handled in case-sensitive fashion even with lower_case_table_names set to 1. (Bug#33813)

* mysqldump --compatible=mysql40 emitted statements referring to the character_set_client system variable, which is unknown before MySQL 4.1. Now the statements are enclosed in version-specific comments. (Bug#33550)

* For mysqld_multi, using the --mysqld=mysqld_safe option caused the --defaults-file and --defaults-extra-file options to behave the same way. (Bug#32136)

* Attempts to open a valid MERGE table sometimes resulted in a ER_WRONG_MRG_TABLE error. This happened after failure to open an invalid MERGE table had also generated an ER_WRONG_MRG_TABLE error. (Bug#32047)

* Use of MBR spatial functions such as MBRTouches() with columns of InnoDB tables caused a server crash rather than an error. (Bug#31435)

* The mysql_change_user() C API function caused global Com_xxx status variable values to be incorrect. (Bug#31222)

* For Solaris package installation using pkgadd, the postinstall script failed, causing the system tables in the mysql database not to be created. (Bug#31164)

* The mysql client mishandled input parsing if a delimiter command was not first on the line. (Bug#31060)

* For installation on Solaris using pkgadd packages, the mysql_install_db script was generated in the scripts directory, but the temporary files used during the process were left there and not deleted. (Bug#31052)

* SHOW PRIVILEGES listed the CREATE ROUTINE privilege as having a context of Functions,Procedures, but it is a database-level privilege. (Bug#30305)

* CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE erroneously reported a table to be corrupt if the table did not exist or the statement was terminated with KILL. (Bug#29458)

* SHOW TABLE STATUS could fail to produce output for tables with non-ASCII characters in their name. (Bug#25830)

* The Time column for SHOW PROCESSLIST output now can have negative values. Previously, the column was unsigned and negative values were displayed incorrectly as large positive values. Negative values can occur if a thread alters the time into the future with SET TIMESTAMP = value or the thread is executing on a slave and processing events from a master that has its clock set ahead of the slave. (Bug#22047)

* Restoring a mysqldump dump file containing FEDERATED tables failed because the file contained the data for the table. Now only the table definition is dumped (because the data is located elsewhere). (Bug#21360)

* Floating-point numbers could be handled with different numbers of digits depending on whether the text or prepared-statement protocol was used. (Bug#21205)

* Incorrect length metadata could be returned for LONG TEXT columns when a multibyte server character set was used. (Bug#19829)

* ROUND() sometimes returned different results on different platforms. (Bug#15936)

Release Notes for MySQL Enterprise 5.0.80 [MRU] (01 May 2009)
This is a Monthly Rapid Update release of the MySQL Enterprise Server 5.0.

Functionality added or changed:

* The MD5 algorithm now uses the Xfree implementation. (Bug#42434)

Bugs fixed:

*

Replication: An INSERT DELAYED into a TIMESTAMP column issued concurrently with a an insert on the same column not using DELAYED, but applied after the other insert, was logged using the same timestamp as generated by the other (non-DELAYED) insert. (Bug#41719)
* An attempt by a user who did not have the SUPER privilege to kill a system thread could cause a server crash. (Bug#43748)

* Use of USE INDEX hints could cause EXPLAIN EXTENDED to crash. (Bug#43354)

* mysql crashed if a request for the current database name returned an empty result, such as after the client has executed a preceding SET sql_select_limit=0 statement. (Bug#43254)

* The strings/CHARSET_INFO.txt file was not included in source distributions. (Bug#42937)

* mysqldump included views that were excluded with the --ignore-table option. (Bug#42635)

* Passing an unknown time zone specification to CONVERT_TZ() resulted in a memory leak. (Bug#42502)

* With more than two arguments, LEAST(), GREATEST(), and CASE could unnecessarily return Illegal mix of collations errors. (Bug#41627)

* The mysql client could misinterpret its input if a line was longer than an internal buffer. (Bug#41486)

* In the help command output displayed by mysql, the description for the \c (clear) command was misleading. (Bug#41268)

* The use of NAME_CONST() can result in a problem for CREATE TABLE ... SELECT statements when the source column expressions refer to local variables. Converting these references to NAME_CONST() expressions can result in column names that are different on the master and slave servers, or names that are too long to be legal column identifiers. A workaround is to supply aliases for columns that refer to local variables.

Now a warning is issued in such cases that indicate possible problems. (Bug#35383)
* CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE erroneously reported a table to be corrupt if the table did not exist or the statement was terminated with KILL. (Bug#29458)

* The Time column for SHOW PROCESSLIST output now can have negative values. Previously, the column was unsigned and negative values were displayed incorrectly as large positive values. Negative values can occur if a thread alters the time into the future with SET TIMESTAMP = value or the thread is executing on a slave and processing events from a master that has its clock set ahead of the slave. (Bug#22047)

* Restoring a mysqldump dump file containing FEDERATED tables failed because the file contained the data for the table. Now only the table definition is dumped (because the data is located elsewhere). (Bug#21360)

Release Notes for MySQL Enterprise 5.0.79 [MRU] (09 March 2009)
This is a Monthly Rapid Update release of the MySQL Enterprise Server 5.0.

Functionality added or changed:

* The libedit library was upgraded to version 2.11. (Bug#42433)

* The query cache now checks whether a SELECT statement begins with SQL_NO_CACHE to determine whether it can skip checking for the query result in the query cache. This is not supported when SQL_NO_CACHE occurs within a comment. (Bug#37416)

Bugs fixed:

*

Replication: Server IDs greater than 2147483647 (232 − 1) were represented by negative numbers in the binary log. (Bug#37313)
*

Replication: The --replicate-*-table options were not evaluated correctly when replicating multi-table updates.

As a result of this fix, replication of multi-table updates no longer fails when an update references a missing table but does not update any of its columns. (Bug#37051)
*

Replication: When its disk becomes full, a replication slave may wait while writing the binary log, relay log or MyISAM tables, continuing after space has been made available. The error message provided in such cases was not clear about the frequency with which checking for free space is done (once every 60 seconds), and how long the server waits after space has been freed before continuing (also 60 seconds); this caused users to think that the server had hung.

These issues have been addressed by making the error message clearer, and dividing it into two separate messages:
1. The error message Disk is full writing 'filename' (Errcode: error_code). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space) is printed only once.
2. The warning Retry in 60 secs, Message reprinted in 600 secs is printed once every for every 10 times that the check for free space is made; that is, the check is performed once each 60 seconds, but the reminder that space needs to be freed is printed only once every 10 minutes (600 seconds).

(Bug#22082)
* On 32-bit Windows, mysqld could not use large buffers due to a 2GB user mode address limit. (Bug#43082)

* The use by libedit of the __weak_reference() macro caused compilation failure on FreeBSD. (Bug#42817)

* Tables could enter open table cache for a thread without being properly cleaned up, leading to a server crash. (Bug#42419)

* mysqldumpslow parsed the --debug and --verbose options incorrectly. (Bug#42027)

* String reallocation could cause memory overruns. (Bug#41868)

* Queries that used the loose index scan access method could return no rows. (Bug#41610)

* In InnoDB recovery after a server crash, rollback of a transaction that updated a column from NULL to NULL could cause another crash. (Bug#41571)

* If InnoDB reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#41529)

* Use of SELECT * allowed users with rights to only some columns of a view to access all columns. (Bug#41354)

* The server did not robustly handle problems hang if a table opened with HANDLER needed to be re-opened because it had been altered to use a different storage engine that does not support HANDLER. The server also failed to set an error if the re-open attempt failed. These problems could cause the server to crash or hang. (Bug#41110, Bug#41112)

* For prepared statements, multibyte character sets were not taking into account when calculating max_length for string values and mysql_stmt_fetch() could return truncated strings. (Bug#41078)

* The mysql_change_user() C API function changed the value of the sql_big_selects session variable. (Bug#40363)

* For a view that references a table in another database, mysqldump wrote the view name qualified with the current database name. This makes it impossible to reload the dump file into a different database. (Bug#40345)

* For an InnoDB table, DROP TABLE or ALTER TABLE ... DISCARD TABLESPACE could take a long time or cause a server crash. (Bug#39939)

* perror did not produce correct output for error codes 153 to 163. (Bug#39370)

* Comparisons between row constructors, such as (a, b) = (c, d) resulted in unnecessary Illegal mix of collations errors for string columns. (Bug#37601)

* An argument to the MATCH() function that was an alias for an expression other than a column name caused a server crash. (Bug#36737)

* For DROP FUNCTION with names that were qualified with a database name, the database name was handled in case-sensitive fashion even with lower_case_table_names set to 1. (Bug#33813)

* mysqldump --compatible=mysql40 emitted statements referring to the character_set_client system variable, which is unknown before MySQL 4.1. Now the statements are enclosed in version-specific comments. (Bug#33550)

* Use of MBR spatial functions such as MBRTouches() with columns of InnoDB tables caused a server crash rather than an error. (Bug#31435)

* The mysql client mishandled input parsing if a delimiter command was not first on the line. (Bug#31060)

* For installation on Solaris using pkgadd packages, the mysql_install_db script was generated in the scripts directory, but the temporary files used during the process were left there and not deleted. (Bug#31052)

* SHOW PRIVILEGES listed the CREATE ROUTINE privilege as having a context of Functions,Procedures, but it is a database-level privilege. (Bug#30305)

* SHOW TABLE STATUS could fail to produce output for tables with non-ASCII characters in their name. (Bug#25830)

* Floating-point numbers could be handled with different numbers of digits depending on whether the text or prepared-statement protocol was used. (Bug#21205)

* Incorrect length metadata could be returned for LONG TEXT columns when a multibyte server character set was used. (Bug#19829)

* ROUND() sometimes returned different results on different platforms. (Bug#15936)

Release Notes for MySQL Enterprise 5.0.78 [MRU] (06 February 2009)
This is a Monthly Rapid Update release of the MySQL Enterprise Server 5.0.

Bugs fixed:

* An optimization introduced for Bug#37553 required an explicit cast to be added for some uses of TIMEDIFF() because automatic casting could produce incorrect results. (It was necessary to use TIME(TIMEDIFF(...)).) (Bug#42525)

* The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)

* Dependent subqueries such as the following caused a memory leak proportional to the number of outer rows:

SELECT COUNT(*) FROM t1, t2 WHERE t2.b IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a);

(Bug#42037)
* Some queries using NAME_CONST(.. COLLATE ...) led to a server crash due to a failed type cast. (Bug#42014)

* On Mac OS X, some of the universal client libraries were not actually universal and were missing code for one or more architectures. (Bug#41940)

* DATE_FORMAT() could cause a server crash for year-zero dates. (Bug#41470)

* When substituting system constant functions with a constant result, the server was not expecting NULL function return values and could crash. (Bug#41437)

* For a TIMESTAMP NOT NULL DEFAULT ... column, storing NULL as the return value from some functions caused a cannot be NULL error. NULL returns now correctly cause the column default value to be stored. (Bug#41370)

* The Windows installer displayed incorrect product names in some images. (Bug#40845)

* The query cache stored only partial query results if a statement failed while the results were being sent to the client. This could cause other clients to hang when trying to read the cached result. Now if a statement fails, the result is not cached. (Bug#40264)

* The expression ROW(...) IN (SELECT ... FROM DUAL) always returned TRUE. (Bug#39069)

* The greedy optimizer could cause a server crash due to improper handling of nested outer joins. (Bug#38795)

* Use of COUNT(DISTINCT) prevented NULL testing in the HAVING clause. (Bug#38637)

* Enabling the sync_frm system variable had no effect on the handling of .frm files for views. (Bug#38145)

* The query cache stored packets containing the server status of the time when the cached statement was run. This might lead to an incorrect transaction status on the client side if a statement was cached during a transaction and later served outside a transaction context (or vice versa). (Bug#36326)

* If the system time was adjusted backward during query execution, the apparent execution time could be negative. But in some cases these queries would be written to the slow query log, with the negative execution time written as a large unsigned number. Now statements with apparent negative execution time are not written to the slow query log. (Bug#35396)

* For mysqld_multi, using the --mysqld=mysqld_safe option caused the --defaults-file and --defaults-extra-file options to behave the same way. (Bug#32136)

* Attempts to open a valid MERGE table sometimes resulted in a ER_WRONG_MRG_TABLE error. This happened after failure to open an invalid MERGE table had also generated an ER_WRONG_MRG_TABLE error. (Bug#32047)

* The mysql_change_user() C API function caused global Com_xxx status variable values to be incorrect. (Bug#31222)

* For Solaris package installation using pkgadd, the postinstall script failed, causing the system tables in the mysql database not to be created. (Bug#31164)

Release Notes for MySQL Community Server 5.0.77 (28 January 2009)

Functionality added or changed:

*

Security Enhancement: To enable stricter control over the location from which user-defined functions can be loaded, the plugin_dir system variable has been backported from MySQL 5.1. If the value is non-empty, user-defined function object files can be loaded only from the directory named by this variable. If the value is empty, the behavior that is used prior to the inclusion of plugin_dir applies: The UDF object files must be located in a directory that is searched by your system's dynamic linker. (Bug#37428)
* A new status variable, Queries, indicates the number of statements executed by the server. This includes statements executed within stored programs, unlike the Questions variable which includes only statements sent to the server by clients. (Bug#41131)

* Previously, index hints did not work for FULLTEXT searches. Now they work as follows:

For natural language mode searches, index hints are silently ignored. For example, IGNORE INDEX(i) is ignored with no warning and the index is still used.

For boolean mode searches, index hints are honored. (Bug#38842)

Bugs fixed:

*

Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.0.60. The original fix did not correctly handle the data directory path name if it contained symlinked directories in its path, and the check was made only at table-creation time, not at table-opening time later. (Bug#32167)
*

Security Enhancement: The server consumed excess memory while parsing statements with hundreds or thousands of nested boolean conditions (such as OR (OR ... (OR ... ))). This could lead to a server crash or incorrect statement execution, or cause other client statements to fail due to lack of memory. The latter result constitutes a denial of service. (Bug#38296)
*

Incompatible Change: There were some problems using DllMain() hook functions on Windows that automatically do global and per-thread initialization for libmysqld.dll:
o Per-thread initialization: MySQL internally counts the number of active threads, which causes a delay in my_end() if not all threads have exited. But there are threads that can be started either by Windows internally (often in TCP/IP scenarios) or by users. Those threads do not necessarily use libmysql.dll functionality but still contribute to the open-thread count. (One symptom is a five-second delay in times for PHP scripts to finish.)
o Process-initialization: my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in the Windows loader.

To correct these problems, DLL initialization code now is not invoked from libmysql.dll by default. To obtain the previous behavior (DLL initialization code will be called), set the LIBMYSQL_DLLINIT environment variable to any value. This variable exists only to prevent breakage of existing Windows-only applications that do not call mysql_thread_init() and work okay today. Use of LIBMYSQL_DLLINIT is discouraged and is removed in MySQL 6.0. (Bug#37226, Bug#33031)
*

Incompatible Change: SHOW STATUS took a lot of CPU time for calculating the value of the Innodb_buffer_pool_pages_latched status variable. Now this variable is calculated and included in the output of SHOW STATUS only if the UNIV_DEBUG symbol is defined at MySQL build time. (Bug#36600)
*

Incompatible Change: In connection with view creation, the server created arc directories inside database directories and maintained useless copies of .frm files there. Creation and renaming procedures of those copies as well as creation of arc directories has been discontinued.

This change does cause a problem when downgrading to older server versions which manifests itself under these circumstances:
1. Create a view v_orig in MySQL 5.0.72 or higher.
2. Rename the view to v_new and then back to v_orig.
3. Downgrade to an older 5.0.x server and run mysql_upgrade.
4. Try to rename v_orig to v_new again. This operation fails.

As a workaround to avoid this problem, use either of these approaches:
o Dump your data using mysqldump before downgrading and reload the dump file after downgrading.
o Instead of renaming a view after the downgrade, drop it and recreate it.

The downgrade problem introduced by the fix for this bug has been addressed as Bug#40021. (Bug#17823)
*

Replication: When rotating relay log files, the slave deletes relay log files and then edits the relay log index file. Formerly, if the slave shut down unexpectedly between these two events, the relay log index file could then reference relay logs that no longer existed. Depending on the circumstances, this could when restarting the slave cause either a race condition or the failure of replication. (Bug#38826, Bug#39325)
* In example option files provided in MySQL distributions, the thread_stack value was increased from 64K to 128K. (Bug#41577)

* SET PASSWORD caused a server crash if the account name was given as CURRENT_USER(). (Bug#41456)

* The INFORMATION_SCHEMA.SCHEMA_PRIVILEGES table was limited to 7680 rows. (Bug#41079)

* In debug builds, obsolete debug code could be used to crash the server. (Bug#41041)

* CHECK TABLE ... FOR UPGRADE did not check for incompatible collation changes made in MySQL 5.0.48 (Bug#27562, Bug#29461, Bug#29499). This also affects mysqlcheck and mysql_upgrade, which cause that statement to be executed. See Checking Whether Table Indexes Must Be Rebuilt. (Bug#40984)

* Some queries that used a range checked for each record scan could return incorrect results. (Bug#40974)

* Certain SELECT queries could fail with a Duplicate entry error. (Bug#40953)

* The FEDERATED handler had a memory leak. (Bug#40875)

* IF(..., CAST(longtext_val AS UNSIGNED), signed_val) as an argument to an aggregate function could cause an assertion failure. (Bug#40761)

* Prepared statements allowed invalid dates to be inserted when the ALLOW_INVALID_DATES SQL mode was not enabled. (Bug#40365)

* mc.exe is no longer needed to compile MySQL on Windows. This makes it possible to build MySQL from source using Visual Studio Express 2008. (Bug#40280)

* Support for the revision field in .frm files has been removed. This addresses the downgrading problem introduced by the fix for Bug#17823. (Bug#40021)

* If the operating system is configured to return leap seconds from OS time calls or if the MySQL server uses a time zone definition that has leap seconds, functions such as NOW() could return a value having a time part that ends with :59:60 or :59:61. If such values are inserted into a table, they would be dumped as is by mysqldump but considered invalid when reloaded, leading to backup/restore problems.

Now leap second values are returned with a time part that ends with :59:59. This means that a function such as NOW() can return the same value for two or three consecutive seconds during the leap second. It remains true that literal temporal values having a time part that ends with :59:60 or :59:61 are considered invalid.

For additional details about leap-second handling, see Time Zone Leap Second Support. (Bug#39920)
* The server could crash during a sort-order optimization of a dependent subquery. (Bug#39844)

* With the ONLY_FULL_GROUP_BY SQL mode enabled, the check for non-aggregated columns in queries with aggregate functions, but without a GROUP BY clause was treating all the parts of the query as if they were in the select list. This is fixed by ignoring the non-aggregated columns in the WHERE clause. (Bug#39656)

* The server crashed if an integer field in a CSV file did not have delimiting quotes. (Bug#39616)

* CHECK TABLE failed for MyISAM INFORMATION_SCHEMA tables. (Bug#39541)

* InnoDB could hang trying to open an adaptive hash index. (Bug#39483)

* For a TIMESTAMP column in an InnoDB table, testing the column with multiple conditions in the WHERE clause caused a server crash. (Bug#39353)

* The server returned a column type of VARBINARY rather than DATE as the result from the COALESCE(), IFNULL(), IF(), GREATEST(), or LEAST() functions or CASE expression if the result was obtained using filesort in an anonymous temporary table during the query execution. (Bug#39283)

* References to local variables in stored procedures are replaced with NAME_CONST(name, value) when written to the binary log. However, an illegal mix of collation error might occur when executing the log contents if the value's collation differed from that of the variable. Now information about the variable collation is written as well. (Bug#39182)

* Some recent releases for Solaris 10 were built on Solaris 10 U5, which included a new version of libnsl.so that does not work on U4 or earlier. To correct this, Solaris 10 builds now are created on machines that do not have that upgraded libnsl.so, so that they will work on Solaris 10 installations both with and without the upgraded libnsl.so. (Bug#39074)

* With binary logging enabled CREATE VIEW was subject to possible buffer overwrite and a server crash. (Bug#39040)

* Queries of the form SELECT ... REGEXP BINARY NULL could lead to a hung or crashed server. (Bug#39021)

* Statements of the form INSERT ... SELECT .. ON DUPLICATE KEY UPDATE col_name = DEFAULT could result in a server crash. (Bug#39002)

* Column names constructed due to wild-card expansion done inside a stored procedure could point to freed memory if the expansion was performed after the first call to the stored procedure. (Bug#38823)

* Repeated CREATE TABLE ... SELECT statements, where the created table contained an AUTO_INCREMENT column, could lead to an assertion failure. (Bug#38821)

* If delayed insert failed to upgrade the lock, it did not free the temporary memory storage used to keep newly constructed BLOB values in memory, resulting in a memory leak. (Bug#38693)

* A server crash resulted from concurrent execution of a multiple-table UPDATE that used a NATURAL or USING join together with FLUSH TABLES WITH READ LOCK or ALTER TABLE for the table being updated. (Bug#38691)

* On ActiveState Perl, mysql-test-run.pl --start-and-exit started but did not exit. (Bug#38629)

* Server-side cursors were not initialized properly, which could cause a server crash. (Bug#38486)

* Stored procedures involving substrings could crash the server on certain platforms due to invalid memory reads. (Bug#38469)

* A server crash or Valgrind warnings could result when a stored procedure selected from a view that referenced a function. (Bug#38291)

* Incorrect handling of aggregate functions when loose index scan was used caused a server crash. (Bug#38195)

* Queries containing a subquery with DISTINCT and ORDER BY could cause a server crash. (Bug#38191)

* Queries with a HAVING clause could return a spurious row. (Bug#38072)

* Use of spatial data types in prepared statements could cause memory leaks or server crashes. (Bug#37956, Bug#37671)

* The server crashed if an argument to a stored procedure was a subquery that returned more than one row. (Bug#37949)

* When analyzing the possible index use cases, the server was incorrectly reusing an internal structure, leading to a server crash. (Bug#37943)

* A SELECT with a NULL NOT IN condition containing a complex subquery from the same table as in the outer select caused an assertion failure. (Bug#37894)

* For InnoDB tables, ORDER BY ... DESC sometimes returned results in ascending order. (Bug#37830)

* If a table has a BIT NOT NULL column c1 with a length shorter than 8 bits and some additional NOT NULL columns c2, ..., and a SELECT query has a WHERE clause of the form (c1 = constant) AND c2 ..., the query could return an unexpected result set. (Bug#37799)

* Nesting of IF() inside of SUM() could cause an extreme server slowdown. (Bug#37662)

* The MONTHNAME() and DAYNAME() functions returned a binary string, so that using LOWER() or UPPER() had no effect. Now MONTHNAME() and DAYNAME() return a value in character_set_connection character set. (Bug#37575)

* TIMEDIFF() was erroneously treated as always returning a positive result. Also, CAST() of TIME values to DECIMAL dropped the sign of negative values. (Bug#37553)

* mysqlcheck used SHOW FULL TABLES to get the list of tables in a database. For some problems, such as an empty .frm file for a table, this would fail and mysqlcheck then would neglect to check other tables in the database. (Bug#37527)

* The <=> operator could return incorrect results when comparing NULL to DATE, TIME, or DATETIME values. (Bug#37526)

* Updating a view with a subquery in the CHECK option could cause an assertion failure. (Bug#37460)

* Statements that displayed the value of system variables (for example, SHOW VARIABLES) expect variable values to be encoded in character_set_system. However, variables set from the command line such as basedir or datadir were encoded using character_set_filesystem and not converted correctly. (Bug#37339)

* For a MyISAM table with CHECKSUM = 1 and ROW_FORMAT = DYNAMIC table options, a data consistency check (maximum record length) could fail and cause the table to be marked as corrupted. (Bug#37310)

* The max_length result set metadata value was calculated incorrectly under some circumstances. (Bug#37301)

* CREATE INDEX could crash with InnoDB plugin 1.0.1. (Bug#37284)

* Certain boolean-mode FULLTEXT searches that used the truncation operator did not return matching records and calculated relevance incorrectly. (Bug#37245)

* The NO_BACKSLASH_ESCAPES SQL mode was ignored for LOAD DATA INFILE and SELECT INTO ... OUTFILE. The setting is taken into account now. (Bug#37114)

* On a 32-bit server built without big tables support, the offset argument in a LIMIT clause might be truncated due to a 64-bit to 32-bit cast. (Bug#37075)

* If the server failed to expire binary log files at startup, it could crash. (Bug#37027)

* The code for the ut_usectime() function in InnoDB did not handle errors from the gettimeofday() system call. Now it retries gettimeofday() several times and updates the value of the Innodb_row_lock_time_max status variable only if ut_usectime() was successful. (Bug#36819)

* Use of CONVERT() with GROUP BY to convert numeric values to CHAR could return truncated results. (Bug#36772)

* A query which had an ORDER BY DESC clause that is satisfied with a reverse range scan could cause a server crash for some specific CPU/compiler combinations. (Bug#36639)

* Dumping information about locks in use by sending a SIGHUP signal to the server or by invoking the mysqladmin debug command could lead to a server crash in debug builds or to undefined behavior in production builds. (Bug#36579)

* The mysql client, when built with Visual Studio 2005, did not display Japanese characters. (Bug#36279)

* When the fractional part in a multiplication of DECIMAL values overflowed, the server truncated the first operand rather than the longest. Now the server truncates so as to produce more precise multiplications. (Bug#36270)

* A read past the end of the string could occur while parsing the value of the --innodb-data-file-path option. (Bug#36149)

* Host name values in SQL statements were not being checked for '@', which is illegal according to RFC952. (Bug#35924)

* The UUID() function returned UUIDs with the wrong time; this was because the offset for the time part in UUIDs was miscalculated. (Bug#35848)

* SHOW CREATE TABLE did not display a printable value for the default value of BIT columns. (Bug#35796)

* mysql_install_db failed on machines that had the host name set to localhost. (Bug#35754)

* Dynamic plugins failed to load on i5/OS. (Bug#35743)

* Freeing of an internal parser stack during parsing of complex stored programs caused a server crash. (Bug#35577, Bug#37269, Bug#37228)

* The max_length metadata value was calculated incorrectly for the FORMAT() function, which could cause incorrect result set metadata to be sent to clients. (Bug#35558)

* Index scans performed with the sort_union() access method returned wrong results, caused memory to be leaked, and caused temporary files to be deleted when the limit set by sort_buffer_size was reached. (Bug#35477, Bug#35478)

* If the server crashed with an InnoDB error due to unavailability of undo slots, errors could persist during rollback when the server was restarted: There are two UNDO slot caches (for INSERT and UPDATE). If all slots end up in one of the slot caches, a request for a slot from the other slot cache would fail. This can happen if the request is for an UPDATE slot and all slots are in the INSERT slot cache, or vice versa. (Bug#35352)

* For InnoDB tables, ALTER TABLE DROP failed if the name of the column to be dropped began with foreign. (Bug#35220)

* perror on Windows did not know about Win32 system error codes. (Bug#34825)

* EXPLAIN EXTENDED evaluation of aggregate functions that required a temporary table caused a server crash. (Bug#34773)

* Queries of the form SELECT ... WHERE string = ANY(...) failed when the server used a single-byte character set and the client used a multi-byte character set. (Bug#34760)

* Using OPTIMIZE TABLE as the first statement on an InnoDB table with an AUTO_INCREMENT column could cause a server crash. (Bug#34286)

* mysql_install_db failed if the server was running with an SQL mode of TRADITIONAL. This program now resets the SQL mode internally to avoid this problem. (Bug#34159)

* Changes to build files were made to enable the MySQL distribution to compile on Microsoft Visual C++ Express 2008. (Bug#33907)

* The mysql client incorrectly parsed statements containing the word delimiter in mid-statement.

This fix is different from the one applied for this bug in MySQL 5.0.66. (Bug#33812)
* For a stored procedure containing a SELECT * ... RIGHT JOIN query, execution failed for the second call. (Bug#33811)

* Previously, use of index hints with views (which do not have indexes) produced the error ERROR 1221 (HY000): Incorrect usage of USE/IGNORE INDEX and VIEW. Now this produces ERROR 1176 (HY000): Key '...' doesn't exist in table '...', the same error as for base tables without an appropriate index. (Bug#33461)

* Cached queries that used 256 or more tables were not properly cached, so that later query invalidation due to a TRUNCATE TABLE for one of the tables caused the server to hang. (Bug#33362)

* Some division operations produced a result with incorrect precision. (Bug#31616)

* mysql_upgrade attempted to use the /proc file system even on systems that do not have it. (Bug#31605)

* mysqldump could fail to dump views containing a large number of columns. (Bug#31434)

* Queries executed using join buffering of BIT columns could produce incorrect results. (Bug#31399)

* ALTER TABLE CONVERT TO CHARACTER SET did not convert TINYTEXT or MEDIUMTEXT columns to a longer text type if necessary when converting the column to a different character set. (Bug#31291)

* For installation on Solaris using pkgadd packages, the mysql_install_db script was generated in the scripts directory, but the temporary files used during the process were left there and not deleted. (Bug#31052)

* Several MySQL programs could fail if the HOME environment variable had an empty value. (Bug#30394)

* On NetWare, mysql_install_db could appear to execute normally even if it failed to create the initial databases. (Bug#30129)

* The Serbian translation for the ER_INCORRECT_GLOBAL_LOCAL_VAR error was corrected. (Bug#29738)

* XA transaction rollbacks could result in corrupted transaction states and a server crash. (Bug#28323)

* The BUILD/check-cpu build script failed if gcc had a different name (such as gcc.real on Debian). (Bug#27526)

* On Windows, Visual Studio does not take into account some x86 hardware limitations, which led to incorrect results converting large DOUBLE values to unsigned BIGINT values. (Bug#27483)

* SSL support was not included in some generic RPM packages. (Bug#26760)

* In some cases, the parser interpreted the ; character as the end of input and misinterpreted stored program definitions. (Bug#26030)

* The Questions status variable is intended as a count of statements sent by clients to the server, but was also counting statements executed within stored routines. (Bug#24289)

* For access to the INFORMATION_SCHEMA.VIEWS table, the server did not check the SHOW VIEW and SELECT privileges, leading to inconsistency between output from that table and the SHOW CREATE VIEW statement. (Bug#22763)

* The FLUSH PRIVILEGES statement did not produce an error when it failed. (Bug#21226)

* A race condition between the mysqld.exe server and the Windows service manager could lead to inability to stop the server from the service manager. (Bug#20430)

* mysqld_safe would sometimes fail to remove the pid file for the old mysql process after a crash. As a result, the server would fail to start due to a false A mysqld process already exists... error. (Bug#11122)

Release Notes for MySQL Enterprise 5.0.76 [MRU] (05 January 2009)
This is a Monthly Rapid Update release of the MySQL Enterprise Server 5.0.

Functionality added or changed:

* A new status variable, Queries, indicates the number of statements executed by the server. This includes statements executed within stored programs, unlike the Questions variable which includes only statements sent to the server by clients. (Bug#41131)

Bugs fixed:

*

Replication: When rotating relay log files, the slave deletes relay log files and then edits the relay log index file. Formerly, if the slave shut down unexpectedly between these two events, the relay log index file could then reference relay logs that no longer existed. Depending on the circumstances, this could when restarting the slave cause either a race condition or the failure of replication. (Bug#38826, Bug#39325)
* In example option files provided in MySQL distributions, the thread_stack value was increased from 64K to 128K. (Bug#41577)

* SET PASSWORD caused a server crash if the account name was given as CURRENT_USER(). (Bug#41456)

* The INFORMATION_SCHEMA.SCHEMA_PRIVILEGES table was limited to 7680 rows. (Bug#41079)

* In debug builds, obsolete debug code could be used to crash the server. (Bug#41041)

* Some queries that used a range checked for each record scan could return incorrect results. (Bug#40974)

* Certain SELECT queries could fail with a Duplicate entry error. (Bug#40953)

* IF(..., CAST(longtext_val AS UNSIGNED), signed_val) as an argument to an aggregate function could cause an assertion failure. (Bug#40761)

* The server crashed if an integer field in a CSV file did not have delimiting quotes. (Bug#39616)

* InnoDB could hang trying to open an adaptive hash index. (Bug#39483)

* Use of spatial data types in prepared statements could cause memory leaks or server crashes. (Bug#37956, Bug#37671)

* The MONTHNAME() and DAYNAME() functions returned a binary string, so that using LOWER() or UPPER() had no effect. Now MONTHNAME() and DAYNAME() return a value in character_set_connection character set. (Bug#37575)

* Certain boolean-mode FULLTEXT searches that used the truncation operator did not return matching records and calculated relevance incorrectly. (Bug#37245)

* The code for the ut_usectime() function in InnoDB did not handle errors from the gettimeofday() system call. Now it retries gettimeofday() several times and updates the value of the Innodb_row_lock_time_max status variable only if ut_usectime() was successful. (Bug#36819)

* A read past the end of the string could occur while parsing the value of the --innodb-data-file-path option. (Bug#36149)

* SHOW CREATE TABLE did not display a printable value for the default value of BIT columns. (Bug#35796)

* The max_length metadata value was calculated incorrectly for the FORMAT() function, which could cause incorrect result set metadata to be sent to clients. (Bug#35558)

* EXPLAIN EXTENDED evaluation of aggregate functions that required a temporary table caused a server crash. (Bug#34773)

* The mysql client incorrectly parsed statements containing the word delimiter in mid-statement.

This fix is different from the one applied for this bug in MySQL 5.0.66. (Bug#33812)
* Queries executed using join buffering of BIT columns could produce incorrect results. (Bug#31399)

* ALTER TABLE CONVERT TO CHARACTER SET did not convert TINYTEXT or MEDIUMTEXT columns to a longer text type if necessary when converting the column to a different character set. (Bug#31291)

* On Windows, Visual Studio does not take into account some x86 hardware limitations, which led to incorrect results converting large DOUBLE values to unsigned BIGINT values. (Bug#27483)

* SSL support was not included in some generic RPM packages. (Bug#26760)

Release Notes for MySQL Community Server 5.0.75 (17 December 2008)

Functionality added or changed:

*

Security Enhancement: To enable stricter control over the location from which user-defined functions can be loaded, the plugin_dir system variable has been backported from MySQL 5.1. If the value is non-empty, user-defined function object files can be loaded only from the directory named by this variable. If the value is empty, the behavior that is used prior to the inclusion of plugin_dir applies: The UDF object files must be located in a directory that is searched by your system's dynamic linker. (Bug#37428)
* Previously, index hints did not work for FULLTEXT searches. Now they work as follows:

For natural language mode searches, index hints are silently ignored. For example, IGNORE INDEX(i) is ignored with no warning and the index is still used.

For boolean mode searches, index hints are honored. (Bug#38842)

Bugs fixed:

*

Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.0.60. The original fix did not correctly handle the data directory path name if it contained symlinked directories in its path, and the check was made only at table-creation time, not at table-opening time later. (Bug#32167)
*

Security Enhancement: The server consumed excess memory while parsing statements with hundreds or thousands of nested boolean conditions (such as OR (OR ... (OR ... ))). This could lead to a server crash or incorrect statement execution, or cause other client statements to fail due to lack of memory. The latter result constitutes a denial of service. (Bug#38296)
*

Incompatible Change: There were some problems using DllMain() hook functions on Windows that automatically do global and per-thread initialization for libmysqld.dll:
o Per-thread initialization: MySQL internally counts the number of active threads, which causes a delay in my_end() if not all threads have exited. But there are threads that can be started either by Windows internally (often in TCP/IP scenarios) or by users. Those threads do not necessarily use libmysql.dll functionality but still contribute to the open-thread count. (One symptom is a five-second delay in times for PHP scripts to finish.)
o Process-initialization: my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in the Windows loader.

To correct these problems, DLL initialization code now is not invoked from libmysql.dll by default. To obtain the previous behavior (DLL initialization code will be called), set the LIBMYSQL_DLLINIT environment variable to any value. This variable exists only to prevent breakage of existing Windows-only applications that do not call mysql_thread_init() and work okay today. Use of LIBMYSQL_DLLINIT is discouraged and is removed in MySQL 6.0. (Bug#37226, Bug#33031)
*

Incompatible Change: SHOW STATUS took a lot of CPU time for calculating the value of the Innodb_buffer_pool_pages_latched status variable. Now this variable is calculated and included in the output of SHOW STATUS only if the UNIV_DEBUG symbol is defined at MySQL build time. (Bug#36600)
*

Incompatible Change: In connection with view creation, the server created arc directories inside database directories and maintained useless copies of .frm files there. Creation and renaming procedures of those copies as well as creation of arc directories has been discontinued.

This change does cause a problem when downgrading to older server versions which manifests itself under these circumstances:
1. Create a view v_orig in MySQL 5.0.72 or higher.
2. Rename the view to v_new and then back to v_orig.
3. Downgrade to an older 5.0.x server and run mysql_upgrade.
4. Try to rename v_orig to v_new again. This operation fails.

As a workaround to avoid this problem, use either of these approaches:
o Dump your data using mysqldump before downgrading and reload the dump file after downgrading.
o Instead of renaming a view after the downgrade, drop it and recreate it.

The downgrade problem introduced by the fix for this bug has been addressed as Bug#40021. (Bug#17823)
* CHECK TABLE ... FOR UPGRADE did not check for incompatible collation changes made in MySQL 5.0.48 (Bug#27562, Bug#29461, Bug#29499). This also affects mysqlcheck and mysql_upgrade, which cause that statement to be executed. See Checking Whether Table Indexes Must Be Rebuilt. (Bug#40984)

* The FEDERATED handler had a memory leak. (Bug#40875)

* Prepared statements allowed invalid dates to be inserted when the ALLOW_INVALID_DATES SQL mode was not enabled. (Bug#40365)

* mc.exe is no longer needed to compile MySQL on Windows. This makes it possible to build MySQL from source using Visual Studio Express 2008. (Bug#40280)

* Support for the revision field in .frm files has been removed. This addresses the downgrading problem introduced by the fix for Bug#17823. (Bug#40021)

* If the operating system is configured to return leap seconds from OS time calls or if the MySQL server uses a time zone definition that has leap seconds, functions such as NOW() could return a value having a time part that ends with :59:60 or :59:61. If such values are inserted into a table, they would be dumped as is by mysqldump but considered invalid when reloaded, leading to backup/restore problems.

Now leap second values are returned with a time part that ends with :59:59. This means that a function such as NOW() can return the same value for two or three consecutive seconds during the leap second. It remains true that literal temporal values having a time part that ends with :59:60 or :59:61 are considered invalid.

For additional details about leap-second handling, see Time Zone Leap Second Support. (Bug#39920)
* The server could crash during a sort-order optimization of a dependent subquery. (Bug#39844)

* With the ONLY_FULL_GROUP_BY SQL mode enabled, the check for non-aggregated columns in queries with aggregate functions, but without a GROUP BY clause was treating all the parts of the query as if they were in the select list. This is fixed by ignoring the non-aggregated columns in the WHERE clause. (Bug#39656)

* CHECK TABLE failed for MyISAM INFORMATION_SCHEMA tables. (Bug#39541)

* For a TIMESTAMP column in an InnoDB table, testing the column with multiple conditions in the WHERE clause caused a server crash. (Bug#39353)

* The server returned a column type of VARBINARY rather than DATE as the result from the COALESCE(), IFNULL(), IF(), GREATEST(), or LEAST() functions or CASE expression if the result was obtained using filesort in an anonymous temporary table during the query execution. (Bug#39283)

* References to local variables in stored procedures are replaced with NAME_CONST(name, value) when written to the binary log. However, an illegal mix of collation error might occur when executing the log contents if the value's collation differed from that of the variable. Now information about the variable collation is written as well. (Bug#39182)

* Some recent releases for Solaris 10 were built on Solaris 10 U5, which included a new version of libnsl.so that does not work on U4 or earlier. To correct this, Solaris 10 builds now are created on machines that do not have that upgraded libnsl.so, so that they will work on Solaris 10 installations both with and without the upgraded libnsl.so. (Bug#39074)

* With binary logging enabled CREATE VIEW was subject to possible buffer overwrite and a server crash. (Bug#39040)

* Queries of the form SELECT ... REGEXP BINARY NULL could lead to a hung or crashed server. (Bug#39021)

* Statements of the form INSERT ... SELECT .. ON DUPLICATE KEY UPDATE col_name = DEFAULT could result in a server crash. (Bug#39002)

* Column names constructed due to wild-card expansion done inside a stored procedure could point to freed memory if the expansion was performed after the first call to the stored procedure. (Bug#38823)

* Repeated CREATE TABLE ... SELECT statements, where the created table contained an AUTO_INCREMENT column, could lead to an assertion failure. (Bug#38821)

* If delayed insert failed to upgrade the lock, it did not free the temporary memory storage used to keep newly constructed BLOB values in memory, resulting in a memory leak. (Bug#38693)

* A server crash resulted from concurrent execution of a multiple-table UPDATE that used a NATURAL or USING join together with FLUSH TABLES WITH READ LOCK or ALTER TABLE for the table being updated. (Bug#38691)

* On ActiveState Perl, mysql-test-run.pl --start-and-exit started but did not exit. (Bug#38629)

* Server-side cursors were not initialized properly, which could cause a server crash. (Bug#38486)

* Stored procedures involving substrings could crash the server on certain platforms due to invalid memory reads. (Bug#38469)

* A server crash or Valgrind warnings could result when a stored procedure selected from a view that referenced a function. (Bug#38291)

* Incorrect handling of aggregate functions when loose index scan was used caused a server crash. (Bug#38195)

* Queries containing a subquery with DISTINCT and ORDER BY could cause a server crash. (Bug#38191)

* Queries with a HAVING clause could return a spurious row. (Bug#38072)

* The server crashed if an argument to a stored procedure was a subquery that returned more than one row. (Bug#37949)

* When analyzing the possible index use cases, the server was incorrectly reusing an internal structure, leading to a server crash. (Bug#37943)

* A SELECT with a NULL NOT IN condition containing a complex subquery from the same table as in the outer select caused an assertion failure. (Bug#37894)

* For InnoDB tables, ORDER BY ... DESC sometimes returned results in ascending order. (Bug#37830)

* If a table has a BIT NOT NULL column c1 with a length shorter than 8 bits and some additional NOT NULL columns c2, ..., and a SELECT query has a WHERE clause of the form (c1 = constant) AND c2 ..., the query could return an unexpected result set. (Bug#37799)

* Nesting of IF() inside of SUM() could cause an extreme server slowdown. (Bug#37662)

* TIMEDIFF() was erroneously treated as always returning a positive result. Also, CAST() of TIME values to DECIMAL dropped the sign of negative values. (Bug#37553)

* mysqlcheck used SHOW FULL TABLES to get the list of tables in a database. For some prob
 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)25.05.2009. u 19:11 - pre 181 meseci
Citat:
bogdan.kecman

Ako ti je to jedina tabela u innodb tablespace-u, 99.999% je bug .. ako ima jos neka onda bi teoretski mogli da uvatimo sta je .. ako je neki lock ..



Jeste to jedina innodb tabela i nema nikakvih vezivanja sa drugim tabelama čime se može isključiti lockovanje zbog brisanja nekog reda u drugoj tabeli...

Citat:

uradi sledece

Code:

EXPLAIN EXTENDED SELECT.........




Javljam čim uradim.

Citat:

dalje ... ovih 70% update-a, da li se updateuje i primarni kljuc ili samo "ostalo"?
Da li ti je ukljucen low_priority_update?



Ne radim update primarnog ključa. Mislim da je to previše "skupa" i nepotrebna operacija i to izbjegavam.
low_priority_update je bio uključen dok je tabela bila MyISAM ali sam to ugasio nakon prelaska na InnoDB (mislim da sam htio vidjeti omjer Lock-Wait MyISAM-InnoDB kombinacije sa i bez pa je na kraju ostalo isključeno)

Citat:

e sad ... 5.0.45 je BIBLIJA ... dakle digni to na novi mysql http://www.mysql.rs/category/new-release/ .. 5.0.82 je "current" u vreme pisanja poruke .. mozes i na 5.1 da predjes, ako ne koristis nove stvar - tj. koristis ga kao 5.0, brzi je i bolji od 5.0 .. u 5.1 jos uvek nije sve kako treba sa nekim novositma (partitioning, federated, RBR/MIXED .. etc) .. inace sve ono standardno iz 5.0 sljaka 1/1


5.0.45 dolazi kao poslednja "stabilna" verzija na CentOS-u 5.x te sam je zato i ostavio. Vidjeću večeras da uradim update na 5.0.81 ili 5.0.82 pa javljam rezultate.

U svakom slučaju, veliko hvala za odgovor...



 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)25.05.2009. u 21:27 - pre 181 meseci
zeznuto je uhvatiti kada je upit spor ... to je najveci problem ... kada bi mogao da napravis ponovljiv test case bilo bi mnogo jednostavnije ...

sto se tice rh binary-a ... zaboravi na njih kada je u pitanju mysql ... prvo taj 5.0.45 od centosa nije u stvari 5.0.45 vec nesto tipa "skoro 5.0.52" posto oni imaju filozofiju da ne moze da se menja verzija u releas-u nego onda oni backportuju patcheve .... ma .. dodatno, rh ne ume da napravi mysql binary kako treba, smarali smo se sa njima mnoooooooooogo puta i ne vredi, oni imaju neku svoju filozofiju i to na kraju nikako ne valja ..

- uvek koristi mysql sa mysql sajta - imaces mnogo manje glavobolje

baci onaj explain, odradi upgrade pa probaj da reprodukujes problem ..

obrati samo paznju da upgrade rh-a ako oces da ostanes na rpm-u nije bas toliko jednostavno posto su imena paketa razlicita pa moras da
- zaustavis mysql
- bekapujes sadrzaj datadir-a (/var/lib/mysql ako se ja dobro secam)
- deinstaliras mysql sa rpm -e --nodeps --force
- instaliras rpm-ove sa mysql sajta
- namestis u my.cnf da ti je datadir u /var/lib/mysql (ili gde je vec bio)
- startujes sveze isntalirani mysql ..

nije bas "ugodna" procedura :(

ja uglavnom ostavim koji god je mysql na sistemu i sa mysql sajta skinem tar.gz koji stavim u /usr/local/mysql i ne razmisljam :) ..
 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)25.05.2009. u 22:12 - pre 181 meseci
da .. ako nemas kad da radis upgrate (ili oces da sacekas dan dva na .82 posto izlazi danas sutra .. sada je u QA fazi), probaj da ugasis query cache pa da vidis da li ces uspeti da ponovis problem ... jedan od mogucih bagova ima veze za invalidatizacijom query cache-a, "ponekad" doticna invalidatizacija potraje predugo ... dakle zagasi q_cache pa probaj da ponovis
 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 00:14 - pre 181 meseci
danas sam napisao shell skriptu da prati status i da koriguje nepravilnosti te da mi pošalje SMS ako nešto krene kako ne treba.

U međuvremenu ću na testnom serveru napraviti skriptu za testiranje sa sample podacima i vidjeti u čemu je kvaka. pa onda ponoviti testove sa urađenim upgrade-om.

Inače poznato mi je mučenje sa rpm vs tar.gz pošto sam vodio rovovsku borbu sa ljudima... rrdtool koji dolazi uz RH mi je uvijek pravio probleme...


 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 03:37 - pre 181 meseci
Citat:
Code:

EXPLAIN EXTENDED SELECT * FROM tabela_log
WHERE id_sesije = '8150019b'
AND korisnik = 'dzontravolta'
AND koncip = '192.168.90.2'\G

ANALYZE TABLE tabela_log;



Dobijem

Code:

id     select_type     table     type     possible_keys     key     key_len     ref     rows     Extra
1     SIMPLE     tabela_log     ref     korisnik,id_sesije,koncip     id_sesije     34     const     1     Using where

Table     Op     Msg_type     Msg_text
db1.tabela_log     analyze     status     OK


Kada isključim query_cache čini se da problem nije vidljiv. Ostaje mi da sačekam malo veće opterećenje na serveru da bih konačno mogao reći "OTORINOLARINGOLOGIJA"

Kada samo kod update procedure ona je sledeća:

# service mysqld stop
# yum remove mysql

(ovde zapisati šta sve ode kao depend. pa kasnije vratiti ako zaista treba. Bolja ideja je da se uklone samo mysql rpm-ovi ali ....Pogotovo ako se radi o produkcijskom serveru)

# cd /etc
# mv my.cnf _my.cnf
# cd /var/lib
# mv mysql _mysql

Nakon toga preuzeti neophodne rpm arhive sa http://dev.mysql.com/downloads/. Meni su potrebne arhive:
MySQL-client-community-5.0.81-0.rhel5.i386.rpm
MySQL-devel-community-5.0.81-0.rhel5.i386.rpm
MySQL-server-community-5.0.81-0.rhel5.i386.rpm
MySQL-shared-community-5.0.81-0.rhel5.i386.rpm

Više objašnjenja o samim arhivama i šta je zapakovano u njima možete pronaći na http://dev.mysql.com/doc/refman/5.1/en/linux-rpm.html

# rpm -ivh MySQL*
# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
# chown -R mysql.mysql /var/lib/mysql
# /usr/bin/mysql_install_db --user=mysql
# /usr/bin/mysql_secure_installation (ovaj korak nije neophodan ali je koristan)

# yum install php-mysql perl-DBD-MySQL qt-MySQL arpwatch redhat-lsb mod_auth_mysql libdbi-dbd-mysql (vraćam šta se "pojelo" uklanjanjem stare verzije mysql-a
# service httpd restart (čisto da apache skonta da je novi igrač ušao na teren)

Nakon svega vratiti bekape baza koje ste naravno napravili. Kreirati korisnike itd....




 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 09:42 - pre 181 meseci
Citat:

Kada isključim query_cache čini se da problem nije vidljiv. Ostaje mi da sačekam malo veće opterećenje na serveru da bih konačno mogao reći "OTORINOLARINGOLOGIJA"


yup - to je taj bug ... problem je sto invalidizacija qcache-a "nekad" zabode ... jedino resenje je ili upgrade ili gasenje istog ... (ili ignorisanje sto vecina radi)

bug je najbolje opisan ovde: http://bugs.mysql.com/bug.php?id=33362

bug je popravljen u 5.1.28 i 5.0.68 (za ovo sto je u 5.0 sam ja kriv ... uopste nisu hteli da ga stave u 5.0 pa sam ja seo developerima na kicmu ... dok nisu odradili i push u 5.0 ... jedan od retkih bagova za koje sam bas maltretirao da se pusti patch)

Citat:

Kada samo kod update procedure ona je sledeća:

# service mysqld stop
# yum remove mysql

(ovde zapisati šta sve ode kao depend. pa kasnije vratiti ako zaista treba. Bolja ideja je da se uklone samo mysql rpm-ovi ali ....Pogotovo ako se radi o produkcijskom serveru)


iskreno, ja uvek rpm -e --nodeps, posebno na produkcijskom posto ne mogu da podnsem da mi poskida jos 50 zavisnih paketa :) ali moze i ovako



 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 12:29 - pre 181 meseci
Hm problem je i dalje prisutan ali u daleko manjoj mjeri.

Upravo završavam testne skripte koje će simulirati nekoliko hiljada sličnih operacija sa random vrijednostima pa ću vidjeti.

Što se tiče razloga zašto sam išao sa yum remove... Vidim tačno koji paketi zavise od mysql-a i prilikom njihovog povratka vidim da li je detektovano postojanje novog mysql-a jer ako prijave da im nedostaje mysql-* a ja ga instalisao, znači da je nešto zapelo.. :)




 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 14:45 - pre 181 meseci
Citat:
tarla: Hm problem je i dalje prisutan ali u daleko manjoj mjeri.


da li si samo odradio upgrade ili si zabo q_cache...

sta je fora, query cache invalidatizacija mora da traje .. tako da, ako se napuni doticni podacima koji zavise od podataka u toj tabeli invalidatizacija moze da potraje nekad malo duze nego sto je to slucaj, posebno ako si stavio da moze da sacuva i malo veci rezultat i ako imas malo vise konekcija ... onda nekoliko tredova cita iz qcache-a te tvoj update ceka na red da bi mogao da odradi invalidatizaciju ...

ceo taj deo nije bas najsretnije resen i tek je u 6.0 sredjeno brdo toga .. (ima dosta dobrih promena i u 5.1 u odnosu na 5.0 ali ne dovoljno).... e sad, 6.0 vise ne postoji, idemo na novi model koji iskreno da ti kazem jos uvek nisam procitao na sta lici ... sedi mi ceo thread od jedno 300 mailova vezano za to neprocitam i taaaaaaaaaaaaako me mrzi da procitam .. (trosim trenutno slobodno vreme na potpuno drugaciju stvar: http://elco.crsndoo.com/wordpress/tag/reprap/ )

query cache se inace najbolje koristi sa hintovima .. dakle na upite dodajes hint da li da koriste ili ne query cache ... tako da mozes da izbegnes uopste da ti se puni qcache "kratkotrajnim" vrednostima...

inace, kada napravis taj test, kapiram da neces testirati na production masini :) ... pusti test na 5.0 i 5.1 pa uporedi rezultate ... ovaj patch je backportovan sa 5.1 i nije bas 1/1 resen u 5.0 vec vise na silu .. u 5.1 bi trebalo da je resen kako treba
 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 14:45 - pre 181 meseci
defaultna instalacija bez ikakve optimizacije 5.0.81 na dual PIII na 800MHz (testna kanta) daje sledece:

10 000 upita sa random generisanim podacima se zavrsi za 130 sekundi => avg = 0.013 sec/query
Max je 0.51534 sec.


 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 14:50 - pre 181 meseci
to je super rezultat .. sta koristis za testiranje .. sysbench ili ?
 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 15:20 - pre 181 meseci
:) Nisam tako daleko odmakao :)

Napisao sam php skriptu koja se pokreće iz shell-a i rezultat trpa u log fajl.

Sad sam radio select-e po toj tabeli i svih 10000 redova je uredno update-ovano... inace ima ih oko 1 000 000

Zaboravio sam reći da nisam ništa dirao na produkc. mašini. Sve ovo sam radio na testnoj mašini koja je puno sporija od prukc. mašine. Ima sporije diskove, procesor, manje RAM'a, MySQL radi po defaultnoj my-medium.cnf konfiguraciji.


Na prudukc. mašini će biti upoređeno 5.0.45 vs 5.0.81

Inače ja svoje slobodno vrijeme trošim na fly fishing... http://www.ribnikflyfish.com/


[Ovu poruku je menjao tarla dana 26.05.2009. u 16:30 GMT+1]


 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.mysql.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.05.2009. u 15:34 - pre 181 meseci
probaj sysbench ... satire (pise plavusa plavusi, idemo veceras na sisanje i satiranje) ... http://sysbench.sourceforge.net/

prilicno lak za uporabu, "najbolje" za benchmark mysql-a sto postoji ...

 
Odgovor na temu

tarla

Član broj: 15527
Poruke: 1648



+42 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)14.09.2009. u 17:57 - pre 177 meseci
Malo da podignem temu iz zaborava

Naime problem sam donekle ublažio ali ne i riješio a zatim ostavio po strani jer nisam imao vremena da čačkam.

Što se tiče CentOS-a 5.x ne znam u čemu je problem sa HP ML platformama ali Mysql mi radi kilavo na njemu. Čitanje i rad sa MyISAM-om leti ali jel upadne InnoDB u priču, ćao đaci... Testirao sam nekoliko 5.0.x i nekoliko 5.1.x verzija. Svaka instalacija je prvo testirana sa defaultnim podešavanjima a nakon toga sam na osnovu rezultata nekoliko alata za optimizaciju i profilisanje štimao MySQL i dobijao 20-30% bolje rezltate ali to je opet daleko od dobroga... Gasio keširanje, palio,...

Danas ulovim malo vremena i sjetim se problema pa instališem Ubuntu Server... Aj što me smori sudo ovo, sudo ono ali što Sysbench testovi nisu za prepoznati:

Poređenje:


Objašnjenje
InnoDB testovi su u pitanju.
Prva kolona je objašnjenje rezultata,
Druga kolona je server sa 2GB RAM-a i instalisanim CentOS'om, uz optimizaciju MySQL-a koliko je to u mojoj moći
Treća kolona je identična mašina sa 1GB RAM-a i Ubuntu-om uz default MySQL instalaciju (5.0.51a ubuntu ) pri čemu sam zadržao my.cnf onakvim kakav je bio
Četvrta kolona je rezultat sa Ubuntuom nakon što sam čačkao my.cnf onako kako mislim da bi trebalo. Za optimizaciju sam koristio 4 različita alata i dobio sam (za mene) fantastične rezultate

Test je ponavljan nekoliko puta pa je prikazan neki okvirni prosjek. Svaki put je rađen na svježe generisanoj InnoDB tabeli od 500 000 redova.

Važno je napomenuti da kod Ubuntua nisam pipao ništa oko /proc/sys/vm/swappiness (default je na 60), noatime-a i drugih džidža-bidža koje mogu povoljno uticati na performanse...


Još da napomenem da mi je ručno instalisani 5.0.82 i 5.1.34 na CentOS'u dao nekih 10 sekundi bolje rezltate nego spakovani 5.0.45...

Zaključak: Nemam ga. Jesam riješio problem ali nisam našao uzrok. To me pojede živoga...





 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.31.24.217.adsl2.beograd.com.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)16.09.2009. u 19:37 - pre 177 meseci
mnogo razloga zasto je centos tu losiji u startu ...

1. file system ... koji je gde ... centes default iirc dolazi sa ext4 kome su upaljene write barriers ... to znaci - mnooooooooooogo losije performanse nego ext3 ili ext4 sa ugasenim wb-om (ubuntu i ostala ekipa nemaju upaljene wb po defaultu)

2. scheduler .. centos dolazi po defaultu sa cfq koji je ~20% sporiji od noop ili deadline .. i to ne samo cfq per se vec centosova implementacija cfq-a .. ne znam sa sta ubuntu dolazi ali mislim da oni imaju vanila cfq implementaciju koja je za DB bolja od ove patchovane rhelove ..

uradi slece ... tom centosu promeni scheduler na deadline ili noop (u /etc/grub.conf u kernel liniju dodaj

elevator=deadline

ili

elevator=noop

pa resetuj masinu .. a u mount opcije za fajl sistem, ako je ext4 dodaj

barrier=0

pa probaj onda da pustis isti benchmark na centosu


 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.sun.com.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)17.09.2009. u 09:22 - pre 177 meseci
btw, jos jedna stvar

po defaultu centos/rhel gase cache na tvom hardu, a ubuntu i ostali "desktop" sistemi ga ostavljaju upaljenog ... to je najverovatnije razlog zasto je toliko velika razlika
 
Odgovor na temu

Schmidt
RHCE

Član broj: 80784
Poruke: 647
*.blic.net.



+10 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.09.2009. u 11:01 - pre 177 meseci
Citat:
bogdan.kecmanuradi slece ... tom centosu promeni scheduler na deadline ili noop (u /etc/grub.conf u kernel liniju dodaj

elevator=deadline

ili

elevator=noop


Elevator i jos neke sitnice se mogu mijenjati u hodu, instalacijom paketa ktune:

yum install ktune

Nakon toga dobicete servis ktune koji mozete zaustaviti/iskljuciti/startovati/restartovati kao i svaki drugi...

Dobijete i dva config fajla za igranje pride:

/etc/sysconfig/ktune
/etc/sysctl.ktune
 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.31.24.217.adsl2.beograd.com.

Sajt: mysql.rs


+2377 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.09.2009. u 11:17 - pre 177 meseci
fala za info ... ne znam zasto je rhel kernel patchnut tako da ne dozvoljava promene schedulera online ... no ako ktune moze da promeni scheduled online tj bez restarta masine - extra :)
 
Odgovor na temu

Schmidt
RHCE

Član broj: 80784
Poruke: 647
*.blic.net.



+10 Profil

icon Re: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)26.09.2009. u 11:28 - pre 177 meseci
Mozda sirim dezinformacije, moguce... :)
Tvrdnja je zasnovana na ovome:

Code:

/etc/rc.d/init.d/ktune restart
Reverting to saved sysctl settings:                        [  OK  ]
Reverting to cfq elevator: sda sdb                         [  OK  ]
Saving current sysctl settings:                            [  OK  ]
Applying ktune sysctl settings from /etc/sysctl.ktune:     [  OK  ]
Applying deadline elevator: sda sdb                        [  OK  ]


Kaze da vraca na cfq, potom na startu kaze da je aktivirao deadline...

Ovo sto si izjavio za cache me je malo zabrinulo pa sam pogledao stanje svojih diskova:

Code:

hdparm -i /dev/sdb

/dev/sdb:
 Model=WDC WD1600AAJS-00B4A0                   , FwRev=01.03A01, SerialNo=     WD-WCAT30520956
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

hdparm -i /dev/sda

/dev/sda:

 Model=ST380815AS                              , FwRev=3.CHF   , SerialNo=9RW0LHK7            
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

 * signifies the current active mode


Za oba diska kaze da je cache ukljucen. Jesi na to mislio ili...?
 
Odgovor na temu

[es] :: MySQL :: Spor UPDATE na InnoDB-u (Mysql 5.0.45-log)

Strane: 1 2

[ Pregleda: 6885 | Odgovora: 34 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.