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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1704783e
Commit
1704783e
authored
Jun 21, 2010
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.1-bugteam->trunk-merge merge
parents
100f88b8
b36a0282
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
552 additions
and
20 deletions
+552
-20
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+38
-0
mysql-test/std_data/intersect-bug50389.tsv
mysql-test/std_data/intersect-bug50389.tsv
+441
-0
mysql-test/suite/binlog/r/binlog_base64_flag.result
mysql-test/suite/binlog/r/binlog_base64_flag.result
+11
-0
mysql-test/suite/binlog/t/binlog_base64_flag.test
mysql-test/suite/binlog/t/binlog_base64_flag.test
+13
-0
mysql-test/t/innodb_mysql.test
mysql-test/t/innodb_mysql.test
+31
-0
scripts/make_binary_distribution.sh
scripts/make_binary_distribution.sh
+5
-3
sql/opt_range.cc
sql/opt_range.cc
+1
-0
sql/sql_binlog.cc
sql/sql_binlog.cc
+12
-17
No files found.
mysql-test/r/innodb_mysql.result
View file @
1704783e
...
...
@@ -2422,6 +2422,44 @@ ENGINE=InnoDB;
INSERT INTO t1 VALUES (0, 77, 1, 3);
UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
DROP TABLE t1;
#
# Bug#50389 Using intersect does not return all rows
#
CREATE TABLE t1 (
f1 INT(10) NOT NULL,
f2 INT(10),
f3 INT(10),
f4 TINYINT(4),
f5 VARCHAR(50),
PRIMARY KEY (f1),
KEY idx1 (f2,f5,f4),
KEY idx2 (f2,f4)
) ENGINE=InnoDB;
LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
SELECT * FROM t1 WHERE f1 IN
(3305028,3353871,3772880,3346860,4228206,3336022,
3470988,3305175,3329875,3817277,3856380,3796193,
3784744,4180925,4559596,3963734,3856391,4494153)
AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
f1 f2 f3 f4 f5
3305175 1221457 0 0 abcdefghijklmnopwrst
3329875 1221457 1382427 0 abcdefghijklmnopwrst
3336022 1221457 0 0 abcdefghijklmnopwrst
3346860 1221457 0 0 abcdefghijklmnopwrst
3772880 1221457 0 0 abcdefghijklmnopwrst
3784744 1221457 1382427 0 abcdefghijklmnopwrst
3796193 1221457 0 0 abcdefghijklmnopwrst
4228206 1221457 0 0 abcdefghijklmnopwrst
4494153 1221457 0 0 abcdefghijklmnopwrst
4559596 1221457 0 0 abcdefghijklmnopwrst
EXPLAIN SELECT * FROM t1 WHERE f1 IN
(3305028,3353871,3772880,3346860,4228206,3336022,
3470988,3305175,3329875,3817277,3856380,3796193,
3784744,4180925,4559596,3963734,3856391,4494153)
AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,idx1,idx2 idx2,idx1,PRIMARY 7,60,4 NULL 1 Using intersect(idx2,idx1,PRIMARY); Using where
DROP TABLE t1;
End of 5.1 tests
#
# Test for bug #39932 "create table fails if column for FK is in different
...
...
mysql-test/std_data/intersect-bug50389.tsv
0 → 100644
View file @
1704783e
This diff is collapsed.
Click to expand it.
mysql-test/suite/binlog/r/binlog_base64_flag.result
View file @
1704783e
...
...
@@ -91,3 +91,14 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
';
ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
drop table t1, char63_utf8, char128_utf8;
#
# Bug #54393: crash and/or valgrind errors in
# mysql_client_binlog_statement
#
BINLOG '';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
BINLOG '123';
BINLOG '-2079193929';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
BINLOG 'xç↓%~∙D╒ƒ╡';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
mysql-test/suite/binlog/t/binlog_base64_flag.test
View file @
1704783e
...
...
@@ -150,3 +150,16 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
'
;
drop
table
t1
,
char63_utf8
,
char128_utf8
;
--
echo
#
--
echo
# Bug #54393: crash and/or valgrind errors in
--
echo
# mysql_client_binlog_statement
--
echo
#
--
error
ER_SYNTAX_ERROR
BINLOG
''
;
BINLOG
'123'
;
--
error
ER_SYNTAX_ERROR
BINLOG
'-2079193929'
;
--
error
ER_SYNTAX_ERROR
BINLOG
'xç↓%~∙D╒ƒ╡'
;
mysql-test/t/innodb_mysql.test
View file @
1704783e
...
...
@@ -663,6 +663,37 @@ UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#50389 Using intersect does not return all rows
--
echo
#
CREATE
TABLE
t1
(
f1
INT
(
10
)
NOT
NULL
,
f2
INT
(
10
),
f3
INT
(
10
),
f4
TINYINT
(
4
),
f5
VARCHAR
(
50
),
PRIMARY
KEY
(
f1
),
KEY
idx1
(
f2
,
f5
,
f4
),
KEY
idx2
(
f2
,
f4
)
)
ENGINE
=
InnoDB
;
LOAD
DATA
INFILE
'../../std_data/intersect-bug50389.tsv'
INTO
TABLE
t1
;
SELECT
*
FROM
t1
WHERE
f1
IN
(
3305028
,
3353871
,
3772880
,
3346860
,
4228206
,
3336022
,
3470988
,
3305175
,
3329875
,
3817277
,
3856380
,
3796193
,
3784744
,
4180925
,
4559596
,
3963734
,
3856391
,
4494153
)
AND
f5
=
'abcdefghijklmnopwrst'
AND
f2
=
1221457
AND
f4
=
0
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
f1
IN
(
3305028
,
3353871
,
3772880
,
3346860
,
4228206
,
3336022
,
3470988
,
3305175
,
3329875
,
3817277
,
3856380
,
3796193
,
3784744
,
4180925
,
4559596
,
3963734
,
3856391
,
4494153
)
AND
f5
=
'abcdefghijklmnopwrst'
AND
f2
=
1221457
AND
f4
=
0
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
...
...
scripts/make_binary_distribution.sh
View file @
1704783e
...
...
@@ -483,9 +483,11 @@ $CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
mysql-test/std_data/des_key_file mysql-test/std_data/
*
.
*
001
\
mysql-test/std_data/
*
.cnf mysql-test/std_data/
*
.MY
*
\
$BASE
/mysql-test/std_data
$CP
mysql-test/t/
*
.test mysql-test/t/
*
.imtest
\
mysql-test/t/
*
.disabled mysql-test/t/
*
.opt
\
mysql-test/t/
*
.slave-mi mysql-test/t/
*
.sh mysql-test/t/
*
.sql
$BASE
/mysql-test/t
# Attention: when the wildcards expand to a line that is very long,
# it may exceed the command line length limit on some platform(s). Bug#54590
$CP
mysql-test/t/
*
.test mysql-test/t/
*
.imtest
$BASE
/mysql-test/t
$CP
mysql-test/t/
*
.disabled mysql-test/t/
*
.opt
$BASE
/mysql-test/t
$CP
mysql-test/t/
*
.slave-mi mysql-test/t/
*
.sh mysql-test/t/
*
.sql
$BASE
/mysql-test/t
$CP
mysql-test/r/
*
.result mysql-test/r/
*
.require
\
$BASE
/mysql-test/r
...
...
sql/opt_range.cc
View file @
1704783e
...
...
@@ -8538,6 +8538,7 @@ int QUICK_ROR_INTERSECT_SELECT::get_next()
if
((
error
=
quick
->
get_next
()))
DBUG_RETURN
(
error
);
}
quick
->
file
->
position
(
quick
->
record
);
}
memcpy
(
last_rowid
,
quick
->
file
->
ref
,
head
->
file
->
ref_length
);
last_rowid_count
=
1
;
...
...
sql/sql_binlog.cc
View file @
1704783e
...
...
@@ -52,9 +52,13 @@ void mysql_client_binlog_statement(THD* thd)
if
(
check_global_access
(
thd
,
SUPER_ACL
))
DBUG_VOID_RETURN
;
size_t
coded_len
=
thd
->
lex
->
comment
.
length
+
1
;
size_t
coded_len
=
thd
->
lex
->
comment
.
length
;
if
(
!
coded_len
)
{
my_error
(
ER_SYNTAX_ERROR
,
MYF
(
0
));
DBUG_VOID_RETURN
;
}
size_t
decoded_len
=
base64_needed_decoded_length
(
coded_len
);
DBUG_ASSERT
(
coded_len
>
0
);
/*
Allocation
...
...
@@ -155,14 +159,16 @@ void mysql_client_binlog_statement(THD* thd)
/*
Checking that the first event in the buffer is not truncated.
*/
ulong
event_len
=
uint4korr
(
bufptr
+
EVENT_LEN_OFFSET
)
;
DBUG_PRINT
(
"info"
,
(
"event_len=%lu, bytes_decoded=%d"
,
event_len
,
bytes_decoded
));
if
(
bytes_decoded
<
EVENT_LEN_OFFSET
||
(
uint
)
bytes_decoded
<
event_len
)
ulong
event_len
;
if
(
bytes_decoded
<
EVENT_LEN_OFFSET
+
4
||
(
event_len
=
uint4korr
(
bufptr
+
EVENT_LEN_OFFSET
))
>
(
uint
)
bytes_decoded
)
{
my_error
(
ER_SYNTAX_ERROR
,
MYF
(
0
));
goto
end
;
}
DBUG_PRINT
(
"info"
,
(
"event_len=%lu, bytes_decoded=%d"
,
event_len
,
bytes_decoded
));
/*
If we have not seen any Format_description_event, then we must
...
...
@@ -200,17 +206,6 @@ void mysql_client_binlog_statement(THD* thd)
bufptr
+=
event_len
;
DBUG_PRINT
(
"info"
,(
"ev->get_type_code()=%d"
,
ev
->
get_type_code
()));
#ifndef HAVE_purify
/*
This debug printout should not be used for valgrind builds
since it will read from unassigned memory.
*/
DBUG_PRINT
(
"info"
,(
"bufptr+EVENT_TYPE_OFFSET: 0x%lx"
,
(
long
)
(
bufptr
+
EVENT_TYPE_OFFSET
)));
DBUG_PRINT
(
"info"
,
(
"bytes_decoded: %d bufptr: 0x%lx buf[EVENT_LEN_OFFSET]: %lu"
,
bytes_decoded
,
(
long
)
bufptr
,
(
ulong
)
uint4korr
(
bufptr
+
EVENT_LEN_OFFSET
)));
#endif
ev
->
thd
=
thd
;
/*
We go directly to the application phase, since we don't need
...
...
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