2749 Davi Arnaut 2008-08-07 [merge]
Merge mysql-6.0 into mysql-6.0-bugteam
added:
mysql-test/include/implicit_commit_helper.inc
mysql-test/r/implicit_commit.result
mysql-test/suite/falcon/r/falcon_tablespace_priv.result
mysql-test/suite/falcon/t/falcon_tablespace_priv.test
mysql-test/t/implicit_commit.test
modified:
BUILD/SETUP.sh
include/my_handler.h
include/my_sys.h
include/myisam.h
include/myisamchk.h
mysql-test/include/commit.inc
mysql-test/r/binlog_index.result
mysql-test/r/commit_1innodb.result
mysql-test/r/ctype_ldml.result
mysql-test/r/ctype_utf8.result
mysql-test/r/date_formats.result
mysql-test/r/func_compress.result
mysql-test/r/func_digest.result
mysql-test/r/func_encrypt.result
mysql-test/r/func_encrypt_nossl.result
mysql-test/r/func_math.result
mysql-test/r/func_str.result
mysql-test/r/grant.result
mysql-test/r/merge.result
mysql-test/r/myisam-system.result
mysql-test/r/ps.result
mysql-test/r/strict.result
mysql-test/r/system_mysql_db.result
mysql-test/r/trigger.result
mysql-test/r/type_newdecimal.result
mysql-test/r/view.result
mysql-test/std_data/Index.xml
mysql-test/suite/falcon/r/falcon_bug_22972.result
mysql-test/suite/funcs_1/r/falcon_func_view.result
mysql-test/suite/funcs_1/r/innodb_func_view.result
mysql-test/suite/funcs_1/r/memory_func_view.result
mysql-test/suite/funcs_1/r/myisam_func_view.result
mysql-test/suite/funcs_1/r/ndb_func_view.result
mysql-test/suite/ndb/r/ndb_bitfield.result
mysql-test/suite/ndb/r/ndb_dd_ddl.result
mysql-test/suite/ndb/r/ndb_gis.result
mysql-test/suite/ndb/r/ndb_multi_row.result
mysql-test/suite/ndb/r/ndb_partition_error.result
mysql-test/suite/ndb/r/ndb_single_user.result
mysql-test/suite/ndb/t/ndb_dd_ddl.test
mysql-test/suite/rpl/r/rpl_EE_err.result
mysql-test/t/ctype_ldml.test
mysys/charset.c
scripts/mysql_system_tables.sql
scripts/mysql_system_tables_data.sql
scripts/mysql_system_tables_fix.sql
sql/events.cc
sql/field.cc
sql/ha_ndbcluster.cc
sql/ha_ndbcluster_binlog.cc
sql/handler.cc
sql/handler.h
sql/item.cc
sql/item_func.cc
sql/item_strfunc.cc
sql/item_subselect.cc
sql/item_timefunc.cc
sql/log.cc
sql/log_event.cc
sql/mdl.cc
sql/my_decimal.cc
sql/mysql_priv.h
sql/set_var.cc
sql/sp_head.cc
sql/sql_acl.cc
sql/sql_acl.h
sql/sql_cache.cc
sql/sql_class.cc
sql/sql_class.h
sql/sql_delete.cc
sql/sql_parse.cc
sql/sql_select.cc
sql/sql_select.h
sql/sql_show.cc
sql/sql_table.cc
sql/sql_tablespace.cc
sql/sql_yacc.yy
sql/table.cc
sql/unireg.cc
storage/myisam/ft_static.c
storage/myisam/mi_open.c
storage/myisammrg/ha_myisammrg.cc
strings/conf_to_src.c
tests/mysql_client_test.c
2748 Marc Alff 2008-08-06
Bug#10143
Fixed the test result for ndb_basic, which is using perror.
modified:
mysql-test/suite/ndb/r/ndb_basic.result
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh 2008-06-28 11:00:59 +0000
+++ b/BUILD/SETUP.sh 2008-07-25 17:21:55 +0000
@@ -109,7 +109,7 @@ if [ "x$warning_mode" != "xpedantic" ];
else
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
c_warnings="$warnings"
- cxx_warnings="$warnings -std=c++98"
+ cxx_warnings="$warnings"
# NOTE: warning mode should not influence optimize/debug mode.
# Please feel free to add a separate option if you don't feel it's an overkill.
debug_extra_cflags="-O0"
=== modified file 'include/my_handler.h'
--- a/include/my_handler.h 2008-06-26 17:48:42 +0000
+++ b/include/my_handler.h 2008-07-24 11:33:35 +0000
@@ -54,8 +54,8 @@ typedef struct st_HA_KEYSEG /* Key-port
uint16 bit_pos; /* Position to bit part */
uint16 flag;
uint16 length; /* Keylength */
+ uint16 language;
uint8 type; /* Type of key (for sort) */
- uint8 language;
uint8 null_bit; /* bitmask to test for NULL */
uint8 bit_start,bit_end; /* if bit field */
uint8 bit_length; /* Length of bit part */
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2008-07-21 09:17:03 +0000
+++ b/include/my_sys.h 2008-07-24 11:33:35 +0000
@@ -233,8 +233,9 @@ extern uint my_large_page_size;
#endif
/* charsets */
+#define MY_ALL_CHARSETS_SIZE 512
extern CHARSET_INFO *default_charset_info;
-extern CHARSET_INFO *all_charsets[256];
+extern CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
extern CHARSET_INFO compiled_charsets[];
/* statistics */
=== modified file 'include/myisam.h'
--- a/include/myisam.h 2008-07-09 07:12:43 +0000
+++ b/include/myisam.h 2008-07-24 11:33:35 +0000
@@ -168,7 +168,7 @@ typedef struct st_mi_create_info
ulonglong data_file_length;
ulonglong key_file_length;
uint old_options;
- uint8 language;
+ uint16 language;
my_bool with_auto_increment;
} MI_CREATE_INFO;
=== modified file 'include/myisamchk.h'
--- a/include/myisamchk.h 2008-04-10 02:26:36 +0000
+++ b/include/myisamchk.h 2008-07-24 11:33:35 +0000
@@ -148,7 +148,7 @@ typedef struct st_handler_check_param
uint key_cache_block_size, pagecache_block_size;
int tmpfile_createflag, err_count;
myf myf_rw;
- uint8 language;
+ uint16 language;
my_bool using_global_keycache, opt_lock_memory, opt_follow_links;
my_bool retry_repair, force_sort, calc_checksum, static_row_size;
char temp_filename[FN_REFLEN];
=== modified file 'mysql-test/include/commit.inc'
--- a/mysql-test/include/commit.inc 2008-04-01 15:13:57 +0000
+++ b/mysql-test/include/commit.inc 2008-07-26 16:38:20 +0000
@@ -726,15 +726,15 @@ call p_verify_status_increment(4, 4, 4,
alter table t3 add column (b int);
call p_verify_status_increment(2, 0, 2, 0);
alter table t3 rename t4;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 0, 2, 0);
rename table t4 to t3;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(0, 0, 0, 0);
truncate table t3;
call p_verify_status_increment(2, 2, 2, 2);
create view v1 as select * from t2;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 0, 2, 0);
check table t1;
-call p_verify_status_increment(3, 0, 3, 0);
+call p_verify_status_increment(2, 0, 2, 0);
--echo # Sic: after this bug is fixed, CHECK leaves no pending transaction
commit;
call p_verify_status_increment(0, 0, 0, 0);
=== added file 'mysql-test/include/implicit_commit_helper.inc'
--- a/mysql-test/include/implicit_commit_helper.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/implicit_commit_helper.inc 2008-07-26 16:38:20 +0000
@@ -0,0 +1,5 @@
+INSERT INTO db1.trans (a) VALUES (1);
+--disable_result_log
+eval $statement;
+--enable_result_log
+CALL db1.test_if_commit();
=== modified file 'mysql-test/r/binlog_index.result'
--- a/mysql-test/r/binlog_index.result 2008-04-01 10:36:20 +0000
+++ b/mysql-test/r/binlog_index.result 2008-07-14 12:49:19 +0000
@@ -33,7 +33,7 @@ purge binary logs TO 'master-bin.000002'
ERROR HY000: Fatal error during log purge
show warnings;
Level Code Message
-Error 1377 a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
+Warning 1377 a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
Error 1377 Fatal error during log purge
reset master;
End of tests
=== modified file 'mysql-test/r/commit_1innodb.result'
--- a/mysql-test/r/commit_1innodb.result 2008-04-01 15:13:57 +0000
+++ b/mysql-test/r/commit_1innodb.result 2008-07-26 16:38:20 +0000
@@ -842,11 +842,11 @@ call p_verify_status_increment(2, 0, 2,
SUCCESS
alter table t3 rename t4;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
rename table t4 to t3;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(0, 0, 0, 0);
SUCCESS
truncate table t3;
@@ -854,13 +854,13 @@ call p_verify_status_increment(2, 2, 2,
SUCCESS
create view v1 as select * from t2;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
-call p_verify_status_increment(3, 0, 3, 0);
+call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
# Sic: after this bug is fixed, CHECK leaves no pending transaction
=== modified file 'mysql-test/r/ctype_ldml.result'
--- a/mysql-test/r/ctype_ldml.result 2007-10-22 11:43:32 +0000
+++ b/mysql-test/r/ctype_ldml.result 2008-07-24 11:33:35 +0000
@@ -8,7 +8,7 @@ Variable_name Value
character_sets_dir MYSQL_TEST_DIR/std_data/
show collation like 'utf8_test_ci';
Collation Charset Id Default Compiled Sortlen
-utf8_test_ci utf8 253 8
+utf8_test_ci utf8 353 8
create table t1 (c1 char(1) character set utf8 collate utf8_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
@@ -17,7 +17,7 @@ a
drop table t1;
show collation like 'ucs2_test_ci';
Collation Charset Id Default Compiled Sortlen
-ucs2_test_ci ucs2 158 8
+ucs2_test_ci ucs2 358 8
create table t1 (c1 char(1) character set ucs2 collate ucs2_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
@@ -26,7 +26,7 @@ a
drop table t1;
show collation like 'utf16_test_ci';
Collation Charset Id Default Compiled Sortlen
-utf16_test_ci utf16 127 8
+utf16_test_ci utf16 327 8
create table t1 (c1 char(1) character set utf16 collate utf16_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
@@ -35,7 +35,7 @@ a
drop table t1;
show collation like 'utf32_test_ci';
Collation Charset Id Default Compiled Sortlen
-utf32_test_ci utf32 191 8
+utf32_test_ci utf32 391 8
create table t1 (c1 char(1) character set utf32 collate utf32_test_ci);
insert into t1 values ('a');
select * from t1 where c1='b';
@@ -45,7 +45,7 @@ drop table t1;
Vietnamese experimental collation
show collation like 'ucs2_vn_ci';
Collation Charset Id Default Compiled Sortlen
-ucs2_vn_ci ucs2 159 8
+ucs2_vn_ci ucs2 359 8
create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci);
insert into t1 values (0x0061),(0x0041),(0x00E0),(0x00C0),(0x1EA3),(0x1EA2),
(0x00E3),(0x00C3),(0x00E1),(0x00C1),(0x1EA1),(0x1EA0);
@@ -316,3 +316,29 @@ Vv
Xx
YyÝýỲỳỴỵỶỷỸỹ
drop table t1;
+The following tests check that two-byte collation IDs work
+select * from information_schema.collations where id>256 order by id;
+COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
+utf16_test_ci utf16 327 8
+utf8_test_ci utf8 353 8
+ucs2_test_ci ucs2 358 8
+ucs2_vn_ci ucs2 359 8
+utf32_test_ci utf32 391 8
+show collation like '%test%';
+Collation Charset Id Default Compiled Sortlen
+ucs2_test_ci ucs2 358 8
+utf8_test_ci utf8 353 8
+utf16_test_ci utf16 327 8
+utf32_test_ci utf32 391 8
+show collation like 'ucs2_vn_ci';
+Collation Charset Id Default Compiled Sortlen
+ucs2_vn_ci ucs2 359 8
+create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci);
+insert into t1 values (0x0061);
+set @@character_set_results=NULL;
+select * from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 c1 c1 254 2 2 Y 0 0 359
+c1
+ a
+drop table t1;
=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result 2008-07-23 09:43:50 +0000
+++ b/mysql-test/r/ctype_utf8.result 2008-07-25 17:21:55 +0000
@@ -1666,27 +1666,27 @@ select char(0xff,0x8f using utf8);
char(0xff,0x8f using utf8)
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'FF8F'
+Warning 1300 Invalid utf8 character string: 'FF8F'
select char(195 using utf8);
char(195 using utf8)
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'C3'
+Warning 1300 Invalid utf8 character string: 'C3'
select char(196 using utf8);
char(196 using utf8)
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'C4'
+Warning 1300 Invalid utf8 character string: 'C4'
select char(2557 using utf8);
char(2557 using utf8)
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'FD'
+Warning 1300 Invalid utf8 character string: 'FD'
select convert(char(0xff,0x8f) using utf8);
convert(char(0xff,0x8f) using utf8)
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'FF8F'
+Warning 1300 Invalid utf8 character string: 'FF8F'
select hex(convert(char(2557 using latin1) using utf8));
hex(convert(char(2557 using latin1) using utf8))
09C3BD
@@ -1850,12 +1850,12 @@ select hex(char(0xFF using utf8));
hex(char(0xFF using utf8))
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'FF'
+Warning 1300 Invalid utf8 character string: 'FF'
select hex(convert(0xFF using utf8));
hex(convert(0xFF using utf8))
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'FF'
+Warning 1300 Invalid utf8 character string: 'FF'
select hex(_utf8 0x616263FF);
ERROR HY000: Invalid utf8 character string: 'FF'
select hex(_utf8 X'616263FF');
=== modified file 'mysql-test/r/date_formats.result'
--- a/mysql-test/r/date_formats.result 2008-02-12 19:09:16 +0000
+++ b/mysql-test/r/date_formats.result 2008-07-14 12:49:19 +0000
@@ -80,7 +80,7 @@ select STR_TO_DATE('2004.12.12 22.30.61'
STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T')
NULL
Warnings:
-Error 1411 Incorrect time value: '22.30.61' for function str_to_date
+Warning 1411 Incorrect time value: '22.30.61' for function str_to_date
create table t1 (date char(30), format char(30) not null);
insert into t1 values
('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'),
@@ -352,21 +352,21 @@ Tuesday 52 2001 %W %u %x NULL
7 53 1998 %w %u %Y NULL
NULL %m.%d.%Y NULL
Warnings:
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
-Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date
-Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date
-Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
-Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '7 53 1998' for function str_to_date
select date,format,concat(str_to_date(date, format),'') as con from t1;
date format con
2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL
@@ -386,21 +386,21 @@ Tuesday 52 2001 %W %u %x NULL
7 53 1998 %w %u %Y NULL
NULL %m.%d.%Y NULL
Warnings:
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
-Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
-Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date
-Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date
-Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
-Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
+Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '7 53 1998' for function str_to_date
truncate table t1;
insert into t1 values
('10:20:10AM', '%h:%i:%s'),
@@ -440,7 +440,7 @@ select str_to_date('15-01-2001 12:59:59'
str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA'))
NULL
Warnings:
-Error 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date
+Warning 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date
explain extended select makedate(1997,1), addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM"),cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME), maketime(23,11,12),microsecond("1997-12-31 23:59:59.000001");
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
=== modified file 'mysql-test/r/func_compress.result'
--- a/mysql-test/r/func_compress.result 2006-10-13 14:33:28 +0000
+++ b/mysql-test/r/func_compress.result 2008-07-14 12:49:19 +0000
@@ -65,8 +65,8 @@ NULL
50000
NULL
Warnings:
-Error 1259 ZLIB: Input data corrupted
-Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
+Warning 1259 ZLIB: Input data corrupted
+Warning 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
drop table t1;
set @@max_allowed_packet=1048576*100;
select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null;
@@ -95,12 +95,12 @@ explain select * from t1 where uncompres
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
Warnings:
-Error 1259 ZLIB: Input data corrupted
+Warning 1259 ZLIB: Input data corrupted
select * from t1 where uncompress(a) is null;
a
foo
Warnings:
-Error 1259 ZLIB: Input data corrupted
+Warning 1259 ZLIB: Input data corrupted
explain select *, uncompress(a) from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
@@ -108,12 +108,12 @@ select *, uncompress(a) from t1;
a uncompress(a)
foo NULL
Warnings:
-Error 1259 ZLIB: Input data corrupted
+Warning 1259 ZLIB: Input data corrupted
select *, uncompress(a), uncompress(a) is null from t1;
a uncompress(a) uncompress(a) is null
foo NULL 1
Warnings:
-Error 1259 ZLIB: Input data corrupted
-Error 1259 ZLIB: Input data corrupted
+Warning 1259 ZLIB: Input data corrupted
+Warning 1259 ZLIB: Input data corrupted
drop table t1;
End of 5.0 tests
=== modified file 'mysql-test/r/func_digest.result'
--- a/mysql-test/r/func_digest.result 2007-12-18 17:27:22 +0000
+++ b/mysql-test/r/func_digest.result 2008-07-14 12:49:19 +0000
@@ -1346,32 +1346,32 @@ SELECT SHA2( x'ff', 1 );
SHA2( x'ff', 1 )
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'sha2'
+Warning 1583 Incorrect parameters in the call to native function 'sha2'
SELECT SHA2( x'ff', 2 );
SHA2( x'ff', 2 )
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'sha2'
+Warning 1583 Incorrect parameters in the call to native function 'sha2'
SELECT SHA2( x'ff', 223 );
SHA2( x'ff', 223 )
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'sha2'
+Warning 1583 Incorrect parameters in the call to native function 'sha2'
SELECT SHA2( x'ff', 511 );
SHA2( x'ff', 511 )
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'sha2'
+Warning 1583 Incorrect parameters in the call to native function 'sha2'
SELECT SHA2( x'ff', least(123, 42) );
SHA2( x'ff', least(123, 42) )
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'sha2'
+Warning 1583 Incorrect parameters in the call to native function 'sha2'
SELECT SHA2( x'ff', 10000000000000 );
SHA2( x'ff', 10000000000000 )
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'sha2'
+Warning 1583 Incorrect parameters in the call to native function 'sha2'
SELECT SHA2( SHA2( NULL, 224), 224 );
SHA2( SHA2( NULL, 224), 224 )
NULL
=== modified file 'mysql-test/r/func_encrypt.result'
--- a/mysql-test/r/func_encrypt.result 2008-02-12 19:29:55 +0000
+++ b/mysql-test/r/func_encrypt.result 2008-07-14 12:49:19 +0000
@@ -124,7 +124,7 @@ select des_encrypt("hello",10);
des_encrypt("hello",10)
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'des_encrypt'
+Warning 1583 Incorrect parameters in the call to native function 'des_encrypt'
select des_encrypt(NULL);
des_encrypt(NULL)
NULL
@@ -138,12 +138,12 @@ select des_encrypt(10, NULL);
des_encrypt(10, NULL)
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'des_encrypt'
+Warning 1583 Incorrect parameters in the call to native function 'des_encrypt'
select des_encrypt("hello", NULL);
des_encrypt("hello", NULL)
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'des_encrypt'
+Warning 1583 Incorrect parameters in the call to native function 'des_encrypt'
select des_decrypt("hello",10);
des_decrypt("hello",10)
hello
@@ -177,7 +177,7 @@ select hex(des_decrypt(des_encrypt("hell
hex(des_decrypt(des_encrypt("hello","hidden")))
NULL
Warnings:
-Error 1583 Incorrect parameters in the call to native function 'des_decrypt'
+Warning 1583 Incorrect parameters in the call to native function 'des_decrypt'
explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
=== modified file 'mysql-test/r/func_encrypt_nossl.result'
--- a/mysql-test/r/func_encrypt_nossl.result 2007-12-11 10:39:14 +0000
+++ b/mysql-test/r/func_encrypt_nossl.result 2008-07-15 00:06:43 +0000
@@ -2,83 +2,83 @@ select des_encrypt("test", 'akeystr');
des_encrypt("test", 'akeystr')
NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_encrypt("test", 1);
des_encrypt("test", 1)
NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_encrypt("test", 9);
des_encrypt("test", 9)
NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_encrypt("test", 100);
des_encrypt("test", 100)
NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_encrypt("test", NULL);
des_encrypt("test", NULL)
NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_encrypt(NULL, NULL);
des_encrypt(NULL, NULL)
NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt("test", 'anotherkeystr');
des_decrypt("test", 'anotherkeystr')
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt(1, 1);
des_decrypt(1, 1)
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt(des_encrypt("test", 'thekey'));
des_decrypt(des_encrypt("test", 'thekey'))
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello"))
NULL NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt(des_encrypt("hello",4));
des_decrypt(des_encrypt("hello",4))
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt(des_encrypt("hello",'test'),'test');
des_decrypt(des_encrypt("hello",'test'),'test')
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password'))
NULL NULL NULL
Warnings:
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
-Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt(des_encrypt("hello"),'default_password');
des_decrypt(des_encrypt("hello"),'default_password')
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select des_decrypt(des_encrypt("hello",4),'password4');
des_decrypt(des_encrypt("hello",4),'password4')
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
SET @a=des_decrypt(des_encrypt("hello"));
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
flush des_key_file;
select @a = des_decrypt(des_encrypt("hello"));
@a = des_decrypt(des_encrypt("hello"))
@@ -90,9 +90,9 @@ select hex(des_decrypt(des_encrypt("hell
hex(des_decrypt(des_encrypt("hello",4),'password2'))
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
select hex(des_decrypt(des_encrypt("hello","hidden")));
hex(des_decrypt(des_encrypt("hello","hidden")))
NULL
Warnings:
-Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-ssl' to have it working
=== modified file 'mysql-test/r/func_math.result'
--- a/mysql-test/r/func_math.result 2008-04-07 18:25:19 +0000
+++ b/mysql-test/r/func_math.result 2008-07-14 12:49:19 +0000
@@ -225,27 +225,27 @@ select ln(-1);
ln(-1)
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select log10(-1);
log10(-1)
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select log2(-1);
log2(-1)
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select log(2,-1);
log(2,-1)
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select log(-2,1);
log(-2,1)
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
set sql_mode='';
select round(111,-10);
round(111,-10)
=== modified file 'mysql-test/r/func_str.result'
--- a/mysql-test/r/func_str.result 2008-05-13 23:42:43 +0000
+++ b/mysql-test/r/func_str.result 2008-07-14 12:49:19 +0000
@@ -1435,7 +1435,7 @@ select benchmark(-1, 1);
benchmark(-1, 1)
NULL
Warnings:
-Error 1411 Incorrect count value: '-1' for function benchmark
+Warning 1411 Incorrect count value: '-1' for function benchmark
set @password="password";
set @my_data="clear text to encode";
select md5(encode(@my_data, "password"));
@@ -2271,12 +2271,12 @@ SELECT CHAR(0xff,0x8f USING utf8);
CHAR(0xff,0x8f USING utf8)
NULL
Warnings:
-Error 1300 Invalid utf8 character string: 'FF8F'
+Warning 1300 Invalid utf8 character string: 'FF8F'
SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
CHAR(0xff,0x8f USING utf8) IS NULL
1
Warnings:
-Error 1300 Invalid utf8 character string: 'FF8F'
+Warning 1300 Invalid utf8 character string: 'FF8F'
SET SQL_MODE=@orig_sql_mode;
select substring('abc', cast(2 as unsigned int));
substring('abc', cast(2 as unsigned int))
=== modified file 'mysql-test/r/grant.result'
--- a/mysql-test/r/grant.result 2008-05-22 18:40:15 +0000
+++ b/mysql-test/r/grant.result 2008-07-24 07:44:21 +0000
@@ -12,8 +12,8 @@ GRANT USAGE ON *.* TO 'mysqltest_1'@'loc
GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
grant delete on mysqltest.* to mysqltest_1@localhost;
select * from mysql.user where user="mysqltest_1";
-Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections
-localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0
+Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections
+localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
@@ -43,15 +43,15 @@ delete from mysql.user where user='mysql
flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 10;
select * from mysql.user where user="mysqltest_1";
-Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections
-localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0
+Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections
+localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30;
select * from mysql.user where user="mysqltest_1";
-Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections
-localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0
+Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections
+localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
@@ -482,6 +482,7 @@ Show view Tables To see views with SHOW
Shutdown Server Admin To shut down the server
Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc.
Trigger Tables To use triggers
+Create tablespace Server Admin To create/alter/drop tablespaces
Update Tables To update existing rows
Usage Server Admin No privileges - allow connect only
create database mysqltest;
=== added file 'mysql-test/r/implicit_commit.result'
--- a/mysql-test/r/implicit_commit.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/implicit_commit.result 2008-07-26 16:38:20 +0000
@@ -0,0 +1,1066 @@
+SET GLOBAL EVENT_SCHEDULER = OFF;
+SET BINLOG_FORMAT = STATEMENT;
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE t1 (a INT, KEY a(a)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t3 (a INT) ENGINE=MyISAM;
+INSERT INTO t3 SELECT * FROM t1;
+CREATE TABLE trans (a INT) ENGINE=INNODB;
+CREATE PROCEDURE test_if_commit()
+BEGIN
+ROLLBACK;
+SELECT IF (COUNT(*) > 0, "YES", "NO") AS "IMPLICIT COMMIT" FROM trans;
+DELETE FROM trans;
+COMMIT;
+END|
+SET AUTOCOMMIT = FALSE;
+#
+# SQLCOM_SELECT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+select 1 as res from t1 where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CREATE_TABLE LIKE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create table t2 like t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_CREATE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show create table t2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_DROP_TABLE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop table t2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CREATE_TABLE TEMPORARY
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create temporary table t2 as select * from t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_DROP_TABLE TEMPORARY
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop temporary table t2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CREATE_TABLE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create table t2 as select * from t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_UPDATE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+update t2 set a=a+1 where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_INSERT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+insert into t2 set a=((1) in (select * from t1));
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_INSERT_SELECT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+insert into t2 select * from t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_REPLACE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+replace t2 set a=((1) in (select * from t1));
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_REPLACE_SELECT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+replace t2 select * from t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_DELETE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+delete from t2 where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+#
+# SQLCOM_DELETE_MULTI
+#
+INSERT INTO db1.trans (a) VALUES (1);
+delete t2, t3 from t2, t3 where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_UPDATE_MULTI
+#
+select * from t2;
+a
+INSERT INTO db1.trans (a) VALUES (1);
+update t2, t3 set t3.a=t2.a, t2.a=null where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_LOAD
+#
+create table t4 (a varchar(100));
+INSERT INTO db1.trans (a) VALUES (1);
+load data infile '../std_data_ln/words.dat' into table t4;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+drop table t4;
+#
+# SQLCOM_SHOW_DATABASES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show databases where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_TABLES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show tables where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_FIELDS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show fields from t1 where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_KEYS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show keys from t1 where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_VARIABLES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show variables where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_STATUS
+#
+#
+# SQLCOM_SHOW_ENGINE_MUTEX
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show engine all mutex;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_PROCESSLIST
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show processlist;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_ENGINE_LOGS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show engine all logs;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_ENGINE_STATUS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show engine all status;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_CHARSETS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show charset where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_COLLATIONS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show collation where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_TABLE_STATUS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show table status where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_TRIGGERS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show triggers where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_OPEN_TABLES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show open tables where (1) in (select * from t1);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_STATUS_PROC
+#
+#
+# SQLCOM_SHOW_STATUS_FUNC
+#
+#
+# SQLCOM_SET_OPTION
+#
+INSERT INTO db1.trans (a) VALUES (1);
+set @a=((1) in (select * from t1));
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_DO
+#
+INSERT INTO db1.trans (a) VALUES (1);
+do ((1) in (select * from t1));
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CALL
+#
+create procedure p1(a int) begin end;
+drop procedure p1;
+#
+# SQLCOM_CREATE_VIEW
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create view v1 as select * from t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ALTER_VIEW
+#
+INSERT INTO db1.trans (a) VALUES (1);
+alter view v1 as select 2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_DROP_VIEW
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop view v1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CREATE_INDEX
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create index idx1 on t1(a);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_DROP_INDEX
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop index idx1 on t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ALTER_TABLE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+alter table t1 add column b int;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+alter table t1 change b c int;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+alter table t1 drop column c;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ALTER_TABLE TEMPORARY
+#
+create temporary table t4 (a int);
+INSERT INTO db1.trans (a) VALUES (1);
+alter table t1 add column b int;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+alter table t1 change b c int;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+alter table t1 drop column c;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+drop table t4;
+#
+# SQLCOM_TRUNCATE
+#
+insert into t2 select * from t1;
+INSERT INTO db1.trans (a) VALUES (1);
+truncate table t2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+insert into t2 select * from t1;
+#
+# SQLCOM_TRUNCATE TEMPORARY
+#
+create temporary table t4 as select * from t1;
+INSERT INTO db1.trans (a) VALUES (1);
+truncate table t4;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+drop temporary table t4;
+#
+# SQLCOM_SHOW_MASTER_STAT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show master status;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_SLAVE_STAT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show slave status;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_GRANT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+grant all on test.t1 to mysqltest_2@localhost with grant option;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_REVOKE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+revoke select on test.t1 from mysqltest_2@localhost;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_REVOKE_ALL
+#
+INSERT INTO db1.trans (a) VALUES (1);
+revoke all on test.t1 from mysqltest_2@localhost;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_GRANTS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show grants;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+INSERT INTO db1.trans (a) VALUES (1);
+show grants for current_user();
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_LOCK_TABLES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+lock tables t1 write, trans write;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_UNLOCK_TABLES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+unlock tables;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CREATE_DB
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create database db2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CHANGE_DB
+#
+create table db2.t1 (a int);
+insert into db2.t1 values (1);
+commit;
+INSERT INTO db1.trans (a) VALUES (1);
+use db2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_CREATE_DB
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show create database db2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_ALTER_DB
+#
+#
+# SQLCOM_ALTER_DB_UPGRADE
+#
+#
+# SQLCOM_DROP_DB
+#
+use db1;
+INSERT INTO db1.trans (a) VALUES (1);
+drop database db2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_REPAIR
+#
+INSERT INTO db1.trans (a) VALUES (1);
+repair table t2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+repair table t2 use_frm;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_OPTIMIZE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+optimize table t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CHECK
+#
+INSERT INTO db1.trans (a) VALUES (1);
+check table t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+check table t1 extended;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ASSIGN_TO_KEYCACHE
+#
+set global keycache.key_buffer_size=128*1024;
+INSERT INTO db1.trans (a) VALUES (1);
+cache index t3 in keycache;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+set global keycache.key_buffer_size=0;
+#
+# SQLCOM_PRELOAD_KEYS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+load index into cache t3;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_FLUSH
+#
+INSERT INTO db1.trans (a) VALUES (1);
+flush local privileges;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+flush privileges;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_KILL
+#
+#
+# SQLCOM_ANALYZE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+analyze table t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ROLLBACK
+#
+INSERT INTO db1.trans (a) VALUES (1);
+rollback;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_ROLLBACK_TO_SAVEPOINT
+#
+#
+# SQLCOM_COMMIT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+commit;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SAVEPOINT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+savepoint sp1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_RELEASE_SAVEPOINT
+#
+#
+# SQLCOM_SLAVE_START
+#
+#
+# SQLCOM_SLAVE_STOP
+#
+#
+# SQLCOM_BEGIN
+#
+INSERT INTO db1.trans (a) VALUES (1);
+begin;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CHANGE_MASTER
+#
+#
+# SQLCOM_RENAME_TABLE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+rename table t3 to t4;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+INSERT INTO db1.trans (a) VALUES (1);
+rename table t4 to t3;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_RESET
+#
+#
+# SQLCOM_PURGE
+#
+#
+# SQLCOM_PURGE_BEFORE
+#
+#
+# SQLCOM_SHOW_BINLOGS
+#
+#
+# SQLCOM_HA_OPEN
+#
+INSERT INTO db1.trans (a) VALUES (1);
+handler t1 open as ha1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_HA_READ
+#
+INSERT INTO db1.trans (a) VALUES (1);
+handler ha1 read a first;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_HA_CLOSE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+handler ha1 close;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_SLAVE_HOSTS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show slave hosts;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_BINLOG_EVENTS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show binlog events;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_NEW_MASTER
+#
+#
+# SQLCOM_SHOW_WARNS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show warnings;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_EMPTY_QUERY
+#
+#
+# SQLCOM_SHOW_ERRORS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show errors;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_STORAGE_ENGINES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show engines;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_PRIVILEGES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show privileges;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_HELP
+#
+INSERT INTO db1.trans (a) VALUES (1);
+help 'foo';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CREATE_USER
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create user trxusr1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_RENAME_USER
+#
+INSERT INTO db1.trans (a) VALUES (1);
+rename user 'trxusr1' to 'trxusr2';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_DROP_USER
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop user trxusr2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CHECKSUM
+#
+INSERT INTO db1.trans (a) VALUES (1);
+checksum table t1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CREATE_PROCEDURE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create procedure p1(a int) begin end;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ALTER_PROCEDURE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+alter procedure p1 comment 'foobar';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_CREATE_PROC
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show create procedure p1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_STATUS_PROC
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show procedure status;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_PROC_CODE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show procedure code p1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_DROP_PROCEDURE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop procedure p1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_CREATE_FUNCTION
+#
+#
+# SQLCOM_DROP_FUNCTION
+#
+#
+# SQLCOM_CREATE_SPFUNCTION
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create function f1() returns int return 69;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ALTER_FUNCTION
+#
+INSERT INTO db1.trans (a) VALUES (1);
+alter function f1 comment 'comment';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_CREATE_FUNC
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show create function f1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_STATUS_FUNC
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show function status like '%f%';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_FUNC_CODE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show function code f1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_PREPARE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+prepare stmt1 from "insert into t1 values (5)";
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_EXECUTE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+execute stmt1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_DEALLOCATE_PREPARE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+deallocate prepare stmt1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CREATE_TRIGGER
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create trigger trg1 before insert on t1 for each row set @a:=1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_CREATE_TRIGGER
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show create trigger trg1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_DROP_TRIGGER
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop trigger trg1;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_XA_START
+#
+#
+# SQLCOM_XA_END
+#
+#
+# SQLCOM_XA_PREPARE
+#
+#
+# SQLCOM_XA_COMMIT
+#
+#
+# SQLCOM_XA_ROLLBACK
+#
+#
+# SQLCOM_XA_RECOVER
+#
+#
+# SQLCOM_ALTER_TABLESPACE
+#
+#
+# SQLCOM_INSTALL_PLUGIN
+#
+#
+# SQLCOM_SHOW_PLUGINS
+#
+#
+# SQLCOM_UNINSTALL_PLUGIN
+#
+#
+# SQLCOM_SHOW_AUTHORS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show authors;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_BINLOG_BASE64_EVENT
+#
+#
+# SQLCOM_SHOW_CONTRIBUTORS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show contributors;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_CREATE_SERVER
+#
+#
+# SQLCOM_ALTER_SERVER
+#
+#
+# SQLCOM_DROP_SERVER
+#
+#
+# SQLCOM_CREATE_EVENT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+create event ev1 on schedule every 1 second do insert into t1 values (6);
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_ALTER_EVENT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+alter event ev1 rename to ev2 disable;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_CREATE_EVENT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show create event ev2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_EVENTS
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show events;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_DROP_EVENT
+#
+INSERT INTO db1.trans (a) VALUES (1);
+drop event ev2;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_BACKUP
+#
+INSERT INTO db1.trans (a) VALUES (1);
+backup database db1 to 'backup_db1.ba';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_SHOW_ARCHIVE
+#
+#
+# SQLCOM_RESTORE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+restore from 'backup_db1.ba';
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+YES
+#
+# SQLCOM_BACKUP_TEST
+#
+#
+# SQLCOM_SHOW_PROFILE
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show profile memory;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+#
+# SQLCOM_SHOW_PROFILES
+#
+INSERT INTO db1.trans (a) VALUES (1);
+show profiles;
+CALL db1.test_if_commit();
+IMPLICIT COMMIT
+NO
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+USE test;
+DROP DATABASE db1;
+End of tests
=== modified file 'mysql-test/r/merge.result'
--- a/mysql-test/r/merge.result 2008-07-09 07:12:43 +0000
+++ b/mysql-test/r/merge.result 2008-07-24 10:00:56 +0000
@@ -914,7 +914,7 @@ SELECT * FROM tm1;
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
CHECK TABLE tm1;
Table Op Msg_type Msg_text
-test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
+test.tm1 check Warning Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
test.tm1 check error Corrupt
ALTER TABLE t2 MODIFY a INT;
=== modified file 'mysql-test/r/myisam-system.result'
--- a/mysql-test/r/myisam-system.result 2006-05-03 12:59:17 +0000
+++ b/mysql-test/r/myisam-system.result 2008-07-14 12:49:19 +0000
@@ -2,7 +2,7 @@ drop table if exists t1,t2;
create table t1 (a int) engine=myisam;
drop table if exists t1;
Warnings:
-Error 2 Can't find file: 't1' (errno: 2)
+Warning 2 Can't find file: 't1' (errno: 2)
create table t1 (a int) engine=myisam;
drop table t1;
Got one of the listed errors
=== modified file 'mysql-test/r/ps.result'
--- a/mysql-test/r/ps.result 2008-07-07 23:15:08 +0000
+++ b/mysql-test/r/ps.result 2008-07-24 10:00:56 +0000
@@ -1192,13 +1192,13 @@ SET @aux= "SELECT COUNT(*)
prepare my_stmt from @aux;
execute my_stmt;
COUNT(*)
-39
+40
execute my_stmt;
COUNT(*)
-39
+40
execute my_stmt;
COUNT(*)
-39
+40
deallocate prepare my_stmt;
drop procedure if exists p1|
drop table if exists t1|
=== modified file 'mysql-test/r/strict.result'
--- a/mysql-test/r/strict.result 2008-05-22 18:40:15 +0000
+++ b/mysql-test/r/strict.result 2008-07-14 12:49:19 +0000
@@ -315,8 +315,8 @@ MOD(col1,0)
NULL
NULL
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT INTO t1 (col1) VALUES(-129);
ERROR 22003: Out of range value for column 'col1' at row 1
INSERT INTO t1 (col1) VALUES(128);
@@ -343,7 +343,7 @@ SELECT MOD(col1,0) FROM t1 WHERE col1 >
MOD(col1,0)
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;
ERROR 22003: Out of range value for column 'col1' at row 1
UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0;
@@ -353,16 +353,16 @@ ERROR 22012: Division by 0
set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO';
INSERT INTO t1 values (1/0,1/0);
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
set @@sql_mode='ansi,traditional';
SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2;
MOD(col1,0)
NULL
NULL
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT INTO t1 (col1) VALUES ('');
ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
INSERT INTO t1 (col1) VALUES ('a59b');
@@ -374,8 +374,8 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 values (1/0,1/0);
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
set @@sql_mode='ansi';
INSERT INTO t1 values (1/0,1/0);
set @@sql_mode='ansi,traditional';
@@ -457,8 +457,8 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 values (1/0,1/0);
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536);
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -541,8 +541,8 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 values (1/0,1/0);
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216);
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -625,8 +625,8 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 values (1/0,1/0);
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296);
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -707,8 +707,8 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 values (1/0,1/0);
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616);
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -794,7 +794,7 @@ Warnings:
Note 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 values (1/0);
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 VALUES(1000),(-1000);
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -861,7 +861,7 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) VALUES (1/0);
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 VALUES (+3.4E+39,-3.4E+39);
Warnings:
Warning 1264 Out of range value for column 'col1' at row 1
@@ -910,7 +910,7 @@ Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
INSERT IGNORE INTO t1 (col1) values (1/0);
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309);
ERROR 22007: Illegal double '1.9E+309' value found during parsing
INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309');
@@ -1080,13 +1080,13 @@ Warnings:
Warning 1292 Truncated incorrect datetime value: '31.10.2004 15.30 abc'
insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
Warnings:
-Error 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
+Warning 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));
Warnings:
-Error 1411 Incorrect time value: '22:22:33 AM' for function str_to_date
+Warning 1411 Incorrect time value: '22:22:33 AM' for function str_to_date
insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));
Warnings:
-Error 1411 Incorrect time value: 'abc' for function str_to_date
+Warning 1411 Incorrect time value: 'abc' for function str_to_date
insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i'));
insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r'));
insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T'));
@@ -1104,9 +1104,9 @@ select count(*) from t1 where STR_TO_DAT
count(*)
7
Warnings:
-Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
-Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
-Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
+Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
+Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
+Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
drop table t1;
create table t1 (col1 char(3), col2 integer);
insert into t1 (col1) values (cast(1000 as char(3)));
=== modified file 'mysql-test/r/system_mysql_db.result'
--- a/mysql-test/r/system_mysql_db.result 2008-02-11 21:22:19 +0000
+++ b/mysql-test/r/system_mysql_db.result 2008-07-24 07:44:21 +0000
@@ -113,6 +113,7 @@ user CREATE TABLE `user` (
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+ `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
=== modified file 'mysql-test/r/trigger.result'
--- a/mysql-test/r/trigger.result 2008-04-08 16:01:20 +0000
+++ b/mysql-test/r/trigger.result 2008-07-14 12:49:19 +0000
@@ -1073,7 +1073,7 @@ NULL
SET @x=2;
UPDATE t1 SET i1 = @x;
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
SELECT @x;
@x
NULL
@@ -1086,8 +1086,8 @@ NULL
SET @x=4;
UPDATE t1 SET i1 = @x;
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
SELECT @x;
@x
NULL
@@ -1190,16 +1190,16 @@ create trigger t4_bu before update on t4
insert into t1 values(10, 10)|
set @a:=1/0|
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select 1/0 from t1|
1/0
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
create trigger t1_bi before insert on t1 for each row set @a:=1/0|
insert into t1 values(20, 20)|
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
drop trigger t1_bi|
create trigger t1_bi before insert on t1 for each row
begin
@@ -1219,7 +1219,7 @@ end|
set @check=0, @t4_bi_called=0, @t4_bu_called=0|
insert into t1 values(30, 30)|
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select @check, @t4_bi_called, @t4_bu_called|
@check @t4_bi_called @t4_bu_called
2 1 1
=== modified file 'mysql-test/r/type_newdecimal.result'
--- a/mysql-test/r/type_newdecimal.result 2008-05-13 23:42:43 +0000
+++ b/mysql-test/r/type_newdecimal.result 2008-07-14 12:49:19 +0000
@@ -185,7 +185,7 @@ select 1e10/0e0;
1e10/0e0
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
create table wl1612 (col1 int, col2 decimal(38,10), col3 numeric(38,10));
insert into wl1612 values(1,12345678901234567890.1234567890,12345678901234567890.1234567890);
select * from wl1612;
@@ -205,27 +205,27 @@ NULL
NULL
NULL
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
select col2/0 from wl1612;
col2/0
NULL
NULL
NULL
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
select col3/0 from wl1612;
col3/0
NULL
NULL
NULL
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
insert into wl1612 values(5,5000.0005,5000.0005);
insert into wl1612 values(6,5000.0005,5000.0005);
select sum(col2),sum(col3) from wl1612;
@@ -788,12 +788,12 @@ select 1 / 1E-500;
1 / 1E-500
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
select 1 / 0;
1 / 0
NULL
Warnings:
-Error 1365 Division by 0
+Warning 1365 Division by 0
set sql_mode='ansi,traditional';
CREATE TABLE Sow6_2f (col1 NUMERIC(4,2));
INSERT INTO Sow6_2f VALUES (10.55);
@@ -819,11 +819,11 @@ NULL
NULL
NULL
Warnings:
-Error 1365 Division by 0
-Error 1365 Division by 0
-Error 1365 Division by 0
-Error 1365 Division by 0
-Error 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
INSERT INTO Sow6_2f VALUES ('a59b');
ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1
drop table Sow6_2f;
@@ -1444,12 +1444,12 @@ select cast(11.1234 as DECIMAL(3,2));
cast(11.1234 as DECIMAL(3,2))
9.99
Warnings:
-Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
select * from (select cast(11.1234 as DECIMAL(3,2))) t;
cast(11.1234 as DECIMAL(3,2))
9.99
Warnings:
-Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
select cast(a as DECIMAL(3,2))
from (select 11.1233 as a
UNION select 11.1234
@@ -1460,9 +1460,9 @@ cast(a as DECIMAL(3,2))
9.99
9.99
Warnings:
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
select cast(a as DECIMAL(3,2)), count(*)
from (select 11.1233 as a
UNION select 11.1234
@@ -1471,10 +1471,10 @@ UNION select 12.1234
cast(a as DECIMAL(3,2)) count(*)
9.99 3
Warnings:
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
create table t1 (s varchar(100));
insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875);
drop table t1;
@@ -1540,7 +1540,7 @@ select cast(143.481 as decimal(2,1));
cast(143.481 as decimal(2,1))
9.9
Warnings:
-Error 1264 Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1
+Warning 1264 Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1
select cast(-3.4 as decimal(2,1));
cast(-3.4 as decimal(2,1))
-3.4
@@ -1548,12 +1548,12 @@ select cast(99.6 as decimal(2,0));
cast(99.6 as decimal(2,0))
99
Warnings:
-Error 1264 Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1
+Warning 1264 Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1
select cast(-13.4 as decimal(2,1));
cast(-13.4 as decimal(2,1))
-9.9
Warnings:
-Error 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1
+Warning 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1
select cast(98.6 as decimal(2,0));
cast(98.6 as decimal(2,0))
99
=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result 2008-06-28 11:00:59 +0000
+++ b/mysql-test/r/view.result 2008-07-14 12:49:19 +0000
@@ -1112,8 +1112,8 @@ insert into v1 values(3);
ERROR HY000: CHECK OPTION failed 'test.v1'
insert ignore into v1 values (2),(3),(0);
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1;
a
1
@@ -1126,8 +1126,8 @@ create table t2 (a int);
insert into t2 values (2),(3),(0);
insert ignore into v1 SELECT a from t2;
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1 order by a desc;
a
1
@@ -1149,7 +1149,7 @@ a
update v1 set a=a+1;
update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a;
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1;
a
1
@@ -1183,7 +1183,7 @@ insert into v1 values (1) on duplicate k
ERROR HY000: CHECK OPTION failed 'test.v1'
insert ignore into v1 values (1) on duplicate key update a=2;
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1;
a
1
@@ -1284,7 +1284,7 @@ insert ignore into v1 values (6);
ERROR HY000: CHECK OPTION failed 'test.v1'
insert ignore into v1 values (6),(3);
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1;
s1
3
@@ -1329,9 +1329,9 @@ delete from t1;
load data infile '../std_data_ln/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines;
Warnings:
Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 4
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
select * from t1 order by a,b;
a b
1 row 1
@@ -1355,7 +1355,7 @@ concat('|',a,'|') concat('|',b,'|')
delete from t1;
load data infile '../std_data_ln/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by '''';
Warnings:
-Error 1369 CHECK OPTION failed 'test.v1'
+Warning 1369 CHECK OPTION failed 'test.v1'
Warning 1261 Row 2 doesn't contain data for all columns
select concat('|',a,'|'), concat('|',b,'|') from t1;
concat('|',a,'|') concat('|',b,'|')
=== modified file 'mysql-test/std_data/Index.xml'
--- a/mysql-test/std_data/Index.xml 2007-10-22 11:43:32 +0000
+++ b/mysql-test/std_data/Index.xml 2008-07-24 11:33:35 +0000
@@ -1,7 +1,7 @@
<charsets>
<charset name="utf8">
- <collation name="utf8_test_ci" id="253">
+ <collation name="utf8_test_ci" id="353">
<rules>
<reset>a</reset>
<s>b</s>
@@ -11,7 +11,7 @@
</charset>
<charset name="utf16">
- <collation name="utf16_test_ci" id="127">
+ <collation name="utf16_test_ci" id="327">
<rules>
<reset>a</reset>
<s>b</s>
@@ -20,7 +20,7 @@
</charset>
<charset name="utf32">
- <collation name="utf32_test_ci" id="191">
+ <collation name="utf32_test_ci" id="391">
<rules>
<reset>a</reset>
<s>b</s>
@@ -31,13 +31,13 @@
<charset name="ucs2">
- <collation name="ucs2_test_ci" id="158">
+ <collation name="ucs2_test_ci" id="358">
<rules>
<reset>a</reset>
<s>b</s>
</rules>
</collation>
- <collation name="ucs2_vn_ci" id="159">
+ <collation name="ucs2_vn_ci" id="359">
<!-- Vietnamese experimental collation -->
<rules>
<reset>A</reset>
=== modified file 'mysql-test/suite/falcon/r/falcon_bug_22972.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_22972.result 2008-06-27 13:30:49 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_22972.result 2008-07-15 00:06:43 +0000
@@ -5,6 +5,6 @@ DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
SHOW WARNINGS;
Level Code Message
-Error 178 Can't execute the given command because you have active locked tables or an active transaction
+Warning 178 Can't execute the given command because you have active locked tables or an active transaction
COMMIT;
DROP TABLE t1;
=== added file 'mysql-test/suite/falcon/r/falcon_tablespace_priv.result'
--- a/mysql-test/suite/falcon/r/falcon_tablespace_priv.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_tablespace_priv.result 2008-08-04 06:58:12 +0000
@@ -0,0 +1,70 @@
+# --
+# -- WL#4300: Define privileges for tablespaces.
+# --
+GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
+GRANT SUPER ON *.* TO mysqltest_u2@localhost;
+
+# -- Connection: mysqltest_u1@localhost
+
+# -- Grants for mysqltest_u1@localhost:
+SHOW GRANTS;
+Grants for mysqltest_u1@localhost
+GRANT CREATE TABLESPACE ON *.* TO 'mysqltest_u1'@'localhost'
+
+# -- Check CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+ENGINE = Falcon;
+
+# -- Check DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = Falcon;
+
+# -- Connection: mysqltest_u2@localhost
+
+# -- Grants for mysqltest_u2@localhost:
+SHOW GRANTS;
+Grants for mysqltest_u2@localhost
+GRANT SUPER ON *.* TO 'mysqltest_u2'@'localhost'
+
+# -- Check CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+ENGINE = Falcon;
+ERROR 42000: Access denied; you need the CREATE TABLESPACE privilege for this operation
+
+# -- Check DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = Falcon;
+ERROR 42000: Access denied; you need the CREATE TABLESPACE privilege for this operation
+
+# -- Connection: root@localhost
+
+DROP USER mysqltest_u1@localhost;
+DROP USER mysqltest_u2@localhost;
+# --
+# -- Bug#31302: USE information_schema disables DROP tablespace
+# --
+GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
+
+# -- Connection: mysqltest_u1@localhost
+
+# -- Grants for mysqltest_u1@localhost:
+SHOW GRANTS;
+Grants for mysqltest_u1@localhost
+GRANT CREATE TABLESPACE ON *.* TO 'mysqltest_u1'@'localhost'
+
+# -- CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+ENGINE = Falcon;
+
+use INFORMATION_SCHEMA;
+
+# -- DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = Falcon;
+
+# -- Connection: root@localhost
+
+DROP USER mysqltest_u1@localhost;
=== added file 'mysql-test/suite/falcon/t/falcon_tablespace_priv.test'
--- a/mysql-test/suite/falcon/t/falcon_tablespace_priv.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_tablespace_priv.test 2008-08-04 06:58:12 +0000
@@ -0,0 +1,94 @@
+--source include/have_falcon.inc
+
+--echo # --
+--echo # -- WL#4300: Define privileges for tablespaces.
+--echo # --
+
+GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
+GRANT SUPER ON *.* TO mysqltest_u2@localhost;
+
+--echo
+--echo # -- Connection: mysqltest_u1@localhost
+--echo
+--connect(con1, localhost, mysqltest_u1,,)
+
+--echo # -- Grants for mysqltest_u1@localhost:
+SHOW GRANTS;
+
+--echo
+--echo # -- Check CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+ENGINE = Falcon;
+
+--echo
+--echo # -- Check DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = Falcon;
+
+--echo
+--echo # -- Connection: mysqltest_u2@localhost
+--echo
+--connect(con2, localhost, mysqltest_u2,,)
+
+--echo # -- Grants for mysqltest_u2@localhost:
+SHOW GRANTS;
+
+--echo
+--echo # -- Check CREATE TABLESPACE...
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+ENGINE = Falcon;
+
+--echo
+--echo # -- Check DROP TABLESPACE...
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+DROP TABLESPACE ts1
+ENGINE = Falcon;
+
+--echo
+--echo # -- Connection: root@localhost
+--echo
+--connection default
+--disconnect con1
+--disconnect con2
+
+DROP USER mysqltest_u1@localhost;
+DROP USER mysqltest_u2@localhost;
+
+--echo # --
+--echo # -- Bug#31302: USE information_schema disables DROP tablespace
+--echo # --
+
+GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
+
+--echo
+--echo # -- Connection: mysqltest_u1@localhost
+--echo
+--connect(con1, localhost, mysqltest_u1,,)
+
+--echo # -- Grants for mysqltest_u1@localhost:
+SHOW GRANTS;
+
+--echo
+--echo # -- CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+ENGINE = Falcon;
+
+--echo
+use INFORMATION_SCHEMA;
+
+--echo
+--echo # -- DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = Falcon;
+
+--echo
+--echo # -- Connection: root@localhost
+--echo
+--connection default
+--disconnect con1
+
+DROP USER mysqltest_u1@localhost;
=== modified file 'mysql-test/suite/funcs_1/r/falcon_func_view.result'
--- a/mysql-test/suite/funcs_1/r/falcon_func_view.result 2008-06-19 18:56:48 +0000
+++ b/mysql-test/suite/funcs_1/r/falcon_func_view.result 2008-07-15 00:06:43 +0000
@@ -3283,9 +3283,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3301,9 +3301,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
DROP VIEW v1;
@@ -3372,9 +3372,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3389,9 +3389,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3408,11 +3408,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3430,11 +3430,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3454,9 +3454,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3471,9 +3471,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3490,11 +3490,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3510,11 +3510,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/innodb_func_view.result'
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result 2008-06-19 18:56:48 +0000
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result 2008-07-15 00:06:43 +0000
@@ -3283,9 +3283,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3301,9 +3301,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
DROP VIEW v1;
@@ -3372,9 +3372,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3389,9 +3389,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3408,11 +3408,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3430,11 +3430,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3454,9 +3454,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3471,9 +3471,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3490,11 +3490,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3510,11 +3510,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/memory_func_view.result'
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result 2008-06-19 18:56:48 +0000
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result 2008-07-15 00:06:43 +0000
@@ -3284,9 +3284,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3302,9 +3302,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
DROP VIEW v1;
@@ -3373,9 +3373,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3390,9 +3390,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3409,11 +3409,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3431,11 +3431,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3455,9 +3455,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3472,9 +3472,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3491,11 +3491,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3511,11 +3511,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/myisam_func_view.result'
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result 2008-06-19 18:56:48 +0000
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result 2008-07-15 00:06:43 +0000
@@ -3284,9 +3284,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3302,9 +3302,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
DROP VIEW v1;
@@ -3373,9 +3373,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3390,9 +3390,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3409,11 +3409,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---�ue: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3431,11 +3431,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3455,9 +3455,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3472,9 +3472,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3491,11 +3491,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---�View character_set_client collation_connection
@@ -3511,11 +3511,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/funcs_1/r/ndb_func_view.result'
--- a/mysql-test/suite/funcs_1/r/ndb_func_view.result 2008-06-19 18:56:48 +0000
+++ b/mysql-test/suite/funcs_1/r/ndb_func_view.result 2008-07-15 00:06:43 +0000
@@ -3305,9 +3305,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3323,9 +3323,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
DROP VIEW v1;
@@ -3394,9 +3394,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3411,9 +3411,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 29
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3430,11 +3430,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3452,11 +3452,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 28
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ''
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
@@ -3476,9 +3476,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -3493,9 +3493,9 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 27
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
@@ -3512,11 +3512,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -3532,11 +3532,11 @@ NULL NULL 1
-1.00 -1 5
-3333.33 -3333.3333 26
Warnings:
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' '
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
-Error 1366 Incorrect decimal value: '' for column '' at row -1
+Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---���*$-- '
DROP VIEW v1;
=== modified file 'mysql-test/suite/ndb/r/ndb_bitfield.result'
--- a/mysql-test/suite/ndb/r/ndb_bitfield.result 2007-08-27 08:14:24 +0000
+++ b/mysql-test/suite/ndb/r/ndb_bitfield.result 2008-07-15 00:06:43 +0000
@@ -226,7 +226,7 @@ b int
ERROR HY000: Can't create table 'test.t1' (errno: 906)
show warnings;
Level Code Message
-Error 1296 Got error 906 'Unsupported attribute type in index' from NDB
+Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB
Error 1005 Can't create table 'test.t1' (errno: 906)
create table t1 (
pk1 int not null primary key,
@@ -236,7 +236,7 @@ key(b)
ERROR HY000: Can't create table 'test.t1' (errno: 906)
show warnings;
Level Code Message
-Error 1296 Got error 906 'Unsupported attribute type in index' from NDB
+Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB
Error 1005 Can't create table 'test.t1' (errno: 906)
create table t1 (
pk1 int primary key,
=== modified file 'mysql-test/suite/ndb/r/ndb_dd_ddl.result'
--- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result 2007-10-26 20:40:48 +0000
+++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result 2008-07-25 18:44:20 +0000
@@ -15,7 +15,7 @@ ENGINE NDB;
ERROR HY000: Failed to create LOGFILE GROUP
SHOW WARNINGS;
Level Code Message
-Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB
+Warning 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB
Error 1528 Failed to create LOGFILE GROUP
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
@@ -236,3 +236,79 @@ engine ndb;
ERROR HY000: Failed to drop TABLESPACE
drop logfile group lg1
engine ndb;
+
+# -----------------------------------------------------------------
+# End 5.1 test
+# -----------------------------------------------------------------
+
+# --
+# -- WL#4300: Define privileges for tablespaces.
+# --
+GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
+
+DROP DATABASE IF EXISTS mysqltest2;
+CREATE DATABASE mysqltest2;
+GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost;
+
+# -- Connection: mysqltest_u1@localhost
+
+# -- Grants for mysqltest_u1@localhost:
+SHOW GRANTS;
+Grants for mysqltest_u1@localhost
+GRANT CREATE TABLESPACE ON *.* TO 'mysqltest_u1'@'localhost'
+
+# -- Check CREATE LOGFILE GROUP...
+CREATE LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile.dat'
+INITIAL_SIZE 1M
+UNDO_BUFFER_SIZE = 1M
+ENGINE = NDB;
+
+# -- Check ALTER LOGFILE GROUP...
+ALTER LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile02.dat'
+INITIAL_SIZE 1M
+ENGINE = NDB;
+
+# -- Check CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+USE LOGFILE GROUP lg1
+INITIAL_SIZE 1M
+ENGINE = NDB;
+
+# -- Check ALTER TABLESPACE...
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+INITIAL_SIZE 1M
+ENGINE = NDB;
+
+# -- Connection: mysqltest_u2@localhost
+
+# -- Grants for mysqltest_u2@localhost:
+SHOW GRANTS;
+Grants for mysqltest_u2@localhost
+GRANT USAGE ON *.* TO 'mysqltest_u2'@'localhost'
+GRANT ALL PRIVILEGES ON `mysqltest2`.* TO 'mysqltest_u2'@'localhost'
+CREATE TABLE t1(c INT) TABLESPACE ts1;
+DROP TABLE t1;
+
+# -- Connection: mysqltest_u1@localhost
+
+
+# -- Check DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = NDB;
+
+# -- Check DROP LOGFILE GROUP...
+DROP LOGFILE GROUP lg1
+ENGINE = NDB;
+
+# -- Connection: root@localhost
+
+DROP USER mysqltest_u1@localhost;
+DROP USER mysqltest_u2@localhost;
+
+# -----------------------------------------------------------------
+# End 6.0 test
+# -----------------------------------------------------------------
=== modified file 'mysql-test/suite/ndb/r/ndb_gis.result'
--- a/mysql-test/suite/ndb/r/ndb_gis.result 2007-12-18 18:07:41 +0000
+++ b/mysql-test/suite/ndb/r/ndb_gis.result 2008-07-15 00:06:43 +0000
@@ -465,7 +465,7 @@ drop table t1;
End of 4.1 tests
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
Warnings:
-Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
@@ -1017,7 +1017,7 @@ drop table t1;
End of 4.1 tests
CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
Warnings:
-Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
=== modified file 'mysql-test/suite/ndb/r/ndb_multi_row.result'
--- a/mysql-test/suite/ndb/r/ndb_multi_row.result 2007-11-01 14:08:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_multi_row.result 2008-07-15 00:06:43 +0000
@@ -63,6 +63,6 @@ t4
drop table t1, t2, t3, t4;
drop table if exists t1, t3, t4;
Warnings:
-Error 155 Table 'test.t1' doesn't exist
-Error 155 Table 'test.t3' doesn't exist
-Error 155 Table 'test.t4' doesn't exist
+Warning 155 Table 'test.t1' doesn't exist
+Warning 155 Table 'test.t3' doesn't exist
+Warning 155 Table 'test.t4' doesn't exist
=== modified file 'mysql-test/suite/ndb/r/ndb_partition_error.result'
--- a/mysql-test/suite/ndb/r/ndb_partition_error.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/ndb/r/ndb_partition_error.result 2008-07-15 00:06:43 +0000
@@ -14,7 +14,7 @@ partition x3 values less than (20) nodeg
ERROR HY000: Can't create table 'test.t1' (errno: 140)
show warnings;
Level Code Message
-Error 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB
+Warning 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB
Error 1005 Can't create table 'test.t1' (errno: 140)
CREATE TABLE t1 (
a int not null,
=== modified file 'mysql-test/suite/ndb/r/ndb_single_user.result'
--- a/mysql-test/suite/ndb/r/ndb_single_user.result 2007-10-26 20:40:48 +0000
+++ b/mysql-test/suite/ndb/r/ndb_single_user.result 2008-07-15 00:06:43 +0000
@@ -10,7 +10,7 @@ ENGINE=NDB;
ERROR HY000: Failed to create LOGFILE GROUP
show warnings;
Level Code Message
-Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
Error 1528 Failed to create LOGFILE GROUP
create table t1 (a int key, b int unique, c int) engine ndb;
CREATE LOGFILE GROUP lg1
@@ -26,14 +26,14 @@ ENGINE NDB;
ERROR HY000: Failed to create TABLESPACE
show warnings;
Level Code Message
-Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
Error 1528 Failed to create TABLESPACE
DROP LOGFILE GROUP lg1
ENGINE =NDB;
ERROR HY000: Failed to drop LOGFILE GROUP
show warnings;
Level Code Message
-Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
Error 1529 Failed to drop LOGFILE GROUP
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
@@ -46,7 +46,7 @@ ENGINE NDB;
ERROR HY000: Failed to alter: DROP DATAFILE
show warnings;
Level Code Message
-Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
Error 1533 Failed to alter: DROP DATAFILE
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
@@ -56,7 +56,7 @@ ENGINE NDB;
ERROR HY000: Failed to drop TABLESPACE
show warnings;
Level Code Message
-Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
Error 1529 Failed to drop TABLESPACE
DROP TABLESPACE ts1
ENGINE NDB;
=== modified file 'mysql-test/suite/ndb/t/ndb_dd_ddl.test'
--- a/mysql-test/suite/ndb/t/ndb_dd_ddl.test 2007-08-22 13:54:10 +0000
+++ b/mysql-test/suite/ndb/t/ndb_dd_ddl.test 2008-07-24 07:44:21 +0000
@@ -367,4 +367,103 @@ engine ndb;
--exec rm $MYSQLTEST_VARDIR/tmp/t1.frm
-# End 5.1 test
+--echo
+--echo # -----------------------------------------------------------------
+--echo # End 5.1 test
+--echo # -----------------------------------------------------------------
+
+--echo
+--echo # --
+--echo # -- WL#4300: Define privileges for tablespaces.
+--echo # --
+
+GRANT CREATE TABLESPACE ON *.* TO mysqltest_u1@localhost;
+
+--echo
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest2;
+--enable_warnings
+
+CREATE DATABASE mysqltest2;
+
+GRANT ALL PRIVILEGES ON mysqltest2.* TO mysqltest_u2@localhost;
+
+--echo
+--echo # -- Connection: mysqltest_u1@localhost
+--echo
+--connect(con1, localhost, mysqltest_u1,,)
+
+--echo # -- Grants for mysqltest_u1@localhost:
+SHOW GRANTS;
+
+--echo
+--echo # -- Check CREATE LOGFILE GROUP...
+CREATE LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile.dat'
+INITIAL_SIZE 1M
+UNDO_BUFFER_SIZE = 1M
+ENGINE = NDB;
+
+--echo
+--echo # -- Check ALTER LOGFILE GROUP...
+ALTER LOGFILE GROUP lg1
+ADD UNDOFILE 'undofile02.dat'
+INITIAL_SIZE 1M
+ENGINE = NDB;
+
+--echo
+--echo # -- Check CREATE TABLESPACE...
+CREATE TABLESPACE ts1
+ADD DATAFILE 'datafile.dat'
+USE LOGFILE GROUP lg1
+INITIAL_SIZE 1M
+ENGINE = NDB;
+
+--echo
+--echo # -- Check ALTER TABLESPACE...
+ALTER TABLESPACE ts1
+DROP DATAFILE 'datafile.dat'
+INITIAL_SIZE 1M
+ENGINE = NDB;
+
+--echo
+--echo # -- Connection: mysqltest_u2@localhost
+--echo
+--connect(con2, localhost, mysqltest_u2,,mysqltest2)
+
+--echo # -- Grants for mysqltest_u2@localhost:
+SHOW GRANTS;
+
+CREATE TABLE t1(c INT) TABLESPACE ts1;
+
+DROP TABLE t1;
+
+--echo
+--echo # -- Connection: mysqltest_u1@localhost
+--echo
+--connection con1
+
+--echo
+--echo # -- Check DROP TABLESPACE...
+DROP TABLESPACE ts1
+ENGINE = NDB;
+
+--echo
+--echo # -- Check DROP LOGFILE GROUP...
+DROP LOGFILE GROUP lg1
+ENGINE = NDB;
+
+--echo
+--echo # -- Connection: root@localhost
+--echo
+--connection default
+--disconnect con1
+
+DROP USER mysqltest_u1@localhost;
+DROP USER mysqltest_u2@localhost;
+
+--echo
+--echo # -----------------------------------------------------------------
+--echo # End 6.0 test
+--echo # -----------------------------------------------------------------
=== modified file 'mysql-test/suite/rpl/r/rpl_EE_err.result'
--- a/mysql-test/suite/rpl/r/rpl_EE_err.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_EE_err.result 2008-07-14 12:49:19 +0000
@@ -8,4 +8,4 @@ create table t1 (a int) engine=myisam;
flush tables;
drop table if exists t1;
Warnings:
-Error 2 Can't find file: 't1' (errno: 2)
+Warning 2 Can't find file: 't1' (errno: 2)
=== modified file 'mysql-test/t/ctype_ldml.test'
--- a/mysql-test/t/ctype_ldml.test 2007-10-22 11:43:32 +0000
+++ b/mysql-test/t/ctype_ldml.test 2008-07-24 11:33:35 +0000
@@ -77,3 +77,21 @@ select hex(c1) as h, c1 from t1 order by
select group_concat(hex(c1) order by hex(c1)) from t1 group by c1;
select group_concat(c1 order by hex(c1) SEPARATOR '') from t1 group by c1;
drop table t1;
+
+
+-- echo The following tests check that two-byte collation IDs work
+-- The file ../std-data/Index.xml has a number of collations with high IDs.
+
+# Test that the "ID" column in I_S and SHOW queries can handle two bytes
+select * from information_schema.collations where id>256 order by id;
+show collation like '%test%';
+
+# Test that two-byte collation ID is correctly transfered to the client side.
+show collation like 'ucs2_vn_ci';
+create table t1 (c1 char(1) character set ucs2 collate ucs2_vn_ci);
+insert into t1 values (0x0061);
+--enable_metadata
+set @@character_set_results=NULL;
+select * from t1;
+--disable_metadata
+drop table t1;
=== added file 'mysql-test/t/implicit_commit.test'
--- a/mysql-test/t/implicit_commit.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/implicit_commit.test 2008-07-27 13:14:46 +0000
@@ -0,0 +1,1172 @@
+source include/have_innodb.inc;
+source include/not_embedded.inc;
+
+SET GLOBAL EVENT_SCHEDULER = OFF;
+SET BINLOG_FORMAT = STATEMENT;
+
+LET $OLD_DB= `SELECT DATABASE()`;
+
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE t1 (a INT, KEY a(a)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+CREATE TABLE t3 (a INT) ENGINE=MyISAM;
+INSERT INTO t3 SELECT * FROM t1;
+CREATE TABLE trans (a INT) ENGINE=INNODB;
+
+DELIMITER |;
+
+CREATE PROCEDURE test_if_commit()
+BEGIN
+ ROLLBACK;
+ SELECT IF (COUNT(*) > 0, "YES", "NO") AS "IMPLICIT COMMIT" FROM trans;
+ DELETE FROM trans;
+ COMMIT;
+END|
+
+DELIMITER ;|
+
+SET AUTOCOMMIT = FALSE;
+
+--echo #
+--echo # SQLCOM_SELECT
+--echo #
+
+let $statement=
+ select 1 as res from t1 where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_TABLE LIKE
+--echo #
+
+let $statement=
+ create table t2 like t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CREATE
+--echo #
+
+let $statement=
+ show create table t2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_TABLE
+--echo #
+
+let $statement=
+ drop table t2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_TABLE TEMPORARY
+--echo #
+
+let $statement=
+ create temporary table t2 as select * from t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_TABLE TEMPORARY
+--echo #
+
+let $statement=
+ drop temporary table t2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_TABLE
+--echo #
+
+let $statement=
+ create table t2 as select * from t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_UPDATE
+--echo #
+
+let $statement=
+ update t2 set a=a+1 where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_INSERT
+--echo #
+
+let $statement=
+ insert into t2 set a=((1) in (select * from t1));
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_INSERT_SELECT
+--echo #
+
+let $statement=
+ insert into t2 select * from t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_REPLACE
+--echo #
+
+let $statement=
+ replace t2 set a=((1) in (select * from t1));
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_REPLACE_SELECT
+--echo #
+
+let $statement=
+ replace t2 select * from t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DELETE
+--echo #
+
+let $statement=
+ delete from t2 where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DELETE_MULTI
+--echo #
+
+let $statement=
+ delete t2, t3 from t2, t3 where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_UPDATE_MULTI
+--echo #
+
+select * from t2;
+let $statement=
+ update t2, t3 set t3.a=t2.a, t2.a=null where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_LOAD
+--echo #
+
+create table t4 (a varchar(100));
+
+let $statement=
+ load data infile '../std_data_ln/words.dat' into table t4;
+source include/implicit_commit_helper.inc;
+
+drop table t4;
+
+--echo #
+--echo # SQLCOM_SHOW_DATABASES
+--echo #
+
+let $statement=
+ show databases where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_TABLES
+--echo #
+
+let $statement=
+ show tables where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_FIELDS
+--echo #
+
+let $statement=
+ show fields from t1 where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_KEYS
+--echo #
+
+let $statement=
+ show keys from t1 where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_VARIABLES
+--echo #
+
+let $statement=
+ show variables where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_STATUS
+--echo #
+
+#
+# Bug#37908
+#
+#let $statement=
+# show status where (1) in (select * from t1);
+#source include/implicit_commit_helper.inc;
+#
+
+--echo #
+--echo # SQLCOM_SHOW_ENGINE_MUTEX
+--echo #
+
+let $statement=
+ show engine all mutex;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_PROCESSLIST
+--echo #
+
+let $statement=
+ show processlist;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_ENGINE_LOGS
+--echo #
+
+let $statement=
+ show engine all logs;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_ENGINE_STATUS
+--echo #
+
+let $statement=
+ show engine all status;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CHARSETS
+--echo #
+
+let $statement=
+ show charset where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_COLLATIONS
+--echo #
+
+let $statement=
+ show collation where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_TABLE_STATUS
+--echo #
+
+let $statement=
+ show table status where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_TRIGGERS
+--echo #
+
+let $statement=
+ show triggers where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_OPEN_TABLES
+--echo #
+
+let $statement=
+ show open tables where (1) in (select * from t1);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_STATUS_PROC
+--echo #
+
+#
+# Bug#37908
+#
+#let $statement=
+# show procedure status where (1) in (select * from t1);
+#source include/implicit_commit_helper.inc;
+#
+
+--echo #
+--echo # SQLCOM_SHOW_STATUS_FUNC
+--echo #
+
+#
+# Bug#37908
+#
+#let $statement=
+# show function status where (1) in (select * from t1);
+#source include/implicit_commit_helper.inc;
+#
+
+--echo #
+--echo # SQLCOM_SET_OPTION
+--echo #
+
+let $statement=
+ set @a=((1) in (select * from t1));
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DO
+--echo #
+
+let $statement=
+ do ((1) in (select * from t1));
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CALL
+--echo #
+
+create procedure p1(a int) begin end;
+
+#
+# Bug#37949
+#
+#let $statement=
+# call p1((1) in (select * from t1));
+#source include/implicit_commit_helper.inc;
+#
+
+drop procedure p1;
+
+--echo #
+--echo # SQLCOM_CREATE_VIEW
+--echo #
+
+let $statement=
+ create view v1 as select * from t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_VIEW
+--echo #
+
+let $statement=
+ alter view v1 as select 2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_VIEW
+--echo #
+
+let $statement=
+ drop view v1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_INDEX
+--echo #
+
+let $statement=
+ create index idx1 on t1(a);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_INDEX
+--echo #
+
+let $statement=
+ drop index idx1 on t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_TABLE
+--echo #
+
+let $statement=
+ alter table t1 add column b int;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ alter table t1 change b c int;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ alter table t1 drop column c;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_TABLE TEMPORARY
+--echo #
+
+create temporary table t4 (a int);
+
+let $statement=
+ alter table t1 add column b int;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ alter table t1 change b c int;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ alter table t1 drop column c;
+source include/implicit_commit_helper.inc;
+
+drop table t4;
+
+--echo #
+--echo # SQLCOM_TRUNCATE
+--echo #
+
+insert into t2 select * from t1;
+let $statement=
+ truncate table t2;
+source include/implicit_commit_helper.inc;
+insert into t2 select * from t1;
+
+--echo #
+--echo # SQLCOM_TRUNCATE TEMPORARY
+--echo #
+
+create temporary table t4 as select * from t1;
+let $statement=
+ truncate table t4;
+source include/implicit_commit_helper.inc;
+drop temporary table t4;
+
+--echo #
+--echo # SQLCOM_SHOW_MASTER_STAT
+--echo #
+
+let $statement=
+ show master status;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_SLAVE_STAT
+--echo #
+
+let $statement=
+ show slave status;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_GRANT
+--echo #
+
+let $statement=
+ grant all on test.t1 to mysqltest_2@localhost with grant option;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_REVOKE
+--echo #
+let $statement=
+ revoke select on test.t1 from mysqltest_2@localhost;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_REVOKE_ALL
+--echo #
+
+let $statement=
+ revoke all on test.t1 from mysqltest_2@localhost;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_GRANTS
+--echo #
+
+let $statement=
+ show grants;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ show grants for current_user();
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_LOCK_TABLES
+--echo #
+
+let $statement=
+ lock tables t1 write, trans write;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_UNLOCK_TABLES
+--echo #
+
+let $statement=
+ unlock tables;
+source include/implicit_commit_helper.inc;
+
+#
+# Missing test for lock tables transactional.
+#
+
+--echo #
+--echo # SQLCOM_CREATE_DB
+--echo #
+
+let $statement=
+ create database db2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CHANGE_DB
+--echo #
+
+create table db2.t1 (a int);
+insert into db2.t1 values (1);
+commit;
+
+let $statement=
+ use db2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CREATE_DB
+--echo #
+
+let $statement=
+ show create database db2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_DB
+--echo #
+
+#let $statement=
+# alter database db2 character set koi8r;
+#source include/implicit_commit_helper.inc;
+
+#let $statement=
+# alter database db2 collate cp1251_general_cs;
+#source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_DB_UPGRADE
+--echo #
+
+#let $statement=
+# alter database `#mysql50#db3` upgrade data directory name;
+#source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_DB
+--echo #
+
+use db1;
+
+let $statement=
+ drop database db2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_REPAIR
+--echo #
+
+let $statement=
+ repair table t2;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ repair table t2 use_frm;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_OPTIMIZE
+--echo #
+
+let $statement=
+ optimize table t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CHECK
+--echo #
+
+let $statement=
+ check table t1;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ check table t1 extended;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ASSIGN_TO_KEYCACHE
+--echo #
+
+set global keycache.key_buffer_size=128*1024;
+
+let $statement=
+ cache index t3 in keycache;
+source include/implicit_commit_helper.inc;
+
+set global keycache.key_buffer_size=0;
+
+--echo #
+--echo # SQLCOM_PRELOAD_KEYS
+--echo #
+
+let $statement=
+ load index into cache t3;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_FLUSH
+--echo #
+
+let $statement=
+ flush local privileges;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ flush privileges;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_KILL
+--echo #
+
+--echo #
+--echo # SQLCOM_ANALYZE
+--echo #
+
+let $statement=
+ analyze table t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ROLLBACK
+--echo #
+
+let $statement=
+ rollback;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ROLLBACK_TO_SAVEPOINT
+--echo #
+
+
+--echo #
+--echo # SQLCOM_COMMIT
+--echo #
+
+let $statement=
+ commit;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SAVEPOINT
+--echo #
+
+let $statement=
+ savepoint sp1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_RELEASE_SAVEPOINT
+--echo #
+
+--echo #
+--echo # SQLCOM_SLAVE_START
+--echo #
+
+--echo #
+--echo # SQLCOM_SLAVE_STOP
+--echo #
+
+--echo #
+--echo # SQLCOM_BEGIN
+--echo #
+
+let $statement=
+ begin;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CHANGE_MASTER
+--echo #
+
+--echo #
+--echo # SQLCOM_RENAME_TABLE
+--echo #
+
+let $statement=
+ rename table t3 to t4;
+source include/implicit_commit_helper.inc;
+
+let $statement=
+ rename table t4 to t3;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_RESET
+--echo #
+
+--echo #
+--echo # SQLCOM_PURGE
+--echo #
+
+--echo #
+--echo # SQLCOM_PURGE_BEFORE
+--echo #
+
+--echo #
+--echo # SQLCOM_SHOW_BINLOGS
+--echo #
+
+--echo #
+--echo # SQLCOM_HA_OPEN
+--echo #
+
+let $statement=
+ handler t1 open as ha1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_HA_READ
+--echo #
+
+let $statement=
+ handler ha1 read a first;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_HA_CLOSE
+--echo #
+
+let $statement=
+ handler ha1 close;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_SLAVE_HOSTS
+--echo #
+
+let $statement=
+ show slave hosts;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_BINLOG_EVENTS
+--echo #
+
+let $statement=
+ show binlog events;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_NEW_MASTER
+--echo #
+
+--echo #
+--echo # SQLCOM_SHOW_WARNS
+--echo #
+
+let $statement=
+ show warnings;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_EMPTY_QUERY
+--echo #
+
+--echo #
+--echo # SQLCOM_SHOW_ERRORS
+--echo #
+
+let $statement=
+ show errors;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_STORAGE_ENGINES
+--echo #
+
+let $statement=
+ show engines;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_PRIVILEGES
+--echo #
+
+let $statement=
+ show privileges;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_HELP
+--echo #
+
+let $statement=
+ help 'foo';
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_USER
+--echo #
+
+let $statement=
+ create user trxusr1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_RENAME_USER
+--echo #
+
+let $statement=
+ rename user 'trxusr1' to 'trxusr2';
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_USER
+--echo #
+
+let $statement=
+ drop user trxusr2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CHECKSUM
+--echo #
+
+let $statement=
+ checksum table t1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_PROCEDURE
+--echo #
+
+let $statement=
+ create procedure p1(a int) begin end;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_PROCEDURE
+--echo #
+
+let $statement=
+ alter procedure p1 comment 'foobar';
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CREATE_PROC
+--echo #
+
+let $statement=
+ show create procedure p1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_STATUS_PROC
+--echo #
+
+let $statement=
+ show procedure status;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_PROC_CODE
+--echo #
+
+#
+# Available only on servers with debugging support.
+#
+
+--disable_abort_on_error
+let $statement=
+ show procedure code p1;
+source include/implicit_commit_helper.inc;
+--enable_abort_on_error
+
+--echo #
+--echo # SQLCOM_DROP_PROCEDURE
+--echo #
+
+let $statement=
+ drop procedure p1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_FUNCTION
+--echo #
+
+--echo #
+--echo # SQLCOM_DROP_FUNCTION
+--echo #
+
+--echo #
+--echo # SQLCOM_CREATE_SPFUNCTION
+--echo #
+
+let $statement=
+ create function f1() returns int return 69;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_FUNCTION
+--echo #
+
+let $statement=
+ alter function f1 comment 'comment';
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CREATE_FUNC
+--echo #
+
+let $statement=
+ show create function f1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_STATUS_FUNC
+--echo #
+
+let $statement=
+ show function status like '%f%';
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_FUNC_CODE
+--echo #
+
+#
+# Available only on servers with debugging support.
+#
+
+--disable_abort_on_error
+let $statement=
+ show function code f1;
+source include/implicit_commit_helper.inc;
+--enable_abort_on_error
+
+--echo #
+--echo # SQLCOM_PREPARE
+--echo #
+
+let $statement=
+ prepare stmt1 from "insert into t1 values (5)";
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_EXECUTE
+--echo #
+
+let $statement=
+ execute stmt1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DEALLOCATE_PREPARE
+--echo #
+
+let $statement=
+ deallocate prepare stmt1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_TRIGGER
+--echo #
+
+let $statement=
+ create trigger trg1 before insert on t1 for each row set @a:=1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CREATE_TRIGGER
+--echo #
+
+let $statement=
+ show create trigger trg1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_TRIGGER
+--echo #
+
+let $statement=
+ drop trigger trg1;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_XA_START
+--echo #
+
+--echo #
+--echo # SQLCOM_XA_END
+--echo #
+
+--echo #
+--echo # SQLCOM_XA_PREPARE
+--echo #
+
+--echo #
+--echo # SQLCOM_XA_COMMIT
+--echo #
+
+--echo #
+--echo # SQLCOM_XA_ROLLBACK
+--echo #
+
+--echo #
+--echo # SQLCOM_XA_RECOVER
+--echo #
+
+--echo #
+--echo # SQLCOM_ALTER_TABLESPACE
+--echo #
+
+--echo #
+--echo # SQLCOM_INSTALL_PLUGIN
+--echo #
+
+--echo #
+--echo # SQLCOM_SHOW_PLUGINS
+--echo #
+
+--echo #
+--echo # SQLCOM_UNINSTALL_PLUGIN
+--echo #
+
+--echo #
+--echo # SQLCOM_SHOW_AUTHORS
+--echo #
+
+let $statement=
+ show authors;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_BINLOG_BASE64_EVENT
+--echo #
+
+--echo #
+--echo # SQLCOM_SHOW_CONTRIBUTORS
+--echo #
+
+let $statement=
+ show contributors;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_CREATE_SERVER
+--echo #
+
+--echo #
+--echo # SQLCOM_ALTER_SERVER
+--echo #
+
+--echo #
+--echo # SQLCOM_DROP_SERVER
+--echo #
+
+--echo #
+--echo # SQLCOM_CREATE_EVENT
+--echo #
+
+let $statement=
+ create event ev1 on schedule every 1 second do insert into t1 values (6);
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_ALTER_EVENT
+--echo #
+
+let $statement=
+ alter event ev1 rename to ev2 disable;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_CREATE_EVENT
+--echo #
+
+let $statement=
+ show create event ev2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_EVENTS
+--echo #
+
+let $statement=
+ show events;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_DROP_EVENT
+--echo #
+
+let $statement=
+ drop event ev2;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_BACKUP
+--echo #
+
+let $statement=
+ backup database db1 to 'backup_db1.ba';
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_ARCHIVE
+--echo #
+
+#
+# --error ER_NOT_ALLOWED_COMMAND
+#
+#let $statement=
+# show backup 'backup_db1.ba';
+#source include/implicit_commit_helper.inc;
+#
+
+--echo #
+--echo # SQLCOM_RESTORE
+--echo #
+
+let $statement=
+ restore from 'backup_db1.ba';
+source include/implicit_commit_helper.inc;
+
+--remove_file $MYSQLTEST_VARDIR/master-data/backup_db1.ba
+
+--echo #
+--echo # SQLCOM_BACKUP_TEST
+--echo #
+
+# BACKUP_TEST
+
+--echo #
+--echo # SQLCOM_SHOW_PROFILE
+--echo #
+
+let $statement=
+ show profile memory;
+source include/implicit_commit_helper.inc;
+
+--echo #
+--echo # SQLCOM_SHOW_PROFILES
+--echo #
+
+let $statement=
+ show profiles;
+source include/implicit_commit_helper.inc;
+
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+eval USE $OLD_DB;
+DROP DATABASE db1;
+
+--echo End of tests
=== modified file 'mysys/charset.c'
--- a/mysys/charset.c 2008-02-19 21:53:33 +0000
+++ b/mysys/charset.c 2008-07-24 11:33:35 +0000
@@ -410,7 +410,7 @@ char *get_charsets_dir(char *buf)
DBUG_RETURN(res);
}
-CHARSET_INFO *all_charsets[256];
+CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
CHARSET_INFO *default_charset_info = &my_charset_latin1;
void add_compiled_collation(CHARSET_INFO *cs)
=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql 2008-07-31 11:37:07 +0000
+++ b/scripts/mysql_system_tables.sql 2008-08-07 03:05:33 +0000
@@ -13,7 +13,7 @@ set @had_db_table= @@warning_count != 0;
CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
-CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
-- Remember for later if user table already existed
set @had_user_table= @@warning_count != 0;
=== modified file 'scripts/mysql_system_tables_data.sql'
--- a/scripts/mysql_system_tables_data.sql 2007-12-10 11:21:41 +0000
+++ b/scripts/mysql_system_tables_data.sql 2008-07-24 07:44:21 +0000
@@ -21,9 +21,9 @@ DROP TABLE tmp_db;
-- from local machine if "users" table didn't exist before
CREATE TEMPORARY TABLE tmp_user LIKE user;
set @current_hostname= @@hostname;
-INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-REPLACE INTO tmp_user VALUES (@current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+REPLACE INTO tmp_user VALUES (@current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
INSERT INTO tmp_user (host,user) VALUES (@current_hostname,'');
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
=== modified file 'scripts/mysql_system_tables_fix.sql'
--- a/scripts/mysql_system_tables_fix.sql 2008-08-05 21:36:14 +0000
+++ b/scripts/mysql_system_tables_fix.sql 2008-08-07 03:05:33 +0000
@@ -587,6 +587,18 @@ ALTER TABLE tables_priv MODIFY Table_pri
UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
+#
+# user.Create_tablespace_priv
+#
+
+SET @hadCreateTablespacePriv := 0;
+SELECT @hadCreateTablespacePriv :=1 FROM user WHERE Create_tablespace_priv LIKE '%';
+
+ALTER TABLE user ADD Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Trigger_priv;
+ALTER TABLE user MODIFY Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Trigger_priv;
+
+UPDATE user SET Create_tablespace_priv = Super_priv WHERE @hadCreateTablespacePriv = 0;
+
# Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above
# changes was correct
=== modified file 'sql/events.cc'
--- a/sql/events.cc 2008-07-17 19:55:18 +0000
+++ b/sql/events.cc 2008-07-26 16:38:20 +0000
@@ -363,15 +363,6 @@ Events::create_event(THD *thd, Event_par
int ret;
DBUG_ENTER("Events::create_event");
- /*
- Let's commit the transaction first - MySQL manual specifies
- that a DDL issues an implicit commit, and it doesn't say "successful
- DDL", so that an implicit commit is a property of any successfully
- parsed DDL statement.
- */
- if (end_active_trans(thd))
- DBUG_RETURN(TRUE);
-
if (check_if_system_tables_error())
DBUG_RETURN(TRUE);
@@ -467,13 +458,6 @@ Events::update_event(THD *thd, Event_par
DBUG_ENTER("Events::update_event");
- /*
- For consistency, implicit COMMIT should be the first thing in the
- execution chain.
- */
- if (end_active_trans(thd))
- DBUG_RETURN(TRUE);
-
if (check_if_system_tables_error())
DBUG_RETURN(TRUE);
@@ -590,20 +574,6 @@ Events::drop_event(THD *thd, LEX_STRING
int ret;
DBUG_ENTER("Events::drop_event");
- /*
- In MySQL, DDL must always commit: since mysql.* tables are
- non-transactional, we must modify them outside a transaction
- to not break atomicity.
- But the second and more important reason to commit here
- regardless whether we're actually changing mysql.event table
- or not is replication: end_active_trans syncs the binary log,
- and unless we run DDL in it's own transaction it may simply
- never appear on the slave in case the outside transaction
- rolls back.
- */
- if (end_active_trans(thd))
- DBUG_RETURN(TRUE);
-
if (check_if_system_tables_error())
DBUG_RETURN(TRUE);
=== modified file 'sql/field.cc'
--- a/sql/field.cc 2008-07-24 14:33:10 +0000
+++ b/sql/field.cc 2008-07-25 17:21:55 +0000
@@ -2595,7 +2595,7 @@ int Field_new_decimal::store(const char
String from_as_str;
from_as_str.copy(from, length, &my_charset_bin);
- push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"decimal", from_as_str.c_ptr(), field_name,
@@ -6198,11 +6198,9 @@ check_string_copy_error(Field_str *field
*t++= '.';
}
*t= '\0';
- push_warning_printf(field->table->in_use,
- field->table->in_use->abort_on_warning ?
- MYSQL_ERROR::WARN_LEVEL_ERROR :
+ push_warning_printf(field->table->in_use,
MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
+ ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"string", tmp, field->field_name,
(ulong) field->table->in_use->row_count);
@@ -6239,7 +6237,7 @@ Field_longstr::report_if_important_data(
if (test_if_important_data(field_charset, ptr, end))
{
if (table->in_use->abort_on_warning)
- set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+ set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
else
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
return 2;
@@ -6309,7 +6307,7 @@ int Field_str::store(double nr)
if (error)
{
if (table->in_use->abort_on_warning)
- set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+ set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
else
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
}
@@ -8794,7 +8792,7 @@ int Field_bit::store(const char *from, u
set_rec_bits((1 << bit_len) - 1, bit_ptr, bit_ofs, bit_len);
memset(ptr, 0xff, bytes_in_rec);
if (table->in_use->really_abort_on_warning())
- set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+ set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
else
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
return 1;
@@ -9205,7 +9203,7 @@ int Field_bit_as_char::store(const char
if (bits)
*ptr&= ((1 << bits) - 1); /* set first uchar */
if (table->in_use->really_abort_on_warning())
- set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+ set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
else
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
return 1;
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2008-06-28 11:00:59 +0000
+++ b/sql/ha_ndbcluster.cc 2008-07-14 12:49:19 +0000
@@ -239,11 +239,11 @@ static int ndb_to_mysql_error(const NdbE
- Used by replication to see if the error was temporary
*/
if (ndberr->status == NdbError::TemporaryError)
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_TEMPORARY_ERRMSG, ER(ER_GET_TEMPORARY_ERRMSG),
ndberr->code, ndberr->message, "NDB");
else
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
ndberr->code, ndberr->message, "NDB");
return error;
@@ -480,7 +480,7 @@ static void set_ndb_err(THD *thd, const
{
char buf[FN_REFLEN];
ndb_error_string(thd_ndb->m_error_code, buf, sizeof(buf));
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
thd_ndb->m_error_code, buf, "NDB");
}
@@ -5864,7 +5864,7 @@ int ha_ndbcluster::create(const char *na
else if (create_info->tablespace &&
create_info->default_storage_media == HA_SM_MEMORY)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
@@ -5887,7 +5887,7 @@ int ha_ndbcluster::create(const char *na
{
if (key_part->field->field_storage_type() == HA_SM_DISK)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
@@ -6143,7 +6143,7 @@ int ha_ndbcluster::create_index(THD *thd
case ORDERED_INDEX:
if (key_info->algorithm == HA_KEY_ALG_HASH)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
@@ -6216,7 +6216,7 @@ int ha_ndbcluster::create_ndb_index(THD
Field *field= key_part->field;
if (field->field_storage_type() == HA_SM_DISK)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
@@ -10632,7 +10632,7 @@ uint ha_ndbcluster::set_up_partition_inf
{
if (!current_thd->variables.new_mode)
{
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc 2008-06-20 13:11:20 +0000
+++ b/sql/ha_ndbcluster_binlog.cc 2008-07-14 12:49:19 +0000
@@ -1196,7 +1196,7 @@ ndbcluster_update_slock(THD *thd,
}
if (ndb_error)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
ndb_error->code,
ndb_error->message,
@@ -1542,7 +1542,7 @@ err:
}
end:
if (ndb_error)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
ndb_error->code,
ndb_error->message,
@@ -2970,7 +2970,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
"with BLOB attribute and no PK is not supported",
share->key);
if (push_warning)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION,
ER(ER_ILLEGAL_HA_CREATE_OPTION),
ndbcluster_hton_name,
@@ -3022,7 +3022,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
failed, print a warning
*/
if (push_warning > 1)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
dict->getNdbError().code,
dict->getNdbError().message, "NDB");
@@ -3050,7 +3050,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
dict->dropEvent(my_event.getName(), 1))
{
if (push_warning > 1)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
dict->getNdbError().code,
dict->getNdbError().message, "NDB");
@@ -3069,7 +3069,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
if (dict->createEvent(my_event))
{
if (push_warning > 1)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
dict->getNdbError().code,
dict->getNdbError().message, "NDB");
@@ -3082,7 +3082,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
DBUG_RETURN(-1);
}
#ifdef NDB_BINLOG_EXTRA_WARNINGS
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
0, "NDB Binlog: Removed trailing event",
"NDB");
@@ -3196,7 +3196,7 @@ ndbcluster_create_event_ops(THD *thd, ND
{
sql_print_error("NDB Binlog: Creating NdbEventOperation failed for"
" %s",event_name);
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
ndb->getNdbError().code,
ndb->getNdbError().message,
@@ -3258,7 +3258,7 @@ ndbcluster_create_event_ops(THD *thd, ND
sql_print_error("NDB Binlog: Creating NdbEventOperation"
" blob field %u handles failed (code=%d) for %s",
j, op->getNdbError().code, event_name);
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
op->getNdbError().code,
op->getNdbError().message,
@@ -3299,7 +3299,7 @@ ndbcluster_create_event_ops(THD *thd, ND
retries= 0;
if (retries == 0)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
op->getNdbError().code, op->getNdbError().message,
"NDB");
@@ -3376,7 +3376,7 @@ ndbcluster_drop_event(THD *thd, Ndb *ndb
if (dict->getNdbError().code != 4710)
{
/* drop event failed for some reason, issue a warning */
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
dict->getNdbError().code,
dict->getNdbError().message, "NDB");
=== modified file 'sql/handler.cc'
--- a/sql/handler.cc 2008-07-23 11:28:20 +0000
+++ b/sql/handler.cc 2008-07-25 17:21:55 +0000
@@ -921,7 +921,7 @@ int ha_prepare(THD *thd)
THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
Ha_trx_info *ha_info= trans->ha_list;
DBUG_ENTER("ha_prepare");
-#ifdef USING_TRANSACTIONS
+
if (ha_info)
{
for (; ha_info; ha_info= ha_info->next())
@@ -947,7 +947,7 @@ int ha_prepare(THD *thd)
}
}
}
-#endif /* USING_TRANSACTIONS */
+
DBUG_RETURN(error);
}
@@ -1068,7 +1068,7 @@ int ha_commit_trans(THD *thd, bool all)
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
DBUG_RETURN(2);
}
-#ifdef USING_TRANSACTIONS
+
if (ha_info)
{
uint rw_ha_count;
@@ -1148,7 +1148,7 @@ end:
if (rw_trans)
start_waiting_global_read_lock(thd);
}
-#endif /* USING_TRANSACTIONS */
+
DBUG_RETURN(error);
}
@@ -1163,7 +1163,7 @@ int ha_commit_one_phase(THD *thd, bool a
bool is_real_trans=all || thd->transaction.all.ha_list == 0;
Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
DBUG_ENTER("ha_commit_one_phase");
-#ifdef USING_TRANSACTIONS
+
if (ha_info)
{
for (; ha_info; ha_info= ha_info_next)
@@ -1193,7 +1193,7 @@ int ha_commit_one_phase(THD *thd, bool a
thd->transaction.cleanup();
}
}
-#endif /* USING_TRANSACTIONS */
+
DBUG_RETURN(error);
}
@@ -1226,7 +1226,7 @@ int ha_rollback_trans(THD *thd, bool all
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
DBUG_RETURN(1);
}
-#ifdef USING_TRANSACTIONS
+
if (ha_info)
{
/* Close all cursors that can not survive ROLLBACK */
@@ -1256,7 +1256,7 @@ int ha_rollback_trans(THD *thd, bool all
thd->transaction.cleanup();
}
}
-#endif /* USING_TRANSACTIONS */
+
if (all)
thd->transaction_rollback_request= FALSE;
@@ -1291,7 +1291,7 @@ int ha_rollback_trans(THD *thd, bool all
int ha_autocommit_or_rollback(THD *thd, int error)
{
DBUG_ENTER("ha_autocommit_or_rollback");
-#ifdef USING_TRANSACTIONS
+
if (thd->transaction.stmt.ha_list)
{
if (!error)
@@ -1308,7 +1308,7 @@ int ha_autocommit_or_rollback(THD *thd,
thd->variables.tx_isolation=thd->session_tx_isolation;
}
-#endif
+
DBUG_RETURN(error);
}
@@ -1714,7 +1714,7 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv
&thd->transaction.all);
Ha_trx_info *ha_info= trans->ha_list;
DBUG_ENTER("ha_savepoint");
-#ifdef USING_TRANSACTIONS
+
for (; ha_info; ha_info= ha_info->next())
{
int err;
@@ -1738,7 +1738,7 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv
engines are prepended to the beginning of the list.
*/
sv->ha_list= trans->ha_list;
-#endif /* USING_TRANSACTIONS */
+
DBUG_RETURN(error);
}
@@ -1929,7 +1929,7 @@ int ha_delete_table(THD *thd, handlerton
XXX: should we convert *all* errors to warnings here?
What if the error is fatal?
*/
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error,
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, error,
ha_delete_table_error_handler.buff);
}
delete file;
@@ -4377,6 +4377,7 @@ void DsMrr_impl::dsmrr_close()
DBUG_ENTER("DsMrr_impl::dsmrr_close");
if (h2)
{
+ h2->ha_index_or_rnd_end();
h2->ha_external_lock(current_thd, F_UNLCK);
h2->close();
delete h2;
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2008-06-30 20:21:41 +0000
+++ b/sql/handler.h 2008-07-11 16:22:44 +0000
@@ -30,8 +30,6 @@
#define NO_HASH /* Not yet implemented */
#endif
-#define USING_TRANSACTIONS
-
// the following is for checking tables
#define HA_ADMIN_ALREADY_DONE 1
@@ -1408,7 +1406,7 @@ public:
virtual ~handler(void)
{
DBUG_ASSERT(locked == FALSE);
- /* TODO: DBUG_ASSERT(inited == NONE); */
+ DBUG_ASSERT(inited == NONE);
}
virtual handler *clone(MEM_ROOT *mem_root);
/** This is called after create to allow us to set up cached variables */
=== modified file 'sql/item.cc'
--- a/sql/item.cc 2008-07-31 11:37:07 +0000
+++ b/sql/item.cc 2008-08-07 03:05:33 +0000
@@ -4512,7 +4512,6 @@ String *Item::check_well_formed_result(S
{
THD *thd= current_thd;
char hexbuf[7];
- enum MYSQL_ERROR::enum_warning_level level;
uint diff= str->length() - wlen;
set_if_smaller(diff, 3);
octet2hex(hexbuf, str->ptr() + wlen, diff);
@@ -4525,17 +4524,16 @@ String *Item::check_well_formed_result(S
if ((thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
{
- level= MYSQL_ERROR::WARN_LEVEL_ERROR;
null_value= 1;
str= 0;
}
else
{
- level= MYSQL_ERROR::WARN_LEVEL_WARN;
str->length(wlen);
}
- push_warning_printf(thd, level, ER_INVALID_CHARACTER_STRING,
- ER(ER_INVALID_CHARACTER_STRING), cs->csname, hexbuf);
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_INVALID_CHARACTER_STRING, ER(ER_INVALID_CHARACTER_STRING),
+ cs->csname, hexbuf);
}
return str;
}
=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc 2008-07-31 11:37:07 +0000
+++ b/sql/item_func.cc 2008-08-07 03:05:33 +0000
@@ -619,7 +619,7 @@ void Item_func::signal_divide_by_null()
{
THD *thd= current_thd;
if (thd->variables.sql_mode & MODE_ERROR_FOR_DIVISION_BY_ZERO)
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DIVISION_BY_ZERO,
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_DIVISION_BY_ZERO,
ER(ER_DIVISION_BY_ZERO));
null_value= 1;
}
@@ -1074,7 +1074,7 @@ my_decimal *Item_decimal_typecast::val_d
return dec;
err:
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DATA_OUT_OF_RANGE,
ER(ER_WARN_DATA_OUT_OF_RANGE),
name, 1);
@@ -3740,7 +3740,7 @@ longlong Item_func_benchmark::val_int()
{
char buff[22];
llstr(((longlong) loop_count), buff);
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE),
"count", buff, "benchmark");
}
=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc 2008-07-23 09:43:50 +0000
+++ b/sql/item_strfunc.cc 2008-07-25 17:21:55 +0000
@@ -249,7 +249,7 @@ String *Item_func_sha2::val_str(String *
default:
if (!args[1]->const_item())
push_warning_printf(current_thd,
- MYSQL_ERROR::WARN_LEVEL_ERROR,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WRONG_PARAMETERS_TO_NATIVE_FCT,
ER(ER_WRONG_PARAMETERS_TO_NATIVE_FCT), "sha2");
null_value= TRUE;
@@ -276,7 +276,7 @@ String *Item_func_sha2::val_str(String *
#else
push_warning_printf(current_thd,
- MYSQL_ERROR::WARN_LEVEL_ERROR,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
ER_FEATURE_DISABLED,
ER(ER_FEATURE_DISABLED),
"sha2", "--with-ssl");
@@ -314,7 +314,7 @@ void Item_func_sha2::fix_length_and_dec(
#endif
default:
push_warning_printf(current_thd,
- MYSQL_ERROR::WARN_LEVEL_ERROR,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WRONG_PARAMETERS_TO_NATIVE_FCT,
ER(ER_WRONG_PARAMETERS_TO_NATIVE_FCT), "sha2");
}
@@ -333,7 +333,7 @@ void Item_func_sha2::fix_length_and_dec(
DERIVATION_COERCIBLE);
#else
push_warning_printf(current_thd,
- MYSQL_ERROR::WARN_LEVEL_ERROR,
+ MYSQL_ERROR::WARN_LEVEL_WARN,
ER_FEATURE_DISABLED,
ER(ER_FEATURE_DISABLED),
"sha2", "--with-ssl");
@@ -671,11 +671,11 @@ String *Item_func_des_encrypt::val_str(S
return &tmp_value;
error:
- push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
code, ER(code),
"des_encrypt");
#else
- push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
ER_FEATURE_DISABLED, ER(ER_FEATURE_DISABLED),
"des_encrypt", "--with-ssl");
#endif /* HAVE_OPENSSL */
@@ -748,12 +748,12 @@ String *Item_func_des_decrypt::val_str(S
return &tmp_value;
error:
- push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
code, ER(code),
"des_decrypt");
wrong_key:
#else
- push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
ER_FEATURE_DISABLED, ER(ER_FEATURE_DISABLED),
"des_decrypt", "--with-ssl");
#endif /* HAVE_OPENSSL */
@@ -3488,7 +3488,7 @@ String *Item_func_compress::val_str(Stri
(const Bytef*)res->ptr(), res->length())) != Z_OK)
{
code= err==Z_MEM_ERROR ? ER_ZLIB_Z_MEM_ERROR : ER_ZLIB_Z_BUF_ERROR;
- push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,code,ER(code));
+ push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,code,ER(code));
null_value= 1;
return 0;
}
@@ -3526,7 +3526,7 @@ String *Item_func_uncompress::val_str(St
/* If length is less than 4 bytes, data is corrupt */
if (res->length() <= 4)
{
- push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ZLIB_Z_DATA_ERROR,
ER(ER_ZLIB_Z_DATA_ERROR));
goto err;
@@ -3536,7 +3536,7 @@ String *Item_func_uncompress::val_str(St
new_size= uint4korr(res->ptr()) & 0x3FFFFFFF;
if (new_size > current_thd->variables.max_allowed_packet)
{
- push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TOO_BIG_FOR_UNCOMPRESS,
ER(ER_TOO_BIG_FOR_UNCOMPRESS),
current_thd->variables.max_allowed_packet);
@@ -3554,7 +3554,7 @@ String *Item_func_uncompress::val_str(St
code= ((err == Z_BUF_ERROR) ? ER_ZLIB_Z_BUF_ERROR :
((err == Z_MEM_ERROR) ? ER_ZLIB_Z_MEM_ERROR : ER_ZLIB_Z_DATA_ERROR));
- push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,code,ER(code));
+ push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,code,ER(code));
err:
null_value= 1;
=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc 2008-07-10 23:29:27 +0000
+++ b/sql/item_subselect.cc 2008-07-24 10:00:56 +0000
@@ -2202,7 +2202,8 @@ void subselect_uniquesubquery_engine::fi
DBUG_ASSERT(0);
}
-int init_read_record_seq(JOIN_TAB *tab);
+int read_first_record_seq(JOIN_TAB *tab);
+int rr_sequential(READ_RECORD *info);
int join_read_always_key_or_null(JOIN_TAB *tab);
int join_read_next_same_or_null(READ_RECORD *info);
@@ -2288,7 +2289,8 @@ int subselect_single_select_engine::exec
/* Change the access method to full table scan */
tab->save_read_first_record= tab->read_first_record;
tab->save_read_record= tab->read_record.read_record;
- tab->read_first_record= init_read_record_seq;
+ tab->read_record.read_record= rr_sequential;
+ tab->read_first_record= read_first_record_seq;
tab->read_record.record= tab->table->record[0];
tab->read_record.thd= join->thd;
tab->read_record.ref_length= tab->table->file->ref_length;
=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc 2008-03-05 10:32:49 +0000
+++ b/sql/item_timefunc.cc 2008-07-14 12:49:19 +0000
@@ -602,7 +602,7 @@ err:
{
char buff[128];
strmake(buff, val_begin, min(length, sizeof(buff)-1));
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE),
date_time_type, buff, "str_to_date");
}
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2008-07-22 10:51:13 +0000
+++ b/sql/log.cc 2008-07-25 17:21:55 +0000
@@ -2875,7 +2875,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
}
else
{
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; "
"consider examining correspondence "
@@ -2906,7 +2906,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
}
else
{
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; "
"consider examining correspondence "
@@ -3135,7 +3135,7 @@ int MYSQL_BIN_LOG::purge_logs(const char
*/
if (thd)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR,
"a problem with getting info on being purged %s; "
"consider examining correspondence "
@@ -3181,7 +3181,7 @@ int MYSQL_BIN_LOG::purge_logs(const char
{
if (thd)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; "
"consider examining correspondence "
@@ -3296,7 +3296,7 @@ int MYSQL_BIN_LOG::purge_logs_before_dat
*/
if (thd)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR,
"a problem with getting info on being purged %s; "
"consider examining correspondence "
@@ -3336,7 +3336,7 @@ int MYSQL_BIN_LOG::purge_logs_before_dat
{
if (thd)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_BINLOG_PURGE_FATAL_ERR,
"a problem with deleting %s; "
"consider examining correspondence "
@@ -3938,7 +3938,6 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
}
#endif /* HAVE_REPLICATION */
-#if defined(USING_TRANSACTIONS)
/*
Should we write to the binlog cache or to the binlog on disk?
Write to the binlog cache if:
@@ -3973,7 +3972,7 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
LOCK_log.
*/
}
-#endif /* USING_TRANSACTIONS */
+
DBUG_PRINT("info",("event type: %d",event_info->get_type_code()));
/*
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc 2008-07-10 23:29:27 +0000
+++ b/sql/log_event.cc 2008-07-24 10:00:56 +0000
@@ -3094,7 +3094,6 @@ int Format_description_log_event::do_app
{
DBUG_ENTER("Format_description_log_event::do_apply_event");
-#ifdef USING_TRANSACTIONS
/*
As a transaction NEVER spans on 2 or more binlogs:
if we have an active transaction at this point, the master died
@@ -3116,7 +3115,7 @@ int Format_description_log_event::do_app
"its binary log, thus rolled back too.");
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, 1);
}
-#endif
+
/*
If this event comes from ourselves, there is no cleaning task to
perform, we don't call Start_log_event_v3::do_apply_event()
=== modified file 'sql/mdl.cc'
--- a/sql/mdl.cc 2008-06-20 13:11:20 +0000
+++ b/sql/mdl.cc 2008-07-07 15:51:20 +0000
@@ -245,8 +245,9 @@ void mdl_context_merge(MDL_CONTEXT *dst,
@param lock_data Pointer to an MDL_LOCK_DATA object to initialize
@param key_buff Pointer to the buffer for key for the lock request
- (should be at least strlen(db) + strlen(name)
- + 2 bytes, or, if the lengths are not known, MAX_DBNAME_LENGTH)
+ (should be at least 4+ strlen(db) + 1 + strlen(name)
+ + 1 bytes, or, if the lengths are not known,
+ MAX_MDLKEY_LENGTH)
@param type Id of type of object to be locked
@param db Name of database to which the object belongs
@param name Name of of the object
=== modified file 'sql/my_decimal.cc'
--- a/sql/my_decimal.cc 2008-05-13 23:42:43 +0000
+++ b/sql/my_decimal.cc 2008-07-14 12:49:19 +0000
@@ -47,11 +47,11 @@ int decimal_operation_results(int result
"DECIMAL", "");
break;
case E_DEC_DIV_ZERO:
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_DIVISION_BY_ZERO, ER(ER_DIVISION_BY_ZERO));
break;
case E_DEC_BAD_NUM:
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
"decimal", "", "", (long)-1);
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2008-07-25 15:10:14 +0000
+++ b/sql/mysql_priv.h 2008-08-07 03:05:33 +0000
@@ -2112,8 +2112,8 @@ extern struct my_option my_long_options[
extern const LEX_STRING view_type;
extern scheduler_functions thread_scheduler;
extern TYPELIB thread_handling_typelib;
-extern uint8 uc_update_queries[SQLCOM_END+1];
extern uint sql_command_flags[];
+extern uint server_command_flags[];
extern TYPELIB log_output_typelib;
/* optional things, have_* variables */
=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc 2008-07-22 10:57:48 +0000
+++ b/sql/set_var.cc 2008-07-25 17:21:55 +0000
@@ -1279,12 +1279,10 @@ static void fix_thd_mem_root(THD *thd, e
static void fix_trans_mem_root(THD *thd, enum_var_type type)
{
-#ifdef USING_TRANSACTIONS
if (type != OPT_GLOBAL)
reset_root_defaults(&thd->transaction.mem_root,
thd->variables.trans_alloc_block_size,
thd->variables.trans_prealloc_size);
-#endif
}
=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc 2008-07-15 16:29:51 +0000
+++ b/sql/sp_head.cc 2008-07-25 17:21:55 +0000
@@ -1933,7 +1933,15 @@ sp_head::execute_procedure(THD *thd, Lis
we'll leave it here.
*/
if (!thd->in_sub_stmt)
+ {
+ thd->lex->unit.cleanup();
+
+ thd_proc_info(thd, "closing tables");
close_thread_tables(thd);
+ thd_proc_info(thd, 0);
+
+ thd->rollback_item_tree_changes();
+ }
DBUG_PRINT("info",(" %.*s: eval args done",
(int) m_name.length, m_name.str));
=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc 2008-08-06 14:39:03 +0000
+++ b/sql/sql_acl.cc 2008-08-07 03:05:33 +0000
@@ -4565,13 +4565,13 @@ static const char *command_array[]=
"ALTER", "SHOW DATABASES", "SUPER", "CREATE TEMPORARY TABLES",
"LOCK TABLES", "EXECUTE", "REPLICATION SLAVE", "REPLICATION CLIENT",
"CREATE VIEW", "SHOW VIEW", "CREATE ROUTINE", "ALTER ROUTINE",
- "CREATE USER", "EVENT", "TRIGGER"
+ "CREATE USER", "EVENT", "TRIGGER", "CREATE TABLESPACE"
};
static uint command_lengths[]=
{
6, 6, 6, 6, 6, 4, 6, 8, 7, 4, 5, 10, 5, 5, 14, 5, 23, 11, 7, 17, 18, 11, 9,
- 14, 13, 11, 5, 7
+ 14, 13, 11, 5, 7, 17
};
=== modified file 'sql/sql_acl.h'
--- a/sql/sql_acl.h 2008-03-28 13:33:31 +0000
+++ b/sql/sql_acl.h 2008-07-24 07:44:21 +0000
@@ -43,6 +43,7 @@
#define CREATE_USER_ACL (1L << 25)
#define EVENT_ACL (1L << 26)
#define TRIGGER_ACL (1L << 27)
+#define CREATE_TABLESPACE_ACL (1L << 28)
/*
don't forget to update
1. static struct show_privileges_st sys_privileges[]
@@ -79,7 +80,8 @@
REFERENCES_ACL | INDEX_ACL | ALTER_ACL | SHOW_DB_ACL | SUPER_ACL | \
CREATE_TMP_ACL | LOCK_TABLES_ACL | REPL_SLAVE_ACL | REPL_CLIENT_ACL | \
EXECUTE_ACL | CREATE_VIEW_ACL | SHOW_VIEW_ACL | CREATE_PROC_ACL | \
- ALTER_PROC_ACL | CREATE_USER_ACL | EVENT_ACL | TRIGGER_ACL)
+ ALTER_PROC_ACL | CREATE_USER_ACL | EVENT_ACL | TRIGGER_ACL | \
+ CREATE_TABLESPACE_ACL)
#define DEFAULT_CREATE_PROC_ACLS \
(ALTER_PROC_ACL | EXECUTE_ACL)
=== modified file 'sql/sql_cache.cc'
--- a/sql/sql_cache.cc 2008-07-25 15:10:14 +0000
+++ b/sql/sql_cache.cc 2008-08-07 03:05:33 +0000
@@ -1177,8 +1177,8 @@ end:
to the user.
RESULTS
- 1 Query was not cached.
- 0 The query was cached and user was sent the result.
+ 1 The query was cached and user was sent the result.
+ 0 Query was not cached.
-1 The query was cached but we didn't have rights to use it.
No error is sent to the client yet.
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2008-07-24 08:26:24 +0000
+++ b/sql/sql_class.cc 2008-07-25 17:21:55 +0000
@@ -793,11 +793,9 @@ void THD::init_for_queries()
reset_root_defaults(mem_root, variables.query_alloc_block_size,
variables.query_prealloc_size);
-#ifdef USING_TRANSACTIONS
reset_root_defaults(&transaction.mem_root,
variables.trans_alloc_block_size,
variables.trans_prealloc_size);
-#endif
transaction.xid_state.xid.null();
transaction.xid_state.in_thd=1;
}
@@ -939,9 +937,7 @@ THD::~THD()
main_security_ctx.destroy();
safeFree(db);
free_root(&warn_root,MYF(0));
-#ifdef USING_TRANSACTIONS
free_root(&transaction.mem_root,MYF(0));
-#endif
mysys_var=0; // Safety (shouldn't be needed)
pthread_mutex_destroy(&LOCK_delete);
#ifndef DBUG_OFF
=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h 2008-07-18 13:30:53 +0000
+++ b/sql/sql_class.h 2008-07-26 16:38:20 +0000
@@ -1549,19 +1549,13 @@ public:
{
changed_tables= 0;
savepoints= 0;
-#ifdef USING_TRANSACTIONS
free_root(&mem_root,MYF(MY_KEEP_PREALLOC));
-#endif
}
st_transactions()
{
-#ifdef USING_TRANSACTIONS
bzero((char*)this, sizeof(*this));
xid_state.xid.null();
init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
-#else
- xid_state.xa_state= XA_NOTR;
-#endif
}
} transaction;
Field *dup_field;
@@ -2080,11 +2074,7 @@ public:
}
inline bool active_transaction()
{
-#ifdef USING_TRANSACTIONS
return server_status & SERVER_STATUS_IN_TRANS;
-#else
- return 0;
-#endif
}
inline bool fill_derived_tables()
{
@@ -3041,11 +3031,11 @@ public:
/* Bits in sql_command_flags */
-#define CF_CHANGES_DATA 1
-#define CF_HAS_ROW_COUNT 2
-#define CF_STATUS_COMMAND 4
-#define CF_SHOW_TABLE_COMMAND 8
-#define CF_WRITE_LOGS_COMMAND 16
+#define CF_CHANGES_DATA (1U << 0)
+#define CF_HAS_ROW_COUNT (1U << 1)
+#define CF_STATUS_COMMAND (1U << 2)
+#define CF_SHOW_TABLE_COMMAND (1U << 3)
+#define CF_WRITE_LOGS_COMMAND (1U << 4)
/**
Must be set for SQL statements that may contain
Item expressions and/or use joins and tables.
@@ -3059,7 +3049,54 @@ public:
reprepare. Consequently, complex item expressions and
joins are currently prohibited in these statements.
*/
-#define CF_REEXECUTION_FRAGILE 32
+#define CF_REEXECUTION_FRAGILE (1U << 5)
+/**
+ Implicitly commit before the SQL statement is executed.
+
+ Statements marked with this flag will cause any active
+ transaction to end (commit) before proceeding with the
+ command execution.
+
+ This flag should be set for statements that probably can't
+ be rolled back or that do not expect any previously metadata
+ locked tables.
+*/
+#define CF_IMPLICT_COMMIT_BEGIN (1U << 6)
+/**
+ Implicitly commit after the SQL statement.
+
+ Statements marked with this flag are automatically committed
+ at the end of the statement.
+
+ This flag should be set for statements that will implicitly
+ open and take metadata locks on system tables that should not
+ be carried for the whole duration of a active transaction.
+*/
+#define CF_IMPLICIT_COMMIT_END (1U << 7)
+/**
+ CF_IMPLICT_COMMIT_BEGIN and CF_IMPLICIT_COMMIT_END are used
+ to ensure that the active transaction is implicitly committed
+ before and after every DDL statement and any statement that
+ modifies our currently non-transactional system tables.
+*/
+#define CF_AUTO_COMMIT_TRANS (CF_IMPLICT_COMMIT_BEGIN | CF_IMPLICIT_COMMIT_END)
+
+/* Bits in server_command_flags */
+
+/**
+ Skip the increase of the global query id counter. Commonly set for
+ commands that are stateless (won't cause any change on the server
+ internal states).
+*/
+#define CF_SKIP_QUERY_ID (1U << 0)
+
+/**
+ Skip the increase of the number of statements that clients have
+ sent to the server. Commonly used for commands that will cause
+ a statement to be executed but the statement might have not been
+ sent by the user (ie: stored procedure).
+*/
+#define CF_SKIP_QUESTIONS (1U << 1)
/* Functions in sql_class.cc */
=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc 2008-07-18 13:30:53 +0000
+++ b/sql/sql_delete.cc 2008-07-26 16:38:20 +0000
@@ -1105,12 +1105,6 @@ trunc_by_del:
error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
HA_POS_ERROR, LL(0), TRUE);
ha_enable_transaction(thd, TRUE);
- /*
- Safety, in case the engine ignored ha_enable_transaction(FALSE)
- above. Also clears thd->transaction.*.
- */
- error= ha_autocommit_or_rollback(thd, error);
- ha_commit(thd);
thd->options= save_options;
thd->current_stmt_binlog_row_based= save_binlog_row_based;
DBUG_RETURN(error);
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2008-08-06 14:39:03 +0000
+++ b/sql/sql_parse.cc 2008-08-07 03:05:33 +0000
@@ -181,6 +181,50 @@ static bool some_non_temp_table_to_be_up
}
+/*
+ Implicitly commit a active transaction if statement requires so.
+
+ @param thd Thread handle.
+ @param mask Bitmask used for the SQL command match.
+
+*/
+static bool opt_implicit_commit(THD *thd, uint mask)
+{
+ LEX *lex= thd->lex;
+ bool res= FALSE, skip= FALSE;
+ DBUG_ENTER("opt_implicit_commit");
+
+ if (!(sql_command_flags[lex->sql_command] & mask))
+ DBUG_RETURN(FALSE);
+
+ switch (lex->sql_command) {
+ case SQLCOM_DROP_TABLE:
+ skip= lex->drop_temporary;
+ break;
+ case SQLCOM_ALTER_TABLE:
+ case SQLCOM_CREATE_TABLE:
+ /* If CREATE TABLE of non-temporary table, do implicit commit */
+ skip= (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE);
+ break;
+ case SQLCOM_SET_OPTION:
+ skip= lex->autocommit ? FALSE : TRUE;
+ break;
+ default:
+ break;
+ }
+
+ if (!skip)
+ {
+ /* Commit or rollback the statement transaction. */
+ ha_autocommit_or_rollback(thd, thd->is_error());
+ /* Commit the normal transaction if one is active. */
+ res= end_active_trans(thd);
+ }
+
+ DBUG_RETURN(res);
+}
+
+
/**
Mark all commands that somehow changes a table.
@@ -195,27 +239,45 @@ static bool some_non_temp_table_to_be_up
*/
uint sql_command_flags[SQLCOM_END+1];
+uint server_command_flags[COM_END+1];
void init_update_queries(void)
{
- bzero((uchar*) &sql_command_flags, sizeof(sql_command_flags));
+ /* Initialize the server command flags array. */
+ memset(server_command_flags, 0, sizeof(server_command_flags));
- sql_command_flags[SQLCOM_CREATE_TABLE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE;
- sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_ALTER_TABLE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND;
- sql_command_flags[SQLCOM_TRUNCATE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND;
- sql_command_flags[SQLCOM_DROP_TABLE]= CF_CHANGES_DATA;
+ server_command_flags[COM_STATISTICS]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS;
+ server_command_flags[COM_PING]= CF_SKIP_QUERY_ID | CF_SKIP_QUESTIONS;
+ server_command_flags[COM_STMT_PREPARE]= CF_SKIP_QUESTIONS;
+ server_command_flags[COM_STMT_CLOSE]= CF_SKIP_QUESTIONS;
+ server_command_flags[COM_STMT_RESET]= CF_SKIP_QUESTIONS;
+
+ /* Initialize the sql command flags array. */
+ memset(sql_command_flags, 0, sizeof(sql_command_flags));
+
+ sql_command_flags[SQLCOM_CREATE_TABLE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ALTER_TABLE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND |
+ CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_TRUNCATE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND |
+ CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_DROP_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_LOAD]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE;
- sql_command_flags[SQLCOM_CREATE_DB]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_DROP_DB]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_RENAME_TABLE]= CF_CHANGES_DATA;
+ sql_command_flags[SQLCOM_CREATE_DB]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_DROP_DB]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ALTER_DB_UPGRADE]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_RENAME_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_RESTORE]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_DROP_INDEX]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_CREATE_VIEW]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE;
- sql_command_flags[SQLCOM_DROP_VIEW]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_CREATE_EVENT]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_ALTER_EVENT]= CF_CHANGES_DATA;
- sql_command_flags[SQLCOM_DROP_EVENT]= CF_CHANGES_DATA;
+ sql_command_flags[SQLCOM_DROP_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_CREATE_VIEW]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_DROP_VIEW]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_CREATE_TRIGGER]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_DROP_TRIGGER]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_CREATE_EVENT]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ALTER_EVENT]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_DROP_EVENT]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_UPDATE]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
CF_REEXECUTION_FRAGILE;
@@ -234,7 +296,8 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_REPLACE_SELECT]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SELECT]= CF_REEXECUTION_FRAGILE;
- sql_command_flags[SQLCOM_SET_OPTION]= CF_REEXECUTION_FRAGILE;
+ sql_command_flags[SQLCOM_SET_OPTION]= CF_REEXECUTION_FRAGILE |
+ CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DO]= CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SHOW_STATUS_PROC]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE;
@@ -298,9 +361,32 @@ void init_update_queries(void)
The following admin table operations are allowed
on log tables.
*/
- sql_command_flags[SQLCOM_REPAIR]= CF_WRITE_LOGS_COMMAND;
- sql_command_flags[SQLCOM_OPTIMIZE]= CF_WRITE_LOGS_COMMAND;
- sql_command_flags[SQLCOM_ANALYZE]= CF_WRITE_LOGS_COMMAND;
+ sql_command_flags[SQLCOM_REPAIR]= CF_WRITE_LOGS_COMMAND |
+ CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_OPTIMIZE]= CF_WRITE_LOGS_COMMAND |
+ CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ANALYZE]= CF_WRITE_LOGS_COMMAND |
+ CF_AUTO_COMMIT_TRANS;
+
+ sql_command_flags[SQLCOM_CREATE_USER]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_DROP_USER]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_RENAME_USER]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_REVOKE_ALL]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_REVOKE]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_GRANT]= CF_AUTO_COMMIT_TRANS;
+
+ sql_command_flags[SQLCOM_CREATE_PROCEDURE]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_CREATE_SPFUNCTION]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ALTER_PROCEDURE]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ALTER_FUNCTION]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_ASSIGN_TO_KEYCACHE]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_PRELOAD_KEYS]= CF_AUTO_COMMIT_TRANS;
+
+ sql_command_flags[SQLCOM_FLUSH]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_CHECK]= CF_AUTO_COMMIT_TRANS;
+
+ sql_command_flags[SQLCOM_BACKUP]= CF_AUTO_COMMIT_TRANS;
+ sql_command_flags[SQLCOM_RESTORE]= CF_AUTO_COMMIT_TRANS;
}
@@ -459,9 +545,7 @@ pthread_handler_t handle_bootstrap(void
break;
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
-#ifdef USING_TRANSACTIONS
free_root(&thd->transaction.mem_root,MYF(MY_KEEP_PREALLOC));
-#endif
}
end:
@@ -839,28 +923,14 @@ bool dispatch_command(enum enum_server_c
thd->set_time();
pthread_mutex_lock(&LOCK_thread_count);
thd->query_id= global_query_id;
-
- switch( command ) {
- /* Ignore these statements. */
- case COM_STATISTICS:
- case COM_PING:
- break;
- /* Only increase id on these statements but don't count them. */
- case COM_STMT_PREPARE:
- case COM_STMT_CLOSE:
- case COM_STMT_RESET:
- next_query_id();
- break;
- /* Increase id and count all other statements. */
- default:
- statistic_increment(thd->status_var.questions, &LOCK_status);
+ if (!(server_command_flags[command] & CF_SKIP_QUERY_ID))
next_query_id();
- }
-
thread_running++;
- /* TODO: set thd->lex->sql_command to SQLCOM_END here */
pthread_mutex_unlock(&LOCK_thread_count);
+ if (!(server_command_flags[command] & CF_SKIP_QUESTIONS))
+ statistic_increment(thd->status_var.questions, &LOCK_status);
+
/**
Clear the set of flags that are expected to be cleared at the
beginning of each command.
@@ -1256,11 +1326,16 @@ bool dispatch_command(enum enum_server_c
bool not_used;
status_var_increment(thd->status_var.com_stat[SQLCOM_FLUSH]);
ulong options= (ulong) (uchar) packet[0];
+ if (end_active_trans(thd))
+ break;
if (check_global_access(thd,RELOAD_ACL))
break;
general_log_print(thd, command, NullS);
- if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, ¬_used))
- my_ok(thd);
+ if (reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, ¬_used))
+ break;
+ if (end_active_trans(thd))
+ break;
+ my_ok(thd);
break;
}
#ifndef EMBEDDED_LIBRARY
@@ -1953,10 +2028,20 @@ mysql_execute_command(THD *thd)
#ifdef HAVE_REPLICATION
} /* endif unlikely slave */
#endif
+
status_var_increment(thd->status_var.com_stat[lex->sql_command]);
DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table == FALSE);
-
+
+ /*
+ End a active transaction so that this command will have it's
+ own transaction and will also sync the binary log. If a DDL is
+ not run in it's own transaction it may simply never appear on
+ the slave in case the outside transaction rolls back.
+ */
+ if (opt_implicit_commit(thd, CF_IMPLICT_COMMIT_BEGIN))
+ goto error;
+
switch (lex->sql_command) {
case SQLCOM_SHOW_EVENTS:
@@ -2259,15 +2344,6 @@ mysql_execute_command(THD *thd)
}
case SQLCOM_CREATE_TABLE:
{
- /* If CREATE TABLE of non-temporary table, do implicit commit */
- if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
- {
- if (end_active_trans(thd))
- {
- res= -1;
- break;
- }
- }
DBUG_ASSERT(first_table == all_tables && first_table != 0);
bool link_to_local;
// Skip first table, which is the table we are creating
@@ -2487,8 +2563,6 @@ end_with_restore_list:
DBUG_ASSERT(first_table == all_tables && first_table != 0);
if (check_one_table_access(thd, INDEX_ACL, all_tables))
goto error; /* purecov: inspected */
- if (end_active_trans(thd))
- goto error;
/*
Currently CREATE INDEX or DROP INDEX cause a full table rebuild
and thus classify as slow administrative statements just like
@@ -2612,9 +2686,6 @@ end_with_restore_list:
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
"INDEX DIRECTORY option ignored");
create_info.data_file_name= create_info.index_file_name= NULL;
- /* ALTER TABLE ends previous transaction */
- if (end_active_trans(thd))
- goto error;
if (!thd->locked_tables_mode &&
!(need_start_waiting= !wait_if_global_read_lock(thd, 0, 1)))
@@ -2661,13 +2732,13 @@ end_with_restore_list:
goto error;
}
- DDL_blocker->check_DDL_blocker(thd);
- if (end_active_trans(thd) || mysql_rename_tables(thd, first_table, 0))
- {
- DDL_blocker->end_DDL();
- goto error;
- }
+ DDL_blocker->check_DDL_blocker(thd);
+ if (mysql_rename_tables(thd, first_table, 0))
+ {
DDL_blocker->end_DDL();
+ goto error;
+ }
+ DDL_blocker->end_DDL();
break;
}
#ifndef EMBEDDED_LIBRARY
@@ -3040,11 +3111,6 @@ end_with_restore_list:
break;
}
case SQLCOM_TRUNCATE:
- if (end_active_trans(thd))
- {
- res= -1;
- break;
- }
DBUG_ASSERT(first_table == all_tables && first_table != 0);
if (check_one_table_access(thd, DROP_ACL, all_tables))
goto error;
@@ -3145,8 +3211,6 @@ end_with_restore_list:
{
if (check_table_access(thd, DROP_ACL, all_tables, FALSE, FALSE, UINT_MAX))
goto error; /* purecov: inspected */
- if (end_active_trans(thd))
- goto error;
}
else
{
@@ -3243,9 +3307,6 @@ end_with_restore_list:
{
List<set_var_base> *lex_var_list= &lex->var_list;
- if (lex->autocommit && end_active_trans(thd))
- goto error;
-
if ((check_table_access(thd, SELECT_ACL, all_tables, FALSE, FALSE, UINT_MAX) ||
open_and_lock_tables(thd, all_tables)))
goto error;
@@ -3387,11 +3448,6 @@ end_with_restore_list:
prepared statement- safe.
*/
HA_CREATE_INFO create_info(lex->create_info);
- if (end_active_trans(thd))
- {
- res= -1;
- break;
- }
char *alias;
if (!(alias=thd->strmake(lex->name.str, lex->name.length)) ||
check_db_name(&lex->name))
@@ -3426,11 +3482,6 @@ end_with_restore_list:
}
case SQLCOM_DROP_DB:
{
- if (end_active_trans(thd))
- {
- res= -1;
- break;
- }
if (check_db_name(&lex->name))
{
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name.str);
@@ -3469,11 +3520,6 @@ end_with_restore_list:
case SQLCOM_ALTER_DB_UPGRADE:
{
LEX_STRING *db= & lex->name;
- if (end_active_trans(thd))
- {
- res= 1;
- break;
- }
#ifdef HAVE_REPLICATION
if (thd->slave_thread &&
(!rpl_filter->db_ok(db->str) ||
@@ -3640,8 +3686,6 @@ end_with_restore_list:
if (check_access(thd, INSERT_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
- if (end_active_trans(thd))
- goto error;
/* Conditionally writes to binlog */
if (!(res= mysql_create_user(thd, lex->users_list)))
my_ok(thd);
@@ -3652,8 +3696,6 @@ end_with_restore_list:
if (check_access(thd, DELETE_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
- if (end_active_trans(thd))
- goto error;
/* Conditionally writes to binlog */
if (!(res= mysql_drop_user(thd, lex->users_list)))
my_ok(thd);
@@ -3664,8 +3706,6 @@ end_with_restore_list:
if (check_access(thd, UPDATE_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
- if (end_active_trans(thd))
- goto error;
/* Conditionally writes to binlog */
if (!(res= mysql_rename_user(thd, lex->users_list)))
my_ok(thd);
@@ -3673,8 +3713,6 @@ end_with_restore_list:
}
case SQLCOM_REVOKE_ALL:
{
- if (end_active_trans(thd))
- goto error;
if (check_access(thd, UPDATE_ACL, "mysql", 0, 1, 1, 0) &&
check_global_access(thd,CREATE_USER_ACL))
break;
@@ -3686,9 +3724,6 @@ end_with_restore_list:
case SQLCOM_REVOKE:
case SQLCOM_GRANT:
{
- if (end_active_trans(thd))
- goto error;
-
if (check_access(thd, lex->grant | lex->grant_tot_col | GRANT_ACL,
first_table ? first_table->db : select_lex->db,
first_table ? &first_table->grant.privilege : 0,
@@ -4039,9 +4074,6 @@ end_with_restore_list:
is_schema_db(lex->sphead->m_db.str)))
goto create_sp_error;
- if (end_active_trans(thd))
- goto create_sp_error;
-
name= lex->sphead->name(&namelen);
#ifdef HAVE_DLOPEN
if (lex->sphead->m_type == TYPE_ENUM_FUNCTION)
@@ -4236,8 +4268,6 @@ create_sp_error:
lex->sql_command == SQLCOM_ALTER_PROCEDURE, 0))
goto error;
- if (end_active_trans(thd))
- goto error;
memcpy(&lex->sp_chistics, &chistics, sizeof(lex->sp_chistics));
if ((sp->m_type == TYPE_ENUM_FUNCTION) &&
!trust_function_creators && mysql_bin_log.is_open() &&
@@ -4455,16 +4485,12 @@ create_sp_error:
Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands
as specified through the thd->lex->create_view_mode flag.
*/
- if (end_active_trans(thd))
- goto error;
-
res= mysql_create_view(thd, first_table, thd->lex->create_view_mode);
break;
}
case SQLCOM_DROP_VIEW:
{
- if (check_table_access(thd, DROP_ACL, all_tables, FALSE, FALSE, UINT_MAX) ||
- end_active_trans(thd))
+ if (check_table_access(thd, DROP_ACL, all_tables, FALSE, FALSE, UINT_MAX))
goto error;
/* Conditionally writes to binlog. */
res= mysql_drop_view(thd, first_table, thd->lex->drop_mode);
@@ -4472,9 +4498,6 @@ create_sp_error:
}
case SQLCOM_CREATE_TRIGGER:
{
- if (end_active_trans(thd))
- goto error;
-
/* Conditionally writes to binlog. */
res= mysql_create_or_drop_trigger(thd, all_tables, 1);
@@ -4482,9 +4505,6 @@ create_sp_error:
}
case SQLCOM_DROP_TRIGGER:
{
- if (end_active_trans(thd))
- goto error;
-
/* Conditionally writes to binlog. */
res= mysql_create_or_drop_trigger(thd, all_tables, 0);
break;
@@ -4662,7 +4682,7 @@ create_sp_error:
res= mysql_xa_recover(thd);
break;
case SQLCOM_ALTER_TABLESPACE:
- if (check_access(thd, ALTER_ACL, thd->db, 0, 1, 0, thd->db ? is_schema_db(thd->db) : 0))
+ if (check_global_access(thd, CREATE_TABLESPACE_ACL))
break;
if (!(res= mysql_alter_tablespace(thd, lex->alter_tablespace_info)))
my_ok(thd);
@@ -4789,6 +4809,12 @@ finish:
*/
start_waiting_global_read_lock(thd);
}
+
+ /* If commit fails, we should be able to reset the OK status. */
+ thd->main_da.can_overwrite_status= TRUE;
+ opt_implicit_commit(thd, CF_IMPLICIT_COMMIT_END);
+ thd->main_da.can_overwrite_status= FALSE;
+
DBUG_RETURN(res || thd->is_error());
error:
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2008-07-31 11:37:07 +0000
+++ b/sql/sql_select.cc 2008-08-07 03:05:33 +0000
@@ -1582,13 +1582,13 @@ JOIN::optimize()
}
if (const_tables && !thd->locked_tables_mode &&
!(select_options & SELECT_NO_UNLOCK))
- mysql_unlock_some_tables(thd, table, const_tables);
+ mysql_unlock_some_tables(thd, all_tables, const_tables);
if (!conds && outer_join)
{
/* Handle the case where we have an OUTER JOIN without a WHERE */
conds=new Item_int((longlong) 1,1); // Always true
}
- select= make_select(*table, const_table_map,
+ select= make_select(*all_tables, const_table_map,
const_table_map, conds, 1, &error);
if (error)
{ /* purecov: inspected */
@@ -4216,7 +4216,7 @@ make_join_statistics(JOIN *join, TABLE_L
join->join_tab=stat;
join->map2table=stat_ref;
- join->table= join->all_tables=table_vector;
+ join->all_tables= table_vector;
join->const_tables=const_count;
join->found_const_table_map=found_const_table_map;
@@ -6944,7 +6944,7 @@ get_best_combination(JOIN *join)
{
TABLE *form;
*j= *join->best_positions[tablenr].table;
- form=join->table[tablenr]=j->table;
+ form=join->all_tables[tablenr]=j->table;
used_tables|= form->map;
form->reginfo.join_tab=j;
if (!*j->on_expr_ref)
@@ -7223,7 +7223,7 @@ make_simple_join(JOIN *join,TABLE *tmp_t
join_tab= join->join_tab_reexec;
join->join_tab=join_tab;
- join->table=tableptr; tableptr[0]=tmp_table;
+ join->all_tables=tableptr; tableptr[0]=tmp_table;
join->tables=1;
join->const_tables=0;
join->const_table_map=0;
@@ -8650,24 +8650,23 @@ void JOIN::cleanup(bool full)
{
DBUG_ENTER("JOIN::cleanup");
- if (table)
+ if (all_tables)
{
JOIN_TAB *tab,*end;
/*
Only a sorted table may be cached. This sorted table is always the
- first non const table in join->table
+ first non const table in join->all_tables
*/
if (tables > const_tables) // Test for not-const tables
{
- free_io_cache(table[const_tables]);
- filesort_free_buffers(table[const_tables],full);
+ free_io_cache(all_tables[const_tables]);
+ filesort_free_buffers(all_tables[const_tables],full);
}
if (full)
{
for (tab= join_tab, end= tab+tables; tab != end; tab++)
tab->cleanup();
- table= 0;
}
else
{
@@ -8994,7 +8993,7 @@ static void clear_tables(JOIN *join)
are not re-calculated.
*/
for (uint i=join->const_tables ; i < join->tables ; i++)
- mark_as_null_row(join->table[i]); // All fields are NULL
+ mark_as_null_row(join->all_tables[i]); // All fields are NULL
}
/*****************************************************************************
@@ -13399,26 +13398,7 @@ do_select(JOIN *join,List<Item> *fields,
if (error == NESTED_LOOP_NO_MORE_ROWS)
error= NESTED_LOOP_OK;
- if (error == NESTED_LOOP_OK)
- {
- /*
- Sic: this branch works even if rc != 0, e.g. when
- send_data above returns an error.
- */
- if (!table) // If sending data to client
- {
- /*
- The following will unlock all cursors if the command wasn't an
- update command
- */
- join->join_free(); // Unlock all cursors
- if (join->result->send_eof())
- rc= 1; // Don't send error
- }
- DBUG_PRINT("info",("%ld records output", (long) join->send_records));
- }
- else
- rc= -1;
+
if (table)
{
int tmp, new_errno= 0;
@@ -13435,6 +13415,29 @@ do_select(JOIN *join,List<Item> *fields,
if (new_errno)
table->file->print_error(new_errno,MYF(0));
}
+ else
+ {
+ /*
+ The following will unlock all cursors if the command wasn't an
+ update command
+ */
+ join->join_free(); // Unlock all cursors
+ }
+ if (error == NESTED_LOOP_OK)
+ {
+ /*
+ Sic: this branch works even if rc != 0, e.g. when
+ send_data above returns an error.
+ */
+ if (!table) // If sending data to client
+ {
+ if (join->result->send_eof())
+ rc= 1; // Don't send error
+ }
+ DBUG_PRINT("info",("%ld records output", (long) join->send_records));
+ }
+ else
+ rc= -1;
#ifndef DBUG_OFF
if (rc)
{
@@ -14457,10 +14460,8 @@ join_init_quick_read_record(JOIN_TAB *ta
}
-int rr_sequential(READ_RECORD *info);
-int init_read_record_seq(JOIN_TAB *tab)
+int read_first_record_seq(JOIN_TAB *tab)
{
- tab->read_record.read_record= rr_sequential;
if (tab->read_record.file->ha_rnd_init(1))
return 1;
return (*tab->read_record.read_record)(&tab->read_record);
=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h 2008-06-05 16:11:22 +0000
+++ b/sql/sql_select.h 2008-07-11 16:22:44 +0000
@@ -413,7 +413,7 @@ public:
JOIN_TAB *join_tab,**best_ref;
JOIN_TAB **map2table; ///< mapping between table indexes and JOIN_TABs
JOIN_TAB *join_tab_save; ///< saved join_tab for subquery reexecution
- TABLE **table,**all_tables;
+ TABLE **all_tables;
/**
The table which has an index that allows to produce the requried ordering.
A special value of 0x1 means that the ordering will be produced by
@@ -568,7 +568,7 @@ public:
select_result *result_arg)
{
join_tab= join_tab_save= 0;
- table= 0;
+ all_tables= 0;
tables= 0;
const_tables= 0;
join_list= 0;
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2008-06-30 09:59:59 +0000
+++ b/sql/sql_show.cc 2008-07-29 12:08:01 +0000
@@ -310,6 +310,7 @@ static struct show_privileges_st sys_pri
{"Shutdown","Server Admin", "To shut down the server"},
{"Super","Server Admin","To use KILL thread, SET GLOBAL, CHANGE MASTER, etc."},
{"Trigger","Tables", "To use triggers"},
+ {"Create tablespace", "Server Admin", "To create/alter/drop tablespaces"},
{"Update", "Tables", "To update existing rows"},
{"Usage","Server Admin","No privileges - allow connect only"},
{NullS, NullS, NullS}
@@ -3999,7 +4000,9 @@ int fill_schema_charsets(THD *thd, TABLE
TABLE *table= tables->table;
CHARSET_INFO *scs= system_charset_info;
- for (cs= all_charsets ; cs < all_charsets+255 ; cs++)
+ for (cs= all_charsets ;
+ cs < all_charsets + array_elements(all_charsets) ;
+ cs++)
{
CHARSET_INFO *tmp_cs= cs[0];
if (tmp_cs && (tmp_cs->state & MY_CS_PRIMARY) &&
@@ -4078,7 +4081,9 @@ int fill_schema_collation(THD *thd, TABL
const char *wild= thd->lex->wild ? thd->lex->wild->ptr() : NullS;
TABLE *table= tables->table;
CHARSET_INFO *scs= system_charset_info;
- for (cs= all_charsets ; cs < all_charsets+255 ; cs++ )
+ for (cs= all_charsets ;
+ cs < all_charsets + array_elements(all_charsets) ;
+ cs++ )
{
CHARSET_INFO **cl;
CHARSET_INFO *tmp_cs= cs[0];
@@ -4086,7 +4091,9 @@ int fill_schema_collation(THD *thd, TABL
(tmp_cs->state & MY_CS_HIDDEN) ||
!(tmp_cs->state & MY_CS_PRIMARY))
continue;
- for (cl= all_charsets; cl < all_charsets+255 ;cl ++)
+ for (cl= all_charsets;
+ cl < all_charsets + array_elements(all_charsets) ;
+ cl ++)
{
CHARSET_INFO *tmp_cl= cl[0];
if (!tmp_cl || !(tmp_cl->state & MY_CS_AVAILABLE) ||
@@ -4119,14 +4126,18 @@ int fill_schema_coll_charset_app(THD *th
CHARSET_INFO **cs;
TABLE *table= tables->table;
CHARSET_INFO *scs= system_charset_info;
- for (cs= all_charsets ; cs < all_charsets+255 ; cs++ )
+ for (cs= all_charsets ;
+ cs < all_charsets + array_elements(all_charsets) ;
+ cs++ )
{
CHARSET_INFO **cl;
CHARSET_INFO *tmp_cs= cs[0];
if (!tmp_cs || !(tmp_cs->state & MY_CS_AVAILABLE) ||
!(tmp_cs->state & MY_CS_PRIMARY))
continue;
- for (cl= all_charsets; cl < all_charsets+255 ;cl ++)
+ for (cl= all_charsets;
+ cl < all_charsets + array_elements(all_charsets) ;
+ cl ++)
{
CHARSET_INFO *tmp_cl= cl[0];
if (!tmp_cl || !(tmp_cl->state & MY_CS_AVAILABLE) ||
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc 2008-07-18 13:30:53 +0000
+++ b/sql/sql_table.cc 2008-07-26 16:38:20 +0000
@@ -4155,8 +4155,6 @@ static bool mysql_admin_table(THD* thd,
CHARSET_INFO *cs= system_charset_info;
DBUG_ENTER("mysql_admin_table");
- if (end_active_trans(thd))
- DBUG_RETURN(1);
field_list.push_back(item = new Item_empty_string("Table",
NAME_CHAR_LEN * 2,
cs));
@@ -4247,12 +4245,12 @@ static bool mysql_admin_table(THD* thd,
{
DBUG_PRINT("admin", ("open table failed"));
if (!thd->warn_list.elements)
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_CHECK_NO_SUCH_TABLE, ER(ER_CHECK_NO_SUCH_TABLE));
/* if it was a view will check md5 sum */
if (table->view &&
view_checksum(thd, table) == HA_ADMIN_WRONG_CHECKSUM)
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM));
result_code= HA_ADMIN_CORRUPT;
goto send_result;
@@ -7161,7 +7159,7 @@ err:
}
bool save_abort_on_warning= thd->abort_on_warning;
thd->abort_on_warning= TRUE;
- make_truncated_value_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ make_truncated_value_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
f_val, strlength(f_val), t_type,
alter_info->datetime_field->field_name);
thd->abort_on_warning= save_abort_on_warning;
=== modified file 'sql/sql_tablespace.cc'
--- a/sql/sql_tablespace.cc 2008-06-30 20:21:41 +0000
+++ b/sql/sql_tablespace.cc 2008-07-14 12:49:19 +0000
@@ -31,7 +31,7 @@ int mysql_alter_tablespace(THD *thd, st_
{
hton= ha_default_handlerton(thd);
if (ts_info->storage_engine != 0)
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_USING_OTHER_HANDLER,
ER(ER_WARN_USING_OTHER_HANDLER),
hton_name(hton)->str,
=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy 2008-07-24 16:50:18 +0000
+++ b/sql/sql_yacc.yy 2008-08-07 03:05:33 +0000
@@ -11981,6 +11981,7 @@ object_privilege:
| CREATE USER { Lex->grant |= CREATE_USER_ACL; }
| EVENT_SYM { Lex->grant |= EVENT_ACL;}
| TRIGGER_SYM { Lex->grant |= TRIGGER_ACL; }
+ | CREATE TABLESPACE { Lex->grant |= CREATE_TABLESPACE_ACL; }
;
opt_and:
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2008-07-25 15:10:14 +0000
+++ b/sql/table.cc 2008-08-07 03:05:33 +0000
@@ -736,7 +736,8 @@ static int open_binary_frm(THD *thd, TAB
share->transactional= (ha_choice) (head[39] & 3);
share->page_checksum= (ha_choice) ((head[39] >> 2) & 3);
share->row_type= (row_type) head[40];
- share->table_charset= get_charset((uint) head[38],MYF(0));
+ share->table_charset= get_charset((((uint) head[41]) << 8) +
+ (uint) head[38],MYF(0));
share->null_field_first= 1;
}
if (!share->table_charset)
@@ -1273,12 +1274,13 @@ static int open_binary_frm(THD *thd, TAB
}
else
{
- if (!strpos[14])
+ uint csid= strpos[14] + (((uint) strpos[11]) << 8);
+ if (!csid)
charset= &my_charset_bin;
- else if (!(charset=get_charset((uint) strpos[14], MYF(0))))
+ else if (!(charset= get_charset(csid, MYF(0))))
{
error= 5; // Unknown or unavailable charset
- errarg= (int) strpos[14];
+ errarg= (int) csid;
goto err;
}
}
@@ -1351,7 +1353,7 @@ static int open_binary_frm(THD *thd, TAB
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
share->fieldnames.type_names[i], share->table_name.str,
share->table_name.str);
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_CRASHED_ON_USAGE,
"Found incompatible DECIMAL field '%s' in %s; "
"Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
@@ -1554,7 +1556,7 @@ static int open_binary_frm(THD *thd, TAB
"Please do \"ALTER TABLE '%s' FORCE \" to fix it!",
share->table_name.str,
share->table_name.str);
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_CRASHED_ON_USAGE,
"Found wrong key definition in %s; "
"Please do \"ALTER TABLE '%s' FORCE\" to fix "
@@ -2570,8 +2572,7 @@ File create_frm(THD *thd, const char *na
if ((file= my_create(name, CREATE_MODE, create_flags, MYF(0))) >= 0)
{
- uint key_length, tmp_key_length;
- uint tmp;
+ uint key_length, tmp_key_length, tmp, csid;
bzero((char*) fileinfo,64);
/* header */
fileinfo[0]=(uchar) 254;
@@ -2620,13 +2621,14 @@ File create_frm(THD *thd, const char *na
fileinfo[32]=0; // No filename anymore
fileinfo[33]=5; // Mark for 5.0 frm file
int4store(fileinfo+34,create_info->avg_row_length);
- fileinfo[38]= (create_info->default_table_charset ?
- create_info->default_table_charset->number : 0);
+ csid= (create_info->default_table_charset ?
+ create_info->default_table_charset->number : 0);
+ fileinfo[38]= (uchar) csid;
fileinfo[39]= (uchar) ((uint) create_info->transactional |
((uint) create_info->page_checksum << 2));
fileinfo[40]= (uchar) create_info->row_type;
/* Next few bytes where for RAID support */
- fileinfo[41]= 0;
+ fileinfo[41]= (uchar) (csid >> 8);
fileinfo[42]= 0;
fileinfo[43]= 0;
fileinfo[44]= 0;
@@ -3519,7 +3521,7 @@ int TABLE_LIST::view_check_option(THD *t
TABLE_LIST *main_view= top_table();
if (ignore_failure)
{
- push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_VIEW_CHECK_FAILED, ER(ER_VIEW_CHECK_FAILED),
main_view->view_db.str, main_view->view_name.str);
return(VIEW_CHECK_SKIP);
=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc 2008-05-29 15:44:11 +0000
+++ b/sql/unireg.cc 2008-07-24 11:33:35 +0000
@@ -874,20 +874,27 @@ static bool pack_fields(File file, List<
recpos= field->offset+1 + (uint) data_offset;
int3store(buff+5,recpos);
int2store(buff+8,field->pack_flag);
- int2store(buff+10,field->unireg_check);
+ DBUG_ASSERT(field->unireg_check < 256);
+ buff[10]= (uchar) field->unireg_check;
buff[12]= (uchar) field->interval_id;
buff[13]= (uchar) field->sql_type;
if (field->sql_type == MYSQL_TYPE_GEOMETRY)
{
+ buff[11]= 0;
buff[14]= (uchar) field->geom_type;
#ifndef HAVE_SPATIAL
DBUG_ASSERT(0); // Should newer happen
#endif
}
else if (field->charset)
+ {
+ buff[11]= (uchar) (field->charset->number >> 8);
buff[14]= (uchar) field->charset->number;
+ }
else
- buff[14]= 0; // Numerical
+ {
+ buff[11]= buff[14]= 0; // Numerical
+ }
int2store(buff+15, field->comment.length);
comment_length+= field->comment.length;
set_if_bigger(int_count,field->interval_id);
=== modified file 'storage/myisam/ft_static.c'
--- a/storage/myisam/ft_static.c 2008-04-28 16:24:05 +0000
+++ b/storage/myisam/ft_static.c 2008-07-24 11:33:35 +0000
@@ -30,8 +30,8 @@ const HA_KEYSEG ft_keysegs[FT_SEGS]={
0, /* Bit pos */
HA_VAR_LENGTH_PART | HA_PACK_KEY, /* flag */
HA_FT_MAXBYTELEN, /* length */
- HA_KEYTYPE_VARTEXT2, /* type */
63, /* language (will be overwritten) */
+ HA_KEYTYPE_VARTEXT2, /* type */
0, /* null_bit */
2, 0, 0 /* bit_start, bit_end, bit_length */
},
@@ -41,7 +41,7 @@ const HA_KEYSEG ft_keysegs[FT_SEGS]={
be packed in any way, otherwise w_search() won't be able to
update key entry 'in vivo'
*/
- 0, 0, 0, 0, HA_NO_SORT, HA_FT_WLEN, HA_FT_WTYPE, 63, 0, 0, 0, 0
+ 0, 0, 0, 0, HA_NO_SORT, HA_FT_WLEN, 63, HA_FT_WTYPE, 0, 0, 0, 0
}
};
=== modified file 'storage/myisam/mi_open.c'
--- a/storage/myisam/mi_open.c 2008-07-09 07:12:43 +0000
+++ b/storage/myisam/mi_open.c 2008-07-24 11:33:35 +0000
@@ -1194,10 +1194,10 @@ int mi_keyseg_write(File file, const HA_
ulong pos;
*ptr++= keyseg->type;
- *ptr++= keyseg->language;
+ *ptr++= keyseg->language & 0xFF; /* Collation ID, low byte */
*ptr++= keyseg->null_bit;
*ptr++= keyseg->bit_start;
- *ptr++= keyseg->bit_end;
+ *ptr++= keyseg->language >> 8; /* Collation ID, high byte */
*ptr++= keyseg->bit_length;
mi_int2store(ptr,keyseg->flag); ptr+=2;
mi_int2store(ptr,keyseg->length); ptr+=2;
@@ -1216,12 +1216,13 @@ uchar *mi_keyseg_read(uchar *ptr, HA_KEY
keyseg->language = *ptr++;
keyseg->null_bit = *ptr++;
keyseg->bit_start = *ptr++;
- keyseg->bit_end = *ptr++;
+ keyseg->language += ((uint16) (*ptr++)) << 8;
keyseg->bit_length = *ptr++;
keyseg->flag = mi_uint2korr(ptr); ptr +=2;
keyseg->length = mi_uint2korr(ptr); ptr +=2;
keyseg->start = mi_uint4korr(ptr); ptr +=4;
keyseg->null_pos = mi_uint4korr(ptr); ptr +=4;
+ keyseg->bit_end= 0;
keyseg->charset=0; /* Will be filled in later */
if (keyseg->null_bit)
keyseg->bit_pos= (uint16)(keyseg->null_pos + (keyseg->null_bit == 7));
=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc 2008-07-09 07:12:43 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc 2008-07-24 10:00:56 +0000
@@ -153,7 +153,7 @@ extern "C" void myrg_print_wrong_table(c
buf[db.length]= '.';
memcpy(buf + db.length + 1, name.str, name.length);
buf[db.length + name.length + 1]= 0;
- push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ADMIN_WRONG_MRG_TABLE, ER(ER_ADMIN_WRONG_MRG_TABLE),
buf);
}
=== modified file 'strings/conf_to_src.c'
--- a/strings/conf_to_src.c 2007-08-24 23:25:50 +0000
+++ b/strings/conf_to_src.c 2008-07-24 11:33:35 +0000
@@ -23,7 +23,7 @@
#define ROW16_LEN 8
#define MAX_BUF 64*1024
-static CHARSET_INFO all_charsets[256];
+static CHARSET_INFO all_charsets[512];
void
@@ -63,7 +63,9 @@ print_array16(FILE *f, const char *set,
static int get_charset_number(const char *charset_name)
{
CHARSET_INFO *cs;
- for (cs= all_charsets; cs < all_charsets+255; ++cs)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if ( cs->name && !strcmp(cs->name, charset_name))
return cs->number;
@@ -290,7 +292,9 @@ main(int argc, char **argv __attribute_
sprintf(filename,"%s/%s",argv[1],"Index.xml");
my_read_charset_file(filename);
- for (cs=all_charsets; cs < all_charsets+256; cs++)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if (cs->number && !(cs->state & MY_CS_COMPILED))
{
@@ -315,7 +319,9 @@ main(int argc, char **argv __attribute_
fprintf(f,"#include <m_ctype.h>\n\n");
- for (cs=all_charsets; cs < all_charsets+256; cs++)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if (simple_cs_is_full(cs))
{
@@ -332,7 +338,9 @@ main(int argc, char **argv __attribute_
}
fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n");
- for (cs=all_charsets; cs < all_charsets+256; cs++)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if (simple_cs_is_full(cs))
{
=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c 2008-06-28 11:00:59 +0000
+++ b/tests/mysql_client_test.c 2008-07-26 16:38:20 +0000
@@ -17828,6 +17828,59 @@ static void test_bug36004()
DBUG_VOID_RETURN;
}
+/**
+ Test that COM_REFRESH issues a implicit commit.
+*/
+
+static void test_wl4284_1()
+{
+ int rc;
+ MYSQL_ROW row;
+ MYSQL_RES *result;
+
+ DBUG_ENTER("test_wl4284_1");
+ myheader("test_wl4284_1");
+
+ /* set AUTOCOMMIT to OFF */
+ rc= mysql_autocommit(mysql, FALSE);
+ myquery(rc);
+
+ rc= mysql_query(mysql, "DROP TABLE IF EXISTS trans");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "CREATE TABLE trans (a INT) ENGINE= InnoDB");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "INSERT INTO trans VALUES(1)");
+ myquery(rc);
+
+ rc= mysql_refresh(mysql, REFRESH_GRANT | REFRESH_TABLES);
+ myquery(rc);
+
+ rc= mysql_rollback(mysql);
+ myquery(rc);
+
+ rc= mysql_query(mysql, "SELECT * FROM trans");
+ myquery(rc);
+
+ result= mysql_use_result(mysql);
+ mytest(result);
+
+ row= mysql_fetch_row(result);
+ mytest(row);
+
+ mysql_free_result(result);
+
+ /* set AUTOCOMMIT to OFF */
+ rc= mysql_autocommit(mysql, FALSE);
+ myquery(rc);
+
+ rc= mysql_query(mysql, "DROP TABLE trans");
+ myquery(rc);
+
+ DBUG_VOID_RETURN;
+}
+
/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -18139,6 +18192,7 @@ static struct my_tests_st my_tests[]= {
{ "test_wl4166_3", test_wl4166_3 },
{ "test_wl4166_4", test_wl4166_4 },
{ "test_bug36004", test_bug36004 },
+ { "test_wl4284_1", test_wl4284_1 },
{ 0, 0 }
};
| Thread |
|---|
| • bzr push into mysql-6.0-bugteam branch (davi:2748 to 2749) Bug#31302Bug#36777 Bug#37843 WL#3288 WL#4164 WL#4284 WL#4300 | Davi Arnaut | 7 Aug |