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
c5c55e3f
Commit
c5c55e3f
authored
Mar 12, 2010
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge from mysql-trunk.
parents
30cb1779
9d746b02
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
377 additions
and
176 deletions
+377
-176
mysql-test/r/ctype_utf8mb4.result
mysql-test/r/ctype_utf8mb4.result
+3
-0
mysql-test/r/flush.result
mysql-test/r/flush.result
+27
-0
mysql-test/r/mysqlbinlog_row_innodb.result
mysql-test/r/mysqlbinlog_row_innodb.result
+12
-12
mysql-test/r/mysqlbinlog_row_myisam.result
mysql-test/r/mysqlbinlog_row_myisam.result
+12
-12
mysql-test/suite/rpl/r/rpl_row_utf16.result
mysql-test/suite/rpl/r/rpl_row_utf16.result
+23
-0
mysql-test/suite/rpl/r/rpl_row_utf32.result
mysql-test/suite/rpl/r/rpl_row_utf32.result
+25
-0
mysql-test/suite/rpl/t/rpl_row_utf16.test
mysql-test/suite/rpl/t/rpl_row_utf16.test
+26
-0
mysql-test/suite/rpl/t/rpl_row_utf32.test
mysql-test/suite/rpl/t/rpl_row_utf32.test
+44
-0
mysql-test/suite/rpl/t/rpl_semi_sync.test
mysql-test/suite/rpl/t/rpl_semi_sync.test
+0
-4
mysql-test/t/ctype_utf8mb4.test
mysql-test/t/ctype_utf8mb4.test
+7
-0
mysql-test/t/flush.test
mysql-test/t/flush.test
+31
-0
plugin/Makefile.am
plugin/Makefile.am
+1
-1
plugin/semisync/semisync_master.cc
plugin/semisync/semisync_master.cc
+84
-126
sql/field.cc
sql/field.cc
+15
-3
sql/rpl_utility.cc
sql/rpl_utility.cc
+8
-8
sql/sql_parse.cc
sql/sql_parse.cc
+23
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-2
strings/ctype-mb.c
strings/ctype-mb.c
+11
-3
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+23
-4
tests/mysql_client_test.c
tests/mysql_client_test.c
+1
-1
No files found.
mysql-test/r/ctype_utf8mb4.result
View file @
c5c55e3f
...
...
@@ -2438,6 +2438,9 @@ t1 CREATE TABLE `t1` (
INSERT INTO t1(subject) VALUES ('abcd');
INSERT INTO t1(subject) VALUES(x'f0909080');
DROP TABLE t1;
CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4, FULLTEXT INDEX(a));
INSERT INTO t1 VALUES (0xF0A08080 /* U+20000 */ );
DROP TABLE t1;
#
# Bug #51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column
#
...
...
mysql-test/r/flush.result
View file @
c5c55e3f
...
...
@@ -207,3 +207,30 @@ insert into t2 (a) values (3);
unlock tables;
# --> connection con1
drop table t1, t2, t3;
#
# Bug#51710 FLUSH TABLES <view> WITH READ LOCK kills the server
#
drop view if exists v1, v2, v3;
drop table if exists t1, v1;
create table t1 (a int);
create view v1 as select 1;
create view v2 as select * from t1;
create view v3 as select * from v2;
flush table v1, v2, v3 with read lock;
ERROR HY000: 'test.v1' is not BASE TABLE
flush table v1 with read lock;
ERROR HY000: 'test.v1' is not BASE TABLE
flush table v2 with read lock;
ERROR HY000: 'test.v2' is not BASE TABLE
flush table v3 with read lock;
ERROR HY000: 'test.v3' is not BASE TABLE
create temporary table v1 (a int);
flush table v1 with read lock;
ERROR HY000: 'test.v1' is not BASE TABLE
drop view v1;
create table v1 (a int);
flush table v1 with read lock;
drop temporary table v1;
unlock tables;
drop view v2, v3;
drop table t1, v1;
mysql-test/r/mysqlbinlog_row_innodb.result
View file @
c5c55e3f
...
...
@@ -2405,10 +2405,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
@@ -2767,10 +2767,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
@@ -3020,10 +3020,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
@@ -3552,10 +3552,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
mysql-test/r/mysqlbinlog_row_myisam.result
View file @
c5c55e3f
...
...
@@ -2405,10 +2405,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
@@ -2773,10 +2773,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
@@ -3028,10 +3028,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
@@ -3568,10 +3568,10 @@ BEGIN
### @38='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @39='' /* STRING(3) meta=65027 nullable=1 is_null=0 */
### @40='' /* STRING(765) meta=57085 nullable=1 is_null=0 */
### @41='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @41='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @42='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
### @43='
\x00
' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='
\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00
' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @43='' /* STRING(2) meta=65026 nullable=1 is_null=0 */
### @44='' /* STRING(510) meta=61182 nullable=1 is_null=0 */
### @45='' /* VARSTRING(0) meta=0 nullable=1 is_null=0 */
### @46='' /* VARSTRING(1) meta=1 nullable=1 is_null=0 */
### @47='' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
...
...
mysql-test/suite/rpl/r/rpl_row_utf16.result
0 → 100644
View file @
c5c55e3f
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1(c1 CHAR(10) CHARACTER SET utf16 DEFAULT 'ola');
INSERT INTO t1 VALUES ('abc');
INSERT INTO t1 VALUES ();
#### ON MASTER
SELECT c1, hex(c1) from t1;
c1 abc
hex(c1) 006100620063
c1 ola
hex(c1) 006F006C0061
#### ON SLAVE
SELECT c1, hex(c1) FROM t1;
c1 abc
hex(c1) 006100620063
c1 ola
hex(c1) 006F006C0061
Comparing tables master:test.t1 and slave:test.t1
DROP TABLE t1;
mysql-test/suite/rpl/r/rpl_row_utf32.result
0 → 100644
View file @
c5c55e3f
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET SQL_LOG_BIN=0;
CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
SET SQL_LOG_BIN=1;
SET @saved_slave_type_conversions= @@global.slave_type_conversions;
include/stop_slave.inc
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
include/start_slave.inc
SET SQL_LOG_BIN=0;
CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
SET SQL_LOG_BIN=1;
INSERT INTO t1(c1) VALUES ('insert into t1');
DROP TABLE t1;
SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
include/stop_slave.inc
include/start_slave.inc
mysql-test/suite/rpl/t/rpl_row_utf16.test
0 → 100644
View file @
c5c55e3f
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_utf16
.
inc
#
# BUG#51716: Char column with utf16 character set gives wrong padding on slave
#
CREATE
TABLE
t1
(
c1
CHAR
(
10
)
CHARACTER
SET
utf16
DEFAULT
'ola'
);
INSERT
INTO
t1
VALUES
(
'abc'
);
# explicit value is inserted and encoded correctly
INSERT
INTO
t1
VALUES
();
# default value is inserted and encoded correctly
--
echo
#### ON MASTER
--
query_vertical
SELECT
c1
,
hex
(
c1
)
from
t1
--
sync_slave_with_master
--
echo
#### ON SLAVE
--
query_vertical
SELECT
c1
,
hex
(
c1
)
FROM
t1
# assertion: tables don't differ
--
let
$diff_table_1
=
master
:
test
.
t1
--
let
$diff_table_2
=
slave
:
test
.
t1
--
source
include
/
diff_tables
.
inc
DROP
TABLE
t1
;
mysql-test/suite/rpl/t/rpl_row_utf32.test
0 → 100644
View file @
c5c55e3f
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_binlog_format_row
.
inc
--
source
include
/
have_utf32
.
inc
#
# BUG#51787 Assertion `(n % 4) == 0' on slave upon INSERT into a table with UTF32
#
SET
SQL_LOG_BIN
=
0
;
CREATE
TABLE
t1
(
c1
char
(
255
)
DEFAULT
NULL
,
KEY
c1
(
c1
))
DEFAULT
CHARSET
=
utf32
;
SET
SQL_LOG_BIN
=
1
;
--
connection
slave
SET
@
saved_slave_type_conversions
=
@@
global
.
slave_type_conversions
;
#
# Force test to cover conversion execution path in the
# slave, which also makes use of sql_type method, thence
# can ultimately trigger the assertion.
#
--
source
include
/
stop_slave
.
inc
SET
GLOBAL
SLAVE_TYPE_CONVERSIONS
=
'ALL_NON_LOSSY'
;
--
source
include
/
start_slave
.
inc
SET
SQL_LOG_BIN
=
0
;
CREATE
TABLE
t1
(
c1
varchar
(
255
)
DEFAULT
NULL
,
KEY
c1
(
c1
))
DEFAULT
CHARSET
=
utf32
;
SET
SQL_LOG_BIN
=
1
;
--
connection
master
INSERT
INTO
t1
(
c1
)
VALUES
(
'insert into t1'
);
DROP
TABLE
t1
;
--
sync_slave_with_master
# assertion: the slave woul hit an/several assertions:
# before and during slave conversion procedure
# Now that is fixed, it wont.
SET
GLOBAL
SLAVE_TYPE_CONVERSIONS
=
@
saved_slave_type_conversions
;
--
source
include
/
stop_slave
.
inc
--
source
include
/
start_slave
.
inc
--
connection
master
mysql-test/suite/rpl/t/rpl_semi_sync.test
View file @
c5c55e3f
...
...
@@ -3,10 +3,6 @@ source include/not_embedded.inc;
source
include
/
have_innodb
.
inc
;
source
include
/
master
-
slave
.
inc
;
# -- [DISABLED Bug#49557]
# This test case fails on Windows due to Bug#49557.
source
include
/
not_windows
.
inc
;
let
$engine_type
=
InnoDB
;
#let $engine_type= MyISAM;
...
...
mysql-test/t/ctype_utf8mb4.test
View file @
c5c55e3f
...
...
@@ -1763,6 +1763,13 @@ INSERT INTO t1(subject) VALUES ('abcd');
INSERT
INTO
t1
(
subject
)
VALUES
(
x
'f0909080'
);
DROP
TABLE
t1
;
#
# Make sure fulltext does not crash on supplementary characters
#
CREATE
TABLE
t1
(
a
TEXT
CHARACTER
SET
utf8mb4
,
FULLTEXT
INDEX
(
a
));
INSERT
INTO
t1
VALUES
(
0xF0A08080
/* U+20000 */
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #51676 Server crashes on SELECT, ORDER BY on 'utf8mb4' column
--
echo
#
...
...
mysql-test/t/flush.test
View file @
c5c55e3f
...
...
@@ -324,3 +324,34 @@ disconnect con1;
--
source
include
/
wait_until_disconnected
.
inc
connection
default
;
drop
table
t1
,
t2
,
t3
;
--
echo
#
--
echo
# Bug#51710 FLUSH TABLES <view> WITH READ LOCK kills the server
--
echo
#
--
disable_warnings
drop
view
if
exists
v1
,
v2
,
v3
;
drop
table
if
exists
t1
,
v1
;
--
enable_warnings
create
table
t1
(
a
int
);
create
view
v1
as
select
1
;
create
view
v2
as
select
*
from
t1
;
create
view
v3
as
select
*
from
v2
;
--
error
ER_WRONG_OBJECT
flush
table
v1
,
v2
,
v3
with
read
lock
;
--
error
ER_WRONG_OBJECT
flush
table
v1
with
read
lock
;
--
error
ER_WRONG_OBJECT
flush
table
v2
with
read
lock
;
--
error
ER_WRONG_OBJECT
flush
table
v3
with
read
lock
;
create
temporary
table
v1
(
a
int
);
--
error
ER_WRONG_OBJECT
flush
table
v1
with
read
lock
;
drop
view
v1
;
create
table
v1
(
a
int
);
flush
table
v1
with
read
lock
;
drop
temporary
table
v1
;
unlock
tables
;
drop
view
v2
,
v3
;
drop
table
t1
,
v1
;
plugin/Makefile.am
View file @
c5c55e3f
...
...
@@ -27,7 +27,7 @@ DIST_SUBDIRS = @mysql_pg_distdirs@
# As of 5.5.3-m3, we want to include the plugin files of a debug build in the package
install-exec-hook
:
$(mkinstalldirs)
$(DESTDIR)$(pkglibdir)
$(DESTDIR)$(pkglibdir)
/plugin
test
!
-d
debug
||
$(TAR)
cf - debug |
(
cd
$(DESTDIR)$(pkglibdir)
&&
$(TAR)
xvf -
)
test
!
-d
debug
||
$(TAR)
cf - debug |
(
cd
$(DESTDIR)$(pkglibdir)
/plugin
&&
$(TAR)
xvf -
)
# Don't update the files from bitkeeper
%
::
SCCS/s.%
plugin/semisync/semisync_master.cc
View file @
c5c55e3f
...
...
@@ -43,19 +43,16 @@ unsigned long long rpl_semi_sync_master_trx_wait_time = 0;
char
rpl_semi_sync_master_wait_no_slave
=
1
;
static
int
getWaitTime
(
const
struct
time
val
&
start_tv
);
static
int
getWaitTime
(
const
struct
time
spec
&
start_ts
);
#ifdef __WIN__
static
int
gettimeofday
(
struct
timeval
*
tv
,
void
*
tz
)
static
unsigned
long
long
timespec_to_usec
(
const
struct
timespec
*
ts
)
{
unsigned
int
ticks
;
ticks
=
GetTickCount
();
tv
->
tv_usec
=
ticks
*
1000
;
tv
->
tv_sec
=
ticks
/
1000
;
return
0
;
}
#ifndef __WIN__
return
(
unsigned
long
long
)
ts
->
tv_sec
*
TIME_MILLION
+
ts
->
tv_nsec
/
TIME_THOUSAND
;
#else
return
ts
->
tv
.
i64
/
10
;
#endif
/* __WIN__ */
}
/*******************************************************************************
*
...
...
@@ -606,12 +603,12 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
if
(
getMasterEnabled
()
&&
trx_wait_binlog_name
)
{
struct
time
val
start_tv
;
struct
time
spec
start_ts
;
struct
timespec
abstime
;
int
wait_result
,
start_time_err
;
int
wait_result
;
const
char
*
old_msg
=
0
;
s
tart_time_err
=
gettimeofday
(
&
start_tv
,
0
);
s
et_timespec
(
start_ts
,
0
);
/* Acquire the mutex. */
lock
();
...
...
@@ -679,98 +676,72 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name,
kWho
,
wait_file_name_
,
(
unsigned
long
)
wait_file_pos_
);
}
if
(
start_time_err
==
0
)
{
int
diff_usecs
=
start_tv
.
tv_usec
+
wait_timeout_
*
TIME_THOUSAND
;
/* Calcuate the waiting period. */
/* Calcuate the waiting period. */
#ifdef __WIN__
abstime
.
tv
.
i64
=
(
__int64
)
start_tv
.
tv_sec
*
TIME_MILLION
*
10
;
abstime
.
tv
.
i64
+=
(
__int64
)
diff_usecs
*
10
;
abstime
.
max_timeout_msec
=
(
long
)
wait_timeout_
;
abstime
.
tv
.
i64
=
start_ts
.
tv
.
i64
+
(
__int64
)
wait_timeout_
*
TIME_THOUSAND
*
10
;
abstime
.
max_timeout_msec
=
(
long
)
wait_timeout_
;
#else
abstime
.
tv_sec
=
start_tv
.
tv_sec
;
if
(
diff_usecs
<
TIME_MILLION
)
{
abstime
.
tv_nsec
=
diff_usecs
*
TIME_THOUSAND
;
}
else
{
while
(
diff_usecs
>=
TIME_MILLION
)
{
abstime
.
tv_sec
++
;
diff_usecs
-=
TIME_MILLION
;
}
abstime
.
tv_nsec
=
diff_usecs
*
TIME_THOUSAND
;
}
unsigned
long
long
diff_nsecs
=
start_ts
.
tv_nsec
+
(
unsigned
long
long
)
wait_timeout_
*
TIME_MILLION
;
abstime
.
tv_sec
=
start_ts
.
tv_sec
;
while
(
diff_nsecs
>=
TIME_BILLION
)
{
abstime
.
tv_sec
++
;
diff_nsecs
-=
TIME_BILLION
;
}
abstime
.
tv_nsec
=
diff_nsecs
;
#endif
/* __WIN__ */
/* In semi-synchronous replication, we wait until the binlog-dump
* thread has received the reply on the relevant binlog segment from the
* replication slave.
*
* Let us suspend this thread to wait on the condition;
* when replication has progressed far enough, we will release
* these waiting threads.
*/
rpl_semi_sync_master_wait_sessions
++
;
if
(
trace_level_
&
kTraceDetail
)
sql_print_information
(
"%s: wait %lu ms for binlog sent (%s, %lu)"
,
kWho
,
wait_timeout_
,
wait_file_name_
,
(
unsigned
long
)
wait_file_pos_
);
wait_result
=
cond_timewait
(
&
abstime
);
rpl_semi_sync_master_wait_sessions
--
;
if
(
wait_result
!=
0
)
{
/* This is a real wait timeout. */
sql_print_warning
(
"Timeout waiting for reply of binlog (file: %s, pos: %lu), "
"semi-sync up to file %s, position %lu."
,
trx_wait_binlog_name
,
(
unsigned
long
)
trx_wait_binlog_pos
,
reply_file_name_
,
(
unsigned
long
)
reply_file_pos_
);
rpl_semi_sync_master_wait_timeouts
++
;
/* switch semi-sync off */
switch_off
();
}
else
{
int
wait_time
;
wait_time
=
getWaitTime
(
start_tv
);
if
(
wait_time
<
0
)
{
if
(
trace_level_
&
kTraceGeneral
)
{
/* This is a time/gettimeofday function call error. */
sql_print_error
(
"Replication semi-sync gettimeofday fail1 at "
"wait position (%s, %lu)"
,
trx_wait_binlog_name
,
(
unsigned
long
)
trx_wait_binlog_pos
);
}
rpl_semi_sync_master_timefunc_fails
++
;
}
else
{
rpl_semi_sync_master_trx_wait_num
++
;
rpl_semi_sync_master_trx_wait_time
+=
wait_time
;
}
}
/* In semi-synchronous replication, we wait until the binlog-dump
* thread has received the reply on the relevant binlog segment from the
* replication slave.
*
* Let us suspend this thread to wait on the condition;
* when replication has progressed far enough, we will release
* these waiting threads.
*/
rpl_semi_sync_master_wait_sessions
++
;
if
(
trace_level_
&
kTraceDetail
)
sql_print_information
(
"%s: wait %lu ms for binlog sent (%s, %lu)"
,
kWho
,
wait_timeout_
,
wait_file_name_
,
(
unsigned
long
)
wait_file_pos_
);
wait_result
=
cond_timewait
(
&
abstime
);
rpl_semi_sync_master_wait_sessions
--
;
if
(
wait_result
!=
0
)
{
/* This is a real wait timeout. */
sql_print_warning
(
"Timeout waiting for reply of binlog (file: %s, pos: %lu), "
"semi-sync up to file %s, position %lu."
,
trx_wait_binlog_name
,
(
unsigned
long
)
trx_wait_binlog_pos
,
reply_file_name_
,
(
unsigned
long
)
reply_file_pos_
);
rpl_semi_sync_master_wait_timeouts
++
;
/* switch semi-sync off */
switch_off
();
}
else
{
if
(
trace_level_
&
kTraceGeneral
)
{
/* This is a gettimeofday function call error. */
sql_print_error
(
"Replication semi-sync gettimeofday fail2 at "
"wait position (%s, %lu)"
,
trx_wait_binlog_name
,
(
unsigned
long
)
trx_wait_binlog_pos
);
int
wait_time
;
wait_time
=
getWaitTime
(
start_ts
);
if
(
wait_time
<
0
)
{
if
(
trace_level_
&
kTraceGeneral
)
{
sql_print_error
(
"Replication semi-sync getWaitTime fail at "
"wait position (%s, %lu)"
,
trx_wait_binlog_name
,
(
unsigned
long
)
trx_wait_binlog_pos
);
}
rpl_semi_sync_master_timefunc_fails
++
;
}
else
{
rpl_semi_sync_master_trx_wait_num
++
;
rpl_semi_sync_master_trx_wait_time
+=
wait_time
;
}
rpl_semi_sync_master_timefunc_fails
++
;
/* switch semi-sync off */
switch_off
();
}
}
...
...
@@ -1080,8 +1051,7 @@ int ReplSemiSyncMaster::readSlaveReply(NET *net, uint32 server_id,
ulong
packet_len
;
int
result
=
-
1
;
struct
timeval
start_tv
;
int
start_time_err
=
0
;
struct
timespec
start_ts
;
ulong
trc_level
=
trace_level_
;
function_enter
(
kWho
);
...
...
@@ -1095,7 +1065,7 @@ int ReplSemiSyncMaster::readSlaveReply(NET *net, uint32 server_id,
}
if
(
trc_level
&
kTraceNetWait
)
s
tart_time_err
=
gettimeofday
(
&
start_tv
,
0
);
s
et_timespec
(
start_ts
,
0
);
/* We flush to make sure that the current event is sent to the network,
* instead of being buffered in the TCP/IP stack.
...
...
@@ -1120,28 +1090,17 @@ int ReplSemiSyncMaster::readSlaveReply(NET *net, uint32 server_id,
if
(
trc_level
&
kTraceNetWait
)
{
if
(
start_time_err
!=
0
)
int
wait_time
=
getWaitTime
(
start_ts
);
if
(
wait_time
<
0
)
{
sql_print_error
(
"Semi-sync master wait for reply "
"
gettimeofday fail to get start time
"
);
"
fail to get wait time.
"
);
rpl_semi_sync_master_timefunc_fails
++
;
}
else
{
int
wait_time
;
wait_time
=
getWaitTime
(
start_tv
);
if
(
wait_time
<
0
)
{
sql_print_error
(
"Semi-sync master wait for reply "
"gettimeofday fail to get wait time."
);
rpl_semi_sync_master_timefunc_fails
++
;
}
else
{
rpl_semi_sync_master_net_wait_num
++
;
rpl_semi_sync_master_net_wait_time
+=
wait_time
;
}
rpl_semi_sync_master_net_wait_num
++
;
rpl_semi_sync_master_net_wait_time
+=
wait_time
;
}
}
...
...
@@ -1230,24 +1189,23 @@ void ReplSemiSyncMaster::setExportStats()
*
* Return:
* >= 0: the waiting time in microsecons(us)
* < 0: error in get
timeofday
or time back traverse
* < 0: error in get
time
or time back traverse
*/
static
int
getWaitTime
(
const
struct
time
val
&
start_tv
)
static
int
getWaitTime
(
const
struct
time
spec
&
start_ts
)
{
unsigned
long
long
start_usecs
,
end_usecs
;
struct
timeval
end_tv
;
int
end_time_err
;
struct
timespec
end_ts
;
/* Starting time in microseconds(us). */
start_usecs
=
start_tv
.
tv_sec
*
TIME_MILLION
+
start_tv
.
tv_usec
;
start_usecs
=
timespec_to_usec
(
&
start_ts
)
;
/* Get the wait time interval. */
end_time_err
=
gettimeofday
(
&
end_tv
,
0
);
set_timespec
(
end_ts
,
0
);
/* Ending time in microseconds(us). */
end_usecs
=
end_tv
.
tv_sec
*
TIME_MILLION
+
end_tv
.
tv_usec
;
end_usecs
=
timespec_to_usec
(
&
end_ts
)
;
if
(
end_
time_err
!=
0
||
end_
usecs
<
start_usecs
)
if
(
end_usecs
<
start_usecs
)
return
-
1
;
return
(
int
)(
end_usecs
-
start_usecs
);
...
...
sql/field.cc
View file @
c5c55e3f
...
...
@@ -6613,8 +6613,20 @@ uchar *Field_string::pack(uchar *to, const uchar *from,
local_char_length
=
my_charpos
(
field_charset
,
from
,
from
+
length
,
local_char_length
);
set_if_smaller
(
length
,
local_char_length
);
while
(
length
&&
from
[
length
-
1
]
==
field_charset
->
pad_char
)
length
--
;
/*
TODO: change charset interface to add a new function that does
the following or add a flag to lengthsp to do it itself
(this is for not packing padding adding bytes in BINARY
fields).
*/
if
(
field_charset
->
mbmaxlen
==
1
)
{
while
(
length
&&
from
[
length
-
1
]
==
field_charset
->
pad_char
)
length
--
;
}
else
length
=
field_charset
->
cset
->
lengthsp
(
field_charset
,
(
const
char
*
)
from
,
length
);
// Length always stored little-endian
*
to
++=
(
uchar
)
length
;
...
...
@@ -6680,7 +6692,7 @@ Field_string::unpack(uchar *to,
memcpy
(
to
,
from
,
length
);
// Pad the string with the pad character of the fields charset
bfill
(
to
+
length
,
field_length
-
length
,
field_charset
->
pad_char
);
field_charset
->
cset
->
fill
(
field_charset
,
(
char
*
)
to
+
length
,
field_length
-
length
,
field_charset
->
pad_char
);
return
from
+
length
;
}
...
...
sql/rpl_utility.cc
View file @
c5c55e3f
...
...
@@ -340,7 +340,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const
/**
*/
void
show_sql_type
(
enum_field_types
type
,
uint16
metadata
,
String
*
str
)
void
show_sql_type
(
enum_field_types
type
,
uint16
metadata
,
String
*
str
,
CHARSET_INFO
*
field_cs
)
{
DBUG_ENTER
(
"show_sql_type"
);
DBUG_PRINT
(
"enter"
,
(
"type: %d, metadata: 0x%x"
,
type
,
metadata
));
...
...
@@ -489,7 +489,7 @@ void show_sql_type(enum_field_types type, uint16 metadata, String *str)
uint
bytes
=
(((
metadata
>>
4
)
&
0x300
)
^
0x300
)
+
(
metadata
&
0x00ff
);
uint32
length
=
cs
->
cset
->
snprintf
(
cs
,
(
char
*
)
str
->
ptr
(),
str
->
alloced_length
(),
"char(%d)"
,
bytes
/
cs
->
mbmaxlen
);
"char(%d)"
,
bytes
/
field_
cs
->
mbmaxlen
);
str
->
length
(
length
);
}
break
;
...
...
@@ -579,7 +579,7 @@ can_convert_field_to(Field *field,
DBUG_ENTER
(
"can_convert_field_to"
);
#ifndef DBUG_OFF
char
field_type_buf
[
MAX_FIELD_WIDTH
];
String
field_type
(
field_type_buf
,
sizeof
(
field_type_buf
),
field
->
charset
()
);
String
field_type
(
field_type_buf
,
sizeof
(
field_type_buf
),
&
my_charset_latin1
);
field
->
sql_type
(
field_type
);
DBUG_PRINT
(
"enter"
,
(
"field_type: %s, target_type: %d, source_type: %d, source_metadata: 0x%x"
,
field_type
.
c_ptr_safe
(),
field
->
real_type
(),
source_type
,
metadata
));
...
...
@@ -822,9 +822,9 @@ table_def::compatible_with(THD *thd, Relay_log_info *rli,
const
char
*
tbl_name
=
table
->
s
->
table_name
.
str
;
char
source_buf
[
MAX_FIELD_WIDTH
];
char
target_buf
[
MAX_FIELD_WIDTH
];
String
source_type
(
source_buf
,
sizeof
(
source_buf
),
field
->
charset
()
);
String
target_type
(
target_buf
,
sizeof
(
target_buf
),
field
->
charset
()
);
show_sql_type
(
type
(
col
),
field_metadata
(
col
),
&
source_type
);
String
source_type
(
source_buf
,
sizeof
(
source_buf
),
&
my_charset_latin1
);
String
target_type
(
target_buf
,
sizeof
(
target_buf
),
&
my_charset_latin1
);
show_sql_type
(
type
(
col
),
field_metadata
(
col
),
&
source_type
,
field
->
charset
()
);
field
->
sql_type
(
target_type
);
rli
->
report
(
ERROR_LEVEL
,
ER_SLAVE_CONVERSION_FAILED
,
ER
(
ER_SLAVE_CONVERSION_FAILED
),
...
...
@@ -842,8 +842,8 @@ table_def::compatible_with(THD *thd, Relay_log_info *rli,
{
char
source_buf
[
MAX_FIELD_WIDTH
];
char
target_buf
[
MAX_FIELD_WIDTH
];
String
source_type
(
source_buf
,
sizeof
(
source_buf
),
table
->
field
[
col
]
->
charset
()
);
String
target_type
(
target_buf
,
sizeof
(
target_buf
),
table
->
field
[
col
]
->
charset
()
);
String
source_type
(
source_buf
,
sizeof
(
source_buf
),
&
my_charset_latin1
);
String
target_type
(
target_buf
,
sizeof
(
target_buf
),
&
my_charset_latin1
);
tmp_table
->
field
[
col
]
->
sql_type
(
source_type
);
table
->
field
[
col
]
->
sql_type
(
target_type
);
DBUG_PRINT
(
"debug"
,
(
"Field %s - conversion required."
...
...
sql/sql_parse.cc
View file @
c5c55e3f
...
...
@@ -1631,6 +1631,14 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
- you can't flush WITH READ LOCK a non-existent table
- you can't flush WITH READ LOCK under LOCK TABLES
- currently incompatible with the GRL (@todo: fix)
Effect on views and temporary tables.
------------------------------------
You can only apply this command to existing base tables.
If a view with such name exists, ER_WRONG_OBJECT is returned.
If a temporary table with such name exists, it's ignored:
if there is a base table, it's used, otherwise ER_NO_SUCH_TABLE
is returned.
*/
static
bool
flush_tables_with_read_lock
(
THD
*
thd
,
TABLE_LIST
*
all_tables
)
...
...
@@ -1665,6 +1673,21 @@ static bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables)
if
(
lock_table_names
(
thd
,
all_tables
))
goto
error
;
for
(
table_list
=
all_tables
;
table_list
;
table_list
=
table_list
->
next_global
)
{
/* Remove the table from cache. */
mysql_mutex_lock
(
&
LOCK_open
);
tdc_remove_table
(
thd
,
TDC_RT_REMOVE_ALL
,
table_list
->
db
,
table_list
->
table_name
);
mysql_mutex_unlock
(
&
LOCK_open
);
/* Skip views and temporary tables. */
table_list
->
required_type
=
FRMTYPE_TABLE
;
/* Don't try to flush views. */
table_list
->
open_type
=
OT_BASE_ONLY
;
/* Ignore temporary tables. */
}
if
(
open_and_lock_tables
(
thd
,
all_tables
,
FALSE
,
MYSQL_OPEN_HAS_MDL_LOCK
,
&
lock_tables_prelocking_strategy
)
||
...
...
sql/sql_prepare.cc
View file @
c5c55e3f
...
...
@@ -3769,7 +3769,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
if
(
state
==
Query_arena
::
PREPARED
)
state
=
Query_arena
::
EXECUTED
;
if
(
this
->
lex
->
sql_command
==
SQLCOM_CALL
)
if
(
error
==
0
&&
this
->
lex
->
sql_command
==
SQLCOM_CALL
)
{
if
(
is_sql_prepare
())
thd
->
protocol_text
.
send_out_parameters
(
&
this
->
lex
->
param_list
);
...
...
@@ -3777,7 +3777,6 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
thd
->
protocol
->
send_out_parameters
(
&
this
->
lex
->
param_list
);
}
/*
Log COM_EXECUTE to the general log. Note, that in case of SQL
prepared statements this causes two records to be output:
...
...
strings/ctype-mb.c
View file @
c5c55e3f
...
...
@@ -1123,8 +1123,16 @@ size_t my_numcells_mb(CHARSET_INFO *cs, const char *b, const char *e)
continue
;
}
b
+=
mb_len
;
pg
=
(
wc
>>
8
)
&
0xFF
;
clen
+=
utr11_data
[
pg
].
p
?
utr11_data
[
pg
].
p
[
wc
&
0xFF
]
:
utr11_data
[
pg
].
page
;
if
(
wc
>
0xFFFF
)
{
if
(
wc
>=
0x20000
&&
wc
<=
0x3FFFD
)
/* CJK Ideograph Extension B, C */
clen
+=
1
;
}
else
{
pg
=
(
wc
>>
8
)
&
0xFF
;
clen
+=
utr11_data
[
pg
].
p
?
utr11_data
[
pg
].
p
[
wc
&
0xFF
]
:
utr11_data
[
pg
].
page
;
}
clen
++
;
}
return
clen
;
...
...
@@ -1136,7 +1144,7 @@ int my_mb_ctype_mb(CHARSET_INFO *cs, int *ctype,
{
my_wc_t
wc
;
int
res
=
cs
->
cset
->
mb_wc
(
cs
,
&
wc
,
s
,
e
);
if
(
res
<=
0
)
if
(
res
<=
0
||
wc
>
0xFFFF
)
*
ctype
=
0
;
else
*
ctype
=
my_uni_ctype
[
wc
>>
8
].
ctype
?
...
...
support-files/mysql.spec.sh
View file @
c5c55e3f
...
...
@@ -561,6 +561,14 @@ install -d $RBR%{_libdir}
install
-d
$RBR
%
{
_mandir
}
install
-d
$RBR
%
{
_sbindir
}
# Get the plugin files from the debug build
mkdir
$RBR
/tmp-debug-plugin
$MBD
/plugin/debug
(
cd
$RPM_BUILD_DIR
/mysql-%
{
mysql_version
}
/mysql-debug-%
{
mysql_version
}
/plugin
make
install
DESTDIR
=
$RBR
/tmp-debug-plugin
mv
$RBR
/tmp-debug-plugin/usr/local/mysql/lib/mysql/plugin/
*
$MBD
/plugin/debug/
# From here, the install hook in "plugin/Makefile.am" will do the rest.
)
rmdir
-p
$RBR
/tmp-debug-plugin/usr/local/mysql/lib/mysql/plugin
# Install all binaries
(
cd
$MBD
&&
make
install
DESTDIR
=
$RBR
testroot
=
%
{
_datadir
})
...
...
@@ -859,10 +867,6 @@ fi
%attr
(
755, root, root
)
%
{
_bindir
}
/resolve_stack_dump
%attr
(
755, root, root
)
%
{
_bindir
}
/resolveip
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/ha_example.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/semisync_master.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/semisync_slave.so
*
%if %
{
WITH_TCMALLOC
}
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/%
{
malloc_lib_target
}
%endif
...
...
@@ -873,6 +877,9 @@ fi
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/ha_example.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/semisync_master.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/semisync_slave.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/debug/ha_example.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/debug/semisync_master.so
*
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/plugin/debug/semisync_slave.so
*
%if %
{
WITH_TCMALLOC
}
%attr
(
755, root, root
)
%
{
_libdir
}
/mysql/%
{
malloc_lib_target
}
...
...
@@ -1007,6 +1014,12 @@ fi
%
{
_libdir
}
/mysql/plugin/semisync_master.la
%
{
_libdir
}
/mysql/plugin/semisync_slave.a
%
{
_libdir
}
/mysql/plugin/semisync_slave.la
%
{
_libdir
}
/mysql/plugin/debug/ha_example.a
%
{
_libdir
}
/mysql/plugin/debug/ha_example.la
%
{
_libdir
}
/mysql/plugin/debug/semisync_master.a
%
{
_libdir
}
/mysql/plugin/debug/semisync_master.la
%
{
_libdir
}
/mysql/plugin/debug/semisync_slave.a
%
{
_libdir
}
/mysql/plugin/debug/semisync_slave.la
%files shared
%defattr
(
-, root, root, 0755
)
...
...
@@ -1042,6 +1055,12 @@ fi
# merging BK trees)
##############################################################################
%changelog
*
Wed Mar 10 2010 Joerg Bruehe <joerg.bruehe@sun.com>
- Take the result of the debug plugin build and put it into the optimized tree,
so that it becomes part of the final installation
;
include the files
in
the packlist. Part of the fixes
for
bug#49022.
*
Mon Mar 01 2010 Joerg Bruehe <joerg.bruehe@sun.com>
- Set
"Oracle and/or its affiliates"
as the vendor and copyright owner,
...
...
tests/mysql_client_test.c
View file @
c5c55e3f
...
...
@@ -19373,7 +19373,7 @@ static struct my_tests_st my_tests[]= {
#endif
{
"test_bug41078"
,
test_bug41078
},
{
"test_bug44495"
,
test_bug44495
},
/* XXX { "test_bug49972", test_bug49972 }, */
{
"test_bug49972"
,
test_bug49972
},
{
0
,
0
}
};
...
...
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