Merge mysqldev@production:my/build-200803311521-5.1.24-rc/mysql-5.1-release

into  ramayana.hindu.god:/home/tsmith/m/bk/bugteam/mrg/51
This commit is contained in:
tsmith@ramayana.hindu.god 2008-04-28 21:23:29 -06:00
commit ee3e6afa18
37 changed files with 349 additions and 201 deletions

View file

@ -19,11 +19,24 @@ EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
# automake only seems to take care of this automatically, # automake only seems to take care of this automatically,
# if we're building the info page from texi directly. # if we're building the info page from texi directly.
install-data-hook: $(srcdir)/mysql.info install-data-hook: $(srcdir)/mysql.info
$(mkinstalldirs) $(DESTDIR)$(infodir) if test `basename $(prefix)` = "mysql" ; then \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) $(mkinstalldirs) $(DESTDIR)$(prefix)/docs ; \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(prefix)/docs ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(prefix)/docs ; \
else \
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(pkgdatadir) ; \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(pkgdatadir) ; \
fi
uninstall-local: uninstall-local:
@RM@ -f $(DESTDIR)$(infodir)/mysql.info if test `basename $(prefix)` = "mysql" ; then \
@RM@ -f $(DESTDIR)$(prefix)/docs/mysql.info ; \
@RM@ -f $(DESTDIR)$(prefix)/docs/ChangeLog ; \
else \
@RM@ -f $(DESTDIR)$(infodir)/mysql.info ; \
@RM@ -f $(DESTDIR)$(pkgdatadir)/ChangeLog ; \
fi
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%

View file

@ -132,15 +132,33 @@ test-bt:
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ps --force --timer \ @PERL@ ./mysql-test-run.pl --comment=ps --force --timer \
--skip-ndbcluster --ps-protocol --skip-ndbcluster --ps-protocol
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
cd mysql-test ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb+rpl_ndb+ps --force --timer \
--ps-protocol --mysqld=--binlog-format=row --suite=ndb,rpl_ndb ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
--with-ndbcluster-only ; \
else \
echo "no program found for 'ndbcluster' tests - skipped testing" ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=normal+rowrepl --force --timer \ @PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --suite=funcs_1
--skip-ndbcluster --mysqld=--binlog-format=row
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ps+rowrepl+NDB --force --timer \ @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2
--ps-protocol --mysqld=--binlog-format=row
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=NDB --force --timer \ @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts
--with-ndbcluster-only -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist ; \
fi
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=nist+ps --force --suite=nist --ps-protocol ; \
fi
-if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \ -if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \ cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \ @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
@ -148,24 +166,6 @@ test-bt:
else \ else \
echo "no program found for 'embedded' tests - skipped testing" ; \ echo "no program found for 'embedded' tests - skipped testing" ; \
fi fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=rpl --suite=rpl
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=NIST+normal --force --suite=nist ; \
fi
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
# Re-enable the "jp" suite when bug#28563 is fixed # Re-enable the "jp" suite when bug#28563 is fixed
# -cd mysql-test ; MTR_BUILD_THREAD=auto \ # -cd mysql-test ; MTR_BUILD_THREAD=auto \

View file

@ -187,7 +187,7 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc ../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc ../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
../sql/partition_info.cc ../sql/sql_connect.cc ../sql/partition_info.cc ../sql/sql_connect.cc
../sql/scheduler.cc ../sql/scheduler.cc ../sql/stacktrace.c
${GEN_SOURCES} ${GEN_SOURCES}
${LIB_SOURCES}) ${LIB_SOURCES})

View file

@ -1124,6 +1124,9 @@ bool Protocol::net_store_data(const uchar *from, size_t length)
return FALSE; return FALSE;
} }
#if defined(_MSC_VER) && _MSC_VER < 1400
#define vsnprintf _vsnprintf
#endif
int vprint_msg_to_log(enum loglevel level __attribute__((unused)), int vprint_msg_to_log(enum loglevel level __attribute__((unused)),
const char *format, va_list argsi) const char *format, va_list argsi)

View file

@ -3,7 +3,7 @@ connection slave;
#(the server was started with skip-slave-start) #(the server was started with skip-slave-start)
--disable_warnings --disable_warnings
stop slave; stop slave;
--wait_for_slave_to_stop source include/wait_for_slave_to_stop.inc;
--enable_warnings --enable_warnings
connection master; connection master;
--disable_warnings --disable_warnings
@ -20,3 +20,4 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings --enable_warnings
start slave; start slave;
source include/wait_for_slave_to_start.inc;

View file

@ -1,6 +1,6 @@
flush status; flush status;
set query_cache_type=DEMAND; set query_cache_type=DEMAND;
set global query_cache_size= 1024*1024*512; set global query_cache_size= 1024*768;
drop table if exists t1; drop table if exists t1;
create table t1 (a varchar(100)); create table t1 (a varchar(100));
insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');

View file

@ -16,3 +16,33 @@ ERROR HY000: The MySQL server is running with the --read-only option so it canno
set global read_only=0; set global read_only=0;
drop table table_11733 ; drop table table_11733 ;
drop user test@localhost; drop user test@localhost;
GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
CREATE TABLE t1(a INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (0), (1);
SET GLOBAL read_only=1;
SELECT * FROM t1;
a
0
1
BEGIN;
SELECT * FROM t1;
a
0
1
COMMIT;
SET GLOBAL read_only=0;
FLUSH TABLES WITH READ LOCK;
SELECT * FROM t1;
a
0
1
BEGIN;
SELECT * FROM t1;
a
0
1
COMMIT;
UNLOCK TABLES;
DROP TABLE t1;
DROP USER test@localhost;
echo End of 5.1 tests

View file

@ -47,10 +47,10 @@ SELECT *
FROM information_schema.collations FROM information_schema.collations
ORDER BY collation_name; ORDER BY collation_name;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
armscii8_bin armscii8 64 Yes 1 armscii8_bin armscii8 64 0
armscii8_general_ci armscii8 32 Yes Yes 1 armscii8_general_ci armscii8 32 Yes 0
ascii_bin ascii 65 Yes 1 ascii_bin ascii 65 0
ascii_general_ci ascii 11 Yes Yes 1 ascii_general_ci ascii 11 Yes 0
big5_bin big5 84 Yes 1 big5_bin big5 84 Yes 1
big5_chinese_ci big5 1 Yes Yes 1 big5_chinese_ci big5 1 Yes Yes 1
binary binary 63 Yes Yes 1 binary binary 63 Yes Yes 1
@ -58,26 +58,27 @@ cp1250_bin cp1250 66 Yes 1
cp1250_croatian_ci cp1250 44 Yes 1 cp1250_croatian_ci cp1250 44 Yes 1
cp1250_czech_cs cp1250 34 Yes 2 cp1250_czech_cs cp1250 34 Yes 2
cp1250_general_ci cp1250 26 Yes Yes 1 cp1250_general_ci cp1250 26 Yes Yes 1
cp1251_bin cp1251 50 Yes 1 cp1250_polish_ci cp1250 99 Yes 1
cp1251_bulgarian_ci cp1251 14 Yes 1 cp1251_bin cp1251 50 0
cp1251_general_ci cp1251 51 Yes Yes 1 cp1251_bulgarian_ci cp1251 14 0
cp1251_general_cs cp1251 52 Yes 1 cp1251_general_ci cp1251 51 Yes 0
cp1251_ukrainian_ci cp1251 23 Yes 1 cp1251_general_cs cp1251 52 0
cp1256_bin cp1256 67 Yes 1 cp1251_ukrainian_ci cp1251 23 0
cp1256_general_ci cp1256 57 Yes Yes 1 cp1256_bin cp1256 67 0
cp1257_bin cp1257 58 Yes 1 cp1256_general_ci cp1256 57 Yes 0
cp1257_general_ci cp1257 59 Yes Yes 1 cp1257_bin cp1257 58 0
cp1257_lithuanian_ci cp1257 29 Yes 1 cp1257_general_ci cp1257 59 Yes 0
cp850_bin cp850 80 Yes 1 cp1257_lithuanian_ci cp1257 29 0
cp850_general_ci cp850 4 Yes Yes 1 cp850_bin cp850 80 0
cp852_bin cp852 81 Yes 1 cp850_general_ci cp850 4 Yes 0
cp852_general_ci cp852 40 Yes Yes 1 cp852_bin cp852 81 0
cp866_bin cp866 68 Yes 1 cp852_general_ci cp852 40 Yes 0
cp866_general_ci cp866 36 Yes Yes 1 cp866_bin cp866 68 0
cp866_general_ci cp866 36 Yes 0
cp932_bin cp932 96 Yes 1 cp932_bin cp932 96 Yes 1
cp932_japanese_ci cp932 95 Yes Yes 1 cp932_japanese_ci cp932 95 Yes Yes 1
dec8_bin dec8 69 Yes 1 dec8_bin dec8 69 0
dec8_swedish_ci dec8 3 Yes Yes 1 dec8_swedish_ci dec8 3 Yes 0
eucjpms_bin eucjpms 98 Yes 1 eucjpms_bin eucjpms 98 Yes 1
eucjpms_japanese_ci eucjpms 97 Yes Yes 1 eucjpms_japanese_ci eucjpms 97 Yes Yes 1
euckr_bin euckr 85 Yes 1 euckr_bin euckr 85 Yes 1
@ -86,20 +87,20 @@ gb2312_bin gb2312 86 Yes 1
gb2312_chinese_ci gb2312 24 Yes Yes 1 gb2312_chinese_ci gb2312 24 Yes Yes 1
gbk_bin gbk 87 Yes 1 gbk_bin gbk 87 Yes 1
gbk_chinese_ci gbk 28 Yes Yes 1 gbk_chinese_ci gbk 28 Yes Yes 1
geostd8_bin geostd8 93 Yes 1 geostd8_bin geostd8 93 0
geostd8_general_ci geostd8 92 Yes Yes 1 geostd8_general_ci geostd8 92 Yes 0
greek_bin greek 70 Yes 1 greek_bin greek 70 0
greek_general_ci greek 25 Yes Yes 1 greek_general_ci greek 25 Yes 0
hebrew_bin hebrew 71 Yes 1 hebrew_bin hebrew 71 0
hebrew_general_ci hebrew 16 Yes Yes 1 hebrew_general_ci hebrew 16 Yes 0
hp8_bin hp8 72 Yes 1 hp8_bin hp8 72 0
hp8_english_ci hp8 6 Yes Yes 1 hp8_english_ci hp8 6 Yes 0
keybcs2_bin keybcs2 73 Yes 1 keybcs2_bin keybcs2 73 0
keybcs2_general_ci keybcs2 37 Yes Yes 1 keybcs2_general_ci keybcs2 37 Yes 0
koi8r_bin koi8r 74 Yes 1 koi8r_bin koi8r 74 0
koi8r_general_ci koi8r 7 Yes Yes 1 koi8r_general_ci koi8r 7 Yes 0
koi8u_bin koi8u 75 Yes 1 koi8u_bin koi8u 75 0
koi8u_general_ci koi8u 22 Yes Yes 1 koi8u_general_ci koi8u 22 Yes 0
latin1_bin latin1 47 Yes 1 latin1_bin latin1 47 Yes 1
latin1_danish_ci latin1 15 Yes 1 latin1_danish_ci latin1 15 Yes 1
latin1_general_ci latin1 48 Yes 1 latin1_general_ci latin1 48 Yes 1
@ -113,20 +114,20 @@ latin2_croatian_ci latin2 27 Yes 1
latin2_czech_cs latin2 2 Yes 4 latin2_czech_cs latin2 2 Yes 4
latin2_general_ci latin2 9 Yes Yes 1 latin2_general_ci latin2 9 Yes Yes 1
latin2_hungarian_ci latin2 21 Yes 1 latin2_hungarian_ci latin2 21 Yes 1
latin5_bin latin5 78 Yes 1 latin5_bin latin5 78 0
latin5_turkish_ci latin5 30 Yes Yes 1 latin5_turkish_ci latin5 30 Yes 0
latin7_bin latin7 79 Yes 1 latin7_bin latin7 79 0
latin7_estonian_cs latin7 20 Yes 1 latin7_estonian_cs latin7 20 0
latin7_general_ci latin7 41 Yes Yes 1 latin7_general_ci latin7 41 Yes 0
latin7_general_cs latin7 42 Yes 1 latin7_general_cs latin7 42 0
macce_bin macce 43 Yes 1 macce_bin macce 43 0
macce_general_ci macce 38 Yes Yes 1 macce_general_ci macce 38 Yes 0
macroman_bin macroman 53 Yes 1 macroman_bin macroman 53 0
macroman_general_ci macroman 39 Yes Yes 1 macroman_general_ci macroman 39 Yes 0
sjis_bin sjis 88 Yes 1 sjis_bin sjis 88 Yes 1
sjis_japanese_ci sjis 13 Yes Yes 1 sjis_japanese_ci sjis 13 Yes Yes 1
swe7_bin swe7 82 Yes 1 swe7_bin swe7 82 0
swe7_swedish_ci swe7 10 Yes Yes 1 swe7_swedish_ci swe7 10 Yes 0
tis620_bin tis620 89 Yes 1 tis620_bin tis620 89 Yes 1
tis620_thai_ci tis620 18 Yes Yes 4 tis620_thai_ci tis620 18 Yes Yes 4
ucs2_bin ucs2 90 Yes 1 ucs2_bin ucs2 90 Yes 1
@ -190,6 +191,7 @@ cp1250_bin cp1250
cp1250_croatian_ci cp1250 cp1250_croatian_ci cp1250
cp1250_czech_cs cp1250 cp1250_czech_cs cp1250
cp1250_general_ci cp1250 cp1250_general_ci cp1250
cp1250_polish_ci cp1250
cp1251_bin cp1251 cp1251_bin cp1251
cp1251_bulgarian_ci cp1251 cp1251_bulgarian_ci cp1251
cp1251_general_ci cp1251 cp1251_general_ci cp1251
@ -214,6 +216,7 @@ eucjpms_bin eucjpms
eucjpms_japanese_ci eucjpms eucjpms_japanese_ci eucjpms
euckr_bin euckr euckr_bin euckr
euckr_korean_ci euckr euckr_korean_ci euckr
filename filename
gb2312_bin gb2312 gb2312_bin gb2312
gb2312_chinese_ci gb2312 gb2312_chinese_ci gb2312
gbk_bin gbk gbk_bin gbk

View file

@ -14309,10 +14309,7 @@ declare continue handler for cond1 set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.45: Testcase 4.2.45:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -14387,10 +14384,7 @@ declare continue handler for sqlstate '00000' set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.52: Testcase 4.2.52:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -23493,6 +23487,7 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
Testcase 4.11.40: Testcase 4.11.40:
@ -23530,9 +23525,9 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
CALL h1(); CALL h1();
@x x1 ERROR 42000: PROCEDURE db_storedproc.h1 does not exist
0 2
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
* Testcase 3.1.2.53 (4.11.42): * Testcase 3.1.2.53 (4.11.42):

View file

@ -586,14 +586,9 @@ SELECT @var3, @var4;
END begin2_label; END begin2_label;
SELECT @var1, @var2; SELECT @var1, @var2;
END begin1_label// END begin1_label//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var3 @var4
NULL 8
@var1 @var2
NULL 6
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE h1; DROP PROCEDURE h1;
DROP PROCEDURE sp1;
DROP TABLE res_t1; DROP TABLE res_t1;
Testcase 3.1.2.50: Testcase 3.1.2.50:

View file

@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row

View file

@ -176,7 +176,7 @@ NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 19
NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select

View file

@ -14309,10 +14309,7 @@ declare continue handler for cond1 set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.45: Testcase 4.2.45:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -14387,10 +14384,7 @@ declare continue handler for sqlstate '00000' set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.52: Testcase 4.2.52:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -23471,6 +23465,7 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
Testcase 4.11.40: Testcase 4.11.40:
@ -23508,9 +23503,9 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
CALL h1(); CALL h1();
@x x1 ERROR 42000: PROCEDURE db_storedproc.h1 does not exist
0 2
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
* Testcase 3.1.2.53 (4.11.42): * Testcase 3.1.2.53 (4.11.42):

View file

@ -586,14 +586,9 @@ SELECT @var3, @var4;
END begin2_label; END begin2_label;
SELECT @var1, @var2; SELECT @var1, @var2;
END begin1_label// END begin1_label//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var3 @var4
NULL 8
@var1 @var2
NULL 6
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE h1; DROP PROCEDURE h1;
DROP PROCEDURE sp1;
DROP TABLE res_t1; DROP TABLE res_t1;
Testcase 3.1.2.50: Testcase 3.1.2.50:

View file

@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row

View file

@ -14309,10 +14309,7 @@ declare continue handler for cond1 set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.45: Testcase 4.2.45:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -14387,10 +14384,7 @@ declare continue handler for sqlstate '00000' set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.52: Testcase 4.2.52:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -23493,6 +23487,7 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
Testcase 4.11.40: Testcase 4.11.40:
@ -23530,9 +23525,9 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
CALL h1(); CALL h1();
@x x1 ERROR 42000: PROCEDURE db_storedproc.h1 does not exist
0 2
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
* Testcase 3.1.2.53 (4.11.42): * Testcase 3.1.2.53 (4.11.42):

View file

@ -586,14 +586,9 @@ SELECT @var3, @var4;
END begin2_label; END begin2_label;
SELECT @var1, @var2; SELECT @var1, @var2;
END begin1_label// END begin1_label//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var3 @var4
NULL 8
@var1 @var2
NULL 6
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE h1; DROP PROCEDURE h1;
DROP PROCEDURE sp1;
DROP TABLE res_t1; DROP TABLE res_t1;
Testcase 3.1.2.50: Testcase 3.1.2.50:

View file

@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row

View file

@ -14309,10 +14309,7 @@ declare continue handler for cond1 set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.45: Testcase 4.2.45:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -14387,10 +14384,7 @@ declare continue handler for sqlstate '00000' set @var2 = 1;
set @x=1; set @x=1;
SELECT @var2; SELECT @var2;
END// END//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var2
NULL
DROP PROCEDURE sp1;
Testcase 4.2.52: Testcase 4.2.52:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -23495,6 +23489,7 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
Testcase 4.11.40: Testcase 4.11.40:
@ -23532,9 +23527,9 @@ set x1 = 2;
END; END;
SELECT @x, x1; SELECT @x, x1;
END// END//
ERROR 42000: Bad SQLSTATE: '00000'
CALL h1(); CALL h1();
@x x1 ERROR 42000: PROCEDURE db_storedproc.h1 does not exist
0 2
DROP PROCEDURE IF EXISTS h1; DROP PROCEDURE IF EXISTS h1;
* Testcase 3.1.2.53 (4.11.42): * Testcase 3.1.2.53 (4.11.42):

View file

@ -586,14 +586,9 @@ SELECT @var3, @var4;
END begin2_label; END begin2_label;
SELECT @var1, @var2; SELECT @var1, @var2;
END begin1_label// END begin1_label//
CALL sp1(); ERROR 42000: Bad SQLSTATE: '00000'
@var3 @var4
NULL 8
@var1 @var2
NULL 6
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE h1; DROP PROCEDURE h1;
DROP PROCEDURE sp1;
DROP TABLE res_t1; DROP TABLE res_t1;
Testcase 3.1.2.50: Testcase 3.1.2.50:

View file

@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row

View file

@ -696,6 +696,7 @@ delimiter ;//
CALL h1(); CALL h1();
--error ER_SP_BAD_SQLSTATE
delimiter //; delimiter //;
CREATE PROCEDURE sp1() CREATE PROCEDURE sp1()
begin1_label:BEGIN begin1_label:BEGIN
@ -710,12 +711,9 @@ CREATE PROCEDURE sp1()
END begin1_label// END begin1_label//
delimiter ;// delimiter ;//
CALL sp1();
# cleanup 3.1.2.45+50 # cleanup 3.1.2.45+50
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE h1; DROP PROCEDURE h1;
DROP PROCEDURE sp1;
DROP TABLE res_t1; DROP TABLE res_t1;

View file

@ -17235,6 +17235,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings --enable_warnings
delimiter //; delimiter //;
--error ER_SP_BAD_SQLSTATE
CREATE PROCEDURE sp1() CREATE PROCEDURE sp1()
BEGIN BEGIN
declare cond1 condition for sqlstate '00000'; declare cond1 condition for sqlstate '00000';
@ -17244,11 +17245,6 @@ BEGIN
END// END//
delimiter ;// delimiter ;//
CALL sp1();
# cleanup
DROP PROCEDURE sp1;
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
let $message= Testcase 4.2.45:; let $message= Testcase 4.2.45:;
@ -17388,6 +17384,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings --enable_warnings
delimiter //; delimiter //;
--error ER_SP_BAD_SQLSTATE
CREATE PROCEDURE sp1() CREATE PROCEDURE sp1()
BEGIN BEGIN
declare continue handler for sqlstate '00000' set @var2 = 1; declare continue handler for sqlstate '00000' set @var2 = 1;
@ -17396,12 +17393,6 @@ BEGIN
END// END//
delimiter ;// delimiter ;//
CALL sp1();
# cleanup
DROP PROCEDURE sp1;
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
let $message= Testcase 4.2.52:; let $message= Testcase 4.2.52:;
@ -29245,6 +29236,7 @@ DROP PROCEDURE IF EXISTS h1;
--enable_warnings --enable_warnings
delimiter //; delimiter //;
--error ER_SP_BAD_SQLSTATE
CREATE PROCEDURE h1 () CREATE PROCEDURE h1 ()
BEGIN BEGIN
declare x1 int default 0; declare x1 int default 0;
@ -29320,6 +29312,7 @@ DROP PROCEDURE IF EXISTS h1;
--enable_warnings --enable_warnings
delimiter //; delimiter //;
--error ER_SP_BAD_SQLSTATE
CREATE PROCEDURE h1 () CREATE PROCEDURE h1 ()
BEGIN BEGIN
declare x1 int default 0; declare x1 int default 0;

View file

@ -417,3 +417,17 @@ Log_name Pos Event_type Server_id End_log_pos Info
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2 ORDER BY a;
a a
DROP TABLE t1,t2; DROP TABLE t1,t2;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(1);
CREATE TABLE t2 (a INT UNIQUE) ENGINE=INNODB SELECT * FROM t1;
ERROR 23000: Duplicate entry '1' for key 'a'
INSERT INTO t1 VALUES (2);
*** the proof of the fix:
select must show that the last insert performed on the slave ***
SELECT * FROM t1;
a
1
1
2
DROP TABLE t1;
end of the tests

View file

@ -12,3 +12,4 @@
rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master
rpl_innodb_bug28430 : Bug #32247 2007-11-27 mats Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table) rpl_innodb_bug28430 : Bug #32247 2007-11-27 mats Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table)
rpl_redirect : Failure is sporadic and and the test is superfluous (mats)

View file

@ -18,10 +18,13 @@ let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With
# Wait until all the 5000 inserts has been inserted into the table # Wait until all the 5000 inserts has been inserted into the table
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1; let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
--source include/wait_condition.inc source include/wait_condition.inc;
SELECT COUNT(*) FROM mysqlslap.t1; SELECT COUNT(*) FROM mysqlslap.t1;
sync_slave_with_master;
connection slave;
# Wait until all the 5000 inserts has been inserted into the table
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
source include/wait_condition.inc;
SELECT COUNT(*) FROM mysqlslap.t1; SELECT COUNT(*) FROM mysqlslap.t1;
--echo # --echo #

View file

@ -234,3 +234,30 @@ SELECT * FROM t2 ORDER BY a;
connection master; connection master;
DROP TABLE t1,t2; DROP TABLE t1,t2;
sync_slave_with_master; sync_slave_with_master;
#
# bug#35762 Failing CREATE-SELECT produces bad binlog in row mode
#
connection master;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(1);
--error ER_DUP_ENTRY
CREATE TABLE t2 (a INT UNIQUE) ENGINE=INNODB SELECT * FROM t1;
INSERT INTO t1 VALUES (2);
sync_slave_with_master;
# connection slave;
--echo *** the proof of the fix:
--echo select must show that the last insert performed on the slave ***
SELECT * FROM t1;
connection master;
DROP TABLE t1;
sync_slave_with_master;
--echo end of the tests

View file

@ -7,7 +7,7 @@
# #
flush status; flush status;
set query_cache_type=DEMAND; set query_cache_type=DEMAND;
set global query_cache_size= 1024*1024*512; set global query_cache_size= 1024*768;
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings

View file

@ -41,3 +41,45 @@ set global read_only=0;
drop table table_11733 ; drop table table_11733 ;
drop user test@localhost; drop user test@localhost;
disconnect con1;
#
# Bug #35732: read-only blocks SELECT statements in InnoDB
#
# Test 1: read only mode
GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
connect(con1, localhost, test, , test);
connection default;
CREATE TABLE t1(a INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (0), (1);
SET GLOBAL read_only=1;
connection con1;
SELECT * FROM t1;
BEGIN;
SELECT * FROM t1;
COMMIT;
connection default;
SET GLOBAL read_only=0;
#
# Test 2: global read lock
#
FLUSH TABLES WITH READ LOCK;
connection con1;
SELECT * FROM t1;
BEGIN;
SELECT * FROM t1;
COMMIT;
connection default;
UNLOCK TABLES;
DROP TABLE t1;
DROP USER test@localhost;
disconnect con1;
--echo echo End of 5.1 tests

View file

@ -433,7 +433,10 @@ ALTER TABLE db MODIFY Event_priv enum('N','Y') character set utf8 DEFAULT 'N' NO
# #
ALTER TABLE event DROP PRIMARY KEY; ALTER TABLE event DROP PRIMARY KEY;
ALTER TABLE event ADD PRIMARY KEY(db, name); ALTER TABLE event ADD PRIMARY KEY(db, name);
ALTER TABLE event ADD sql_mode # Add sql_mode column just in case.
ALTER TABLE event ADD sql_mode set ('NOT_USED') AFTER on_completion;
# Update list of sql_mode values.
ALTER TABLE event MODIFY sql_mode
set('REAL_AS_FLOAT', set('REAL_AS_FLOAT',
'PIPES_AS_CONCAT', 'PIPES_AS_CONCAT',
'ANSI_QUOTES', 'ANSI_QUOTES',

View file

@ -54,7 +54,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
procedure.h sql_class.h sql_lex.h sql_list.h \ procedure.h sql_class.h sql_lex.h sql_list.h \
sql_map.h sql_string.h unireg.h \ sql_map.h sql_string.h unireg.h \
sql_error.h field.h handler.h mysqld_suffix.h \ sql_error.h field.h handler.h mysqld_suffix.h \
sql_profile.h \ sql_profile.h \
ha_ndbcluster.h ha_ndbcluster_cond.h \ ha_ndbcluster.h ha_ndbcluster_cond.h \
ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \ ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \
ha_partition.h rpl_constants.h \ ha_partition.h rpl_constants.h \
@ -178,6 +178,12 @@ lex_hash.h: gen_lex_hash.cc lex.h
udf_example_la_SOURCES= udf_example.c udf_example_la_SOURCES= udf_example.c
udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)
# We might have some stuff not built in this build, but that we want to install
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(libexecdir) $(DESTDIR)$(pkglibdir)
test ! -x mysqld-debug$(EXEEXT) || $(INSTALL_PROGRAM) mysqld-debug$(EXEEXT) $(DESTDIR)$(libexecdir)
test ! -f mysqld-debug.sym.gz || $(INSTALL_DATA) mysqld-debug.sym.gz $(DESTDIR)$(pkglibdir)
test ! -f mysqld.sym.gz || $(INSTALL_DATA) mysqld.sym.gz $(DESTDIR)$(pkglibdir)
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%

View file

@ -952,16 +952,21 @@ int ha_prepare(THD *thd)
A helper function to evaluate if two-phase commit is mandatory. A helper function to evaluate if two-phase commit is mandatory.
As a side effect, propagates the read-only/read-write flags As a side effect, propagates the read-only/read-write flags
of the statement transaction to its enclosing normal transaction. of the statement transaction to its enclosing normal transaction.
If we have at least two engines with read-write changes we must
run a two-phase commit. Otherwise we can run several independent
commits as the only transactional engine has read-write changes
and others are read-only.
@retval TRUE we must run a two-phase commit. Returned @retval 0 All engines are read-only.
if we have at least two engines with read-write changes. @retval 1 We have the only engine with read-write changes.
@retval FALSE Don't need two-phase commit. Even if we have two @retval >1 More than one engine have read-write changes.
transactional engines, we can run two independent Note: return value might NOT be the exact number of
commits if changes in one of the engines are read-only. engines with read-write changes.
*/ */
static static
bool uint
ha_check_and_coalesce_trx_read_only(THD *thd, Ha_trx_info *ha_list, ha_check_and_coalesce_trx_read_only(THD *thd, Ha_trx_info *ha_list,
bool all) bool all)
{ {
@ -998,7 +1003,7 @@ ha_check_and_coalesce_trx_read_only(THD *thd, Ha_trx_info *ha_list,
break; break;
} }
} }
return rw_ha_count > 1; return rw_ha_count;
} }
@ -1061,25 +1066,8 @@ int ha_commit_trans(THD *thd, bool all)
#ifdef USING_TRANSACTIONS #ifdef USING_TRANSACTIONS
if (ha_info) if (ha_info)
{ {
bool must_2pc; uint rw_ha_count;
bool rw_trans;
if (is_real_trans && wait_if_global_read_lock(thd, 0, 0))
{
ha_rollback_trans(thd, all);
DBUG_RETURN(1);
}
if ( is_real_trans
&& opt_readonly
&& ! (thd->security_ctx->master_access & SUPER_ACL)
&& ! thd->slave_thread
)
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
ha_rollback_trans(thd, all);
error= 1;
goto end;
}
DBUG_EXECUTE_IF("crash_commit_before", abort();); DBUG_EXECUTE_IF("crash_commit_before", abort(););
@ -1087,9 +1075,29 @@ int ha_commit_trans(THD *thd, bool all)
if (is_real_trans) /* not a statement commit */ if (is_real_trans) /* not a statement commit */
thd->stmt_map.close_transient_cursors(); thd->stmt_map.close_transient_cursors();
must_2pc= ha_check_and_coalesce_trx_read_only(thd, ha_info, all); rw_ha_count= ha_check_and_coalesce_trx_read_only(thd, ha_info, all);
/* rw_trans is TRUE when we in a transaction changing data */
rw_trans= is_real_trans && (rw_ha_count > 0);
if (!trans->no_2pc && must_2pc) if (rw_trans &&
wait_if_global_read_lock(thd, 0, 0))
{
ha_rollback_trans(thd, all);
DBUG_RETURN(1);
}
if (rw_trans &&
opt_readonly &&
!(thd->security_ctx->master_access & SUPER_ACL) &&
!thd->slave_thread)
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
ha_rollback_trans(thd, all);
error= 1;
goto end;
}
if (!trans->no_2pc && (rw_ha_count > 1))
{ {
for (; ha_info && !error; ha_info= ha_info->next()) for (; ha_info && !error; ha_info= ha_info->next())
{ {
@ -1129,7 +1137,7 @@ int ha_commit_trans(THD *thd, bool all)
tc_log->unlog(cookie, xid); tc_log->unlog(cookie, xid);
DBUG_EXECUTE_IF("crash_commit_after", abort();); DBUG_EXECUTE_IF("crash_commit_after", abort(););
end: end:
if (is_real_trans) if (rw_trans)
start_waiting_global_read_lock(thd); start_waiting_global_read_lock(thd);
} }
#endif /* USING_TRANSACTIONS */ #endif /* USING_TRANSACTIONS */

View file

@ -1533,6 +1533,7 @@ void start_waiting_global_read_lock(THD *thd)
if (unlikely(thd->global_read_lock)) if (unlikely(thd->global_read_lock))
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
(void) pthread_mutex_lock(&LOCK_global_read_lock); (void) pthread_mutex_lock(&LOCK_global_read_lock);
DBUG_ASSERT(protect_against_global_read_lock);
tmp= (!--protect_against_global_read_lock && tmp= (!--protect_against_global_read_lock &&
(waiting_for_read_lock || global_read_lock_blocks_commit)); (waiting_for_read_lock || global_read_lock_blocks_commit));
(void) pthread_mutex_unlock(&LOCK_global_read_lock); (void) pthread_mutex_unlock(&LOCK_global_read_lock);

View file

@ -1948,6 +1948,7 @@ extern "C" sig_handler abort_thread(int sig __attribute__((unused)))
static BOOL WINAPI console_event_handler( DWORD type ) static BOOL WINAPI console_event_handler( DWORD type )
{ {
DBUG_ENTER("console_event_handler"); DBUG_ENTER("console_event_handler");
#ifndef EMBEDDED_LIBRARY
if(type == CTRL_C_EVENT) if(type == CTRL_C_EVENT)
{ {
/* /*
@ -1962,6 +1963,7 @@ static BOOL WINAPI console_event_handler( DWORD type )
sql_print_warning("CTRL-C ignored during startup"); sql_print_warning("CTRL-C ignored during startup");
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
#endif
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }

View file

@ -713,7 +713,7 @@ static uchar *slave_get_report_port(THD *thd)
return (uchar*) &thd->sys_var_tmp.long_value; return (uchar*) &thd->sys_var_tmp.long_value;
} }
static sys_var_readonly sys_repl_report_port(&vars, "report_port", OPT_GLOBAL, SHOW_INT, slave_get_report_port); static sys_var_readonly sys_repl_report_port(&vars, "report_port", OPT_GLOBAL, SHOW_LONG, slave_get_report_port);
#endif #endif

View file

@ -3720,7 +3720,7 @@ void select_create::abort()
select_insert::abort(); select_insert::abort();
thd->transaction.stmt.modified_non_trans_table= FALSE; thd->transaction.stmt.modified_non_trans_table= FALSE;
reenable_binlog(thd); reenable_binlog(thd);
thd->binlog_flush_pending_rows_event(TRUE);
if (m_plock) if (m_plock)
{ {

View file

@ -27,6 +27,16 @@
%{?_with_yassl:%define YASSL_BUILD 1} %{?_with_yassl:%define YASSL_BUILD 1}
%{!?_with_yassl:%define YASSL_BUILD 0} %{!?_with_yassl:%define YASSL_BUILD 0}
# use "rpmbuild --with cluster" or "rpm --define '_with_cluster 1'" (for RPM 3.x)
# to build with cluster support (off by default)
%{?_with_cluster:%define CLUSTER_BUILD 1}
%{!?_with_cluster:%define CLUSTER_BUILD 0}
# use "rpmbuild --with federated" or "rpm --define '_with_federated 1'" (for RPM 3.x)
# to build with federated support (off by default)
%{?_with_federated:%define FEDERATED_BUILD 1}
%{!?_with_federated:%define FEDERATED_BUILD 0}
%if %{STATIC_BUILD} %if %{STATIC_BUILD}
%define release 0 %define release 0
%else %else
@ -134,6 +144,7 @@ This package contains the standard MySQL clients and administration tools.
%{see_base} %{see_base}
%if %{CLUSTER_BUILD}
%package ndb-storage %package ndb-storage
Summary: MySQL - ndbcluster storage engine Summary: MySQL - ndbcluster storage engine
Group: Applications/Databases Group: Applications/Databases
@ -174,6 +185,7 @@ This package contains some extra ndbcluster storage engine tools for the advance
They should be used with caution. They should be used with caution.
%{see_base} %{see_base}
%endif
%package test %package test
Requires: %{name}-client perl-DBI perl Requires: %{name}-client perl-DBI perl
@ -322,12 +334,19 @@ CXXFLAGS=`echo "${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno
BuildMySQL "--enable-shared \ BuildMySQL "--enable-shared \
--with-debug \ --with-debug \
--with-innodb \ --with-innodb \
%if %{CLUSTER_BUILD}
--with-ndbcluster \ --with-ndbcluster \
%else
--without-ndbcluster \
%endif
--with-archive-storage-engine \ --with-archive-storage-engine \
--with-csv-storage-engine \ --with-csv-storage-engine \
--with-example-storage-engine \
--with-blackhole-storage-engine \ --with-blackhole-storage-engine \
%if %{FEDERATED_BUILD}
--with-federated-storage-engine \ --with-federated-storage-engine \
%else
--without-federated-storage-engine \
%endif
--with-partition \ --with-partition \
--with-big-tables \ --with-big-tables \
--with-comment=\"MySQL Community Server - Debug (GPL)\"") --with-comment=\"MySQL Community Server - Debug (GPL)\"")
@ -351,12 +370,19 @@ CFLAGS="${MYSQL_BUILD_CFLAGS:-$RPM_OPT_FLAGS} -g" \
CXXFLAGS="${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti} -g" \ CXXFLAGS="${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti} -g" \
BuildMySQL "--enable-shared \ BuildMySQL "--enable-shared \
--with-innodb \ --with-innodb \
%if %{CLUSTER_BUILD}
--with-ndbcluster \ --with-ndbcluster \
%else
--without-ndbcluster \
%endif
--with-archive-storage-engine \ --with-archive-storage-engine \
--with-csv-storage-engine \ --with-csv-storage-engine \
--with-example-storage-engine \
--with-blackhole-storage-engine \ --with-blackhole-storage-engine \
%if %{FEDERATED_BUILD}
--with-federated-storage-engine \ --with-federated-storage-engine \
%else
--without-federated-storage-engine \
%endif
--with-partition \ --with-partition \
--with-embedded-server \ --with-embedded-server \
--with-big-tables \ --with-big-tables \
@ -563,12 +589,13 @@ sleep 2
#scheduled service packs and more. Visit www.mysql.com/enterprise for more #scheduled service packs and more. Visit www.mysql.com/enterprise for more
#information." #information."
%if %{CLUSTER_BUILD}
%post ndb-storage %post ndb-storage
mysql_clusterdir=/var/lib/mysql-cluster mysql_clusterdir=/var/lib/mysql-cluster
# Create cluster directory if needed # Create cluster directory if needed
if test ! -d $mysql_clusterdir; then mkdir -m 755 $mysql_clusterdir; fi if test ! -d $mysql_clusterdir; then mkdir -m 755 $mysql_clusterdir; fi
%endif
%preun server %preun server
if test $1 = 0 if test $1 = 0
@ -603,7 +630,9 @@ fi
%doc mysql-release-%{mysql_version}/COPYING mysql-release-%{mysql_version}/README %doc mysql-release-%{mysql_version}/COPYING mysql-release-%{mysql_version}/README
%doc mysql-release-%{mysql_version}/support-files/my-*.cnf %doc mysql-release-%{mysql_version}/support-files/my-*.cnf
%if %{CLUSTER_BUILD}
%doc mysql-release-%{mysql_version}/support-files/ndb-*.ini %doc mysql-release-%{mysql_version}/support-files/ndb-*.ini
%endif
%doc %attr(644, root, root) %{_infodir}/mysql.info* %doc %attr(644, root, root) %{_infodir}/mysql.info*
@ -698,6 +727,7 @@ fi
%postun shared %postun shared
/sbin/ldconfig /sbin/ldconfig
%if %{CLUSTER_BUILD}
%files ndb-storage %files ndb-storage
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
%attr(755, root, root) %{_sbindir}/ndbd %attr(755, root, root) %{_sbindir}/ndbd
@ -745,6 +775,7 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/ndb_delete_all.1* %doc %attr(644, root, man) %{_mandir}/man1/ndb_delete_all.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_index.1* %doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_index.1*
%doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_table.1* %doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_table.1*
%endif
%files devel %files devel
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
@ -767,8 +798,10 @@ fi
%{_libdir}/mysql/libmysqlclient_r.la %{_libdir}/mysql/libmysqlclient_r.la
%{_libdir}/mysql/libmystrings.a %{_libdir}/mysql/libmystrings.a
%{_libdir}/mysql/libmysys.a %{_libdir}/mysql/libmysys.a
%if %{CLUSTER_BUILD}
%{_libdir}/mysql/libndbclient.a %{_libdir}/mysql/libndbclient.a
%{_libdir}/mysql/libndbclient.la %{_libdir}/mysql/libndbclient.la
%endif
%{_libdir}/mysql/libvio.a %{_libdir}/mysql/libvio.a
%{_libdir}/mysql/libz.a %{_libdir}/mysql/libz.a
%{_libdir}/mysql/libz.la %{_libdir}/mysql/libz.la
@ -777,7 +810,9 @@ fi
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
# Shared libraries (omit for architectures that don't support them) # Shared libraries (omit for architectures that don't support them)
%{_libdir}/libmysql*.so* %{_libdir}/libmysql*.so*
%if %{CLUSTER_BUILD}
%{_libdir}/libndb*.so* %{_libdir}/libndb*.so*
%endif
%files test %files test
%defattr(-, root, root, 0755) %defattr(-, root, root, 0755)
@ -799,6 +834,11 @@ fi
# itself - note that they must be ordered by date (important when # itself - note that they must be ordered by date (important when
# merging BK trees) # merging BK trees)
%changelog %changelog
* Mon Mar 31 2008 Kent Boortz <kent@mysql.com>
- Made the "Federated" storage engine an option
- Made the "Cluster" storage engine and sub packages an option
* Wed Mar 19 2008 Joerg Bruehe <joerg@mysql.com> * Wed Mar 19 2008 Joerg Bruehe <joerg@mysql.com>
- Add the man pages for "ndbd" and "ndb_mgmd". - Add the man pages for "ndbd" and "ndb_mgmd".