From 93c928d3a75d388b7dd97fa8dc6edf294c69184e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 14:39:39 +0100 Subject: [PATCH 1/9] safer creation of temp files used in replication of LOAD DATA INFILE. When we come to create these, they may already exist and it's necessary to delete these old, useless copies. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/logging_ok | 1 + sql/log_event.cc | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index f8621170f64..6f044ff530d 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -29,6 +29,7 @@ dellis@goetia.(none) dlenev@brandersnatch.localdomain dlenev@build.mysql.com dlenev@mysql.com +gbichot@quadxeon.mysql.com gerberb@ou800.zenez.com gluh@gluh.(none) gluh@gluh.mysql.r18.ru diff --git a/sql/log_event.cc b/sql/log_event.cc index 007bb6e7b85..d1321b878bf 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2360,8 +2360,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli) strmov(p, ".info"); // strmov takes less code than memcpy strnmov(proc_info, "Making temp file ", 17); // no end 0 thd->proc_info= proc_info; - if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC, - MYF(MY_WME))) < 0 || + my_delete(fname_buf, MYF(0)); // old copy may exist already + if ((fd= my_create(fname_buf, CREATE_MODE, + O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW, + MYF(MY_WME))) < 0 || init_io_cache(&file, fd, IO_SIZE, WRITE_CACHE, (my_off_t)0, 0, MYF(MY_WME|MY_NABP))) { @@ -2383,8 +2385,10 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli) my_close(fd, MYF(0)); // fname_buf now already has .data, not .info, because we did our trick - if ((fd = my_open(fname_buf, O_WRONLY|O_CREAT|O_BINARY|O_TRUNC, - MYF(MY_WME))) < 0) + my_delete(fname_buf, MYF(0)); // old copy may exist already + if ((fd= my_create(fname_buf, CREATE_MODE, + O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW, + MYF(MY_WME))) < 0) { slave_print_error(rli,my_errno, "Error in Create_file event: could not open file '%s'", fname_buf); goto err; @@ -2426,7 +2430,7 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli) memcpy(p, ".data", 6); strnmov(proc_info, "Making temp file ", 17); // no end 0 thd->proc_info= proc_info; - if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY, MYF(MY_WME))) < 0) + if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0) { slave_print_error(rli,my_errno, "Error in Append_block event: could not open file '%s'", fname); goto err; @@ -2455,7 +2459,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli) Load_log_event* lev = 0; memcpy(p, ".info", 6); - if ((fd = my_open(fname, O_RDONLY|O_BINARY, MYF(MY_WME))) < 0 || + if ((fd = my_open(fname, O_RDONLY|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0 || init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0, MYF(MY_WME|MY_NABP))) { From 6cd5a8c0be04a99bc495544c6e529b92f268f694 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 11:33:07 -0600 Subject: [PATCH 2/9] Update URL. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/logging_ok | 1 + man/isamchk.1.in | 2 +- man/isamlog.1.in | 2 +- man/mysql.1.in | 2 +- man/mysql_fix_privilege_tables.1.in | 2 +- man/mysql_zap.1.in | 2 +- man/mysqlaccess.1.in | 2 +- man/mysqladmin.1.in | 2 +- man/mysqld.1.in | 2 +- man/mysqld_multi.1.in | 2 +- man/mysqld_safe.1.in | 2 +- man/mysqldump.1.in | 2 +- man/mysqlshow.1.in | 2 +- man/perror.1.in | 2 +- man/replace.1.in | 2 +- 15 files changed, 15 insertions(+), 14 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index ef04f36c433..cbcfe51a3ff 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -109,6 +109,7 @@ nick@mysql.com nick@nick.leippe.com patg@krsna.patg.net paul@central.snake.net +paul@frost.snake.net paul@ice.local paul@ice.snake.net paul@kite-hub.kitebird.com diff --git a/man/isamchk.1.in b/man/isamchk.1.in index cad1303ee55..15616ba475f 100644 --- a/man/isamchk.1.in +++ b/man/isamchk.1.in @@ -130,7 +130,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/isamlog.1.in b/man/isamlog.1.in index 6040f6c4ad8..0b1d3e8ca28 100644 --- a/man/isamlog.1.in +++ b/man/isamlog.1.in @@ -87,7 +87,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. diff --git a/man/mysql.1.in b/man/mysql.1.in index 7330ac8125b..60b582061a7 100644 --- a/man/mysql.1.in +++ b/man/mysql.1.in @@ -145,7 +145,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysql_fix_privilege_tables.1.in b/man/mysql_fix_privilege_tables.1.in index 1d42681f298..7996f4bb9e7 100644 --- a/man/mysql_fix_privilege_tables.1.in +++ b/man/mysql_fix_privilege_tables.1.in @@ -30,7 +30,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysql_zap.1.in b/man/mysql_zap.1.in index 511a8feaa7c..b8c61a83159 100644 --- a/man/mysql_zap.1.in +++ b/man/mysql_zap.1.in @@ -44,7 +44,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqlaccess.1.in b/man/mysqlaccess.1.in index cf2e0658a1c..323065c264b 100644 --- a/man/mysqlaccess.1.in +++ b/man/mysqlaccess.1.in @@ -110,7 +110,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqladmin.1.in b/man/mysqladmin.1.in index a549f1c0e22..84f771da1e0 100644 --- a/man/mysqladmin.1.in +++ b/man/mysqladmin.1.in @@ -194,7 +194,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqld.1.in b/man/mysqld.1.in index 719711edca2..771e919f306 100644 --- a/man/mysqld.1.in +++ b/man/mysqld.1.in @@ -219,7 +219,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqld_multi.1.in b/man/mysqld_multi.1.in index 26e7a091b60..e5030477d39 100644 --- a/man/mysqld_multi.1.in +++ b/man/mysqld_multi.1.in @@ -74,7 +74,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. diff --git a/man/mysqld_safe.1.in b/man/mysqld_safe.1.in index 641f34677c7..2c300c6e73a 100644 --- a/man/mysqld_safe.1.in +++ b/man/mysqld_safe.1.in @@ -76,7 +76,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqldump.1.in b/man/mysqldump.1.in index 6d1cc80c837..35508d0b65b 100644 --- a/man/mysqldump.1.in +++ b/man/mysqldump.1.in @@ -263,7 +263,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqlshow.1.in b/man/mysqlshow.1.in index 903d9620fd6..a8bfb44cce1 100644 --- a/man/mysqlshow.1.in +++ b/man/mysqlshow.1.in @@ -83,7 +83,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/perror.1.in b/man/perror.1.in index f9efb48510b..286c9459569 100644 --- a/man/perror.1.in +++ b/man/perror.1.in @@ -43,7 +43,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/replace.1.in b/man/replace.1.in index 395411f7e9f..e8b0f286277 100644 --- a/man/replace.1.in +++ b/man/replace.1.in @@ -57,7 +57,7 @@ perror(1), .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://www.mysql.com/doc/en/ +is also available online at http://dev.mysql.com/doc/ .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR From 4878bc744990c54a1fce656adc2bdd07d7c9dfcd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 11:40:41 -0600 Subject: [PATCH 3/9] Update URL. --- man/isamchk.1.in | 2 +- man/isamlog.1.in | 2 +- man/mysql.1.in | 2 +- man/mysql_fix_privilege_tables.1.in | 2 +- man/mysql_zap.1.in | 2 +- man/mysqlaccess.1.in | 2 +- man/mysqladmin.1.in | 2 +- man/mysqld.1.in | 2 +- man/mysqld_multi.1.in | 2 +- man/mysqld_safe.1.in | 2 +- man/mysqldump.1.in | 2 +- man/mysqlman.1.in | 2 +- man/mysqlshow.1.in | 2 +- man/perror.1.in | 2 +- man/replace.1.in | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/man/isamchk.1.in b/man/isamchk.1.in index 15616ba475f..d908e8af3ee 100644 --- a/man/isamchk.1.in +++ b/man/isamchk.1.in @@ -130,7 +130,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/isamlog.1.in b/man/isamlog.1.in index 0b1d3e8ca28..5f69e70297a 100644 --- a/man/isamlog.1.in +++ b/man/isamlog.1.in @@ -87,7 +87,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. diff --git a/man/mysql.1.in b/man/mysql.1.in index 60b582061a7..c4463aa658b 100644 --- a/man/mysql.1.in +++ b/man/mysql.1.in @@ -145,7 +145,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysql_fix_privilege_tables.1.in b/man/mysql_fix_privilege_tables.1.in index 7996f4bb9e7..fe1016e8d98 100644 --- a/man/mysql_fix_privilege_tables.1.in +++ b/man/mysql_fix_privilege_tables.1.in @@ -30,7 +30,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysql_zap.1.in b/man/mysql_zap.1.in index b8c61a83159..fb030427dc2 100644 --- a/man/mysql_zap.1.in +++ b/man/mysql_zap.1.in @@ -44,7 +44,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqlaccess.1.in b/man/mysqlaccess.1.in index 323065c264b..e0b3d314a10 100644 --- a/man/mysqlaccess.1.in +++ b/man/mysqlaccess.1.in @@ -110,7 +110,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqladmin.1.in b/man/mysqladmin.1.in index 84f771da1e0..e62cb32dc78 100644 --- a/man/mysqladmin.1.in +++ b/man/mysqladmin.1.in @@ -194,7 +194,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqld.1.in b/man/mysqld.1.in index 771e919f306..73f07337f25 100644 --- a/man/mysqld.1.in +++ b/man/mysqld.1.in @@ -219,7 +219,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqld_multi.1.in b/man/mysqld_multi.1.in index e5030477d39..58e5c71d01d 100644 --- a/man/mysqld_multi.1.in +++ b/man/mysqld_multi.1.in @@ -74,7 +74,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. diff --git a/man/mysqld_safe.1.in b/man/mysqld_safe.1.in index 2c300c6e73a..5aabd232a11 100644 --- a/man/mysqld_safe.1.in +++ b/man/mysqld_safe.1.in @@ -76,7 +76,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqldump.1.in b/man/mysqldump.1.in index 35508d0b65b..4d841117e59 100644 --- a/man/mysqldump.1.in +++ b/man/mysqldump.1.in @@ -263,7 +263,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/mysqlman.1.in b/man/mysqlman.1.in index 610a64da198..b09b01ca759 100644 --- a/man/mysqlman.1.in +++ b/man/mysqlman.1.in @@ -9,7 +9,7 @@ In most cases, you can run the executable from the command line with a "--help" argument to display a brief summary of the executable's arguments and function. For more information about MySQL, please refer to the MySQL reference manual, which may already be installed locally and which is also available online at -http://dev.mysql.com/doc/ +http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .\" end of man page diff --git a/man/mysqlshow.1.in b/man/mysqlshow.1.in index a8bfb44cce1..2db79ae070e 100644 --- a/man/mysqlshow.1.in +++ b/man/mysqlshow.1.in @@ -83,7 +83,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/perror.1.in b/man/perror.1.in index 286c9459569..45b343a9c3f 100644 --- a/man/perror.1.in +++ b/man/perror.1.in @@ -43,7 +43,7 @@ replace(1) .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR diff --git a/man/replace.1.in b/man/replace.1.in index e8b0f286277..618ed0f5bea 100644 --- a/man/replace.1.in +++ b/man/replace.1.in @@ -57,7 +57,7 @@ perror(1), .P For more information please refer to the MySQL reference manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/ +is also available online at http://dev.mysql.com/doc/mysql/en .SH BUGS Please refer to http://bugs.mysql.com/ to report bugs. .SH AUTHOR From ee2633a7e2d21b55d814d7f34fd47d229409e0e5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 20:18:19 -0800 Subject: [PATCH 4/9] olap.test: Added a test case for bug #8617. sql_select.cc: Fixed bug #8617. Queries with ROLLUP and LIMIT n returned more than n rows if SQL_CALC_FOUND_ROWS was used. sql/sql_select.cc: Fixed bug #8617. Queries with ROLLUP and LIMIT n returned more than n rows if SQL_CALC_FOUND_ROWS was used. mysql-test/t/olap.test: Added a test case for bug #8617. --- mysql-test/r/olap.result | 13 +++++++++++++ mysql-test/t/olap.test | 16 ++++++++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index fe83800f658..6500edf478f 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -379,3 +379,16 @@ a sum(b) 4 4 NULL 14 DROP TABLE t1; +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 VALUES +(1,4), +(2,2), (2,2), +(4,1), (4,1), (4,1), (4,1), +(2,1), (2,1); +SELECT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1; +a SUM(b) +1 4 +SELECT SQL_CALC_FOUND_ROWS a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1; +a SUM(b) +1 4 +DROP TABLE t1; diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test index 6778af3d533..3aac0f45ead 100644 --- a/mysql-test/t/olap.test +++ b/mysql-test/t/olap.test @@ -155,3 +155,19 @@ SELECT DISTINCT a, sum(b) FROM t1 GROUP BY a,b WITH ROLLUP; DROP TABLE t1; +# +# Tests for bugs #8617: SQL_CACL_FOUND_ROWS with rollup and limit +# + +CREATE TABLE t1 (a int, b int); + +INSERT INTO t1 VALUES + (1,4), + (2,2), (2,2), + (4,1), (4,1), (4,1), (4,1), + (2,1), (2,1); + +SELECT a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1; +SELECT SQL_CALC_FOUND_ROWS a, SUM(b) FROM t1 GROUP BY a WITH ROLLUP LIMIT 1; + +DROP TABLE t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5bfe1346568..4b2484d1e06 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9210,7 +9210,7 @@ int JOIN::rollup_send_data(uint idx) ref_pointer_array_size); if ((!having || having->val_int())) { - if (send_records < unit->select_limit_cnt && + if (send_records < unit->select_limit_cnt && do_send_rows && result->send_data(rollup.fields[i])) return 1; send_records++; From 8d29891138810d788848b02e317daba07e4c0d85 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Mar 2005 12:44:40 +0100 Subject: [PATCH 5/9] Move mis-placed assignments to their proper position. --- Build-tools/Do-compile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 3f9fb803468..12fd51f32bb 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -375,8 +375,8 @@ system("cd $pwd/$host; perl $ENV{HOME}/my_md5sum $tar_file_lite > ${tar_file_lit # # Unpack the binary distribution # -if ($opt_stage <= 4 && !$opt_no_test) $global_step= "extract binary distribution"; +if ($opt_stage <= 4 && !$opt_no_test) { log_timestamp("START"); rm_all(<$pwd/$host/test/*>); @@ -394,8 +394,8 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . # # Run the test suite # -if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) $global_step= "tests in default mode"; +if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) { log_timestamp("START"); my $flags= ""; From 7e79e70515f8f416df42ad095ab89cca9687b65f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Mar 2005 14:33:46 +0100 Subject: [PATCH 6/9] Did some SP test style changes and added explanatory comments, and removed a have_innodb.inc inclusion which was left by mistake in an earlier change. mysql-test/r/sp_trans.result: Changed procedure name and delimiter setting to follow the style of the other SP test files. mysql-test/t/sp-error.test: Added comment with hint for bug test case style. mysql-test/t/sp-threads.test: Added comments, with hint for bug test case style. mysql-test/t/sp.test: Removed have_innodb.inc inclusion. Added comments about different SP test files, table usage and hint for bug test case style. mysql-test/t/sp_trans.test: Changed procedure name and delimiter setting to follow the style of the other SP test files. --- mysql-test/r/sp_trans.result | 24 ++++++++++----------- mysql-test/t/sp-error.test | 9 ++++++++ mysql-test/t/sp-threads.test | 12 ++++++++++- mysql-test/t/sp.test | 24 +++++++++++++++++++-- mysql-test/t/sp_trans.test | 41 +++++++++++++++++++++++------------- 5 files changed, 80 insertions(+), 30 deletions(-) diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index 0a28fae3c0d..dee87979ff4 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -1,22 +1,22 @@ -drop procedure if exists sp1; +drop procedure if exists bug8850| create table t1 (a int) engine=innodb| -create procedure sp1 () +create procedure bug8850() begin truncate table t1; insert t1 values (1); rollback; end| -set autocommit=0; -insert t1 values (2); -call sp1(); +set autocommit=0| +insert t1 values (2)| +call bug8850()| ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction -commit; -select * from t1; +commit| +select * from t1| a 2 -call sp1(); +call bug8850()| ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction -set autocommit=1; -select * from t1; +set autocommit=1| +select * from t1| a 2 -drop table t1; -drop procedure sp1; +drop table t1| +drop procedure bug8850| diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 0f775958d7a..53783e7c9bf 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -680,6 +680,15 @@ begin end| +# +# BUG#NNNN: New bug synopsis +# +#--disable_warnings +#drop procedure if exists bugNNNN| +#--enable_warnings +#create procedure bugNNNN... + + drop table t1| delimiter ;| diff --git a/mysql-test/t/sp-threads.test b/mysql-test/t/sp-threads.test index 27888158f03..0ced60a610f 100644 --- a/mysql-test/t/sp-threads.test +++ b/mysql-test/t/sp-threads.test @@ -1,5 +1,6 @@ # -# Testing stored procedures with multiple connections +# Testing stored procedures with multiple connections, +# except security/privilege tests, they go to sp-security.test # connect (con1root,localhost,root,,); @@ -52,3 +53,12 @@ connection con1root; drop table t1; drop procedure bug4934; + +# +# BUG#NNNN: New bug synopsis +# +#--disable_warnings +#drop procedure if exists bugNNNN; +#--enable_warnings +#create procedure bugNNNN... + diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index fe00038a595..b8eb371931f 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -4,11 +4,22 @@ # Please keep this file free of --error cases and other # things that will not run in a single debugged mysqld # process (e.g. master-slave things). - --- source include/have_innodb.inc +# +# Test cases for bugs are added at the end. See template there. +# +# Tests that require --error go into sp-error.test +# Tests that require inndb go into sp_trans.test +# Tests that check privilege and security issues go to sp-security.test. +# Tests that require multiple connections, except security/privilege tests, +# go to sp-thread. use test; +# Test tables +# +# t1 and t2 are reused throughout the file, and dropped at the end. +# t3 and up are created and dropped when needed. +# --disable_warnings drop table if exists t1; --enable_warnings @@ -3387,6 +3398,15 @@ drop procedure bug8937| delete from t1| +# +# BUG#NNNN: New bug synopsis +# +#--disable_warnings +#drop procedure if exists bugNNNN| +#--enable_warnings +#create procedure bugNNNN... + + # Add bugs above this line. Use existing tables t1 and t2 when # practical, or create table t3, t3 etc temporarily (and drop them). delimiter ;| diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test index 30622027a94..f5b38ada674 100644 --- a/mysql-test/t/sp_trans.test +++ b/mysql-test/t/sp_trans.test @@ -4,32 +4,43 @@ -- source include/have_innodb.inc +delimiter |; + # -# BUG#8850 +# BUG#8850: Truncate table in a stored procedure locks the tables # --disable_warnings -drop procedure if exists sp1; +drop procedure if exists bug8850| --enable_warnings -delimiter |; create table t1 (a int) engine=innodb| -create procedure sp1 () +create procedure bug8850() begin truncate table t1; insert t1 values (1); rollback; end| -delimiter ;| -set autocommit=0; -insert t1 values (2); + +set autocommit=0| +insert t1 values (2)| --error 1192 -call sp1(); -commit; -select * from t1; +call bug8850()| +commit| +select * from t1| # # when CALL will be fixed to not start a transaction, the error should # go away --error 1192 -call sp1(); -set autocommit=1; -select * from t1; -drop table t1; -drop procedure sp1; +call bug8850()| +set autocommit=1| +select * from t1| +drop table t1| +drop procedure bug8850| + +# +# BUG#NNNN: New bug synopsis +# +#--disable_warnings +#drop procedure if exists bugNNNN| +#--enable_warnings +#create procedure bugNNNN... + +delimiter ;| From 1cc46f6786cb044b09ac21dba80443545d698f30 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Mar 2005 16:48:18 +0100 Subject: [PATCH 7/9] mysql-test-run.sh: Disabled old feature to disable test cases mysql-test/mysql-test-run.sh: Disabled old feature to disable test cases --- mysql-test/mysql-test-run.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 92561496544..e4343807124 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1535,12 +1535,12 @@ run_testcase () return fi - if [ -f "$TESTDIR/$tname.disabled" ] - then - comment=`$CAT $TESTDIR/$tname.disabled`; - disable_test $tname "$comment" - return - fi +# if [ -f "$TESTDIR/$tname.disabled" ] +# then +# comment=`$CAT $TESTDIR/$tname.disabled`; +# disable_test $tname "$comment" +# return +# fi if [ -f "$TESTDIR/disabled.def" ] ; then comment=`$GREP "^$tname *: *" $TESTDIR/disabled.def`; if [ -n "$comment" ] From 6c621bbd7f6a62641f21994ad6371494491538ca Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Mar 2005 16:52:41 +0100 Subject: [PATCH 8/9] Fixed BUG#6600: Stored procedure crash after repeated calls with check table mysql-test/r/sp.result: New test case for BUG#6600. mysql-test/t/sp.test: New test case for BUG#6600. sql/sp_head.cc: Added yet another multiple result set statement to the list. sql/sql_parse.cc: Have to invalidate SP caches in CHECK TABLE, or it will produce very strange results when called in SPs. --- mysql-test/r/sp.result | 19 +++++++++++++++++++ mysql-test/t/sp.test | 22 ++++++++++++++++++++++ sql/sp_head.cc | 1 + sql/sql_parse.cc | 2 ++ 4 files changed, 44 insertions(+) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 5366ecb2be3..b2a1af03c9f 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -2777,4 +2777,23 @@ a 3.2000 drop procedure bug8937| delete from t1| +drop procedure if exists bug6600| +drop table if exists t3| +drop view if exists v1| +create table t3 (s1 decimal(31,30))| +create view v1 as select * from t3| +create procedure bug6600() +check table v1| +call bug6600()| +Table Op Msg_type Msg_text +test.v1 check status OK +call bug6600()| +Table Op Msg_type Msg_text +test.v1 check status OK +call bug6600()| +Table Op Msg_type Msg_text +test.v1 check status OK +drop procedure bug6600| +drop view v1| +drop table t3| drop table t1,t2; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index b8eb371931f..5c2e02045c5 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -3398,6 +3398,28 @@ drop procedure bug8937| delete from t1| +# +# BUG#6600: Stored procedure crash after repeated calls with check table +# +--disable_warnings +drop procedure if exists bug6600| +drop table if exists t3| +drop view if exists v1| +--enable_warnings +create table t3 (s1 decimal(31,30))| +create view v1 as select * from t3| + +create procedure bug6600() + check table v1| + +call bug6600()| +call bug6600()| +call bug6600()| +drop procedure bug6600| +drop view v1| +drop table t3| + + # # BUG#NNNN: New bug synopsis # diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 89c4b2dbaac..037ef0b70ca 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -58,6 +58,7 @@ sp_multi_results_command(enum enum_sql_command cmd) { switch (cmd) { case SQLCOM_ANALYZE: + case SQLCOM_CHECK: case SQLCOM_CHECKSUM: case SQLCOM_HA_READ: case SQLCOM_SHOW_BINLOGS: diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index cc5bd90e4f2..d968f111134 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -27,6 +27,7 @@ #include "sp_head.h" #include "sp.h" +#include "sp_cache.h" #ifdef HAVE_OPENSSL /* @@ -3045,6 +3046,7 @@ unsent_create_error: goto error; /* purecov: inspected */ thd->slow_command=TRUE; res = mysql_check_table(thd, first_table, &lex->check_opt); + sp_cache_invalidate(); break; } case SQLCOM_ANALYZE: From b8cd76af50acfeba25f17603b1810bb6c9003274 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Mar 2005 17:24:03 +0100 Subject: [PATCH 9/9] - removed MyISAM RAID from the Linux "Max" RPMs --- support-files/mysql.spec.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b062930041a..1231df6a1a5 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -214,7 +214,6 @@ Optional MySQL server binary that supports additional features like: - CSV Storage Engine - Example Storage Engine - Federated Storage Engine - - MyISAM RAID - User Defined Functions (UDFs). To activate this binary, just install this package in addition to @@ -328,7 +327,6 @@ BuildMySQL "--enable-shared \ --with-berkeley-db \ --with-innodb \ --with-ndbcluster \ - --with-raid \ --with-archive \ --with-csv-storage-engine \ --with-example-storage-engine \ @@ -694,9 +692,14 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Fri Mar 18 2005 Lenz Grimmer + +- Disabled RAID in the Max binares once and for all (it has finally been removed + from the source tree) + * Sun Feb 20 2005 Petr Chardin -- Install MySQL Instance Manager together with mysqld, toch mysqlmanager +- Install MySQL Instance Manager together with mysqld, touch mysqlmanager password file * Mon Feb 14 2005 Lenz Grimmer