Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8d4871a9
Commit
8d4871a9
authored
Apr 06, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.0 into 10.1
parents
cd494f4c
57a699b0
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
454 additions
and
48 deletions
+454
-48
cmake/plugin.cmake
cmake/plugin.cmake
+8
-1
mysql-test/r/view.result
mysql-test/r/view.result
+37
-0
mysql-test/suite/innodb/r/innodb-alter-debug.result
mysql-test/suite/innodb/r/innodb-alter-debug.result
+56
-0
mysql-test/suite/innodb/r/innodb-alter-nullable.result
mysql-test/suite/innodb/r/innodb-alter-nullable.result
+53
-0
mysql-test/suite/innodb/t/innodb-alter-debug.test
mysql-test/suite/innodb/t/innodb-alter-debug.test
+79
-0
mysql-test/suite/innodb/t/innodb-alter-nullable.test
mysql-test/suite/innodb/t/innodb-alter-nullable.test
+76
-0
mysql-test/t/view.test
mysql-test/t/view.test
+38
-0
sql/CMakeLists.txt
sql/CMakeLists.txt
+61
-22
sql/item.cc
sql/item.cc
+0
-13
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+0
-1
storage/xtradb/btr/btr0cur.cc
storage/xtradb/btr/btr0cur.cc
+5
-5
storage/xtradb/handler/handler0alter.cc
storage/xtradb/handler/handler0alter.cc
+0
-1
win/create_def_file.js
win/create_def_file.js
+41
-5
No files found.
cmake/plugin.cmake
View file @
8d4871a9
...
...
@@ -201,9 +201,16 @@ MACRO(MYSQL_ADD_PLUGIN)
# executable to the linker command line (it would result into link error).
# Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
# an additional dependency.
IF
(
NOT CMAKE_SYSTEM_NAME STREQUAL
"Linux"
AND NOT ARG_CLIENT
)
IF
(
MSVC
)
ADD_DEPENDENCIES
(
${
target
}
gen_mysqld_lib
)
TARGET_LINK_LIBRARIES
(
${
target
}
mysqld_import_lib
)
ELSEIF
(
NOT CMAKE_SYSTEM_NAME STREQUAL
"Linux"
)
TARGET_LINK_LIBRARIES
(
${
target
}
mysqld
)
ENDIF
()
IF
(
ARG_LINK_LIBRARIES
)
TARGET_LINK_LIBRARIES
(
${
target
}
${
ARG_LINK_LIBRARIES
}
)
ENDIF
()
ADD_DEPENDENCIES
(
${
target
}
GenError
${
ARG_DEPENDENCIES
}
)
SET_TARGET_PROPERTIES
(
${
target
}
PROPERTIES
...
...
mysql-test/r/view.result
View file @
8d4871a9
...
...
@@ -5939,6 +5939,43 @@ a
2
DROP VIEW v1;
DROP TABLE t1;
#
# MDEV-8642: WHERE Clause not applied on View - Empty result set returned
#
CREATE TABLE `t1` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`use_case` int(11) DEFAULT NULL,
`current_deadline` date DEFAULT NULL,
`ts_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13976 DEFAULT CHARSET=latin1;
INSERT INTO `t1` VALUES (1,10,'2015-12-18','2015-08-18 08:38:16');
INSERT INTO `t1` VALUES (2,20,'2015-10-18','2015-08-18 08:43:30');
CREATE VIEW v1 AS SELECT
use_case as use_case_id,
(
SELECT
deadline_sub.current_deadline
FROM
t1 deadline_sub
WHERE
deadline_sub.use_case = use_case_id
AND ts_create = (SELECT
MIN(ts_create)
FROM
t1 startdate_sub
WHERE
startdate_sub.use_case = use_case_id
)
) AS InitialDeadline
FROM
t1;
SELECT * FROM v1 where use_case_id = 10;
use_case_id InitialDeadline
10 2015-12-18
drop view v1;
drop table t1;
# -----------------------------------------------------------------
# -- End of 10.0 tests.
# -----------------------------------------------------------------
...
...
mysql-test/suite/innodb/r/innodb-alter-debug.result
0 → 100644
View file @
8d4871a9
SET NAMES utf8;
CREATE TABLE ① (
c1 INT PRIMARY KEY, c2 INT DEFAULT 1, ct TEXT, INDEX(c2))
ENGINE = InnoDB;
CREATE TABLE t1ć (c1 INT PRIMARY KEY, c2 INT, INDEX(c2),
CONSTRAINT t1c2 FOREIGN KEY (c2) REFERENCES ①(c2))
ENGINE=InnoDB;
INSERT INTO ① SET c1 = 1;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG = '+d,ib_drop_foreign_error';
ALTER TABLE t1ć DROP FOREIGN KEY t1c2, RENAME TO ②;
ERROR HY000: The table 't1ć' is full
SET DEBUG_DBUG = @saved_debug_dbug;
SET DEBUG_DBUG = '+d,ib_rename_column_error';
ALTER TABLE ① CHANGE c2 š INT;
ERROR HY000: The table '①' is full
SET DEBUG_DBUG = @saved_debug_dbug;
SHOW CREATE TABLE t1ć;
Table Create Table
t1ć CREATE TABLE `t1ć` (
`c1` int(11) NOT NULL,
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `c2` (`c2`),
CONSTRAINT `t1c2` FOREIGN KEY (`c2`) REFERENCES `①` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1ć, ①;
#
# Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
# WITH INCORRECT KEY NAME
create table t1 (id int auto_increment primary key, a int, unique key uk(a))
engine = innodb;
insert into t1 select 1, 1;
insert into t1 select 2, 2;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
alter table t1 add b int, ALGORITHM=inplace;
/* connection con1 */
SET DEBUG_SYNC = 'now WAIT_FOR s1';
insert into t1 select NULL, 1;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'now SIGNAL s2';
/* connection default */
/* reap */ alter table t1 add b int, ALGORITHM=inplace;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
alter table t1 add b int, ALGORITHM=inplace;;
/* connection con1 */
set DEBUG_SYNC = 'now WAIT_FOR s1';
update t1 set a=1 where id=2;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'now SIGNAL s2';
/* connection default */
/* reap */ alter table t1 add b int, ALGORITHM=inplace;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'RESET';
drop table t1;
mysql-test/suite/innodb/r/innodb-alter-nullable.result
0 → 100644
View file @
8d4871a9
CREATE TABLE t (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 INT) ENGINE=InnoDB;
INSERT INTO t VALUES (1,2,3),(4,5,6),(7,8,9);
ALTER TABLE t CHANGE c1 c1 INT NULL FIRST, ALGORITHM=INPLACE;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
set @old_sql_mode = @@sql_mode;
set @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t MODIFY c3 INT NOT NULL, ALGORITHM=INPLACE;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
set @@sql_mode = @old_sql_mode;
ALTER TABLE t CHANGE c2 c2 INT, CHANGE c2 c2 INT NOT NULL;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t MODIFY c2 INT, MODIFY c2 INT NOT NULL;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t MODIFY c2 INT UNSIGNED, MODIFY c2 INT;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t MODIFY c2 CHAR(1) NOT NULL, MODIFY c2 INT NOT NULL;
ERROR 42S22: Unknown column 'c2' in 't'
ALTER TABLE t CHANGE c2 c2 INT NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t MODIFY c2 INT NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SET SQL_MODE='STRICT_ALL_TABLES';
UPDATE t SET c2=NULL;
ERROR 23000: Column 'c2' cannot be null
SELECT * FROM t;
c1 c2 c3
1 2 3
4 5 6
7 8 9
ALTER TABLE t MODIFY c2 INT, ALGORITHM=INPLACE;
BEGIN;
UPDATE t SET c2=NULL;
SELECT * FROM t;
c1 c2 c3
1 NULL 3
4 NULL 6
7 NULL 9
ROLLBACK;
SELECT * FROM t;
c1 c2 c3
1 2 3
4 5 6
7 8 9
ALTER TABLE t MODIFY c2 INT NULL, ALGORITHM=INPLACE;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE NAME='test/t';
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE
# test/t 1 6 # Antelope Compact 0
DROP TABLE t;
mysql-test/suite/innodb/t/innodb-alter-debug.test
0 → 100644
View file @
8d4871a9
--
source
include
/
have_innodb
.
inc
--
source
include
/
have_debug
.
inc
--
source
include
/
have_debug_sync
.
inc
--
source
include
/
count_sessions
.
inc
SET
NAMES
utf8
;
CREATE
TABLE
①
(
c1
INT
PRIMARY
KEY
,
c2
INT
DEFAULT
1
,
ct
TEXT
,
INDEX
(
c2
))
ENGINE
=
InnoDB
;
CREATE
TABLE
t1ć
(
c1
INT
PRIMARY
KEY
,
c2
INT
,
INDEX
(
c2
),
CONSTRAINT
t1c2
FOREIGN
KEY
(
c2
)
REFERENCES
①
(
c2
))
ENGINE
=
InnoDB
;
INSERT
INTO
①
SET
c1
=
1
;
SET
@
saved_debug_dbug
=
@@
SESSION
.
debug_dbug
;
SET
DEBUG_DBUG
=
'+d,ib_drop_foreign_error'
;
--
error
ER_RECORD_FILE_FULL
ALTER
TABLE
t1ć
DROP
FOREIGN
KEY
t1c2
,
RENAME
TO
②
;
SET
DEBUG_DBUG
=
@
saved_debug_dbug
;
SET
DEBUG_DBUG
=
'+d,ib_rename_column_error'
;
--
error
ER_RECORD_FILE_FULL
ALTER
TABLE
①
CHANGE
c2
š
INT
;
SET
DEBUG_DBUG
=
@
saved_debug_dbug
;
SHOW
CREATE
TABLE
t1ć
;
DROP
TABLE
t1ć
,
①
;
--
echo
#
--
echo
# Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
--
echo
# WITH INCORRECT KEY NAME
create
table
t1
(
id
int
auto_increment
primary
key
,
a
int
,
unique
key
uk
(
a
))
engine
=
innodb
;
insert
into
t1
select
1
,
1
;
insert
into
t1
select
2
,
2
;
SET
DEBUG_SYNC
=
'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2'
;
--
send
alter
table
t1
add
b
int
,
ALGORITHM
=
inplace
--
echo
/* connection con1 */
connect
(
con1
,
localhost
,
root
,,);
SET
DEBUG_SYNC
=
'now WAIT_FOR s1'
;
--
error
ER_DUP_ENTRY
insert
into
t1
select
NULL
,
1
;
SET
DEBUG_SYNC
=
'now SIGNAL s2'
;
--
echo
/* connection default */
connection
default
;
--
echo
/* reap */
alter
table
t1
add
b
int
,
ALGORITHM
=
inplace
;
--
error
ER_DUP_ENTRY
--
reap
SET
DEBUG_SYNC
=
'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2'
;
--
send
alter
table
t1
add
b
int
,
ALGORITHM
=
inplace
;
--
echo
/* connection con1 */
connection
con1
;
set
DEBUG_SYNC
=
'now WAIT_FOR s1'
;
--
error
ER_DUP_ENTRY
update
t1
set
a
=
1
where
id
=
2
;
SET
DEBUG_SYNC
=
'now SIGNAL s2'
;
disconnect
con1
;
--
echo
/* connection default */
connection
default
;
--
echo
/* reap */
alter
table
t1
add
b
int
,
ALGORITHM
=
inplace
;
--
error
ER_DUP_ENTRY
--
reap
SET
DEBUG_SYNC
=
'RESET'
;
drop
table
t1
;
# Wait till all disconnects are completed
--
source
include
/
wait_until_count_sessions
.
inc
mysql-test/suite/innodb/t/innodb-alter-nullable.test
0 → 100644
View file @
8d4871a9
--
source
include
/
have_innodb
.
inc
# Save the initial number of concurrent sessions.
--
source
include
/
count_sessions
.
inc
CREATE
TABLE
t
(
c1
INT
PRIMARY
KEY
,
c2
INT
NOT
NULL
,
c3
INT
)
ENGINE
=
InnoDB
;
INSERT
INTO
t
VALUES
(
1
,
2
,
3
),(
4
,
5
,
6
),(
7
,
8
,
9
);
--
enable_info
# This one will be a no-op.
# MySQL should perhaps issue an error, because it refuses to modify
# the PRIMARY KEY column c1 from NOT NULL to NULL.
ALTER
TABLE
t
CHANGE
c1
c1
INT
NULL
FIRST
,
ALGORITHM
=
INPLACE
;
# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
--
disable_info
set
@
old_sql_mode
=
@@
sql_mode
;
set
@@
sql_mode
=
'STRICT_TRANS_TABLES'
;
--
enable_info
ALTER
TABLE
t
MODIFY
c3
INT
NOT
NULL
,
ALGORITHM
=
INPLACE
;
--
disable_info
set
@@
sql_mode
=
@
old_sql_mode
;
--
enable_info
# Request some conflicting changes for a single column.
--
error
ER_BAD_FIELD_ERROR
ALTER
TABLE
t
CHANGE
c2
c2
INT
,
CHANGE
c2
c2
INT
NOT
NULL
;
--
error
ER_BAD_FIELD_ERROR
ALTER
TABLE
t
MODIFY
c2
INT
,
MODIFY
c2
INT
NOT
NULL
;
--
error
ER_BAD_FIELD_ERROR
ALTER
TABLE
t
MODIFY
c2
INT
UNSIGNED
,
MODIFY
c2
INT
;
--
error
ER_BAD_FIELD_ERROR
ALTER
TABLE
t
MODIFY
c2
CHAR
(
1
)
NOT
NULL
,
MODIFY
c2
INT
NOT
NULL
;
# No-ops.
ALTER
TABLE
t
CHANGE
c2
c2
INT
NOT
NULL
;
ALTER
TABLE
t
MODIFY
c2
INT
NOT
NULL
;
--
disable_info
connect
(
con1
,
localhost
,
root
,,);
connection
con1
;
SET
SQL_MODE
=
'STRICT_ALL_TABLES'
;
--
error
ER_BAD_NULL_ERROR
UPDATE
t
SET
c2
=
NULL
;
SELECT
*
FROM
t
;
connection
default
;
# This should change the column to NULL.
ALTER
TABLE
t
MODIFY
c2
INT
,
ALGORITHM
=
INPLACE
;
connection
con1
;
BEGIN
;
UPDATE
t
SET
c2
=
NULL
;
SELECT
*
FROM
t
;
ROLLBACK
;
SELECT
*
FROM
t
;
disconnect
con1
;
connection
default
;
# This should be no-op.
ALTER
TABLE
t
MODIFY
c2
INT
NULL
,
ALGORITHM
=
INPLACE
;
--
replace_column
1
# 5 #
SELECT
*
FROM
INFORMATION_SCHEMA
.
INNODB_SYS_TABLES
WHERE
NAME
=
'test/t'
;
DROP
TABLE
t
;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--
source
include
/
wait_until_count_sessions
.
inc
mysql-test/t/view.test
View file @
8d4871a9
...
...
@@ -5787,6 +5787,44 @@ DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # MDEV-8642: WHERE Clause not applied on View - Empty result set returned
--echo #
CREATE TABLE `
t1
` (
`
id
` int(20) NOT NULL AUTO_INCREMENT,
`
use_case
` int(11) DEFAULT NULL,
`
current_deadline
` date DEFAULT NULL,
`
ts_create
` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`
id
`),
UNIQUE KEY `
id_UNIQUE
` (`
id
`)
) ENGINE=MyISAM AUTO_INCREMENT=13976 DEFAULT CHARSET=latin1;
INSERT INTO `
t1
` VALUES (1,10,'2015-12-18','2015-08-18 08:38:16');
INSERT INTO `
t1
` VALUES (2,20,'2015-10-18','2015-08-18 08:43:30');
CREATE VIEW v1 AS SELECT
use_case as use_case_id,
(
SELECT
deadline_sub.current_deadline
FROM
t1 deadline_sub
WHERE
deadline_sub.use_case = use_case_id
AND ts_create = (SELECT
MIN(ts_create)
FROM
t1 startdate_sub
WHERE
startdate_sub.use_case = use_case_id
)
) AS InitialDeadline
FROM
t1;
SELECT * FROM v1 where use_case_id = 10;
drop view v1;
drop table t1;
--echo # -----------------------------------------------------------------
--echo # -- End of 10.0 tests.
...
...
sql/CMakeLists.txt
View file @
8d4871a9
...
...
@@ -68,7 +68,6 @@ ENDIF()
ADD_CUSTOM_COMMAND
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/lex_token.h
COMMAND gen_lex_token > lex_token.h
DEPENDS gen_lex_token
)
ADD_DEFINITIONS
(
-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER
)
...
...
@@ -178,6 +177,63 @@ ELSE()
SET
(
MYSQLD_SOURCE main.cc
${
DTRACE_PROBES_ALL
}
)
ENDIF
()
IF
(
MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS
)
# mysqld.exe must to export symbols from some specific libs.
# These symbols are used by dynamic plugins, that "link" to mysqld.
#
# To do that, we
#
# 1. Generate mysqld_lib.def text file with all symbols from static
# libraries mysys, dbug, strings, sql.
# 2. Then we call
# lib.exe /DEF:mysqld_lib.def ...
# to create import library mysqld_lib.lib and export library mysqld_lib.exp
# 3. mysqld.exe links with mysqld_lib.exp (exporting symbols)
# 4. plugins link with mysqld_lib.lib (importing symbols)
#
# We do not not regenerate .def, .lib and .exp
# without necessity.E.g source modifications, that do not
# change list of exported symbols, will not result in a relink for plugins.
SET
(
MYSQLD_DEF
${
CMAKE_CURRENT_BINARY_DIR
}
/mysqld_lib.def
)
SET
(
MYSQLD_EXP
${
CMAKE_CURRENT_BINARY_DIR
}
/mysqld_lib.exp
)
SET
(
MYSQLD_LIB
${
CMAKE_CURRENT_BINARY_DIR
}
/mysqld_lib.lib
)
SET
(
MYSQLD_CORELIBS sql mysys mysys_ssl dbug strings
)
FOREACH
(
CORELIB
${
MYSQLD_CORELIBS
}
)
GET_TARGET_PROPERTY
(
LOC
${
CORELIB
}
LOCATION
)
FILE
(
TO_NATIVE_PATH
${
LOC
}
LOC
)
SET
(
LIB_LOCATIONS
${
LIB_LOCATIONS
}
${
LOC
}
)
ENDFOREACH
(
CORELIB
)
SET
(
_PLATFORM x86
)
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
_PLATFORM x64
)
ENDIF
()
ADD_CUSTOM_COMMAND
(
OUTPUT
${
MYSQLD_DEF
}
COMMAND cscript ARGS //nologo
${
PROJECT_SOURCE_DIR
}
/win/create_def_file.js
${
_PLATFORM
}
/forLib
${
LIB_LOCATIONS
}
> mysqld_lib.def.tmp
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different mysqld_lib.def.tmp mysqld_lib.def
COMMAND
${
CMAKE_COMMAND
}
-E remove mysqld_lib.def.tmp
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS
${
MYSQLD_CORELIBS
}
)
ADD_CUSTOM_COMMAND
(
OUTPUT
${
MYSQLD_LIB
}
COMMAND lib
ARGS /NAME:mysqld.exe
"/DEF:
${
MYSQLD_DEF
}
"
"/MACHINE:
${
_PLATFORM
}
"
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS
${
MYSQLD_DEF
}
)
ADD_CUSTOM_TARGET
(
gen_mysqld_lib DEPENDS
${
MYSQLD_LIB
}
)
ADD_LIBRARY
(
mysqld_import_lib UNKNOWN IMPORTED GLOBAL
)
SET_TARGET_PROPERTIES
(
mysqld_import_lib PROPERTIES IMPORTED_LOCATION
${
MYSQLD_LIB
}
)
ENDIF
()
MYSQL_ADD_EXECUTABLE
(
mysqld
${
MYSQLD_SOURCE
}
DESTINATION
${
INSTALL_SBINDIR
}
COMPONENT Server
)
IF
(
APPLE
)
...
...
@@ -198,25 +254,9 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
SET_TARGET_PROPERTIES
(
mysqld PROPERTIES LINK_FLAGS
"
${
mysqld_link_flags
}
-Wl,--export-all-symbols"
)
ENDIF
()
IF
(
MSVC
)
# Set module definition file. Also use non-incremental linker,
# incremental appears to crash from time to time,if used with /DEF option
SET_TARGET_PROPERTIES
(
mysqld PROPERTIES LINK_FLAGS
"
${
mysqld_link_flags
}
/DEF:mysqld.def /INCREMENTAL:NO"
)
FOREACH
(
CORELIB sql mysys mysys_ssl dbug strings
)
GET_TARGET_PROPERTY
(
LOC
${
CORELIB
}
LOCATION
)
FILE
(
TO_NATIVE_PATH
${
LOC
}
LOC
)
SET
(
LIB_LOCATIONS
${
LIB_LOCATIONS
}
${
LOC
}
)
ENDFOREACH
(
CORELIB
${
MYSQLD_CORE_LIBS
}
)
SET
(
_PLATFORM x86
)
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
_PLATFORM x64
)
ENDIF
()
ADD_CUSTOM_COMMAND
(
TARGET mysqld PRE_LINK
COMMAND echo
${
_PLATFORM
}
&& cscript ARGS //nologo
${
PROJECT_SOURCE_DIR
}
/win/create_def_file.js
${
_PLATFORM
}
${
LIB_LOCATIONS
}
> mysqld.def
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
ADD_DEPENDENCIES
(
sql GenError
)
ENDIF
(
MSVC
)
SET_TARGET_PROPERTIES
(
mysqld PROPERTIES LINK_FLAGS
"
${
mysqld_link_flags
}
\"
${
MYSQLD_EXP
}
\"
"
)
ADD_DEPENDENCIES
(
mysqld gen_mysqld_lib
)
ENDIF
()
ENDIF
(
NOT WITHOUT_DYNAMIC_PLUGINS
)
SET_TARGET_PROPERTIES
(
mysqld PROPERTIES ENABLE_EXPORTS TRUE
)
...
...
@@ -282,7 +322,6 @@ ENDIF()
ADD_CUSTOM_COMMAND
(
OUTPUT
${
CMAKE_CURRENT_BINARY_DIR
}
/lex_hash.h
COMMAND gen_lex_hash > lex_hash.h
DEPENDS gen_lex_hash
)
MYSQL_ADD_EXECUTABLE
(
mysql_tzinfo_to_sql tztime.cc COMPONENT Server
)
...
...
@@ -407,7 +446,7 @@ IF(WIN32)
${
CMAKE_CURRENT_BINARY_DIR
}
/my_bootstrap.sql
mysql_bootstrap_sql.c
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS
comp_sql
${
my_bootstrap_sql
}
DEPENDS
${
my_bootstrap_sql
}
)
MYSQL_ADD_EXECUTABLE
(
mysql_install_db
...
...
sql/item.cc
View file @
8d4871a9
...
...
@@ -7100,19 +7100,6 @@ bool Item_ref::fix_fields(THD *thd, Item **reference)
last_checked_context
->
select_lex
->
nest_level
);
}
}
else
if
(
ref_type
()
!=
VIEW_REF
)
{
/*
It could be that we're referring to something that's in ancestor selects.
We must make an appropriate mark_as_dependent() call for each such
outside reference.
*/
Dependency_marker
dep_marker
;
dep_marker
.
current_select
=
current_sel
;
dep_marker
.
thd
=
thd
;
(
*
ref
)
->
walk
(
&
Item
::
enumerate_field_refs_processor
,
FALSE
,
(
uchar
*
)
&
dep_marker
);
}
DBUG_ASSERT
(
*
ref
);
/*
...
...
storage/innobase/handler/handler0alter.cc
View file @
8d4871a9
...
...
@@ -130,7 +130,6 @@ my_error_innodb(
break
;
case
DB_OUT_OF_FILE_SPACE
:
my_error
(
ER_RECORD_FILE_FULL
,
MYF
(
0
),
table
);
ut_error
;
break
;
case
DB_TEMP_FILE_WRITE_FAILURE
:
my_error
(
ER_GET_ERRMSG
,
MYF
(
0
),
...
...
storage/xtradb/btr/btr0cur.cc
View file @
8d4871a9
...
...
@@ -3948,7 +3948,7 @@ static const unsigned rows_in_range_max_retries = 4;
/** We pretend that a range has that many records if the tree keeps changing
for rows_in_range_max_retries retries while we try to estimate the records
in a given range. */
static
const
int64_t
rows_in_range_arbitrary_ret_val
=
10
;
static
const
i
b_i
nt64_t
rows_in_range_arbitrary_ret_val
=
10
;
/** Estimates the number of rows in a given index range.
@param[in] index index
...
...
@@ -3966,7 +3966,7 @@ rows_in_range_arbitrary_ret_val as a result (if
nth_attempt >= rows_in_range_max_retries and the tree is modified between
the two dives). */
static
int64_t
i
b_i
nt64_t
btr_estimate_n_rows_in_range_low
(
dict_index_t
*
index
,
const
dtuple_t
*
tuple1
,
...
...
@@ -4102,7 +4102,7 @@ btr_estimate_n_rows_in_range_low(
return
(
rows_in_range_arbitrary_ret_val
);
}
const
int64_t
ret
=
const
i
b_i
nt64_t
ret
=
btr_estimate_n_rows_in_range_low
(
index
,
tuple1
,
mode1
,
tuple2
,
mode2
,
trx
,
...
...
@@ -4168,7 +4168,7 @@ btr_estimate_n_rows_in_range_low(
@param[in] mode2 search mode for range end
@param[in] trx trx
@return estimated number of rows */
int64_t
i
b_i
nt64_t
btr_estimate_n_rows_in_range
(
dict_index_t
*
index
,
const
dtuple_t
*
tuple1
,
...
...
@@ -4177,7 +4177,7 @@ btr_estimate_n_rows_in_range(
ulint
mode2
,
trx_t
*
trx
)
{
const
int64_t
ret
=
btr_estimate_n_rows_in_range_low
(
const
i
b_i
nt64_t
ret
=
btr_estimate_n_rows_in_range_low
(
index
,
tuple1
,
mode1
,
tuple2
,
mode2
,
trx
,
1
/* first attempt */
);
...
...
storage/xtradb/handler/handler0alter.cc
View file @
8d4871a9
...
...
@@ -134,7 +134,6 @@ my_error_innodb(
break
;
case
DB_OUT_OF_FILE_SPACE
:
my_error
(
ER_RECORD_FILE_FULL
,
MYF
(
0
),
table
);
ut_error
;
break
;
case
DB_TEMP_FILE_WRITE_FAILURE
:
my_error
(
ER_GET_ERRMSG
,
MYF
(
0
),
...
...
win/create_def_file.js
View file @
8d4871a9
...
...
@@ -54,6 +54,22 @@ var is64 = args.Item(0).toLowerCase() == "x64";
var
shell
=
new
ActiveXObject
(
"
WScript.Shell
"
);
var
fso
=
new
ActiveXObject
(
"
Scripting.FileSystemObject
"
);
/*
If .def file is used with together with lib.exe
the name mangling for stdcall is slightly different.
Undescore prefix for stdcall function name must be removed for
lib.exe but not link.exe (see ScrubSymbol())
This difference is not documented anywhere and could
be a bug in compiler tools.
We use a parameter /forLib, if the resulting .def file is used
with lib.exe .
*/
var
forLib
=
false
;
OutputSymbols
(
CollectSymbols
());
...
...
@@ -62,8 +78,8 @@ function OutputSymbols(symbols)
{
var
out
=
WScript
.
StdOut
;
out
.
WriteLine
(
"
EXPORTS
"
);
for
(
var
sym
in
symbols
)
out
.
WriteLine
(
sym
);
for
(
var
i
=
0
;
i
<
symbols
.
length
;
i
++
)
out
.
WriteLine
(
sym
bols
[
i
]
);
}
function
echo
(
message
)
...
...
@@ -72,9 +88,10 @@ function echo(message)
}
// Extract global symbol names and type from objects
// Returns string array with symbol names
function
CollectSymbols
()
{
var
uniqueSymbols
=
new
Array
();
var
uniqueSymbols
=
new
Object
();
try
{
...
...
@@ -146,7 +163,19 @@ function CollectSymbols()
uniqueSymbols
[
symbol
]
=
1
;
}
fso
.
DeleteFile
(
rspfilename
);
return
uniqueSymbols
;
// Sort symbols names
var
keys
=
[];
var
sorted
=
{};
for
(
key
in
uniqueSymbols
)
{
if
(
uniqueSymbols
.
hasOwnProperty
(
key
))
{
keys
.
push
(
key
);
}
}
keys
.
sort
();
return
keys
;
}
// performs necessary cleanup on the symbol name
...
...
@@ -156,6 +185,9 @@ function ScrubSymbol(symbol)
if
(
symbol
.
charAt
(
0
)
!=
"
_
"
)
return
symbol
;
if
(
forLib
)
return
symbol
.
substring
(
1
,
symbol
.
length
);
var
atSign
=
symbol
.
indexOf
(
"
@
"
);
if
(
atSign
!=
-
1
)
{
...
...
@@ -189,7 +221,11 @@ function CreateResponseFile(filename)
var
index
=
1
;
for
(;
index
<
args
.
length
;
index
++
)
{
addToResponseFile
(
args
.
Item
(
index
),
responseFile
);
var
param
=
args
.
Item
(
index
);
if
(
param
==
"
/forLib
"
)
forLib
=
true
;
else
addToResponseFile
(
args
.
Item
(
index
),
responseFile
);
}
responseFile
.
Close
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment