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
2d9f5f69
Commit
2d9f5f69
authored
Sep 20, 2017
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.1' into 10.2
parents
246d321f
c9e11120
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
5 deletions
+72
-5
mysql-test/r/insert.result
mysql-test/r/insert.result
+28
-0
mysql-test/t/insert.test
mysql-test/t/insert.test
+29
-0
plugin/server_audit/server_audit.c
plugin/server_audit/server_audit.c
+8
-2
sql/table.cc
sql/table.cc
+6
-2
sql/wsrep_binlog.cc
sql/wsrep_binlog.cc
+1
-1
No files found.
mysql-test/r/insert.result
View file @
2d9f5f69
...
...
@@ -717,3 +717,31 @@ insert ignore into t1 values (1,12);
Warnings:
Warning 1062 Duplicate entry '1' for key 'f1'
DROP TABLE t1;
#
# MDEV-13290 Assertion Assertion `!is_set() || (m_status == DA_OK_BULK
# && is_bulk_op())' or `! is_set()' failed
#
SET @save_mode= @@sql_mode;
SET sql_mode= 'STRICT_ALL_TABLES';
CREATE TABLE t1 (f1 INT DEFAULT 0, f2 INT);
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
REPLACE INTO v1 SET f2 = 1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
SELECT * from t1;
f1 f2
drop view v1;
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = cast('' as decimal) WITH CHECK OPTION;
REPLACE INTO v1 SET f2 = 1;
ERROR 22007: Truncated incorrect DECIMAL value: ''
SELECT * from t1;
f1 f2
drop view v1;
SELECT 0,0 INTO OUTFILE 't1.txt';
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
LOAD DATA INFILE 't1.txt' INTO TABLE v1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
SELECT * from t1;
f1 f2
drop view v1;
drop table t1;
SET @@sql_mode= @save_mode;
mysql-test/t/insert.test
View file @
2d9f5f69
...
...
@@ -573,3 +573,32 @@ insert ignore into t1 values (1,12) on duplicate key update f2=13;
set
@@
old_mode
=
""
;
insert
ignore
into
t1
values
(
1
,
12
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-13290 Assertion Assertion `!is_set() || (m_status == DA_OK_BULK
--
echo
# && is_bulk_op())' or `! is_set()' failed
--
echo
#
SET
@
save_mode
=
@@
sql_mode
;
SET
sql_mode
=
'STRICT_ALL_TABLES'
;
CREATE
TABLE
t1
(
f1
INT
DEFAULT
0
,
f2
INT
);
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
f1
,
f2
FROM
t1
WHERE
f1
=
'x'
WITH
CHECK
OPTION
;
--
error
ER_TRUNCATED_WRONG_VALUE
REPLACE
INTO
v1
SET
f2
=
1
;
SELECT
*
from
t1
;
drop
view
v1
;
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
f1
,
f2
FROM
t1
WHERE
f1
=
cast
(
''
as
decimal
)
WITH
CHECK
OPTION
;
--
error
ER_TRUNCATED_WRONG_VALUE
REPLACE
INTO
v1
SET
f2
=
1
;
SELECT
*
from
t1
;
drop
view
v1
;
SELECT
0
,
0
INTO
OUTFILE
't1.txt'
;
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
f1
,
f2
FROM
t1
WHERE
f1
=
'x'
WITH
CHECK
OPTION
;
--
error
ER_TRUNCATED_WRONG_VALUE
LOAD
DATA
INFILE
't1.txt'
INTO
TABLE
v1
;
SELECT
*
from
t1
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
remove_file
$MYSQLD_DATADIR
/
test
/
t1
.
txt
;
drop
view
v1
;
drop
table
t1
;
SET
@@
sql_mode
=
@
save_mode
;
plugin/server_audit/server_audit.c
View file @
2d9f5f69
...
...
@@ -15,7 +15,7 @@
#define PLUGIN_VERSION 0x104
#define PLUGIN_STR_VERSION "1.4.
1
"
#define PLUGIN_STR_VERSION "1.4.
2
"
#define _my_thread_var loc_thread_var
...
...
@@ -1089,6 +1089,7 @@ static void setup_connection_connect(struct connection_info *cn,
const
struct
mysql_event_connection
*
event
)
{
cn
->
query_id
=
0
;
cn
->
query_length
=
0
;
cn
->
log_always
=
0
;
cn
->
thread_id
=
event
->
thread_id
;
get_str_n
(
cn
->
db
,
&
cn
->
db_length
,
sizeof
(
cn
->
db
),
...
...
@@ -1130,6 +1131,7 @@ static void setup_connection_initdb(struct connection_info *cn,
cn
->
thread_id
=
event
->
general_thread_id
;
cn
->
query_id
=
0
;
cn
->
query_length
=
0
;
cn
->
log_always
=
0
;
get_str_n
(
cn
->
db
,
&
cn
->
db_length
,
sizeof
(
cn
->
db
),
event
->
general_query
,
event
->
general_query_length
);
...
...
@@ -1162,6 +1164,7 @@ static void setup_connection_table(struct connection_info *cn,
cn
->
thread_id
=
event
->
thread_id
;
cn
->
query_id
=
query_counter
++
;
cn
->
log_always
=
0
;
cn
->
query_length
=
0
;
get_str_n
(
cn
->
db
,
&
cn
->
db_length
,
sizeof
(
cn
->
db
),
event
->
database
,
event
->
database_length
);
get_str_n
(
cn
->
user
,
&
cn
->
user_length
,
sizeof
(
cn
->
db
),
...
...
@@ -1183,6 +1186,7 @@ static void setup_connection_query(struct connection_info *cn,
cn
->
thread_id
=
event
->
general_thread_id
;
cn
->
query_id
=
query_counter
++
;
cn
->
log_always
=
0
;
cn
->
query_length
=
0
;
get_str_n
(
cn
->
db
,
&
cn
->
db_length
,
sizeof
(
cn
->
db
),
""
,
0
);
if
(
get_user_host
(
event
->
general_user
,
event
->
general_user_length
,
...
...
@@ -2007,6 +2011,7 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
event_query_command
(
event
))
{
log_statement
(
cn
,
event
,
"QUERY"
);
cn
->
query_length
=
0
;
/* So the log_current_query() won't log this again. */
}
}
else
if
(
event_class
==
MYSQL_AUDIT_TABLE_CLASS
&&
FILTER
(
EVENT_TABLE
)
&&
cn
)
...
...
@@ -2522,7 +2527,8 @@ static void log_current_query(MYSQL_THD thd)
if
(
!
thd
)
return
;
cn
=
get_loc_info
(
thd
);
if
(
!
ci_needs_setup
(
cn
)
&&
FILTER
(
EVENT_QUERY
)
&&
do_log_user
(
cn
->
user
))
if
(
!
ci_needs_setup
(
cn
)
&&
cn
->
query_length
&&
FILTER
(
EVENT_QUERY
)
&&
do_log_user
(
cn
->
user
))
{
log_statement_ex
(
cn
,
cn
->
query_time
,
thd_get_thread_id
(
thd
),
cn
->
query
,
cn
->
query_length
,
0
,
"QUERY"
);
...
...
sql/table.cc
View file @
2d9f5f69
...
...
@@ -5078,7 +5078,11 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
name_db
,
name_table
);
return
ignore_failure
?
VIEW_CHECK_SKIP
:
VIEW_CHECK_ERROR
;
}
return
table
->
verify_constraints
(
ignore_failure
);
int
result
=
table
->
verify_constraints
(
ignore_failure
);
/* We check thd->error() because it can be set by conversion problem. */
if
(
thd
->
is_error
())
return
(
VIEW_CHECK_ERROR
);
return
result
;
}
...
...
@@ -5100,7 +5104,7 @@ int TABLE::verify_constraints(bool ignore_failure)
}
}
}
return
VIEW_CHECK_OK
;
return
(
VIEW_CHECK_OK
)
;
}
...
...
sql/wsrep_binlog.cc
View file @
2d9f5f69
...
...
@@ -452,7 +452,7 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
File
file
;
IO_CACHE
cache
;
Log_event_writer
writer
(
&
cache
);
Format_description_log_event
*
ev
;
Format_description_log_event
*
ev
=
NULL
;
int
len
=
my_snprintf
(
filename
,
PATH_MAX
,
"%s/GRA_%lld_%lld_v2.log"
,
wsrep_data_home_dir
,
(
longlong
)
thd
->
thread_id
,
...
...
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