mirror of
https://github.com/MariaDB/server.git
synced 2025-03-30 11:55:31 +02:00
Merge tag 'mysql-5.5.44' into bb-5.5-serg
This commit is contained in:
commit
f84f577aa1
27 changed files with 233 additions and 73 deletions
VERSION
cmake
cmd-line-utils/libedit
mysql-test
r
suite
innodb
parts
rpl
t
packaging/rpm-oel
sql
storage
support-files
2
VERSION
2
VERSION
|
@ -1,4 +1,4 @@
|
|||
MYSQL_VERSION_MAJOR=5
|
||||
MYSQL_VERSION_MINOR=5
|
||||
MYSQL_VERSION_PATCH=43
|
||||
MYSQL_VERSION_PATCH=44
|
||||
MYSQL_VERSION_EXTRA=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2015, Oracle and/or its affiliates.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -60,9 +60,9 @@ IF(NOT GIT_EXECUTABLE)
|
|||
|
||||
# Save bison output first.
|
||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc
|
||||
${CMAKE_BINARY_DIR}/sql_yacc.cc COPY_ONLY)
|
||||
${CMAKE_BINARY_DIR}/sql_yacc.cc COPYONLY)
|
||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
|
||||
${CMAKE_BINARY_DIR}/sql_yacc.h COPY_ONLY)
|
||||
${CMAKE_BINARY_DIR}/sql_yacc.h COPYONLY)
|
||||
|
||||
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||
# make clean
|
||||
|
@ -74,9 +74,9 @@ IF(NOT GIT_EXECUTABLE)
|
|||
|
||||
# Restore bison output
|
||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.cc
|
||||
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPY_ONLY)
|
||||
${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPYONLY)
|
||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.h
|
||||
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPY_ONLY)
|
||||
${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPYONLY)
|
||||
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.cc)
|
||||
FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.h)
|
||||
ENDIF()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* Copyright (c) 1992, 2015
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
|
@ -103,7 +103,7 @@ protected int terminal_settc(EditLine *, int, const Char **);
|
|||
protected int terminal_gettc(EditLine *, int, char **);
|
||||
protected int terminal_telltc(EditLine *, int, const Char **);
|
||||
protected int terminal_echotc(EditLine *, int, const Char **);
|
||||
protected void terminal_writec(EditLine *, Int);
|
||||
protected int terminal_writec(EditLine *, Int);
|
||||
protected int terminal__putc(EditLine *, Int);
|
||||
protected void terminal__flush(EditLine *);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* Copyright (c) 1992, 2015
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
|
@ -58,8 +58,10 @@ em_delete_or_list(EditLine *el, Int c)
|
|||
/* if I'm at the end */
|
||||
if (el->el_line.cursor == el->el_line.buffer) {
|
||||
/* and the beginning */
|
||||
terminal_writec(el, c); /* then do an EOF */
|
||||
return CC_EOF;
|
||||
if(!(terminal_writec(el, c))) /* then do an EOF */
|
||||
return CC_EOF;
|
||||
else
|
||||
return CC_ERROR;
|
||||
} else {
|
||||
/*
|
||||
* Here we could list completions, but it is an
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* Copyright (c) 1992, 2015
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
|
@ -1271,14 +1271,19 @@ terminal__flush(EditLine *el)
|
|||
/* terminal_writec():
|
||||
* Write the given character out, in a human readable form
|
||||
*/
|
||||
protected void
|
||||
protected int
|
||||
terminal_writec(EditLine *el, Int c)
|
||||
{
|
||||
Char visbuf[VISUAL_WIDTH_MAX +1];
|
||||
ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c);
|
||||
visbuf[vcnt] = '\0';
|
||||
terminal_overwrite(el, visbuf, (size_t)vcnt);
|
||||
terminal__flush(el);
|
||||
if(vcnt == -1)
|
||||
return 1; /* Error due to insufficient space */
|
||||
else {
|
||||
visbuf[vcnt] = '\0';
|
||||
terminal_overwrite(el, visbuf, (size_t)vcnt);
|
||||
terminal__flush(el);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* Copyright (c) 1992, 2015
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
|
@ -607,8 +607,10 @@ vi_list_or_eof(EditLine *el, Int c)
|
|||
|
||||
if (el->el_line.cursor == el->el_line.lastchar) {
|
||||
if (el->el_line.cursor == el->el_line.buffer) {
|
||||
terminal_writec(el, c); /* then do a EOF */
|
||||
return CC_EOF;
|
||||
if(!(terminal_writec(el, c))) /* then do a EOF */
|
||||
return CC_EOF;
|
||||
else
|
||||
return CC_ERROR;
|
||||
} else {
|
||||
/*
|
||||
* Here we could list completions, but it is an
|
||||
|
|
|
@ -367,33 +367,33 @@ DROP TABLE t1;
|
|||
create table t1 (a int) engine=innodb partition by hash(a) ;
|
||||
show table status like 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
engine = innodb
|
||||
partition by key (a);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
|
||||
insert into t1 values (0), (1), (2), (3);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
|
||||
drop table t1;
|
||||
create table t1 (a int auto_increment primary key)
|
||||
engine = innodb
|
||||
partition by key (a);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
|
@ -575,6 +575,17 @@ a b
|
|||
0 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE
|
||||
# WRONG FOR PARTITIONED TABLES
|
||||
#
|
||||
CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB
|
||||
PARTITION BY HASH (a) PARTITIONS 2;
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE
|
||||
CREATE_TIME IS NOT NULL AND TABLE_NAME='t1';
|
||||
COUNT(*)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET ==
|
||||
# SAVE_READ_SET
|
||||
#
|
||||
|
|
17
mysql-test/suite/innodb/r/xa_recovery.result
Normal file
17
mysql-test/suite/innodb/r/xa_recovery.result
Normal file
|
@ -0,0 +1,17 @@
|
|||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
XA START 'x';
|
||||
UPDATE t1 set a=2;
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
SELECT * FROM t1 LOCK IN SHARE MODE;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
2
|
||||
XA ROLLBACK 'x';
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
DROP TABLE t1;
|
43
mysql-test/suite/innodb/t/xa_recovery.test
Normal file
43
mysql-test/suite/innodb/t/xa_recovery.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
--source include/have_innodb.inc
|
||||
# Embedded server does not support restarting.
|
||||
--source include/not_embedded.inc
|
||||
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connect (con1,localhost,root);
|
||||
XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x';
|
||||
connection default;
|
||||
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
|
||||
# Kill and restart the server.
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server 0
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
-- disable_reconnect
|
||||
|
||||
disconnect con1;
|
||||
connect (con1,localhost,root);
|
||||
--send SELECT * FROM t1 LOCK IN SHARE MODE
|
||||
|
||||
connection default;
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = 'Sending data' and
|
||||
info = 'SELECT * FROM t1 LOCK IN SHARE MODE';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
disconnect con1;
|
||||
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t1;
|
||||
XA ROLLBACK 'x';
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
|
@ -58,7 +58,10 @@ t1.frm
|
|||
t1.par
|
||||
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
||||
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
||||
SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION,
|
||||
PARTITION_DESCRIPTION, TABLE_ROWS
|
||||
FROM INFORMATION_SCHEMA.PARTITIONS
|
||||
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||
# When waiting for the name lock in get_all_tables in sql_show.cc
|
||||
# this will not be concurrent any more, thus the TIMEOUT
|
||||
|
@ -70,9 +73,9 @@ ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
|||
PARTITION p10 VALUES LESS THAN MAXVALUE);
|
||||
Warnings:
|
||||
Warning 1639 debug sync point wait timed out
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
|
||||
def test t1 p0 NULL 1 NULL RANGE NULL a NULL 10 1 16384 16384 NULL 0 0 NULL NULL NULL NULL default NULL
|
||||
def test t1 p10 NULL 2 NULL RANGE NULL a NULL MAXVALUE 3 5461 16384 NULL 0 0 NULL NULL NULL NULL default NULL
|
||||
TABLE_SCHEMA TABLE_NAME PARTITION_NAME PARTITION_ORDINAL_POSITION PARTITION_DESCRIPTION TABLE_ROWS
|
||||
test t1 p0 1 10 1
|
||||
test t1 p10 2 MAXVALUE 3
|
||||
t1#P#p0.ibd
|
||||
t1#P#p10.ibd
|
||||
t1.frm
|
||||
|
|
|
@ -62,7 +62,10 @@ SHOW CREATE TABLE t1;
|
|||
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
|
||||
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
|
||||
send
|
||||
SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION,
|
||||
PARTITION_DESCRIPTION, TABLE_ROWS
|
||||
FROM INFORMATION_SCHEMA.PARTITIONS
|
||||
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
|
||||
connect (con1, localhost, root,,);
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||
|
|
|
@ -182,6 +182,11 @@ DROP USER test_3@localhost;
|
|||
ERROR HY000: Table 'user' was not locked with LOCK TABLES
|
||||
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
|
||||
UNLOCK TABLE;
|
||||
CREATE DATABASE db;
|
||||
CREATE TABLE db.t1 LIKE t2;
|
||||
CREATE TABLE t3 LIKE t2;
|
||||
DROP TABLE t3;
|
||||
DROP DATABASE db;
|
||||
DROP USER test_3@localhost;
|
||||
DROP FUNCTION f2;
|
||||
DROP PROCEDURE p2;
|
||||
|
|
|
@ -150,6 +150,16 @@ DROP USER test_3@localhost;
|
|||
INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked");
|
||||
|
||||
UNLOCK TABLE;
|
||||
|
||||
# Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS
|
||||
# BINLOGGED INCORRECTLY - BREAKS A SLAVE
|
||||
CREATE DATABASE db;
|
||||
CREATE TABLE db.t1 LIKE t2;
|
||||
CREATE TABLE t3 LIKE t2;
|
||||
DROP TABLE t3;
|
||||
DROP DATABASE db;
|
||||
# end of Bug #20439913 test
|
||||
|
||||
DROP USER test_3@localhost;
|
||||
DROP FUNCTION f2;
|
||||
DROP PROCEDURE p2;
|
||||
|
|
|
@ -390,7 +390,7 @@ DROP TABLE t1;
|
|||
create table t1 (a int) engine=innodb partition by hash(a) ;
|
||||
# Data_free for InnoDB tablespace varies depending on which
|
||||
# tests have been run before this one
|
||||
--replace_column 10 #
|
||||
--replace_column 10 # 12 #
|
||||
show table status like 't1';
|
||||
drop table t1;
|
||||
|
||||
|
@ -402,12 +402,12 @@ engine = innodb
|
|||
partition by key (a);
|
||||
# Data_free for InnoDB tablespace varies depending on which
|
||||
# tests have been run before this one
|
||||
--replace_column 10 #
|
||||
--replace_column 10 # 12 #
|
||||
show table status;
|
||||
insert into t1 values (0), (1), (2), (3);
|
||||
# Data_free for InnoDB tablespace varies depending on which
|
||||
# tests have been run before this one
|
||||
--replace_column 10 #
|
||||
--replace_column 10 # 12 #
|
||||
show table status;
|
||||
drop table t1;
|
||||
|
||||
|
@ -416,17 +416,17 @@ engine = innodb
|
|||
partition by key (a);
|
||||
# Data_free for InnoDB tablespace varies depending on which
|
||||
# tests have been run before this one
|
||||
--replace_column 10 #
|
||||
--replace_column 10 # 12 #
|
||||
show table status;
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
# Data_free for InnoDB tablespace varies depending on which
|
||||
# tests have been run before this one
|
||||
--replace_column 10 #
|
||||
--replace_column 10 # 12 #
|
||||
show table status;
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
# Data_free for InnoDB tablespace varies depending on which
|
||||
# tests have been run before this one
|
||||
--replace_column 10 #
|
||||
--replace_column 10 # 12 #
|
||||
show table status;
|
||||
drop table t1;
|
||||
|
||||
|
@ -661,6 +661,18 @@ ALTER TABLE t1 ADD UNIQUE KEY (b);
|
|||
--echo # have left table intact.
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
--echo #
|
||||
--echo # Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE
|
||||
--echo # WRONG FOR PARTITIONED TABLES
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB
|
||||
PARTITION BY HASH (a) PARTITIONS 2;
|
||||
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE
|
||||
CREATE_TIME IS NOT NULL AND TABLE_NAME='t1';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -370,7 +370,7 @@ Obsoletes: mariadb-embedded
|
|||
Obsoletes: MySQL-embedded < %{version}-%{release}
|
||||
Obsoletes: mysql-embedded < %{version}-%{release}
|
||||
Provides: mysql-embedded = %{version}-%{release}
|
||||
Provides: mysql-emdedded%{?_isa} = %{version}-%{release}
|
||||
Provides: mysql-embedded%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description embedded
|
||||
This package contains the MySQL server as an embedded library.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2014, Monty Program Ab.
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2015, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -199,6 +199,13 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
|
|||
set_if_bigger(min_sort_memory, sizeof(BUFFPEK*)*MERGEBUFF2);
|
||||
if (!table_sort.sort_keys)
|
||||
{
|
||||
/*
|
||||
Cannot depend on num_rows. For external sort, space for upto MERGEBUFF2
|
||||
rows is required.
|
||||
*/
|
||||
if (num_rows < MERGEBUFF2)
|
||||
num_rows= MERGEBUFF2;
|
||||
|
||||
while (memory_available >= min_sort_memory)
|
||||
{
|
||||
ulonglong keys= memory_available / (param.rec_length + sizeof(char*));
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* Copyright (c) 2006, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, 2013, Monty Proram Ab.
|
||||
/* Copyright (c) 2006, 2015, Oracle and/or its affiliates.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -2530,7 +2529,8 @@ ndbcluster_check_if_local_tables_in_db(THD *thd, const char *dbname)
|
|||
char path[FN_REFLEN + 1];
|
||||
|
||||
build_table_filename(path, sizeof(path) - 1, dbname, "", "", 0);
|
||||
if (find_files(thd, &files, dbname, path, NullS, 0) != FIND_FILES_OK)
|
||||
if (find_files(thd, &files, dbname, path, NullS, 0, NULL) !=
|
||||
FIND_FILES_OK)
|
||||
{
|
||||
DBUG_PRINT("info", ("Failed to find files"));
|
||||
DBUG_RETURN(true);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2014, SkySQL Ab.
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2015, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -3294,7 +3294,19 @@ void Item_func_group_concat::cleanup()
|
|||
}
|
||||
DBUG_ASSERT(tree == 0);
|
||||
}
|
||||
|
||||
/*
|
||||
As the ORDER structures pointed to by the elements of the
|
||||
'order' array may be modified in find_order_in_list() called
|
||||
from Item_func_group_concat::setup() to point to runtime
|
||||
created objects, we need to reset them back to the original
|
||||
arguments of the function.
|
||||
*/
|
||||
ORDER **order_ptr= order;
|
||||
for (uint i= 0; i < arg_count_order; i++)
|
||||
{
|
||||
(*order_ptr)->item= &args[arg_count_field + i];
|
||||
order_ptr++;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2014, Monty Program Ab.
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2015, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1486,6 +1486,11 @@ static void append_create_options(THD *thd, String *packet,
|
|||
to tailor the format of the statement. Can be
|
||||
NULL, in which case only SQL_MODE is considered
|
||||
when building the statement.
|
||||
show_database If true, then print the database before the table
|
||||
name. The database name is only printed in the event
|
||||
that it is different from the current database.
|
||||
If false, then do not print the database before
|
||||
the table name.
|
||||
|
||||
NOTE
|
||||
Currently always return 0, but might return error code in the
|
||||
|
@ -2189,7 +2194,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
|
|||
Security_context *tmp_sctx= tmp->security_ctx;
|
||||
struct st_my_thread_var *mysys_var;
|
||||
if ((tmp->vio_ok() || tmp->system_thread) &&
|
||||
(!user || (tmp_sctx->user && !strcmp(tmp_sctx->user, user))))
|
||||
(!user || (!tmp->system_thread &&
|
||||
tmp_sctx->user && !strcmp(tmp_sctx->user, user))))
|
||||
{
|
||||
thread_info *thd_info= new thread_info;
|
||||
|
||||
|
@ -2314,7 +2320,8 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
|
|||
ulonglong max_counter;
|
||||
|
||||
if ((!tmp->vio_ok() && !tmp->system_thread) ||
|
||||
(user && (!tmp_sctx->user || strcmp(tmp_sctx->user, user))))
|
||||
(user && (tmp->system_thread || !tmp_sctx->user ||
|
||||
strcmp(tmp_sctx->user, user))))
|
||||
continue;
|
||||
|
||||
restore_record(table, s->default_values);
|
||||
|
|
|
@ -4894,7 +4894,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
|
|||
|
||||
int result __attribute__((unused))=
|
||||
store_create_info(thd, table, &query,
|
||||
create_info, FALSE /* show_database */);
|
||||
create_info, TRUE /* show_database */);
|
||||
|
||||
DBUG_ASSERT(result == 0); // store_create_info() always return 0
|
||||
if (write_bin_log(thd, TRUE, query.ptr(), query.length()))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
|
@ -1528,6 +1528,9 @@ buf_pool_watch_set(
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
/* The maximum number of purge threads should never exceed
|
||||
BUF_POOL_WATCH_SIZE. So there is no way for purge thread
|
||||
instance to hold a watch when setting another watch. */
|
||||
for (i = 0; i < BUF_POOL_WATCH_SIZE; i++) {
|
||||
bpage = &buf_pool->watch[i];
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, 2009 Google Inc.
|
||||
Copyright (c) 2009, Percona Inc.
|
||||
|
||||
|
@ -8026,6 +8026,13 @@ ha_innobase::estimate_rows_upper_bound(void)
|
|||
estimate = 2 * local_data_file_length /
|
||||
dict_index_calc_min_rec_len(index);
|
||||
|
||||
/* Set num_rows less than MERGEBUFF to simulate the case where we do
|
||||
not have enough space to merge the externally sorted file blocks. */
|
||||
DBUG_EXECUTE_IF("set_num_rows_lt_MERGEBUFF",
|
||||
estimate = 2;
|
||||
DBUG_SET("-d,set_num_rows_lt_MERGEBUFF");
|
||||
);
|
||||
|
||||
prebuilt->trx->op_info = (char*)"";
|
||||
|
||||
DBUG_RETURN((ha_rows) estimate);
|
||||
|
@ -8280,17 +8287,6 @@ ha_innobase::info_low(
|
|||
prebuilt->trx->op_info = "returning various info to MySQL";
|
||||
}
|
||||
|
||||
my_snprintf(path, sizeof(path), "%s/%s%s",
|
||||
mysql_data_home, ib_table->name, reg_ext);
|
||||
|
||||
unpack_filename(path,path);
|
||||
|
||||
/* Note that we do not know the access time of the table,
|
||||
nor the CHECK TABLE time, nor the UPDATE or INSERT time. */
|
||||
|
||||
if (os_file_get_status(path,&stat_info)) {
|
||||
stats.create_time = (ulong) stat_info.ctime;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag & HA_STATUS_VARIABLE) {
|
||||
|
@ -8535,6 +8531,20 @@ ha_innobase::info_low(
|
|||
}
|
||||
|
||||
dict_table_stats_unlock(ib_table, RW_S_LATCH);
|
||||
|
||||
my_snprintf(path, sizeof(path), "%s/%s%s",
|
||||
mysql_data_home,
|
||||
table->s->normalized_path.str,
|
||||
reg_ext);
|
||||
|
||||
unpack_filename(path,path);
|
||||
|
||||
/* Note that we do not know the access time of the table,
|
||||
nor the CHECK TABLE time, nor the UPDATE or INSERT time. */
|
||||
|
||||
if (os_file_get_status(path,&stat_info)) {
|
||||
stats.create_time = (ulong) stat_info.ctime;
|
||||
}
|
||||
}
|
||||
|
||||
if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2009, Percona Inc.
|
||||
|
||||
|
@ -2240,9 +2240,9 @@ innobase_shutdown_for_mysql(void)
|
|||
|
||||
ibuf_close();
|
||||
log_shutdown();
|
||||
lock_sys_close();
|
||||
trx_sys_file_format_close();
|
||||
trx_sys_close();
|
||||
lock_sys_close();
|
||||
|
||||
mutex_free(&srv_monitor_file_mutex);
|
||||
mutex_free(&srv_dict_tmpfile_mutex);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2013, 2014, MariaDB Corporation. All Rights Reserved.
|
||||
|
||||
|
@ -1078,8 +1078,9 @@ sync_array_output_info(
|
|||
os_thread_id_t r;
|
||||
|
||||
fprintf(file,
|
||||
"OS WAIT ARRAY INFO: reservation count %ld, signal count %ld\n",
|
||||
(long) arr->res_count, (long) arr->sg_count);
|
||||
"OS WAIT ARRAY INFO: reservation count " ULINTPF
|
||||
", signal count " ULINTPF "\n",
|
||||
arr->res_count, arr->sg_count);
|
||||
i = 0;
|
||||
count = 0;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2002, 2010, Oracle and/or its affiliates
|
||||
Copyright (c) 2002, 2015, Oracle and/or its affiliates
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -69,6 +69,10 @@ static double mbr_join_square(const double *a, const double *b, int n_dim)
|
|||
b += 2;
|
||||
}while (a != end);
|
||||
|
||||
/* Check for infinity or NaN */
|
||||
if (my_isinf(square) || isnan(square))
|
||||
square = DBL_MAX;
|
||||
|
||||
return square;
|
||||
}
|
||||
|
||||
|
@ -103,6 +107,9 @@ static void pick_seeds(SplitStruct *node, int n_entries,
|
|||
double max_d = -DBL_MAX;
|
||||
double d;
|
||||
|
||||
*seed_a = node;
|
||||
*seed_b = node + 1;
|
||||
|
||||
for (cur1 = node; cur1 < lim1; ++cur1)
|
||||
{
|
||||
for (cur2=cur1 + 1; cur2 < lim2; ++cur2)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -427,7 +427,7 @@ Obsoletes: MySQL-embedded-pro
|
|||
Obsoletes: MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise
|
||||
Obsoletes: MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl
|
||||
Provides: mysql-embedded = %{version}-%{release}
|
||||
Provides: mysql-emdedded%{?_isa} = %{version}-%{release}
|
||||
Provides: mysql-embedded%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n MySQL-embedded%{product_suffix}
|
||||
This package contains the MySQL server as an embedded library.
|
||||
|
|
Loading…
Add table
Reference in a new issue