Commit 07fc9729 authored by unknown's avatar unknown

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new

parents 1be89333 647eefca
......@@ -23,7 +23,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
AdditionalIncludeDirectories="../../include,../../regex,../../sql,../../extra/yassl/include"
PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;WITH_PARTITION_STORAGE_ENGINE"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -72,7 +72,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
AdditionalIncludeDirectories="../../include,../../regex,../../sql,../../extra/yassl/include"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;USE_TLS;WITH_PARTITION_STORAGE_ENGINE"
StringPooling="TRUE"
RuntimeLibrary="1"
......@@ -122,7 +122,7 @@
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
AdditionalIncludeDirectories="../../include,../../regex,../../sql,../../extra/yassl/include"
PreprocessorDefinitions="DBUG_OFF;_WINDOWS;NDEBUG;USE_TLS;WITH_PARTITION_STORAGE_ENGINE"
StringPooling="TRUE"
RuntimeLibrary="0"
......@@ -171,7 +171,7 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../../include,../../regex,../../sql"
AdditionalIncludeDirectories="../../include,../../regex,../../sql,../../extra/yassl/include"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;_WINDOWS;WITH_PARTITION_STORAGE_ENGINE"
StringPooling="TRUE"
RuntimeLibrary="1"
......
......@@ -51,30 +51,30 @@ ADD_LIBRARY(mysqlclient ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
ADD_DEPENDENCIES(mysqlclient GenError)
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)
LINK_DIRECTORIES(${MYSQL_BINARY_DIR}/mysys ${MYSQL_BINARY_DIR}/zlib)
TARGET_LINK_LIBRARIES(mysql mysqlclient mysys yassl zlib dbug yassl taocrypt wsock32)
TARGET_LINK_LIBRARIES(mysql mysqlclient mysys yassl taocrypt zlib dbug wsock32)
ADD_EXECUTABLE(mysqltest mysqltest.c)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys yassl zlib dbug regex wsock32)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys yassl taocrypt zlib dbug regex wsock32)
ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient dbug yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump mysqlclient mysys dbug yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqldump mysqlclient mysys dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqlimport mysqlimport.c)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqlshow mysqlshow.c)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc ../mysys/mf_tempdir.c ../mysys/my_new.cc
../mysys/my_bit.c ../mysys/my_bitmap.c ../mysys/my_vle.c
../mysys/base64.c)
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient dbug yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqlslap mysqlslap.c)
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys zlib wsock32 dbug)
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 dbug)
......@@ -8,16 +8,19 @@ TARGET_LINK_LIBRARIES(comp_err dbug mysys strings wsock32)
GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
COMMAND ${COMP_ERR_EXE}
--charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
--out-dir=${PROJECT_SOURCE_DIR}/sql/share/
--header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
--name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
--state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
--in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt)
ADD_CUSTOM_TARGET(GenError
${COMP_ERR_EXE} --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
--out-dir=${PROJECT_SOURCE_DIR}/sql/share/
--header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
--name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
--state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
--in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt)
ALL
DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h)
ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt odbc32 odbccp32 wsock32)
......
......@@ -429,8 +429,8 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_RTREE_KEYS 1
#define HAVE_ROW_BASED_REPLICATION 1
/* #undef HAVE_OPENSSL */
/* #undef HAVE_YASSL */
#define HAVE_OPENSSL 1
#define HAVE_YASSL 1
/* Define charsets you want */
/* #undef HAVE_CHARSET_armscii8 */
......
......@@ -45,7 +45,7 @@ ADD_LIBRARY(libmysql MODULE dll.c libmysql.def
../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c
../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c
../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c)
ADD_DEPENDENCIES(libmysql dbug vio mysys strings GenError zlib)
ADD_DEPENDENCIES(libmysql dbug vio mysys strings GenError zlib yassl taocrypt)
TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32)
# ToDo: We should move the mytest.c program out in libmysql/
......
......@@ -78,6 +78,12 @@ sub mtr_timer_start($$$) {
{
# Child, redirect output and exec
# FIXME do we need to redirect streams?
# Don't do the ^C cleanup in the timeout child processes!
# There is actually a race here, if we get ^C after fork(), but before
# clearing the signal handler.
$SIG{INT}= 'DEFAULT';
$0= "mtr_timer(timers,$name,$duration)";
sleep($duration);
exit(0);
......
......@@ -116,80 +116,80 @@ set names utf8;
CREATE EVENT root6 ON SCHEDULE EVERY '10:20' MINUTE_SECOND ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1;
SHOW CREATE EVENT root6;
Event sql_mode Create Event
root6 CREATE EVENT `events_test`.`root6` ON SCHEDULE EVERY '10:20' MINUTE_SECOND ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1
root6 CREATE EVENT `root6` ON SCHEDULE EVERY '10:20' MINUTE_SECOND ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1
create event root7 on schedule every 2 year do select 1;
SHOW CREATE EVENT root7;
Event sql_mode Create Event
root7 CREATE EVENT `events_test`.`root7` ON SCHEDULE EVERY 2 YEAR ON COMPLETION NOT PRESERVE ENABLE DO select 1
root7 CREATE EVENT `root7` ON SCHEDULE EVERY 2 YEAR ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root8 on schedule every '2:5' year_month do select 1;
SHOW CREATE EVENT root8;
Event sql_mode Create Event
root8 CREATE EVENT `events_test`.`root8` ON SCHEDULE EVERY '2-5' YEAR_MONTH ON COMPLETION NOT PRESERVE ENABLE DO select 1
root8 CREATE EVENT `root8` ON SCHEDULE EVERY '2-5' YEAR_MONTH ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root8_1 on schedule every '2:15' year_month do select 1;
SHOW CREATE EVENT root8_1;
Event sql_mode Create Event
root8_1 CREATE EVENT `events_test`.`root8_1` ON SCHEDULE EVERY '3-3' YEAR_MONTH ON COMPLETION NOT PRESERVE ENABLE DO select 1
root8_1 CREATE EVENT `root8_1` ON SCHEDULE EVERY '3-3' YEAR_MONTH ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root9 on schedule every 2 week ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' do select 1;
SHOW CREATE EVENT root9;
Event sql_mode Create Event
root9 CREATE EVENT `events_test`.`root9` ON SCHEDULE EVERY 2 WEEK ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' DO select 1
root9 CREATE EVENT `root9` ON SCHEDULE EVERY 2 WEEK ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' DO select 1
create event root10 on schedule every '20:5' day_hour do select 1;
SHOW CREATE EVENT root10;
Event sql_mode Create Event
root10 CREATE EVENT `events_test`.`root10` ON SCHEDULE EVERY '20 5' DAY_HOUR ON COMPLETION NOT PRESERVE ENABLE DO select 1
root10 CREATE EVENT `root10` ON SCHEDULE EVERY '20 5' DAY_HOUR ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root11 on schedule every '20:25' day_hour do select 1;
SHOW CREATE EVENT root11;
Event sql_mode Create Event
root11 CREATE EVENT `events_test`.`root11` ON SCHEDULE EVERY '21 1' DAY_HOUR ON COMPLETION NOT PRESERVE ENABLE DO select 1
root11 CREATE EVENT `root11` ON SCHEDULE EVERY '21 1' DAY_HOUR ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root12 on schedule every '20:25' hour_minute do select 1;
SHOW CREATE EVENT root12;
Event sql_mode Create Event
root12 CREATE EVENT `events_test`.`root12` ON SCHEDULE EVERY '20:25' HOUR_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
root12 CREATE EVENT `root12` ON SCHEDULE EVERY '20:25' HOUR_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root13 on schedule every '25:25' hour_minute do select 1;
SHOW CREATE EVENT root13;
Event sql_mode Create Event
root13 CREATE EVENT `events_test`.`root13` ON SCHEDULE EVERY '25:25' HOUR_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
root13 CREATE EVENT `root13` ON SCHEDULE EVERY '25:25' HOUR_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root13_1 on schedule every '11:65' hour_minute do select 1;
SHOW CREATE EVENT root13_1;
Event sql_mode Create Event
root13_1 CREATE EVENT `events_test`.`root13_1` ON SCHEDULE EVERY '12:5' HOUR_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
root13_1 CREATE EVENT `root13_1` ON SCHEDULE EVERY '12:5' HOUR_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root14 on schedule every '35:35' minute_second do select 1;
SHOW CREATE EVENT root14;
Event sql_mode Create Event
root14 CREATE EVENT `events_test`.`root14` ON SCHEDULE EVERY '35:35' MINUTE_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
root14 CREATE EVENT `root14` ON SCHEDULE EVERY '35:35' MINUTE_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root15 on schedule every '35:66' minute_second do select 1;
SHOW CREATE EVENT root15;
Event sql_mode Create Event
root15 CREATE EVENT `events_test`.`root15` ON SCHEDULE EVERY '36:6' MINUTE_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
root15 CREATE EVENT `root15` ON SCHEDULE EVERY '36:6' MINUTE_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root16 on schedule every '35:56' day_minute do select 1;
SHOW CREATE EVENT root16;
Event sql_mode Create Event
root16 CREATE EVENT `events_test`.`root16` ON SCHEDULE EVERY '1 11:56' DAY_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
root16 CREATE EVENT `root16` ON SCHEDULE EVERY '1 11:56' DAY_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root17 on schedule every '35:12:45' day_minute do select 1;
SHOW CREATE EVENT root17;
Event sql_mode Create Event
root17 CREATE EVENT `events_test`.`root17` ON SCHEDULE EVERY '35 12:45' DAY_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
root17 CREATE EVENT `root17` ON SCHEDULE EVERY '35 12:45' DAY_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root17_1 on schedule every '35:25:65' day_minute do select 1;
SHOW CREATE EVENT root17_1;
Event sql_mode Create Event
root17_1 CREATE EVENT `events_test`.`root17_1` ON SCHEDULE EVERY '36 2:5' DAY_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
root17_1 CREATE EVENT `root17_1` ON SCHEDULE EVERY '36 2:5' DAY_MINUTE ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root18 on schedule every '35:12:45' hour_second do select 1;
SHOW CREATE EVENT root18;
Event sql_mode Create Event
root18 CREATE EVENT `events_test`.`root18` ON SCHEDULE EVERY '35:12:45' HOUR_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
root18 CREATE EVENT `root18` ON SCHEDULE EVERY '35:12:45' HOUR_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root19 on schedule every '15:59:85' hour_second do select 1;
SHOW CREATE EVENT root19;
Event sql_mode Create Event
root19 CREATE EVENT `events_test`.`root19` ON SCHEDULE EVERY '16:0:25' HOUR_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
root19 CREATE EVENT `root19` ON SCHEDULE EVERY '16:0:25' HOUR_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
create event root20 on schedule every '50:20:12:45' day_second do select 1;
SHOW CREATE EVENT root20;
Event sql_mode Create Event
root20 CREATE EVENT `events_test`.`root20` ON SCHEDULE EVERY '50 20:12:45' DAY_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
root20 CREATE EVENT `root20` ON SCHEDULE EVERY '50 20:12:45' DAY_SECOND ON COMPLETION NOT PRESERVE ENABLE DO select 1
set names cp1251;
create event ðóóò21 on schedule every '50:23:59:95' day_second COMMENT 'òîâà å 1251 êîìåíòàð' do select 1;
SHOW CREATE EVENT ðóóò21;
Event sql_mode Create Event
ðóóò21 CREATE EVENT `events_test`.`ðóóò21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND ON COMPLETION NOT PRESERVE ENABLE COMMENT 'òîâà å 1251 êîìåíòàð' DO select 1
ðóóò21 CREATE EVENT `ðóóò21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND ON COMPLETION NOT PRESERVE ENABLE COMMENT 'òîâà å 1251 êîìåíòàð' DO select 1
insert into mysql.event (db, name, body, definer, interval_value, interval_field) values (database(), "root22", "select 1", user(), 100, "SECOND_MICROSECOND");
show create event root22;
ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND'
......@@ -260,8 +260,10 @@ ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin d
"This should work"
SHOW EVENTS;
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
events_test intact_check root@localhost RECURRING NULL 10 HOUR # # ENABLED
events_test intact_check root@localhost RECURRING NULL 10 HOUR # # ENABLED
ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
Warnings:
Warning 1265 Data truncated for column 'db' at row 1
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default '';
......@@ -465,4 +467,10 @@ select event_schema, event_name, definer, event_body from information_schema.eve
event_schema event_name definer event_body
events_test white_space root@localhost select 3
drop event white_space;
create event e1 on schedule every 1 year do set @a = 5;
create table t1 (s1 int);
create trigger t1_ai after insert on t1 for each row show create event e1;
ERROR 0A000: Not allowed to return a result set from a trigger
drop table t1;
drop event e1;
drop database events_test;
create database if not exists events_test;
use events_test;
set @a=3;
CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5;
call p_16();
"Here we used to crash!"
call p_16();
ERROR HY000: Event 'e_16' already exists
call p_16();
ERROR HY000: Event 'e_16' already exists
DROP EVENT e_16;
CALL p_16();
CALL p_16();
ERROR HY000: Event 'e_16' already exists
DROP PROCEDURE p_16;
DROP EVENT e_16;
create event e_55 on schedule at 99990101000000 do drop table t;
ERROR HY000: Incorrect AT value: '99990101000000'
create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t;
ERROR HY000: Incorrect STARTS value: '99990101000000'
create event e_55 on schedule every 10 minute ends 99990101000000 do drop table t;
ERROR HY000: ENDS is either invalid or before STARTS
set global event_scheduler=0;
"Wait a bit to settle down"
delete from mysql.event;
......
......@@ -546,4 +546,15 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION p1 VALUES IN (1) ENGINE = MyISAM, PARTITION p2 VALUES IN (2) ENGINE = MyISAM)
drop table t1;
create table t1 (a int unsigned not null auto_increment primary key)
partition by key(a);
alter table t1 rename t2, add c char(10), comment "no comment";
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(10) unsigned NOT NULL AUTO_INCREMENT,
`c` char(10) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment' PARTITION BY KEY (a)
drop table t2;
End of 5.1 tests
......@@ -1166,3 +1166,10 @@ drop procedure bug15091;
drop function if exists bug16896;
create aggregate function bug16896() returns int return 1;
ERROR 42000: AGGREGATE is not supported for stored functions
drop function if exists bug16164;
create function bug16164() returns int
begin
show authors;
return 42;
end|
ERROR 0A000: Not allowed to return a result set from a function
......@@ -3156,3 +3156,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 9 Using where
2 DEPENDENT SUBQUERY t1 index NULL a 8 NULL 9 Using filesort
DROP TABLE t1;
create table t1( f1 int,f2 int);
insert into t1 values (1,1),(2,2);
select tt.t from (select 'crash1' as t, f2 from t1) as tt left join t1 on tt.t = 'crash2' and tt.f2 = t1.f2 where tt.t = 'crash1';
t
crash1
crash1
drop table t1;
......@@ -609,3 +609,7 @@ extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin)
select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]')
select extractValue('<e>1</e>','position()');
ERROR HY000: XPATH syntax error: ''
select extractValue('<e>1</e>','last()');
ERROR HY000: XPATH syntax error: ''
......@@ -23,21 +23,20 @@ partition_03ndb : Bug#16385
ps_7ndb : dbug assert in RBR mode when executing test suite
#rpl_bit_npk : Bug#13418
rpl_ddl : Bug#15963 SBR does not show "Definer" correctly
rpl_ndb_2innodb : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_2myisam : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_2innodb : Assert failure in ha_partition::extra()
rpl_ndb_2myisam : Assert failure in ha_partition::extra()
rpl_ndb_auto_inc : Bug#17086
#rpl_ndb_basic : Bug#16228 [IN REVIEW]
rpl_ndb_blob : interferes with following tests, causing hang
rpl_ndb_blob2 : interferes with following tests, causing hang
rpl_ndb_ddl : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_innodb2ndb : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_ddl : master hangs
#rpl_ndb_delete_nowhere : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_innodb2ndb : Bug#18261: Cluster Replication: tests rpl_ndb_xxx2ndb fails
rpl_ndb_insert_ignore : Bugs: #17431: INSERT IGNORE INTO returns failed: 1296
rpl_ndb_myisam2ndb : Bugs#17400: delete & update of rows in table without pk fails
rpl_ndb_myisam2ndb : Bug#18261: Cluster Replication: tests rpl_ndb_xxx2ndb fails
#rpl_ndb_log : result not deterministic
rpl_ndb_relay_space : Bug#16993
rpl_ndb_multi_update2 : BUG#17738 In progress
rpl_ndb_multi_update3 : Bug#17400: delete & update of rows in table without pk fails
#rpl_ndb_multi_update3 : Bug#17400: delete & update of rows in table without pk fails
rpl_ndb_sp007 : Bug #17290
rpl_row_inexist_tbl : Disabled since patch makes this test wait forever
rpl_sp : Bug#16456
......
......@@ -190,10 +190,10 @@ CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
--replace_column 8 # 9 #
SHOW EVENTS;
ALTER TABLE mysql.event ADD dummy INT FIRST;
--error 1525
--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
SHOW EVENTS;
ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST;
--error 1525
--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
SHOW EVENTS;
ALTER TABLE mysql.event DROP dummy2;
--replace_column 8 # 9 #
......@@ -206,7 +206,7 @@ ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin d
#wait a bit or we won't see the difference because of seconds resolution
--sleep 1
SHOW CREATE TABLE mysql.event;
--error 1526
--error ER_CANNOT_LOAD_FROM_TABLE
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
--sleep 1
ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default '';
......@@ -216,16 +216,16 @@ ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin d
SHOW EVENTS;
--sleep 1
ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
--error 1526
--error ER_CANNOT_LOAD_FROM_TABLE
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
--sleep 1
ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default '';
--error 1526
--error ER_CANNOT_LOAD_FROM_TABLE
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
--sleep 1
ALTER TABLE mysql.event DROP comment, DROP starts;
--sleep 1
--error 1525
--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
DROP TABLE mysql.event;
CREATE TABLE mysql.event like event_like;
......@@ -317,9 +317,9 @@ drop event one_event;
create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
drop event e_26;
--error 1503
--error 1504
create event e_26 on schedule at NULL disabled do set @a = 5;
--error 1503
--error 1504
create event e_26 on schedule at 'definitely not a datetime' disabled do set @a = 5;
set names utf8;
......@@ -427,6 +427,16 @@ drop event white_space;
# END: BUG #17453: Creating Event crash the server
#
#
# Bug#17403 "Events: packets out of order with show create event"
#
create event e1 on schedule every 1 year do set @a = 5;
create table t1 (s1 int);
--error ER_SP_NO_RETSET
create trigger t1_ai after insert on t1 for each row show create event e1;
drop table t1;
drop event e1;
##set global event_scheduler=1;
##select get_lock("test_lock3", 20);
##create event закачка on schedule every 10 hour do select get_lock("test_lock3", 20);
......
create database if not exists events_test;
use events_test;
#
# START - BUG#16408: Events: crash for an event in a procedure
#
set @a=3;
CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5;
call p_16();
--echo "Here we used to crash!"
--error 1516
call p_16();
--error 1516
call p_16();
DROP EVENT e_16;
CALL p_16();
--error 1516
CALL p_16();
DROP PROCEDURE p_16;
DROP EVENT e_16;
#
# END - BUG#16408: Events: crash for an event in a procedure
#
#
# Start - 16396: Events: Distant-future dates become past dates
#
--error 1504
create event e_55 on schedule at 99990101000000 do drop table t;
--error 1504
create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t;
--error ER_EVENT_ENDS_BEFORE_STARTS
create event e_55 on schedule every 10 minute ends 99990101000000 do drop table t;
#
# End - 16396: Events: Distant-future dates become past dates
#
#
# Start - 16407: Events: Changes in sql_mode won't be taken into account
#
......
......@@ -697,4 +697,21 @@ alter table t1 add primary key (b);
show create table t1;
drop table t1;
############################################
#
# Author: Mikael Ronstrom
# Date: 2006-03-01
# Purpose
# Bug 17772: Crash at ALTER TABLE with rename
# and add column + comment on
# partitioned table
#
############################################
create table t1 (a int unsigned not null auto_increment primary key)
partition by key(a);
alter table t1 rename t2, add c char(10), comment "no comment";
show create table t2;
drop table t2;
--echo End of 5.1 tests
......@@ -3,5 +3,10 @@
# to reuse test code between engine runs #
############################################################
-- source include/have_ndb.inc
# Run this only for row based replication, as replication of
# auto_increment values are not supported with NDB as storage engine
-- source include/have_binlog_format_row.inc
let $engine_type=NDB;
--source extra/rpl_tests/rpl_multi_update2.test
......@@ -1691,6 +1691,24 @@ drop function if exists bug16896;
--error ER_SP_NO_AGGREGATE
create aggregate function bug16896() returns int return 1;
#
# End of 5.0 tests
#
#
# Bug#16164 "Easter egg": check that SHOW AUTHORS is disabled in
# stored functions/triggers
#
--disable_warnings
drop function if exists bug16164;
--enable_warnings
delimiter |;
--error ER_SP_NO_RETSET
create function bug16164() returns int
begin
show authors;
return 42;
end|
#
# BUG#NNNN: New bug synopsis
......
......@@ -2067,3 +2067,10 @@ SELECT * FROM t1 WHERE (a,b) = ANY (SELECT a, max(b) FROM t1 GROUP BY a);
DROP TABLE t1;
#
# Bug#17366: Unchecked Item_int results in server crash
#
create table t1( f1 int,f2 int);
insert into t1 values (1,1),(2,2);
select tt.t from (select 'crash1' as t, f2 from t1) as tt left join t1 on tt.t = 'crash2' and tt.f2 = t1.f2 where tt.t = 'crash1';
drop table t1;
......@@ -277,3 +277,12 @@ select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin);
select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
#
# Bug #18171 XML: ExtractValue: the XPath position()
# function crashes the server!
#
--error 1105
select extractValue('<e>1</e>','position()');
--error 1105
select extractValue('<e>1</e>','last()');
......@@ -2,7 +2,8 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-DMYSQL_SERVER -DMYSQL_INSTANCE_MANAGER)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/sql)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/sql
${PROJECT_SOURCE_DIR}/extra/yassl/include)
ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instance.cc instance_map.cc
instance_options.cc listener.cc log.cc manager.cc messages.cc mysql_connection.cc
......
......@@ -38,7 +38,7 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc discover.
sql_lex.cc sql_list.cc sql_load.cc sql_manager.cc sql_map.cc sql_parse.cc sql_partition.cc
sql_plugin.cc sql_prepare.cc sql_rename.cc sql_repl.cc sql_select.cc sql_show.cc
sql_state.c sql_string.cc sql_table.cc sql_test.cc sql_trigger.cc sql_udf.cc sql_union.cc
sql_update.cc sql_view.cc sql_yacc.h sql_yacc.cc strfunc.cc table.cc thr_malloc.cc time.cc tztime.cc
sql_update.cc sql_view.cc strfunc.cc table.cc thr_malloc.cc time.cc tztime.cc
uniques.cc unireg.cc item_xmlfunc.cc rpl_tblmap.cc sql_binlog.cc event_executor.cc
event_timed.cc sql_tablespace.cc event.cc ../sql-common/my_user.c partition_info.cc
${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
......@@ -56,7 +56,7 @@ ADD_DEPENDENCIES(mysqld GenError)
ADD_CUSTOM_COMMAND(
SOURCE ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy
OUTPUT ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
COMMAND bison.exe ARGS --defines=sql_yacc.h --output=sql_yacc.cc sql_yacc.yy
COMMAND bison.exe ARGS -y -p MYSQL --defines=sql_yacc.h --output=sql_yacc.cc sql_yacc.yy
DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy)
ADD_CUSTOM_COMMAND(
......
......@@ -40,7 +40,6 @@
#define EVENT_EXEC_NO_MORE (1L << 0)
#define EVENT_NOT_USED (1L << 1)
extern ulong opt_event_executor;
enum enum_event_on_completion
......@@ -122,6 +121,39 @@ public:
bool free_sphead_on_delete;
uint flags;//all kind of purposes
static void *operator new(size_t size)
{
void *p;
DBUG_ENTER("Event_timed::new(size)");
p= my_malloc(size, MYF(0));
DBUG_PRINT("info", ("alloc_ptr=0x%lx", p));
DBUG_RETURN(p);
}
static void *operator new(size_t size, MEM_ROOT *mem_root)
{ return (void*) alloc_root(mem_root, (uint) size); }
static void operator delete(void *ptr, size_t size)
{
DBUG_ENTER("Event_timed::delete(ptr,size)");
DBUG_PRINT("enter", ("free_ptr=0x%lx", ptr));
TRASH(ptr, size);
my_free((gptr) ptr, MYF(0));
DBUG_VOID_RETURN;
}
static void operator delete(void *ptr, MEM_ROOT *mem_root)
{
/*
Don't free the memory it will be done by the mem_root but
we need to call the destructor because we free other resources
which are not allocated on the root but on the heap, or we
deinit mutexes.
*/
DBUG_ASSERT(0);
}
Event_timed():in_spawned_thread(0),locked_by_thread_id(0),
running(0), status_changed(false),
last_executed_changed(false), expression(0), created(0),
......@@ -136,15 +168,21 @@ public:
}
~Event_timed()
{
pthread_mutex_destroy(&this->LOCK_running);
{
deinit_mutexes();
if (free_sphead_on_delete)
free_sp();
free_sp();
}
void
init();
void
deinit_mutexes()
{
pthread_mutex_destroy(&this->LOCK_running);
}
int
init_definer(THD *thd);
......
......@@ -151,6 +151,7 @@ Event_timed::init_execute_at(THD *thd, Item *expr)
{
my_bool not_used;
TIME ltime;
my_time_t t;
TIME time_tmp;
DBUG_ENTER("Event_timed::init_execute_at");
......@@ -174,12 +175,18 @@ Event_timed::init_execute_at(THD *thd, Item *expr)
TIME_to_ulonglong_datetime(&time_tmp))
DBUG_RETURN(EVEX_BAD_PARAMS);
/*
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
CONVERT_TZ has similar problem.
mysql_priv.h currently lists
#define TIMESTAMP_MAX_YEAR 2038 (see TIME_to_timestamp())
*/
my_tz_UTC->gmt_sec_to_TIME(&ltime, TIME_to_timestamp(thd,&ltime, &not_used));
my_tz_UTC->gmt_sec_to_TIME(&ltime,t=TIME_to_timestamp(thd,&ltime,&not_used));
if (!t)
{
DBUG_PRINT("error", ("Execute AT after year 2037"));
DBUG_RETURN(ER_WRONG_VALUE);
}
execute_at_null= FALSE;
execute_at= ltime;
......@@ -302,6 +309,7 @@ Event_timed::init_interval(THD *thd, Item *expr, interval_type new_interval)
RETURNS
0 OK
EVEX_PARSE_ERROR fix_fields failed
EVEX_BAD_PARAMS starts before now
*/
int
......@@ -309,6 +317,7 @@ Event_timed::init_starts(THD *thd, Item *new_starts)
{
my_bool not_used;
TIME ltime, time_tmp;
my_time_t t;
DBUG_ENTER("Event_timed::init_starts");
......@@ -329,10 +338,17 @@ Event_timed::init_starts(THD *thd, Item *new_starts)
DBUG_RETURN(EVEX_BAD_PARAMS);
/*
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx
CONVERT_TZ has similar problem
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
CONVERT_TZ has similar problem.
mysql_priv.h currently lists
#define TIMESTAMP_MAX_YEAR 2038 (see TIME_to_timestamp())
*/
my_tz_UTC->gmt_sec_to_TIME(&ltime, TIME_to_timestamp(thd, &ltime, &not_used));
my_tz_UTC->gmt_sec_to_TIME(&ltime,t=TIME_to_timestamp(thd, &ltime, &not_used));
if (!t)
{
DBUG_PRINT("error", ("STARTS after year 2037"));
DBUG_RETURN(EVEX_BAD_PARAMS);
}
starts= ltime;
starts_null= FALSE;
......@@ -359,6 +375,7 @@ Event_timed::init_starts(THD *thd, Item *new_starts)
RETURNS
0 OK
EVEX_PARSE_ERROR fix_fields failed
ER_WRONG_VALUE starts distant date (after year 2037)
EVEX_BAD_PARAMS ENDS before STARTS
*/
......@@ -367,6 +384,7 @@ Event_timed::init_ends(THD *thd, Item *new_ends)
{
TIME ltime, ltime_now;
my_bool not_used;
my_time_t t;
DBUG_ENTER("Event_timed::init_ends");
......@@ -378,11 +396,18 @@ Event_timed::init_ends(THD *thd, Item *new_ends)
DBUG_RETURN(EVEX_BAD_PARAMS);
/*
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx ?
CONVERT_TZ has similar problem ?
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
CONVERT_TZ has similar problem.
mysql_priv.h currently lists
#define TIMESTAMP_MAX_YEAR 2038 (see TIME_to_timestamp())
*/
DBUG_PRINT("info", ("get the UTC time"));
my_tz_UTC->gmt_sec_to_TIME(&ltime, TIME_to_timestamp(thd, &ltime, &not_used));
my_tz_UTC->gmt_sec_to_TIME(&ltime,t=TIME_to_timestamp(thd, &ltime, &not_used));
if (!t)
{
DBUG_PRINT("error", ("ENDS after year 2037"));
DBUG_RETURN(EVEX_BAD_PARAMS);
}
/* Check whether ends is after starts */
DBUG_PRINT("info", ("ENDS after STARTS?"));
......@@ -1228,12 +1253,12 @@ Event_timed::change_security_context(THD *thd, Security_context *s_ctx,
definer_host.str, dbname.str))
{
my_error(ER_NO_SUCH_USER, MYF(0), definer_user.str, definer_host.str);
DBUG_RETURN(TRUE);
DBUG_RETURN(true);
}
*backup= thd->security_ctx;
thd->security_ctx= s_ctx;
#endif
DBUG_RETURN(FALSE);
DBUG_RETURN(false);
}
......@@ -1368,7 +1393,8 @@ Event_timed::compile(THD *thd, MEM_ROOT *mem_root)
ret= 0;
done:
lex.et->free_sphead_on_delete= false;
delete lex.et;
lex.et->deinit_mutexes();
lex_end(&lex);
DBUG_PRINT("note", ("return old data on its place. set back NAMES"));
......
......@@ -1141,13 +1141,15 @@ static Item *create_func_round(MY_XPATH *xpath, Item **args, uint nargs)
static Item *create_func_last(MY_XPATH *xpath, Item **args, uint nargs)
{
return new Item_func_xpath_count(xpath->context, xpath->pxml);
return xpath->context ?
new Item_func_xpath_count(xpath->context, xpath->pxml) : NULL;
}
static Item *create_func_position(MY_XPATH *xpath, Item **args, uint nargs)
{
return new Item_func_xpath_position(xpath->context, xpath->pxml);
return xpath->context ?
new Item_func_xpath_position(xpath->context, xpath->pxml) : NULL;
}
......
......@@ -176,6 +176,7 @@ sp_get_flags_for_command(LEX *lex)
case SQLCOM_SHOW_CREATE_DB:
case SQLCOM_SHOW_CREATE_FUNC:
case SQLCOM_SHOW_CREATE_PROC:
case SQLCOM_SHOW_CREATE_EVENT:
case SQLCOM_SHOW_DATABASES:
case SQLCOM_SHOW_ERRORS:
case SQLCOM_SHOW_FIELDS:
......@@ -200,6 +201,7 @@ sp_get_flags_for_command(LEX *lex)
case SQLCOM_SHOW_WARNS:
case SQLCOM_SHOW_PROC_CODE:
case SQLCOM_SHOW_FUNC_CODE:
case SQLCOM_SHOW_AUTHORS:
case SQLCOM_REPAIR:
case SQLCOM_BACKUP_TABLE:
case SQLCOM_RESTORE_TABLE:
......
......@@ -82,8 +82,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
ha_rows const maybe_deleted= table->file->records;
/*
If all rows shall be deleted, we always log this statement-based
(see [binlog], below), so we set this flag and test it below.
If all rows shall be deleted, we (almost) always log this
statement-based (see [binlog], below), so we set this flag and
test it below.
*/
ha_delete_all_rows= 1;
if (!(error=table->file->delete_all_rows()))
......@@ -330,12 +331,13 @@ cleanup:
thd->clear_error();
/*
[binlog]: If 'handler::delete_all_rows()' was called, we
replicate statement-based; otherwise, 'ha_delete_row()' was
used to delete specific rows which we might log row-based.
[binlog]: If 'handler::delete_all_rows()' was called and the
storage engine does not inject the rows itself, we replicate
statement-based; otherwise, 'ha_delete_row()' was used to
delete specific rows which we might log row-based.
*/
THD::enum_binlog_query_type const
query_type(ha_delete_all_rows ?
query_type(ha_delete_all_rows && !table->file->is_injective() ?
THD::STMT_QUERY_TYPE :
THD::ROW_QUERY_TYPE);
int log_result= thd->binlog_query(query_type,
......
......@@ -53,6 +53,11 @@ class Event_timed;
/*
When a command is added here, be sure it's also added in mysqld.cc
in "struct show_var_st status_vars[]= {" ...
If the command returns a result set or is not allowed in stored
functions or triggers, please also make sure that
sp_get_flags_for_command (sp_head.cc) returns proper flags for the
added SQLCOM_.
*/
enum enum_sql_command {
......@@ -761,6 +766,7 @@ typedef struct st_lex
const uchar *tok_start_prev, *tok_end_prev;
char *length,*dec,*change,*name;
Table_ident *like_name;
char *help_arg;
char *backup_dir; /* For RESTORE/BACKUP */
char* to_log; /* For PURGE MASTER LOGS TO */
......
......@@ -2897,9 +2897,9 @@ mysql_execute_command(THD *thd)
else
{
/* regular create */
if (lex->name)
if (lex->like_name)
res= mysql_create_like_table(thd, create_table, &lex->create_info,
(Table_ident *)lex->name);
lex->like_name);
else
{
res= mysql_create_table(thd, create_table->db,
......@@ -3803,10 +3803,14 @@ end_with_restore_list:
send_ok(thd, rows_affected);
/* lex->unit.cleanup() is called outside, no need to call it here */
} while (0);
lex->et->free_sphead_on_delete= true;
delete lex->et;
lex->et= 0;
} while (0);
if (!thd->spcont)
{
lex->et->free_sphead_on_delete= true;
lex->et->free_sp();
lex->et->deinit_mutexes();
}
break;
}
case SQLCOM_SHOW_CREATE_EVENT:
......@@ -5845,7 +5849,9 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
if (thd->lex->et)
{
thd->lex->et->free_sphead_on_delete= true;
delete thd->lex->et;
/* alloced on thd->mem_root so no real memory free but dtor call */
thd->lex->et->free_sp();
thd->lex->et->deinit_mutexes();
thd->lex->et= NULL;
}
}
......@@ -5886,7 +5892,8 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
if (thd->lex->et)
{
thd->lex->et->free_sphead_on_delete= true;
delete thd->lex->et;
lex->et->free_sp();
lex->et->deinit_mutexes();
thd->lex->et= NULL;
}
}
......
......@@ -3741,14 +3741,14 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
ha_legacy_type(default_db_type)));
if (is_create_table_ind)
{
if (old_lex->name)
if (old_lex->like_name)
{
/*
This code is executed when we do a CREATE TABLE t1 LIKE t2
old_lex->name contains the t2 and the table we are opening has
old_lex->like_name contains the t2 and the table we are opening has
name t1.
*/
Table_ident *table_ident= (Table_ident *)old_lex->name;
Table_ident *table_ident= old_lex->like_name;
char *src_db= table_ident->db.str ? table_ident->db.str : thd->db;
char *src_table= table_ident->table.str;
char buf[FN_REFLEN];
......
......@@ -7114,7 +7114,10 @@ static Item *eliminate_item_equal(COND *cond, COND_EQUAL *upper_levels,
if (!cond)
cond= new Item_cond_and(eq_list);
else
{
DBUG_ASSERT(cond->type() == Item::COND_ITEM);
((Item_cond *) cond)->add_at_head(&eq_list);
}
cond->quick_fix_field();
cond->update_used_tables();
......@@ -7199,6 +7202,11 @@ static COND* substitute_for_best_equal_field(COND *cond,
while ((item_equal= it++))
{
cond= eliminate_item_equal(cond, cond_equal->upper_levels, item_equal);
// This occurs when eliminate_item_equal() founds that cond is
// always false and substitues it with Item_int 0.
// Due to this, value of item_equal will be 0, so just return it.
if (cond->type() != Item::COND_ITEM)
break;
}
}
}
......
......@@ -1214,7 +1214,8 @@ create:
lex->create_info.options=$2 | $4;
lex->create_info.db_type= lex->thd->variables.table_type;
lex->create_info.default_table_charset= NULL;
lex->name=0;
lex->name= 0;
lex->like_name= 0;
}
create2
{ Lex->current_select= &Lex->select_lex; }
......@@ -1274,7 +1275,7 @@ create:
lex->create_info.options= $3;
if (!(lex->et= new Event_timed())) // implicitly calls Event_timed::init()
if (!(lex->et= new(YYTHD->mem_root) Event_timed())) // implicitly calls Event_timed::init()
YYABORT;
/*
......@@ -3272,13 +3273,13 @@ create2:
| LIKE table_ident
{
LEX *lex=Lex;
if (!(lex->name= (char *)$2))
if (!(lex->like_name= $2))
YYABORT;
}
| '(' LIKE table_ident ')'
{
LEX *lex=Lex;
if (!(lex->name= (char *)$3))
if (!(lex->like_name= $3))
YYABORT;
}
;
......@@ -4712,8 +4713,8 @@ alter:
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
lex->name= 0;
lex->sql_command= SQLCOM_ALTER_TABLE;
lex->name= 0;
lex->duplicates= DUP_ERROR;
if (!lex->select_lex.add_table_to_list(thd, $4, NULL,
TL_OPTION_UPDATING))
......@@ -4722,7 +4723,8 @@ alter:
lex->key_list.empty();
lex->col_list.empty();
lex->select_lex.init_order();
lex->select_lex.db=lex->name=0;
lex->select_lex.db=lex->name= 0;
lex->like_name= 0;
bzero((char*) &lex->create_info,sizeof(lex->create_info));
lex->create_info.db_type= (handlerton*) &default_hton;
lex->create_info.default_table_charset= NULL;
......@@ -4811,7 +4813,7 @@ alter:
}
lex->spname= 0;//defensive programming
if (!(et= new Event_timed()))// implicitly calls Event_timed::init()
if (!(et= new (YYTHD->mem_root) Event_timed()))// implicitly calls Event_timed::init()
YYABORT;
lex->et = et;
......@@ -7715,7 +7717,7 @@ drop:
YYABORT;
}
if (!(lex->et= new Event_timed()))
if (!(lex->et= new (YYTHD->mem_root) Event_timed()))
YYABORT;
if (!lex->et_compile_phase)
......@@ -8439,7 +8441,7 @@ show_param:
{
Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
Lex->spname= $3;
Lex->et= new Event_timed();
Lex->et= new (YYTHD->mem_root) Event_timed();
if (!Lex->et)
YYABORT;
Lex->et->init_definer(YYTHD);
......
......@@ -6,4 +6,4 @@ ADD_DEFINITIONS("-DMYSQL_CLIENT")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_EXECUTABLE(mysql_client_test mysql_client_test.c)
TARGET_LINK_LIBRARIES(mysql_client_test dbug mysqlclient zlib wsock32)
TARGET_LINK_LIBRARIES(mysql_client_test dbug mysqlclient yassl taocrypt zlib wsock32)
Windows building readme
======================================
----------------IMPORTANT----------------------------
This readme outlines the instructions for building
MySQL for Windows staring from version 5.1.
This readme does not apply to MySQL versions 5.0
or ealier.
-----------------------------------------------------
The Windows build system uses a tool named CMake to generate build files for
a variety of project systems. This tool is combined with a set of jscript
files to enable building of MySQL for Windows directly out of a bk clone.
The steps required are below.
Step 1
------
Download and install CMake. It can be downloaded from http://www.cmake.org.
Once it is installed, modify your path to make sure you can execute
the cmake binary.
Step 2
------
Download and install bison for Windows. It can be downloaded from
http://gnuwin32.sourceforge.net/packages/bison.htm. Please download using
the link named "Complete package, excluding sources". This includes an
installer that will install bison. After the installer finishes, modify
your path so that you can execute bison.
Step 3
------
Clone your bk tree to any location you like.
Step 4
------
From the root of your bk clone, execute the command: win\configure <options>.
The options right now are WITH_INNODB and WITH_PARTITION. So the command line
would look like:
win\configure WITH_INNODB WITH_PARTITION
These are the only two flags supported right now. Others will come later.
Step 5
------
From the root of your bk clone, execute one of the batch files to generate the type
of project files you desire.
For Visual Studio 8, do win\build-vs8.
For Visual Studio 7.1, do win\build-vs71.
We will support building with nmake in the near future.
Step 6
------
From the root of your bk clone, start your build.
For Visual Studio, simply execute mysql.sln. This will start the IDE and you can
click the build solution menu option.
Current issues
--------------
1. Not all configurations are currently available. i.e. Classic, Pro, Max.
Currently, only debug and release are available. This will change in the near
future.
2. The definitions set for features (partitioning, blackhole, etc) are not
changed based on the options given with configure. This will soon be fixed
as well.
@echo off
REM - First we need to copy all the cmakelists to the proper folders
cd win\cmakefiles
call deploy.bat
cd ..\..
del cmakecache.txt
copy win\vs71cache.txt cmakecache.txt
cmake -G "Visual Studio 7 .NET 2003"
......
@echo off
REM - First we need to copy all the cmakelists to the proper folders
cd win\cmakefiles
call deploy.bat
cd ..\..
del cmakecache.txt
copy win\vs8cache.txt cmakecache.txt
cmake -G "Visual Studio 8 2005"
......
@echo off
copy base ..\..\cmakelists.txt
copy client ..\..\client\cmakelists.txt
copy dbug ..\..\dbug\cmakelists.txt
copy extra ..\..\extra\cmakelists.txt
copy mysys ..\..\mysys\cmakelists.txt
copy regex ..\..\regex\cmakelists.txt
copy sql ..\..\sql\cmakelists.txt
copy strings ..\..\strings\cmakelists.txt
copy vio ..\..\vio\cmakelists.txt
copy zlib ..\..\zlib\cmakelists.txt
copy yassl ..\..\extra\yassl\cmakelists.txt
copy taocrypt ..\..\extra\yassl\taocrypt\cmakelists.txt
copy bdb ..\..\storage\bdb\cmakelists.txt
copy heap ..\..\storage\heap\cmakelists.txt
copy innobase ..\..\storage\innobase\cmakelists.txt
copy myisam ..\..\storage\myisam\cmakelists.txt
copy myisammrg ..\..\storage\myisammrg\cmakelists.txt
copy im ..\..\server-tools\instance-manager\cmakelists.txt
copy libmysql ..\..\libmysql\cmakelists.txt
copy tests ..\..\tests\cmakelists.txt
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment